penguins-eggs 9.6.23 → 9.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/.oclif.manifest.json +1458 -1
  2. package/README.md +1527 -201
  3. package/addons/eggs/theme/livecd/grub.main.cfg +4 -4
  4. package/addons/eggs/theme/livecd/isolinux.main.cfg +5 -5
  5. package/bin/dev.js +6 -0
  6. package/bin/run +0 -0
  7. package/bin/run.js +7 -0
  8. package/conf/derivatives.yaml +23 -3
  9. package/conf/distros/README.md +25 -0
  10. package/conf/distros/bionic/calamares/calamares-modules/sources-yolk/module.yml +8 -0
  11. package/conf/distros/bionic/calamares/calamares-modules/sources-yolk/sources-yolk.sh +82 -0
  12. package/conf/distros/bionic/calamares/modules/packages.yml +6 -0
  13. package/conf/distros/{rolling/calamares-32 → bionic/calamares}/modules/removeuser.yml +2 -3
  14. package/conf/distros/bionic/calamares/modules/unpackfs.yml +6 -0
  15. package/conf/distros/buster/calamares/calamares-modules/bootloader-config/bootloader-config.sh +3 -3
  16. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +1 -1
  17. package/conf/distros/buster/calamares/modules/bootloader.yml +2 -1
  18. package/conf/distros/buster/calamares/modules/fstab.yml +1 -1
  19. package/conf/distros/buster/calamares/modules/mount.yml +2 -2
  20. package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +10 -1
  21. package/conf/distros/focal/calamares/modules/before_bootloader_mkdirs_context.yml +4 -4
  22. package/conf/distros/focal/calamares/modules/fstab.yml +1 -1
  23. package/conf/distros/focal/calamares/modules/mount.yml +2 -2
  24. package/conf/distros/focal/calamares/modules/shellprocess_bug-LP#1829805.yml +1 -1
  25. package/conf/distros/focal/calamares/modules/shellprocess_logs.yml +1 -1
  26. package/conf/distros/stretch/krill/krill-modules/bootloader-config/bootloader-config.sh +28 -0
  27. package/conf/distros/stretch/krill/krill-modules/bootloader-config/module.yml +8 -0
  28. package/conf/distros/stretch/krill/krill-modules/remove-link/module.yml +9 -0
  29. package/conf/distros/stretch/krill/krill-modules/remove-link/remove-link.sh +5 -0
  30. package/conf/distros/stretch/krill/krill-modules/sources-yolk/module.yml +8 -0
  31. package/conf/distros/stretch/krill/krill-modules/sources-yolk/sources-yolk.sh +75 -0
  32. package/conf/distros/stretch/krill/krill-modules/sources-yolk-unmount/module.yml +8 -0
  33. package/conf/distros/stretch/krill/modules/partitions.yml +8 -0
  34. package/conf/distros/stretch/krill/modules/removeuser.yml +15 -0
  35. package/conf/distros/{rolling/calamares-32 → stretch/krill}/settings.yml +50 -11
  36. package/conf/eggs.yaml +2 -9
  37. package/conf/{exclude.list.homes → exclude.list.d/home.list} +6 -1
  38. package/conf/{exclude.list.template → exclude.list.d/master.list} +16 -26
  39. package/conf/{exclude.list.usr → exclude.list.d/usr.list} +2 -2
  40. package/conf/exclude.list.d/var.list +21 -0
  41. package/conf/tools.yaml +1 -3
  42. package/dist/classes/compressors.js +11 -13
  43. package/dist/classes/daddy.js +1 -3
  44. package/dist/classes/distro.js +23 -4
  45. package/dist/classes/families/archlinux.js +7 -9
  46. package/dist/classes/families/debian.js +1 -1
  47. package/dist/classes/families/fedora.js +1 -1
  48. package/dist/classes/families/suse.js +1 -1
  49. package/dist/classes/incubation/branding.js +9 -3
  50. package/dist/classes/incubation/distros/bionic.js +8 -3
  51. package/dist/classes/incubation/distros/buster.js +8 -3
  52. package/dist/classes/incubation/distros/focal.js +8 -3
  53. package/dist/classes/incubation/distros/jessie.js +6 -3
  54. package/dist/classes/incubation/distros/rolling.js +8 -4
  55. package/dist/classes/incubation/fisherman-helper/packages.js +5 -2
  56. package/dist/classes/incubation/fisherman.js +18 -3
  57. package/dist/classes/incubation/incubator.js +7 -2
  58. package/dist/classes/incubation/installer.js +3 -1
  59. package/dist/classes/initrd.js +5 -5
  60. package/dist/classes/keyboards.js +4 -4
  61. package/dist/classes/network.js +7 -7
  62. package/dist/classes/ovary.js +136 -176
  63. package/dist/classes/pacman.js +12 -14
  64. package/dist/classes/pve-live.js +1 -1
  65. package/dist/classes/pxe.js +10 -12
  66. package/dist/classes/settings.js +19 -18
  67. package/dist/classes/systemctl.js +1 -1
  68. package/dist/classes/tailor.js +6 -6
  69. package/dist/classes/tools.js +4 -6
  70. package/dist/classes/users.js +10 -0
  71. package/dist/classes/utils.js +30 -0
  72. package/dist/classes/xdg.js +21 -8
  73. package/dist/classes/yolk.js +3 -5
  74. package/dist/commands/adapt.js +8 -8
  75. package/dist/commands/analyze.js +9 -12
  76. package/dist/commands/calamares.js +20 -23
  77. package/dist/commands/config.js +13 -13
  78. package/dist/commands/cuckoo.js +7 -7
  79. package/dist/commands/dad.js +12 -12
  80. package/dist/commands/export/deb.js +20 -25
  81. package/dist/commands/export/iso.js +11 -11
  82. package/dist/commands/install.js +41 -37
  83. package/dist/commands/kill.js +12 -15
  84. package/dist/commands/mom.js +7 -7
  85. package/dist/commands/produce.js +71 -47
  86. package/dist/commands/status.js +8 -8
  87. package/dist/commands/syncfrom.js +34 -40
  88. package/dist/commands/syncto.js +142 -202
  89. package/dist/commands/tools/clean.js +9 -9
  90. package/dist/commands/tools/ppa.js +12 -12
  91. package/dist/commands/tools/skel.js +10 -10
  92. package/dist/commands/tools/stat.js +11 -11
  93. package/dist/commands/tools/yolk.js +9 -9
  94. package/dist/commands/update.js +8 -8
  95. package/dist/commands/wardrobe/get.js +13 -10
  96. package/dist/commands/wardrobe/list.js +15 -13
  97. package/dist/commands/wardrobe/show.js +16 -13
  98. package/dist/commands/wardrobe/wear.js +16 -14
  99. package/dist/components/summary.js +5 -2
  100. package/dist/interfaces/i-analyze.js +8 -10
  101. package/dist/interfaces/{i-filters.js → i-excludes.js} +0 -1
  102. package/dist/krill/krill-prepare.js +23 -11
  103. package/dist/krill/krill-sequence.js +72 -73
  104. package/dist/krill/modules/fstab.js +59 -32
  105. package/dist/krill/modules/mkfs.js +29 -16
  106. package/dist/krill/modules/network-cfg.js +22 -21
  107. package/dist/krill/modules/partition.js +3 -3
  108. package/dist/lib/dependencies.js +1 -0
  109. package/dist/lib/select_filesystem_type.js +6 -1
  110. package/manpages/doc/man/eggs.1.gz +0 -0
  111. package/manpages/doc/man/eggs.html +128 -74
  112. package/mkinitcpio/biglinux/live.conf +74 -0
  113. package/mkinitcpio/biglinux/mkinitcpio.conf +73 -0
  114. package/package.json +43 -41
  115. package/scripts/_eggs +17 -14
  116. package/scripts/eggs.bash +6 -6
  117. package/conf/distros/rolling/calamares-32/modules/displaymanager.yml +0 -23
  118. package/conf/distros/rolling/calamares-32/modules/finished.yml +0 -6
  119. package/conf/distros/rolling/calamares-32/modules/fstab.yml +0 -14
  120. package/conf/distros/rolling/calamares-32/modules/locale.yml +0 -11
  121. package/conf/distros/rolling/calamares-32/modules/mount.yml +0 -39
  122. package/conf/distros/rolling/calamares-32/modules/packages.yml +0 -11
  123. package/conf/distros/rolling/calamares-32/modules/partition.yml +0 -283
  124. package/conf/distros/rolling/calamares-32/modules/shellprocess_removelink.yml +0 -8
  125. package/conf/distros/rolling/calamares-32/modules/unpackfs.yml +0 -7
  126. package/conf/distros/rolling/calamares-32/modules/users.yml +0 -20
  127. package/conf/exclude.list.custom +0 -3
  128. package/manpages/doc/man/README.md +0 -0
@@ -24,6 +24,13 @@ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
24
24
  *
25
25
  */
26
26
  class Incubator {
27
+ verbose = false;
28
+ installer = {};
29
+ remix;
30
+ distro;
31
+ user_opt;
32
+ theme;
33
+ isClone;
27
34
  /**
28
35
  *
29
36
  * @param remix
@@ -31,8 +38,6 @@ class Incubator {
31
38
  * @param verbose
32
39
  */
33
40
  constructor(remix, distro, user_opt = 'live', theme = 'eggs', isClone = false, verbose = false) {
34
- this.verbose = false;
35
- this.installer = {};
36
41
  this.installer = (0, installer_1.installer)();
37
42
  this.remix = remix;
38
43
  this.distro = distro;
@@ -32,9 +32,11 @@ function installer() {
32
32
  const distro = new distro_1.default(remix);
33
33
  if (distro.isCalamaresAvailable) {
34
34
  installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares/';
35
+ /*
35
36
  if (distro.distroId === 'ManjaroLinux') {
36
- installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares-32/';
37
+ installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares-3.2/'
37
38
  }
39
+ */
38
40
  installer.templateModules = installer.template + 'modules/';
39
41
  installer.templateMultiarch = installer.template + 'calamares-modules/';
40
42
  }
@@ -19,12 +19,12 @@ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
19
19
  * cryptsetup
20
20
  */
21
21
  class Initrd {
22
+ workDir = '/tmp/initrd-extracted';
23
+ compression = 'gzip';
24
+ initrdSrc = '/initrd.img';
25
+ initrdDest = '/home/eggs/ovarium/iso/live';
26
+ fsLive = '/home/eggs/ovarium/filesystem';
22
27
  constructor(initrdSrc = '/initrd.img', initrdDest = '/home/eggs/mnt/ovarium/iso/live/initrd.img', fsLive = '/home/eggs/ovarium/filesystem') {
23
- this.workDir = '/tmp/initrd-extracted';
24
- this.compression = 'gzip';
25
- this.initrdSrc = '/initrd.img';
26
- this.initrdDest = '/home/eggs/ovarium/iso/live';
27
- this.fsLive = '/home/eggs/ovarium/filesystem';
28
28
  this.initrdSrc = initrdSrc;
29
29
  this.initrdDest = initrdDest;
30
30
  this.fsLive = fsLive;
@@ -18,11 +18,11 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
18
18
  * /usr/share/X11/xkb/rules/xorg.lst
19
19
  */
20
20
  class Keyboard {
21
+ models = [];
22
+ layouts = [];
23
+ variants = [];
24
+ options = [];
21
25
  constructor() {
22
- this.models = [];
23
- this.layouts = [];
24
- this.variants = [];
25
- this.options = [];
26
26
  const xorg = '/usr/share/X11/xkb/rules/xorg.lst';
27
27
  if (fs_1.default.existsSync(xorg)) {
28
28
  const lines = fs_1.default.readFileSync(xorg, 'utf-8').split('\n');
@@ -14,17 +14,17 @@ const os_1 = tslib_1.__importDefault(require("os"));
14
14
  *
15
15
  */
16
16
  class Network {
17
+ address = '';
18
+ cidr = '';
19
+ family = '';
20
+ internal = false;
21
+ mac = '';
22
+ netmask = '';
23
+ o = {};
17
24
  /**
18
25
  *
19
26
  */
20
27
  constructor() {
21
- this.address = '';
22
- this.cidr = '';
23
- this.family = '';
24
- this.internal = false;
25
- this.mac = '';
26
- this.netmask = '';
27
- this.o = {};
28
28
  const interfaces = os_1.default.networkInterfaces();
29
29
  const address = '';
30
30
  if (interfaces !== undefined) {
@@ -39,25 +39,20 @@ const cli_autologin_1 = tslib_1.__importDefault(require("../lib/cli-autologin"))
39
39
  * Ovary:
40
40
  */
41
41
  class Ovary {
42
- constructor() {
43
- this.verbose = false;
44
- this.echo = {};
45
- this.toNull = '';
46
- this.incubator = {};
47
- this.settings = {};
48
- this.familyId = '';
49
- this.snapshot_prefix = '';
50
- this.snapshot_basename = '';
51
- this.compression = '';
52
- this.theme = '';
53
- this.clone = false;
54
- this.cryptedclone = false;
55
- this.cliAutologin = new cli_autologin_1.default();
56
- this.ovarium = '';
57
- /**
58
- * END CLASS ovary
59
- */
60
- }
42
+ verbose = false;
43
+ echo = {};
44
+ toNull = '';
45
+ incubator = {};
46
+ settings = {};
47
+ familyId = '';
48
+ snapshot_prefix = '';
49
+ snapshot_basename = '';
50
+ compression = '';
51
+ theme = '';
52
+ clone = false;
53
+ cryptedclone = false;
54
+ cliAutologin = new cli_autologin_1.default();
55
+ nest = '';
61
56
  /**
62
57
  * @returns {boolean} success
63
58
  */
@@ -65,6 +60,7 @@ class Ovary {
65
60
  this.settings = new settings_1.default();
66
61
  if (await this.settings.load()) {
67
62
  this.familyId = this.settings.distro.familyId;
63
+ this.nest = this.settings.config.snapshot_mnt;
68
64
  if (snapshot_prefix !== '') {
69
65
  this.settings.config.snapshot_prefix = snapshot_prefix;
70
66
  }
@@ -84,7 +80,6 @@ class Ovary {
84
80
  if (await utils_2.default.customConfirm('Select yes to continue...')) {
85
81
  return true;
86
82
  }
87
- this.settings.work_dir.ovarium = this.settings.config.snapshot_dir + 'ovarium/';
88
83
  }
89
84
  return false;
90
85
  }
@@ -101,7 +96,7 @@ class Ovary {
101
96
  * @param unsecure
102
97
  * @param verbose
103
98
  */
104
- async produce(clone = false, cryptedclone = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, filters, nointeractive = false, noicons = false, unsecure = false, verbose = false) {
99
+ async produce(clone = false, cryptedclone = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, myLinks, excludes, nointeractive = false, noicons = false, unsecure = false, verbose = false) {
105
100
  this.verbose = verbose;
106
101
  this.echo = utils_2.default.setEcho(verbose);
107
102
  if (this.verbose) {
@@ -109,10 +104,8 @@ class Ovary {
109
104
  }
110
105
  this.clone = clone;
111
106
  this.cryptedclone = cryptedclone;
112
- const luksName = 'luks-eggs-data';
107
+ const luksName = 'luks-volume';
113
108
  const luksFile = `/tmp/${luksName}`;
114
- // let luksDevice = `/dev/mapper/${this.luksName}`
115
- // let luksMountpoint = `/mnt`
116
109
  if (this.familyId === 'debian' && utils_2.default.uefiArch() === 'amd64') {
117
110
  const yolk = new yolk_1.default();
118
111
  if (!yolk.exists()) {
@@ -147,24 +140,28 @@ class Ovary {
147
140
  await bleach.clean(verbose);
148
141
  }
149
142
  }
150
- /**
151
- * cryptedclone
152
- */
153
143
  if (cryptedclone) {
154
- console.log('eggs will SAVE users and users\' data ENCRYPTED on LUKS volume within the live');
155
- const users = await this.usersFill();
144
+ /**
145
+ * cryptedclone
146
+ */
147
+ console.log('eggs will SAVE users and users\' data ENCRYPTED');
148
+ /*
149
+ const users = await this.usersFill()
156
150
  for (const user of users) {
157
- if (user.saveIt) {
158
- let utype = 'user ';
159
- if (Number.parseInt(user.uid) < 1000) {
160
- utype = 'service';
161
- }
162
- console.log(`- ${utype}: ${user.login.padEnd(16)} \thome: ${user.home}`);
163
- if (user.login !== 'root') {
164
- this.addRemoveExclusion(true, user.home);
165
- }
151
+ if (user.saveIt) {
152
+ let utype = 'user '
153
+ if (Number.parseInt(user.uid) < 1000) {
154
+ utype = 'service'
166
155
  }
156
+ //console.log(`- ${utype}: ${user.login.padEnd(16)} \thome: ${user.home}`)
157
+ if (user.login !== 'root') {
158
+ this.addRemoveExclusion(true, user.home)
159
+ }
160
+ }
167
161
  }
162
+ */
163
+ }
164
+ else if (this.clone) {
168
165
  /**
169
166
  * clone
170
167
  *
@@ -172,52 +169,52 @@ class Ovary {
172
169
  * real user when create a clone,
173
170
  * this is WRONG here we correct
174
171
  */
175
- }
176
- else if (this.clone) {
177
172
  this.settings.config.user_opt = 'live'; // patch for humans
178
173
  this.settings.config.user_opt_passwd = 'evolution';
179
174
  this.settings.config.root_passwd = 'evolution';
180
175
  utils_2.default.warning('eggs will SAVE users and users\' data UNCRYPTED on the live');
176
+ }
177
+ else {
181
178
  /**
182
179
  * normal
183
180
  */
184
- }
185
- else {
186
181
  utils_2.default.warning('eggs will REMOVE users and users\' data from live');
187
182
  }
188
183
  /**
189
- * exclude.list
184
+ * create exclude.list in not exists or static
190
185
  */
191
- let excludeListTemplateDir = '/etc/penguins-eggs.d/exclude.list.d/';
192
- let excludeListTemplate = excludeListTemplateDir + 'exclude.list.template';
193
- if (!fs_1.default.existsSync(excludeListTemplate)) {
194
- utils_2.default.warning('Cannot find: ' + excludeListTemplate);
195
- process.exit(1);
196
- }
197
- let excludeCustom = '';
198
- let excludeDev = '';
199
- let excludeHomes = '';
200
- let excludeUsr = '';
201
- if (filters.custom) {
202
- excludeCustom = fs_1.default.readFileSync(`${excludeListTemplateDir}exclude.list.custom`, 'utf8');
203
- }
204
- if (filters.dev) {
205
- excludeDev = `home/${await utils_2.default.getPrimaryUser()}/*`;
206
- }
207
- if (filters.homes) {
208
- excludeHomes = fs_1.default.readFileSync(`${excludeListTemplateDir}exclude.list.homes`, 'utf8');
209
- }
210
- if (filters.usr) {
211
- excludeUsr = fs_1.default.readFileSync(`${excludeListTemplateDir}exclude.list.usr`, 'utf8');
212
- }
213
- let view = {
214
- exclude_list_custom: excludeCustom,
215
- exclude_list_dev: excludeDev,
216
- exclude_list_homes: excludeHomes,
217
- exclude_list_usr: excludeUsr
218
- };
219
- const template = fs_1.default.readFileSync(excludeListTemplate, 'utf8');
220
- fs_1.default.writeFileSync(this.settings.config.snapshot_excludes, mustache_1.default.render(template, view));
186
+ if (!fs_1.default.existsSync("/etc/penguins-eggs/exclude.list") || excludes.static) {
187
+ let excludeListTemplateDir = '/etc/penguins-eggs.d/exclude.list.d/';
188
+ let excludeListTemplate = excludeListTemplateDir + 'master.list';
189
+ if (!fs_1.default.existsSync(excludeListTemplate)) {
190
+ utils_2.default.warning('Cannot find: ' + excludeListTemplate);
191
+ process.exit(1);
192
+ }
193
+ let excludeHome = '';
194
+ let excludeMine = '';
195
+ let excludeUsr = '';
196
+ let excludeVar = '';
197
+ if (excludes.mine) {
198
+ excludeMine = `home/${await utils_2.default.getPrimaryUser()}/*`;
199
+ }
200
+ if (excludes.home) {
201
+ excludeHome = fs_1.default.readFileSync(`${excludeListTemplateDir}home.list`, 'utf8');
202
+ }
203
+ if (excludes.usr) {
204
+ excludeUsr = fs_1.default.readFileSync(`${excludeListTemplateDir}usr.list`, 'utf8');
205
+ }
206
+ if (excludes.var) {
207
+ excludeVar = fs_1.default.readFileSync(`${excludeListTemplateDir}var.list`, 'utf8');
208
+ }
209
+ let view = {
210
+ home_list: excludeHome,
211
+ mine_list: excludeMine,
212
+ usr_list: excludeUsr,
213
+ var_list: excludeVar
214
+ };
215
+ const template = fs_1.default.readFileSync(excludeListTemplate, 'utf8');
216
+ fs_1.default.writeFileSync(this.settings.config.snapshot_excludes, mustache_1.default.render(template, view));
217
+ }
221
218
  /**
222
219
  * NOTE: reCreate = false
223
220
  *
@@ -257,7 +254,7 @@ class Ovary {
257
254
  await this.cleanUsersAccounts();
258
255
  await this.createUserLive();
259
256
  if (pacman_1.default.isInstalledGui()) {
260
- await this.createXdgAutostart(this.settings.config.theme, myAddons, noicons);
257
+ await this.createXdgAutostart(this.settings.config.theme, myAddons, myLinks, noicons);
261
258
  /**
262
259
  * GUI installed but NOT Desktop Manager: just create motd and issue
263
260
  */
@@ -277,11 +274,13 @@ class Ovary {
277
274
  await this.uBindLiveFs(); // Lo smonto prima della fase di backup
278
275
  }
279
276
  if (cryptedclone) {
280
- await (0, utils_1.exec)('eggs syncto', utils_2.default.setEcho(true));
281
- utils_2.default.warning(`Waiting 10s, before to move ${luksFile} in ${this.ovarium}iso/live`);
282
- await (0, utils_1.exec)('sleep 10', utils_2.default.setEcho(false));
283
- utils_2.default.warning(`moving ${luksFile} in ${this.ovarium}iso/live`);
284
- await (0, utils_1.exec)(`mv ${luksFile} ${this.ovarium}iso/live`, this.echo);
277
+ let synctoCmd = `eggs syncto -f ${luksFile}`;
278
+ if (excludes.home) {
279
+ synctoCmd += ' --excludes'; // from Marco, usa home.list
280
+ }
281
+ await (0, utils_1.exec)(synctoCmd, utils_2.default.setEcho(true));
282
+ utils_2.default.warning(`moving ${luksFile} in ${this.nest}iso/live`);
283
+ await (0, utils_1.exec)(`mv ${luksFile} ${this.nest}iso/live`, this.echo);
285
284
  }
286
285
  const mkIsofsCmd = this.xorrisoCommand(clone, cryptedclone).replace(/\s\s+/g, ' ');
287
286
  const info = utils_2.default.getVolid(this.settings.remix.name);
@@ -315,20 +314,19 @@ class Ovary {
315
314
  await (0, utils_1.exec)(`chmod +x ${file}`);
316
315
  }
317
316
  /**
318
- * patch to emulate miso/archiso on archilinux
317
+ * patch to emulate miso/archiso on archilinux family
319
318
  */
320
319
  if (this.familyId === 'archlinux') {
321
320
  let pathName = `arch/x86_64/airootfs`;
322
321
  let hashCmd = 'sha512sum';
323
322
  let hashExt = '.sha512';
324
- if (this.settings.distro.distroId === 'ManjaroLinux') {
323
+ if (isMiso(this.settings.distro.distroId)) {
325
324
  pathName = `manjaro/x86_64/livefs`;
326
325
  hashCmd = `md5sum`;
327
326
  hashExt = '.md5';
328
327
  }
329
328
  await (0, utils_1.exec)(`mkdir ${this.settings.iso_work}${pathName}/x86_64 -p`, this.echo);
330
- await (0, utils_1.exec)(`mv ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}${pathName}.sfs`, this.echo);
331
- await (0, utils_1.exec)(`${hashCmd} ${this.settings.iso_work}${pathName}.sfs > ${this.settings.iso_work}${pathName}${hashExt}`, this.echo);
329
+ fs_1.default.linkSync(`${this.settings.iso_work}live/filesystem.squashfs`, `${this.settings.iso_work}${pathName}.sfs`);
332
330
  }
333
331
  await this.makeIso(mkIsofsCmd, scriptOnly);
334
332
  }
@@ -468,7 +466,9 @@ class Ovary {
468
466
  await (0, utils_1.exec)(`sed -i '/PermitRootLogin/d' ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
469
467
  await (0, utils_1.exec)(`sed -i '/PasswordAuthentication/d' ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
470
468
  if (this.settings.config.ssh_pass) {
471
- await (0, utils_1.exec)(`echo 'PermitRootLogin yes' | tee -a ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
469
+ /** removed on 2023-12-28
470
+ * await exec(`echo 'PermitRootLogin yes' | tee -a ${this.settings.work_dir.merged}/etc/ssh/sshd_config`)
471
+ */
472
472
  await (0, utils_1.exec)(`echo 'PasswordAuthentication yes' | tee -a ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
473
473
  }
474
474
  else {
@@ -732,14 +732,14 @@ class Ovary {
732
732
  let kp = `boot=live components locales=${process.env.LANG}`;
733
733
  if (this.familyId === 'archlinux') {
734
734
  const volid = utils_2.default.getVolid(this.settings.remix.name);
735
- if (isArchiso(distroId)) {
736
- kp += ` archisobasedir=arch archisolabel=${volid}`;
737
- }
738
- else if (distroId === 'ManjaroLinux') {
735
+ if (isMiso(distroId)) {
739
736
  kp += ` misobasedir=manjaro misolabel=${volid}`;
740
737
  }
741
- kp += ` cow_spacesize=4G`;
738
+ else {
739
+ kp += ` archisobasedir=arch archisolabel=${volid}`;
740
+ }
742
741
  }
742
+ kp += ` cow_spacesize=4G`;
743
743
  return kp;
744
744
  }
745
745
  /**
@@ -772,8 +772,11 @@ class Ovary {
772
772
  utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
773
773
  const distroId = this.settings.distro.distroId;
774
774
  let fileConf = 'arch';
775
- if (!isArchiso(distroId)) {
776
- fileConf = distroId.toLowerCase();
775
+ if (isMiso(distroId)) {
776
+ fileConf = "manjarolinux";
777
+ if (distroId.toLowerCase().includes("biglinux")) {
778
+ fileConf = "biglinux";
779
+ }
777
780
  }
778
781
  let pathConf = node_path_1.default.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
779
782
  await (0, utils_1.exec)(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, utils_2.default.setEcho(true));
@@ -1190,12 +1193,12 @@ class Ovary {
1190
1193
  /**
1191
1194
  *
1192
1195
  */
1193
- async createXdgAutostart(theme = 'eggs', myAddons, noicons = false) {
1196
+ async createXdgAutostart(theme = 'eggs', myAddons, myLinks = [], noicons = false) {
1194
1197
  if (this.verbose) {
1195
1198
  console.log('Ovary: createXdgAutostart');
1196
1199
  }
1197
1200
  const pathHomeLive = `/home/${this.settings.config.user_opt}`;
1198
- if (noicons) { // NO icone
1201
+ if (noicons) { // NO icons
1199
1202
  shelljs_1.default.rm(`${this.settings.work_dir.merged}/etc/xdg/autostart/penguins-links-add.desktop`);
1200
1203
  }
1201
1204
  else { // VOGLIO le icone
@@ -1297,6 +1300,11 @@ class Ovary {
1297
1300
  }
1298
1301
  else {
1299
1302
  text += 'cp /usr/share/applications/penguins-eggs.desktop "$DESKTOP"\n';
1303
+ if (myLinks.length > 0) {
1304
+ for (const link of myLinks) {
1305
+ text += `cp /usr/share/applications/${link}.desktop "$DESKTOP"\n`;
1306
+ }
1307
+ }
1300
1308
  if (myAddons.adapt)
1301
1309
  text += 'cp /usr/share/applications/eggs-adapt.desktop "$DESKTOP"\n';
1302
1310
  if (myAddons.pve)
@@ -1352,7 +1360,7 @@ class Ovary {
1352
1360
  /**
1353
1361
  * Add or remove exclusion
1354
1362
  * @param add {boolean} true = add, false remove
1355
- * @param exclusion {atring} path to add/remove
1363
+ * @param exclusion {string} path to add/remove
1356
1364
  */
1357
1365
  addRemoveExclusion(add, exclusion) {
1358
1366
  if (this.verbose) {
@@ -1638,85 +1646,28 @@ class Ovary {
1638
1646
  uefi_isohybridGptBasdat = '-isohybrid-gpt-basdat';
1639
1647
  uefi_noEmulBoot = '-no-emul-boot';
1640
1648
  }
1641
- /**
1642
- * info Debian GNU/Linux 10.8.0 "Buster" - Official i386 NETINST 20210206-10:54
1643
- * mkisofs xorriso -as mkisofs
1644
- * -r
1645
- * -checksum_algorithm_iso md5,sha1,sha256,sha512
1646
- * -V 'Debian 10.8.0 i386 n'
1647
- * -o /srv/cdbuilder.debian.org/dst/deb-cd/out/2busteri386/debian-10.8.0-i386-NETINST-1.iso
1648
- * -jigdo-jigdo /srv/cdbuilder.debian.org/dst/deb-cd/out/2busteri386/debian-10.8.0-i386-NETINST-1.jigdo
1649
- * -jigdo-template /srv/cdbuilder.debian.org/dst/deb-cd/out/2busteri386/debian-10.8.0-i386-NETINST-1.template
1650
- * -jigdo-map Debian=/srv/cdbuilder.debian.org/src/ftp/debian/
1651
- * -jigdo-exclude boot1
1652
- * -md5-list /srv/cdbuilder.debian.org/src/deb-cd/tmp/2busteri386/buster/md5-check
1653
- * -jigdo-min-file-size 1024
1654
- * -jigdo-exclude 'README*'
1655
- * -jigdo-exclude /doc/
1656
- * -jigdo-exclude /md5sum.txt
1657
- * -jigdo-exclude /.disk/
1658
- * -jigdo-exclude /pics/
1659
- * -jigdo-exclude 'Release*'
1660
- * -jigdo-exclude 'Packages*'
1661
- * -jigdo-exclude 'Sources*'
1662
- * -J
1663
- * -joliet-long
1664
- * -cache-inodes
1665
- * -isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin
1666
- * -b isolinux/isolinux.bin
1667
- * -c isolinux/boot.cat
1668
- * -boot-load-size 4
1669
- * -boot-info-table
1670
- * -no-emul-boot
1671
- * -uefi_elToritoAltBoot-alt-boot
1672
- * -e boot/grub/efi.img
1673
- * -no-emul-boot
1674
- * -isohybrid-gpt-basdat
1675
- * isohybrid-apm-hfsplus
1676
- * boot1 CD1
1677
-
1678
- command = `xorriso -as mkisofs \
1679
- -r \
1680
- -checksum_algorithm_iso md5,sha1,sha256,sha512 \
1681
- -V ${volid} \
1682
- -o ${output} \
1683
- -J \
1684
- -joliet-long \
1685
- -cache-inodes \
1686
- ${isoHybridMbr} \
1687
- -b isolinux/isolinux.bin \
1688
- -c isolinux/boot.cat \
1689
- -boot-load-size 4 \
1690
- -boot-info-table \
1691
- -no-emul-boot \
1692
- ${uefi_eltoritoAltBoot} \
1693
- ${uefi_e} \
1694
- ${uefi_noEmulBoot} \
1695
- ${uefi_isohybridGptBasdat}
1696
- ${this.settings.iso_work}`
1697
- */
1698
- /**
1699
- * how is made in refracta
1700
- *
1701
- * -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin
1702
- * uefi_opt="-eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot"
1703
- *
1704
- * xorriso -as mkisofs -r \
1705
- * -J \
1706
- * -joliet-long \
1707
- * -l \
1708
- * -iso-level 3 \
1709
- * ${isohybrid_opt} \
1710
- * -partition_offset 16 \
1711
- * -V "$volid" \
1712
- * -b isolinux/isolinux.bin \
1713
- * -c isolinux/boot.cat \
1714
- * -no-emul-boot \
1715
- * -boot-load-size 4 \
1716
- * -boot-info-table \
1717
- * ${uefi_opt} \
1718
- * -o "$snapshot_dir"/"$filename" iso/
1719
- */
1649
+ // geniisoimage from Hosein
1650
+ if (pacman_1.default.packageIsInstalled('genisoimage')) {
1651
+ command = `genisoimage \
1652
+ -iso-level 3 \
1653
+ -allow-limited-size \
1654
+ -joliet-long \
1655
+ -r \
1656
+ -V "-V3.0" \
1657
+ -cache-inodes \
1658
+ -J \
1659
+ -l \
1660
+ -b isolinux/isolinux.bin \
1661
+ -c isolinux/boot.cat \
1662
+ -no-emul-boot \
1663
+ -boot-load-size 4 \
1664
+ -boot-info-table \
1665
+ -eltorito-alt-boot \
1666
+ -e boot/grub/efiboot.img \
1667
+ -o ${output} ${this.settings.iso_work}`;
1668
+ return command;
1669
+ }
1670
+ // xorriso from Piero
1720
1671
  command = `xorriso -as mkisofs \
1721
1672
  -J \
1722
1673
  -joliet-long \
@@ -1849,12 +1800,21 @@ async function rexec(cmd, verbose = false) {
1849
1800
  return cmd;
1850
1801
  }
1851
1802
  /**
1852
- * ManjaroLinux Not isArchiso
1803
+ * isMiso
1853
1804
  */
1854
- function isArchiso(distro) {
1805
+ function isMiso(distro) {
1855
1806
  let found = false;
1856
- if (distro !== 'ManjaroLinux') {
1807
+ if ((distro.includes('ManjaroLinux')) ||
1808
+ distro.toLowerCase().includes("biglinux")) {
1857
1809
  found = true;
1858
1810
  }
1859
1811
  return found;
1860
1812
  }
1813
+ /**
1814
+ * se non zuppa, pan bagnato
1815
+ * @param distro
1816
+ * @returns
1817
+ */
1818
+ function isArchiso(distro) {
1819
+ return !isMiso(distro);
1820
+ }
@@ -27,10 +27,9 @@ const config_tools = '/etc/penguins-eggs.d/tools.yaml';
27
27
  * @remarks all the utilities
28
28
  */
29
29
  class Pacman {
30
- constructor() {
31
- this.distro = {};
32
- this.remix = {};
33
- }
30
+ static debs4calamares = ['calamares', 'qml-module-qtquick2', 'qml-module-qtquick-controls'];
31
+ distro = {};
32
+ remix = {};
34
33
  /**
35
34
  *
36
35
  * @returns
@@ -353,11 +352,14 @@ class Pacman {
353
352
  config.make_md5sum = false;
354
353
  config.make_isohybrid = true;
355
354
  config.compression = 'xz';
356
- config.ssh_pass = true;
357
- config.timezone = 'America/New_York';
358
- const env = process.env;
359
- config.locales_default = env.LANG !== undefined ? env.LANG : 'en_US.UTF-8';
360
- config.locales = config.locales_default === 'en_US.UTF-8' ? ['en_US.UTF-8'] : [config.locales_default, 'en_US.UTF-8'];
355
+ config.ssh_pass = false;
356
+ config.timezone = 'Europe/Rome';
357
+ //config.locales_default = '__NOT_USED_MORE'
358
+ //config.locales = ['__NOT_USED_MORE']
359
+ // config.timezone = 'America/New_York'
360
+ // const env = process.env
361
+ // config.locales_default = env.LANG !== undefined ? env.LANG : 'en_US.UTF-8'
362
+ // config.locales = config.locales_default === 'en_US.UTF-8' ? ['en_US.UTF-8'] : [config.locales_default, 'en_US.UTF-8']
361
363
  config.pmount_fixed = false;
362
364
  if (!this.calamaresExists()) {
363
365
  config.force_installer = false;
@@ -415,10 +417,7 @@ class Pacman {
415
417
  shelljs_1.default.chmod('+x', '/etc/penguins-eggs.d/init/cuckoo.sh');
416
418
  // creazione cartella exclude.list.d
417
419
  (0, node_child_process_1.execSync)(`mkdir -p /etc/penguins-eggs.d/exclude.list.d`);
418
- shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.template'), '/etc/penguins-eggs.d/exclude.list.d');
419
- shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.custom'), '/etc/penguins-eggs.d/exclude.list.d');
420
- shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.homes'), '/etc/penguins-eggs.d/exclude.list.d');
421
- shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.usr'), '/etc/penguins-eggs.d/exclude.list.d');
420
+ shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.d/*'), '/etc/penguins-eggs.d/exclude.list.d');
422
421
  await this.configurationFresh();
423
422
  }
424
423
  /**
@@ -767,5 +766,4 @@ class Pacman {
767
766
  return installed;
768
767
  }
769
768
  }
770
- Pacman.debs4calamares = ['calamares', 'qml-module-qtquick2', 'qml-module-qtquick-controls'];
771
769
  exports.default = Pacman;
@@ -20,8 +20,8 @@ const systemctl_1 = tslib_1.__importDefault(require("./systemctl"));
20
20
  const path_1 = tslib_1.__importDefault(require("path"));
21
21
  const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
22
22
  class PveLive {
23
+ systemctl = {};
23
24
  constructor() {
24
- this.systemctl = {};
25
25
  this.systemctl = new systemctl_1.default();
26
26
  }
27
27
  create(root = '/') {