penguins-eggs 10.0.21 → 10.0.24
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 +33 -29
- package/addons/eggs/theme/livecd/grub.main.cfg +11 -5
- package/addons/eggs/theme/livecd/isolinux.main.cfg +10 -12
- package/conf/derivatives.yaml +1 -0
- package/conf/distros/alpine/README.md +3 -0
- package/conf/distros/devel/README.md +3 -0
- package/conf/distros/focal/README.md +3 -0
- package/conf/distros/jammy/README.md +1 -1
- package/conf/distros/noble/calamares/calamares-modules/.keepit +0 -0
- package/conf/distros/noble/calamares/modules/_automirror.yml +6 -0
- package/conf/distros/noble/calamares/modules/_before_bootloader_context.yml +18 -0
- package/conf/distros/noble/calamares/modules/_oemid.yml +2 -0
- package/conf/distros/noble/calamares/modules/_pkgselect_context.yml +19 -0
- package/conf/distros/noble/calamares/modules/_pkgselect_snap_context.yml +9 -0
- package/conf/distros/noble/calamares/modules/_users.conf.oem +30 -0
- package/conf/distros/{focal/calamares/modules → noble/calamares/modules/focal-jammy}/fstab.yml +2 -2
- package/conf/distros/{focal/calamares/modules → noble/calamares/modules/focal-jammy}/mount.yml +2 -2
- package/conf/distros/{focal/calamares/modules → noble/calamares/modules/focal-jammy}/users.yml +2 -2
- package/conf/distros/{devel → noble}/calamares/modules/mount.yml +1 -0
- package/conf/distros/{devel/calamares/modules/_packages.yml → noble/calamares/modules/packages.yml} +1 -0
- package/conf/distros/noble/calamares/modules/partition.yml +21 -0
- package/conf/distros/noble/calamares/modules/shellprocess_fixconkeys_part1.yml +5 -0
- package/conf/distros/noble/calamares/modules/shellprocess_fixconkeys_part2.yml +5 -0
- package/conf/distros/noble/calamares/modules/shellprocess_oemprep.yml +5 -0
- package/conf/distros/noble/calamares/modules/umount.yml +4 -0
- package/conf/distros/{devel → noble}/calamares/modules/users.yml +3 -3
- package/conf/distros/{devel → noble}/calamares/modules/welcome.yml +3 -1
- package/conf/distros/noble/calamares/settings.yml +87 -0
- package/dist/classes/distro.js +4 -3
- package/dist/classes/incubation/distros/{focal.d.ts → noble.d.ts} +1 -1
- package/dist/classes/incubation/distros/{focal.js → noble.js} +1 -1
- package/dist/classes/incubation/incubator.js +14 -5
- package/dist/classes/keyboards.d.ts +1 -1
- package/dist/classes/keyboards.js +1 -1
- package/dist/classes/locales.js +9 -2
- package/dist/classes/ovary.js +19 -18
- package/dist/classes/pacman.js +27 -21
- package/dist/classes/utils.d.ts +1 -0
- package/dist/classes/utils.js +44 -7
- package/dist/classes/xdg.js +0 -3
- package/dist/components/information.js +5 -2
- package/dist/krill/modules/add-user.js +10 -6
- package/dist/krill/modules/machine-id.js +9 -1
- package/dist/krill/sequence.js +21 -17
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +587 -3
- package/package.json +7 -7
- package/conf/distros/devel/calamares/calamares-modules/automirror/automirror.yml +0 -17
- package/conf/distros/devel/calamares/calamares-modules/automirror/main.py +0 -168
- package/conf/distros/devel/calamares/calamares-modules/automirror/module.yml +0 -7
- package/conf/distros/devel/calamares/modules/after_bootloader_context.yml +0 -18
- package/conf/distros/devel/calamares/modules/automirror.yml +0 -16
- package/conf/distros/devel/calamares/modules/before_bootloader_context.yml +0 -24
- package/conf/distros/devel/calamares/modules/partition.yml +0 -8
- package/conf/distros/devel/calamares/settings.yml +0 -72
- package/conf/distros/focal/calamares/calamares-modules/automirror/automirror.yml +0 -17
- package/conf/distros/focal/calamares/calamares-modules/automirror/main.py +0 -168
- package/conf/distros/focal/calamares/calamares-modules/automirror/module.yml +0 -7
- package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +0 -19
- package/conf/distros/focal/calamares/modules/automirror.yml +0 -6
- package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +0 -19
- package/conf/distros/focal/calamares/modules/before_bootloader_mkdirs_context.yml +0 -11
- package/conf/distros/focal/calamares/modules/bootloader.yml +0 -34
- package/conf/distros/focal/calamares/modules/finished.yml +0 -4
- package/conf/distros/focal/calamares/modules/grubcfg.yml +0 -5
- package/conf/distros/focal/calamares/modules/locale.yml +0 -9
- package/conf/distros/focal/calamares/modules/machineid.yml +0 -9
- package/conf/distros/focal/calamares/modules/partition.yml +0 -10
- package/conf/distros/focal/calamares/modules/shellprocess_add386arch.yml +0 -6
- package/conf/distros/focal/calamares/modules/shellprocess_bug-LP#1829805.yml +0 -5
- package/conf/distros/focal/calamares/modules/shellprocess_logs.yml +0 -6
- package/conf/distros/focal/calamares/modules/unpackfs.yml +0 -7
- package/conf/distros/focal/calamares/modules/welcome.yml +0 -26
- package/conf/distros/focal/calamares/settings.yml +0 -72
- /package/conf/distros/{devel/calamares/modules/before_bootloader_mkdirs_context.yml → noble/calamares/modules/_before_bootloader_mkdirs_context.yml} +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/_displaymanager.yml +0 -0
- /package/conf/distros/{devel/calamares/modules/shellprocess_logs.yml → noble/calamares/modules/_shellprocess_logs.yml} +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/bootloader.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/finished.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/fstab.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/grubcfg.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/locale.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/machineid.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/shellprocess_add386arch.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/shellprocess_bug-LP#1829805.yml +0 -0
- /package/conf/distros/{devel → noble}/calamares/modules/unpackfs.yml +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Ubuntu 24.04 noble
|
|
2
|
+
---
|
|
3
|
+
modules-search: [ local ]
|
|
4
|
+
|
|
5
|
+
instances:
|
|
6
|
+
#- id: before_bootloader_mkdirs
|
|
7
|
+
# module: contextualprocess
|
|
8
|
+
# config: before_bootloader_mkdirs_context.conf
|
|
9
|
+
#- id: before_bootloader
|
|
10
|
+
# module: contextualprocess
|
|
11
|
+
# config: before_bootloader_context.conf
|
|
12
|
+
#- id: logs
|
|
13
|
+
# module: shellprocess
|
|
14
|
+
# config: shellprocess_logs.conf
|
|
15
|
+
- id: bug-LP#1829805
|
|
16
|
+
module: shellprocess
|
|
17
|
+
config: shellprocess_bug-LP#1829805.conf
|
|
18
|
+
- id: add386arch
|
|
19
|
+
module: shellprocess
|
|
20
|
+
config: shellprocess_add386arch.conf
|
|
21
|
+
#- id: pkgselect_action
|
|
22
|
+
# module: contextualprocess
|
|
23
|
+
# config: pkgselect_context.conf
|
|
24
|
+
#- id: pkgselect_snap_action
|
|
25
|
+
# module: contextualprocess
|
|
26
|
+
# config: pkgselect_snap_context.conf
|
|
27
|
+
- id: oemprep
|
|
28
|
+
module: shellprocess
|
|
29
|
+
config: shellprocess_oemprep.conf
|
|
30
|
+
- id: fixconkeys_part1
|
|
31
|
+
module: shellprocess
|
|
32
|
+
config: shellprocess_fixconkeys_part1.conf
|
|
33
|
+
- id: fixconkeys_part2
|
|
34
|
+
module: shellprocess
|
|
35
|
+
config: shellprocess_fixconkeys_part2.conf
|
|
36
|
+
|
|
37
|
+
sequence:
|
|
38
|
+
- show:
|
|
39
|
+
- welcome
|
|
40
|
+
- locale
|
|
41
|
+
- keyboard
|
|
42
|
+
# pkgselect
|
|
43
|
+
- partition
|
|
44
|
+
{{createUsers}}users
|
|
45
|
+
- summary
|
|
46
|
+
- exec:
|
|
47
|
+
- partition
|
|
48
|
+
- mount
|
|
49
|
+
- unpackfs
|
|
50
|
+
{{hasSystemd}}machineid
|
|
51
|
+
- fstab
|
|
52
|
+
- locale
|
|
53
|
+
- keyboard
|
|
54
|
+
- localecfg
|
|
55
|
+
- luksbootkeyfile
|
|
56
|
+
{{createUsers}}users
|
|
57
|
+
{{hasDisplaymanager}}displaymanager
|
|
58
|
+
- networkcfg
|
|
59
|
+
- hwclock
|
|
60
|
+
#- contextualprocess@before_bootloader_mkdirs
|
|
61
|
+
- shellprocess@bug-LP#1829805
|
|
62
|
+
- initramfscfg
|
|
63
|
+
- initramfs
|
|
64
|
+
- grubcfg
|
|
65
|
+
#- contextualprocess@before_bootloader
|
|
66
|
+
- bootloader
|
|
67
|
+
# automirror
|
|
68
|
+
- shellprocess@add386arch
|
|
69
|
+
- shellprocess@fixconkeys_part1
|
|
70
|
+
- shellprocess@fixconkeys_part2
|
|
71
|
+
- packages
|
|
72
|
+
- removeuser
|
|
73
|
+
# contextualprocess@pkgselect_action
|
|
74
|
+
# contextualprocess@pkgselect_snap_action
|
|
75
|
+
# shellprocess@logs
|
|
76
|
+
- cleanup
|
|
77
|
+
- sources-yolk-undo
|
|
78
|
+
- umount
|
|
79
|
+
- show:
|
|
80
|
+
- finished
|
|
81
|
+
|
|
82
|
+
branding: {{branding}}
|
|
83
|
+
prompt-install: true
|
|
84
|
+
dont-chroot: false
|
|
85
|
+
oem-setup: false
|
|
86
|
+
disable-cancel: false
|
|
87
|
+
disable-cancel-during-exec: false
|
package/dist/classes/distro.js
CHANGED
|
@@ -108,8 +108,9 @@ class Distro {
|
|
|
108
108
|
this.familyId = 'alpine';
|
|
109
109
|
this.distroLike = 'Alpine';
|
|
110
110
|
this.codenameId = 'rolling'; // questo viene rimosso dal nome
|
|
111
|
-
this.codenameLikeId = 'alpine
|
|
112
|
-
this.liveMediumPath = '
|
|
111
|
+
this.codenameLikeId = 'alpine'; // prende alpine come codebaneLikeId
|
|
112
|
+
this.liveMediumPath = '/mnt/'; // Qua è deciso da noi
|
|
113
|
+
//this.liveMediumPath = '/run/live/medium/'
|
|
113
114
|
this.squashfs = `live/filesystem.squashfs`;
|
|
114
115
|
this.syslinuxPath = '/usr/share/syslinux/'; //correct
|
|
115
116
|
this.pxelinuxPath = this.syslinuxPath;
|
|
@@ -117,7 +118,7 @@ class Distro {
|
|
|
117
118
|
this.memdiskPath = this.syslinuxPath;
|
|
118
119
|
this.isolinuxPath = this.syslinuxPath;
|
|
119
120
|
// At the moment
|
|
120
|
-
this.isCalamaresAvailable =
|
|
121
|
+
this.isCalamaresAvailable = true;
|
|
121
122
|
}
|
|
122
123
|
else if (this.distroId === 'Fedora') {
|
|
123
124
|
this.familyId = 'fedora';
|
|
@@ -14,7 +14,7 @@ import Pacman from '../pacman.js';
|
|
|
14
14
|
import Utils from '../utils.js';
|
|
15
15
|
import { Bionic } from './distros/bionic.js';
|
|
16
16
|
import { Buster } from './distros/buster.js';
|
|
17
|
-
import {
|
|
17
|
+
import { Noble } from './distros/noble.js';
|
|
18
18
|
import { Jessie } from './distros/jessie.js';
|
|
19
19
|
import { Rolling } from './distros/rolling.js';
|
|
20
20
|
import { installer } from './installer.js';
|
|
@@ -119,22 +119,22 @@ export default class Incubator {
|
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
121
|
case 'focal': {
|
|
122
|
-
const focal = new
|
|
122
|
+
const focal = new Noble(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
|
|
123
123
|
await focal.create();
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
126
|
case 'jammy': {
|
|
127
|
-
const jammy = new
|
|
127
|
+
const jammy = new Noble(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
|
|
128
128
|
await jammy.create();
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
131
|
case 'noble': {
|
|
132
|
-
const noble = new
|
|
132
|
+
const noble = new Noble(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
|
|
133
133
|
await noble.create();
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
136
136
|
case 'devel': {
|
|
137
|
-
const devel = new
|
|
137
|
+
const devel = new Noble(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
|
|
138
138
|
await devel.create();
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
@@ -146,6 +146,15 @@ export default class Incubator {
|
|
|
146
146
|
await rolling.create();
|
|
147
147
|
break;
|
|
148
148
|
}
|
|
149
|
+
/**
|
|
150
|
+
* Alpine
|
|
151
|
+
*/
|
|
152
|
+
case 'alpine': {
|
|
153
|
+
// actually take Buster
|
|
154
|
+
const alpine = new Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
|
|
155
|
+
await alpine.create();
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
149
158
|
}
|
|
150
159
|
if (Pacman.calamaresExists()) {
|
|
151
160
|
partitionCustomize();
|
package/dist/classes/locales.js
CHANGED
|
@@ -28,9 +28,13 @@ export default class Locales {
|
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
30
|
async getEnabled() {
|
|
31
|
+
const distro = new Distro();
|
|
32
|
+
let cmd = 'localectl list-locales';
|
|
33
|
+
if (distro.familyId === 'alpine') {
|
|
34
|
+
cmd = 'locale -a';
|
|
35
|
+
}
|
|
31
36
|
// Restituisce i locales abilitati in Debian, per manjaro quelli presenti
|
|
32
37
|
// in /etc/locale.gen anche se #disabilitati
|
|
33
|
-
const cmd = 'localectl list-locales';
|
|
34
38
|
const enabledLocales = [];
|
|
35
39
|
const result = await exec(cmd, { capture: true, echo: false, ignore: false });
|
|
36
40
|
if (result.code === 0) {
|
|
@@ -47,7 +51,10 @@ export default class Locales {
|
|
|
47
51
|
async getSupported() {
|
|
48
52
|
const distro = new Distro();
|
|
49
53
|
let supporteds = [];
|
|
50
|
-
if (distro.familyId === '
|
|
54
|
+
if (distro.familyId === 'alpine') {
|
|
55
|
+
supporteds = await this.getEnabled();
|
|
56
|
+
}
|
|
57
|
+
else if (distro.familyId === 'debian') {
|
|
51
58
|
supporteds = fs.readFileSync('/usr/share/i18n/SUPPORTED', 'utf8').split('\n');
|
|
52
59
|
}
|
|
53
60
|
else if (distro.familyId === 'archlinux') {
|
package/dist/classes/ovary.js
CHANGED
|
@@ -198,14 +198,8 @@ 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
|
-
}
|
|
206
201
|
for (let i = 0; i < users.length - 1; i++) {
|
|
207
|
-
|
|
208
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} ${cmdUserDel} ${users[i]}`, this.verbose));
|
|
202
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} deluser ${users[i]}`, this.verbose));
|
|
209
203
|
}
|
|
210
204
|
}
|
|
211
205
|
/**
|
|
@@ -220,14 +214,8 @@ export default class Ovary {
|
|
|
220
214
|
const cmds = [];
|
|
221
215
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' rm /home/' + this.settings.config.user_opt + ' -rf', this.verbose));
|
|
222
216
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
}
|
|
217
|
+
// Create user using useradd
|
|
218
|
+
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));
|
|
231
219
|
// live password
|
|
232
220
|
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
221
|
// root password
|
|
@@ -238,6 +226,14 @@ export default class Ovary {
|
|
|
238
226
|
if (this.familyId === 'debian') {
|
|
239
227
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
|
|
240
228
|
}
|
|
229
|
+
else if (this.familyId === 'alpine') {
|
|
230
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG cdrom ${this.settings.config.user_opt}`, this.verbose));
|
|
231
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG games ${this.settings.config.user_opt}`, this.verbose));
|
|
232
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG input ${this.settings.config.user_opt}`, this.verbose));
|
|
233
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG users ${this.settings.config.user_opt}`, this.verbose));
|
|
234
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG video ${this.settings.config.user_opt}`, this.verbose));
|
|
235
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
|
|
236
|
+
}
|
|
241
237
|
else if (this.familyId === 'archlinux') {
|
|
242
238
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
|
|
243
239
|
// check or create group: autologin
|
|
@@ -715,15 +711,20 @@ export default class Ovary {
|
|
|
715
711
|
// mkinitfs
|
|
716
712
|
const pathConf = path.resolve(__dirname, `../../mkinitfs/live.conf`);
|
|
717
713
|
await exec(`mkinitfs -c ${pathConf} -o ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
|
|
718
|
-
const
|
|
719
|
-
await exec(`cp ${
|
|
714
|
+
const sidecars = path.resolve(__dirname, `../../mkinitfs/*.sh`);
|
|
715
|
+
await exec(`cp ${sidecars} ${this.settings.iso_work}live/`);
|
|
720
716
|
}
|
|
721
717
|
/**
|
|
722
718
|
* initrdFedora()
|
|
723
719
|
*/
|
|
724
720
|
async initrdFedora() {
|
|
725
721
|
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
|
|
726
|
-
|
|
722
|
+
// dracut
|
|
723
|
+
const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
|
|
724
|
+
const initrdImg = `initramfs-${kernelVersion}`;
|
|
725
|
+
const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`);
|
|
726
|
+
await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
|
|
727
|
+
//await exec(`cp /boot/initramfs-*.img ${this.settings.iso_work}/live/`, this.echo)
|
|
727
728
|
}
|
|
728
729
|
/**
|
|
729
730
|
* initrdSuse()
|
package/dist/classes/pacman.js
CHANGED
|
@@ -359,8 +359,8 @@ export default class Pacman {
|
|
|
359
359
|
}
|
|
360
360
|
else if (this.distro().codenameLikeId === 'bionic') {
|
|
361
361
|
const dest = '/etc/penguins-eggs.d/distros/bionic';
|
|
362
|
-
const bionic = `${rootPen}/conf/distros/bionic
|
|
363
|
-
await exec(`cp -r ${bionic} ${dest}`, echo);
|
|
362
|
+
const bionic = `${rootPen}/conf/distros/bionic`;
|
|
363
|
+
await exec(`cp -r ${bionic}/* ${dest}`, echo);
|
|
364
364
|
// Poi da buster
|
|
365
365
|
await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
366
366
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
@@ -370,13 +370,15 @@ export default class Pacman {
|
|
|
370
370
|
await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
371
371
|
await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
372
372
|
/**
|
|
373
|
-
* Ubuntu focal: eredita da
|
|
373
|
+
* Ubuntu focal: eredita da noble e buster
|
|
374
374
|
*/
|
|
375
375
|
}
|
|
376
376
|
else if (this.distro().codenameLikeId === 'focal') {
|
|
377
377
|
const dest = '/etc/penguins-eggs.d/distros/focal';
|
|
378
|
-
const
|
|
379
|
-
await exec(`cp -r ${
|
|
378
|
+
const noble = `${rootPen}/conf/distros/noble`;
|
|
379
|
+
await exec(`cp -r ${noble}/* ${dest}`, echo);
|
|
380
|
+
// backport per focal e jammy: fstab, mount, users
|
|
381
|
+
await exec(`cp ${noble}/calamares/modules/focal-jammy/* ${dest}/calamares/modules/`, echo);
|
|
380
382
|
await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
381
383
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
382
384
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
@@ -385,13 +387,15 @@ export default class Pacman {
|
|
|
385
387
|
await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
386
388
|
await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
387
389
|
/**
|
|
388
|
-
* Ubuntu 22.04 jammy: eredita da
|
|
390
|
+
* Ubuntu 22.04 jammy: eredita da noble e buster
|
|
389
391
|
*/
|
|
390
392
|
}
|
|
391
393
|
else if (this.distro().codenameLikeId === 'jammy') {
|
|
392
394
|
const dest = '/etc/penguins-eggs.d/distros/jammy';
|
|
393
|
-
const
|
|
394
|
-
await exec(`cp -r ${
|
|
395
|
+
const noble = `${rootPen}/conf/distros/noble`;
|
|
396
|
+
await exec(`cp -r ${noble}/* ${dest}`, echo);
|
|
397
|
+
// backport per focal e jammy: fstab, mount, users
|
|
398
|
+
await exec(`cp ${noble}/calamares/modules/focal-jammy/* ${dest}/calamares/modules/`, echo);
|
|
395
399
|
await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
396
400
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
397
401
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
@@ -400,14 +404,14 @@ export default class Pacman {
|
|
|
400
404
|
await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
401
405
|
await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
402
406
|
/**
|
|
403
|
-
* Ubuntu noble:
|
|
407
|
+
* Ubuntu noble: e la nuova baseline per ubuntu
|
|
404
408
|
*
|
|
405
409
|
*/
|
|
406
410
|
}
|
|
407
411
|
else if (this.distro().codenameLikeId === 'noble') {
|
|
408
412
|
const dest = '/etc/penguins-eggs.d/distros/noble';
|
|
409
|
-
const
|
|
410
|
-
await exec(`cp -r ${
|
|
413
|
+
const noble = `${rootPen}/conf/distros/noble`;
|
|
414
|
+
await exec(`cp -r ${noble}/* ${dest}`, echo);
|
|
411
415
|
await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
412
416
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
413
417
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
@@ -416,14 +420,14 @@ export default class Pacman {
|
|
|
416
420
|
await exec(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
417
421
|
await exec(`cp -r ${buster}/calamares/modules/displaymanager.yml ${dest}/calamares/modules/displaymanager.yml`, echo);
|
|
418
422
|
/**
|
|
419
|
-
* Ubuntu rhino: eredita da
|
|
423
|
+
* Ubuntu rhino: eredita da noble e buster
|
|
420
424
|
*
|
|
421
425
|
*/
|
|
422
426
|
}
|
|
423
427
|
else if (this.distro().codenameLikeId === 'devel') {
|
|
424
428
|
const dest = '/etc/penguins-eggs.d/distros/devel';
|
|
425
|
-
const
|
|
426
|
-
await exec(`cp -r ${
|
|
429
|
+
const noble = `${rootPen}/conf/distros/noble`;
|
|
430
|
+
await exec(`cp -r ${noble}/* ${dest}`, echo);
|
|
427
431
|
await exec(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
428
432
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
429
433
|
await exec(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
@@ -457,10 +461,10 @@ export default class Pacman {
|
|
|
457
461
|
* Alpine
|
|
458
462
|
**********************************************************************************/
|
|
459
463
|
}
|
|
460
|
-
else if (this.distro().codenameLikeId === 'alpine
|
|
461
|
-
|
|
462
|
-
const
|
|
463
|
-
await exec(`cp -r ${
|
|
464
|
+
else if (this.distro().codenameLikeId === 'alpine') {
|
|
465
|
+
// Prende tutto da buster
|
|
466
|
+
const dest = '/etc/penguins-eggs.d/distros/alpine/';
|
|
467
|
+
await exec(`cp -r ${buster}/calamares ${dest}/calamares`, echo);
|
|
464
468
|
}
|
|
465
469
|
}
|
|
466
470
|
/**
|
|
@@ -528,8 +532,10 @@ export default class Pacman {
|
|
|
528
532
|
installed = true;
|
|
529
533
|
}
|
|
530
534
|
}
|
|
531
|
-
else if (this.distro().familyId === 'alpine'
|
|
532
|
-
|
|
535
|
+
else if (this.distro().familyId === 'alpine') {
|
|
536
|
+
if (Alpine.packageIsInstalled('xorg-server')) {
|
|
537
|
+
installed = true;
|
|
538
|
+
}
|
|
533
539
|
}
|
|
534
540
|
return installed;
|
|
535
541
|
}
|
|
@@ -688,7 +694,7 @@ export default class Pacman {
|
|
|
688
694
|
}
|
|
689
695
|
}
|
|
690
696
|
else if (this.distro().familyId === 'alpine') {
|
|
691
|
-
grubInstalled = '
|
|
697
|
+
grubInstalled = 'grub';
|
|
692
698
|
}
|
|
693
699
|
return grubInstalled;
|
|
694
700
|
}
|
package/dist/classes/utils.d.ts
CHANGED
package/dist/classes/utils.js
CHANGED
|
@@ -14,8 +14,6 @@ import inquirer from 'inquirer';
|
|
|
14
14
|
import chalk from 'chalk';
|
|
15
15
|
import { spawnSync } from 'child_process';
|
|
16
16
|
import { Netmask } from 'netmask';
|
|
17
|
-
// libraries
|
|
18
|
-
import { exec } from '../lib/utils.js';
|
|
19
17
|
import Distro from './distro.js';
|
|
20
18
|
// pjson
|
|
21
19
|
import { createRequire } from 'module';
|
|
@@ -99,6 +97,14 @@ export default class Utils {
|
|
|
99
97
|
shx.exec(`rm ${checkFile}`);
|
|
100
98
|
return isSysvinit;
|
|
101
99
|
}
|
|
100
|
+
static isOpenRc() {
|
|
101
|
+
let isOpenRc = false;
|
|
102
|
+
let distro = new Distro();
|
|
103
|
+
if (distro.familyId === "alpine") {
|
|
104
|
+
isOpenRc = true;
|
|
105
|
+
}
|
|
106
|
+
return isOpenRc;
|
|
107
|
+
}
|
|
102
108
|
/**
|
|
103
109
|
* ricava path per vmlinuz
|
|
104
110
|
* Normalmente cerca BOOT_IMAGE
|
|
@@ -229,13 +235,43 @@ export default class Utils {
|
|
|
229
235
|
* Return the primary user's name
|
|
230
236
|
*/
|
|
231
237
|
static async getPrimaryUser() {
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
const { execSync } = require('child_process');
|
|
239
|
+
let primaryUser = '';
|
|
240
|
+
try {
|
|
241
|
+
// Attempt to get the user from logname
|
|
242
|
+
primaryUser = execSync('/usr/bin/logname 2>/dev/null', { encoding: 'utf-8' }).trim();
|
|
243
|
+
}
|
|
244
|
+
catch (error) {
|
|
245
|
+
// logname failed, so we continue with other methods
|
|
246
|
+
}
|
|
247
|
+
if (primaryUser === 'root') {
|
|
248
|
+
primaryUser = '';
|
|
249
|
+
}
|
|
250
|
+
if (primaryUser === '') {
|
|
251
|
+
try {
|
|
252
|
+
// Check if doas is installed and get the DOAS_USER
|
|
253
|
+
execSync('command -v doas', { stdio: 'ignore' });
|
|
254
|
+
primaryUser = execSync('echo $DOAS_USER', { encoding: 'utf-8' }).trim();
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
// doas is not installed or DOAS_USER is not set, continue with the next method
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (primaryUser === '') {
|
|
261
|
+
try {
|
|
262
|
+
// Check for the SUDO_USER
|
|
263
|
+
primaryUser = execSync('echo $SUDO_USER', { encoding: 'utf-8' }).trim();
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
// SUDO_USER is not set, continue with the next method
|
|
267
|
+
}
|
|
268
|
+
}
|
|
234
269
|
if (primaryUser === '') {
|
|
235
|
-
|
|
270
|
+
// Fallback to the USER environment variable
|
|
271
|
+
primaryUser = process.env.USER || '';
|
|
236
272
|
}
|
|
237
273
|
if (primaryUser === '') {
|
|
238
|
-
console.
|
|
274
|
+
console.error('Cannot determine the primary user.');
|
|
239
275
|
process.exit(1);
|
|
240
276
|
}
|
|
241
277
|
return primaryUser;
|
|
@@ -568,7 +604,8 @@ export default class Utils {
|
|
|
568
604
|
'/lib/live/mount/rootfs/filesystem.squashfs', // ubuntu bionic
|
|
569
605
|
'/live/aufs', // mx-linux
|
|
570
606
|
'/run/miso/sfs/livefs', // ManjaroLinux
|
|
571
|
-
'/run/archiso/airootfs' // Arch
|
|
607
|
+
'/run/archiso/airootfs', // Arch
|
|
608
|
+
'/media/root-rw' // AlpineLinux
|
|
572
609
|
];
|
|
573
610
|
for (let i = 0; i < paths.length; i++) {
|
|
574
611
|
if (Utils.isMountpoint(paths[i])) {
|
package/dist/classes/xdg.js
CHANGED
|
@@ -51,8 +51,6 @@ export default class Xdg {
|
|
|
51
51
|
const regexDefaultUser = new RegExp(`default_user\\s*${olduser}`, 'g');
|
|
52
52
|
content = content.replace(regexDefaultUser, `default_user ${newuser}`);
|
|
53
53
|
fs.writeFileSync(`${chroot}/etc/${slimConf}`, content, 'utf8');
|
|
54
|
-
// shx.sed('-i', 'auto_login no', 'auto_login yes', `${chroot}/etc/${slimConf}`)
|
|
55
|
-
// shx.sed('-i', `default_user ${olduser}`, `default_user ${newuser}`, `${chroot}/etc/${slimConf}`)
|
|
56
54
|
}
|
|
57
55
|
/**
|
|
58
56
|
* LIGHTDM
|
|
@@ -69,7 +67,6 @@ export default class Xdg {
|
|
|
69
67
|
const regex = new RegExp(`autologin-user\\s*=\\s*${olduser}`, 'g'); // remove spaces
|
|
70
68
|
content = content.replace(regex, `autologin-user=${newuser}`);
|
|
71
69
|
fs.writeFileSync(curFile, content, 'utf8');
|
|
72
|
-
// shx.sed('-i', `autologin-user=${olduser}`, `autologin-user=${newuser}`, curFile)
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
}
|
|
@@ -94,8 +94,11 @@ export default async function information(verbose = false) {
|
|
|
94
94
|
}
|
|
95
95
|
initType = 'systemd';
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
if (initType === 'sysvinit') {
|
|
98
|
+
if (Utils.isOpenRc()) {
|
|
99
|
+
initType = 'openrc';
|
|
100
|
+
}
|
|
101
|
+
}
|
|
99
102
|
const Checks = () => (React.createElement(Box, { borderStyle: "round", marginRight: 2, flexDirection: "row" },
|
|
100
103
|
React.createElement(Box, { marginRight: 2 },
|
|
101
104
|
React.createElement(Text, null,
|
|
@@ -19,22 +19,26 @@ import { exec } from '../../lib/utils.js';
|
|
|
19
19
|
* @param homePhone
|
|
20
20
|
*/
|
|
21
21
|
export default async function addUser(name = 'live', password = 'evolution', fullName = '', roomNumber = '', workPhone = '', homePhone = '') {
|
|
22
|
-
//
|
|
22
|
+
// adduser user
|
|
23
23
|
let cmd = `chroot ${this.installTarget} adduser ${name} --home /home/${name} --shell /bin/bash --disabled-password --gecos "${fullName},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
|
|
24
24
|
if (this.distro.familyId === 'archlinux') {
|
|
25
25
|
cmd = `chroot ${this.installTarget} useradd --create-home --shell /bin/bash ${name} ${this.toNull}`;
|
|
26
26
|
}
|
|
27
27
|
await exec(cmd, this.echo);
|
|
28
|
+
// chapasswd user
|
|
28
29
|
cmd = `echo ${name}:${password} | chroot ${this.installTarget} chpasswd ${this.toNull}`;
|
|
29
30
|
await exec(cmd, this.echo);
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
if (this.distro.familyId === 'archlinux'
|
|
33
|
-
|
|
31
|
+
// sudo ot wheel
|
|
32
|
+
let group = 'sudo';
|
|
33
|
+
if (this.distro.familyId === 'archlinux' ||
|
|
34
|
+
this.distro.familyId === 'alpine') {
|
|
35
|
+
group = 'wheel';
|
|
34
36
|
}
|
|
37
|
+
cmd = `chroot ${this.installTarget} usermod -aG ${group} ${name} ${this.toNull}`;
|
|
38
|
+
await exec(cmd, this.echo);
|
|
39
|
+
// autologin
|
|
35
40
|
try {
|
|
36
41
|
await exec(cmd, this.echo);
|
|
37
|
-
// check or create group: autologin
|
|
38
42
|
if (this.distro.familyId === 'archlinux') {
|
|
39
43
|
await exec(`chroot ${this.installTarget} getent group autologin || groupadd autologin`);
|
|
40
44
|
await exec(`chroot ${this.installTarget} gpasswd -a ${this.settings.config.user_opt} autologin`);
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import fs from 'node:fs';
|
|
10
10
|
import { exec } from '../../lib/utils.js';
|
|
11
|
+
import Distro from '../../classes/distro.js';
|
|
11
12
|
/**
|
|
12
13
|
* On Ubuntu
|
|
13
14
|
* /etc/machine-id must exist to be re-created
|
|
@@ -18,5 +19,12 @@ export default async function machineId() {
|
|
|
18
19
|
if (fs.existsSync(file)) {
|
|
19
20
|
await exec(`rm ${file}`, this.echo);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
const distro = new Distro();
|
|
23
|
+
if (distro.familyId === "alpine") {
|
|
24
|
+
await exec(`dbus-uuidgen > ${this.installTarget}/var/lib/dbus/machine-id`);
|
|
25
|
+
await exec(`cp ${this.installTarget}/var/lib/dbus/machine-id ${this.installTarget}/etc/machine-id`);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
await exec(`touch ${file}`);
|
|
29
|
+
}
|
|
22
30
|
}
|