penguins-eggs 9.5.19 → 9.5.21

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 (132) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +1 -1
  3. package/addons/eggs/theme/calamares/modules/partition.yml +3 -0
  4. package/conf/README.md +14 -62
  5. package/conf/distros/buster/calamares/modules/partition.yml +5 -2
  6. package/conf/distros/rolling/calamares/modules/partition.yml +242 -0
  7. package/dist/classes/bleach.js +4 -6
  8. package/dist/classes/cfs.js +4 -6
  9. package/dist/classes/compressors.js +2 -4
  10. package/dist/classes/daddy.js +12 -16
  11. package/dist/classes/distro.js +5 -7
  12. package/dist/classes/family/archlinux.js +5 -7
  13. package/dist/classes/family/debian.js +5 -7
  14. package/dist/classes/family/fedora.js +5 -7
  15. package/dist/classes/family/suse.js +5 -7
  16. package/dist/classes/incubation/branding.js +2 -4
  17. package/dist/classes/incubation/distros/bionic.js +3 -5
  18. package/dist/classes/incubation/distros/buster.js +3 -5
  19. package/dist/classes/incubation/distros/focal.js +3 -5
  20. package/dist/classes/incubation/distros/jessie.js +2 -4
  21. package/dist/classes/incubation/distros/rolling.js +3 -5
  22. package/dist/classes/incubation/fisherman-helper/displaymanager.js +2 -4
  23. package/dist/classes/incubation/fisherman-helper/packages.js +2 -4
  24. package/dist/classes/incubation/fisherman-helper/settings.js +5 -7
  25. package/dist/classes/incubation/fisherman.js +6 -11
  26. package/dist/classes/incubation/incubator.js +30 -9
  27. package/dist/classes/incubation/installer.js +3 -5
  28. package/dist/classes/initrd.js +4 -7
  29. package/dist/classes/keyboards.js +2 -4
  30. package/dist/classes/locales.js +3 -5
  31. package/dist/classes/n8.js +2 -4
  32. package/dist/classes/network.js +2 -4
  33. package/dist/classes/ovary.js +96 -83
  34. package/dist/classes/pacman.js +23 -14
  35. package/dist/classes/pve-live.js +4 -6
  36. package/dist/classes/pxe.js +12 -14
  37. package/dist/classes/settings.js +83 -72
  38. package/dist/classes/sources_list.js +4 -6
  39. package/dist/classes/systemctl.js +2 -4
  40. package/dist/classes/tailor.js +9 -11
  41. package/dist/classes/tools.js +4 -6
  42. package/dist/classes/users.js +2 -4
  43. package/dist/classes/utils.js +20 -18
  44. package/dist/classes/xdg.js +8 -10
  45. package/dist/classes/yolk.js +6 -8
  46. package/dist/commands/adapt.js +2 -4
  47. package/dist/commands/analyze.js +5 -7
  48. package/dist/commands/calamares.js +21 -28
  49. package/dist/commands/config.js +5 -7
  50. package/dist/commands/cuckoo.js +4 -6
  51. package/dist/commands/dad.js +4 -6
  52. package/dist/commands/export/deb.js +3 -5
  53. package/dist/commands/export/iso.js +3 -5
  54. package/dist/commands/install.js +8 -10
  55. package/dist/commands/kill.js +6 -50
  56. package/dist/commands/mom.js +3 -5
  57. package/dist/commands/produce.js +8 -10
  58. package/dist/commands/status.js +2 -4
  59. package/dist/commands/syncfrom.js +4 -6
  60. package/dist/commands/syncto.js +5 -7
  61. package/dist/commands/tools/clean.js +3 -5
  62. package/dist/commands/tools/ppa.js +4 -6
  63. package/dist/commands/tools/skel.js +4 -6
  64. package/dist/commands/tools/stat.js +4 -6
  65. package/dist/commands/tools/yolk.js +5 -7
  66. package/dist/commands/update.js +6 -8
  67. package/dist/commands/wardrobe/get.js +2 -4
  68. package/dist/commands/wardrobe/list.js +7 -9
  69. package/dist/commands/wardrobe/show.js +7 -9
  70. package/dist/commands/wardrobe/wear.js +6 -8
  71. package/dist/components/elements/information.js +8 -10
  72. package/dist/components/elements/steps.js +2 -4
  73. package/dist/components/elements/title.js +2 -4
  74. package/dist/components/finished.js +6 -8
  75. package/dist/components/install.js +6 -8
  76. package/dist/components/keyboard.js +6 -8
  77. package/dist/components/location.js +6 -8
  78. package/dist/components/network.js +6 -8
  79. package/dist/components/partitions.js +6 -8
  80. package/dist/components/summary.js +6 -8
  81. package/dist/components/users.js +6 -31
  82. package/dist/components/welcome.js +6 -8
  83. package/dist/interfaces/i-calamares-partition.js +2 -0
  84. package/dist/krill/krill-prepare.js +40 -42
  85. package/dist/krill/krill-sequence.js +36 -38
  86. package/dist/krill/modules/add-user.js +2 -4
  87. package/dist/krill/modules/bootloader-config-ubuntu.js +2 -4
  88. package/dist/krill/modules/bootloader.js +2 -4
  89. package/dist/krill/modules/del-live-user.js +2 -4
  90. package/dist/krill/modules/fstab.js +3 -5
  91. package/dist/krill/modules/grubcfg.js +3 -5
  92. package/dist/krill/modules/hostname.js +2 -4
  93. package/dist/krill/modules/initramfs-cfg.js +2 -4
  94. package/dist/krill/modules/initramfs.js +3 -5
  95. package/dist/krill/modules/locale-cfg.js +2 -4
  96. package/dist/krill/modules/locale.js +2 -4
  97. package/dist/krill/modules/m-keyboard.js +3 -5
  98. package/dist/krill/modules/m-timezone.js +2 -4
  99. package/dist/krill/modules/machine-id.js +2 -4
  100. package/dist/krill/modules/mount-fs.js +2 -4
  101. package/dist/krill/modules/network-cfg.js +3 -5
  102. package/dist/krill/modules/packages.js +5 -7
  103. package/dist/krill/modules/partition.js +4 -6
  104. package/dist/krill/modules/remove-installer-link.js +2 -4
  105. package/dist/krill/modules/umount.js +2 -4
  106. package/dist/krill/modules/unpackfs.js +2 -4
  107. package/dist/lib/cli-autologin.js +7 -9
  108. package/dist/lib/get_address.js +2 -5
  109. package/dist/lib/get_dns.js +2 -5
  110. package/dist/lib/get_domain.js +2 -5
  111. package/dist/lib/get_gateway.js +2 -5
  112. package/dist/lib/get_hostname.js +2 -5
  113. package/dist/lib/get_netmask.js +2 -5
  114. package/dist/lib/get_password.js +2 -5
  115. package/dist/lib/get_root_password.js +2 -5
  116. package/dist/lib/get_userfullname.js +2 -5
  117. package/dist/lib/get_username.js +2 -5
  118. package/dist/lib/kill_me_softly.js +64 -0
  119. package/dist/lib/select_address_type.js +2 -5
  120. package/dist/lib/select_filesystem_type.js +5 -7
  121. package/dist/lib/select_installation_device.js +4 -6
  122. package/dist/lib/select_installation_mode.js +2 -5
  123. package/dist/lib/select_interface.js +2 -5
  124. package/dist/lib/select_keyboard_layout.js +4 -6
  125. package/dist/lib/select_keyboard_model.js +4 -6
  126. package/dist/lib/select_keyboard_option.js +4 -6
  127. package/dist/lib/select_keyboard_variant.js +4 -6
  128. package/dist/lib/select_languages.js +4 -6
  129. package/dist/lib/select_regions.js +2 -5
  130. package/dist/lib/select_user_swap_choice.js +6 -7
  131. package/dist/lib/select_zones.js +2 -5
  132. package/package.json +1 -1
@@ -5,37 +5,35 @@
5
5
  * mail: piero.proietti@gmail.com
6
6
  *
7
7
  */
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
12
10
  // packages
13
- const fs_1 = __importDefault(require("fs"));
14
- const js_yaml_1 = __importDefault(require("js-yaml"));
15
- const node_path_1 = __importDefault(require("node:path"));
16
- const node_os_1 = __importDefault(require("node:os"));
17
- const shelljs_1 = __importDefault(require("shelljs"));
18
- const chalk_1 = __importDefault(require("chalk"));
19
- const mustache_1 = __importDefault(require("mustache"));
20
- const pve_live_1 = __importDefault(require("./pve-live"));
11
+ const fs_1 = tslib_1.__importDefault(require("fs"));
12
+ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
13
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
14
+ const node_os_1 = tslib_1.__importDefault(require("node:os"));
15
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
16
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
17
+ const mustache_1 = tslib_1.__importDefault(require("mustache"));
18
+ const pve_live_1 = tslib_1.__importDefault(require("./pve-live"));
21
19
  // libraries
22
20
  const utils_1 = require("../lib/utils");
23
21
  // classes
24
- const utils_2 = __importDefault(require("./utils"));
25
- const n8_1 = __importDefault(require("./n8"));
26
- const incubator_1 = __importDefault(require("./incubation/incubator"));
27
- const xdg_1 = __importDefault(require("./xdg"));
28
- const pacman_1 = __importDefault(require("./pacman"));
29
- const settings_1 = __importDefault(require("./settings"));
30
- const systemctl_1 = __importDefault(require("./systemctl"));
31
- const bleach_1 = __importDefault(require("./bleach"));
32
- const yolk_1 = __importDefault(require("./yolk"));
22
+ const utils_2 = tslib_1.__importDefault(require("./utils"));
23
+ const n8_1 = tslib_1.__importDefault(require("./n8"));
24
+ const incubator_1 = tslib_1.__importDefault(require("./incubation/incubator"));
25
+ const xdg_1 = tslib_1.__importDefault(require("./xdg"));
26
+ const pacman_1 = tslib_1.__importDefault(require("./pacman"));
27
+ const settings_1 = tslib_1.__importDefault(require("./settings"));
28
+ const systemctl_1 = tslib_1.__importDefault(require("./systemctl"));
29
+ const bleach_1 = tslib_1.__importDefault(require("./bleach"));
30
+ const yolk_1 = tslib_1.__importDefault(require("./yolk"));
33
31
  const displaymanager_1 = require("./incubation/fisherman-helper/displaymanager");
34
32
  // backup
35
33
  const promises_1 = require("fs/promises");
36
34
  const fs_2 = require("fs");
37
- const users_1 = __importDefault(require("./users"));
38
- const cli_autologin_1 = __importDefault(require("../lib/cli-autologin"));
35
+ const users_1 = tslib_1.__importDefault(require("./users"));
36
+ const cli_autologin_1 = tslib_1.__importDefault(require("../lib/cli-autologin"));
39
37
  /**
40
38
  * Ovary:
41
39
  */
@@ -54,6 +52,7 @@ class Ovary {
54
52
  this.clone = false;
55
53
  this.cryptedclone = false;
56
54
  this.cliAutologin = new cli_autologin_1.default();
55
+ this.ovarium = '';
57
56
  }
58
57
  /**
59
58
  * @returns {boolean} success
@@ -81,6 +80,7 @@ class Ovary {
81
80
  if (await utils_2.default.customConfirm('Select yes to continue...')) {
82
81
  return true;
83
82
  }
83
+ this.settings.work_dir.ovarium = this.settings.config.snapshot_dir + 'ovarium/';
84
84
  }
85
85
  return false;
86
86
  }
@@ -217,10 +217,10 @@ class Ovary {
217
217
  }
218
218
  if (cryptedclone) {
219
219
  await (0, utils_1.exec)('eggs syncto', utils_2.default.setEcho(true));
220
- utils_2.default.warning(`Waiting 10s, before to move ${luksFile} in ${this.settings.config.snapshot_dir}ovarium/iso/live`);
220
+ utils_2.default.warning(`Waiting 10s, before to move ${luksFile} in ${this.ovarium}iso/live`);
221
221
  await (0, utils_1.exec)('sleep 10', utils_2.default.setEcho(false));
222
- utils_2.default.warning(`moving ${luksFile} in ${this.settings.config.snapshot_dir}ovarium/iso/live`);
223
- await (0, utils_1.exec)(`mv ${luksFile} ${this.settings.config.snapshot_dir}ovarium/iso/live`, this.echo);
222
+ utils_2.default.warning(`moving ${luksFile} in ${this.ovarium}iso/live`);
223
+ await (0, utils_1.exec)(`mv ${luksFile} ${this.ovarium}iso/live`, this.echo);
224
224
  }
225
225
  const xorrisoCommand = this.makeDotDisk(clone, cryptedclone);
226
226
  /**
@@ -228,9 +228,9 @@ class Ovary {
228
228
  */
229
229
  if (this.familyId === 'archlinux') {
230
230
  if (this.settings.distro.distroId === 'ManjaroLinux') {
231
- await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}manjaro/x86_64 -p`, this.echo);
232
- await (0, utils_1.exec)(`ln ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${this.settings.work_dir.pathIso}manjaro/x86_64/livefs.sfs`, this.echo);
233
- await (0, utils_1.exec)(`md5sum ${this.settings.work_dir.pathIso}live/filesystem.squashfs > ${this.settings.work_dir.pathIso}manjaro/x86_64/livefs.md5`, this.echo);
231
+ await (0, utils_1.exec)(`mkdir ${this.settings.iso_work}manjaro/x86_64 -p`, this.echo);
232
+ await (0, utils_1.exec)(`ln ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}manjaro/x86_64/livefs.sfs`, this.echo);
233
+ await (0, utils_1.exec)(`md5sum ${this.settings.iso_work}live/filesystem.squashfs > ${this.settings.iso_work}manjaro/x86_64/livefs.md5`, this.echo);
234
234
  }
235
235
  else if (this.settings.distro.distroId === 'Arch' ||
236
236
  this.settings.distro.distroId === 'blendOS' ||
@@ -238,9 +238,9 @@ class Ovary {
238
238
  this.settings.distro.distroId === 'phyOS' ||
239
239
  this.settings.distro.distroId === 'RebornOS' ||
240
240
  this.settings.distro.distroId === 'EndeavourOS') {
241
- await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}arch/x86_64 -p`, this.echo);
242
- await (0, utils_1.exec)(`ln ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${this.settings.work_dir.pathIso}arch/x86_64/airootfs.sfs`, this.echo);
243
- await (0, utils_1.exec)(`sha512sum ${this.settings.work_dir.pathIso}live/filesystem.squashfs > ${this.settings.work_dir.pathIso}arch/x86_64/airootfs.sha512`, this.echo);
241
+ await (0, utils_1.exec)(`mkdir ${this.settings.iso_work}arch/x86_64 -p`, this.echo);
242
+ await (0, utils_1.exec)(`ln ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}arch/x86_64/airootfs.sfs`, this.echo);
243
+ await (0, utils_1.exec)(`sha512sum ${this.settings.iso_work}live/filesystem.squashfs > ${this.settings.iso_work}arch/x86_64/airootfs.sha512`, this.echo);
244
244
  }
245
245
  }
246
246
  await this.makeIso(xorrisoCommand, scriptOnly);
@@ -250,17 +250,18 @@ class Ovary {
250
250
  * Crea la struttura della workdir
251
251
  */
252
252
  async liveCreateStructure() {
253
+ // efi-work iso memdiskDir sotto mountpoint
253
254
  if (this.verbose) {
254
- console.log('Overy: liveCreateStructure');
255
+ console.log('Ovary: liveCreateStructure');
255
256
  }
256
- utils_2.default.warning(`Creating egg in ${this.settings.work_dir.path}`);
257
+ utils_2.default.warning(`Creating egg in ${this.settings.config.snapshot_dir}`);
257
258
  let cmd;
258
- if (!fs_1.default.existsSync(this.settings.work_dir.path)) {
259
- cmd = `mkdir -p ${this.settings.work_dir.path}`;
259
+ if (!fs_1.default.existsSync(this.settings.config.snapshot_dir)) {
260
+ cmd = `mkdir -p ${this.settings.config.snapshot_dir}`;
260
261
  this.tryCatch(cmd);
261
262
  }
262
- if (!fs_1.default.existsSync(this.settings.work_dir.path + '/README.md')) {
263
- cmd = `cp ${node_path_1.default.resolve(__dirname, '../../conf/README.md')} ${this.settings.work_dir.path}README.md`;
263
+ if (!fs_1.default.existsSync(this.settings.config.snapshot_dir + '/README.md')) {
264
+ cmd = `cp ${node_path_1.default.resolve(__dirname, '../../conf/README.md')} ${this.settings.config.snapshot_dir}README.md`;
264
265
  this.tryCatch(cmd);
265
266
  }
266
267
  if (!fs_1.default.existsSync(this.settings.work_dir.lowerdir)) {
@@ -281,17 +282,15 @@ class Ovary {
281
282
  }
282
283
  /**
283
284
  * Creo le directory di destinazione per boot, efi, isolinux e live
284
- * precedentemente in isolinux
285
285
  */
286
- if (!fs_1.default.existsSync(this.settings.work_dir.pathIso)) {
287
- cmd = `mkdir -p ${this.settings.work_dir.pathIso}/boot/grub/${utils_2.default.machineUEFI()}`;
286
+ if (!fs_1.default.existsSync(this.settings.iso_work)) {
287
+ cmd = `mkdir -p ${this.settings.iso_work}/boot/grub/${utils_2.default.machineUEFI()}`;
288
288
  this.tryCatch(cmd);
289
- cmd = `mkdir -p ${this.settings.work_dir.pathIso}/efi/boot`;
289
+ cmd = `mkdir -p ${this.settings.iso_work}/efi/boot`;
290
290
  this.tryCatch(cmd);
291
- const liveBsseDir = 'live';
292
- cmd = `mkdir -p ${this.settings.work_dir.pathIso}/isolinux`;
291
+ cmd = `mkdir -p ${this.settings.iso_work}/isolinux`;
293
292
  this.tryCatch(cmd);
294
- cmd = `mkdir -p ${this.settings.work_dir.pathIso}live`;
293
+ cmd = `mkdir -p ${this.settings.iso_work}live`;
295
294
  this.tryCatch(cmd);
296
295
  }
297
296
  }
@@ -531,17 +530,17 @@ class Ovary {
531
530
  console.log('ovary: syslinux');
532
531
  console.log('syslinux path: ' + this.settings.distro.syslinuxPath);
533
532
  }
534
- await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/vesamenu.c32 ${this.settings.work_dir.pathIso}/isolinux/`, this.echo);
535
- await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/chain.c32 ${this.settings.work_dir.pathIso}/isolinux/`, this.echo);
533
+ await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/vesamenu.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
534
+ await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/chain.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
536
535
  /**
537
536
  * per openSuse non sono riusciuto a determinare
538
537
  * quale pacchetto installi:
539
538
  * ldllinux.c43, libcom32 e libutil.c32
540
539
  */
541
540
  if (this.familyId !== 'suse') {
542
- await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/ldlinux.c32 ${this.settings.work_dir.pathIso}/isolinux/`, this.echo);
543
- await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/libcom32.c32 ${this.settings.work_dir.pathIso}/isolinux/`, this.echo);
544
- await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/libutil.c32 ${this.settings.work_dir.pathIso}/isolinux/`, this.echo);
541
+ await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/ldlinux.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
542
+ await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/libcom32.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
543
+ await (0, utils_1.exec)(`cp ${this.settings.distro.syslinuxPath}/libutil.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
545
544
  }
546
545
  }
547
546
  /**
@@ -554,11 +553,11 @@ class Ovary {
554
553
  /**
555
554
  * isolinux.bin
556
555
  */
557
- await (0, utils_1.exec)(`cp ${this.settings.distro.isolinuxPath}/isolinux.bin ${this.settings.work_dir.pathIso}/isolinux/`, this.echo);
556
+ await (0, utils_1.exec)(`cp ${this.settings.distro.isolinuxPath}/isolinux.bin ${this.settings.iso_work}/isolinux/`, this.echo);
558
557
  /**
559
558
  * isolinux.theme.cfg
560
559
  */
561
- const isolinuxThemeDest = this.settings.work_dir.pathIso + 'isolinux/isolinux.theme.cfg';
560
+ const isolinuxThemeDest = this.settings.iso_work + 'isolinux/isolinux.theme.cfg';
562
561
  let isolinuxThemeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
563
562
  if (this.theme.includes('/')) {
564
563
  isolinuxThemeSrc = `${theme}/theme/livecd/isolinux.theme.cfg`;
@@ -571,7 +570,7 @@ class Ovary {
571
570
  /**
572
571
  * isolinux.cfg from isolinux.template.cfg
573
572
  */
574
- const isolinuxDest = this.settings.work_dir.pathIso + 'isolinux/isolinux.cfg';
573
+ const isolinuxDest = this.settings.iso_work + 'isolinux/isolinux.cfg';
575
574
  const isolinuxTemplate = node_path_1.default.resolve(__dirname, '../../addons/templates/isolinux.template');
576
575
  if (!fs_1.default.existsSync(isolinuxTemplate)) {
577
576
  utils_2.default.warning('Cannot find: ' + isolinuxTemplate);
@@ -590,7 +589,7 @@ class Ovary {
590
589
  /**
591
590
  * splash
592
591
  */
593
- const splashDest = `${this.settings.work_dir.pathIso}/isolinux/splash.png`;
592
+ const splashDest = `${this.settings.iso_work}/isolinux/splash.png`;
594
593
  let splashSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/splash.png`);
595
594
  if (this.theme.includes('/')) {
596
595
  splashSrc = node_path_1.default.resolve(`${theme}/theme/livecd/splash.png`);
@@ -634,7 +633,7 @@ class Ovary {
634
633
  }
635
634
  let lackVmlinuzImage = false;
636
635
  if (fs_1.default.existsSync(this.settings.kernel_image)) {
637
- await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.work_dir.pathIso}/live/`, this.echo);
636
+ await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.iso_work}/live/`, this.echo);
638
637
  }
639
638
  else {
640
639
  utils_2.default.error(`Cannot find ${this.settings.kernel_image}`);
@@ -652,7 +651,7 @@ class Ovary {
652
651
  async initrdCreate() {
653
652
  let initrdImg = utils_2.default.initrdImg();
654
653
  initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
655
- utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.work_dir.pathIso}/live/`);
654
+ utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.iso_work}/live/`);
656
655
  const distroId = this.settings.distro.distroId;
657
656
  let fileConf = 'archlinux';
658
657
  if (distroId === 'Arch' ||
@@ -673,7 +672,7 @@ class Ovary {
673
672
  fileConf = distroId.toLowerCase();
674
673
  }
675
674
  let pathConf = node_path_1.default.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
676
- await (0, utils_1.exec)(`mkinitcpio -c ${pathConf} -g ${this.settings.work_dir.pathIso}/live/${initrdImg}`, utils_2.default.setEcho(true));
675
+ await (0, utils_1.exec)(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}/live/${initrdImg}`, utils_2.default.setEcho(true));
677
676
  }
678
677
  /**
679
678
  * We must upgrade to initrdCreate for Debian/Ubuntu
@@ -686,7 +685,7 @@ class Ovary {
686
685
  isCrypted = true;
687
686
  await (0, utils_1.exec)('mv /etc/crypttab /etc/crypttab.saved', this.echo);
688
687
  }
689
- await (0, utils_1.exec)(`mkinitramfs -o ${this.settings.work_dir.pathIso}/live/initrd.img-$(uname -r) ${this.toNull}`, this.echo);
688
+ await (0, utils_1.exec)(`mkinitramfs -o ${this.settings.iso_work}/live/initrd.img-$(uname -r) ${this.toNull}`, this.echo);
690
689
  if (isCrypted) {
691
690
  await (0, utils_1.exec)('mv /etc/crypttab.saved /etc/crypttab', this.echo);
692
691
  }
@@ -698,7 +697,7 @@ class Ovary {
698
697
  }
699
698
  let lackInitrdImage = false
700
699
  if (fs.existsSync(this.settings.initrd_image)) {
701
- await exec(`cp ${this.settings.initrd_image} ${this.settings.work_dir.pathIso}/live/`, this.echo)
700
+ await exec(`cp ${this.settings.initrd_image} ${this.settings.iso_work}/live/`, this.echo)
702
701
  } else {
703
702
  Utils.error(`Cannot find ${this.settings.initrdImg}`)
704
703
  lackInitrdImage = true
@@ -750,14 +749,14 @@ class Ovary {
750
749
  // this.addRemoveExclusion(true, '/etc/localtime')
751
750
  }
752
751
  this.addRemoveExclusion(true, this.settings.config.snapshot_dir /* .absolutePath() */);
753
- if (fs_1.default.existsSync(`${this.settings.work_dir.pathIso}/live/filesystem.squashfs`)) {
754
- fs_1.default.unlinkSync(`${this.settings.work_dir.pathIso}/live/filesystem.squashfs`);
752
+ if (fs_1.default.existsSync(`${this.settings.iso_work}/live/filesystem.squashfs`)) {
753
+ fs_1.default.unlinkSync(`${this.settings.iso_work}/live/filesystem.squashfs`);
755
754
  }
756
755
  const compression = `-comp ${this.settings.config.compression}`;
757
- //let cmd = `mksquashfs ${this.settings.work_dir.merged} ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${compression} -wildcards -ef ${this.settings.session_excludes}`
758
- let cmd = `mksquashfs ${this.settings.work_dir.merged} ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${compression} -wildcards -ef ${this.settings.config.snapshot_excludes} ${this.settings.session_excludes}`;
756
+ //let cmd = `mksquashfs ${this.settings.work_dir.merged} ${this.settings.iso_work}live/filesystem.squashfs ${compression} -wildcards -ef ${this.settings.session_excludes}`
757
+ let cmd = `mksquashfs ${this.settings.work_dir.merged} ${this.settings.iso_work}live/filesystem.squashfs ${compression} -wildcards -ef ${this.settings.config.snapshot_excludes} ${this.settings.session_excludes}`;
759
758
  cmd = cmd.replace(/\s\s+/g, ' ');
760
- utils_2.default.writeX(`${this.settings.work_dir.path}mksquashfs`, cmd);
759
+ utils_2.default.writeX(`${this.settings.work_dir.ovarium}mksquashfs`, cmd);
761
760
  if (!scriptOnly) {
762
761
  utils_2.default.warning('squashing filesystem: ' + compression);
763
762
  await (0, utils_1.exec)(cmd, utils_2.default.setEcho(true));
@@ -907,7 +906,8 @@ class Ovary {
907
906
  }
908
907
  cmds.push(endLine);
909
908
  }
910
- utils_2.default.writeXs(`${this.settings.work_dir.path}bind`, cmds);
909
+ // Utils.writeXs(`${this.settings.config.snapshot_dir}bind`, cmds)
910
+ utils_2.default.writeXs(`${this.settings.work_dir.ovarium}bind`, cmds);
911
911
  }
912
912
  /**
913
913
  * ubind del fs live
@@ -931,7 +931,7 @@ class Ovary {
931
931
  if (n8_1.default.isDirectory(dirname)) {
932
932
  cmds.push(`\n# directory: ${dirname}`);
933
933
  if (this.mergedAndOvelay(dirname)) {
934
- cmds.push(`\n# ${dirname} has overlay`, `\n# First, umount it from ${this.settings.work_dir.path}`);
934
+ cmds.push(`\n# ${dirname} has overlay`, `\n# First, umount it from ${this.settings.config.snapshot_dir}`);
935
935
  cmds.push(await rexec(`umount ${this.settings.work_dir.merged}/${dirname}`, this.verbose), `\n# Second, umount it from ${this.settings.work_dir.lowerdir}`);
936
936
  cmds.push(await rexec(`umount ${this.settings.work_dir.lowerdir}/${dirname}`, this.verbose));
937
937
  }
@@ -942,7 +942,7 @@ class Ovary {
942
942
  /**
943
943
  * We can't remove the nest!!!
944
944
  */
945
- const nest = this.settings.work_dir.path.split('/');
945
+ const nest = this.settings.config.snapshot_dir.split('/');
946
946
  if (dirname !== nest[1]) { // We can't remove first level nest
947
947
  cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname} -rf`, this.verbose));
948
948
  }
@@ -960,7 +960,8 @@ class Ovary {
960
960
  if (this.clone) {
961
961
  cmds.push(await rexec(`umount ${this.settings.work_dir.merged}/home`, this.verbose));
962
962
  }
963
- utils_2.default.writeXs(`${this.settings.work_dir.path}ubind`, cmds);
963
+ // Utils.writeXs(`${this.settings.config.snapshot_dir}ubind`, cmds)
964
+ utils_2.default.writeXs(`${this.settings.work_dir.ovarium}ubind`, cmds);
964
965
  }
965
966
  /**
966
967
  * bind dei virtual file system
@@ -968,7 +969,8 @@ class Ovary {
968
969
  async bindVfs() {
969
970
  const cmds = [];
970
971
  cmds.push(`mount -o bind /dev ${this.settings.work_dir.merged}/dev`, `mount -o bind /dev/pts ${this.settings.work_dir.merged}/dev/pts`, `mount -o bind /proc ${this.settings.work_dir.merged}/proc`, `mount -o bind /sys ${this.settings.work_dir.merged}/sys`, `mount -o bind /run ${this.settings.work_dir.merged}/run`);
971
- utils_2.default.writeXs(`${this.settings.work_dir.path}bindvfs`, cmds);
972
+ // Utils.writeXs(`${this.settings.config.snapshot_dir}bindvfs`, cmds)
973
+ utils_2.default.writeXs(`${this.settings.work_dir.ovarium}bindvfs`, cmds);
972
974
  }
973
975
  /**
974
976
  *
@@ -977,7 +979,8 @@ class Ovary {
977
979
  async ubindVfs() {
978
980
  const cmds = [];
979
981
  cmds.push(`umount ${this.settings.work_dir.merged}/dev/pts`, `umount ${this.settings.work_dir.merged}/dev`, `umount ${this.settings.work_dir.merged}/proc`, `umount ${this.settings.work_dir.merged}/run`, `umount ${this.settings.work_dir.merged}/sys`);
980
- utils_2.default.writeXs(`${this.settings.work_dir.path}ubindvfs`, cmds);
982
+ // Utils.writeXs(`${this.settings.config.snapshot_dir}ubindvfs`, cmds)
983
+ utils_2.default.writeXs(`${this.settings.work_dir.ovarium}ubindvfs`, cmds);
981
984
  }
982
985
  /**
983
986
  *
@@ -1075,8 +1078,8 @@ class Ovary {
1075
1078
  shelljs_1.default.cp(policySource, policyDest);
1076
1079
  await (0, utils_1.exec)(`sed -i 's/auth_admin/yes/' ${policyDest}`);
1077
1080
  // carico in filesystem.live packages-remove
1078
- shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../assets/live-installer/filesystem.packages-remove'), `${this.settings.work_dir.pathIso}/live/`);
1079
- shelljs_1.default.touch(`${this.settings.work_dir.pathIso}/live/filesystem.packages`);
1081
+ shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../assets/live-installer/filesystem.packages-remove'), `${this.settings.iso_work}/live/`);
1082
+ shelljs_1.default.touch(`${this.settings.iso_work}/live/filesystem.packages`);
1080
1083
  installerUrl = 'penguins-live-installer.desktop';
1081
1084
  installerIcon = 'utilities-terminal';
1082
1085
  shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../assets/penguins-live-installer.desktop'), `${this.settings.work_dir.merged}/usr/share/applications/`);
@@ -1222,10 +1225,12 @@ class Ovary {
1222
1225
  if (this.verbose) {
1223
1226
  console.log('ovary: makeEfi');
1224
1227
  }
1225
- const memdiskDir = this.settings.work_dir.path + 'memdiskDir';
1228
+ // const memdiskDir = this.settings.work_dir.path + 'memdiskDir'
1229
+ // const efiWorkDir = this.settings.efi_work
1230
+ // const isoDir = this.settings.iso_work
1231
+ const memdiskDir = this.settings.config.snapshot_mnt + 'memdiskDir';
1226
1232
  const efiWorkDir = this.settings.efi_work;
1227
- const isoDir = this.settings.work_dir.pathIso;
1228
- // const codenameLikeId = this.settings.distro.codenameLikeId
1233
+ const isoDir = this.settings.iso_work;
1229
1234
  /**
1230
1235
  * il pachetto grub/grub2 DEVE essere presente
1231
1236
  */
@@ -1403,7 +1408,7 @@ class Ovary {
1403
1408
  * return mkiso
1404
1409
  */
1405
1410
  makeDotDisk(clone = false, cryptedclone = false) {
1406
- const dotDisk = this.settings.work_dir.pathIso + '/.disk';
1411
+ const dotDisk = this.settings.iso_work + '/.disk';
1407
1412
  if (fs_1.default.existsSync(dotDisk)) {
1408
1413
  shelljs_1.default.rm('-rf', dotDisk);
1409
1414
  }
@@ -1413,7 +1418,7 @@ class Ovary {
1413
1418
  let content = utils_2.default.getVolid(this.settings.remix.name);
1414
1419
  fs_1.default.writeFileSync(file, content, 'utf-8');
1415
1420
  // .disk/mksquashfs
1416
- const scripts = this.settings.work_dir.path;
1421
+ const scripts = this.settings.config.snapshot_dir;
1417
1422
  shelljs_1.default.cp(scripts + '/mksquashfs', dotDisk + '/mksquashfs');
1418
1423
  // .disk/mkisofs
1419
1424
  content = this.xorrisoCommand(clone, cryptedclone).replace(/\s\s+/g, ' ');
@@ -1448,7 +1453,7 @@ class Ovary {
1448
1453
  const postfix = utils_2.default.getPostfix();
1449
1454
  this.settings.isoFilename = prefix + volid + typology + postfix;
1450
1455
  //
1451
- const output = this.settings.config.snapshot_dir + this.settings.isoFilename;
1456
+ const output = this.settings.config.snapshot_mnt + this.settings.isoFilename;
1452
1457
  let command = '';
1453
1458
  // const appid = `-appid "${this.settings.distro.distroId}" `
1454
1459
  // const publisher = `-publisher "${this.settings.distro.distroId}/${this.settings.distro.codenameId}" `
@@ -1529,7 +1534,7 @@ class Ovary {
1529
1534
  ${uefi_e} \
1530
1535
  ${uefi_noEmulBoot} \
1531
1536
  ${uefi_isohybridGptBasdat}
1532
- ${this.settings.work_dir.pathIso}`
1537
+ ${this.settings.iso_work}`
1533
1538
  */
1534
1539
  /**
1535
1540
  * how is made in refracta
@@ -1570,7 +1575,7 @@ class Ovary {
1570
1575
  ${uefi_e} \
1571
1576
  ${uefi_isohybridGptBasdat} \
1572
1577
  ${uefi_noEmulBoot} \
1573
- -o ${output} ${this.settings.work_dir.pathIso}`;
1578
+ -o ${output} ${this.settings.iso_work}`;
1574
1579
  return command;
1575
1580
  }
1576
1581
  /**
@@ -1582,9 +1587,17 @@ class Ovary {
1582
1587
  if (this.verbose) {
1583
1588
  console.log('ovary: makeIso');
1584
1589
  }
1585
- utils_2.default.writeX(`${this.settings.work_dir.path}mkisofs`, cmd);
1590
+ //Utils.writeX(`${this.settings.config.snapshot_dir}mkisofs`, cmd)
1591
+ utils_2.default.writeX(`${this.settings.work_dir.ovarium}mkisofs`, cmd);
1586
1592
  if (!scriptOnly) {
1587
- await (0, utils_1.exec)(cmd, utils_2.default.setEcho(true));
1593
+ const test = (await (0, utils_1.exec)(cmd, utils_2.default.setEcho(true))).code;
1594
+ if (test !== 0) {
1595
+ process.exit();
1596
+ }
1597
+ // Create link to iso
1598
+ const src = this.settings.config.snapshot_mnt + this.settings.isoFilename;
1599
+ const dest = this.settings.config.snapshot_dir + this.settings.isoFilename;
1600
+ await (0, utils_1.exec)(`ln -s ${src} ${dest}`);
1588
1601
  }
1589
1602
  }
1590
1603
  /**
@@ -1597,9 +1610,9 @@ class Ovary {
1597
1610
  console.log('eggs is finished!\n\nYou can find the file iso: ' + chalk_1.default.cyanBright(this.settings.isoFilename) + '\nin the nest: ' + chalk_1.default.cyanBright(this.settings.config.snapshot_dir) + '.');
1598
1611
  }
1599
1612
  else {
1600
- console.log('eggs is finished!\n\nYou can find the scripts to build iso: ' + chalk_1.default.cyanBright(this.settings.isoFilename) + '\nin the ovarium: ' + chalk_1.default.cyanBright(this.settings.work_dir.path) + '.');
1613
+ console.log('eggs is finished!\n\nYou can find the scripts to build iso: ' + chalk_1.default.cyanBright(this.settings.isoFilename) + '\nin the ovarium: ' + chalk_1.default.cyanBright(this.settings.config.snapshot_dir) + '.');
1601
1614
  console.log('usage');
1602
- console.log(chalk_1.default.cyanBright(`cd ${this.settings.work_dir.path}`));
1615
+ console.log(chalk_1.default.cyanBright(`cd ${this.settings.config.snapshot_dir}`));
1603
1616
  console.log(chalk_1.default.cyanBright('sudo ./bind'));
1604
1617
  console.log('Make all yours modifications in the directories filesystem.squashfs and iso.');
1605
1618
  console.log('After when you are ready:');
@@ -5,22 +5,20 @@
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  */
8
- var __importDefault = (this && this.__importDefault) || function (mod) {
9
- return (mod && mod.__esModule) ? mod : { "default": mod };
10
- };
11
8
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const node_fs_1 = __importDefault(require("node:fs"));
13
- const node_path_1 = __importDefault(require("node:path"));
14
- const shelljs_1 = __importDefault(require("shelljs"));
15
- const utils_1 = __importDefault(require("./utils"));
16
- const distro_1 = __importDefault(require("./distro"));
17
- const settings_1 = __importDefault(require("./settings"));
9
+ const tslib_1 = require("tslib");
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
13
+ const utils_1 = tslib_1.__importDefault(require("./utils"));
14
+ const distro_1 = tslib_1.__importDefault(require("./distro"));
15
+ const settings_1 = tslib_1.__importDefault(require("./settings"));
18
16
  const node_child_process_1 = require("node:child_process");
19
17
  const utils_2 = require("../lib/utils");
20
- const debian_1 = __importDefault(require("./family/debian"));
21
- const fedora_1 = __importDefault(require("./family/fedora"));
22
- const archlinux_1 = __importDefault(require("./family/archlinux"));
23
- const suse_1 = __importDefault(require("./family/suse"));
18
+ const debian_1 = tslib_1.__importDefault(require("./family/debian"));
19
+ const fedora_1 = tslib_1.__importDefault(require("./family/fedora"));
20
+ const archlinux_1 = tslib_1.__importDefault(require("./family/archlinux"));
21
+ const suse_1 = tslib_1.__importDefault(require("./family/suse"));
24
22
  const config_file = '/etc/penguins-eggs.d/eggs.yaml';
25
23
  const config_tools = '/etc/penguins-eggs.d/tools.yaml';
26
24
  /**
@@ -246,7 +244,18 @@ class Pacman {
246
244
  await fedora_1.default.calamaresInstall(verbose);
247
245
  }
248
246
  else if (this.distro().familyId === 'archlinux') {
249
- await archlinux_1.default.calamaresInstall(verbose);
247
+ if (this.distro().distroId === 'ManjaroLinux') {
248
+ const cmd = `pacman -Sy --noconfirm calamares`;
249
+ try {
250
+ await (0, utils_2.exec)(cmd, utils_1.default.setEcho(true));
251
+ }
252
+ catch {
253
+ utils_1.default.error(`manjaro: ${cmd}`); // + e.error)
254
+ }
255
+ }
256
+ else {
257
+ await archlinux_1.default.calamaresInstall(verbose);
258
+ }
250
259
  }
251
260
  else if (this.distro().familyId === 'suse') {
252
261
  await suse_1.default.calamaresInstall(verbose);
@@ -6,10 +6,8 @@
6
6
  * license: MIT
7
7
  * pve-live
8
8
  */
9
- var __importDefault = (this && this.__importDefault) || function (mod) {
10
- return (mod && mod.__esModule) ? mod : { "default": mod };
11
- };
12
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
+ const tslib_1 = require("tslib");
13
11
  /**
14
12
  * This will create a symbolic link from the system’s copy of the service file (usually in /lib/systemd/system or /etc/systemd/system)
15
13
  * into the location on disk where systemd looks for autostart files (usually /etc/systemd/system/some_target.target.wants.
@@ -18,9 +16,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
16
  * sudo systemctl disable application.service
19
17
  * This will remove the symbolic link that indicated that the service should be started automatically.
20
18
  */
21
- const systemctl_1 = __importDefault(require("./systemctl"));
22
- const path_1 = __importDefault(require("path"));
23
- const shelljs_1 = __importDefault(require("shelljs"));
19
+ const systemctl_1 = tslib_1.__importDefault(require("./systemctl"));
20
+ const path_1 = tslib_1.__importDefault(require("path"));
21
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
24
22
  class PveLive {
25
23
  constructor() {
26
24
  this.systemctl = {};
@@ -1,24 +1,22 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
6
4
  /**
7
5
  * penguins-eggs: pxe.ts
8
6
  * author: Piero Proietti
9
7
  * mail: piero.proietti@gmail.com
10
8
  */
11
9
  const utils_1 = require("../lib/utils");
12
- const distro_1 = __importDefault(require("./distro"));
13
- const fs_1 = __importDefault(require("fs"));
14
- const http_1 = __importDefault(require("http"));
15
- const node_static_1 = __importDefault(require("node-static"));
16
- const node_path_1 = __importDefault(require("node:path"));
17
- const settings_1 = __importDefault(require("./settings"));
18
- const utils_2 = __importDefault(require("./utils"));
19
- const tftp_1 = __importDefault(require("tftp"));
10
+ const distro_1 = tslib_1.__importDefault(require("./distro"));
11
+ const fs_1 = tslib_1.__importDefault(require("fs"));
12
+ const http_1 = tslib_1.__importDefault(require("http"));
13
+ const node_static_1 = tslib_1.__importDefault(require("node-static"));
14
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
15
+ const settings_1 = tslib_1.__importDefault(require("./settings"));
16
+ const utils_2 = tslib_1.__importDefault(require("./utils"));
17
+ const tftp_1 = tslib_1.__importDefault(require("tftp"));
20
18
  // @ts-ignore
21
- const etrick_1 = __importDefault(require("etrick"));
19
+ const etrick_1 = tslib_1.__importDefault(require("etrick"));
22
20
  /**
23
21
  * Pxe:
24
22
  */
@@ -52,9 +50,9 @@ class Pxe {
52
50
  }
53
51
  }
54
52
  else {
55
- this.eggRoot = node_path_1.default.dirname(this.settings.work_dir.path) + '/ovarium/iso/';
53
+ this.eggRoot = node_path_1.default.dirname(this.settings.config.snapshot_dir) + '/ovarium/iso/';
56
54
  }
57
- if (!utils_2.default.isLive() && !fs_1.default.existsSync(this.settings.work_dir.path)) {
55
+ if (!utils_2.default.isLive() && !fs_1.default.existsSync(this.settings.config.snapshot_dir)) {
58
56
  console.log('no image available, build an image with: sudo eggs produce');
59
57
  process.exit();
60
58
  }