penguins-eggs 10.0.19 → 10.0.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 +1 -1
- package/README.md +29 -29
- package/addons/README.md +1 -1
- package/dist/classes/bleach.d.ts +0 -5
- package/dist/classes/bleach.js +13 -15
- package/dist/classes/daddy.js +1 -0
- package/dist/classes/distro.js +198 -168
- package/dist/classes/families/fedora.js +2 -4
- package/dist/classes/families/{suse.d.ts → opensuse.d.ts} +1 -1
- package/dist/classes/families/{suse.js → opensuse.js} +3 -4
- package/dist/classes/ovary.d.ts +13 -5
- package/dist/classes/ovary.js +48 -25
- package/dist/classes/utils.d.ts +4 -4
- package/dist/classes/utils.js +12 -8
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +3 -587
- package/mkinitcpio/README.md +1 -1
- package/package.json +9 -9
- 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
- package/scripts/eggs-adapt.sh +0 -5
package/dist/classes/distro.js
CHANGED
|
@@ -102,191 +102,221 @@ class Distro {
|
|
|
102
102
|
this.releaseLike = 'unstable';
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
105
|
+
* Analize distroId
|
|
106
106
|
*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
case 'chimaera': {
|
|
155
|
-
// Devuab 4 chimaera
|
|
156
|
-
this.distroLike = 'Devuan';
|
|
157
|
-
this.codenameLikeId = 'chimaera';
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
case 'daedalus': {
|
|
161
|
-
// Devuan 5 daedalus
|
|
162
|
-
this.distroLike = 'Devuan';
|
|
163
|
-
this.codenameLikeId = 'daedalus';
|
|
164
|
-
break;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Ubuntu LTS + actual
|
|
168
|
-
*/
|
|
169
|
-
case 'bionic': {
|
|
170
|
-
// Ubuntu 18.04 bionic LTS eol aprile 2023
|
|
171
|
-
this.distroLike = 'Ubuntu';
|
|
172
|
-
this.codenameLikeId = 'bionic';
|
|
173
|
-
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
case 'focal': {
|
|
177
|
-
// Ubuntu 20.04 focal LTS
|
|
178
|
-
this.distroLike = 'Ubuntu';
|
|
179
|
-
this.codenameLikeId = 'focal';
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
case 'jammy': {
|
|
183
|
-
// Ubuntu 22.04 jammy LTS
|
|
184
|
-
this.distroLike = 'Ubuntu';
|
|
185
|
-
this.codenameLikeId = 'jammy';
|
|
186
|
-
break;
|
|
187
|
-
}
|
|
188
|
-
case 'noble': {
|
|
189
|
-
// Ubuntu 24.04 noble LTS
|
|
190
|
-
this.distroLike = 'Ubuntu';
|
|
191
|
-
this.codenameLikeId = 'noble';
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
case 'devel': {
|
|
195
|
-
// Ubuntu rhino
|
|
196
|
-
this.distroLike = 'Ubuntu';
|
|
197
|
-
this.codenameLikeId = 'devel';
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
107
|
+
if (this.distroId === 'Alpine') {
|
|
108
|
+
this.familyId = 'alpine';
|
|
109
|
+
this.distroLike = 'Alpine';
|
|
110
|
+
this.codenameId = 'rolling'; // questo viene rimosso dal nome
|
|
111
|
+
this.codenameLikeId = 'alpine-rolling';
|
|
112
|
+
this.liveMediumPath = '/.modloop/'; // ? è il mount della root su cd di installatione
|
|
113
|
+
this.squashfs = `live/filesystem.squashfs`;
|
|
114
|
+
this.syslinuxPath = '/usr/share/syslinux/'; //correct
|
|
115
|
+
this.pxelinuxPath = this.syslinuxPath;
|
|
116
|
+
this.usrLibPath = '/usr/lib/';
|
|
117
|
+
this.memdiskPath = this.syslinuxPath;
|
|
118
|
+
this.isolinuxPath = this.syslinuxPath;
|
|
119
|
+
// At the moment
|
|
120
|
+
this.isCalamaresAvailable = false;
|
|
121
|
+
}
|
|
122
|
+
else if (this.distroId === 'Fedora') {
|
|
123
|
+
this.familyId = 'fedora';
|
|
124
|
+
this.distroLike = 'Fedora';
|
|
125
|
+
this.codenameId = 'rolling';
|
|
126
|
+
this.codenameLikeId = '40';
|
|
127
|
+
this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
|
|
128
|
+
this.squashfs = `live/filesystem.squashfs`;
|
|
129
|
+
this.syslinuxPath = '/usr/share/syslinux/';
|
|
130
|
+
this.pxelinuxPath = this.syslinuxPath;
|
|
131
|
+
this.usrLibPath = '/usr/lib/';
|
|
132
|
+
this.memdiskPath = this.syslinuxPath;
|
|
133
|
+
this.isolinuxPath = this.syslinuxPath;
|
|
134
|
+
// At the moment
|
|
135
|
+
this.isCalamaresAvailable = false;
|
|
136
|
+
}
|
|
137
|
+
else if (this.distroId === 'openSUSE') {
|
|
138
|
+
this.familyId = 'suse';
|
|
139
|
+
this.distroLike = 'openSUSE';
|
|
140
|
+
this.codenameId = 'rolling';
|
|
141
|
+
this.codenameLikeId = 'Tumbleweed';
|
|
142
|
+
this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
|
|
143
|
+
this.squashfs = `live/filesystem.squashfs`;
|
|
144
|
+
this.syslinuxPath = '/usr/share/syslinux/';
|
|
145
|
+
this.pxelinuxPath = this.syslinuxPath;
|
|
146
|
+
this.usrLibPath = '/usr/lib/';
|
|
147
|
+
this.memdiskPath = this.syslinuxPath;
|
|
148
|
+
this.isolinuxPath = this.syslinuxPath;
|
|
149
|
+
// At the moment
|
|
150
|
+
this.isCalamaresAvailable = false;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
200
153
|
/**
|
|
201
|
-
* Arch
|
|
154
|
+
* Arch/Debian/Devuan/Manjaro and Ubuntu
|
|
202
155
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
this.
|
|
209
|
-
this.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
156
|
+
switch (this.codenameId) {
|
|
157
|
+
case 'jessie': {
|
|
158
|
+
// Debian 8 jessie
|
|
159
|
+
this.distroLike = 'Debian';
|
|
160
|
+
this.codenameLikeId = 'jessie';
|
|
161
|
+
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
162
|
+
this.isCalamaresAvailable = false;
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
case 'stretch': {
|
|
166
|
+
// Debian 9 stretch
|
|
167
|
+
this.distroLike = 'Debian';
|
|
168
|
+
this.codenameLikeId = 'stretch';
|
|
169
|
+
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
170
|
+
this.isCalamaresAvailable = false;
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
case 'buster': {
|
|
174
|
+
// Debian 10 buster
|
|
175
|
+
this.distroLike = 'Debian';
|
|
176
|
+
this.codenameLikeId = 'buster';
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case 'bullseye': {
|
|
180
|
+
// Debian 11 bullseye
|
|
181
|
+
this.distroLike = 'Debian';
|
|
182
|
+
this.codenameLikeId = 'bullseye';
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
case 'bookworm': {
|
|
186
|
+
// Debian 12 bookworm
|
|
187
|
+
this.distroLike = 'Debian';
|
|
188
|
+
this.codenameLikeId = 'bookworm';
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case 'trixie': {
|
|
192
|
+
// Debian 13 trixie
|
|
193
|
+
this.distroLike = 'Debian';
|
|
194
|
+
this.codenameLikeId = 'trixie';
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
case 'beowulf': {
|
|
198
|
+
// Devuab 3 beowulf
|
|
199
|
+
this.distroLike = 'Devuan';
|
|
200
|
+
this.codenameLikeId = 'beowulf';
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
case 'chimaera': {
|
|
204
|
+
// Devuab 4 chimaera
|
|
205
|
+
this.distroLike = 'Devuan';
|
|
206
|
+
this.codenameLikeId = 'chimaera';
|
|
207
|
+
break;
|
|
214
208
|
}
|
|
215
|
-
|
|
216
|
-
//
|
|
209
|
+
case 'daedalus': {
|
|
210
|
+
// Devuan 5 daedalus
|
|
211
|
+
this.distroLike = 'Devuan';
|
|
212
|
+
this.codenameLikeId = 'daedalus';
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Ubuntu LTS + actual
|
|
217
|
+
*/
|
|
218
|
+
case 'bionic': {
|
|
219
|
+
// Ubuntu 18.04 bionic LTS eol aprile 2023
|
|
220
|
+
this.distroLike = 'Ubuntu';
|
|
221
|
+
this.codenameLikeId = 'bionic';
|
|
222
|
+
this.liveMediumPath = '/lib/live/mount/medium/';
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
case 'focal': {
|
|
226
|
+
// Ubuntu 20.04 focal LTS
|
|
227
|
+
this.distroLike = 'Ubuntu';
|
|
228
|
+
this.codenameLikeId = 'focal';
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
case 'jammy': {
|
|
232
|
+
// Ubuntu 22.04 jammy LTS
|
|
233
|
+
this.distroLike = 'Ubuntu';
|
|
234
|
+
this.codenameLikeId = 'jammy';
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
case 'noble': {
|
|
238
|
+
// Ubuntu 24.04 noble LTS
|
|
239
|
+
this.distroLike = 'Ubuntu';
|
|
240
|
+
this.codenameLikeId = 'noble';
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
case 'devel': {
|
|
244
|
+
// Ubuntu rhino
|
|
245
|
+
this.distroLike = 'Ubuntu';
|
|
246
|
+
this.codenameLikeId = 'devel';
|
|
247
|
+
break;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Arch Linux/Garuda
|
|
251
|
+
*/
|
|
252
|
+
case 'Spizaetus':
|
|
253
|
+
case 'n/a':
|
|
254
|
+
case 'rolling': {
|
|
217
255
|
this.familyId = 'archlinux';
|
|
218
256
|
this.distroLike = 'Arch';
|
|
219
257
|
this.codenameId = 'rolling';
|
|
220
258
|
this.codenameLikeId = 'rolling';
|
|
221
259
|
this.liveMediumPath = '/run/archiso/bootmnt/';
|
|
222
260
|
this.squashfs = `arch/x86_64/airootfs.sfs`;
|
|
261
|
+
break;
|
|
223
262
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
this.familyId = distro.family;
|
|
263
|
+
default: {
|
|
264
|
+
/**
|
|
265
|
+
* patch per Roy VERIFICARE
|
|
266
|
+
*/
|
|
267
|
+
let found = false;
|
|
268
|
+
let file = path.resolve(__dirname, '../../conf/derivatives.yaml');
|
|
269
|
+
if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
|
|
270
|
+
file = '/etc/penguins-eggs.d/derivatives.yaml';
|
|
271
|
+
}
|
|
272
|
+
const content = fs.readFileSync(file, 'utf8');
|
|
273
|
+
const distros = yaml.load(content);
|
|
274
|
+
for (const distro of distros) {
|
|
275
|
+
if (distro.ids !== undefined) {
|
|
276
|
+
for (let n = 0; n < distro.ids.length; n++) {
|
|
277
|
+
if (this.codenameId === distro.ids[n]) {
|
|
278
|
+
found = true;
|
|
279
|
+
this.distroLike = distro.distroLike;
|
|
280
|
+
this.codenameLikeId = distro.id;
|
|
281
|
+
this.familyId = distro.family;
|
|
282
|
+
}
|
|
245
283
|
}
|
|
246
284
|
}
|
|
247
285
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
286
|
+
if (!found) {
|
|
287
|
+
console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
|
|
288
|
+
console.log('');
|
|
289
|
+
console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
|
|
290
|
+
console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
|
|
291
|
+
console.log('If you can create your new iso, you can contribute to the project');
|
|
292
|
+
console.log('by suggesting your modification.');
|
|
293
|
+
process.exit(0);
|
|
294
|
+
}
|
|
257
295
|
}
|
|
258
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* setting paths: syslinux, isolinux, usrLibPath
|
|
299
|
+
*/
|
|
300
|
+
switch (this.familyId) {
|
|
301
|
+
case 'debian': {
|
|
302
|
+
this.isolinuxPath = '/usr/lib/ISOLINUX/';
|
|
303
|
+
this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
|
|
304
|
+
this.pxelinuxPath = '/usr/lib/PXELINUX/';
|
|
305
|
+
this.memdiskPath = '/usr/lib/syslinux/';
|
|
306
|
+
this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
|
|
307
|
+
break;
|
|
308
|
+
}
|
|
309
|
+
case 'archlinux': {
|
|
310
|
+
this.syslinuxPath = '/usr/lib/syslinux/bios/';
|
|
311
|
+
this.pxelinuxPath = this.syslinuxPath;
|
|
312
|
+
this.usrLibPath = '/usr/lib/';
|
|
313
|
+
this.memdiskPath = this.syslinuxPath;
|
|
314
|
+
this.isolinuxPath = this.syslinuxPath;
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
// No default
|
|
318
|
+
} // Fine analisi codenameId
|
|
259
319
|
}
|
|
260
|
-
/**
|
|
261
|
-
* setting paths: syslinux, isolinux, usrLibPath
|
|
262
|
-
*/
|
|
263
|
-
switch (this.familyId) {
|
|
264
|
-
case 'debian': {
|
|
265
|
-
this.isolinuxPath = '/usr/lib/ISOLINUX/';
|
|
266
|
-
this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
|
|
267
|
-
this.pxelinuxPath = '/usr/lib/PXELINUX/';
|
|
268
|
-
this.memdiskPath = '/usr/lib/syslinux/';
|
|
269
|
-
this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
|
|
270
|
-
break;
|
|
271
|
-
}
|
|
272
|
-
case 'archlinux': {
|
|
273
|
-
this.syslinuxPath = '/usr/lib/syslinux/bios/';
|
|
274
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
275
|
-
this.usrLibPath = '/usr/lib/';
|
|
276
|
-
this.memdiskPath = this.syslinuxPath;
|
|
277
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
case 'alpine': {
|
|
281
|
-
this.syslinuxPath = '/usr/share/syslinux/'; //correct
|
|
282
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
283
|
-
this.usrLibPath = '/usr/lib/';
|
|
284
|
-
this.memdiskPath = this.syslinuxPath;
|
|
285
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
286
|
-
break;
|
|
287
|
-
}
|
|
288
|
-
// No default
|
|
289
|
-
} // Fine analisi codenameId
|
|
290
320
|
/**
|
|
291
321
|
* if lsb-release exists
|
|
292
322
|
*/
|
|
@@ -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)) {
|
|
@@ -13,7 +13,7 @@ import Utils from '../utils.js';
|
|
|
13
13
|
* Utils: general porpourse utils
|
|
14
14
|
* @remarks all the utilities
|
|
15
15
|
*/
|
|
16
|
-
export default class
|
|
16
|
+
export default class Opensuse {
|
|
17
17
|
static packs4calamares = ['calamares'];
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
@@ -24,7 +24,7 @@ export default class Suse {
|
|
|
24
24
|
await exec(`zypper install ${this.packs4calamares.join(' ')}`, echo);
|
|
25
25
|
}
|
|
26
26
|
catch {
|
|
27
|
-
Utils.error(`
|
|
27
|
+
Utils.error(`Opensuse.calamaresInstall()`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
@@ -33,9 +33,8 @@ export default class Suse {
|
|
|
33
33
|
static async calamaresPolicies() {
|
|
34
34
|
const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
|
|
35
35
|
/**
|
|
36
|
-
* Su
|
|
36
|
+
* Su openSuse occorre vedere come fare!
|
|
37
37
|
*/
|
|
38
|
-
// await exec(`sed -i 's/auth_admin/yes/' ${policyFile}`)
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
40
|
*
|
package/dist/classes/ovary.d.ts
CHANGED
|
@@ -83,18 +83,26 @@ export default class Ovary {
|
|
|
83
83
|
*/
|
|
84
84
|
finished(scriptOnly?: boolean): void;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
87
|
-
* necessita di echoYes
|
|
86
|
+
* initrdAlpine()
|
|
88
87
|
*/
|
|
89
|
-
|
|
88
|
+
initrdAlpine(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* initrdFedora()
|
|
91
|
+
*/
|
|
92
|
+
initrdFedora(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* initrdSuse()
|
|
95
|
+
*/
|
|
96
|
+
initrdSuse(): Promise<void>;
|
|
90
97
|
/**
|
|
91
98
|
* initrdArch()
|
|
92
99
|
* necessita di echoYes
|
|
93
100
|
*/
|
|
94
|
-
|
|
101
|
+
initrdArch(): Promise<void>;
|
|
95
102
|
/**
|
|
103
|
+
* initrdDebian()
|
|
104
|
+
* Actually based on live* packages
|
|
96
105
|
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
97
|
-
* @returns
|
|
98
106
|
*/
|
|
99
107
|
initrdDebian(verbose?: boolean): Promise<void>;
|
|
100
108
|
/**
|
package/dist/classes/ovary.js
CHANGED
|
@@ -703,15 +703,43 @@ export default class Ovary {
|
|
|
703
703
|
console.log(`Note: format UDF, generated by ${chalk.cyanBright('genisoimage')}`);
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
+
/**
|
|
707
|
+
* initrdAlpine()
|
|
708
|
+
*/
|
|
709
|
+
async initrdAlpine() {
|
|
710
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Alpine on ISO/live`);
|
|
711
|
+
let initrdImg = 'initramfs-lts';
|
|
712
|
+
// dracut
|
|
713
|
+
// const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`)
|
|
714
|
+
// await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true))
|
|
715
|
+
// mkinitfs
|
|
716
|
+
const pathConf = path.resolve(__dirname, `../../mkinitfs/live.conf`);
|
|
717
|
+
await exec(`mkinitfs -c ${pathConf} -o ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
|
|
718
|
+
const sidecar = path.resolve(__dirname, `../../mkinitfs/sidecar.sh`);
|
|
719
|
+
await exec(`cp ${sidecar} ${this.settings.iso_work}live/`);
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* initrdFedora()
|
|
723
|
+
*/
|
|
724
|
+
async initrdFedora() {
|
|
725
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
|
|
726
|
+
await exec(`cp /boot/initramfs-*.img ${this.settings.iso_work}/live/`, this.echo);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* initrdSuse()
|
|
730
|
+
*/
|
|
731
|
+
async initrdSuse() {
|
|
732
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
|
|
733
|
+
await exec(`cp /boot/initrd-* ${this.settings.iso_work}/live/`, this.echo);
|
|
734
|
+
}
|
|
706
735
|
/**
|
|
707
736
|
* initrdArch()
|
|
708
737
|
* necessita di echoYes
|
|
709
738
|
*/
|
|
710
739
|
async initrdArch() {
|
|
711
|
-
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
|
|
712
740
|
let initrdImg = Utils.initrdImg();
|
|
713
741
|
initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
|
|
714
|
-
Utils.warning(`
|
|
742
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} ArchLinux on ISO/live`);
|
|
715
743
|
const { distroId } = this.settings.distro;
|
|
716
744
|
let fileConf = 'arch';
|
|
717
745
|
if (isMiso(distroId)) {
|
|
@@ -724,26 +752,12 @@ export default class Ovary {
|
|
|
724
752
|
await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
|
|
725
753
|
}
|
|
726
754
|
/**
|
|
727
|
-
*
|
|
728
|
-
*
|
|
729
|
-
*/
|
|
730
|
-
async initrdAlpine() {
|
|
731
|
-
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
|
|
732
|
-
let initrdImg = Utils.initrdImg();
|
|
733
|
-
//initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1))
|
|
734
|
-
Utils.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
|
|
735
|
-
const { distroId } = this.settings.distro;
|
|
736
|
-
// da cambiare ...
|
|
737
|
-
let fileConf = 'arch';
|
|
738
|
-
const pathConf = path.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
|
|
739
|
-
await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
|
|
740
|
-
}
|
|
741
|
-
/**
|
|
755
|
+
* initrdDebian()
|
|
756
|
+
* Actually based on live* packages
|
|
742
757
|
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
743
|
-
* @returns
|
|
744
758
|
*/
|
|
745
759
|
async initrdDebian(verbose = false) {
|
|
746
|
-
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
|
|
760
|
+
Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Debian/Devuan/Ubuntu on ISO/live`);
|
|
747
761
|
let isCrypted = false;
|
|
748
762
|
if (fs.existsSync('/etc/crypttab')) {
|
|
749
763
|
isCrypted = true;
|
|
@@ -1446,15 +1460,24 @@ export default class Ovary {
|
|
|
1446
1460
|
await this.isolinux(this.theme);
|
|
1447
1461
|
await this.kernelCopy();
|
|
1448
1462
|
/**
|
|
1449
|
-
* we need different
|
|
1450
|
-
*
|
|
1463
|
+
* we need different initfs
|
|
1464
|
+
* for different families
|
|
1451
1465
|
*/
|
|
1452
|
-
if (this.familyId === '
|
|
1453
|
-
await this.initrdDebian();
|
|
1454
|
-
}
|
|
1455
|
-
else if (this.familyId === 'archlinux') {
|
|
1466
|
+
if (this.familyId === 'archlinux') {
|
|
1456
1467
|
await this.initrdArch();
|
|
1457
1468
|
}
|
|
1469
|
+
else if (this.familyId === 'alpine') {
|
|
1470
|
+
await this.initrdAlpine();
|
|
1471
|
+
}
|
|
1472
|
+
else if (this.familyId === 'fedora') {
|
|
1473
|
+
await this.initrdFedora();
|
|
1474
|
+
}
|
|
1475
|
+
else if (this.familyId === 'suse') {
|
|
1476
|
+
await this.initrdSuse();
|
|
1477
|
+
}
|
|
1478
|
+
else if (this.familyId === 'debian') {
|
|
1479
|
+
await this.initrdDebian();
|
|
1480
|
+
}
|
|
1458
1481
|
if (this.settings.config.make_efi) {
|
|
1459
1482
|
await this.makeEfi(this.theme);
|
|
1460
1483
|
}
|
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
|
});
|
|
Binary file
|