penguins-eggs 25.11.12 → 25.11.29

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 (168) hide show
  1. package/.oclif.manifest.json +161 -140
  2. package/README.md +811 -4
  3. package/README.pdf +20763 -3833
  4. package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
  5. package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
  6. package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
  7. package/addons/eggs/theme/applications/install-system.desktop +0 -0
  8. package/addons/eggs/theme/livecd/full.grub.main.cfg +39 -4
  9. package/addons/eggs/theme/livecd/full.isolinux.main.cfg +47 -4
  10. package/assets/calamares/install-system.sh +0 -0
  11. package/assets/penguins-eggs.desktop +0 -0
  12. package/assets/penguins-krill.desktop +0 -0
  13. package/assets/penguins-links-add.desktop +0 -0
  14. package/assets/penguins-live-installer.desktop +0 -0
  15. package/bin/dev.js +0 -0
  16. package/bin/run.js +11 -0
  17. package/conf/derivatives.yaml +2 -1
  18. package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
  19. package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  20. package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
  21. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  22. package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
  23. package/conf/distros/focal/calamares/calamares-modules/.keepit +0 -0
  24. package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +20 -0
  25. package/conf/distros/focal/calamares/calamares-modules/cleanup/module.yml +9 -0
  26. package/conf/distros/focal/calamares/calamares-modules/sources-yolk/module.yml +8 -0
  27. package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +50 -0
  28. package/conf/distros/focal/calamares/calamares-modules/sources-yolk-undo/module.yml +8 -0
  29. package/conf/distros/focal/calamares/libexec/.keepit +0 -0
  30. package/conf/distros/focal/calamares/libexec/README.md +5 -0
  31. package/conf/distros/focal/calamares/libexec/calamares-aptsources.sh +15 -0
  32. package/conf/distros/focal/calamares/libexec/calamares-l10n-helper.sh +38 -0
  33. package/conf/distros/focal/calamares/libexec/calamares-logs-helper.sh +34 -0
  34. package/conf/distros/focal/calamares/libexec/calamares-nomodeset.sh +19 -0
  35. package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +26 -0
  36. package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +12 -0
  37. package/conf/distros/focal/calamares/modules/bootloader.yml +86 -0
  38. package/conf/distros/focal/calamares/modules/bootloader.yml.old +35 -0
  39. package/conf/distros/focal/calamares/modules/displaymanager.yml +12 -0
  40. package/conf/distros/focal/calamares/modules/finished.yml +6 -0
  41. package/conf/distros/focal/calamares/modules/fstab.yml +63 -0
  42. package/conf/distros/focal/calamares/modules/grubcfg.yml +51 -0
  43. package/conf/distros/focal/calamares/modules/keyboard.yml +29 -0
  44. package/conf/distros/focal/calamares/modules/locale.yml +7 -0
  45. package/conf/distros/focal/calamares/modules/machineid.yml +10 -0
  46. package/conf/distros/focal/calamares/modules/mount.yml +20 -0
  47. package/conf/distros/focal/calamares/modules/netinstall.yml +5 -0
  48. package/conf/distros/focal/calamares/modules/packages.mustache +5 -0
  49. package/conf/distros/focal/calamares/modules/partition.yml +21 -0
  50. package/conf/distros/focal/calamares/modules/removeuser.mustache +3 -0
  51. package/conf/distros/focal/calamares/modules/shellprocess@aptsources.yml +11 -0
  52. package/conf/distros/focal/calamares/modules/shellprocess@boot_deploy.yml +9 -0
  53. package/conf/distros/focal/calamares/modules/shellprocess@boot_reconfigure.yml +15 -0
  54. package/conf/distros/focal/calamares/modules/shellprocess@install_translations.yml +8 -0
  55. package/conf/distros/focal/calamares/modules/shellprocess@logs.yml +8 -0
  56. package/conf/distros/focal/calamares/modules/shellprocess@mkinitramfs.yml +6 -0
  57. package/conf/distros/focal/calamares/modules/shellprocess@nomodeset.yml +12 -0
  58. package/conf/distros/focal/calamares/modules/umount.yml +4 -0
  59. package/conf/distros/focal/calamares/modules/unpackfs.mustache +6 -0
  60. package/conf/distros/focal/calamares/modules/users.yml +27 -0
  61. package/conf/distros/focal/calamares/modules/welcome.yml +24 -0
  62. package/conf/distros/focal/calamares/settings.yml +97 -0
  63. package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  64. package/conf/distros/noble/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  65. package/conf/distros/noble/calamares/libexec/calamares-aptsources.sh +0 -0
  66. package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +0 -0
  67. package/conf/distros/noble/calamares/libexec/calamares-logs-helper.sh +0 -0
  68. package/conf/distros/noble/calamares/libexec/calamares-nomodeset.sh +0 -0
  69. package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
  70. package/conf/distros/opensuse/calamares/settings.yml +0 -0
  71. package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
  72. package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  73. package/conf/distros/trixie/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
  74. package/conf/distros/trixie/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  75. package/conf/init/unattended.sh +0 -0
  76. package/dist/appimage/dependency-manager.d.ts +31 -0
  77. package/dist/appimage/dependency-manager.js +292 -0
  78. package/dist/appimage/first-run-check.d.ts +8 -0
  79. package/dist/appimage/first-run-check.js +13 -0
  80. package/dist/bin/dev.cmd +3 -0
  81. package/dist/bin/dev.js +6 -0
  82. package/dist/bin/run.cmd +3 -0
  83. package/dist/bin/run.js +16 -0
  84. package/dist/classes/cli-autologin.js +5 -5
  85. package/dist/classes/daddy.js +11 -11
  86. package/dist/classes/diversions.d.ts +5 -0
  87. package/dist/classes/diversions.js +23 -7
  88. package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +7 -0
  89. package/dist/classes/incubation/fisherman-helper/initcpio.js +7 -0
  90. package/dist/classes/incubation/fisherman.js +0 -2
  91. package/dist/classes/network.d.ts +1 -1
  92. package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -1
  93. package/dist/classes/ovary.d/edit-live-fs.js +129 -93
  94. package/dist/classes/ovary.d/fertilization.js +1 -1
  95. package/dist/classes/ovary.d/xorriso-command.js +1 -5
  96. package/dist/classes/pacman.d.ts +21 -7
  97. package/dist/classes/pacman.js +59 -39
  98. package/dist/classes/utils.d.ts +5 -5
  99. package/dist/classes/utils.js +30 -11
  100. package/dist/commands/calamares.js +1 -1
  101. package/dist/commands/config.js +3 -14
  102. package/dist/commands/cuckoo.js +1 -1
  103. package/dist/commands/{analyze.d.ts → export/appimage.d.ts} +10 -9
  104. package/dist/commands/export/appimage.js +76 -0
  105. package/dist/commands/export/iso.js +1 -1
  106. package/dist/commands/export/pkg.d.ts +1 -1
  107. package/dist/commands/export/pkg.js +2 -2
  108. package/dist/commands/{install.d.ts → krill.d.ts} +3 -4
  109. package/dist/commands/{install.js → krill.js} +5 -6
  110. package/dist/commands/produce.js +1 -1
  111. package/dist/commands/setup/install.d.ts +17 -0
  112. package/dist/commands/setup/install.js +71 -0
  113. package/dist/commands/setup/purge.d.ts +17 -0
  114. package/dist/commands/setup/purge.js +71 -0
  115. package/dist/commands/tools/repo.d.ts +0 -5
  116. package/dist/commands/tools/repo.js +205 -127
  117. package/dist/commands/update.d.ts +16 -1
  118. package/dist/commands/update.js +140 -63
  119. package/dist/krill/components/information.js +2 -2
  120. package/dist/krill/components/title.js +13 -13
  121. package/dist/lib/utils.d.ts +16 -0
  122. package/dist/lib/utils.js +5 -32
  123. package/dracut/create-symlink +0 -0
  124. package/dracut/export +0 -0
  125. package/dracut/export-dracut-analysis +0 -0
  126. package/dracut/export-dracut-log +0 -0
  127. package/dracut/mkisofs +0 -0
  128. package/dracut/modules.d/00debug-shell/debug-hook.sh +0 -0
  129. package/dracut/modules.d/00debug-shell/module-setup.sh +0 -0
  130. package/dracut/modules.d/90block/block-cmdline.sh +0 -0
  131. package/dracut/modules.d/90block/module-setup.sh +0 -0
  132. package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +0 -0
  133. package/dracut/modules.d/95iso-scan/iso-scan.sh +0 -0
  134. package/dracut/modules.d/95iso-scan/module-setup.sh +0 -0
  135. package/dracut/modules.d/95luks-loop/luks-loop.sh +0 -0
  136. package/dracut/modules.d/95luks-loop/module-setup.sh +0 -0
  137. package/dracut/renew-initramfs +0 -0
  138. package/dracut/sbin2bin +0 -0
  139. package/dracut/update-dracut-conf-d +0 -0
  140. package/dracut/update-dracut-modules +0 -0
  141. package/eui/eui-autostart-cinnamon.desktop +0 -0
  142. package/eui/eui-autostart-xfce.desktop +0 -0
  143. package/eui/eui-create-image.sh +0 -0
  144. package/eui/eui-start.sh +0 -0
  145. package/manpages/doc/man/eggs.1.gz +0 -0
  146. package/manpages/doc/man/eggs.html +594 -9
  147. package/package.json +124 -130
  148. package/perrisbrewery/scripts/postinst +0 -0
  149. package/perrisbrewery/scripts/postrm +0 -0
  150. package/perrisbrewery/scripts/preinst +0 -0
  151. package/perrisbrewery/scripts/prerm +0 -0
  152. package/perrisbrewery/template/dependencies.yaml +0 -5
  153. package/perrisbrewery/template/man.template.md +7 -0
  154. package/scripts/99clean +0 -0
  155. package/scripts/_eggs +56 -47
  156. package/scripts/adapt.sh +0 -0
  157. package/scripts/bros/waydroid-helper.sh +0 -0
  158. package/scripts/eggs.bash +4 -4
  159. package/scripts/lsb_release +0 -0
  160. package/scripts/mom.sh +0 -0
  161. package/scripts/pve-live.service +0 -0
  162. package/scripts/pve-live.sh +0 -0
  163. package/scripts/resy +0 -0
  164. package/dist/commands/analyze.js +0 -95
  165. package/dist/commands/pods.d.ts +0 -22
  166. package/dist/commands/pods.js +0 -92
  167. package/scripts/boot-encrypted-root.sh +0 -220
  168. package/scripts/mount-encrypted-home.sh +0 -324
@@ -15,8 +15,8 @@ import os from 'os';
15
15
  import inquirer from 'inquirer';
16
16
  import { execSync, spawnSync } from 'child_process';
17
17
  import chalk from 'chalk';
18
- import { Netmask } from 'netmask';
19
18
  import Kernel from './utils.d/kernel.js';
19
+ // libraries
20
20
  import Distro from './distro.js';
21
21
  // pjson
22
22
  import { createRequire } from 'module';
@@ -91,6 +91,14 @@ export default class Utils {
91
91
  }
92
92
  return result;
93
93
  }
94
+ /**
95
+ * isAppImage
96
+ */
97
+ static isAppImage() {
98
+ return !!process.env.APPIMAGE ||
99
+ process.execPath.includes('.AppImage') ||
100
+ process.execPath.includes('/tmp/.mount_');
101
+ }
94
102
  /**
95
103
  * Detect if running inside a container (Docker or LXC)
96
104
  */
@@ -395,7 +403,7 @@ export default class Utils {
395
403
  *
396
404
  * @param volid
397
405
  */
398
- static getVolid(volid = 'unknown') {
406
+ static VolidTrim(volid = 'unknown') {
399
407
  // // 28 + 4 .iso = 32 lunghezza max di volid
400
408
  if (volid.length >= 32) {
401
409
  volid = volid.substring(0, 32);
@@ -706,13 +714,16 @@ export default class Utils {
706
714
  }
707
715
  return cidr;
708
716
  }
709
- /**
710
- *
711
- * broadcast
712
- */
713
717
  static broadcast() {
714
- let n = new Netmask(Utils.cidr());
715
- return n.broadcast;
718
+ const netmask = Utils.netmask();
719
+ const ip = Utils.address();
720
+ const ipParts = ip.split('.').map(Number);
721
+ const maskParts = netmask.split('.').map(Number);
722
+ const broadcastParts = ipParts.map((part, index) => {
723
+ // Bitwise OR tra il blocco IP e il blocco Netmask invertito (255 - mask)
724
+ return part | (255 - maskParts[index]);
725
+ });
726
+ return broadcastParts.join('.');
716
727
  }
717
728
  /**
718
729
  * dns
@@ -868,9 +879,17 @@ export default class Utils {
868
879
  * @returns flag
869
880
  */
870
881
  static flag() {
871
- return chalk.bgGreen.whiteBright(' ' + pjson.name + ' ') +
872
- chalk.bgWhite.blue(" Perri's Brewery edition ") +
873
- chalk.bgRed.whiteBright(' ver. ' + pjson.version + ' ');
882
+ let type = '';
883
+ if (!Utils.isAppImage()) {
884
+ type = 'native';
885
+ }
886
+ let title = `${pjson.name}`;
887
+ let green = ` ${title}`.padEnd(25, " ");
888
+ let white = ` Perri's brewery edition `.padEnd(25, " ");
889
+ let red = ` v${pjson.version} ${type} `.padStart(25, " ");
890
+ return chalk.bgGreen.whiteBright(green) +
891
+ chalk.bgWhite.blue(white) +
892
+ chalk.bgRed.whiteBright(red);
874
893
  }
875
894
  /**
876
895
  *
@@ -13,7 +13,7 @@ import Pacman from '../classes/pacman.js';
13
13
  import Settings from '../classes/settings.js';
14
14
  import Utils from '../classes/utils.js';
15
15
  export default class Calamares extends Command {
16
- static description = 'configure calamares or install or configure it';
16
+ static description = 'a GUI system installer - install and configure calamares';
17
17
  static examples = ['sudo eggs calamares', 'sudo eggs calamares --install', 'sudo eggs calamares --install --theme=/path/to/theme', 'sudo eggs calamares --remove'];
18
18
  static flags = {
19
19
  help: Flags.help({ char: 'h' }),
@@ -74,8 +74,7 @@ export default class Config extends Command {
74
74
  i.distroTemplate = !Pacman.distroTemplateCheck();
75
75
  i.addEfi = !Pacman.isUefi();
76
76
  i.calamares = false;
77
- if (!homecrypt &&
78
- !Pacman.calamaresExists() &&
77
+ if (!Pacman.calamaresExists() &&
79
78
  Pacman.isInstalledGui() &&
80
79
  Pacman.isCalamaresAvailable()) {
81
80
  i.calamares = true;
@@ -95,18 +94,8 @@ export default class Config extends Command {
95
94
  }
96
95
  if (Utils.isRoot(this.id)) {
97
96
  if (flags.clean) {
98
- Utils.warning('removing old configurations');
99
- await exec('rm /etc/penguins-eggs.d -rf');
100
- }
101
- /**
102
- * Se stiamo utilizzando eggs da sorgenti
103
- * Aggiungo autocomplete e manPage
104
- */
105
- if (Utils.isSources()) {
106
- Utils.warning('creating autocomplete...');
107
- await Pacman.autocompleteInstall(verbose);
108
- Utils.warning('creating eggs man page...');
109
- await Pacman.manPageInstall(verbose);
97
+ Utils.warning('removing penguins-eggs configurations');
98
+ await exec('rm -rf /etc/penguins-eggs.d');
110
99
  }
111
100
  const i = await Config.thatWeNeed(nointeractive, verbose);
112
101
  if (i.needUpdate || i.configurationInstall || i.configurationRefresh || i.distroTemplate) {
@@ -39,7 +39,7 @@ export default class Cuckoo extends Command {
39
39
  host: n.address,
40
40
  subnet: n.cidr,
41
41
  tftpserver: n.address,
42
- broadcast: n.broadcast()
42
+ broadcast: Utils.broadcast()
43
43
  };
44
44
  pxe.dhcpdStart(dhcpOptions);
45
45
  /**
@@ -1,26 +1,27 @@
1
1
  /**
2
- * ./src/commands/analyze.ts
2
+ * ./src/commands/export/appimage.ts
3
3
  * penguins-eggs v.25.7.x / ecmascript 2020
4
4
  * author: Piero Proietti
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  */
8
8
  import { Command } from '@oclif/core';
9
- import Users from '../classes/users.js';
10
- import { IWorkDir } from '../interfaces/i-workdir.js';
11
- export default class Analyze extends Command {
9
+ import Tools from '../../classes/tools.js';
10
+ export default class ExportAppimage extends Command {
12
11
  static description: string;
13
12
  static examples: string[];
14
13
  static flags: {
14
+ clean: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
15
  help: import("@oclif/core/interfaces").BooleanFlag<void>;
16
16
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
17
  };
18
- config_file: string;
19
- snapshot_dir: string;
20
- work_dir: IWorkDir;
18
+ user: string;
19
+ clean: boolean;
20
+ verbose: boolean;
21
+ echo: {};
22
+ Tu: Tools;
21
23
  /**
22
- * fill
24
+ *
23
25
  */
24
- fill(): Promise<Users[]>;
25
26
  run(): Promise<void>;
26
27
  }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * ./src/commands/export/appimage.ts
3
+ * penguins-eggs v.25.7.x / ecmascript 2020
4
+ * author: Piero Proietti
5
+ * email: piero.proietti@gmail.com
6
+ * license: MIT
7
+ */
8
+ import { Command, Flags } from '@oclif/core';
9
+ import Tools from '../../classes/tools.js';
10
+ import Utils from '../../classes/utils.js';
11
+ import { exec } from '../../lib/utils.js';
12
+ import os from 'node:os';
13
+ import { execSync } from 'node:child_process';
14
+ export default class ExportAppimage extends Command {
15
+ static description = 'export penguins-eggs AppImage to the destination host';
16
+ static examples = ['eggs export pkg', 'eggs export pkg --clean', 'eggs export pkg --all'];
17
+ static flags = {
18
+ clean: Flags.boolean({ char: 'c', description: 'remove old .AppImage before to copy' }),
19
+ help: Flags.help({ char: 'h' }),
20
+ verbose: Flags.boolean({ char: 'v', description: 'verbose' })
21
+ };
22
+ user = '';
23
+ clean = false;
24
+ verbose = false;
25
+ echo = {};
26
+ Tu = new Tools();
27
+ /**
28
+ *
29
+ */
30
+ async run() {
31
+ const { args, flags } = await this.parse(ExportAppimage);
32
+ Utils.titles(this.id + ' ' + this.argv);
33
+ Utils.warning(ExportAppimage.description);
34
+ // Ora servono in più parti
35
+ this.user = os.userInfo().username;
36
+ if (this.user === 'root') {
37
+ this.user = execSync('echo $SUDO_USER', { encoding: 'utf-8' }).trim();
38
+ if (this.user === '') {
39
+ this.user = execSync('echo $DOAS_USER', { encoding: 'utf-8' }).trim();
40
+ }
41
+ }
42
+ this.clean = flags.clean;
43
+ this.verbose = flags.verbose;
44
+ this.echo = Utils.setEcho(this.verbose);
45
+ await this.Tu.loadSettings();
46
+ const remoteMountpoint = `/tmp/eggs-${(Math.random() + 1).toString(36).slice(7)}`;
47
+ let localPath = "$HOME/penguins-eggs";
48
+ let remotePath = "/eggs/";
49
+ let filter = `penguins-eggs-[0-9][0-9].[0-9]*.[0-9]*-*.AppImage`;
50
+ let cmd = `#!/bin/bash\n`;
51
+ cmd += `set -e\n`;
52
+ cmd += 'shopt -s extglob\n';
53
+ cmd += `mkdir ${remoteMountpoint}\n`;
54
+ cmd += `sshfs ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath} ${remoteMountpoint}\n`;
55
+ if (this.clean) {
56
+ cmd += `# Delete old AppImage\n`;
57
+ cmd += `rm -f ${remoteMountpoint}/${filter}\n`;
58
+ }
59
+ cmd += `# Export packages\n`;
60
+ cmd += `cp ${localPath}/${filter} ${remoteMountpoint}\n`;
61
+ cmd += 'sync\n';
62
+ cmd += `\n`;
63
+ cmd += `# wait before to umount\n`;
64
+ cmd += 'sleep 2s\n';
65
+ cmd += `fusermount3 -u ${remoteMountpoint}\n`;
66
+ cmd += `# remove mountpoint\n`;
67
+ cmd += `rm -rf ${remoteMountpoint}\n`;
68
+ if (!this.verbose) {
69
+ if (this.clean) {
70
+ console.log(`remove: ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${filter}`);
71
+ }
72
+ console.log(`copy: ${localPath}/${filter} to ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath}`);
73
+ }
74
+ await exec(cmd, this.echo);
75
+ }
76
+ }
@@ -10,7 +10,7 @@ import Tools from '../../classes/tools.js';
10
10
  import Utils from '../../classes/utils.js';
11
11
  import { exec } from '../../lib/utils.js';
12
12
  export default class ExportIso extends Command {
13
- static description = 'export iso in the destination host';
13
+ static description = 'export remastered ISO in the destination host';
14
14
  static examples = ['eggs export iso', 'eggs export iso --clean'];
15
15
  static flags = {
16
16
  checksum: Flags.boolean({ char: 'C', description: 'export checksums md5 and sha256' }),
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ./src/commands/export/deb.ts
2
+ * ./src/commands/export/appimage.ts
3
3
  * penguins-eggs v.25.7.x / ecmascript 2020
4
4
  * author: Piero Proietti
5
5
  * email: piero.proietti@gmail.com
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ./src/commands/export/deb.ts
2
+ * ./src/commands/export/appimage.ts
3
3
  * penguins-eggs v.25.7.x / ecmascript 2020
4
4
  * author: Piero Proietti
5
5
  * email: piero.proietti@gmail.com
@@ -14,7 +14,7 @@ import { exec } from '../../lib/utils.js';
14
14
  import os from 'node:os';
15
15
  import { execSync } from 'node:child_process';
16
16
  export default class ExportPkg extends Command {
17
- static description = 'export pkg/iso to the destination host';
17
+ static description = 'export penguins-eggs package to the destination host';
18
18
  static examples = ['eggs export pkg', 'eggs export pkg --clean', 'eggs export pkg --all'];
19
19
  static flags = {
20
20
  all: Flags.boolean({ char: 'a', description: 'export all archs' }),
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ./src/commands/install.ts
3
- * penguins-eggs v.25.7.x / ecmascript 2020
2
+ * ./src/commands/krill.ts
3
+ * penguins-eggs v.25.11.x / ecmascript 2020
4
4
  * author: Piero Proietti
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
@@ -9,8 +9,7 @@ import { Command } from '@oclif/core';
9
9
  /**
10
10
  * Class Krill
11
11
  */
12
- export default class Install extends Command {
13
- static aliases: string[];
12
+ export default class KrillCommand extends Command {
14
13
  static description: string;
15
14
  static examples: string[];
16
15
  static flags: {
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ./src/commands/install.ts
3
- * penguins-eggs v.25.7.x / ecmascript 2020
2
+ * ./src/commands/krill.ts
3
+ * penguins-eggs v.25.11.x / ecmascript 2020
4
4
  * author: Piero Proietti
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
@@ -19,9 +19,8 @@ const agent = new https.Agent({
19
19
  /**
20
20
  * Class Krill
21
21
  */
22
- export default class Install extends Command {
23
- static aliases = ['krill'];
24
- static description = 'krill: the CLI system installer - the egg became a penguin!';
22
+ export default class KrillCommand extends Command {
23
+ static description = 'a TUI system installer - install the system';
25
24
  static examples = ['sudo eggs install', 'sudo eggs install --unattended --halt', 'sudo eggs install --chroot'];
26
25
  static flags = {
27
26
  btrfs: Flags.boolean({ char: 'b', description: 'Format btrfs' }),
@@ -47,7 +46,7 @@ export default class Install extends Command {
47
46
  */
48
47
  async run() {
49
48
  Utils.titles(this.id + ' ' + this.argv);
50
- const { flags } = await this.parse(Install);
49
+ const { flags } = await this.parse(KrillCommand);
51
50
  const { unattended } = flags;
52
51
  // krillConfig
53
52
  let krillConfig = {};
@@ -17,7 +17,7 @@ import Distro from '../classes/distro.js';
17
17
  // _dirname
18
18
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
19
19
  export default class Produce extends Command {
20
- static description = 'produce a live image from your system whithout your data';
20
+ static description = 'produce a live image from your system';
21
21
  static examples = [
22
22
  'sudo eggs produce # zstd fast compression',
23
23
  'sudo eggs produce --pendrive # zstd compression optimized pendrive',
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ./src/commands/setup.ts
3
+ * penguins-eggs v.25.11.x / ecmascript 2020
4
+ * author: Piero Proietti
5
+ * email: piero.proietti@gmail.com
6
+ * license: MIT
7
+ */
8
+ import { Command } from '@oclif/core';
9
+ export default class Install extends Command {
10
+ static description: string;
11
+ static examples: string[];
12
+ /**
13
+ *
14
+ * @returns
15
+ */
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * ./src/commands/setup.ts
3
+ * penguins-eggs v.25.11.x / ecmascript 2020
4
+ * author: Piero Proietti
5
+ * email: piero.proietti@gmail.com
6
+ * license: MIT
7
+ */
8
+ import Distro from '../../classes/distro.js';
9
+ import Utils from '../../classes/utils.js';
10
+ import Pacman from '../../classes/pacman.js';
11
+ import { Command } from '@oclif/core';
12
+ import { DependencyManager } from '../../appimage/dependency-manager.js';
13
+ import { execSync } from 'node:child_process';
14
+ export default class Install extends Command {
15
+ static description = 'Automatically check and install system prerequisites';
16
+ static examples = [
17
+ 'eggs setup # this help',
18
+ 'sudo eggs setup install # install native dependencies, autocomplete, man, etc',
19
+ 'sudo eggs setup purge # purge all configurations, autocomplete, man, etc installed from penguins-eggs AppImage',
20
+ ];
21
+ /**
22
+ *
23
+ * @returns
24
+ */
25
+ async run() {
26
+ Utils.titles(this.id + ' ' + this.argv);
27
+ /**
28
+ * continue only on AppImage
29
+ */
30
+ if (!Utils.isAppImage()) {
31
+ console.log("The eggs setup command is only applicable on the AppImage version.");
32
+ console.log("On penguins-eggs native package this operation is done by the system package manager.");
33
+ process.exit();
34
+ }
35
+ const appImagePath = process.env.APPIMAGE;
36
+ console.log(`Running AppImage:\n${appImagePath}\n`);
37
+ const distro = new Distro();
38
+ const osInfo = Utils.getOsRelease();
39
+ const codenameId = osInfo.VERSION_CODENAME;
40
+ const releaseId = osInfo.VERSION_ID;
41
+ const distroId = osInfo.ID;
42
+ const { flags } = await this.parse(Install);
43
+ const depsManager = new DependencyManager();
44
+ console.log(`Your system is: ${distroId} ${releaseId} ${codenameId}, family ${distro.familyId}\n`);
45
+ console.log(`Compatible with: ${distro.distroLike} ${distro.distroUniqueId}\n`);
46
+ if (depsManager.isInstalled()) {
47
+ console.log('penguins-eggs distro meta-packages are already installed');
48
+ }
49
+ else {
50
+ console.log('penguins-eggs distro meta-packages are NOT installed');
51
+ }
52
+ if (Utils.isRoot()) {
53
+ console.log();
54
+ Utils.warning(`Are you sure you want to install penguins-eggs AppImage autocomplete, manpages, configurations and distro meta-packages:\n`);
55
+ if (await Utils.customConfirm('Select yes to continue...')) {
56
+ const appImagePath = process.env.APPIMAGE;
57
+ if (appImagePath !== '/usr/bin/eggs') {
58
+ execSync(`mv ${appImagePath} /usr/bin/eggs`);
59
+ console.log(`${appImagePath} moved to /usr/bin/eggs`);
60
+ }
61
+ await Pacman.autocompleteInstall();
62
+ await Pacman.manpageInstall();
63
+ await Pacman.configurationInstall();
64
+ depsManager.installDistroPackages();
65
+ }
66
+ }
67
+ else {
68
+ Utils.useRoot(this.id);
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ./src/commands/setup.ts
3
+ * penguins-eggs v.25.11.x / ecmascript 2020
4
+ * author: Piero Proietti
5
+ * email: piero.proietti@gmail.com
6
+ * license: MIT
7
+ */
8
+ import { Command } from '@oclif/core';
9
+ export default class Purge extends Command {
10
+ static description: string;
11
+ static examples: string[];
12
+ /**
13
+ *
14
+ * @returns
15
+ */
16
+ run(): Promise<void>;
17
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * ./src/commands/setup.ts
3
+ * penguins-eggs v.25.11.x / ecmascript 2020
4
+ * author: Piero Proietti
5
+ * email: piero.proietti@gmail.com
6
+ * license: MIT
7
+ */
8
+ import Distro from '../../classes/distro.js';
9
+ import Utils from '../../classes/utils.js';
10
+ import Pacman from '../../classes/pacman.js';
11
+ import { Command } from '@oclif/core';
12
+ import { DependencyManager } from '../../appimage/dependency-manager.js';
13
+ import { execSync } from 'node:child_process';
14
+ export default class Purge extends Command {
15
+ static description = 'Automatically check and install system prerequisites';
16
+ static examples = [
17
+ 'eggs setup # this help',
18
+ 'sudo eggs setup install # install native dependencies, autocomplete, man, etc',
19
+ 'sudo eggs setup purge # purge all configurations, autocomplete, man, etc installed from penguins-eggs AppImage',
20
+ ];
21
+ /**
22
+ *
23
+ * @returns
24
+ */
25
+ async run() {
26
+ Utils.titles(this.id + ' ' + this.argv);
27
+ /**
28
+ * continue only on AppImage
29
+ */
30
+ if (!Utils.isAppImage()) {
31
+ console.log("The eggs setup purge command is only applicable on the AppImage version.");
32
+ console.log("On penguins-eggs native package this operation is done by the system package manager.");
33
+ process.exit();
34
+ }
35
+ const appImagePath = process.env.APPIMAGE;
36
+ console.log(`Running AppImage:\n${appImagePath}\n`);
37
+ const distro = new Distro();
38
+ const osInfo = Utils.getOsRelease();
39
+ const codenameId = osInfo.VERSION_CODENAME;
40
+ const releaseId = osInfo.VERSION_ID;
41
+ const distroId = osInfo.ID;
42
+ const { flags } = await this.parse(Purge);
43
+ const depsManager = new DependencyManager();
44
+ console.log(`Your system is: ${distroId} ${releaseId} ${codenameId}, family ${distro.familyId}\n`);
45
+ console.log(`Compatible with: ${distro.distroLike} ${distro.distroUniqueId}\n`);
46
+ if (Utils.isRoot()) {
47
+ console.log();
48
+ Utils.warning(`Are you sure you want to purge penguins-eggs AppImage autocomplete, manpages, configurations and distro meta-aackages:\n ${appImagePath}`);
49
+ if (await Utils.customConfirm('Select yes to continue...')) {
50
+ depsManager.removeDistroPackages();
51
+ await Pacman.autocompleteRemove();
52
+ await Pacman.manpageRemove();
53
+ await Pacman.configurationRemove();
54
+ execSync('rm -f /usr/share/applications/penguins-eggs.desktop');
55
+ execSync('rm -f /usr/bin/penguins-links-add.sh');
56
+ execSync('rm -f /usr/local/bin/g4*');
57
+ console.log('penguins-eggs AppImage stuffs was successfully removed.\n');
58
+ if (appImagePath === '/usr/bin/eggs') {
59
+ execSync(`rm -f ${appImagePath} /usr/bin/eggs`);
60
+ }
61
+ else {
62
+ console.log('You can completely erase AppImage file, using:');
63
+ console.log(`sudo rm ${appImagePath}\n`);
64
+ }
65
+ }
66
+ }
67
+ else {
68
+ Utils.useRoot(this.id);
69
+ }
70
+ }
71
+ }
@@ -5,11 +5,6 @@
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  */
8
- /**
9
- * Debian 13 trixe, Ubuntu 24.04 noble usano il formato deb822
10
- * * esiste un comando per modernizzare le sorgenti:
11
- * sudo apt modernize-sources
12
- */
13
8
  import { Command } from '@oclif/core';
14
9
  /**
15
10
  *