penguins-eggs 25.11.21 → 25.12.7
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.
- package/.oclif.manifest.json +53 -41
- package/README.md +80 -36
- package/README.pdf +21575 -3241
- package/addons/eggs/theme/livecd/full.grub.main.cfg +39 -4
- package/addons/eggs/theme/livecd/full.isolinux.main.cfg +47 -4
- package/bin/run.js +11 -0
- package/conf/derivatives.yaml +4 -2
- package/conf/exclude.list.d/var.list +11 -6
- package/dist/appimage/dependency-manager.d.ts +31 -0
- package/dist/appimage/dependency-manager.js +292 -0
- package/dist/appimage/first-run-check.js +3 -3
- package/dist/bin/run.js +11 -0
- package/dist/classes/cli-autologin.js +78 -53
- package/dist/classes/compressors.d.ts +7 -10
- package/dist/classes/compressors.js +44 -31
- package/dist/classes/daddy.js +11 -11
- package/dist/classes/distro.js +2 -2
- package/dist/classes/diversions.js +2 -3
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +4 -0
- package/dist/classes/incubation/fisherman-helper/initcpio.js +14 -4
- package/dist/classes/incubation/fisherman-helper/settings.js +1 -1
- package/dist/classes/incubation/fisherman.js +1 -3
- package/dist/classes/incubation/incubator.js +1 -1
- package/dist/classes/network.d.ts +1 -1
- package/dist/classes/ovary.d/create-xdg-autostart.js +1 -1
- package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -12
- package/dist/classes/ovary.d/edit-live-fs.js +216 -186
- package/dist/classes/ovary.d/fertilization.js +1 -1
- package/dist/classes/ovary.d/make-dot-disk.js +1 -1
- package/dist/classes/ovary.d/produce.js +1 -1
- package/dist/classes/ovary.d/user-create-live.d.ts +4 -10
- package/dist/classes/ovary.d/user-create-live.js +82 -84
- package/dist/classes/ovary.d/users-remove.d.ts +5 -6
- package/dist/classes/ovary.d/users-remove.js +61 -31
- package/dist/classes/ovary.d/xorriso-command.js +1 -5
- package/dist/classes/ovary.d.ts +2 -2
- package/dist/classes/ovary.js +2 -2
- package/dist/classes/pacman.d/alpine.js +2 -2
- package/dist/classes/pacman.d/archlinux.js +2 -2
- package/dist/classes/pacman.d/debian.js +2 -3
- package/dist/classes/pacman.d/fedora.js +2 -3
- package/dist/classes/pacman.d/openmamba.js +2 -3
- package/dist/classes/pacman.d/opensuse.js +2 -3
- package/dist/classes/pacman.d.ts +21 -12
- package/dist/classes/pacman.js +55 -47
- package/dist/classes/pve-live.js +1 -1
- package/dist/classes/settings.js +1 -1
- package/dist/classes/sys-users.d.ts +76 -0
- package/dist/classes/sys-users.js +206 -0
- package/dist/classes/utils.d/kernel.js +3 -3
- package/dist/classes/utils.d.ts +16 -11
- package/dist/classes/utils.js +92 -56
- package/dist/classes/xdg.js +1 -1
- package/dist/classes/yolk.js +2 -4
- package/dist/commands/config.js +3 -14
- package/dist/commands/cuckoo.js +1 -1
- package/dist/commands/export/appimage.js +3 -3
- package/dist/commands/export/pkg.js +3 -3
- package/dist/commands/export/tarballs.js +3 -3
- package/dist/commands/krill.js +1 -1
- package/dist/commands/produce.js +9 -4
- package/dist/commands/{setup.d.ts → setup/install.d.ts} +1 -5
- package/dist/commands/setup/install.js +71 -0
- package/dist/commands/setup/purge.d.ts +17 -0
- package/dist/commands/setup/purge.js +71 -0
- package/dist/commands/tools/yolk.js +1 -1
- package/dist/commands/update.d.ts +15 -0
- package/dist/commands/update.js +74 -7
- package/dist/interfaces/i-exec.d.ts +1 -0
- package/dist/krill/classes/prepare.d/location.js +1 -1
- package/dist/krill/classes/prepare.d/partitions.js +1 -1
- package/dist/krill/classes/prepare.d/users.js +2 -2
- package/dist/krill/classes/prepare.js +5 -5
- package/dist/krill/classes/sequence.d/add_user.d.ts +3 -15
- package/dist/krill/classes/sequence.d/add_user.js +87 -57
- package/dist/krill/classes/sequence.d/change_password.d.ts +5 -7
- package/dist/krill/classes/sequence.d/change_password.js +25 -10
- package/dist/krill/classes/sequence.d/del_live_user.d.ts +5 -7
- package/dist/krill/classes/sequence.d/del_live_user.js +39 -25
- package/dist/krill/classes/sequence.d/fstab.js +1 -1
- package/dist/krill/classes/sequence.d/grubcfg.d.ts +3 -7
- package/dist/krill/classes/sequence.d/grubcfg.js +33 -13
- package/dist/krill/classes/sequence.d/mkfs.js +1 -2
- package/dist/krill/classes/sequence.d/unpackfs.d.ts +2 -4
- package/dist/krill/classes/sequence.d/unpackfs.js +8 -5
- package/dist/krill/classes/sequence.js +2 -3
- package/dist/krill/components/title.js +4 -4
- package/dist/krill/lib/select_installation_device.js +1 -1
- package/dist/krill/lib/select_replaced_partition.js +1 -1
- package/dist/lib/utils.d.ts +51 -19
- package/dist/lib/utils.js +225 -39
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +29 -17
- package/package.json +13 -14
- package/perrisbrewery/template/dependencies.yaml +1 -0
- package/scripts/_eggs +35 -7
- package/scripts/boot-encrypted-root.sh +220 -0
- package/scripts/eggs.bash +2 -1
- package/scripts/mount-encrypted-home.sh +324 -0
- package/dist/appimage/prerequisites.d.ts +0 -34
- package/dist/appimage/prerequisites.js +0 -350
- package/dist/commands/setup.js +0 -90
- package/dracut/create-symlink +0 -71
- package/dracut/dracut-log.txt +0 -3
- package/dracut/export +0 -4
- package/dracut/export-dracut-analysis +0 -51
- package/dracut/export-dracut-log +0 -2
- package/dracut/mkisofs +0 -10
- package/dracut/renew-initramfs +0 -17
- package/dracut/sbin2bin +0 -10
- package/dracut/update-dracut-conf-d +0 -2
- package/dracut/update-dracut-modules +0 -62
- package/scripts/appimage-build.sh +0 -152
- package/scripts/appimage-install.sh +0 -43
|
@@ -3,27 +3,62 @@ set theme=/boot/grub/theme.cfg
|
|
|
3
3
|
menuentry "{{{fullname}}} Live/Installation" {
|
|
4
4
|
set gfxpayload=keep
|
|
5
5
|
{{{rmModules}}}
|
|
6
|
-
linux {{{vmlinuz}}} {{{kernel_parameters}}} quiet splash
|
|
6
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
7
7
|
initrd {{{initrdImg}}}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
menuentry "{{{fullname}}} Safe Mode" {
|
|
11
11
|
set gfxpayload=keep
|
|
12
12
|
{{{rmModules}}}
|
|
13
|
-
linux {{{vmlinuz}}} {{{kernel_parameters}}} quiet splash
|
|
13
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} auto noprompt nomodeset auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
14
14
|
initrd {{{initrdImg}}}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
menuentry "{{{fullname}}} Text Mode" {
|
|
18
18
|
set gfxpayload=keep
|
|
19
19
|
{{{rmModules}}}
|
|
20
|
-
linux {{{vmlinuz}}} {{{kernel_parameters}}} quiet splash
|
|
20
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} auto noprompt init 3 auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
21
21
|
initrd {{{initrdImg}}}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
menuentry "{{{fullname}}} Forensics Mode" {
|
|
25
|
+
set gfxpayload=keep
|
|
26
|
+
{{{rmModules}}}
|
|
27
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} forensic noautomount noswap toram auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
28
|
+
initrd {{{initrdImg}}}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
menuentry "{{{fullname}}} NoAcpi Mode" {
|
|
32
|
+
set gfxpayload=keep
|
|
33
|
+
{{{rmModules}}}
|
|
34
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} noapic auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
35
|
+
initrd {{{initrdImg}}}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
menuentry "{{{fullname}}} iommu Mode" {
|
|
39
|
+
set gfxpayload=keep
|
|
40
|
+
{{{rmModules}}}
|
|
41
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} iommu=soft auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
42
|
+
initrd {{{initrdImg}}}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
menuentry "{{{fullname}}} Encrypted Mode" {
|
|
46
|
+
set gfxpayload=keep
|
|
47
|
+
{{{rmModules}}}
|
|
48
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} persistent=cryptsetup persistence-encryption=luks persistent persistence auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
49
|
+
initrd {{{initrdImg}}}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
menuentry "{{{fullname}}} Recovery Mode" {
|
|
53
|
+
set gfxpayload=keep
|
|
54
|
+
{{{rmModules}}}
|
|
55
|
+
linux {{{vmlinuz}}} {{{kernel_parameters}}} recovery nomodeset auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
56
|
+
initrd {{{initrdImg}}}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
24
60
|
if [ "$grub_platform" = "efi" ]; then
|
|
25
61
|
menuentry "Boot from local disk" {
|
|
26
62
|
exit 1
|
|
27
63
|
}
|
|
28
64
|
fi
|
|
29
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# eggs: isolinux.main.cfg
|
|
1
|
+
# eggs: full.isolinux.main.cfg
|
|
2
2
|
#
|
|
3
3
|
|
|
4
4
|
# search path for the c32 support libraries (libcom32, libutil etc.)
|
|
@@ -12,13 +12,13 @@ label Live
|
|
|
12
12
|
menu label {{{fullname}}} Live/Installation Mode
|
|
13
13
|
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
14
14
|
linux {{{vmlinuz}}}
|
|
15
|
-
append initrd={{{initrdImg}}} {{{kernel_parameters}}} priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog
|
|
15
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
16
16
|
|
|
17
17
|
label Safe
|
|
18
18
|
menu label {{{fullname}}} Safe Mode
|
|
19
19
|
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
20
20
|
linux {{{vmlinuz}}}
|
|
21
|
-
append initrd={{{initrdImg}}} {{{kernel_parameters}}} priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog
|
|
21
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} noprompt nomodeset auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
label Text
|
|
@@ -27,8 +27,51 @@ label Text
|
|
|
27
27
|
linux {{{vmlinuz}}}
|
|
28
28
|
append initrd={{{initrdImg}}} {{{kernel_parameters}}} priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog loglevel=0 fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 audit=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=of quiet splash
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
label Text
|
|
32
|
+
menu label {{{fullname}}} Text Mode
|
|
33
|
+
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
34
|
+
linux {{{vmlinuz}}}
|
|
35
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} init 3 auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
label Text
|
|
39
|
+
menu label {{{fullname}}} Forensics Mode
|
|
40
|
+
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
41
|
+
linux {{{vmlinuz}}}
|
|
42
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} auto noprompt forensic noautomount noswap toram quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
label Text
|
|
47
|
+
menu label {{{fullname}}} NoAcpi Mode
|
|
48
|
+
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
49
|
+
linux {{{vmlinuz}}}
|
|
50
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} noapic auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
label Text
|
|
55
|
+
menu label {{{fullname}}} IOMMU Mode
|
|
56
|
+
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
57
|
+
linux {{{vmlinuz}}}
|
|
58
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} iommu=soft auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
59
|
+
|
|
60
|
+
label Text
|
|
61
|
+
menu label {{{fullname}}} Encrypted Mode
|
|
62
|
+
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
63
|
+
linux {{{vmlinuz}}}
|
|
64
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} persistent=cryptsetup persistence-encryption=luks persistent persistence auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
label Text
|
|
68
|
+
menu label {{{fullname}}} Recovery Mode
|
|
69
|
+
say "Booting {{{fullname}}} GNU/Linux (kernel {{{kernel}}})"
|
|
70
|
+
linux {{{vmlinuz}}}
|
|
71
|
+
append initrd={{{initrdImg}}} {{{kernel_parameters}}} recovery nomodeset auto noprompt quiet splash i915.fastboot=1 elevator=none audit=0 nosmt priority=critical retbleed=off mitigations=off audit=0 amd_pstate.enable=1 amd-pstate=active intel_pstate=enable nowatchdog fsck.mode=skip debugfs=off nmi_watchdog=0 debug=0 show_ssp=0 earlyprintk=off kaslr=off no_pasr cfi=off oops=panic
|
|
72
|
+
|
|
30
73
|
label local
|
|
31
74
|
menu label Boot from local disk
|
|
32
75
|
COM32 chain.c32
|
|
33
76
|
APPEND hd0
|
|
34
|
-
say "Booting from the first hard drive"
|
|
77
|
+
say "Booting from the first hard drive"
|
package/bin/run.js
CHANGED
|
@@ -2,4 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import {execute} from '@oclif/core'
|
|
4
4
|
|
|
5
|
+
if (process.env.APPIMAGE && process.env.APPIMAGE.endsWith('.AppImage')) {
|
|
6
|
+
// process.argv contiene [node_path, script_path, ...argomenti_utente]
|
|
7
|
+
// Se la lunghezza è 2, significa che non ci sono argomenti utente.
|
|
8
|
+
if (process.argv.length === 2) {
|
|
9
|
+
console.log('AppImage launched without arguments: launching setup install...');
|
|
10
|
+
// We inject commands for Oclif
|
|
11
|
+
process.argv.push('setup');
|
|
12
|
+
process.argv.push('install');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
await execute({dir: import.meta.url})
|
package/conf/derivatives.yaml
CHANGED
|
@@ -36,9 +36,10 @@
|
|
|
36
36
|
distroLike: Debian
|
|
37
37
|
family: debian
|
|
38
38
|
ids:
|
|
39
|
+
- gigi # LMDE 7
|
|
39
40
|
- lory # Parrot lory
|
|
40
41
|
- orchid # VanillaOS
|
|
41
|
-
-
|
|
42
|
+
- yirmibes # pardus-25
|
|
42
43
|
|
|
43
44
|
# forky
|
|
44
45
|
- id: forky
|
|
@@ -124,6 +125,7 @@
|
|
|
124
125
|
- wilma # Linuxmint 22
|
|
125
126
|
- xia # Linuxmint 22.1
|
|
126
127
|
- zara # Linuxmint 22.2
|
|
128
|
+
- zena # Linuxmint 22.3
|
|
127
129
|
- nexalinux # Nexa LInux
|
|
128
130
|
- crimson # Deepin 25 crimson
|
|
129
131
|
|
|
@@ -141,4 +143,4 @@
|
|
|
141
143
|
- bluestarlinux
|
|
142
144
|
|
|
143
145
|
# Manjaro
|
|
144
|
-
- zetar
|
|
146
|
+
- zetar
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
######################################################################################################
|
|
2
2
|
# var: use this exclusions, attention this can lead to lost something
|
|
3
3
|
var/backups/*
|
|
4
|
-
var/cache/*
|
|
5
|
-
var/lib/aide/*
|
|
4
|
+
var/cache/* var/lib/aide/*
|
|
6
5
|
var/lib/apt/*~
|
|
7
6
|
var/lib/apt/cache/*
|
|
8
7
|
var/lib/apt/cdroms.list
|
|
@@ -14,7 +13,10 @@ var/lib/apt/mirrors/
|
|
|
14
13
|
var/lib/apt/periodic/
|
|
15
14
|
var/lib/aptitude/*.old
|
|
16
15
|
var/lib/cache/*
|
|
17
|
-
|
|
16
|
+
|
|
17
|
+
# NON CANCELLARE QUESTO SU DEVUAN!
|
|
18
|
+
# var/lib/dbus/machine-id
|
|
19
|
+
|
|
18
20
|
var/lib/dhcp/*
|
|
19
21
|
var/lib/dkms/wireguard/*
|
|
20
22
|
var/lib/dpkg/*~old
|
|
@@ -22,8 +24,11 @@ var/lib/gems/2.7.0/cache/*
|
|
|
22
24
|
var/log/*.log
|
|
23
25
|
var/log/*.log.?
|
|
24
26
|
var/log/*/*
|
|
25
|
-
var/spool/*
|
|
26
|
-
var/tmp/*
|
|
27
27
|
|
|
28
|
+
# Modifica per var/spool: non cancellare la directory intera,
|
|
29
|
+
# ma svuota solo directory specifiche se necessario.
|
|
30
|
+
# Se cancelli "var/spool/*" cron e rsyslog non trovano la cartella e danno errore.
|
|
31
|
+
# var/spool/* var/spool/mail/*
|
|
32
|
+
var/spool/postfix/*
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
var/tmp/*
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/appimage/dependency-manager.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
|
+
export declare class DependencyManager {
|
|
9
|
+
private appRoot;
|
|
10
|
+
private distro;
|
|
11
|
+
familyId: string;
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* Verifica se i distro-meta-pacchetto sono già installati nel sistema.
|
|
15
|
+
* @returns true se installati, false altrimenti
|
|
16
|
+
*/
|
|
17
|
+
isInstalled(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Reinstalla i distro-meta-pacchetti: Rimuove e poi Installa.
|
|
20
|
+
* Utile per forzare un aggiornamento delle dipendenze o riparare un'installazione.
|
|
21
|
+
*/
|
|
22
|
+
reinstallDistroPackages(): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Rimuove i distro meta-pacchetti e pulisce le dipendenze.
|
|
25
|
+
*/
|
|
26
|
+
removeDistroPackages(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Installa i distro meta-pacchetti corretti in base alla distribuzione.
|
|
29
|
+
*/
|
|
30
|
+
installDistroPackages(): boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/appimage/dependency-manager.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 Diversions from '../classes/diversions.js';
|
|
10
|
+
import { execSync } from '../lib/utils.js';
|
|
11
|
+
import * as fs from 'fs';
|
|
12
|
+
import * as path from 'path';
|
|
13
|
+
const ALPINE_PACKAGES = [
|
|
14
|
+
'alp-conf', 'apk-tools', 'bash', 'cryptsetup', 'curl', 'dosfstools',
|
|
15
|
+
'e2fsprogs', 'efibootmgr', 'findutils', 'git', 'grub', 'grub-efi',
|
|
16
|
+
'isolinux', 'jq', 'linux-firmware', 'lvm2', 'mtools', 'ncurses',
|
|
17
|
+
'nodejs', 'openssl', 'parted', 'procps', 'py3-setuptools', 'rsync',
|
|
18
|
+
'sfdisk', 'shadow', 'squashfs-tools', 'syslinux', 'tar', 'xorriso',
|
|
19
|
+
'xz', 'zstd'
|
|
20
|
+
].join(' ');
|
|
21
|
+
const META_PACKAGE_NAME = 'penguins-eggs-deps';
|
|
22
|
+
const ALPINE_VIRTUAL_PKG = '.penguins-eggs-deps'; // Nota il punto iniziale
|
|
23
|
+
export class DependencyManager {
|
|
24
|
+
appRoot;
|
|
25
|
+
distro;
|
|
26
|
+
familyId;
|
|
27
|
+
constructor() {
|
|
28
|
+
this.distro = new Distro();
|
|
29
|
+
this.familyId = this.distro.familyId;
|
|
30
|
+
// Gestione specifica per Manjaro (che si identifica come archlinux ma richiede tools diversi)
|
|
31
|
+
if (this.distro.familyId === 'archlinux' && Diversions.isManjaroBased(this.distro.distroLike)) {
|
|
32
|
+
this.familyId = 'manjaro';
|
|
33
|
+
}
|
|
34
|
+
// Definizione della root per cercare i pacchetti
|
|
35
|
+
if (process.env.APPDIR) {
|
|
36
|
+
// In AppImage, i file sono in $APPDIR/distro (o dove li hai configurati)
|
|
37
|
+
this.appRoot = path.join(process.env.APPDIR, 'distro-packages');
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// In sviluppo locale, cerchiamo nella cartella corrente o una di fallback
|
|
41
|
+
this.appRoot = process.cwd();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Verifica se i distro-meta-pacchetto sono già installati nel sistema.
|
|
46
|
+
* @returns true se installati, false altrimenti
|
|
47
|
+
*/
|
|
48
|
+
isInstalled() {
|
|
49
|
+
try {
|
|
50
|
+
switch (this.familyId) {
|
|
51
|
+
case 'alpine':
|
|
52
|
+
// apk info -e esce con 0 se esiste, 1 se no
|
|
53
|
+
execSync(`apk info -e ${ALPINE_VIRTUAL_PKG}`, { stdio: 'ignore' });
|
|
54
|
+
return true;
|
|
55
|
+
case 'archlinux':
|
|
56
|
+
case 'manjaro':
|
|
57
|
+
// pacman -Q esce con 0 se trovato, 1 se no
|
|
58
|
+
execSync(`pacman -Q ${META_PACKAGE_NAME}`, { stdio: 'ignore' });
|
|
59
|
+
return true;
|
|
60
|
+
case 'debian':
|
|
61
|
+
// dpkg -s verifica lo stato del pacchetto
|
|
62
|
+
execSync(`dpkg -s ${META_PACKAGE_NAME}`, { stdio: 'ignore' });
|
|
63
|
+
return true;
|
|
64
|
+
case 'el9':
|
|
65
|
+
case 'fedora':
|
|
66
|
+
case 'opensuse':
|
|
67
|
+
// rpm -q funziona per tutte le distro RPM
|
|
68
|
+
execSync(`rpm -q ${META_PACKAGE_NAME}`, { stdio: 'ignore' });
|
|
69
|
+
return true;
|
|
70
|
+
default:
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
// Se il comando fallisce (exit code != 0), il pacchetto non è installato
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Reinstalla i distro-meta-pacchetti: Rimuove e poi Installa.
|
|
81
|
+
* Utile per forzare un aggiornamento delle dipendenze o riparare un'installazione.
|
|
82
|
+
*/
|
|
83
|
+
reinstallDistroPackages() {
|
|
84
|
+
console.log(`[eggs] Reinstallazione distro meta-packages per: ${this.familyId}...`);
|
|
85
|
+
// Tentiamo la rimozione (ignoriamo errori se non era installato)
|
|
86
|
+
try {
|
|
87
|
+
this.removeDistroPackages();
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
console.log(`[eggs] No previous versions found or removal not necessary.`);
|
|
91
|
+
}
|
|
92
|
+
// Procediamo con l'installazione pulita
|
|
93
|
+
return this.installDistroPackages();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Rimuove i distro meta-pacchetti e pulisce le dipendenze.
|
|
97
|
+
*/
|
|
98
|
+
removeDistroPackages() {
|
|
99
|
+
console.log(`[eggs] Removing distro meta-packages for: ${this.familyId}...`);
|
|
100
|
+
try {
|
|
101
|
+
switch (this.familyId) {
|
|
102
|
+
// ==========================================
|
|
103
|
+
// ALPINE LINUX
|
|
104
|
+
// ==========================================
|
|
105
|
+
case 'alpine':
|
|
106
|
+
console.log('[eggs] Removing Alpine dependencies...');
|
|
107
|
+
execSync(`apk del ${ALPINE_VIRTUAL_PKG}`, { stdio: 'inherit' });
|
|
108
|
+
return true;
|
|
109
|
+
// ==========================================
|
|
110
|
+
// ARCHLINUX/MANJARO
|
|
111
|
+
// ==========================================
|
|
112
|
+
case 'archlinux':
|
|
113
|
+
console.log(`[eggs] Removing package ${META_PACKAGE_NAME} (Arch/Manjaro)...`);
|
|
114
|
+
// -Rns: Rimuove pacchetto, configurazioni e dipendenze non usate da altri
|
|
115
|
+
execSync(`pacman -Rns --noconfirm ${META_PACKAGE_NAME}`, { stdio: 'inherit' });
|
|
116
|
+
return true;
|
|
117
|
+
// ==========================================
|
|
118
|
+
// DEBIAN / UBUNTU FAMILY
|
|
119
|
+
// ==========================================
|
|
120
|
+
case 'debian':
|
|
121
|
+
console.log(`[eggs] Removing package ${META_PACKAGE_NAME} (Debian/Devuan/Ubuntu)...`);
|
|
122
|
+
// Purge rimuove anche i file di configurazione
|
|
123
|
+
// autoremove pulisce le dipendenze installate dal meta-pacchetto
|
|
124
|
+
execSync(`apt-get purge -y ${META_PACKAGE_NAME} && apt-get autoremove -y`, { stdio: 'inherit' });
|
|
125
|
+
return true;
|
|
126
|
+
// ==========================================
|
|
127
|
+
// RPM FAMILY (EL9 / FEDORA / OPENSUSE)
|
|
128
|
+
// ==========================================
|
|
129
|
+
case 'el9':
|
|
130
|
+
case 'fedora':
|
|
131
|
+
console.log(`[eggs] Removing package ${META_PACKAGE_NAME} (RPM/DNF)...`);
|
|
132
|
+
execSync(`dnf remove -y ${META_PACKAGE_NAME}`, { stdio: 'inherit' });
|
|
133
|
+
return true;
|
|
134
|
+
case 'opensuse':
|
|
135
|
+
console.log(`[eggs] Removing package ${META_PACKAGE_NAME} (Zypper)...`);
|
|
136
|
+
// -u (--clean-deps) rimuove anche le dipendenze non più necessarie
|
|
137
|
+
execSync(`zypper rm -y -u ${META_PACKAGE_NAME}`, { stdio: 'inherit' });
|
|
138
|
+
return true;
|
|
139
|
+
default:
|
|
140
|
+
console.warn(`[eggs] Removal not supported automatically for '${this.familyId}'.`);
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
// Spesso la rimozione fallisce semplicemente perché il pacchetto non c'è.
|
|
146
|
+
// Logghiamo warning invece di errore fatale.
|
|
147
|
+
console.warn(`[eggs] Warning removing: ${error.message}`);
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Installa i distro meta-pacchetti corretti in base alla distribuzione.
|
|
153
|
+
*/
|
|
154
|
+
installDistroPackages() {
|
|
155
|
+
const depsBase = this.appRoot;
|
|
156
|
+
// CHECK AGGIUNTO: Se è già installato, evitiamo lavoro inutile?
|
|
157
|
+
// Se vuoi forzare l'installazione sempre, rimuovi questo blocco if.
|
|
158
|
+
if (this.isInstalled()) {
|
|
159
|
+
console.log(`[eggs] The meta-packages for ${this.familyId} are already installed.`);
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
try {
|
|
163
|
+
switch (this.familyId) {
|
|
164
|
+
// ==========================================
|
|
165
|
+
// ALPINE LINUX (Nativo)
|
|
166
|
+
// ==========================================
|
|
167
|
+
case 'alpine': {
|
|
168
|
+
console.log('[eggs] Alpine dependencies configuration (Virtual Package)...');
|
|
169
|
+
// --virtual crea un pacchetto fittizio rimuovibile che raggruppa le dipendenze
|
|
170
|
+
execSync(`apk add --no-cache --virtual ${ALPINE_VIRTUAL_PKG} ${ALPINE_PACKAGES}`, { stdio: 'inherit' });
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
// ==========================================
|
|
174
|
+
// ARCHLINUX
|
|
175
|
+
// ==========================================
|
|
176
|
+
case 'archlinux': {
|
|
177
|
+
const archFile = findPackage(path.join(depsBase, 'arch'), '.zst');
|
|
178
|
+
if (archFile) {
|
|
179
|
+
console.log(`[eggs] Installing the Arch Meta-Package: ${path.basename(archFile)}`);
|
|
180
|
+
execSync(`pacman -Sy --noconfirm && pacman -U --noconfirm "${archFile}"`, { stdio: 'inherit' });
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
// ==========================================
|
|
186
|
+
// DEBIAN / UBUNTU FAMILY
|
|
187
|
+
// ==========================================
|
|
188
|
+
case 'debian': {
|
|
189
|
+
const debFile = findPackage(path.join(depsBase, 'debian'), '.deb');
|
|
190
|
+
if (debFile) {
|
|
191
|
+
console.log(`[eggs] Installing Debian Meta-Package: ${path.basename(debFile)}`);
|
|
192
|
+
// Gestione sicura per l'utente _apt copiando in /tmp
|
|
193
|
+
const tempDebPath = path.join('/tmp', path.basename(debFile));
|
|
194
|
+
try {
|
|
195
|
+
fs.copyFileSync(debFile, tempDebPath);
|
|
196
|
+
execSync(`apt-get update && apt-get install -y "${tempDebPath}"`, { stdio: 'inherit' });
|
|
197
|
+
}
|
|
198
|
+
finally {
|
|
199
|
+
// Assicuriamoci di pulire il file temporaneo anche in caso di errore
|
|
200
|
+
if (fs.existsSync(tempDebPath)) {
|
|
201
|
+
fs.unlinkSync(tempDebPath);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
// ==========================================
|
|
209
|
+
// RHEL / CENTOS / ALMA (RPM Family)
|
|
210
|
+
// ==========================================
|
|
211
|
+
case 'el9': {
|
|
212
|
+
// Cerca file contenente 'el9'
|
|
213
|
+
const elFile = findPackage(path.join(depsBase, 'rpm'), '.rpm', 'el9');
|
|
214
|
+
if (elFile) {
|
|
215
|
+
console.log(`[eggs] Installing EL9 Meta-Package: ${path.basename(elFile)}`);
|
|
216
|
+
execSync(`dnf install -y "${elFile}"`, { stdio: 'inherit' });
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
// ==========================================
|
|
222
|
+
// FEDORA (RPM Family)
|
|
223
|
+
// ==========================================
|
|
224
|
+
case 'fedora': {
|
|
225
|
+
// Cerca file contenente 'fc42' o 'fc' dentro la cartella rpm
|
|
226
|
+
const fedoraFile = findPackage(path.join(depsBase, 'rpm'), '.rpm', 'fc42');
|
|
227
|
+
if (fedoraFile) {
|
|
228
|
+
console.log(`[eggs] Installing Fedora Meta-Package: ${path.basename(fedoraFile)}`);
|
|
229
|
+
execSync(`dnf install -y "${fedoraFile}"`, { stdio: 'inherit' });
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
// ==========================================
|
|
235
|
+
// MANJARO (Variant: manjaro-tools-iso)
|
|
236
|
+
// ==========================================
|
|
237
|
+
case 'manjaro': {
|
|
238
|
+
const manjaroFile = findPackage(path.join(depsBase, 'manjaro'), '.zst');
|
|
239
|
+
if (manjaroFile) {
|
|
240
|
+
console.log(`[eggs] Installing Manjaro Meta-Package: ${path.basename(manjaroFile)}`);
|
|
241
|
+
execSync(`pacman -Sy --noconfirm && pacman -U --noconfirm "${manjaroFile}"`, { stdio: 'inherit' });
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
// ==========================================
|
|
247
|
+
// OPENSUSE (RPM Family)
|
|
248
|
+
// ==========================================
|
|
249
|
+
case 'opensuse': {
|
|
250
|
+
const suseFile = findPackage(path.join(depsBase, 'rpm'), '.rpm', 'opensuse');
|
|
251
|
+
if (suseFile) {
|
|
252
|
+
console.log(`[eggs] Installing openSUSE Meta-Package: ${path.basename(suseFile)}`);
|
|
253
|
+
// --allow-unsigned-rpm è necessario perché i nostri pacchetti non sono firmati con GPG
|
|
254
|
+
execSync(`zypper install -y --allow-unsigned-rpm "${suseFile}"`, { stdio: 'inherit' });
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
default:
|
|
260
|
+
console.warn(`[eggs] Distribuzione '${this.familyId}' non supportata dai meta-pacchetti automatici.`);
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
catch (error) {
|
|
265
|
+
console.error(`[eggs] FATAL ERROR installing dependencies: ${error.message}`);
|
|
266
|
+
// Rilanciamo l'errore per permettere al chiamante di decidere se uscire o continuare
|
|
267
|
+
throw error;
|
|
268
|
+
}
|
|
269
|
+
// Se siamo qui, non è stato trovato il file specifico
|
|
270
|
+
console.warn(`[eggs] No meta-package found for ${this.familyId} in ${depsBase}`);
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Helper Function (fuori classe, come richiesto)
|
|
276
|
+
* Cerca un file pacchetto in una directory specifica.
|
|
277
|
+
*/
|
|
278
|
+
function findPackage(dir, ext, pattern = '') {
|
|
279
|
+
try {
|
|
280
|
+
if (!fs.existsSync(dir)) {
|
|
281
|
+
// console.warn(`[DependencyManager] Directory non trovata: ${dir}`);
|
|
282
|
+
return null;
|
|
283
|
+
}
|
|
284
|
+
const files = fs.readdirSync(dir);
|
|
285
|
+
const found = files.find(file => file.endsWith(ext) && file.includes(pattern));
|
|
286
|
+
return found ? path.join(dir, found) : null;
|
|
287
|
+
}
|
|
288
|
+
catch (error) {
|
|
289
|
+
console.error(`[DependencyManager] Error reading directory ${dir}`, error);
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
if (!
|
|
8
|
+
import { DependencyManager } from "./dependency-manager.js";
|
|
9
|
+
const depsManager = new DependencyManager();
|
|
10
|
+
if (!depsManager.isInstalled()) {
|
|
11
11
|
console.log('WARNING: You need to setup penguins-eggs for full functionality.');
|
|
12
12
|
console.log('Run: sudo eggs setup');
|
|
13
13
|
}
|
package/dist/bin/run.js
CHANGED
|
@@ -2,4 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import {execute} from '@oclif/core'
|
|
4
4
|
|
|
5
|
+
if (process.env.APPIMAGE && process.env.APPIMAGE.endsWith('.AppImage')) {
|
|
6
|
+
// process.argv contiene [node_path, script_path, ...argomenti_utente]
|
|
7
|
+
// Se la lunghezza è 2, significa che non ci sono argomenti utente.
|
|
8
|
+
if (process.argv.length === 2) {
|
|
9
|
+
console.log('AppImage launched without arguments: launching setup install...');
|
|
10
|
+
// We inject commands for Oclif
|
|
11
|
+
process.argv.push('setup');
|
|
12
|
+
process.argv.push('install');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
await execute({dir: import.meta.url})
|