penguins-eggs 25.11.12 → 25.11.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 (153) hide show
  1. package/.oclif.manifest.json +149 -140
  2. package/README.md +726 -1
  3. package/README.pdf +1343 -2331
  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/assets/calamares/install-system.sh +0 -0
  9. package/assets/penguins-eggs.desktop +0 -0
  10. package/assets/penguins-krill.desktop +0 -0
  11. package/assets/penguins-links-add.desktop +0 -0
  12. package/assets/penguins-live-installer.desktop +0 -0
  13. package/bin/dev.js +0 -0
  14. package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
  15. package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  16. package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
  17. package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  18. package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
  19. package/conf/distros/focal/calamares/calamares-modules/.keepit +0 -0
  20. package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +20 -0
  21. package/conf/distros/focal/calamares/calamares-modules/cleanup/module.yml +9 -0
  22. package/conf/distros/focal/calamares/calamares-modules/sources-yolk/module.yml +8 -0
  23. package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +50 -0
  24. package/conf/distros/focal/calamares/calamares-modules/sources-yolk-undo/module.yml +8 -0
  25. package/conf/distros/focal/calamares/libexec/.keepit +0 -0
  26. package/conf/distros/focal/calamares/libexec/README.md +5 -0
  27. package/conf/distros/focal/calamares/libexec/calamares-aptsources.sh +15 -0
  28. package/conf/distros/focal/calamares/libexec/calamares-l10n-helper.sh +38 -0
  29. package/conf/distros/focal/calamares/libexec/calamares-logs-helper.sh +34 -0
  30. package/conf/distros/focal/calamares/libexec/calamares-nomodeset.sh +19 -0
  31. package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +26 -0
  32. package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +12 -0
  33. package/conf/distros/focal/calamares/modules/bootloader.yml +86 -0
  34. package/conf/distros/focal/calamares/modules/bootloader.yml.old +35 -0
  35. package/conf/distros/focal/calamares/modules/displaymanager.yml +12 -0
  36. package/conf/distros/focal/calamares/modules/finished.yml +6 -0
  37. package/conf/distros/focal/calamares/modules/fstab.yml +63 -0
  38. package/conf/distros/focal/calamares/modules/grubcfg.yml +51 -0
  39. package/conf/distros/focal/calamares/modules/keyboard.yml +29 -0
  40. package/conf/distros/focal/calamares/modules/locale.yml +7 -0
  41. package/conf/distros/focal/calamares/modules/machineid.yml +10 -0
  42. package/conf/distros/focal/calamares/modules/mount.yml +20 -0
  43. package/conf/distros/focal/calamares/modules/netinstall.yml +5 -0
  44. package/conf/distros/focal/calamares/modules/packages.mustache +5 -0
  45. package/conf/distros/focal/calamares/modules/partition.yml +21 -0
  46. package/conf/distros/focal/calamares/modules/removeuser.mustache +3 -0
  47. package/conf/distros/focal/calamares/modules/shellprocess@aptsources.yml +11 -0
  48. package/conf/distros/focal/calamares/modules/shellprocess@boot_deploy.yml +9 -0
  49. package/conf/distros/focal/calamares/modules/shellprocess@boot_reconfigure.yml +15 -0
  50. package/conf/distros/focal/calamares/modules/shellprocess@install_translations.yml +8 -0
  51. package/conf/distros/focal/calamares/modules/shellprocess@logs.yml +8 -0
  52. package/conf/distros/focal/calamares/modules/shellprocess@mkinitramfs.yml +6 -0
  53. package/conf/distros/focal/calamares/modules/shellprocess@nomodeset.yml +12 -0
  54. package/conf/distros/focal/calamares/modules/umount.yml +4 -0
  55. package/conf/distros/focal/calamares/modules/unpackfs.mustache +6 -0
  56. package/conf/distros/focal/calamares/modules/users.yml +27 -0
  57. package/conf/distros/focal/calamares/modules/welcome.yml +24 -0
  58. package/conf/distros/focal/calamares/settings.yml +97 -0
  59. package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  60. package/conf/distros/noble/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  61. package/conf/distros/noble/calamares/libexec/calamares-aptsources.sh +0 -0
  62. package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +0 -0
  63. package/conf/distros/noble/calamares/libexec/calamares-logs-helper.sh +0 -0
  64. package/conf/distros/noble/calamares/libexec/calamares-nomodeset.sh +0 -0
  65. package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
  66. package/conf/distros/opensuse/calamares/settings.yml +0 -0
  67. package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
  68. package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
  69. package/conf/distros/trixie/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
  70. package/conf/distros/trixie/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
  71. package/conf/init/unattended.sh +0 -0
  72. package/dist/appimage/first-run-check.d.ts +8 -0
  73. package/dist/appimage/first-run-check.js +13 -0
  74. package/dist/appimage/prerequisites.d.ts +34 -0
  75. package/dist/appimage/prerequisites.js +350 -0
  76. package/dist/bin/dev.cmd +3 -0
  77. package/dist/bin/dev.js +6 -0
  78. package/dist/bin/run.cmd +3 -0
  79. package/dist/bin/run.js +5 -0
  80. package/dist/classes/cli-autologin.js +4 -4
  81. package/dist/classes/diversions.d.ts +5 -0
  82. package/dist/classes/diversions.js +23 -7
  83. package/dist/classes/pacman.js +10 -11
  84. package/dist/classes/utils.d.ts +4 -0
  85. package/dist/classes/utils.js +19 -3
  86. package/dist/commands/calamares.js +1 -1
  87. package/dist/commands/config.js +2 -2
  88. package/dist/commands/{analyze.d.ts → export/appimage.d.ts} +10 -9
  89. package/dist/commands/export/appimage.js +76 -0
  90. package/dist/commands/export/iso.js +1 -1
  91. package/dist/commands/export/pkg.d.ts +1 -1
  92. package/dist/commands/export/pkg.js +2 -2
  93. package/dist/commands/{install.d.ts → krill.d.ts} +3 -4
  94. package/dist/commands/{install.js → krill.js} +5 -6
  95. package/dist/commands/produce.js +1 -1
  96. package/dist/commands/setup.d.ts +21 -0
  97. package/dist/commands/setup.js +90 -0
  98. package/dist/commands/tools/repo.d.ts +0 -5
  99. package/dist/commands/tools/repo.js +205 -127
  100. package/dist/commands/update.d.ts +1 -1
  101. package/dist/commands/update.js +68 -59
  102. package/dist/krill/components/information.js +2 -2
  103. package/dist/krill/components/title.js +13 -13
  104. package/dist/lib/utils.d.ts +16 -0
  105. package/dist/lib/utils.js +24 -32
  106. package/dracut/create-symlink +0 -0
  107. package/dracut/export +0 -0
  108. package/dracut/export-dracut-analysis +0 -0
  109. package/dracut/export-dracut-log +0 -0
  110. package/dracut/mkisofs +0 -0
  111. package/dracut/modules.d/00debug-shell/debug-hook.sh +0 -0
  112. package/dracut/modules.d/00debug-shell/module-setup.sh +0 -0
  113. package/dracut/modules.d/90block/block-cmdline.sh +0 -0
  114. package/dracut/modules.d/90block/module-setup.sh +0 -0
  115. package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +0 -0
  116. package/dracut/modules.d/95iso-scan/iso-scan.sh +0 -0
  117. package/dracut/modules.d/95iso-scan/module-setup.sh +0 -0
  118. package/dracut/modules.d/95luks-loop/luks-loop.sh +0 -0
  119. package/dracut/modules.d/95luks-loop/module-setup.sh +0 -0
  120. package/dracut/renew-initramfs +0 -0
  121. package/dracut/sbin2bin +0 -0
  122. package/dracut/update-dracut-conf-d +0 -0
  123. package/dracut/update-dracut-modules +0 -0
  124. package/eui/eui-autostart-cinnamon.desktop +0 -0
  125. package/eui/eui-autostart-xfce.desktop +0 -0
  126. package/eui/eui-create-image.sh +0 -0
  127. package/eui/eui-start.sh +0 -0
  128. package/manpages/doc/man/eggs.1.gz +0 -0
  129. package/manpages/doc/man/eggs.html +582 -9
  130. package/package.json +125 -130
  131. package/perrisbrewery/scripts/postinst +0 -0
  132. package/perrisbrewery/scripts/postrm +0 -0
  133. package/perrisbrewery/scripts/preinst +0 -0
  134. package/perrisbrewery/scripts/prerm +0 -0
  135. package/perrisbrewery/template/dependencies.yaml +0 -5
  136. package/perrisbrewery/template/man.template.md +7 -0
  137. package/scripts/99clean +0 -0
  138. package/scripts/_eggs +28 -47
  139. package/scripts/adapt.sh +0 -0
  140. package/scripts/appimage-build.sh +152 -0
  141. package/scripts/appimage-install.sh +43 -0
  142. package/scripts/bros/waydroid-helper.sh +0 -0
  143. package/scripts/eggs.bash +3 -4
  144. package/scripts/lsb_release +0 -0
  145. package/scripts/mom.sh +0 -0
  146. package/scripts/pve-live.service +0 -0
  147. package/scripts/pve-live.sh +0 -0
  148. package/scripts/resy +0 -0
  149. package/dist/commands/analyze.js +0 -95
  150. package/dist/commands/pods.d.ts +0 -22
  151. package/dist/commands/pods.js +0 -92
  152. package/scripts/boot-encrypted-root.sh +0 -220
  153. package/scripts/mount-encrypted-home.sh +0 -324
@@ -0,0 +1,350 @@
1
+ /**
2
+ * ./src/appimage/prerequisites.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 { execSync } from 'node:child_process';
9
+ import Utils from '../classes/utils.js';
10
+ import Distro from '../classes/distro.js';
11
+ import Diversions from '../classes/diversions.js';
12
+ /**
13
+ *
14
+ */
15
+ export class Prerequisites {
16
+ distro;
17
+ constructor() {
18
+ this.distro = new Distro();
19
+ }
20
+ /**
21
+ * install
22
+ * @returns
23
+ */
24
+ async install(force = false) {
25
+ const packages = this.getPackagesForDistro();
26
+ if (packages.length === 0) {
27
+ console.log('ERROR: Unsupported distribution for automatic setup');
28
+ return false;
29
+ }
30
+ let missing = packages.filter(pkg => !this.isPackageInstalled(pkg));
31
+ if (force) {
32
+ missing = packages;
33
+ }
34
+ console.log('');
35
+ console.log('The following packages will be installed/reinstalled:');
36
+ console.log(`${missing.join(', ')}`);
37
+ console.log('');
38
+ if (await Utils.customConfirm('Select yes to continue...')) {
39
+ const installCmd = this.getInstallCommand(missing, force);
40
+ Utils.titles(installCmd);
41
+ try {
42
+ console.log('Installing packages (this may take a few minutes)...');
43
+ //execSync(installCmd, { stdio: 'inherit' })
44
+ execSync(installCmd, { stdio: 'ignore' });
45
+ console.log('');
46
+ console.log('SUCCESS: Prerequisites installed successfully!');
47
+ return true;
48
+ }
49
+ catch (error) {
50
+ console.log('');
51
+ console.log('ERROR: Failed to install prerequisites');
52
+ console.log('Error details:', error instanceof Error ? error.message : 'Unknown error');
53
+ console.log('');
54
+ console.log('Please check your system and try again.');
55
+ console.log('You can also install prerequisites manually using your package manager.');
56
+ return false;
57
+ }
58
+ }
59
+ return false;
60
+ }
61
+ /**
62
+ *
63
+ * @returns
64
+ */
65
+ check() {
66
+ try {
67
+ const packages = this.getPackagesForDistro();
68
+ if (packages.length === 0) {
69
+ console.log('WARNING: Unsupported distribution - cannot check prerequisites');
70
+ return false;
71
+ }
72
+ const missing = packages.filter(pkg => !this.isPackageInstalled(pkg));
73
+ if (missing.length > 0) {
74
+ console.log(`MISSING: ${missing.length} of ${packages.length} packages`);
75
+ console.log(`${missing.join(', ')}`);
76
+ return false;
77
+ }
78
+ console.log(`SUCCESS: All ${packages.length} packages are installed`);
79
+ return true;
80
+ }
81
+ catch (error) {
82
+ console.log('ERROR: Failed to check prerequisites');
83
+ console.log('Error details:', error instanceof Error ? error.message : 'Unknown error');
84
+ return false;
85
+ }
86
+ }
87
+ /**
88
+ *
89
+ * @param packages
90
+ * @returns
91
+ */
92
+ getInstallCommand(packages, forceReinstall = false) {
93
+ const packagesStr = packages.join(' ');
94
+ switch (this.distro.familyId) {
95
+ case 'debian':
96
+ // apt richiede il flag --reinstall per forzare la sovrascrittura
97
+ const aptCmd = forceReinstall ? 'install --reinstall' : 'install';
98
+ return `sudo apt-get update && sudo apt-get ${aptCmd} -y ${packagesStr}`;
99
+ case 'archlinux':
100
+ // Pacman -S reinstalla di default.
101
+ // (Se volessimo evitare reinstallazioni su Arch useremmo --needed, ma qui va bene così)
102
+ return `sudo pacman -S --noconfirm ${packagesStr}`;
103
+ case 'fedora':
104
+ // dnf ha un comando specifico 'reinstall'
105
+ const dnfCmd = forceReinstall ? 'reinstall' : 'install';
106
+ return `sudo dnf ${dnfCmd} -y ${packagesStr}`;
107
+ default:
108
+ return `echo "Unsupported distribution: ${this.distro.familyId}"`;
109
+ }
110
+ }
111
+ /**
112
+ *
113
+ * @param pkg
114
+ * @returns
115
+ */
116
+ isPackageInstalled(pkg) {
117
+ try {
118
+ switch (this.distro.familyId) {
119
+ case 'debian':
120
+ // Verifica se il pacchetto è installato
121
+ execSync(`dpkg -s ${pkg}`, { stdio: 'ignore' });
122
+ return true;
123
+ case 'archlinux':
124
+ // Verifica se il pacchetto è installato su Arch
125
+ execSync(`pacman -Q ${pkg}`, { stdio: 'ignore' });
126
+ return true;
127
+ case 'fedora':
128
+ // Verifica se il pacchetto è installato su fedora/Fedora
129
+ execSync(`rpm -q ${pkg}`, { stdio: 'ignore' });
130
+ return true;
131
+ default:
132
+ return false;
133
+ }
134
+ }
135
+ catch {
136
+ return false;
137
+ }
138
+ }
139
+ /**
140
+ *
141
+ * @returns
142
+ */
143
+ getPackagesForDistro() {
144
+ /**
145
+ * normalize as packageList
146
+ */
147
+ let packagesList = this.distro.familyId;
148
+ if (this.distro.familyId === 'el9') {
149
+ packagesList = 'fedora';
150
+ }
151
+ if (this.distro.familyId === 'archlinux' && Diversions.isManjaroBased(this.distro.distroLike)) {
152
+ packagesList = 'manjaro';
153
+ }
154
+ /**
155
+ * we select from packageList
156
+ */
157
+ if (packagesList === 'alpine') {
158
+ return [
159
+ 'alpine-conf',
160
+ 'apk-tools',
161
+ 'bash',
162
+ 'bash-completion',
163
+ 'cryptsetup',
164
+ 'curl',
165
+ 'device-mapper-libs',
166
+ 'dosfstools',
167
+ // 'fuse',
168
+ 'git',
169
+ 'grub-bios',
170
+ 'grub-efi',
171
+ 'jq',
172
+ 'lsblk',
173
+ 'lvm2',
174
+ 'mkinitfs',
175
+ 'musl-locales',
176
+ // 'nodejs',
177
+ 'parted',
178
+ 'polkit',
179
+ 'rsync',
180
+ 'shadow',
181
+ 'squashfs-tools',
182
+ 'sshfs',
183
+ 'xorriso',
184
+ 'zstd',
185
+ 'libc6-compat',
186
+ ];
187
+ }
188
+ else if (packagesList === 'archlinux') {
189
+ return [
190
+ 'arch-install-scripts',
191
+ 'cryptsetup',
192
+ 'curl',
193
+ 'dosfstools',
194
+ 'efibootmgr',
195
+ 'erofs-utils',
196
+ 'findutils',
197
+ // 'fuse2',
198
+ 'git',
199
+ 'gnupg',
200
+ 'grub',
201
+ 'jq',
202
+ 'libarchive',
203
+ 'libisoburn',
204
+ 'lvm2',
205
+ 'mkinitcpio-archiso',
206
+ 'mkinitcpio-nfs-utils',
207
+ 'mtools',
208
+ 'nbd',
209
+ // 'nodejs',
210
+ 'pacman-contrib',
211
+ 'parted',
212
+ 'polkit',
213
+ 'procps-ng',
214
+ 'pv',
215
+ 'python',
216
+ 'rsync',
217
+ 'squashfs-tools',
218
+ 'sshfs',
219
+ 'syslinux',
220
+ 'wget',
221
+ 'xdg-utils',
222
+ ];
223
+ }
224
+ else if (packagesList === 'debian') {
225
+ let debianPackages = [
226
+ 'cryptsetup',
227
+ 'curl',
228
+ 'dosfstools',
229
+ 'dpkg-dev',
230
+ 'git',
231
+ 'gnupg',
232
+ 'grub-efi-amd64-bin',
233
+ 'grub-pc-bin',
234
+ 'grub2-common',
235
+ 'ipxe',
236
+ 'isolinux',
237
+ 'jq',
238
+ 'live-boot',
239
+ 'live-boot-initramfs-tools',
240
+ 'live-config',
241
+ 'lvm2',
242
+ 'parted',
243
+ 'rsync',
244
+ 'squashfs-tools',
245
+ 'sshfs',
246
+ 'syslinux-common',
247
+ 'syslinux',
248
+ 'xorriso',
249
+ ];
250
+ if (Utils.isSystemd()) {
251
+ debianPackages.push('live-config-systemd');
252
+ }
253
+ else {
254
+ debianPackages.push('live-config-sysvinit');
255
+ }
256
+ debianPackages.sort();
257
+ return debianPackages;
258
+ }
259
+ else if (packagesList === 'fedora') {
260
+ return [
261
+ 'cryptsetup',
262
+ 'curl',
263
+ 'device-mapper',
264
+ 'dosfstools',
265
+ 'dracut-live',
266
+ 'dracut',
267
+ 'efibootmgr',
268
+ // 'fuse',
269
+ 'git',
270
+ 'jq',
271
+ 'lvm2',
272
+ // 'nodejs',
273
+ 'nvme-cli',
274
+ 'parted',
275
+ 'polkit',
276
+ 'rsync',
277
+ 'squashfs-tools',
278
+ 'sshfs',
279
+ 'wget',
280
+ 'xdg-utils',
281
+ 'xorriso',
282
+ 'zstd',
283
+ ];
284
+ }
285
+ else if (packagesList === 'manjaro') {
286
+ return [
287
+ 'arch-install-scripts',
288
+ 'curl',
289
+ 'dosfstools',
290
+ 'efibootmgr',
291
+ 'erofs-utils',
292
+ 'findutils',
293
+ // 'fuse2',
294
+ 'git',
295
+ 'gnupg',
296
+ 'grub',
297
+ 'jq',
298
+ 'libarchive',
299
+ 'libisoburn',
300
+ 'lvm2',
301
+ 'manjaro-tools-iso',
302
+ 'mkinitcpio-nfs-utils',
303
+ 'mtools',
304
+ 'nbd',
305
+ // 'nodejs',
306
+ 'pacman-contrib',
307
+ 'parted',
308
+ 'polkit',
309
+ 'procps-ng',
310
+ 'pv',
311
+ 'python',
312
+ 'rsync',
313
+ 'squashfs-tools',
314
+ 'sshfs',
315
+ 'wget',
316
+ 'xdg-utils',
317
+ ];
318
+ }
319
+ else if (packagesList === 'opensuse') {
320
+ return [
321
+ 'cryptsetup',
322
+ 'curl',
323
+ 'device-mapper',
324
+ 'dosfstools',
325
+ 'dracut-kiwi-live',
326
+ 'dracut',
327
+ 'efibootmgr',
328
+ // 'fuse-sshfs',
329
+ // 'fuse',
330
+ 'git',
331
+ 'jq',
332
+ 'lvm2',
333
+ // 'nodejs',
334
+ 'nvme-cli',
335
+ 'parted',
336
+ 'polkit',
337
+ 'rsync',
338
+ 'squashfs-tools',
339
+ 'wget',
340
+ 'xdg-utils',
341
+ 'xorriso',
342
+ 'zstd',
343
+ ];
344
+ }
345
+ else {
346
+ console.log(`This distro ${this.distro.distroId}/${this.distro.codenameId} is not yet recognized!`);
347
+ return [];
348
+ }
349
+ }
350
+ }
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %*
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
2
+
3
+ // eslint-disable-next-line n/shebang
4
+ import {execute} from '@oclif/core'
5
+
6
+ await execute({development: true, dir: import.meta.url})
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\run" %*
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {execute} from '@oclif/core'
4
+
5
+ await execute({dir: import.meta.url})
@@ -147,10 +147,10 @@ export default class CliAutologin {
147
147
  eggsMotd += startMessage + '\n';
148
148
  eggsMotd += Utils.flag() + '\n';
149
149
  eggsMotd += `You are logged as: ${chalk.bold(user)} your password is: ${chalk.bold(userPasswd)}, root password: ${chalk.bold(rootPasswd)}\n\n`;
150
- eggsMotd += `install : ${chalk.bold(installer)}\n`;
151
- eggsMotd += ` --unattended : ${chalk.bold('sudo eggs install --unattended')}\n`;
152
- eggsMotd += ` --chroot : ${chalk.bold('sudo eggs install --chroot')}\n`;
153
- eggsMotd += ` --help : ${chalk.bold('sudo eggs install --help')}\n\n`;
150
+ eggsMotd += `install system : ${chalk.bold(installer)}\n`;
151
+ eggsMotd += ` --unattended : ${chalk.bold('sudo eggs krill --unattended')}\n`;
152
+ eggsMotd += ` --chroot : ${chalk.bold('sudo eggs krill --chroot')}\n`;
153
+ eggsMotd += ` --help : ${chalk.bold('sudo eggs krill --help')}\n\n`;
154
154
  eggsMotd += stopMessage + '\n';
155
155
  // 🔧 [Change 9] - Same as above: safe write with error handling to improve reliability.
156
156
  try {
@@ -15,5 +15,10 @@ export default class Diversions {
15
15
  static kernelParameters(familyId: string, volid: string, fullCrypt?: boolean): string;
16
16
  static distro(): IDistro;
17
17
  static isManjaroBased(distro: string): boolean;
18
+ /**
19
+ *
20
+ * @param familyId
21
+ * @returns
22
+ */
18
23
  static bootloaders(familyId: string): string;
19
24
  }
@@ -7,6 +7,10 @@
7
7
  * NEW VERSION: Improved and cleaned with detailed comments and new changes
8
8
  */
9
9
  import Distro from './distro.js';
10
+ import path from 'path';
11
+ import Utils from './utils.js';
12
+ // _dirname
13
+ const __dirname = path.dirname(new URL(import.meta.url).pathname);
10
14
  export default class Diversions {
11
15
  // NEW CHANGE [1]
12
16
  // Made isSystemDBoot more readable by using direct return without extra variable.
@@ -18,21 +22,21 @@ export default class Diversions {
18
22
  // Simplified deluser function using array.includes and default value.
19
23
  // This makes adding new families easier and avoids long OR chains.
20
24
  static deluser(familyId) {
21
- const userdelFamilies = ['aldos', 'archlinux', 'fedora', 'openmamba', 'opensuse', 'voidlinux'];
25
+ const userdelFamilies = ['archlinux', 'fedora', 'openmamba', 'opensuse', 'voidlinux'];
22
26
  return userdelFamilies.includes(familyId) ? 'userdel' : 'deluser';
23
27
  }
24
28
  // NEW CHANGE [3]
25
29
  // Improved grubName using array.includes and direct return
26
30
  // Cleaner, easier to maintain if new families are added
27
31
  static grubName(familyId) {
28
- const grub2Families = ['aldos', 'fedora', 'opensuse'];
32
+ const grub2Families = [, 'fedora', 'opensuse'];
29
33
  return grub2Families.includes(familyId) ? 'grub2' : 'grub';
30
34
  }
31
35
  // NEW CHANGE [4]
32
36
  // Simplified grubForce function with array.includes
33
37
  // Provides explicit "--force" only for specific families
34
38
  static grubForce(familyId) {
35
- const forceFamilies = ['aldos', 'fedora'];
39
+ const forceFamilies = [, 'fedora'];
36
40
  return forceFamilies.includes(familyId) ? '--force' : '';
37
41
  }
38
42
  // NEW CHANGE [5]
@@ -91,10 +95,22 @@ export default class Diversions {
91
95
  const manjaroFamilies = ['Manjaro', 'Biglinux', 'Bigcommunity'];
92
96
  return manjaroFamilies.includes(distro);
93
97
  }
94
- // NEW CHANGE [8]
95
- // bootloaders path handling improved
96
- // Default path for debian, custom path for all other families
98
+ /**
99
+ *
100
+ * @param familyId
101
+ * @returns
102
+ */
97
103
  static bootloaders(familyId) {
98
- return familyId === 'debian' ? '/usr/lib/' : '/usr/lib/penguins-eggs/bootloaders/';
104
+ let pathBootloaders = '/usr/lib/';
105
+ if (familyId !== "debian") {
106
+ if (Utils.isAppImage()) {
107
+ const appImagePath = path.join(__dirname, '..', '..', 'bootloaders');
108
+ pathBootloaders = appImagePath;
109
+ }
110
+ else {
111
+ pathBootloaders = '/usr/lib/penguins-eggs/bootloaders/';
112
+ }
113
+ }
114
+ return pathBootloaders;
99
115
  }
100
116
  }
@@ -417,21 +417,21 @@ export default class Pacman {
417
417
  * Ubuntu
418
418
  **********************************************************************************/
419
419
  /**
420
- * Ubuntu focal: eredita da noble
420
+ * Ubuntu focal: eredita da focal
421
421
  */
422
422
  }
423
423
  else if (distroUniqueId === 'focal') {
424
424
  const dest = '/etc/penguins-eggs.d/distros/focal';
425
- const noble = `${rootPen}/conf/distros/noble`;
426
- await exec(`cp -r ${noble}/* ${dest}`, echo);
425
+ const focal = `${rootPen}/conf/distros/focal`;
426
+ await exec(`cp -r ${focal}/* ${dest}`, echo);
427
427
  /**
428
- * Ubuntu 22.04 jammy: eredita da noble
428
+ * Ubuntu 22.04 jammy: eredita da focal
429
429
  */
430
430
  }
431
431
  else if (distroUniqueId === 'jammy') {
432
432
  const dest = '/etc/penguins-eggs.d/distros/jammy';
433
- const noble = `${rootPen}/conf/distros/noble`;
434
- await exec(`cp -r ${noble}/* ${dest}`, echo);
433
+ const focal = `${rootPen}/conf/distros/focal`;
434
+ await exec(`cp -r ${focal}/* ${dest}`, echo);
435
435
  /**
436
436
  * Ubuntu noble: e la nuova baseline per ubuntu
437
437
  *
@@ -592,13 +592,12 @@ export default class Pacman {
592
592
  * Installa manPage
593
593
  */
594
594
  static async manPageInstall(verbose = false) {
595
- const manPageSrc = path.resolve(__dirname, '../../manpages/doc/man/eggs.roll.gz');
595
+ const manPageSrc = path.resolve(__dirname, '../../manpages/doc/man/eggs.1.gz');
596
596
  if (fs.existsSync(manPageSrc)) {
597
- const man1Dir = '/usr/share/man/man1/';
598
- if (!fs.existsSync(man1Dir)) {
599
- exec(`mkdir ${man1Dir} -p`);
597
+ const manPageDest = `/usr/share/man/man1`;
598
+ if (!fs.existsSync(manPageDest)) {
599
+ exec(`mkdir ${manPageDest} -p`);
600
600
  }
601
- const manPageDest = man1Dir + 'eggs.1.gz';
602
601
  exec(`cp ${manPageSrc} ${manPageDest}`);
603
602
  if (shx.exec('which mandb', { silent: true }).stdout.trim() !== '') {
604
603
  await exec('mandb > /dev/null');
@@ -41,6 +41,10 @@ export default class Utils {
41
41
  * @param codenameId
42
42
  */
43
43
  static snapshotPrefix(distroId: string, codenameId: string): string;
44
+ /**
45
+ * isAppImage
46
+ */
47
+ static isAppImage(): boolean;
44
48
  /**
45
49
  * Detect if running inside a container (Docker or LXC)
46
50
  */
@@ -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
  */
@@ -868,9 +876,17 @@ export default class Utils {
868
876
  * @returns flag
869
877
  */
870
878
  static flag() {
871
- return chalk.bgGreen.whiteBright(' ' + pjson.name + ' ') +
872
- chalk.bgWhite.blue(" Perri's Brewery edition ") +
873
- chalk.bgRed.whiteBright(' ver. ' + pjson.version + ' ');
879
+ let type = '';
880
+ if (Utils.isAppImage()) {
881
+ type = 'AppImage:';
882
+ }
883
+ let title = `${pjson.name}`;
884
+ let green = ` ${type} ${title}`.padEnd(25, " ");
885
+ let white = ` Perri's brewery edition `.padEnd(25, " ");
886
+ let red = ` v${pjson.version} `.padStart(25, " ");
887
+ return chalk.bgGreen.whiteBright(green) +
888
+ chalk.bgWhite.blue(white) +
889
+ chalk.bgRed.whiteBright(red);
874
890
  }
875
891
  /**
876
892
  *
@@ -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' }),
@@ -99,10 +99,10 @@ export default class Config extends Command {
99
99
  await exec('rm /etc/penguins-eggs.d -rf');
100
100
  }
101
101
  /**
102
- * Se stiamo utilizzando eggs da sorgenti
102
+ * Se stiamo utilizzando eggs da source/appimage
103
103
  * Aggiungo autocomplete e manPage
104
104
  */
105
- if (Utils.isSources()) {
105
+ if (Utils.isSources() || Utils.isAppImage()) {
106
106
  Utils.warning('creating autocomplete...');
107
107
  await Pacman.autocompleteInstall(verbose);
108
108
  Utils.warning('creating eggs man page...');
@@ -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
  }