penguins-eggs 10.0.35 → 10.0.37

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 (62) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +33 -33
  3. package/addons/eggs/theme/livecd/isolinux.main.simple.cfg +21 -0
  4. package/conf/distros/fedora/README.md +3 -0
  5. package/conf/distros/fedora/calamares/calamares-modules/bootloader-config/bootloader-config.sh +40 -0
  6. package/conf/distros/fedora/calamares/calamares-modules/bootloader-config/module.yml +9 -0
  7. package/conf/distros/fedora/calamares/calamares-modules/cleanup/cleanup.sh +13 -0
  8. package/conf/distros/fedora/calamares/calamares-modules/cleanup/module.yml +9 -0
  9. package/conf/distros/fedora/calamares/modules/bootloader.yml +57 -0
  10. package/conf/distros/fedora/calamares/modules/displaymanager.yml +23 -0
  11. package/conf/distros/fedora/calamares/modules/finished.yml +5 -0
  12. package/conf/distros/fedora/calamares/modules/fstab.yml +12 -0
  13. package/conf/distros/fedora/calamares/modules/locale.yml +98 -0
  14. package/conf/distros/fedora/calamares/modules/luksopenswaphookcfg.yml +5 -0
  15. package/conf/distros/fedora/calamares/modules/machineid.yml +17 -0
  16. package/conf/distros/fedora/calamares/modules/mount.yml +56 -0
  17. package/conf/distros/fedora/calamares/modules/packages.yml +6 -0
  18. package/conf/distros/fedora/calamares/modules/partition.yml +242 -0
  19. package/conf/distros/fedora/calamares/modules/removeuser.yml +15 -0
  20. package/conf/distros/fedora/calamares/modules/unpackfs.yml +6 -0
  21. package/conf/distros/fedora/calamares/modules/users.yml +18 -0
  22. package/conf/distros/fedora/calamares/modules/welcome.yml +19 -0
  23. package/conf/distros/fedora/calamares/settings.yml +57 -0
  24. package/dist/classes/distro.js +70 -55
  25. package/dist/classes/families/alpine.d.ts +0 -4
  26. package/dist/classes/families/alpine.js +0 -8
  27. package/dist/classes/families/archlinux.d.ts +0 -4
  28. package/dist/classes/families/archlinux.js +0 -7
  29. package/dist/classes/families/debian.d.ts +0 -4
  30. package/dist/classes/families/debian.js +0 -7
  31. package/dist/classes/families/fedora.d.ts +0 -4
  32. package/dist/classes/families/fedora.js +0 -6
  33. package/dist/classes/families/opensuse.d.ts +0 -4
  34. package/dist/classes/families/opensuse.js +3 -12
  35. package/dist/classes/incubation/incubator.js +8 -0
  36. package/dist/classes/locales.d.ts +4 -4
  37. package/dist/classes/locales.js +33 -36
  38. package/dist/classes/ovary.d.ts +3 -3
  39. package/dist/classes/ovary.js +46 -52
  40. package/dist/classes/pacman.d.ts +1 -1
  41. package/dist/classes/pacman.js +53 -24
  42. package/dist/classes/utils.js +30 -13
  43. package/dist/commands/calamares.js +39 -39
  44. package/dist/krill/modules/add-user.js +7 -5
  45. package/dist/krill/modules/bootloader-config.js +26 -0
  46. package/dist/krill/modules/bootloader.js +8 -1
  47. package/dist/krill/modules/del-live-user.js +2 -2
  48. package/dist/krill/modules/locale-cfg.js +0 -3
  49. package/dist/krill/modules/m-keyboard.js +1 -1
  50. package/dist/krill/sequence.js +110 -38
  51. package/dracut/README.md +4 -38
  52. package/dracut/dracut.conf +3 -0
  53. package/dracut/dracut.conf.d/01-live.conf +8 -0
  54. package/dracut/test.sh +40 -0
  55. package/manpages/doc/man/eggs.1.gz +0 -0
  56. package/manpages/doc/man/eggs.html +4 -4
  57. package/package.json +9 -9
  58. package/addons/eggs/theme/livecd/isolinux.main.alpine.cfg +0 -39
  59. package/dist/classes/families/mockup.d.ts +0 -60
  60. package/dist/classes/families/mockup.js +0 -79
  61. package/dracut/live.conf +0 -8
  62. /package/addons/eggs/theme/livecd/{isolinux.main.original.cfg → isolinux.main.full.cfg} +0 -0
@@ -34,13 +34,6 @@ export default class Debian {
34
34
  Utils.error(`Debian.calamaresInstall() apt-get install --yes ${array2spaced(this.debs4calamares)}`); // + e.error)
35
35
  }
36
36
  }
37
- /**
38
- * Debian: calamaresPolicies
39
- */
40
- static async calamaresPolicies() {
41
- const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
42
- await exec(`sed -i 's/auth_admin/yes/' ${policyFile}`);
43
- }
44
37
  /**
45
38
  * Debian: calamaresRemove
46
39
  */
@@ -15,10 +15,6 @@ export default class Fedora {
15
15
  *
16
16
  */
17
17
  static calamaresInstall(verbose?: boolean): Promise<void>;
18
- /**
19
- * calamaresPolicies
20
- */
21
- static calamaresPolicies(): Promise<void>;
22
18
  /**
23
19
  *
24
20
  */
@@ -27,12 +27,6 @@ export default class Fedora {
27
27
  Utils.error(`fedora.calamaresInstall()`);
28
28
  }
29
29
  }
30
- /**
31
- * calamaresPolicies
32
- */
33
- static async calamaresPolicies() {
34
- const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
35
- }
36
30
  /**
37
31
  *
38
32
  */
@@ -15,10 +15,6 @@ export default class Opensuse {
15
15
  *
16
16
  */
17
17
  static calamaresInstall(verbose?: boolean): Promise<void>;
18
- /**
19
- * calamaresPolicies
20
- */
21
- static calamaresPolicies(): Promise<void>;
22
18
  /**
23
19
  *
24
20
  */
@@ -19,23 +19,15 @@ export default class Opensuse {
19
19
  *
20
20
  */
21
21
  static async calamaresInstall(verbose = true) {
22
- const echo = Utils.setEcho(verbose);
22
+ const echo = Utils.setEcho(true);
23
+ console.log("installazione calamares SuSE");
23
24
  try {
24
- await exec(`zypper install ${this.packs4calamares.join(' ')}`, echo);
25
+ await exec(`zypper install calamares`, echo);
25
26
  }
26
27
  catch {
27
28
  Utils.error(`Opensuse.calamaresInstall()`);
28
29
  }
29
30
  }
30
- /**
31
- * calamaresPolicies
32
- */
33
- static async calamaresPolicies() {
34
- const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
35
- /**
36
- * Su openSuse occorre vedere come fare!
37
- */
38
- }
39
31
  /**
40
32
  *
41
33
  */
@@ -93,7 +85,6 @@ export default class Opensuse {
93
85
  */
94
86
  static packageIsInstalled(packageName) {
95
87
  let installed = false;
96
- // rpm -qa | grep -i nano
97
88
  const cmd = `/usr/bin/zypper search --installed-only ${packageName}`;
98
89
  const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
99
90
  if (stdout.includes(packageName)) {
@@ -155,6 +155,14 @@ export default class Incubator {
155
155
  await alpine.create();
156
156
  break;
157
157
  }
158
+ /**
159
+ * Fedora
160
+ */
161
+ case 'fedora': {
162
+ const fedora = new Alpine(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.isClone, this.verbose);
163
+ await fedora.create();
164
+ break;
165
+ }
158
166
  }
159
167
  if (Pacman.calamaresExists()) {
160
168
  partitionCustomize();
@@ -11,11 +11,11 @@ export default class Locales {
11
11
  */
12
12
  getDefault(): Promise<string>;
13
13
  /**
14
- *
14
+ * getSupported
15
15
  */
16
- getEnabled(): Promise<string[]>;
16
+ getSupported(): Promise<string[]>;
17
17
  /**
18
- *
18
+ * getEnabled
19
19
  */
20
- getSupported(): Promise<string[]>;
20
+ getEnabled(): Promise<string[]>;
21
21
  }
@@ -8,50 +8,22 @@
8
8
  import fs from 'node:fs';
9
9
  import { exec } from '../lib/utils.js';
10
10
  import Distro from './distro.js';
11
+ import Utils from './utils.js';
11
12
  export default class Locales {
12
13
  /**
13
14
  *
14
15
  */
15
16
  async getDefault() {
16
- const file = '/etc/default/locale';
17
- const cmd = `grep LANG < ${file}|cut -f2 -d=`;
17
+ const cmd = `locale|grep LANG|cut -f2 -d=`;
18
18
  let defaultLanguage = 'en_US.UTF-8';
19
- if (fs.existsSync(file)) {
20
- const result = await exec(cmd, { capture: true, echo: false, ignore: false });
21
- if (result.code === 0) {
22
- defaultLanguage = result.data.replaceAll('"', '').replaceAll("'", '').trim();
23
- }
24
- }
25
- return defaultLanguage;
26
- }
27
- /**
28
- *
29
- */
30
- async getEnabled() {
31
- const distro = new Distro();
32
- let cmd = 'localectl list-locales';
33
- if (distro.familyId === 'alpine') {
34
- cmd = 'locale -a';
35
- }
36
- // Restituisce i locales abilitati in Debian, per manjaro quelli presenti
37
- // in /etc/locale.gen anche se #disabilitati
38
- const enabledLocales = [];
39
19
  const result = await exec(cmd, { capture: true, echo: false, ignore: false });
40
20
  if (result.code === 0) {
41
- const lines = result.data.split('\n');
42
- for (const line of lines) {
43
- if (distro.familyId === 'alpine') {
44
- enabledLocales.push(line.replaceAll('"', '').replaceAll("'", '').trim() + '.UTF-8');
45
- }
46
- else {
47
- enabledLocales.push(line.replaceAll('"', '').replaceAll("'", '').trim());
48
- }
49
- }
21
+ defaultLanguage = result.data.trim();
50
22
  }
51
- return enabledLocales;
23
+ return defaultLanguage;
52
24
  }
53
25
  /**
54
- *
26
+ * getSupported
55
27
  */
56
28
  async getSupported() {
57
29
  const distro = new Distro();
@@ -61,15 +33,22 @@ export default class Locales {
61
33
  supporteds = await this.getEnabled();
62
34
  break;
63
35
  }
36
+ case 'archlinux': {
37
+ supporteds = await this.getEnabled();
38
+ break;
39
+ }
64
40
  case 'debian': {
65
41
  supporteds = fs.readFileSync('/usr/share/i18n/SUPPORTED', 'utf8').split('\n');
66
42
  break;
67
43
  }
68
- case 'archlinux': {
69
- supporteds = (await exec('localectl list-locales', { capture: true, echo: false, ignore: false })).data.split('\n');
44
+ case 'fedora': {
45
+ supporteds = await this.getEnabled();
46
+ break;
47
+ }
48
+ case 'suse': {
49
+ supporteds = await this.getEnabled();
70
50
  break;
71
51
  }
72
- // No default
73
52
  }
74
53
  const elements = [];
75
54
  for (const elem of supporteds) {
@@ -77,4 +56,22 @@ export default class Locales {
77
56
  }
78
57
  return elements;
79
58
  }
59
+ /**
60
+ * getEnabled
61
+ */
62
+ async getEnabled() {
63
+ let cmd = "locale -a";
64
+ if (Utils.isSystemd()) {
65
+ cmd = "localectl list-locales";
66
+ }
67
+ const enabledLocales = [];
68
+ const result = await exec(cmd, { capture: true, echo: false, ignore: false });
69
+ if (result.code === 0) {
70
+ const lines = result.data.split('\n');
71
+ for (const line of lines) {
72
+ enabledLocales.push(line.trim());
73
+ }
74
+ }
75
+ return enabledLocales;
76
+ }
80
77
  }
@@ -126,6 +126,9 @@ export default class Ovary {
126
126
  * makeDotDisk
127
127
  */
128
128
  makeDotDisk(info?: string, mksquashfs?: string, mkisofs?: string): void;
129
+ /**
130
+ * makeEFI
131
+ */
129
132
  makeEfi(theme?: string): Promise<void>;
130
133
  /**
131
134
  * makeIso
@@ -177,9 +180,6 @@ export default class Ovary {
177
180
  * syslinux
178
181
  */
179
182
  syslinux(): Promise<void>;
180
- /**
181
- * makeEfi
182
- */
183
183
  /**
184
184
  *
185
185
  * @param cmd
@@ -199,7 +199,7 @@ export default class Ovary {
199
199
  });
200
200
  const users = result.data.split('\n');
201
201
  let deluser = 'deluser';
202
- if (this.familyId === 'archlinux' || this.familyId === 'fedora') {
202
+ if (this.familyId === 'archlinux' || this.familyId === 'fedora' || this.familyId === 'suse') {
203
203
  deluser = 'userdel';
204
204
  }
205
205
  for (let i = 0; i < users.length - 1; i++) {
@@ -220,9 +220,9 @@ export default class Ovary {
220
220
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
221
221
  // Create user using useradd
222
222
  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));
223
- // live password
223
+ // live password Don't work with SELINUX
224
224
  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));
225
- // root password
225
+ // root password Don't work with SELINUX
226
226
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + ' | chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
227
227
  // Alpine naked don't have /etc/skel
228
228
  if (fs.existsSync('/etc/skel')) {
@@ -251,6 +251,10 @@ export default class Ovary {
251
251
  cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
252
252
  break;
253
253
  }
254
+ case 'fedora': {
255
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
256
+ break;
257
+ }
254
258
  // No default
255
259
  }
256
260
  /**
@@ -513,7 +517,9 @@ export default class Ovary {
513
517
  * LMDE4: utilizza UbuntuMono16.pf2
514
518
  * aggiungo un link a /boot/grub/fonts/UbuntuMono16.pf2
515
519
  */
516
- shx.cp(`${this.settings.work_dir.merged}/boot/grub/fonts/unicode.pf2`, `${this.settings.work_dir.merged}/boot/grub/fonts/UbuntuMono16.pf2`);
520
+ if (fs.existsSync(`${this.settings.work_dir.merged}/boot/grub/fonts/unicode.pf2`)) {
521
+ shx.cp(`${this.settings.work_dir.merged}/boot/grub/fonts/unicode.pf2`, `${this.settings.work_dir.merged}/boot/grub/fonts/UbuntuMono16.pf2`);
522
+ }
517
523
  /**
518
524
  * cleaning /etc/resolv.conf
519
525
  */
@@ -708,9 +714,16 @@ export default class Ovary {
708
714
  const sidecar = path.resolve(__dirname, `../../mkinitfs/initramfs-init.in`);
709
715
  Utils.warning(`Adding ${sidecar} to /usr/share/mkinitfs/initramfs-init`);
710
716
  await exec(`cp ${sidecar} /usr/share/mkinitfs/initramfs-init`);
711
- const initrdImg = 'initramfs-lts';
717
+ let initrdImg = Utils.initrdImg();
718
+ initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
712
719
  const pathConf = path.resolve(__dirname, `../../mkinitfs/live.conf`);
713
720
  await exec(`mkinitfs -c ${pathConf} -o ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
721
+ /** tempt for dracut
722
+ const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim()
723
+ const conf = path.resolve(__dirname, `../../dracut/dracut.conf`)
724
+ const confdir = path.resolve(__dirname, `../../dracut/dracut.conf.d`)
725
+ await exec(`dracut --confdir ${confdir} ${this.settings.iso_work}live/${this.settings.initrdImg}`, Utils.setEcho(true))
726
+ */
714
727
  }
715
728
  /**
716
729
  * initrdArch()
@@ -753,14 +766,10 @@ export default class Ovary {
753
766
  */
754
767
  async initrdFedora() {
755
768
  Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
756
- // dracut
757
769
  const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
758
- const pathConf = path.resolve(__dirname, `../../dracut/live.conf`);
759
- const initrdImg = `initramfs-${kernelVersion}`;
760
- console.log("========================================================");
761
- console.log(`dracut --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`);
762
- console.log("========================================================");
763
- await exec(`dracut --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
770
+ const conf = path.resolve(__dirname, `../../dracut/dracut.conf`);
771
+ const confdir = path.resolve(__dirname, `../../dracut/dracut.conf.d`);
772
+ await exec(`dracut --confdir ${confdir} ${this.settings.iso_work}live/${this.settings.initrdImg}`, Utils.setEcho(true));
764
773
  }
765
774
  /**
766
775
  * initrdSuse()
@@ -768,21 +777,14 @@ export default class Ovary {
768
777
  async initrdSuse() {
769
778
  Utils.warning(`creating ${path.basename(this.settings.initrdImg)} OpenSuSE on ISO/live`);
770
779
  const kernelVersion = shx.exec('uname -r', { silent: true }).stdout.trim();
771
- const pathConf = path.resolve(__dirname, `../../dracut/live.conf`);
772
- const initrdImg = `initramfs-${kernelVersion}`;
773
- console.log("========================================================");
774
- console.log(`dracut --verbose --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`);
775
- console.log("========================================================");
776
- await exec(`dracut --conf ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
777
- process.exit(0);
780
+ const conf = path.resolve(__dirname, `../../dracut/dracut.conf`);
781
+ const confdir = path.resolve(__dirname, `../../dracut/dracut.conf.d`);
782
+ await exec(`dracut --confdir ${confdir} ${this.settings.iso_work}live/${this.settings.initrdImg}`, Utils.setEcho(true));
778
783
  }
779
784
  /**
780
785
  * async isolinux
781
786
  */
782
787
  async isolinux(theme = 'eggs') {
783
- if (this.verbose) {
784
- console.log('Ovary: isolinux');
785
- }
786
788
  /**
787
789
  * isolinux.bin
788
790
  */
@@ -862,23 +864,29 @@ export default class Ovary {
862
864
  * @returns kernelParameters
863
865
  */
864
866
  kernelParameters() {
865
- if (this.verbose) {
866
- console.log('Ovary: kernelParameters');
867
- }
868
867
  // GRUB_CMDLINE_LINUX='ipv6.disable=1'
869
868
  const { distroId } = this.settings.distro;
870
869
  let kp = "";
871
- if (this.familyId === 'debian') {
872
- kp += `boot=live components locales=${process.env.LANG}`;
870
+ if (this.familyId === 'alpine') {
871
+ kp += `alpinelivelabel=${this.volid} alpinelivesquashfs=/mnt/live/filesystem.squashfs`;
872
+ /**
873
+ * tempt for dracut
874
+ * kp += `root=live:CDLABEL=${this.volid} rd.live.image rd.live.dir=/live rd.live.squashimg=filesystem.squashfs`
875
+ */
873
876
  }
874
877
  else if (this.familyId === 'archlinux') {
875
878
  kp += `boot=live components locales=${process.env.LANG}`;
876
879
  kp += isMiso(distroId) ? ` misobasedir=manjaro misolabel=${this.volid}` : ` archisobasedir=arch archisolabel=${this.volid}`;
877
880
  }
878
- else if (this.familyId === 'alpine') {
879
- kp += `alpinelivelabel=${this.volid} alpinelivesquashfs=/mnt/live/filesystem.squashfs`;
881
+ else if (this.familyId === 'debian') {
882
+ kp += `boot=live components locales=${process.env.LANG} cow_spacesize=2G`;
883
+ }
884
+ else if (this.familyId === 'fedora') {
885
+ kp += `root=live:CDLABEL=${this.volid} rd.live.image rd.live.dir=/live rd.live.squashimg=filesystem.squashfs selinux=0`; // rd.shell rd.debug log_buf_len=1M
886
+ }
887
+ else if (this.familyId === 'suse') {
888
+ kp += `root=live:CDLABEL=${this.volid} rd.live.image rd.live.dir=/live rd.live.squashimg=filesystem.squashfs`;
880
889
  }
881
- kp += ` cow_spacesize=2G`;
882
890
  return kp;
883
891
  }
884
892
  /**
@@ -960,7 +968,9 @@ export default class Ovary {
960
968
  // .disk/mkisofs
961
969
  fs.writeFileSync(dotDisk + '/mkisofs', text + mkisofs, 'utf-8');
962
970
  }
963
- // #######################################################################################
971
+ /**
972
+ * makeEFI
973
+ */
964
974
  async makeEfi(theme = 'eggs') {
965
975
  if (this.verbose) {
966
976
  console.log('Ovary: makeEfi');
@@ -1145,8 +1155,6 @@ export default class Ovary {
1145
1155
  * loopback.cfg
1146
1156
  */
1147
1157
  fs.writeFileSync(`${isoDir}/boot/grub/loopback.cfg`, 'source /boot/grub/grub.cfg\n');
1148
- // console.log('end makeEfi')
1149
- // process.exit()
1150
1158
  }
1151
1159
  /**
1152
1160
  * makeIso
@@ -1589,26 +1597,15 @@ export default class Ovary {
1589
1597
  * syslinux
1590
1598
  */
1591
1599
  async syslinux() {
1592
- if (this.verbose) {
1593
- console.log('Ovary: syslinux');
1594
- }
1595
1600
  await exec(`cp ${this.settings.distro.syslinuxPath}/vesamenu.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1596
1601
  await exec(`cp ${this.settings.distro.syslinuxPath}/chain.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1597
1602
  /**
1598
- * per openSuse non sono riusciuto a determinare
1599
- * quale pacchetto installi:
1600
- * ldllinux.c43, libcom32 e libutil.c32
1603
+ * OpenSuSE: ldllinux.c32, libcom32 e libutil.c32 not exists!
1601
1604
  */
1602
- if (this.familyId !== 'suse') {
1603
- await exec(`cp ${this.settings.distro.syslinuxPath}/ldlinux.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1604
- await exec(`cp ${this.settings.distro.syslinuxPath}/libcom32.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1605
- await exec(`cp ${this.settings.distro.syslinuxPath}/libutil.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1606
- }
1605
+ await exec(`cp ${this.settings.distro.syslinuxPath}/ldlinux.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1606
+ await exec(`cp ${this.settings.distro.syslinuxPath}/libcom32.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1607
+ await exec(`cp ${this.settings.distro.syslinuxPath}/libutil.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
1607
1608
  }
1608
- // #######################################################################################
1609
- /**
1610
- * makeEfi
1611
- */
1612
1609
  /**
1613
1610
  *
1614
1611
  * @param cmd
@@ -1625,7 +1622,6 @@ export default class Ovary {
1625
1622
  await Utils.pressKeyToExit(cmd);
1626
1623
  }
1627
1624
  }
1628
- // #######################################################################################
1629
1625
  /**
1630
1626
  * ubind del fs live
1631
1627
  * @param verbose
@@ -1873,9 +1869,7 @@ function isMiso(distro) {
1873
1869
  return found;
1874
1870
  }
1875
1871
  /**
1876
- * se non zuppa, pan bagnato
1877
- * @param distro
1878
- * @returns
1872
+ * isArchiso: se non zuppa, pan bagnato
1879
1873
  */
1880
1874
  function isArchiso(distro) {
1881
1875
  return !isMiso(distro);
@@ -30,7 +30,7 @@ export default class Pacman {
30
30
  /**
31
31
  * calamaresPolicies
32
32
  */
33
- static calamaresPolicies(): Promise<void>;
33
+ static calamaresPolicies(verbose?: boolean): Promise<void>;
34
34
  /**
35
35
  *
36
36
  */
@@ -16,6 +16,7 @@ import Alpine from './families/alpine.js';
16
16
  import Archlinux from './families/archlinux.js';
17
17
  import Debian from './families/debian.js';
18
18
  import Fedora from './families/fedora.js';
19
+ import Opensuse from './families/opensuse.js';
19
20
  import Settings from './settings.js';
20
21
  import Utils from './utils.js';
21
22
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
@@ -82,6 +83,9 @@ export default class Pacman {
82
83
  else if (this.distro().familyId === 'alpine') {
83
84
  await Alpine.calamaresInstall(verbose);
84
85
  }
86
+ else if (this.distro().familyId === 'suse') {
87
+ await Opensuse.calamaresInstall(verbose);
88
+ }
85
89
  // remove others calamares links
86
90
  await exec('rm -f /usr/share/applications/calamares-eggs-debugging.desktop');
87
91
  await exec('rm -f /usr/share/applications/calamares-eggs.desktop');
@@ -91,19 +95,10 @@ export default class Pacman {
91
95
  /**
92
96
  * calamaresPolicies
93
97
  */
94
- static async calamaresPolicies() {
95
- if (this.distro().familyId === 'debian') {
96
- await Debian.calamaresPolicies();
97
- }
98
- else if (this.distro().familyId === 'fedora') {
99
- await Fedora.calamaresPolicies();
100
- }
101
- else if (this.distro().familyId === 'archlinux') {
102
- await Archlinux.calamaresPolicies();
103
- }
104
- else if (this.distro().familyId === 'alpine') {
105
- await Alpine.calamaresPolicies();
106
- }
98
+ static async calamaresPolicies(verbose = false) {
99
+ const echo = Utils.setEcho(verbose);
100
+ const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
101
+ await exec(`sed -i 's/auth_admin/yes/' ${policyFile}`, echo);
107
102
  }
108
103
  /**
109
104
  *
@@ -122,6 +117,9 @@ export default class Pacman {
122
117
  else if (this.distro().familyId === 'alpine') {
123
118
  retVal = await Alpine.calamaresRemove(verbose);
124
119
  }
120
+ else if (this.distro().familyId === 'suse') {
121
+ retVal = await Opensuse.calamaresRemove(verbose);
122
+ }
125
123
  return retVal;
126
124
  }
127
125
  /**
@@ -441,14 +439,11 @@ export default class Pacman {
441
439
  /***********************************************************************************
442
440
  * Fedora
443
441
  **********************************************************************************/
444
- /**
445
- * Fedora 35 ThirtyFive: eredita da ThirtyFive
446
- */
447
442
  }
448
- else if (this.distro().codenameLikeId === 'thirtyfive') {
449
- const dest = '/etc/penguins-eggs.d/distros/thirtyfive/';
450
- const thirtytive = `${rootPen}/conf/distros/thirtyfive/*`;
451
- await exec(`cp -r ${thirtytive} ${dest}`, echo);
443
+ else if (this.distro().codenameLikeId === 'fedora') {
444
+ const dest = '/etc/penguins-eggs.d/distros/fedora/';
445
+ const fedora = `${rootPen}/conf/distros/fedora/*`;
446
+ await exec(`cp -r ${fedora} ${dest}`, echo);
452
447
  /***********************************************************************************
453
448
  * Arch Linux
454
449
  **********************************************************************************/
@@ -469,6 +464,14 @@ export default class Pacman {
469
464
  const dest = '/etc/penguins-eggs.d/distros/alpine/';
470
465
  const alpine = `${rootPen}/conf/distros/alpine/`;
471
466
  await exec(`cp -r ${alpine}/calamares ${dest}/calamares`, echo);
467
+ /***********************************************************************************
468
+ * opensuse
469
+ **********************************************************************************/
470
+ }
471
+ else if (this.distro().codenameLikeId === 'suse') {
472
+ const dest = '/etc/penguins-eggs.d/distros/suse/';
473
+ const suse = `${rootPen}/conf/distros/suse/*`;
474
+ await exec(`cp -r ${suse} ${dest}`, echo);
472
475
  }
473
476
  }
474
477
  /**
@@ -510,8 +513,15 @@ export default class Pacman {
510
513
  installed = true;
511
514
  }
512
515
  }
513
- else if (this.distro().familyId === 'alpine' && Alpine.packageIsInstalled('xwayland*')) {
514
- installed = true;
516
+ else if (this.distro().familyId === 'alpine') {
517
+ if (Alpine.packageIsInstalled('xwayland*')) {
518
+ installed = true;
519
+ }
520
+ }
521
+ else if (this.distro().familyId === 'suse') {
522
+ if (Opensuse.packageIsInstalled('wayland')) {
523
+ installed = true;
524
+ }
515
525
  }
516
526
  return installed;
517
527
  }
@@ -536,8 +546,15 @@ export default class Pacman {
536
546
  installed = true;
537
547
  }
538
548
  }
539
- else if (this.distro().familyId === 'alpine' && Alpine.packageIsInstalled('xorg-server')) {
540
- installed = true;
549
+ else if (this.distro().familyId === 'alpine') {
550
+ if (Alpine.packageIsInstalled('xorg-server')) {
551
+ installed = true;
552
+ }
553
+ }
554
+ else if (this.distro().familyId === 'suse') {
555
+ if (Opensuse.packageIsInstalled('xorg-x11-server')) {
556
+ installed = true;
557
+ }
541
558
  }
542
559
  return installed;
543
560
  }
@@ -585,6 +602,9 @@ export default class Pacman {
585
602
  else if (Pacman.distro().familyId === 'alpine') {
586
603
  isUefi = true;
587
604
  }
605
+ else if (Pacman.distro().familyId === 'suse') {
606
+ isUefi = true;
607
+ }
588
608
  return isUefi;
589
609
  }
590
610
  /**
@@ -649,6 +669,9 @@ export default class Pacman {
649
669
  else if (this.distro().familyId === 'alpine') {
650
670
  retVal = await Alpine.packageInstall(packageName);
651
671
  }
672
+ else if (this.distro().familyId === 'suse') {
673
+ retVal = await Opensuse.packageInstall(packageName);
674
+ }
652
675
  return retVal;
653
676
  }
654
677
  /**
@@ -669,6 +692,9 @@ export default class Pacman {
669
692
  else if (this.distro().familyId === 'alpine') {
670
693
  installed = Alpine.packageIsInstalled(packageName);
671
694
  }
695
+ else if (this.distro().familyId === 'suse') {
696
+ installed = Opensuse.packageIsInstalled(packageName);
697
+ }
672
698
  return installed;
673
699
  }
674
700
  static async packageNpmLast(packageNpm = 'penguins-eggs') {
@@ -698,6 +724,9 @@ export default class Pacman {
698
724
  else if (this.distro().familyId === 'alpine') {
699
725
  grubInstalled = 'grub';
700
726
  }
727
+ else if (this.distro().familyId === 'suse') {
728
+ grubInstalled = 'grub'; //controllare
729
+ }
701
730
  return grubInstalled;
702
731
  }
703
732
  }