penguins-eggs 10.0.22 → 10.0.26

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 (123) hide show
  1. package/.oclif.manifest.json +8 -8
  2. package/README.md +27 -27
  3. package/addons/eggs/theme/livecd/grub.main.cfg +11 -5
  4. package/addons/eggs/theme/livecd/isolinux.main.cfg +10 -12
  5. package/conf/distros/devel/README.md +3 -0
  6. package/conf/distros/focal/README.md +3 -0
  7. package/conf/distros/jammy/README.md +1 -1
  8. package/conf/distros/noble/calamares/calamares-modules/.keepit +0 -0
  9. package/conf/distros/{focal/calamares/modules → noble/calamares/modules/focal-jammy}/fstab.yml +2 -2
  10. package/conf/distros/{focal/calamares/modules → noble/calamares/modules/focal-jammy}/mount.yml +2 -2
  11. package/conf/distros/{focal/calamares/modules → noble/calamares/modules/focal-jammy}/users.yml +2 -2
  12. package/conf/distros/noble/calamares/modules/mount.yml +1 -0
  13. package/conf/distros/noble/calamares/modules/partition.yml +2 -2
  14. package/conf/distros/noble/calamares/modules/users.yml +1 -0
  15. package/conf/distros/noble/calamares/modules/welcome.yml +1 -1
  16. package/conf/distros/noble/calamares/settings.yml +8 -8
  17. package/conf/distros/rolling/calamares/modules/finished.yml +1 -1
  18. package/dist/classes/bleach.js +22 -15
  19. package/dist/{lib → classes}/cli-autologin.d.ts +15 -6
  20. package/dist/{lib → classes}/cli-autologin.js +82 -36
  21. package/dist/classes/compressors.d.ts +1 -1
  22. package/dist/classes/compressors.js +10 -10
  23. package/dist/classes/daddy.d.ts +6 -6
  24. package/dist/classes/daddy.js +67 -67
  25. package/dist/classes/distro.js +206 -202
  26. package/dist/classes/families/alpine.js +2 -2
  27. package/dist/classes/incubation/distros/{focal.d.ts → noble.d.ts} +1 -1
  28. package/dist/classes/incubation/distros/{focal.js → noble.js} +1 -1
  29. package/dist/classes/incubation/incubator.js +5 -5
  30. package/dist/classes/keyboards.js +15 -0
  31. package/dist/classes/locales.js +25 -7
  32. package/dist/classes/ovary.d.ts +11 -11
  33. package/dist/classes/ovary.js +109 -93
  34. package/dist/classes/pacman.js +21 -19
  35. package/dist/classes/pxe.d.ts +6 -6
  36. package/dist/classes/pxe.js +42 -42
  37. package/dist/classes/utils.d.ts +5 -1
  38. package/dist/classes/utils.js +20 -17
  39. package/dist/classes/xdg.js +15 -14
  40. package/dist/classes/yolk.js +1 -1
  41. package/dist/commands/cuckoo.js +1 -1
  42. package/dist/commands/dad.d.ts +1 -1
  43. package/dist/commands/dad.js +5 -7
  44. package/dist/commands/produce.js +1 -1
  45. package/dist/commands/syncfrom.d.ts +1 -1
  46. package/dist/commands/syncfrom.js +1 -1
  47. package/dist/components/information.js +5 -10
  48. package/dist/components/summary.js +2 -1
  49. package/dist/interfaces/i-excludes.d.ts +2 -2
  50. package/dist/interfaces/i-pxe.d.ts +15 -15
  51. package/dist/krill/modules/add-user.js +10 -6
  52. package/dist/krill/modules/machine-id.js +1 -1
  53. package/dist/krill/modules/network-cfg.js +1 -1
  54. package/dist/krill/modules/packages.js +22 -0
  55. package/dist/krill/sequence.d.ts +1 -1
  56. package/dist/krill/sequence.js +3 -3
  57. package/dracut/README.md +84 -0
  58. package/dracut/dracut.conf +3 -0
  59. package/dracut/dracut.conf.d/90overlayfs.conf +5 -0
  60. package/dracut/dracut.conf.d/99custom.conf +4 -0
  61. package/dracut/install-dracut-99custom +1 -0
  62. package/dracut/usr/lib/dracut/modules.d/99custom/init-live.sh +4 -0
  63. package/dracut/usr/lib/dracut/modules.d/99custom/module-setup.sh +15 -0
  64. package/dracut/usr/lib/dracut/modules.d/99custom/mount-live.sh +25 -0
  65. package/manpages/doc/man/eggs.1.gz +0 -0
  66. package/manpages/doc/man/eggs.html +22 -28
  67. package/mkinitfs/README.md +46 -0
  68. package/mkinitfs/live.conf +2 -0
  69. package/mkinitfs/machine-id-gen.sh +3 -0
  70. package/mkinitfs/sidecar.sh +40 -0
  71. package/package.json +7 -5
  72. package/conf/distros/devel/calamares/calamares-modules/automirror/automirror.yml +0 -17
  73. package/conf/distros/devel/calamares/calamares-modules/automirror/main.py +0 -168
  74. package/conf/distros/devel/calamares/calamares-modules/automirror/module.yml +0 -7
  75. package/conf/distros/devel/calamares/modules/_packages.yml +0 -16
  76. package/conf/distros/devel/calamares/modules/after_bootloader_context.yml +0 -18
  77. package/conf/distros/devel/calamares/modules/automirror.yml +0 -16
  78. package/conf/distros/devel/calamares/modules/before_bootloader_context.yml +0 -24
  79. package/conf/distros/devel/calamares/modules/bootloader.yml +0 -33
  80. package/conf/distros/devel/calamares/modules/finished.yml +0 -3
  81. package/conf/distros/devel/calamares/modules/fstab.yml +0 -2
  82. package/conf/distros/devel/calamares/modules/grubcfg.yml +0 -3
  83. package/conf/distros/devel/calamares/modules/locale.yml +0 -8
  84. package/conf/distros/devel/calamares/modules/machineid.yml +0 -8
  85. package/conf/distros/devel/calamares/modules/mount.yml +0 -38
  86. package/conf/distros/devel/calamares/modules/partition.yml +0 -8
  87. package/conf/distros/devel/calamares/modules/shellprocess_add386arch.yml +0 -5
  88. package/conf/distros/devel/calamares/modules/shellprocess_bug-LP#1829805.yml +0 -5
  89. package/conf/distros/devel/calamares/modules/unpackfs.yml +0 -5
  90. package/conf/distros/devel/calamares/modules/users.yml +0 -23
  91. package/conf/distros/devel/calamares/modules/welcome.yml +0 -26
  92. package/conf/distros/devel/calamares/settings.yml +0 -72
  93. package/conf/distros/focal/calamares/calamares-modules/automirror/automirror.yml +0 -17
  94. package/conf/distros/focal/calamares/calamares-modules/automirror/main.py +0 -168
  95. package/conf/distros/focal/calamares/calamares-modules/automirror/module.yml +0 -7
  96. package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +0 -19
  97. package/conf/distros/focal/calamares/modules/automirror.yml +0 -6
  98. package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +0 -19
  99. package/conf/distros/focal/calamares/modules/before_bootloader_mkdirs_context.yml +0 -11
  100. package/conf/distros/focal/calamares/modules/bootloader.yml +0 -34
  101. package/conf/distros/focal/calamares/modules/finished.yml +0 -4
  102. package/conf/distros/focal/calamares/modules/grubcfg.yml +0 -5
  103. package/conf/distros/focal/calamares/modules/locale.yml +0 -9
  104. package/conf/distros/focal/calamares/modules/machineid.yml +0 -9
  105. package/conf/distros/focal/calamares/modules/partition.yml +0 -10
  106. package/conf/distros/focal/calamares/modules/shellprocess_add386arch.yml +0 -6
  107. package/conf/distros/focal/calamares/modules/shellprocess_bug-LP#1829805.yml +0 -5
  108. package/conf/distros/focal/calamares/modules/shellprocess_logs.yml +0 -6
  109. package/conf/distros/focal/calamares/modules/unpackfs.yml +0 -7
  110. package/conf/distros/focal/calamares/modules/welcome.yml +0 -26
  111. package/conf/distros/focal/calamares/settings.yml +0 -72
  112. package/conf/distros/noble/calamares/modules/before_bootloader_mkdirs_context.yml +0 -10
  113. package/conf/distros/noble/calamares/modules/displaymanager.yml +0 -9
  114. package/conf/distros/noble/calamares/modules/shellprocess_logs.yml +0 -5
  115. /package/conf/distros/noble/calamares/modules/{automirror.yml → _automirror.yml} +0 -0
  116. /package/conf/distros/noble/calamares/modules/{before_bootloader_context.yml → _before_bootloader_context.yml} +0 -0
  117. /package/conf/distros/{devel/calamares/modules/before_bootloader_mkdirs_context.yml → noble/calamares/modules/_before_bootloader_mkdirs_context.yml} +0 -0
  118. /package/conf/distros/{devel → noble}/calamares/modules/_displaymanager.yml +0 -0
  119. /package/conf/distros/noble/calamares/modules/{oemid.yml → _oemid.yml} +0 -0
  120. /package/conf/distros/noble/calamares/modules/{pkgselect_context.yml → _pkgselect_context.yml} +0 -0
  121. /package/conf/distros/noble/calamares/modules/{pkgselect_snap_context.yml → _pkgselect_snap_context.yml} +0 -0
  122. /package/conf/distros/{devel/calamares/modules/shellprocess_logs.yml → noble/calamares/modules/_shellprocess_logs.yml} +0 -0
  123. /package/conf/distros/noble/calamares/modules/{users.conf.oem → _users.conf.oem} +0 -0
@@ -16,10 +16,10 @@ import { access } from 'node:fs/promises';
16
16
  import os from 'node:os';
17
17
  import path from 'node:path';
18
18
  import shx from 'shelljs';
19
- import CliAutologin from '../lib/cli-autologin.js';
20
19
  // libraries
21
20
  import { exec } from '../lib/utils.js';
22
21
  import Bleach from './bleach.js';
22
+ import CliAutologin from './cli-autologin.js';
23
23
  import { displaymanager } from './incubation/fisherman-helper/displaymanager.js';
24
24
  import Incubator from './incubation/incubator.js';
25
25
  import N8 from './n8.js';
@@ -44,16 +44,16 @@ export default class Ovary {
44
44
  cryptedclone = false;
45
45
  echo = {};
46
46
  familyId = '';
47
+ genisoimage = false;
47
48
  incubator = {};
48
49
  nest = '';
49
50
  settings = {};
50
51
  snapshot_basename = '';
51
52
  snapshot_prefix = '';
52
53
  theme = '';
53
- volid = '';
54
54
  toNull = '';
55
- genisoimage = false;
56
55
  verbose = false;
56
+ volid = '';
57
57
  /**
58
58
  * Add or remove exclusion
59
59
  * @param add {boolean} true = add, false remove
@@ -198,8 +198,12 @@ export default class Ovary {
198
198
  ignore: false
199
199
  });
200
200
  const users = result.data.split('\n');
201
+ let deluser = 'deluser';
202
+ if (this.familyId === 'archlinux') {
203
+ deluser = 'userdel';
204
+ }
201
205
  for (let i = 0; i < users.length - 1; i++) {
202
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} deluser ${users[i]}`, this.verbose));
206
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} ${deluser} ${users[i]}`, this.verbose));
203
207
  }
204
208
  }
205
209
  /**
@@ -223,22 +227,28 @@ export default class Ovary {
223
227
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', this.verbose));
224
228
  // da problemi con il mount sshfs
225
229
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' chown ' + this.settings.config.user_opt + ':users' + ' /home/' + this.settings.config.user_opt + ' -R', this.verbose));
226
- if (this.familyId === 'debian') {
227
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
228
- }
229
- else if (this.familyId === 'alpine') {
230
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG cdrom ${this.settings.config.user_opt}`, this.verbose));
231
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG games ${this.settings.config.user_opt}`, this.verbose));
232
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG input ${this.settings.config.user_opt}`, this.verbose));
233
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG users ${this.settings.config.user_opt}`, this.verbose));
234
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG video ${this.settings.config.user_opt}`, this.verbose));
235
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
236
- }
237
- else if (this.familyId === 'archlinux') {
238
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
239
- // check or create group: autologin
240
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} getent group autologin || chroot ${this.settings.work_dir.merged} groupadd autologin`, this.verbose));
241
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
230
+ switch (this.familyId) {
231
+ case 'debian': {
232
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
233
+ break;
234
+ }
235
+ case 'alpine': {
236
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG cdrom ${this.settings.config.user_opt}`, this.verbose));
237
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG games ${this.settings.config.user_opt}`, this.verbose));
238
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG input ${this.settings.config.user_opt}`, this.verbose));
239
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG users ${this.settings.config.user_opt}`, this.verbose));
240
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG video ${this.settings.config.user_opt}`, this.verbose));
241
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
242
+ break;
243
+ }
244
+ case 'archlinux': {
245
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
246
+ // check or create group: autologin
247
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} getent group autologin || chroot ${this.settings.work_dir.merged} groupadd autologin`, this.verbose));
248
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
249
+ break;
250
+ }
251
+ // No default
242
252
  }
243
253
  /**
244
254
  * educaandos and others themes
@@ -704,7 +714,7 @@ export default class Ovary {
704
714
  */
705
715
  async initrdAlpine() {
706
716
  Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Alpine on ISO/live`);
707
- let initrdImg = 'initramfs-lts';
717
+ const initrdImg = 'initramfs-lts';
708
718
  // dracut
709
719
  // const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`)
710
720
  // await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true))
@@ -714,25 +724,6 @@ export default class Ovary {
714
724
  const sidecars = path.resolve(__dirname, `../../mkinitfs/*.sh`);
715
725
  await exec(`cp ${sidecars} ${this.settings.iso_work}live/`);
716
726
  }
717
- /**
718
- * initrdFedora()
719
- */
720
- async initrdFedora() {
721
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
722
- // dracut
723
- const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
724
- const initrdImg = `initramfs-${kernelVersion}`;
725
- const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`);
726
- await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
727
- //await exec(`cp /boot/initramfs-*.img ${this.settings.iso_work}/live/`, this.echo)
728
- }
729
- /**
730
- * initrdSuse()
731
- */
732
- async initrdSuse() {
733
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
734
- await exec(`cp /boot/initrd-* ${this.settings.iso_work}/live/`, this.echo);
735
- }
736
727
  /**
737
728
  * initrdArch()
738
729
  * necessita di echoYes
@@ -769,6 +760,25 @@ export default class Ovary {
769
760
  await exec('mv /etc/crypttab.saved /etc/crypttab', this.echo);
770
761
  }
771
762
  }
763
+ /**
764
+ * initrdFedora()
765
+ */
766
+ async initrdFedora() {
767
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
768
+ // dracut
769
+ const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
770
+ const initrdImg = `initramfs-${kernelVersion}`;
771
+ const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`);
772
+ await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
773
+ // await exec(`cp /boot/initramfs-*.img ${this.settings.iso_work}/live/`, this.echo)
774
+ }
775
+ /**
776
+ * initrdSuse()
777
+ */
778
+ async initrdSuse() {
779
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
780
+ await exec(`cp /boot/initrd-* ${this.settings.iso_work}/live/`, this.echo);
781
+ }
772
782
  /**
773
783
  * async isolinux
774
784
  */
@@ -1293,8 +1303,8 @@ export default class Ovary {
1293
1303
  if (this.verbose) {
1294
1304
  console.log('Ovary: mergedAndOverlay');
1295
1305
  }
1296
- // boot viene copiato... non ricordo perchè
1297
- const mountDirs = ['etc', 'usr', 'var'];
1306
+ // agginto bin per autologin su Alpine
1307
+ const mountDirs = ['bin', 'etc', 'usr', 'var'];
1298
1308
  let mountDir = '';
1299
1309
  let overlay = false;
1300
1310
  for (mountDir of mountDirs) {
@@ -1405,42 +1415,40 @@ export default class Ovary {
1405
1415
  /**
1406
1416
  * exclude.list
1407
1417
  */
1408
- if (!excludes.static) {
1409
- /**
1410
- * create exclude.list if not exists
1411
- */
1412
- if (!fs.existsSync('/etc/penguins-eggs/exclude.list')) {
1413
- const excludeListTemplateDir = '/etc/penguins-eggs.d/exclude.list.d/';
1414
- const excludeListTemplate = excludeListTemplateDir + 'master.list';
1415
- if (!fs.existsSync(excludeListTemplate)) {
1416
- Utils.warning('Cannot find: ' + excludeListTemplate);
1417
- process.exit(1);
1418
- }
1419
- let excludeUsr = '';
1420
- let excludeVar = '';
1421
- let excludeHomes = '';
1422
- let excludeHome = '';
1423
- if (excludes.usr) {
1424
- excludeUsr = fs.readFileSync(`${excludeListTemplateDir}usr.list`, 'utf8');
1425
- }
1426
- if (excludes.var) {
1427
- excludeVar = fs.readFileSync(`${excludeListTemplateDir}var.list`, 'utf8');
1428
- }
1429
- if (excludes.homes) {
1430
- excludeHomes = fs.readFileSync(`${excludeListTemplateDir}homes.list`, 'utf8');
1431
- }
1432
- if (excludes.home) {
1433
- excludeHome = `home/${await Utils.getPrimaryUser()}/*`;
1434
- }
1435
- const view = {
1436
- usr_list: excludeUsr,
1437
- var_list: excludeVar,
1438
- homes_list: excludeHomes,
1439
- home_list: excludeHome,
1440
- };
1441
- const template = fs.readFileSync(excludeListTemplate, 'utf8');
1442
- fs.writeFileSync(this.settings.config.snapshot_excludes, mustache.render(template, view));
1418
+ if (!excludes.static && /**
1419
+ * create exclude.list if not exists
1420
+ */
1421
+ !fs.existsSync('/etc/penguins-eggs/exclude.list')) {
1422
+ const excludeListTemplateDir = '/etc/penguins-eggs.d/exclude.list.d/';
1423
+ const excludeListTemplate = excludeListTemplateDir + 'master.list';
1424
+ if (!fs.existsSync(excludeListTemplate)) {
1425
+ Utils.warning('Cannot find: ' + excludeListTemplate);
1426
+ process.exit(1);
1427
+ }
1428
+ let excludeUsr = '';
1429
+ let excludeVar = '';
1430
+ let excludeHomes = '';
1431
+ let excludeHome = '';
1432
+ if (excludes.usr) {
1433
+ excludeUsr = fs.readFileSync(`${excludeListTemplateDir}usr.list`, 'utf8');
1434
+ }
1435
+ if (excludes.var) {
1436
+ excludeVar = fs.readFileSync(`${excludeListTemplateDir}var.list`, 'utf8');
1443
1437
  }
1438
+ if (excludes.homes) {
1439
+ excludeHomes = fs.readFileSync(`${excludeListTemplateDir}homes.list`, 'utf8');
1440
+ }
1441
+ if (excludes.home) {
1442
+ excludeHome = `home/${await Utils.getPrimaryUser()}/*`;
1443
+ }
1444
+ const view = {
1445
+ home_list: excludeHome,
1446
+ homes_list: excludeHomes,
1447
+ usr_list: excludeUsr,
1448
+ var_list: excludeVar,
1449
+ };
1450
+ const template = fs.readFileSync(excludeListTemplate, 'utf8');
1451
+ fs.writeFileSync(this.settings.config.snapshot_excludes, mustache.render(template, view));
1444
1452
  }
1445
1453
  /**
1446
1454
  * NOTE: reCreate = false
@@ -1464,20 +1472,28 @@ export default class Ovary {
1464
1472
  * we need different initfs
1465
1473
  * for different families
1466
1474
  */
1467
- if (this.familyId === 'archlinux') {
1468
- await this.initrdArch();
1469
- }
1470
- else if (this.familyId === 'alpine') {
1471
- await this.initrdAlpine();
1472
- }
1473
- else if (this.familyId === 'fedora') {
1474
- await this.initrdFedora();
1475
- }
1476
- else if (this.familyId === 'suse') {
1477
- await this.initrdSuse();
1478
- }
1479
- else if (this.familyId === 'debian') {
1480
- await this.initrdDebian();
1475
+ switch (this.familyId) {
1476
+ case 'archlinux': {
1477
+ await this.initrdArch();
1478
+ break;
1479
+ }
1480
+ case 'alpine': {
1481
+ await this.initrdAlpine();
1482
+ break;
1483
+ }
1484
+ case 'fedora': {
1485
+ await this.initrdFedora();
1486
+ break;
1487
+ }
1488
+ case 'suse': {
1489
+ await this.initrdSuse();
1490
+ break;
1491
+ }
1492
+ case 'debian': {
1493
+ await this.initrdDebian();
1494
+ break;
1495
+ }
1496
+ // No default
1481
1497
  }
1482
1498
  if (this.settings.config.make_efi) {
1483
1499
  await this.makeEfi(this.theme);
@@ -1500,10 +1516,10 @@ export default class Ovary {
1500
1516
  }
1501
1517
  }
1502
1518
  else {
1503
- this.cliAutologin.addAutologin(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
1519
+ this.cliAutologin.add(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
1504
1520
  }
1505
1521
  // Here we are forcing alwats cliAutologin
1506
- this.cliAutologin.addAutologin(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
1522
+ // this.cliAutologin.add(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged)
1507
1523
  }
1508
1524
  await this.editLiveFs(clone, cryptedclone);
1509
1525
  mksquashfsCmd = await this.makeSquashfs(scriptOnly, unsecure);
@@ -12,10 +12,10 @@ import path from 'node:path';
12
12
  import shx from 'shelljs';
13
13
  import { exec } from '../lib/utils.js';
14
14
  import Distro from './distro.js';
15
+ import Alpine from './families/alpine.js';
15
16
  import Archlinux from './families/archlinux.js';
16
17
  import Debian from './families/debian.js';
17
18
  import Fedora from './families/fedora.js';
18
- import Alpine from './families/alpine.js';
19
19
  import Settings from './settings.js';
20
20
  import Utils from './utils.js';
21
21
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
@@ -359,8 +359,8 @@ export default class Pacman {
359
359
  }
360
360
  else if (this.distro().codenameLikeId === 'bionic') {
361
361
  const dest = '/etc/penguins-eggs.d/distros/bionic';
362
- const bionic = `${rootPen}/conf/distros/bionic/*`;
363
- await exec(`cp -r ${bionic} ${dest}`, echo);
362
+ const bionic = `${rootPen}/conf/distros/bionic`;
363
+ await exec(`cp -r ${bionic}/* ${dest}`, echo);
364
364
  // Poi da buster
365
365
  await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
366
366
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
@@ -370,13 +370,15 @@ export default class Pacman {
370
370
  await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
371
371
  await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
372
372
  /**
373
- * Ubuntu focal: eredita da focal e buster
373
+ * Ubuntu focal: eredita da noble e buster
374
374
  */
375
375
  }
376
376
  else if (this.distro().codenameLikeId === 'focal') {
377
377
  const dest = '/etc/penguins-eggs.d/distros/focal';
378
- const focal = `${rootPen}/conf/distros/focal/*`;
379
- await exec(`cp -r ${focal} ${dest}`, echo);
378
+ const noble = `${rootPen}/conf/distros/noble`;
379
+ await exec(`cp -r ${noble}/* ${dest}`, echo);
380
+ // backport per focal e jammy: fstab, mount, users
381
+ await exec(`cp ${noble}/calamares/modules/focal-jammy/* ${dest}/calamares/modules/`, echo);
380
382
  await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
381
383
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
382
384
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
@@ -385,13 +387,15 @@ export default class Pacman {
385
387
  await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
386
388
  await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
387
389
  /**
388
- * Ubuntu 22.04 jammy: eredita da focal e buster
390
+ * Ubuntu 22.04 jammy: eredita da noble e buster
389
391
  */
390
392
  }
391
393
  else if (this.distro().codenameLikeId === 'jammy') {
392
394
  const dest = '/etc/penguins-eggs.d/distros/jammy';
393
- const focal = `${rootPen}/conf/distros/focal/*`;
394
- await exec(`cp -r ${focal} ${dest}`, echo);
395
+ const noble = `${rootPen}/conf/distros/noble`;
396
+ await exec(`cp -r ${noble}/* ${dest}`, echo);
397
+ // backport per focal e jammy: fstab, mount, users
398
+ await exec(`cp ${noble}/calamares/modules/focal-jammy/* ${dest}/calamares/modules/`, echo);
395
399
  await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
396
400
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
397
401
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
@@ -400,14 +404,14 @@ export default class Pacman {
400
404
  await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
401
405
  await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
402
406
  /**
403
- * Ubuntu noble: eredita da devel e buster
407
+ * Ubuntu noble: e la nuova baseline per ubuntu
404
408
  *
405
409
  */
406
410
  }
407
411
  else if (this.distro().codenameLikeId === 'noble') {
408
412
  const dest = '/etc/penguins-eggs.d/distros/noble';
409
- const noble = `${rootPen}/conf/distros/noble/*`;
410
- await exec(`cp -r ${noble} ${dest}`, echo);
413
+ const noble = `${rootPen}/conf/distros/noble`;
414
+ await exec(`cp -r ${noble}/* ${dest}`, echo);
411
415
  await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
412
416
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
413
417
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
@@ -416,14 +420,14 @@ export default class Pacman {
416
420
  await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
417
421
  await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
418
422
  /**
419
- * Ubuntu rhino: eredita da devel e buster
423
+ * Ubuntu rhino: eredita da noble e buster
420
424
  *
421
425
  */
422
426
  }
423
427
  else if (this.distro().codenameLikeId === 'devel') {
424
428
  const dest = '/etc/penguins-eggs.d/distros/devel';
425
- const devel = `${rootPen}/conf/distros/devel/*`;
426
- await exec(`cp -r ${devel} ${dest}`, echo);
429
+ const noble = `${rootPen}/conf/distros/noble`;
430
+ await exec(`cp -r ${noble}/* ${dest}`, echo);
427
431
  await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
428
432
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
429
433
  await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
@@ -528,10 +532,8 @@ export default class Pacman {
528
532
  installed = true;
529
533
  }
530
534
  }
531
- else if (this.distro().familyId === 'alpine') {
532
- if (Alpine.packageIsInstalled('xorg-server')) {
533
- installed = true;
534
- }
535
+ else if (this.distro().familyId === 'alpine' && Alpine.packageIsInstalled('xorg-server')) {
536
+ installed = true;
535
537
  }
536
538
  return installed;
537
539
  }
@@ -27,12 +27,6 @@ export default class Pxe {
27
27
  * @param pxeRoot
28
28
  */
29
29
  constructor(nest?: string, pxeRoot?: string);
30
- /**
31
- * fertilization()
32
- *
33
- * cuckoo's nest
34
- */
35
- fertilization(): Promise<void>;
36
30
  /**
37
31
  * build
38
32
  */
@@ -42,6 +36,12 @@ export default class Pxe {
42
36
  * @param dhcpOptions
43
37
  */
44
38
  dhcpStart(dhcpOptions: IDhcpOptions): void;
39
+ /**
40
+ * fertilization()
41
+ *
42
+ * cuckoo's nest
43
+ */
44
+ fertilization(): Promise<void>;
45
45
  /**
46
46
  * start http server for images
47
47
  *
@@ -5,13 +5,13 @@
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  */
8
- import { dhcpd } from 'node-proxy-dhcpd';
9
- // @ts-ignore
10
- import tftp from 'tftp';
11
8
  import fs from 'node:fs';
12
9
  import http from 'node:http';
13
10
  import path from 'node:path';
11
+ import { dhcpd } from 'node-proxy-dhcpd';
14
12
  import nodeStatic from 'node-static';
13
+ // @ts-ignore
14
+ import tftp from 'tftp';
15
15
  import { exec } from '../lib/utils.js';
16
16
  import Distro from './distro.js';
17
17
  import Settings from './settings.js';
@@ -41,6 +41,44 @@ export default class Pxe {
41
41
  this.nest = nest;
42
42
  this.pxeRoot = pxeRoot;
43
43
  }
44
+ /**
45
+ * build
46
+ */
47
+ async build() {
48
+ if (fs.existsSync(this.pxeRoot)) {
49
+ await this.tryCatch(`rm ${this.pxeRoot} -rf`);
50
+ }
51
+ await this.tryCatch(`mkdir ${this.pxeRoot} -p`);
52
+ await this.tryCatch(`mkdir ${this.pxeRoot} -p`);
53
+ await this.tryCatch(`ln -s ${this.eggRoot}live ${this.pxeRoot}/live`);
54
+ await this.tryCatch(`ln -s ${this.nest}.disk ${this.pxeRoot}/.disk`);
55
+ if (this.settings.distro.distroId === 'ManjaroLinux') {
56
+ await this.tryCatch(`ln -s ${this.eggRoot}manjaro ${this.pxeRoot}/manjaro`);
57
+ }
58
+ else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
59
+ await this.tryCatch(`ln -s ${this.eggRoot}arch ${this.pxeRoot}/arch`);
60
+ }
61
+ if (fs.existsSync(this.eggRoot)) {
62
+ await this.tryCatch(`cp ${this.eggRoot}live/${this.vmlinuz} ${this.pxeRoot}/vmlinuz`, true);
63
+ await this.tryCatch(`chmod 777 ${this.pxeRoot}/vmlinuz`);
64
+ await this.tryCatch(`cp ${this.eggRoot}live/${this.initrdImg} ${this.pxeRoot}/initrd`, true);
65
+ await this.tryCatch(`chmod 777 ${this.pxeRoot}/initrd`);
66
+ }
67
+ // link iso images in pxe
68
+ for (const iso of this.isos) {
69
+ await this.tryCatch(`ln -s ${this.nest}/${iso} ${this.pxeRoot}/${iso}`);
70
+ }
71
+ await this.bios();
72
+ await this.ipxe();
73
+ await this.http();
74
+ }
75
+ /**
76
+ *
77
+ * @param dhcpOptions
78
+ */
79
+ dhcpStart(dhcpOptions) {
80
+ new dhcpd(dhcpOptions);
81
+ }
44
82
  /**
45
83
  * fertilization()
46
84
  *
@@ -134,44 +172,6 @@ export default class Pxe {
134
172
  console.log(`vmlinuz: ${this.vmlinuz}`);
135
173
  console.log(`initrd: ${this.initrdImg}`);
136
174
  }
137
- /**
138
- * build
139
- */
140
- async build() {
141
- if (fs.existsSync(this.pxeRoot)) {
142
- await this.tryCatch(`rm ${this.pxeRoot} -rf`);
143
- }
144
- await this.tryCatch(`mkdir ${this.pxeRoot} -p`);
145
- await this.tryCatch(`mkdir ${this.pxeRoot} -p`);
146
- await this.tryCatch(`ln -s ${this.eggRoot}live ${this.pxeRoot}/live`);
147
- await this.tryCatch(`ln -s ${this.nest}.disk ${this.pxeRoot}/.disk`);
148
- if (this.settings.distro.distroId === 'ManjaroLinux') {
149
- await this.tryCatch(`ln -s ${this.eggRoot}manjaro ${this.pxeRoot}/manjaro`);
150
- }
151
- else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
152
- await this.tryCatch(`ln -s ${this.eggRoot}arch ${this.pxeRoot}/arch`);
153
- }
154
- if (fs.existsSync(this.eggRoot)) {
155
- await this.tryCatch(`cp ${this.eggRoot}live/${this.vmlinuz} ${this.pxeRoot}/vmlinuz`, true);
156
- await this.tryCatch(`chmod 777 ${this.pxeRoot}/vmlinuz`);
157
- await this.tryCatch(`cp ${this.eggRoot}live/${this.initrdImg} ${this.pxeRoot}/initrd`, true);
158
- await this.tryCatch(`chmod 777 ${this.pxeRoot}/initrd`);
159
- }
160
- // link iso images in pxe
161
- for (const iso of this.isos) {
162
- await this.tryCatch(`ln -s ${this.nest}/${iso} ${this.pxeRoot}/${iso}`);
163
- }
164
- await this.bios();
165
- await this.ipxe();
166
- await this.http();
167
- }
168
- /**
169
- *
170
- * @param dhcpOptions
171
- */
172
- dhcpStart(dhcpOptions) {
173
- new dhcpd(dhcpOptions);
174
- }
175
175
  /**
176
176
  * start http server for images
177
177
  *
@@ -181,7 +181,7 @@ export default class Pxe {
181
181
  const httpRoot = this.pxeRoot + '/';
182
182
  console.log('http root: ' + httpRoot);
183
183
  console.log('http listening: 0.0.0.0:' + port);
184
- //const file = new nodeStatic.Server(httpRoot, { followSymlinks: true })
184
+ // const file = new nodeStatic.Server(httpRoot, { followSymlinks: true })
185
185
  const file = new nodeStatic.Server(httpRoot);
186
186
  http
187
187
  .createServer((req, res) => {
@@ -43,8 +43,12 @@ export default class Utils {
43
43
  *
44
44
  * @returns
45
45
  */
46
- static isSysvinit(): boolean;
47
46
  static isOpenRc(): boolean;
47
+ /**
48
+ *
49
+ * @returns
50
+ */
51
+ static isSysvinit(): boolean;
48
52
  /**
49
53
  * ricava path per vmlinuz
50
54
  * Normalmente cerca BOOT_IMAGE
@@ -11,8 +11,8 @@ import dns from 'dns';
11
11
  import path from 'path';
12
12
  import os from 'os';
13
13
  import inquirer from 'inquirer';
14
+ import { execSync, spawnSync } from 'child_process';
14
15
  import chalk from 'chalk';
15
- import { spawnSync } from 'child_process';
16
16
  import { Netmask } from 'netmask';
17
17
  import Distro from './distro.js';
18
18
  // pjson
@@ -81,30 +81,33 @@ export default class Utils {
81
81
  */
82
82
  static isSystemd() {
83
83
  const checkFile = '/tmp/checksystemd';
84
- shx.exec(`ps -p 1 -o comm= >${checkFile}`);
84
+ execSync(`cat /proc/1/comm >${checkFile}`);
85
85
  const isSystemd = fs.readFileSync(checkFile).includes('systemd');
86
- shx.exec(`rm ${checkFile}`);
86
+ execSync(`rm ${checkFile}`);
87
87
  return isSystemd;
88
88
  }
89
+ /**
90
+ *
91
+ * @returns
92
+ */
93
+ static isOpenRc() {
94
+ const checkFile = '/tmp/checkinit';
95
+ execSync(`command -v openrc >${checkFile} 2>&1`);
96
+ const isOpenrc = fs.readFileSync(checkFile).includes('openrc');
97
+ execSync(`rm ${checkFile}`);
98
+ return isOpenrc;
99
+ }
89
100
  /**
90
101
  *
91
102
  * @returns
92
103
  */
93
104
  static isSysvinit() {
94
105
  const checkFile = '/tmp/checkinit';
95
- shx.exec(`ps -p 1 -o comm= >${checkFile}`);
106
+ execSync(`cat /proc/1/comm >${checkFile}`);
96
107
  const isSysvinit = fs.readFileSync(checkFile).includes('init');
97
- shx.exec(`rm ${checkFile}`);
108
+ execSync(`rm ${checkFile}`);
98
109
  return isSysvinit;
99
110
  }
100
- static isOpenRc() {
101
- let isOpenRc = false;
102
- let distro = new Distro();
103
- if (distro.familyId === "alpine") {
104
- isOpenRc = true;
105
- }
106
- return isOpenRc;
107
- }
108
111
  /**
109
112
  * ricava path per vmlinuz
110
113
  * Normalmente cerca BOOT_IMAGE
@@ -242,7 +245,7 @@ export default class Utils {
242
245
  primaryUser = execSync('/usr/bin/logname 2>/dev/null', { encoding: 'utf-8' }).trim();
243
246
  }
244
247
  catch (error) {
245
- // logname failed, so we continue with other methods
248
+ // console.log("logname failed, so we continue with other methods")
246
249
  }
247
250
  if (primaryUser === 'root') {
248
251
  primaryUser = '';
@@ -254,7 +257,7 @@ export default class Utils {
254
257
  primaryUser = execSync('echo $DOAS_USER', { encoding: 'utf-8' }).trim();
255
258
  }
256
259
  catch (error) {
257
- // doas is not installed or DOAS_USER is not set, continue with the next method
260
+ // console.log("doas is not installed or DOAS_USER is not set, continue with the next method")
258
261
  }
259
262
  }
260
263
  if (primaryUser === '') {
@@ -263,11 +266,11 @@ export default class Utils {
263
266
  primaryUser = execSync('echo $SUDO_USER', { encoding: 'utf-8' }).trim();
264
267
  }
265
268
  catch (error) {
266
- // SUDO_USER is not set, continue with the next method
269
+ // console.log("SUDO_USER is not set, continue with the next method")
267
270
  }
268
271
  }
269
272
  if (primaryUser === '') {
270
- // Fallback to the USER environment variable
273
+ // console.log("Fallback to the USER environment variable")
271
274
  primaryUser = process.env.USER || '';
272
275
  }
273
276
  if (primaryUser === '') {