penguins-eggs 25.11.8 → 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.
- package/.oclif.manifest.json +149 -140
- package/README.md +90 -132
- package/README.pdf +1343 -2331
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
- package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
- package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
- package/addons/eggs/theme/applications/install-system.desktop +0 -0
- package/assets/calamares/install-system.sh +0 -0
- package/assets/penguins-eggs.desktop +0 -0
- package/assets/penguins-krill.desktop +0 -0
- package/assets/penguins-links-add.desktop +0 -0
- package/assets/penguins-live-installer.desktop +0 -0
- package/bin/dev.js +0 -0
- package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
- package/conf/distros/archlinux/calamares/modules/bootloader.yml +1 -1
- package/conf/distros/archlinux/calamares/modules/partition.yml +385 -8
- package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/focal/calamares/calamares-modules/.keepit +0 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +20 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/module.yml +9 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/module.yml +8 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +50 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk-undo/module.yml +8 -0
- package/conf/distros/focal/calamares/libexec/.keepit +0 -0
- package/conf/distros/focal/calamares/libexec/README.md +5 -0
- package/conf/distros/focal/calamares/libexec/calamares-aptsources.sh +15 -0
- package/conf/distros/focal/calamares/libexec/calamares-l10n-helper.sh +38 -0
- package/conf/distros/focal/calamares/libexec/calamares-logs-helper.sh +34 -0
- package/conf/distros/focal/calamares/libexec/calamares-nomodeset.sh +19 -0
- package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +26 -0
- package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +12 -0
- package/conf/distros/focal/calamares/modules/bootloader.yml +86 -0
- package/conf/distros/focal/calamares/modules/bootloader.yml.old +35 -0
- package/conf/distros/focal/calamares/modules/displaymanager.yml +12 -0
- package/conf/distros/focal/calamares/modules/finished.yml +6 -0
- package/conf/distros/focal/calamares/modules/fstab.yml +63 -0
- package/conf/distros/focal/calamares/modules/grubcfg.yml +51 -0
- package/conf/distros/focal/calamares/modules/keyboard.yml +29 -0
- package/conf/distros/focal/calamares/modules/locale.yml +7 -0
- package/conf/distros/focal/calamares/modules/machineid.yml +10 -0
- package/conf/distros/focal/calamares/modules/mount.yml +20 -0
- package/conf/distros/focal/calamares/modules/netinstall.yml +5 -0
- package/conf/distros/focal/calamares/modules/packages.mustache +5 -0
- package/conf/distros/focal/calamares/modules/partition.yml +21 -0
- package/conf/distros/focal/calamares/modules/removeuser.mustache +3 -0
- package/conf/distros/focal/calamares/modules/shellprocess@aptsources.yml +11 -0
- package/conf/distros/focal/calamares/modules/shellprocess@boot_deploy.yml +9 -0
- package/conf/distros/focal/calamares/modules/shellprocess@boot_reconfigure.yml +15 -0
- package/conf/distros/focal/calamares/modules/shellprocess@install_translations.yml +8 -0
- package/conf/distros/focal/calamares/modules/shellprocess@logs.yml +8 -0
- package/conf/distros/focal/calamares/modules/shellprocess@mkinitramfs.yml +6 -0
- package/conf/distros/focal/calamares/modules/shellprocess@nomodeset.yml +12 -0
- package/conf/distros/focal/calamares/modules/umount.yml +4 -0
- package/conf/distros/focal/calamares/modules/unpackfs.mustache +6 -0
- package/conf/distros/focal/calamares/modules/users.yml +27 -0
- package/conf/distros/focal/calamares/modules/welcome.yml +24 -0
- package/conf/distros/focal/calamares/settings.yml +97 -0
- package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/noble/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-aptsources.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-logs-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-nomodeset.sh +0 -0
- package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/opensuse/calamares/settings.yml +0 -0
- package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/init/unattended.sh +0 -0
- package/dist/appimage/first-run-check.d.ts +8 -0
- package/dist/appimage/first-run-check.js +13 -0
- package/dist/appimage/prerequisites.d.ts +34 -0
- package/dist/appimage/prerequisites.js +350 -0
- package/dist/bin/dev.cmd +3 -0
- package/dist/bin/dev.js +6 -0
- package/dist/bin/run.cmd +3 -0
- package/dist/bin/run.js +5 -0
- package/dist/classes/cli-autologin.js +4 -4
- package/dist/classes/distro.js +11 -27
- package/dist/classes/diversions.d.ts +5 -0
- package/dist/classes/diversions.js +23 -7
- package/dist/classes/incubation/customize/customize-partitions.js +8 -1
- package/dist/classes/incubation/fisherman-helper/packages.js +1 -1
- package/dist/classes/incubation/incubator.js +2 -2
- package/dist/classes/pacman.d/archlinux.js +5 -5
- package/dist/classes/pacman.d/debian.js +0 -2
- package/dist/classes/pacman.d/opensuse.js +2 -2
- package/dist/classes/pacman.js +10 -11
- package/dist/classes/utils.d.ts +4 -0
- package/dist/classes/utils.js +19 -3
- package/dist/commands/calamares.js +1 -1
- package/dist/commands/config.js +2 -2
- package/dist/commands/{analyze.d.ts → export/appimage.d.ts} +10 -9
- package/dist/commands/export/appimage.js +76 -0
- package/dist/commands/export/iso.js +1 -1
- package/dist/commands/export/pkg.d.ts +1 -1
- package/dist/commands/export/pkg.js +2 -2
- package/dist/commands/{install.d.ts → krill.d.ts} +3 -4
- package/dist/commands/{install.js → krill.js} +5 -6
- package/dist/commands/produce.js +1 -1
- package/dist/commands/setup.d.ts +21 -0
- package/dist/commands/setup.js +90 -0
- package/dist/commands/tools/repo.d.ts +0 -5
- package/dist/commands/tools/repo.js +205 -127
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.js +68 -59
- package/dist/krill/components/information.js +2 -2
- package/dist/krill/components/title.js +13 -13
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.js +24 -32
- package/dracut/create-symlink +0 -0
- package/dracut/export +0 -0
- package/dracut/export-dracut-analysis +0 -0
- package/dracut/export-dracut-log +0 -0
- package/dracut/mkisofs +0 -0
- package/dracut/modules.d/00debug-shell/debug-hook.sh +0 -0
- package/dracut/modules.d/00debug-shell/module-setup.sh +0 -0
- package/dracut/modules.d/90block/block-cmdline.sh +0 -0
- package/dracut/modules.d/90block/module-setup.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan.sh +0 -0
- package/dracut/modules.d/95iso-scan/module-setup.sh +0 -0
- package/dracut/modules.d/95luks-loop/luks-loop.sh +0 -0
- package/dracut/modules.d/95luks-loop/module-setup.sh +0 -0
- package/dracut/renew-initramfs +0 -0
- package/dracut/sbin2bin +0 -0
- package/dracut/update-dracut-conf-d +0 -0
- package/dracut/update-dracut-modules +0 -0
- package/eui/eui-autostart-cinnamon.desktop +0 -0
- package/eui/eui-autostart-xfce.desktop +0 -0
- package/eui/eui-create-image.sh +0 -0
- package/eui/eui-start.sh +0 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +582 -9
- package/package.json +125 -130
- package/perrisbrewery/scripts/postinst +0 -0
- package/perrisbrewery/scripts/postrm +0 -0
- package/perrisbrewery/scripts/preinst +0 -0
- package/perrisbrewery/scripts/prerm +0 -0
- package/perrisbrewery/template/dependencies.yaml +0 -5
- package/perrisbrewery/template/man.template.md +7 -0
- package/scripts/99clean +0 -0
- package/scripts/_eggs +28 -47
- package/scripts/adapt.sh +0 -0
- package/scripts/appimage-build.sh +152 -0
- package/scripts/appimage-install.sh +43 -0
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/eggs.bash +3 -4
- package/scripts/lsb_release +0 -0
- package/scripts/mom.sh +0 -0
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/resy +0 -0
- package/dist/classes/distro-hossein.d.ts +0 -52
- package/dist/classes/distro-hossein.js +0 -239
- package/dist/classes/incubation/incubator.d/bionic.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/bionic.js +0 -83
- package/dist/commands/analyze.js +0 -95
- package/dist/commands/pods.d.ts +0 -22
- package/dist/commands/pods.js +0 -92
- package/scripts/boot-encrypted-root.sh +0 -220
- package/scripts/mount-encrypted-home.sh +0 -324
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/conf/init/unattended.sh
CHANGED
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/appimage/first-run-check.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 { Prerequisites } from './prerequisites.js';
|
|
9
|
+
const prerequisites = new Prerequisites();
|
|
10
|
+
if (!prerequisites.check()) {
|
|
11
|
+
console.log('WARNING: You need to setup penguins-eggs for full functionality.');
|
|
12
|
+
console.log('Run: sudo eggs setup');
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
export declare class Prerequisites {
|
|
5
|
+
private distro;
|
|
6
|
+
constructor();
|
|
7
|
+
/**
|
|
8
|
+
* install
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
install(force?: boolean): Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
check(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param packages
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
private getInstallCommand;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param pkg
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
private isPackageInstalled;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
private getPackagesForDistro;
|
|
34
|
+
}
|
|
@@ -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
|
+
}
|
package/dist/bin/dev.cmd
ADDED
package/dist/bin/dev.js
ADDED
package/dist/bin/run.cmd
ADDED
package/dist/bin/run.js
ADDED
|
@@ -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
|
|
151
|
-
eggsMotd += ` --unattended : ${chalk.bold('sudo eggs
|
|
152
|
-
eggsMotd += ` --chroot : ${chalk.bold('sudo eggs
|
|
153
|
-
eggsMotd += ` --help : ${chalk.bold('sudo eggs
|
|
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 {
|
package/dist/classes/distro.js
CHANGED
|
@@ -67,10 +67,9 @@ class Distro {
|
|
|
67
67
|
this.distroId = "Bigcommunity";
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* Alpine, Fedora, openmamba, opensuse
|
|
70
|
+
* Alpine, Fedora, openmamba, opensuse analyze **distroId**
|
|
71
71
|
*
|
|
72
|
-
* Debian, Devuan, Ubuntu
|
|
73
|
-
* default e si analizza il codebaseId
|
|
72
|
+
* Arch, Debian, Devuan, Ubuntu and derivatives we analyze **codebaseId**
|
|
74
73
|
*
|
|
75
74
|
*/
|
|
76
75
|
if (this.distroId === 'Alpine') {
|
|
@@ -118,7 +117,7 @@ class Distro {
|
|
|
118
117
|
}
|
|
119
118
|
else {
|
|
120
119
|
/**
|
|
121
|
-
*
|
|
120
|
+
* Debian/ARCH: we analize **codenameId**
|
|
122
121
|
*/
|
|
123
122
|
/**
|
|
124
123
|
* Arch
|
|
@@ -177,13 +176,6 @@ class Distro {
|
|
|
177
176
|
this.distroLike = 'Debian';
|
|
178
177
|
this.distroUniqueId = 'trixie';
|
|
179
178
|
this.liveMediumPath = '/run/live/medium/'; //initramfs
|
|
180
|
-
// this.liveMediumPath = '/run/initramfs/live/' // dracut
|
|
181
|
-
/**
|
|
182
|
-
* dracut su trixie
|
|
183
|
-
if (Pacman.packageIsInstalled('dracut')) {
|
|
184
|
-
this.liveMediumPath = '/run/initramfs/live/'
|
|
185
|
-
}
|
|
186
|
-
*/
|
|
187
179
|
/**
|
|
188
180
|
* Debian 14 forky
|
|
189
181
|
*/
|
|
@@ -219,14 +211,6 @@ class Distro {
|
|
|
219
211
|
else if (this.codenameId === 'excalibur') {
|
|
220
212
|
this.distroLike = 'Devuan';
|
|
221
213
|
this.distroUniqueId = 'excalibur';
|
|
222
|
-
/**
|
|
223
|
-
* Ubuntu bionic
|
|
224
|
-
*/
|
|
225
|
-
}
|
|
226
|
-
else if (this.codenameId === 'bionic') {
|
|
227
|
-
this.distroLike = 'Ubuntu';
|
|
228
|
-
this.distroUniqueId = 'bionic';
|
|
229
|
-
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
230
214
|
/**
|
|
231
215
|
* Ubuntu focal
|
|
232
216
|
*/
|
|
@@ -264,11 +248,11 @@ class Distro {
|
|
|
264
248
|
/**
|
|
265
249
|
* derivatives: families archlinux, debian
|
|
266
250
|
*/
|
|
267
|
-
let
|
|
251
|
+
let archDebianDerivatives = path.resolve(__dirname, '../../conf/derivatives.yaml');
|
|
268
252
|
if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
|
|
269
|
-
|
|
253
|
+
archDebianDerivatives = '/etc/penguins-eggs.d/derivatives.yaml';
|
|
270
254
|
}
|
|
271
|
-
const content = fs.readFileSync(
|
|
255
|
+
const content = fs.readFileSync(archDebianDerivatives, 'utf8');
|
|
272
256
|
const distros = yaml.load(content);
|
|
273
257
|
for (const distro of distros) {
|
|
274
258
|
if (distro.ids !== undefined) {
|
|
@@ -287,11 +271,11 @@ class Distro {
|
|
|
287
271
|
* derivatives: family fedora
|
|
288
272
|
*/
|
|
289
273
|
if (!found) {
|
|
290
|
-
let
|
|
274
|
+
let fedoraDerivatives = path.resolve(__dirname, '../../conf/derivatives_fedora.yaml');
|
|
291
275
|
if (fs.existsSync('/etc/penguins-eggs.d/derivatives_fedora.yaml')) {
|
|
292
|
-
|
|
276
|
+
fedoraDerivatives = '/etc/penguins-eggs.d/derivatives_fedora.yaml';
|
|
293
277
|
}
|
|
294
|
-
const content = fs.readFileSync(
|
|
278
|
+
const content = fs.readFileSync(fedoraDerivatives, 'utf8');
|
|
295
279
|
const elem = yaml.load(content);
|
|
296
280
|
if (elem.includes(this.distroId)) {
|
|
297
281
|
this.familyId = 'fedora';
|
|
@@ -327,7 +311,7 @@ class Distro {
|
|
|
327
311
|
this.usrLibPath = '/usr/lib64/';
|
|
328
312
|
}
|
|
329
313
|
/**
|
|
330
|
-
* Manjarolinux
|
|
314
|
+
* Manjarolinux anf derivatives (biglinux)
|
|
331
315
|
*/
|
|
332
316
|
if (Diversions.isManjaroBased(this.distroId)) {
|
|
333
317
|
this.liveMediumPath = '/run/miso/bootmnt/';
|
|
@@ -345,7 +329,7 @@ class Distro {
|
|
|
345
329
|
const data = fs.readFileSync(os_release, 'utf8');
|
|
346
330
|
lines = data.split('\n');
|
|
347
331
|
}
|
|
348
|
-
//
|
|
332
|
+
// read every line
|
|
349
333
|
for (const line of lines) {
|
|
350
334
|
if (line.startsWith('HOME_URL=')) {
|
|
351
335
|
this.homeUrl = line.slice('HOME_URL='.length).replaceAll('"', '');
|
|
@@ -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 = ['
|
|
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 = [
|
|
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 = [
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @param familyId
|
|
101
|
+
* @returns
|
|
102
|
+
*/
|
|
97
103
|
static bootloaders(familyId) {
|
|
98
|
-
|
|
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
|
}
|
|
@@ -24,7 +24,8 @@ export async function customizePartitions() {
|
|
|
24
24
|
*/
|
|
25
25
|
partition.availableFileSystemTypes = ['ext4'];
|
|
26
26
|
if (Pacman.packageIsInstalled('progs') ||
|
|
27
|
-
Pacman.packageIsInstalled('btrfsprogs')
|
|
27
|
+
Pacman.packageIsInstalled('btrfsprogs') ||
|
|
28
|
+
Pacman.packageIsInstalled('btrfs-progs')) {
|
|
28
29
|
partition.availableFileSystemTypes.push('btrfs');
|
|
29
30
|
}
|
|
30
31
|
if (Pacman.packageIsInstalled('xfsprogs')) {
|
|
@@ -33,5 +34,11 @@ export async function customizePartitions() {
|
|
|
33
34
|
if (Pacman.packageIsInstalled('f2fs-tools')) {
|
|
34
35
|
partition.availableFileSystemTypes.push('f2fs');
|
|
35
36
|
}
|
|
37
|
+
// Cannot work here
|
|
38
|
+
// if (!fs.existsSync('/sys/firmware/efi')) {
|
|
39
|
+
// if (partition.efi) {
|
|
40
|
+
// delete partition.efi
|
|
41
|
+
// }
|
|
42
|
+
// }
|
|
36
43
|
fs.writeFileSync(filePartition, yaml.dump(partition), 'utf-8');
|
|
37
44
|
}
|
|
@@ -12,7 +12,7 @@ import Pacman from '../../pacman.js';
|
|
|
12
12
|
* @returns yaml-string
|
|
13
13
|
*/
|
|
14
14
|
export function remove(distro) {
|
|
15
|
-
const packages = ['calamares
|
|
15
|
+
const packages = ['calamares'];
|
|
16
16
|
if (distro.familyId === 'archlinux') {
|
|
17
17
|
packages.push('penguins-eggs');
|
|
18
18
|
}
|