penguins-eggs 10.0.38 → 10.0.41
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 +31 -30
- package/addons/eggs/theme/livecd/isolinux.main.simple.cfg +1 -1
- package/conf/derivatives.yaml +5 -2
- package/conf/distros/rolling/calamares/modules/finished.yml +2 -1
- package/conf/distros/rolling/calamares/modules/partition.yml +1 -1
- package/conf/distros/rolling/calamares/settings.yml +3 -1
- package/conf/distros/voidlinux/README.md +1 -0
- package/dist/classes/bleach.js +9 -1
- package/dist/classes/cli-autologin.js +33 -27
- package/dist/classes/distro.d.ts +0 -4
- package/dist/classes/distro.js +75 -134
- package/dist/classes/families/fedora.js +1 -1
- package/dist/classes/families/voidlinux.d.ts +48 -0
- package/dist/classes/families/voidlinux.js +84 -0
- package/dist/classes/ovary.d.ts +6 -13
- package/dist/classes/ovary.js +63 -60
- package/dist/classes/pacman.js +27 -13
- package/dist/classes/pxe.js +3 -3
- package/dist/classes/tailor.d.ts +11 -14
- package/dist/classes/tailor.js +184 -247
- package/dist/classes/utils.js +9 -0
- package/dist/commands/config.js +26 -94
- package/dist/commands/produce.js +1 -1
- package/dist/commands/wardrobe/wear.js +3 -0
- package/dist/interfaces/i-distro.d.ts +0 -4
- package/dist/interfaces/i-install.d.ts +2 -2
- package/dist/interfaces/i-materia.d.ts +9 -14
- package/dist/krill/modules/add-user.js +9 -12
- package/dist/krill/modules/bootloader-config.js +15 -0
- package/dist/krill/modules/bootloader.js +2 -2
- package/dist/krill/modules/fstab.js +2 -0
- package/dist/krill/modules/initramfs-cfg.js +0 -3
- package/dist/krill/modules/initramfs.js +32 -26
- package/dist/krill/modules/machine-id.js +2 -2
- package/dist/krill/prepare.js +2 -2
- package/dist/krill/sequence.js +25 -26
- package/dracut/README.md +2 -2
- package/dracut/dracut.conf.d/01-live.conf +3 -2
- package/dracut/sidecar.sh +19 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +4 -4
- package/mkinitcpio/arch/README.md +48 -0
- package/mkinitcpio/arch/live.conf +3 -8
- package/mkinitcpio/biglinux/live.conf +4 -74
- package/mkinitcpio/manjarolinux/live.conf +4 -9
- package/mkinitfs/initramfs-init.in +4 -3
- package/package.json +8 -8
- package/syslinux/README.md +3 -0
- package/syslinux/lpxelinux.0 +0 -0
- package/syslinux/memdisk +0 -0
- package/syslinux/pxelinux.0 +0 -0
- package/dracut/test.sh +0 -40
- package/mkinitcpio/arch/mkinitcpio.conf +0 -4
- package/mkinitcpio/biglinux/mkinitcpio.conf +0 -73
- package/mkinitcpio/manjarolinux/mkinitcpio.conf +0 -7
package/dist/classes/distro.js
CHANGED
|
@@ -24,12 +24,8 @@ class Distro {
|
|
|
24
24
|
familyId;
|
|
25
25
|
homeUrl;
|
|
26
26
|
isCalamaresAvailable;
|
|
27
|
-
isolinuxPath;
|
|
28
27
|
liveMediumPath;
|
|
29
|
-
memdiskPath;
|
|
30
|
-
pxelinuxPath;
|
|
31
28
|
releaseId;
|
|
32
|
-
releaseLike;
|
|
33
29
|
squashfs;
|
|
34
30
|
supportUrl;
|
|
35
31
|
syslinuxPath;
|
|
@@ -39,6 +35,7 @@ class Distro {
|
|
|
39
35
|
*/
|
|
40
36
|
constructor() {
|
|
41
37
|
let found = false;
|
|
38
|
+
// Tutti i default sono per Debian
|
|
42
39
|
this.bugReportUrl = 'https://github.com-pieroproietti/penguins-eggs/issue';
|
|
43
40
|
this.codenameId = '';
|
|
44
41
|
this.codenameLikeId = '';
|
|
@@ -47,36 +44,12 @@ class Distro {
|
|
|
47
44
|
this.familyId = 'debian';
|
|
48
45
|
this.homeUrl = 'https://penguins-eggs.net';
|
|
49
46
|
this.isCalamaresAvailable = true;
|
|
50
|
-
this.isolinuxPath = '';
|
|
51
47
|
this.liveMediumPath = '/run/live/medium/';
|
|
52
|
-
this.memdiskPath = '';
|
|
53
|
-
this.pxelinuxPath = '';
|
|
54
48
|
this.releaseId = '';
|
|
55
|
-
this.releaseLike = '';
|
|
56
49
|
this.squashfs = 'live/filesystem.squashfs';
|
|
57
50
|
this.supportUrl = 'https://penguins-eggs.net';
|
|
58
|
-
this.syslinuxPath =
|
|
51
|
+
this.syslinuxPath = path.resolve(__dirname, `../../syslinux`);
|
|
59
52
|
this.usrLibPath = '/usr/lib';
|
|
60
|
-
const os_release = '/etc/os-release';
|
|
61
|
-
if (fs.existsSync(os_release)) {
|
|
62
|
-
let lines = [];
|
|
63
|
-
if (fs.existsSync(os_release)) {
|
|
64
|
-
const data = fs.readFileSync(os_release, 'utf8');
|
|
65
|
-
lines = data.split('\n');
|
|
66
|
-
}
|
|
67
|
-
// per ogni riga
|
|
68
|
-
for (const line of lines) {
|
|
69
|
-
if (line.startsWith('HOME_URL=')) {
|
|
70
|
-
this.homeUrl = line.slice('HOME_URL='.length).replaceAll('"', '');
|
|
71
|
-
}
|
|
72
|
-
else if (line.startsWith('SUPPORT_URL=')) {
|
|
73
|
-
this.supportUrl = line.slice('SUPPORT_URL='.length).replaceAll('"', '');
|
|
74
|
-
}
|
|
75
|
-
else if (line.startsWith('BUG_REPORT_URL=')) {
|
|
76
|
-
this.bugReportUrl = line.slice('BUG_REPORT_URL='.length).replaceAll('"', '');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
53
|
/**
|
|
81
54
|
* lsb_release -cs per codename (version)
|
|
82
55
|
* lsb_release -is per distribuzione
|
|
@@ -85,25 +58,17 @@ class Distro {
|
|
|
85
58
|
this.codenameId = shell.exec('lsb_release -cs', { silent: true }).stdout.toString().trim();
|
|
86
59
|
this.releaseId = shell.exec('lsb_release -rs', { silent: true }).stdout.toString().trim();
|
|
87
60
|
this.distroId = shell.exec('lsb_release -is', { silent: true }).stdout.toString().trim();
|
|
88
|
-
|
|
89
|
-
* releaseLike = releaseId
|
|
90
|
-
*/
|
|
91
|
-
this.releaseLike = this.releaseId;
|
|
92
|
-
/**
|
|
93
|
-
* Per casi equivoci conviene normalizzare codenameId
|
|
94
|
-
* -i, --id show distributor ID
|
|
95
|
-
* -r, --release show release number of this distribution
|
|
96
|
-
* -c, --codename show code name of this distribution
|
|
97
|
-
*/
|
|
98
|
-
if (this.distroId === 'Debian' && this.releaseId === 'unstable' && this.codenameId === 'sid') {
|
|
61
|
+
if (this.distroId === 'Debian' && this.codenameId === 'sid') {
|
|
99
62
|
this.codenameId = 'trixie';
|
|
100
63
|
}
|
|
101
|
-
|
|
102
|
-
this.
|
|
103
|
-
this.releaseLike = 'unstable';
|
|
64
|
+
if (this.distroId.includes('BigLinux')) {
|
|
65
|
+
this.distroId = "BigLinux";
|
|
104
66
|
}
|
|
105
67
|
/**
|
|
106
|
-
*
|
|
68
|
+
* Per Alpine, Fedora ed OpenSUSE basta distroId,
|
|
69
|
+
* Debian, Devuan, Ubuntu e derivate ricadono in
|
|
70
|
+
* default e si analizza il codebaseId
|
|
71
|
+
*
|
|
107
72
|
*/
|
|
108
73
|
switch (this.distroId) {
|
|
109
74
|
/**
|
|
@@ -111,6 +76,10 @@ class Distro {
|
|
|
111
76
|
*/
|
|
112
77
|
case 'Alpine': {
|
|
113
78
|
this.familyId = 'alpine';
|
|
79
|
+
this.distroLike = this.distroId;
|
|
80
|
+
this.codenameId = 'rolling'; // viene rimosso dal nome
|
|
81
|
+
this.codenameLikeId = this.familyId; // per krill
|
|
82
|
+
this.liveMediumPath = '/mnt/'; // Qua è deciso da noi
|
|
114
83
|
break;
|
|
115
84
|
}
|
|
116
85
|
/**
|
|
@@ -119,6 +88,10 @@ class Distro {
|
|
|
119
88
|
case 'NobaraLinux':
|
|
120
89
|
case 'Fedora': {
|
|
121
90
|
this.familyId = 'fedora';
|
|
91
|
+
this.distroLike = this.distroId;
|
|
92
|
+
this.codenameId = 'rolling'; // viene rimosso dal nome
|
|
93
|
+
this.codenameLikeId = this.familyId; // per krill
|
|
94
|
+
this.liveMediumPath = '/run/initramfs/live/';
|
|
122
95
|
break;
|
|
123
96
|
}
|
|
124
97
|
/**
|
|
@@ -126,12 +99,31 @@ class Distro {
|
|
|
126
99
|
*/
|
|
127
100
|
case 'openSUSE': {
|
|
128
101
|
this.familyId = 'opensuse';
|
|
102
|
+
this.distroLike = this.distroId;
|
|
103
|
+
this.codenameId = 'rolling'; // viene rimosso dal nome
|
|
104
|
+
this.codenameLikeId = this.familyId; // per krill
|
|
105
|
+
this.liveMediumPath = '/run/initramfs/live/';
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* voidlinux compatible
|
|
110
|
+
*/
|
|
111
|
+
case 'VoidLinux': {
|
|
112
|
+
this.familyId = 'voidlinux';
|
|
113
|
+
this.distroLike = this.distroId;
|
|
114
|
+
this.codenameId = 'rolling';
|
|
115
|
+
this.codenameLikeId = this.familyId; // per krill
|
|
116
|
+
this.liveMediumPath = '/run/initramfs/live/'; // we must discover
|
|
129
117
|
break;
|
|
130
118
|
}
|
|
131
119
|
/**
|
|
132
|
-
* Arch/Debian/Devuan
|
|
120
|
+
* Arch/Debian/Devuan and Ubuntu
|
|
121
|
+
* analizzo i codebase conosciuti
|
|
133
122
|
*/
|
|
134
123
|
default: {
|
|
124
|
+
/**
|
|
125
|
+
* Debian
|
|
126
|
+
*/
|
|
135
127
|
switch (this.codenameId) {
|
|
136
128
|
case 'jessie': {
|
|
137
129
|
this.distroLike = 'Debian';
|
|
@@ -186,7 +178,7 @@ class Distro {
|
|
|
186
178
|
break;
|
|
187
179
|
}
|
|
188
180
|
/**
|
|
189
|
-
* Ubuntu
|
|
181
|
+
* Ubuntu
|
|
190
182
|
*/
|
|
191
183
|
case 'bionic': {
|
|
192
184
|
this.distroLike = 'Ubuntu';
|
|
@@ -209,9 +201,7 @@ class Distro {
|
|
|
209
201
|
this.codenameLikeId = 'noble';
|
|
210
202
|
break;
|
|
211
203
|
}
|
|
212
|
-
|
|
213
|
-
* Rhino
|
|
214
|
-
*/
|
|
204
|
+
// rhino
|
|
215
205
|
case 'devel': {
|
|
216
206
|
this.distroLike = 'Ubuntu';
|
|
217
207
|
this.codenameLikeId = 'devel';
|
|
@@ -231,7 +221,7 @@ class Distro {
|
|
|
231
221
|
break;
|
|
232
222
|
}
|
|
233
223
|
/**
|
|
234
|
-
*
|
|
224
|
+
* derivatives
|
|
235
225
|
*/
|
|
236
226
|
default: {
|
|
237
227
|
/**
|
|
@@ -255,107 +245,58 @@ class Distro {
|
|
|
255
245
|
}
|
|
256
246
|
}
|
|
257
247
|
}
|
|
248
|
+
if (!found) {
|
|
249
|
+
console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
|
|
250
|
+
console.log('');
|
|
251
|
+
console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
|
|
252
|
+
console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
|
|
253
|
+
console.log('If you can create your new iso, you can contribute to the project');
|
|
254
|
+
console.log('by suggesting your modification.');
|
|
255
|
+
process.exit(0);
|
|
256
|
+
}
|
|
258
257
|
}
|
|
259
258
|
}
|
|
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
|
-
} // Fine analisi codenameId
|
|
281
259
|
}
|
|
282
260
|
} // Fine analisi distroId
|
|
283
261
|
/**
|
|
284
|
-
*
|
|
262
|
+
* Ultimi ritocchi
|
|
285
263
|
*/
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
this.distroId = 'biglinux';
|
|
293
|
-
}
|
|
264
|
+
/**
|
|
265
|
+
* Debian: /usr/lib/x86_64-linux-gnu
|
|
266
|
+
* /usr/lib/aarch64-linux-gnu
|
|
267
|
+
*/
|
|
268
|
+
if (this.familyId === "Debian") {
|
|
269
|
+
this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
|
|
294
270
|
}
|
|
295
271
|
/**
|
|
296
|
-
* ManjaroLinux
|
|
272
|
+
* ManjaroLinux e derivate
|
|
297
273
|
*/
|
|
298
|
-
if (this.distroId === 'ManjaroLinux' || this.distroId
|
|
274
|
+
if (this.distroId === 'ManjaroLinux' || this.distroId === 'BigLinux') {
|
|
299
275
|
this.liveMediumPath = '/run/miso/bootmnt/';
|
|
300
276
|
this.squashfs = 'manjaro/x86_64/livefs.sfs';
|
|
301
277
|
}
|
|
302
278
|
/**
|
|
303
|
-
*
|
|
279
|
+
* lottura os_release per i pulsanti
|
|
304
280
|
*/
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
this.syslinuxPath = '/usr/share/syslinux/'; // correct
|
|
312
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
313
|
-
this.usrLibPath = '/usr/lib/';
|
|
314
|
-
this.memdiskPath = this.syslinuxPath;
|
|
315
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
316
|
-
// At the moment
|
|
317
|
-
this.isCalamaresAvailable = true;
|
|
318
|
-
found = true;
|
|
319
|
-
break;
|
|
320
|
-
}
|
|
321
|
-
case 'fedora': {
|
|
322
|
-
this.distroLike = 'Fedora';
|
|
323
|
-
this.codenameId = 'rolling'; // questo viene rimosso dal nome
|
|
324
|
-
this.codenameLikeId = 'fedora';
|
|
325
|
-
this.liveMediumPath = '/run/initramfs/live/';
|
|
326
|
-
this.syslinuxPath = '/usr/share/syslinux/';
|
|
327
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
328
|
-
this.usrLibPath = '/usr/lib/';
|
|
329
|
-
this.memdiskPath = this.syslinuxPath;
|
|
330
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
331
|
-
this.isCalamaresAvailable = true;
|
|
332
|
-
found = true;
|
|
333
|
-
break;
|
|
281
|
+
const os_release = '/etc/os-release';
|
|
282
|
+
if (fs.existsSync(os_release)) {
|
|
283
|
+
let lines = [];
|
|
284
|
+
if (fs.existsSync(os_release)) {
|
|
285
|
+
const data = fs.readFileSync(os_release, 'utf8');
|
|
286
|
+
lines = data.split('\n');
|
|
334
287
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
this.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
this.
|
|
342
|
-
this.pxelinuxPath = this.syslinuxPath;
|
|
343
|
-
this.usrLibPath = '/usr/lib/';
|
|
344
|
-
this.memdiskPath = this.syslinuxPath;
|
|
345
|
-
this.isolinuxPath = this.syslinuxPath;
|
|
346
|
-
this.isCalamaresAvailable = true;
|
|
347
|
-
found = true;
|
|
348
|
-
break;
|
|
288
|
+
// per ogni riga
|
|
289
|
+
for (const line of lines) {
|
|
290
|
+
if (line.startsWith('HOME_URL=')) {
|
|
291
|
+
this.homeUrl = line.slice('HOME_URL='.length).replaceAll('"', '');
|
|
292
|
+
}
|
|
293
|
+
else if (line.startsWith('SUPPORT_URL=')) {
|
|
294
|
+
this.supportUrl = line.slice('SUPPORT_URL='.length).replaceAll('"', '');
|
|
349
295
|
}
|
|
350
|
-
if (
|
|
351
|
-
|
|
352
|
-
console.log('');
|
|
353
|
-
console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
|
|
354
|
-
console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
|
|
355
|
-
console.log('If you can create your new iso, you can contribute to the project');
|
|
356
|
-
console.log('by suggesting your modification.');
|
|
357
|
-
process.exit(0);
|
|
296
|
+
else if (line.startsWith('BUG_REPORT_URL=')) {
|
|
297
|
+
this.bugReportUrl = line.slice('BUG_REPORT_URL='.length).replaceAll('"', '');
|
|
358
298
|
}
|
|
299
|
+
}
|
|
359
300
|
}
|
|
360
301
|
}
|
|
361
302
|
}
|
|
@@ -21,7 +21,7 @@ export default class Fedora {
|
|
|
21
21
|
static async calamaresInstall(verbose = true) {
|
|
22
22
|
const echo = Utils.setEcho(verbose);
|
|
23
23
|
try {
|
|
24
|
-
await exec(`dnf install ${this.packs4calamares.join(' ')}`, echo);
|
|
24
|
+
await exec(`dnf install -y ${this.packs4calamares.join(' ')}`, echo);
|
|
25
25
|
}
|
|
26
26
|
catch {
|
|
27
27
|
Utils.error(`fedora.calamaresInstall()`);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/families/voidlinux.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
|
+
* Utils: general porpourse utils
|
|
10
|
+
* @remarks all the utilities
|
|
11
|
+
*/
|
|
12
|
+
export default class Voidlinux {
|
|
13
|
+
static packs4calamares: string[];
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
static calamaresInstall(verbose?: boolean): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
static calamaresRemove(verbose?: boolean): Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* check if it's installed wayland
|
|
24
|
+
* @returns true if wayland
|
|
25
|
+
*/
|
|
26
|
+
static isInstalledWayland(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* check if it's installed xorg
|
|
29
|
+
* @returns true if xorg is installed
|
|
30
|
+
*/
|
|
31
|
+
static isInstalledXorg(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* restuisce VERO se il pacchetto è installato
|
|
34
|
+
* @param packageName
|
|
35
|
+
*/
|
|
36
|
+
static packageAvailable(packageName: string): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Install the package packageName
|
|
39
|
+
* @param packageName {string} Pacchetto da installare
|
|
40
|
+
* @returns {boolean} True if success
|
|
41
|
+
*/
|
|
42
|
+
static packageInstall(packageName: string): Promise<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* restuisce VERO se il pacchetto è installato
|
|
45
|
+
* @param packageName
|
|
46
|
+
*/
|
|
47
|
+
static packageIsInstalled(packageName: string): boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/families/voidlinux.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
|
+
/**
|
|
10
|
+
* Utils: general porpourse utils
|
|
11
|
+
* @remarks all the utilities
|
|
12
|
+
*/
|
|
13
|
+
export default class Voidlinux {
|
|
14
|
+
static packs4calamares = [''];
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
static async calamaresInstall(verbose = true) {
|
|
19
|
+
if (verbose) {
|
|
20
|
+
console.log("calamares non disponibile on VoidLinux");
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
static async calamaresRemove(verbose = true) {
|
|
27
|
+
if (verbose) {
|
|
28
|
+
console.log("calamares non disponibile on VoidLinux");
|
|
29
|
+
}
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* check if it's installed wayland
|
|
34
|
+
* @returns true if wayland
|
|
35
|
+
*/
|
|
36
|
+
static isInstalledWayland() {
|
|
37
|
+
return this.packageIsInstalled('wayland');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* check if it's installed xorg
|
|
41
|
+
* @returns true if xorg is installed
|
|
42
|
+
*/
|
|
43
|
+
static isInstalledXorg() {
|
|
44
|
+
return this.packageIsInstalled('xorg-server');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* restuisce VERO se il pacchetto è installato
|
|
48
|
+
* @param packageName
|
|
49
|
+
*/
|
|
50
|
+
static async packageAvailable(packageName) {
|
|
51
|
+
let available = false;
|
|
52
|
+
const cmd = `/usr/bin/xbps-query -Rs ${packageName} | grep Package:`;
|
|
53
|
+
const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
|
|
54
|
+
if (stdout.includes(packageName)) {
|
|
55
|
+
available = true;
|
|
56
|
+
}
|
|
57
|
+
return available;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Install the package packageName
|
|
61
|
+
* @param packageName {string} Pacchetto da installare
|
|
62
|
+
* @returns {boolean} True if success
|
|
63
|
+
*/
|
|
64
|
+
static async packageInstall(packageName) {
|
|
65
|
+
let retVal = false;
|
|
66
|
+
if (shx.exec(`/usr/bin/xbps-install ${packageName}`, { silent: true }) === '0') {
|
|
67
|
+
retVal = true;
|
|
68
|
+
}
|
|
69
|
+
return retVal;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* restuisce VERO se il pacchetto è installato
|
|
73
|
+
* @param packageName
|
|
74
|
+
*/
|
|
75
|
+
static packageIsInstalled(packageName) {
|
|
76
|
+
let installed = false;
|
|
77
|
+
const cmd = `/usr/bin/xbps-query -l | grep ${packageName}`;
|
|
78
|
+
const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
|
|
79
|
+
if (stdout.includes(packageName)) {
|
|
80
|
+
installed = true;
|
|
81
|
+
}
|
|
82
|
+
return installed;
|
|
83
|
+
}
|
|
84
|
+
}
|
package/dist/classes/ovary.d.ts
CHANGED
|
@@ -83,30 +83,23 @@ export default class Ovary {
|
|
|
83
83
|
*/
|
|
84
84
|
finished(scriptOnly?: boolean): void;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* mkinitfs()
|
|
87
87
|
*/
|
|
88
88
|
initrdAlpine(): Promise<void>;
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
91
|
-
* necessita di echoYes
|
|
90
|
+
* mkinitcpio()
|
|
92
91
|
*/
|
|
93
92
|
initrdArch(): Promise<void>;
|
|
94
93
|
/**
|
|
95
|
-
*
|
|
96
|
-
* Actually based on live* packages
|
|
97
|
-
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
94
|
+
* mkinitramfs() Debian
|
|
98
95
|
*/
|
|
99
96
|
initrdDebian(verbose?: boolean): Promise<void>;
|
|
100
97
|
/**
|
|
101
|
-
*
|
|
98
|
+
* dracut() Fedora/Opensuse/Voidlinux
|
|
102
99
|
*/
|
|
103
|
-
|
|
100
|
+
initrdDracut(): Promise<void>;
|
|
104
101
|
/**
|
|
105
|
-
*
|
|
106
|
-
*/
|
|
107
|
-
initrdSuse(): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* syslinux: new version
|
|
102
|
+
* syslinux: da syspath
|
|
110
103
|
*/
|
|
111
104
|
syslinux(theme?: string): Promise<void>;
|
|
112
105
|
/**
|