penguins-eggs 10.0.18 → 10.0.20
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 +1 -1
- package/README.md +28 -28
- package/dist/classes/distro.js +188 -154
- package/dist/classes/families/alpine.d.ts +55 -0
- package/dist/classes/families/alpine.js +108 -0
- package/dist/classes/families/archlinux.js +2 -1
- package/dist/classes/families/fedora.js +2 -4
- package/dist/classes/ovary.d.ts +10 -1
- package/dist/classes/ovary.js +48 -16
- package/dist/classes/pacman.js +21 -21
- package/dist/classes/utils.d.ts +4 -4
- package/dist/classes/utils.js +20 -9
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +3 -3
- package/mkinitcpio/README.md +1 -1
- package/package.json +12 -12
- package/scripts/_eggs +0 -1
- package/scripts/eggs.bash +1 -1
- package/dist/classes/initrd.d.ts +0 -41
- package/dist/classes/initrd.js +0 -152
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/families/alpine.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Alpine
|
|
10
|
+
* @remarks all the utilities
|
|
11
|
+
*/
|
|
12
|
+
export default class Alpine {
|
|
13
|
+
static packs4calamares: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Alpine: calamaresInstall
|
|
16
|
+
*/
|
|
17
|
+
static calamaresInstall(verbose?: boolean): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Alpine: calamaresPolicies
|
|
20
|
+
*/
|
|
21
|
+
static calamaresPolicies(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Alpine: calamaresRemove
|
|
24
|
+
*/
|
|
25
|
+
static calamaresRemove(verbose?: boolean): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Alpine: isInstalledWayland
|
|
28
|
+
* @returns true if wayland is installed
|
|
29
|
+
*/
|
|
30
|
+
static isInstalledWayland(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Alpine: isInstalledXorg
|
|
33
|
+
* @returns true if xorg is installed
|
|
34
|
+
*/
|
|
35
|
+
static isInstalledXorg(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Alpine: packageInstall
|
|
38
|
+
* Install the package packageName
|
|
39
|
+
* @param packageName {string} Pacchetto Debian da installare
|
|
40
|
+
* @returns {boolean} True if success
|
|
41
|
+
*/
|
|
42
|
+
static packageInstall(packageName: string): Promise<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Alpine: packageIsInstalled OK
|
|
45
|
+
* restuisce VERO se il pacchetto è installato
|
|
46
|
+
* @param packageName
|
|
47
|
+
*/
|
|
48
|
+
static packageIsInstalled(packageName: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Alpine: packagePacmanAvailable
|
|
51
|
+
* restuisce VERO se il pacchetto è installato
|
|
52
|
+
* @param packageName
|
|
53
|
+
*/
|
|
54
|
+
static packagePacmanAvailable(packageName: string): Promise<boolean>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/families/alpine.ts
|
|
3
|
+
* penguins-eggs v.10.0.0 / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import shx from 'shelljs';
|
|
9
|
+
import { exec } from '../../lib/utils.js';
|
|
10
|
+
import Utils from '../utils.js';
|
|
11
|
+
/**
|
|
12
|
+
* Alpine
|
|
13
|
+
* @remarks all the utilities
|
|
14
|
+
*/
|
|
15
|
+
export default class Alpine {
|
|
16
|
+
static packs4calamares = ['calamares'];
|
|
17
|
+
/**
|
|
18
|
+
* Alpine: calamaresInstall
|
|
19
|
+
*/
|
|
20
|
+
static async calamaresInstall(verbose = false) {
|
|
21
|
+
const echo = Utils.setEcho(verbose);
|
|
22
|
+
try {
|
|
23
|
+
let cmd = `apk add ${this.packs4calamares}`;
|
|
24
|
+
try {
|
|
25
|
+
await exec(cmd, echo);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
Utils.error(`Cannot install ${this.packs4calamares}`); // + e.error)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
Utils.error(`Cannot download ${this.packs4calamares}`); // + e.error)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Alpine: calamaresPolicies
|
|
37
|
+
*/
|
|
38
|
+
static async calamaresPolicies() {
|
|
39
|
+
const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
|
|
40
|
+
await exec(`sed -i 's/auth_admin/yes/' ${policyFile}`);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Alpine: calamaresRemove
|
|
44
|
+
*/
|
|
45
|
+
static async calamaresRemove(verbose = true) {
|
|
46
|
+
verbose = true; // serve per pacman
|
|
47
|
+
let removed = true;
|
|
48
|
+
const echo = Utils.setEcho(verbose);
|
|
49
|
+
await exec(`apk del ${this.packs4calamares}`);
|
|
50
|
+
await exec('rm /etc/calamares -rf', echo);
|
|
51
|
+
return removed;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Alpine: isInstalledWayland
|
|
55
|
+
* @returns true if wayland is installed
|
|
56
|
+
*/
|
|
57
|
+
static isInstalledWayland() {
|
|
58
|
+
return this.packageIsInstalled('xwayland');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Alpine: isInstalledXorg
|
|
62
|
+
* @returns true if xorg is installed
|
|
63
|
+
*/
|
|
64
|
+
static isInstalledXorg() {
|
|
65
|
+
return this.packageIsInstalled('xorg-server-common');
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Alpine: packageInstall
|
|
69
|
+
* Install the package packageName
|
|
70
|
+
* @param packageName {string} Pacchetto Debian da installare
|
|
71
|
+
* @returns {boolean} True if success
|
|
72
|
+
*/
|
|
73
|
+
static async packageInstall(packageName) {
|
|
74
|
+
let retVal = false;
|
|
75
|
+
if (shx.exec(`/sbin/apk add ${packageName}`, { silent: true }) === '0') {
|
|
76
|
+
retVal = true;
|
|
77
|
+
}
|
|
78
|
+
return retVal;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Alpine: packageIsInstalled OK
|
|
82
|
+
* restuisce VERO se il pacchetto è installato
|
|
83
|
+
* @param packageName
|
|
84
|
+
*/
|
|
85
|
+
static packageIsInstalled(packageName) {
|
|
86
|
+
let installed = false;
|
|
87
|
+
const cmd = `/sbin/apk info -e ${packageName}`;
|
|
88
|
+
const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
|
|
89
|
+
if (stdout.includes(packageName)) {
|
|
90
|
+
installed = true;
|
|
91
|
+
}
|
|
92
|
+
return installed;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Alpine: packagePacmanAvailable
|
|
96
|
+
* restuisce VERO se il pacchetto è installato
|
|
97
|
+
* @param packageName
|
|
98
|
+
*/
|
|
99
|
+
static async packagePacmanAvailable(packageName) {
|
|
100
|
+
let available = false;
|
|
101
|
+
const cmd = `/sbin/apk search ${packageName} | awk '{ print $1 }'`;
|
|
102
|
+
const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
|
|
103
|
+
if (stdout == packageName) {
|
|
104
|
+
available = true;
|
|
105
|
+
}
|
|
106
|
+
return available;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -24,7 +24,8 @@ export default class Archlinux {
|
|
|
24
24
|
// const cal_eggs = 'arco-calamares-3.3.2-02-x86_64.pkg.tar.zst' // 2024-02-10
|
|
25
25
|
// const cal_eggs = 'arco-calamares-3.3.5-02-x86_64.pkg.tar.zst' // 2024-03-10
|
|
26
26
|
// const cal_eggs = 'calamares-garuda-3.3.5.r19.g10acebff4-1-x86_64.pkg.tar.zst' // 2024-03-10
|
|
27
|
-
const cal_eggs = 'arco-calamares-3.3.6-06-x86_64.pkg.tar.zst'
|
|
27
|
+
// const cal_eggs = 'arco-calamares-3.3.6-06-x86_64.pkg.tar.zst' // 24/04/27
|
|
28
|
+
const cal_eggs = 'calamares-eggs-3.3.8.r39.g80ef430-1-x86_64.pkg.tar.zst'; // 12/07/24
|
|
28
29
|
let cmd = `wget -O /tmp/${cal_eggs} https://sourceforge.net/projects/penguins-eggs/files/PKGBUILD/${cal_eggs}/download`;
|
|
29
30
|
try {
|
|
30
31
|
await exec(cmd, echo);
|
|
@@ -24,7 +24,7 @@ export default class Fedora {
|
|
|
24
24
|
await exec(`dnf install ${this.packs4calamares.join(' ')}`, echo);
|
|
25
25
|
}
|
|
26
26
|
catch {
|
|
27
|
-
Utils.error(`
|
|
27
|
+
Utils.error(`fedora.calamaresInstall()`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -42,8 +42,7 @@ export default class Fedora {
|
|
|
42
42
|
if (fs.existsSync('/etc/calamares')) {
|
|
43
43
|
await exec('rm /etc/calamares -rf', echo);
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
await exec('yay -Rns calamares', echo);
|
|
45
|
+
await exec('dnf remove calamares', echo);
|
|
47
46
|
return retVal;
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
@@ -91,7 +90,6 @@ export default class Fedora {
|
|
|
91
90
|
*/
|
|
92
91
|
static packageIsInstalled(packageName) {
|
|
93
92
|
let installed = false;
|
|
94
|
-
// rpm -qa | grep -i nano
|
|
95
93
|
const cmd = `/usr/bin/dnf list --installed ${packageName}`;
|
|
96
94
|
const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
|
|
97
95
|
if (stdout.includes(packageName)) {
|
package/dist/classes/ovary.d.ts
CHANGED
|
@@ -82,14 +82,23 @@ export default class Ovary {
|
|
|
82
82
|
* @param scriptOnly
|
|
83
83
|
*/
|
|
84
84
|
finished(scriptOnly?: boolean): void;
|
|
85
|
+
/**
|
|
86
|
+
* initrdAlpine()
|
|
87
|
+
*/
|
|
88
|
+
initrdAlpine(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* initrdFedora()
|
|
91
|
+
*/
|
|
92
|
+
initrdFedora(): Promise<void>;
|
|
85
93
|
/**
|
|
86
94
|
* initrdArch()
|
|
87
95
|
* necessita di echoYes
|
|
88
96
|
*/
|
|
89
97
|
initrdArch(): Promise<void>;
|
|
90
98
|
/**
|
|
99
|
+
* initrdDebian()
|
|
100
|
+
* Actually based on live* packages
|
|
91
101
|
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
92
|
-
* @returns
|
|
93
102
|
*/
|
|
94
103
|
initrdDebian(verbose?: boolean): Promise<void>;
|
|
95
104
|
/**
|
package/dist/classes/ovary.js
CHANGED
|
@@ -198,9 +198,14 @@ export default class Ovary {
|
|
|
198
198
|
ignore: false
|
|
199
199
|
});
|
|
200
200
|
const users = result.data.split('\n');
|
|
201
|
+
let cmdUserDel = `userdel`;
|
|
202
|
+
if (this.familyId === 'alpine') {
|
|
203
|
+
// On Alpine we have just deluser
|
|
204
|
+
cmdUserDel = "deluser";
|
|
205
|
+
}
|
|
201
206
|
for (let i = 0; i < users.length - 1; i++) {
|
|
202
207
|
// cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} deluser ${users[i]}`, verbose))
|
|
203
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged}
|
|
208
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} ${cmdUserDel} ${users[i]}`, this.verbose));
|
|
204
209
|
}
|
|
205
210
|
}
|
|
206
211
|
/**
|
|
@@ -215,14 +220,21 @@ export default class Ovary {
|
|
|
215
220
|
const cmds = [];
|
|
216
221
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' rm /home/' + this.settings.config.user_opt + ' -rf', this.verbose));
|
|
217
222
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
|
|
218
|
-
|
|
223
|
+
if (this.familyId === 'alpine') {
|
|
224
|
+
// Create user using adduser
|
|
225
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' adduser -D -h /home/' + this.settings.config.user_opt + ' -s /bin/bash ' + this.settings.config.user_opt, this.verbose));
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
// Create user using useradd
|
|
229
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' useradd ' + this.settings.config.user_opt + ' --home-dir /home/' + this.settings.config.user_opt + ' --shell /bin/bash ', this.verbose));
|
|
230
|
+
}
|
|
231
|
+
// live password
|
|
232
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo ' + this.settings.config.user_opt + ':' + this.settings.config.user_opt_passwd + ' | chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
233
|
+
// root password
|
|
234
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + ' | chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
219
235
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
220
236
|
// da problemi con il mount sshfs
|
|
221
237
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' chown ' + this.settings.config.user_opt + ':users' + ' /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
222
|
-
// live password
|
|
223
|
-
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo ' + this.settings.config.user_opt + ':' + this.settings.config.user_opt_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
224
|
-
// root password
|
|
225
|
-
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
226
238
|
if (this.familyId === 'debian') {
|
|
227
239
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
|
|
228
240
|
}
|
|
@@ -691,15 +703,28 @@ export default class Ovary {
|
|
|
691
703
|
console.log(`Note: format UDF, generated by ${chalk.cyanBright('genisoimage')}`);
|
|
692
704
|
}
|
|
693
705
|
}
|
|
706
|
+
/**
|
|
707
|
+
* initrdAlpine()
|
|
708
|
+
*/
|
|
709
|
+
async initrdAlpine() {
|
|
710
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Alpine on ISO/live`);
|
|
711
|
+
await exec(`cp /boot/initramfs-lts ${this.settings.iso_work}/live/`, this.echo);
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* initrdFedora()
|
|
715
|
+
*/
|
|
716
|
+
async initrdFedora() {
|
|
717
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
|
|
718
|
+
await exec(`cp /boot/initramfs-* ${this.settings.iso_work}/live/`, this.echo);
|
|
719
|
+
}
|
|
694
720
|
/**
|
|
695
721
|
* initrdArch()
|
|
696
722
|
* necessita di echoYes
|
|
697
723
|
*/
|
|
698
724
|
async initrdArch() {
|
|
699
|
-
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
|
|
700
725
|
let initrdImg = Utils.initrdImg();
|
|
701
726
|
initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
|
|
702
|
-
Utils.warning(`
|
|
727
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} ArchLinux on ISO/live`);
|
|
703
728
|
const { distroId } = this.settings.distro;
|
|
704
729
|
let fileConf = 'arch';
|
|
705
730
|
if (isMiso(distroId)) {
|
|
@@ -712,11 +737,12 @@ export default class Ovary {
|
|
|
712
737
|
await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
|
|
713
738
|
}
|
|
714
739
|
/**
|
|
740
|
+
* initrdDebian()
|
|
741
|
+
* Actually based on live* packages
|
|
715
742
|
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
716
|
-
* @returns
|
|
717
743
|
*/
|
|
718
744
|
async initrdDebian(verbose = false) {
|
|
719
|
-
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
|
|
745
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Debian/Devuan/Ubuntu on ISO/live`);
|
|
720
746
|
let isCrypted = false;
|
|
721
747
|
if (fs.existsSync('/etc/crypttab')) {
|
|
722
748
|
isCrypted = true;
|
|
@@ -1419,15 +1445,21 @@ export default class Ovary {
|
|
|
1419
1445
|
await this.isolinux(this.theme);
|
|
1420
1446
|
await this.kernelCopy();
|
|
1421
1447
|
/**
|
|
1422
|
-
* we need different
|
|
1423
|
-
*
|
|
1448
|
+
* we need different initfs
|
|
1449
|
+
* for different families
|
|
1424
1450
|
*/
|
|
1425
|
-
if (this.familyId === '
|
|
1426
|
-
await this.initrdDebian();
|
|
1427
|
-
}
|
|
1428
|
-
else if (this.familyId === 'archlinux') {
|
|
1451
|
+
if (this.familyId === 'archlinux') {
|
|
1429
1452
|
await this.initrdArch();
|
|
1430
1453
|
}
|
|
1454
|
+
else if (this.familyId === 'alpine') {
|
|
1455
|
+
await this.initrdAlpine();
|
|
1456
|
+
}
|
|
1457
|
+
else if (this.familyId === 'fedora') {
|
|
1458
|
+
await this.initrdFedora();
|
|
1459
|
+
}
|
|
1460
|
+
else if (this.familyId === 'debian') {
|
|
1461
|
+
await this.initrdDebian();
|
|
1462
|
+
}
|
|
1431
1463
|
if (this.settings.config.make_efi) {
|
|
1432
1464
|
await this.makeEfi(this.theme);
|
|
1433
1465
|
}
|
package/dist/classes/pacman.js
CHANGED
|
@@ -15,7 +15,7 @@ import Distro from './distro.js';
|
|
|
15
15
|
import Archlinux from './families/archlinux.js';
|
|
16
16
|
import Debian from './families/debian.js';
|
|
17
17
|
import Fedora from './families/fedora.js';
|
|
18
|
-
import
|
|
18
|
+
import Alpine from './families/alpine.js';
|
|
19
19
|
import Settings from './settings.js';
|
|
20
20
|
import Utils from './utils.js';
|
|
21
21
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
@@ -79,8 +79,8 @@ export default class Pacman {
|
|
|
79
79
|
await Archlinux.calamaresInstall(verbose);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
else if (this.distro().familyId === '
|
|
83
|
-
await
|
|
82
|
+
else if (this.distro().familyId === 'alpine') {
|
|
83
|
+
await Alpine.calamaresInstall(verbose);
|
|
84
84
|
}
|
|
85
85
|
// remove others calamares links
|
|
86
86
|
await exec('rm -f /usr/share/applications/calamares-eggs-debugging.desktop');
|
|
@@ -101,8 +101,8 @@ export default class Pacman {
|
|
|
101
101
|
else if (this.distro().familyId === 'archlinux') {
|
|
102
102
|
await Archlinux.calamaresPolicies();
|
|
103
103
|
}
|
|
104
|
-
else if (this.distro().familyId === '
|
|
105
|
-
await
|
|
104
|
+
else if (this.distro().familyId === 'alpine') {
|
|
105
|
+
await Alpine.calamaresPolicies();
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
@@ -119,8 +119,8 @@ export default class Pacman {
|
|
|
119
119
|
else if (this.distro().familyId === 'archlinux') {
|
|
120
120
|
retVal = await Archlinux.calamaresRemove(verbose);
|
|
121
121
|
}
|
|
122
|
-
else if (this.distro().familyId === '
|
|
123
|
-
retVal = await
|
|
122
|
+
else if (this.distro().familyId === 'alpine') {
|
|
123
|
+
retVal = await Alpine.calamaresRemove(verbose);
|
|
124
124
|
}
|
|
125
125
|
return retVal;
|
|
126
126
|
}
|
|
@@ -454,16 +454,13 @@ export default class Pacman {
|
|
|
454
454
|
const rolling = `${rootPen}/conf/distros/rolling/*`;
|
|
455
455
|
await exec(`cp -r ${rolling} ${dest}`, echo);
|
|
456
456
|
/***********************************************************************************
|
|
457
|
-
*
|
|
457
|
+
* Alpine
|
|
458
458
|
**********************************************************************************/
|
|
459
|
-
/**
|
|
460
|
-
* openSUSE tumbleweed: eredita da tumbleweed
|
|
461
|
-
*/
|
|
462
459
|
}
|
|
463
|
-
else if (this.distro().codenameLikeId === '
|
|
464
|
-
const dest = '/etc/penguins-eggs.d/distros/
|
|
465
|
-
const
|
|
466
|
-
await exec(`cp -r ${
|
|
460
|
+
else if (this.distro().codenameLikeId === 'alpine-rolling') {
|
|
461
|
+
const dest = '/etc/penguins-eggs.d/distros/alpine-rolling/';
|
|
462
|
+
const alpine = `${rootPen}/conf/distros/alpine-rolling/*`;
|
|
463
|
+
await exec(`cp -r ${alpine} ${dest}`, echo);
|
|
467
464
|
}
|
|
468
465
|
}
|
|
469
466
|
/**
|
|
@@ -505,7 +502,7 @@ export default class Pacman {
|
|
|
505
502
|
installed = true;
|
|
506
503
|
}
|
|
507
504
|
}
|
|
508
|
-
else if (this.distro().familyId === '
|
|
505
|
+
else if (this.distro().familyId === 'alpine' && Alpine.packageIsInstalled('xwayland*')) {
|
|
509
506
|
installed = true;
|
|
510
507
|
}
|
|
511
508
|
return installed;
|
|
@@ -531,7 +528,7 @@ export default class Pacman {
|
|
|
531
528
|
installed = true;
|
|
532
529
|
}
|
|
533
530
|
}
|
|
534
|
-
else if (this.distro().familyId === '
|
|
531
|
+
else if (this.distro().familyId === 'alpine' && Alpine.packageIsInstalled('xorg-x11-server')) {
|
|
535
532
|
installed = true;
|
|
536
533
|
}
|
|
537
534
|
return installed;
|
|
@@ -577,7 +574,7 @@ export default class Pacman {
|
|
|
577
574
|
else if (Pacman.distro().familyId === 'archlinux') {
|
|
578
575
|
isUefi = true;
|
|
579
576
|
}
|
|
580
|
-
else if (Pacman.distro().familyId === '
|
|
577
|
+
else if (Pacman.distro().familyId === 'alpine') {
|
|
581
578
|
isUefi = true;
|
|
582
579
|
}
|
|
583
580
|
return isUefi;
|
|
@@ -641,6 +638,9 @@ export default class Pacman {
|
|
|
641
638
|
else if (this.distro().familyId === 'fedora') {
|
|
642
639
|
retVal = await Fedora.packageInstall(packageName);
|
|
643
640
|
}
|
|
641
|
+
else if (this.distro().familyId === 'alpine') {
|
|
642
|
+
retVal = await Alpine.packageInstall(packageName);
|
|
643
|
+
}
|
|
644
644
|
return retVal;
|
|
645
645
|
}
|
|
646
646
|
/**
|
|
@@ -658,8 +658,8 @@ export default class Pacman {
|
|
|
658
658
|
else if (this.distro().familyId === 'archlinux') {
|
|
659
659
|
installed = Archlinux.packageIsInstalled(packageName);
|
|
660
660
|
}
|
|
661
|
-
else if (this.distro().familyId === '
|
|
662
|
-
installed =
|
|
661
|
+
else if (this.distro().familyId === 'alpine') {
|
|
662
|
+
installed = Alpine.packageIsInstalled(packageName);
|
|
663
663
|
}
|
|
664
664
|
return installed;
|
|
665
665
|
}
|
|
@@ -687,7 +687,7 @@ export default class Pacman {
|
|
|
687
687
|
grubInstalled = 'grub';
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
else if (this.distro().familyId === '
|
|
690
|
+
else if (this.distro().familyId === 'alpine') {
|
|
691
691
|
grubInstalled = 'grub2';
|
|
692
692
|
}
|
|
693
693
|
return grubInstalled;
|
package/dist/classes/utils.d.ts
CHANGED
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export default class Utils {
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
* Custom function to sort object keys
|
|
15
|
+
* @param obj
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
18
|
static sortObjectKeys(obj: {
|
|
19
19
|
[key: string]: any;
|
|
20
20
|
}): {
|
package/dist/classes/utils.js
CHANGED
|
@@ -29,11 +29,10 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
|
29
29
|
*/
|
|
30
30
|
export default class Utils {
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
//
|
|
32
|
+
* Custom function to sort object keys
|
|
33
|
+
* @param obj
|
|
34
|
+
* @returns
|
|
35
|
+
*/
|
|
37
36
|
static sortObjectKeys(obj) {
|
|
38
37
|
const sorted = {};
|
|
39
38
|
Object.keys(obj)
|
|
@@ -110,14 +109,19 @@ export default class Utils {
|
|
|
110
109
|
static vmlinuz() {
|
|
111
110
|
let distro = new Distro();
|
|
112
111
|
let vmlinuz = '';
|
|
113
|
-
// patch per raspberry arm64
|
|
114
112
|
// find vmlinuz in /proc/cmdline
|
|
115
113
|
const cmdline = fs.readFileSync('/proc/cmdline', 'utf8').split(" ");
|
|
116
114
|
cmdline.forEach(cmd => {
|
|
117
115
|
if (cmd.includes('BOOT_IMAGE')) {
|
|
118
116
|
vmlinuz = cmd.substring(cmd.indexOf('=') + 1);
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
// patch per fedora BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.9.9-200.fc40.x86_64
|
|
118
|
+
if (vmlinuz.includes(")")) {
|
|
119
|
+
vmlinuz = cmd.substring(cmd.indexOf(')') + 1);
|
|
120
|
+
}
|
|
121
|
+
if (!fs.existsSync(vmlinuz)) {
|
|
122
|
+
if (fs.existsSync(`/boot/${vmlinuz}`)) {
|
|
123
|
+
vmlinuz = `/boot/${vmlinuz}`;
|
|
124
|
+
}
|
|
121
125
|
}
|
|
122
126
|
}
|
|
123
127
|
});
|
|
@@ -172,6 +176,7 @@ export default class Utils {
|
|
|
172
176
|
* ricava path per initrdImg
|
|
173
177
|
*/
|
|
174
178
|
static initrdImg() {
|
|
179
|
+
let separator = "-";
|
|
175
180
|
const vmlinuz = Utils.vmlinuz();
|
|
176
181
|
const path = vmlinuz.substring(0, vmlinuz.lastIndexOf('/')) + '/';
|
|
177
182
|
let initrd = 'initrd.img';
|
|
@@ -185,10 +190,16 @@ export default class Utils {
|
|
|
185
190
|
initrd = 'initramfs';
|
|
186
191
|
suffix = '.img';
|
|
187
192
|
}
|
|
193
|
+
else if (distro.familyId === 'alpine') {
|
|
194
|
+
initrd = 'initramfs';
|
|
195
|
+
separator = '-';
|
|
196
|
+
version = 'lts';
|
|
197
|
+
suffix = '';
|
|
198
|
+
}
|
|
188
199
|
if (distro.distroId === 'Manjaro') {
|
|
189
200
|
version = vmlinuz.substring(vmlinuz.indexOf('-') + 1);
|
|
190
201
|
}
|
|
191
|
-
initrd = path + initrd +
|
|
202
|
+
initrd = path + initrd + separator + version + suffix;
|
|
192
203
|
return initrd;
|
|
193
204
|
}
|
|
194
205
|
/**
|
|
Binary file
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
7
|
</head>
|
|
8
8
|
<body>
|
|
9
|
-
<h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.
|
|
9
|
+
<h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.20</h1>
|
|
10
10
|
<h1>SYNOPSIS</h1>
|
|
11
11
|
<p>Install Debian families (debian/devuan/ubuntu)</p>
|
|
12
|
-
<pre><code>$ sudo dpkg -i penguins-eggs_10.0.
|
|
12
|
+
<pre><code>$ sudo dpkg -i penguins-eggs_10.0.20-1_i386.deb
|
|
13
13
|
</code></pre>
|
|
14
14
|
<p>Install Arch families (Arch, manjaro Linux)</p>
|
|
15
15
|
<p>Arch from AUR</p>
|
|
@@ -30,7 +30,7 @@ $ makepkg -si
|
|
|
30
30
|
<h1>USAGE</h1>
|
|
31
31
|
<pre><code>$ eggs (-v|--version|version)
|
|
32
32
|
|
|
33
|
-
penguins-eggs/10.0.
|
|
33
|
+
penguins-eggs/10.0.20
|
|
34
34
|
$ eggs --help [COMMAND]
|
|
35
35
|
|
|
36
36
|
USAGE
|
package/mkinitcpio/README.md
CHANGED
package/package.json
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"shortName": "eggs",
|
|
4
4
|
"description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
|
|
5
|
-
"version": "10.0.
|
|
5
|
+
"version": "10.0.20",
|
|
6
6
|
"author": "Piero Proietti",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eggs": "./bin/run.js"
|
|
9
9
|
},
|
|
10
10
|
"bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@oclif/core": "^4.0.
|
|
13
|
-
"@oclif/plugin-autocomplete": "^3.1.
|
|
14
|
-
"@oclif/plugin-help": "^6.2.
|
|
15
|
-
"@oclif/plugin-version": "^2.2.
|
|
12
|
+
"@oclif/core": "^4.0.13",
|
|
13
|
+
"@oclif/plugin-autocomplete": "^3.1.8",
|
|
14
|
+
"@oclif/plugin-help": "^6.2.6",
|
|
15
|
+
"@oclif/plugin-version": "^2.2.8",
|
|
16
16
|
"axios": "^1.7.2",
|
|
17
17
|
"chalk": "^5.3.0",
|
|
18
18
|
"cli-cursor": "^4.0.0",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@oclif/prettier-config": "^0.2.1",
|
|
33
|
-
"@oclif/test": "^4.0.
|
|
33
|
+
"@oclif/test": "^4.0.5",
|
|
34
34
|
"@types/chai": "^4.3.16",
|
|
35
35
|
"@types/inquirer": "^9.0.7",
|
|
36
36
|
"@types/js-yaml": "^4.0.9",
|
|
37
37
|
"@types/mocha": "^10.0.6",
|
|
38
38
|
"@types/mustache": "^4.2.5",
|
|
39
39
|
"@types/netmask": "^2.0.5",
|
|
40
|
-
"@types/node": "^20.14.
|
|
40
|
+
"@types/node": "^20.14.11",
|
|
41
41
|
"@types/node-static": "^0.7.11",
|
|
42
42
|
"@types/react": "^18.3.3",
|
|
43
43
|
"@types/shelljs": "^0.8.15",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"eslint-config-oclif": "^5.2.0",
|
|
47
47
|
"eslint-config-oclif-typescript": "^3.1.8",
|
|
48
48
|
"eslint-config-prettier": "^9.1.0",
|
|
49
|
-
"mocha": "^10.
|
|
50
|
-
"oclif": "^4.
|
|
51
|
-
"perrisbrewery": "^10",
|
|
52
|
-
"prettier": "^3.3.
|
|
49
|
+
"mocha": "^10.6.0",
|
|
50
|
+
"oclif": "^4.14.8",
|
|
51
|
+
"perrisbrewery": "^10.0.1",
|
|
52
|
+
"prettier": "^3.3.3",
|
|
53
53
|
"shx": "^0.3.4",
|
|
54
54
|
"ts-node": "^10.9.2",
|
|
55
|
-
"typescript": "^5.5.
|
|
55
|
+
"typescript": "^5.5.3"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=16.0.0"
|
package/scripts/_eggs
CHANGED
|
@@ -323,7 +323,6 @@ _arguments -S \
|
|
|
323
323
|
--theme"[theme for livecd, calamares branding and partitions]:file:_files" \
|
|
324
324
|
"(-u --unsecure)"{-u,--unsecure}"[/root contents are included on live]" \
|
|
325
325
|
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
326
|
-
"(-U --udf)"{-U,--udf}"[use UDF format on ISO with genisoimage breacking 4.7 G limit]" \
|
|
327
326
|
"(-y --yolk)"{-y,--yolk}"[force yolk renew]" \
|
|
328
327
|
--help"[Show help for command]" \
|
|
329
328
|
"*: :_files" ;;
|
package/scripts/eggs.bash
CHANGED
|
@@ -23,7 +23,7 @@ install --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive -
|
|
|
23
23
|
krill --btrfs --chroot --crypted --domain --halt --help --ip --nointeractive --none --pve --random --small --suspend --unattended --verbose
|
|
24
24
|
kill --help --isos --nointeractive --verbose
|
|
25
25
|
mom --help
|
|
26
|
-
produce --addons --basename --clone --cryptedclone --excludes --help --links --max --noicon --nointeractive --pendrive --prefix --release --script --standard --theme --unsecure --verbose --
|
|
26
|
+
produce --addons --basename --clone --cryptedclone --excludes --help --links --max --noicon --nointeractive --pendrive --prefix --release --script --standard --theme --unsecure --verbose --yolk
|
|
27
27
|
status --help --verbose
|
|
28
28
|
syncfrom --delete --file --help --rootdir --verbose
|
|
29
29
|
syncto --excludes --file --help --verbose
|