penguins-eggs 10.0.40 → 10.0.42

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.
Files changed (42) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +29 -29
  3. package/addons/eggs/theme/livecd/isolinux.main.simple.cfg +1 -1
  4. package/conf/derivatives.yaml +3 -1
  5. package/conf/distros/excalibur/README.md +3 -0
  6. package/conf/distros/voidlinux/README.md +1 -0
  7. package/dist/classes/bleach.js +10 -1
  8. package/dist/classes/distro.d.ts +0 -4
  9. package/dist/classes/distro.js +80 -134
  10. package/dist/classes/families/voidlinux.d.ts +48 -0
  11. package/dist/classes/families/voidlinux.js +84 -0
  12. package/dist/classes/incubation/incubator.js +5 -0
  13. package/dist/classes/ovary.d.ts +6 -13
  14. package/dist/classes/ovary.js +57 -68
  15. package/dist/classes/pacman.js +34 -13
  16. package/dist/classes/pxe.js +3 -3
  17. package/dist/classes/utils.js +9 -0
  18. package/dist/commands/config.js +26 -94
  19. package/dist/commands/produce.js +1 -1
  20. package/dist/interfaces/i-distro.d.ts +0 -4
  21. package/dist/interfaces/i-install.d.ts +2 -2
  22. package/dist/krill/modules/initramfs-cfg.js +0 -3
  23. package/dist/krill/modules/initramfs.js +26 -30
  24. package/dist/krill/prepare.js +2 -2
  25. package/dist/krill/sequence.js +17 -17
  26. package/dracut/README.md +2 -2
  27. package/dracut/dracut.conf.d/01-live.conf +1 -1
  28. package/dracut/sidecar.sh +19 -0
  29. package/manpages/doc/man/eggs.1.gz +0 -0
  30. package/manpages/doc/man/eggs.html +4 -4
  31. package/mkinitcpio/arch/live.conf +3 -8
  32. package/mkinitcpio/biglinux/live.conf +4 -74
  33. package/mkinitcpio/manjarolinux/live.conf +4 -9
  34. package/package.json +8 -8
  35. package/syslinux/README.md +3 -0
  36. package/syslinux/lpxelinux.0 +0 -0
  37. package/syslinux/memdisk +0 -0
  38. package/syslinux/pxelinux.0 +0 -0
  39. package/dracut/test.sh +0 -40
  40. package/mkinitcpio/arch/mkinitcpio.conf +0 -5
  41. package/mkinitcpio/biglinux/mkinitcpio.conf +0 -73
  42. package/mkinitcpio/manjarolinux/mkinitcpio.conf +0 -7
@@ -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
- else if (this.distroId === 'Debian' && this.releaseId === 'testing/unstable') {
102
- this.codenameId = 'trixie';
103
- this.releaseLike = 'unstable';
64
+ if (this.distroId.includes('BigLinux')) {
65
+ this.distroId = "BigLinux";
104
66
  }
105
67
  /**
106
- * Analize distroId
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/Manjaro and Ubuntu
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';
@@ -185,8 +177,13 @@ class Distro {
185
177
  this.codenameLikeId = 'daedalus';
186
178
  break;
187
179
  }
180
+ case 'excalibur': {
181
+ this.distroLike = 'Devuan';
182
+ this.codenameLikeId = 'excalibur';
183
+ break;
184
+ }
188
185
  /**
189
- * Ubuntu LTS + actual
186
+ * Ubuntu
190
187
  */
191
188
  case 'bionic': {
192
189
  this.distroLike = 'Ubuntu';
@@ -209,9 +206,7 @@ class Distro {
209
206
  this.codenameLikeId = 'noble';
210
207
  break;
211
208
  }
212
- /**
213
- * Rhino
214
- */
209
+ // rhino
215
210
  case 'devel': {
216
211
  this.distroLike = 'Ubuntu';
217
212
  this.codenameLikeId = 'devel';
@@ -231,7 +226,7 @@ class Distro {
231
226
  break;
232
227
  }
233
228
  /**
234
- * find in derivatives
229
+ * derivatives
235
230
  */
236
231
  default: {
237
232
  /**
@@ -255,107 +250,58 @@ class Distro {
255
250
  }
256
251
  }
257
252
  }
253
+ if (!found) {
254
+ console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
255
+ console.log('');
256
+ console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
257
+ console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
258
+ console.log('If you can create your new iso, you can contribute to the project');
259
+ console.log('by suggesting your modification.');
260
+ process.exit(0);
261
+ }
258
262
  }
259
263
  }
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
264
  }
282
265
  } // Fine analisi distroId
283
266
  /**
284
- * if lsb-release exists
267
+ * Ultimi ritocchi
285
268
  */
286
- const lsbConfig = '/etc/lsb-release';
287
- if (fs.existsSync(lsbConfig)) {
288
- this.distroId = Utils.searchOnFile(lsbConfig, `DISTRIB_ID`);
289
- this.codenameId = Utils.searchOnFile(lsbConfig, `DISTRIB_CODENAME`);
290
- // patch for BigLinux
291
- if (this.distroId.toLowerCase().includes('biglinux')) {
292
- this.distroId = 'biglinux';
293
- }
269
+ /**
270
+ * Debian: /usr/lib/x86_64-linux-gnu
271
+ * /usr/lib/aarch64-linux-gnu
272
+ */
273
+ if (this.familyId === "Debian") {
274
+ this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
294
275
  }
295
276
  /**
296
- * ManjaroLinux and BigLinux
277
+ * ManjaroLinux e derivate
297
278
  */
298
- if (this.distroId === 'ManjaroLinux' || this.distroId.toLowerCase().includes('biglinux')) {
279
+ if (this.distroId === 'ManjaroLinux' || this.distroId === 'BigLinux') {
299
280
  this.liveMediumPath = '/run/miso/bootmnt/';
300
281
  this.squashfs = 'manjaro/x86_64/livefs.sfs';
301
282
  }
302
283
  /**
303
- * all the distros without codename: Alpine, fedora, opensuse
284
+ * lottura os_release per i pulsanti
304
285
  */
305
- switch (this.familyId) {
306
- case 'alpine': {
307
- this.distroLike = 'Alpine';
308
- this.codenameId = 'rolling'; // questo viene rimosso dal nome
309
- this.codenameLikeId = 'alpine'; // prende alpine come codenaneLikeId
310
- this.liveMediumPath = '/mnt/'; // Qua è deciso da noi
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;
286
+ const os_release = '/etc/os-release';
287
+ if (fs.existsSync(os_release)) {
288
+ let lines = [];
289
+ if (fs.existsSync(os_release)) {
290
+ const data = fs.readFileSync(os_release, 'utf8');
291
+ lines = data.split('\n');
334
292
  }
335
- case 'opensuse':
336
- {
337
- this.distroLike = 'openSUSE';
338
- this.codenameId = 'rolling';
339
- this.codenameLikeId = 'opensuse';
340
- this.liveMediumPath = '/run/initramfs/live/'; // è il mount della root su cd di installatione
341
- this.syslinuxPath = '/usr/share/syslinux/';
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;
293
+ // per ogni riga
294
+ for (const line of lines) {
295
+ if (line.startsWith('HOME_URL=')) {
296
+ this.homeUrl = line.slice('HOME_URL='.length).replaceAll('"', '');
297
+ }
298
+ else if (line.startsWith('SUPPORT_URL=')) {
299
+ this.supportUrl = line.slice('SUPPORT_URL='.length).replaceAll('"', '');
349
300
  }
350
- if (!found) {
351
- console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
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);
301
+ else if (line.startsWith('BUG_REPORT_URL=')) {
302
+ this.bugReportUrl = line.slice('BUG_REPORT_URL='.length).replaceAll('"', '');
358
303
  }
304
+ }
359
305
  }
360
306
  }
361
307
  }
@@ -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
+ }
@@ -111,6 +111,11 @@ export default class Incubator {
111
111
  await daedalus.create();
112
112
  break;
113
113
  }
114
+ case 'excalibur': {
115
+ const excalibur = new Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
116
+ await excalibur.create();
117
+ break;
118
+ }
114
119
  /**
115
120
  * UBUNTU
116
121
  */
@@ -83,30 +83,23 @@ export default class Ovary {
83
83
  */
84
84
  finished(scriptOnly?: boolean): void;
85
85
  /**
86
- * initrdAlpine()
86
+ * mkinitfs()
87
87
  */
88
88
  initrdAlpine(): Promise<void>;
89
89
  /**
90
- * initrdArch()
91
- * necessita di echoYes
90
+ * mkinitcpio()
92
91
  */
93
92
  initrdArch(): Promise<void>;
94
93
  /**
95
- * initrdDebian()
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
- * initrdFedora()
98
+ * dracut() Fedora/Opensuse/Voidlinux
102
99
  */
103
- initrdFedora(): Promise<void>;
100
+ initrdDracut(): Promise<void>;
104
101
  /**
105
- * initrdSuse()
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
  /**