penguins-eggs 10.0.45 → 10.0.46

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 (28) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +26 -26
  3. package/conf/distros/buster/calamares/modules/displaymanager.yml +1 -2
  4. package/conf/distros/buster/calamares/modules/finished.yml +1 -2
  5. package/conf/distros/buster/calamares/modules/removeuser.yml +1 -1
  6. package/conf/distros/rolling/calamares/modules/displaymanager.yml +1 -2
  7. package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +1 -1
  8. package/dist/classes/families/archlinux.js +2 -1
  9. package/dist/classes/incubation/fisherman-helper/displaymanager.d.ts +1 -1
  10. package/dist/classes/incubation/fisherman-helper/displaymanager.js +27 -26
  11. package/dist/classes/incubation/fisherman-helper/settings.js +1 -1
  12. package/dist/classes/incubation/fisherman.d.ts +19 -26
  13. package/dist/classes/incubation/fisherman.js +101 -54
  14. package/dist/classes/incubation/incubator.d.ts +4 -0
  15. package/dist/classes/incubation/incubator.js +36 -3
  16. package/dist/classes/ovary.js +1 -1
  17. package/dist/classes/settings.js +2 -2
  18. package/dist/interfaces/i-calamares-displaymanager.d.ts +17 -0
  19. package/dist/interfaces/i-calamares-displaymanager.js +1 -0
  20. package/dist/interfaces/i-calamares-finished.d.ts +12 -0
  21. package/dist/interfaces/i-calamares-finished.js +1 -0
  22. package/dist/interfaces/i-calamares-packages.d.ts +28 -0
  23. package/dist/interfaces/i-calamares-packages.js +1 -0
  24. package/dist/interfaces/i-calamares-partition.d.ts +28 -6
  25. package/dist/interfaces/i-calamares-partition.js +0 -7
  26. package/package.json +5 -5
  27. package/dist/classes/n8.d.ts +0 -18
  28. package/dist/classes/n8.js +0 -36
@@ -1498,5 +1498,5 @@
1498
1498
  ]
1499
1499
  }
1500
1500
  },
1501
- "version": "10.0.45"
1501
+ "version": "10.0.46"
1502
1502
  }
package/README.md CHANGED
@@ -490,7 +490,7 @@ EXAMPLES
490
490
  $ eggs adapt
491
491
  ```
492
492
 
493
- _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/adapt.ts)_
493
+ _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/adapt.ts)_
494
494
 
495
495
  ## `eggs analyze`
496
496
 
@@ -511,7 +511,7 @@ EXAMPLES
511
511
  sudo eggs analyze
512
512
  ```
513
513
 
514
- _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/analyze.ts)_
514
+ _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/analyze.ts)_
515
515
 
516
516
  ## `eggs autocomplete [SHELL]`
517
517
 
@@ -575,7 +575,7 @@ EXAMPLES
575
575
  sudo eggs calamares --remove
576
576
  ```
577
577
 
578
- _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/calamares.ts)_
578
+ _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/calamares.ts)_
579
579
 
580
580
  ## `eggs config`
581
581
 
@@ -602,7 +602,7 @@ EXAMPLES
602
602
  sudo eggs config --clean --nointeractive
603
603
  ```
604
604
 
605
- _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/config.ts)_
605
+ _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/config.ts)_
606
606
 
607
607
  ## `eggs cuckoo`
608
608
 
@@ -622,7 +622,7 @@ EXAMPLES
622
622
  sudo eggs cuckoo
623
623
  ```
624
624
 
625
- _See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/cuckoo.ts)_
625
+ _See code: [src/commands/cuckoo.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/cuckoo.ts)_
626
626
 
627
627
  ## `eggs dad`
628
628
 
@@ -650,7 +650,7 @@ EXAMPLES
650
650
  sudo dad --default
651
651
  ```
652
652
 
653
- _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/dad.ts)_
653
+ _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/dad.ts)_
654
654
 
655
655
  ## `eggs export iso`
656
656
 
@@ -675,7 +675,7 @@ EXAMPLES
675
675
  $ eggs export iso --clean
676
676
  ```
677
677
 
678
- _See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/export/iso.ts)_
678
+ _See code: [src/commands/export/iso.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/export/iso.ts)_
679
679
 
680
680
  ## `eggs export pkg`
681
681
 
@@ -702,7 +702,7 @@ EXAMPLES
702
702
  $ eggs export pkg --all
703
703
  ```
704
704
 
705
- _See code: [src/commands/export/pkg.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/export/pkg.ts)_
705
+ _See code: [src/commands/export/pkg.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/export/pkg.ts)_
706
706
 
707
707
  ## `eggs help [COMMAND]`
708
708
 
@@ -763,7 +763,7 @@ EXAMPLES
763
763
  sudo eggs install --chroot
764
764
  ```
765
765
 
766
- _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/install.ts)_
766
+ _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/install.ts)_
767
767
 
768
768
  ## `eggs kill`
769
769
 
@@ -786,7 +786,7 @@ EXAMPLES
786
786
  sudo eggs kill
787
787
  ```
788
788
 
789
- _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/kill.ts)_
789
+ _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/kill.ts)_
790
790
 
791
791
  ## `eggs krill`
792
792
 
@@ -846,7 +846,7 @@ EXAMPLES
846
846
  $ eggs auto
847
847
  ```
848
848
 
849
- _See code: [src/commands/love.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/love.ts)_
849
+ _See code: [src/commands/love.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/love.ts)_
850
850
 
851
851
  ## `eggs mom`
852
852
 
@@ -866,7 +866,7 @@ EXAMPLES
866
866
  $ eggs mom
867
867
  ```
868
868
 
869
- _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/mom.ts)_
869
+ _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/mom.ts)_
870
870
 
871
871
  ## `eggs produce`
872
872
 
@@ -923,7 +923,7 @@ EXAMPLES
923
923
  sudo eggs produce --excludes home # exclude ~/*
924
924
  ```
925
925
 
926
- _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/produce.ts)_
926
+ _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/produce.ts)_
927
927
 
928
928
  ## `eggs status`
929
929
 
@@ -944,7 +944,7 @@ EXAMPLES
944
944
  $ eggs status
945
945
  ```
946
946
 
947
- _See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/status.ts)_
947
+ _See code: [src/commands/status.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/status.ts)_
948
948
 
949
949
  ## `eggs syncfrom`
950
950
 
@@ -970,7 +970,7 @@ EXAMPLES
970
970
  sudo eggs syncfrom --file /path/to/luks-volume
971
971
  ```
972
972
 
973
- _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/syncfrom.ts)_
973
+ _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/syncfrom.ts)_
974
974
 
975
975
  ## `eggs syncto`
976
976
 
@@ -997,7 +997,7 @@ EXAMPLES
997
997
  sudo eggs syncto --excludes
998
998
  ```
999
999
 
1000
- _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/syncto.ts)_
1000
+ _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/syncto.ts)_
1001
1001
 
1002
1002
  ## `eggs tools clean`
1003
1003
 
@@ -1019,7 +1019,7 @@ EXAMPLES
1019
1019
  sudo eggs tools clean
1020
1020
  ```
1021
1021
 
1022
- _See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/tools/clean.ts)_
1022
+ _See code: [src/commands/tools/clean.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/tools/clean.ts)_
1023
1023
 
1024
1024
  ## `eggs tools ppa`
1025
1025
 
@@ -1045,7 +1045,7 @@ EXAMPLES
1045
1045
  sudo eggs tools ppa --remove
1046
1046
  ```
1047
1047
 
1048
- _See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/tools/ppa.ts)_
1048
+ _See code: [src/commands/tools/ppa.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/tools/ppa.ts)_
1049
1049
 
1050
1050
  ## `eggs tools skel`
1051
1051
 
@@ -1069,7 +1069,7 @@ EXAMPLES
1069
1069
  sudo eggs tools skel --user user-to-be-copied
1070
1070
  ```
1071
1071
 
1072
- _See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/tools/skel.ts)_
1072
+ _See code: [src/commands/tools/skel.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/tools/skel.ts)_
1073
1073
 
1074
1074
  ## `eggs tools stat`
1075
1075
 
@@ -1095,7 +1095,7 @@ EXAMPLES
1095
1095
  $ eggs tools stat --year
1096
1096
  ```
1097
1097
 
1098
- _See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/tools/stat.ts)_
1098
+ _See code: [src/commands/tools/stat.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/tools/stat.ts)_
1099
1099
 
1100
1100
  ## `eggs tools yolk`
1101
1101
 
@@ -1116,7 +1116,7 @@ EXAMPLES
1116
1116
  sudo eggs tools yolk
1117
1117
  ```
1118
1118
 
1119
- _See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/tools/yolk.ts)_
1119
+ _See code: [src/commands/tools/yolk.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/tools/yolk.ts)_
1120
1120
 
1121
1121
  ## `eggs update`
1122
1122
 
@@ -1137,7 +1137,7 @@ EXAMPLES
1137
1137
  $ eggs update
1138
1138
  ```
1139
1139
 
1140
- _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/update.ts)_
1140
+ _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/update.ts)_
1141
1141
 
1142
1142
  ## `eggs version`
1143
1143
 
@@ -1183,7 +1183,7 @@ EXAMPLES
1183
1183
  $ eggs wardrobe get your-wardrobe
1184
1184
  ```
1185
1185
 
1186
- _See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/wardrobe/get.ts)_
1186
+ _See code: [src/commands/wardrobe/get.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/wardrobe/get.ts)_
1187
1187
 
1188
1188
  ## `eggs wardrobe list [REPO]`
1189
1189
 
@@ -1212,7 +1212,7 @@ EXAMPLES
1212
1212
  $ eggs wardrobe list --distro arch
1213
1213
  ```
1214
1214
 
1215
- _See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/wardrobe/list.ts)_
1215
+ _See code: [src/commands/wardrobe/list.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/wardrobe/list.ts)_
1216
1216
 
1217
1217
  ## `eggs wardrobe show [REPO]`
1218
1218
 
@@ -1242,7 +1242,7 @@ EXAMPLES
1242
1242
  $ eggs wardrobe show accessories/
1243
1243
  ```
1244
1244
 
1245
- _See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/wardrobe/show.ts)_
1245
+ _See code: [src/commands/wardrobe/show.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/wardrobe/show.ts)_
1246
1246
 
1247
1247
  ## `eggs wardrobe wear [REPO]`
1248
1248
 
@@ -1273,7 +1273,7 @@ EXAMPLES
1273
1273
  sudo eggs wardrobe wear wagtail/waydroid
1274
1274
  ```
1275
1275
 
1276
- _See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.45/src/commands/wardrobe/wear.ts)_
1276
+ _See code: [src/commands/wardrobe/wear.ts](https://github.com/pieroproietti/penguins-eggs/blob/v10.0.46/src/commands/wardrobe/wear.ts)_
1277
1277
  <!-- commandsstop -->
1278
1278
 
1279
1279
  # penGUI
@@ -5,8 +5,7 @@
5
5
  #The DM module attempts to set up all the DMs found in this list, in that precise order.
6
6
  #It also sets up autologin, if the feature is enabled in globalstorage.
7
7
  #The displaymanagers list can also be set in globalstorage, and in that case it overrides anything set up here.
8
- displaymanagers:
9
- {{displaymanagers}}
8
+ displaymanagers: none
10
9
 
11
10
  #Enable the following settings to force a desktop environment in your displaymanager configuration file:
12
11
  #defaultDesktopEnvironment:
@@ -2,5 +2,4 @@
2
2
  ---
3
3
  restartNowEnabled: true
4
4
  restartNowChecked: true
5
- restartNowCommand: {{restartNowCommand}}
6
- # restartNowCommand: "systemctl -i reboot"
5
+ restartNowCommand: none
@@ -12,4 +12,4 @@
12
12
  # continues as normal.
13
13
  ---
14
14
  # Username in the target system to be removed.
15
- username: {{username}}
15
+ username: node
@@ -4,8 +4,7 @@
4
4
  #The DM module attempts to set up all the DMs found in this list, in that precise order.
5
5
  #It also sets up autologin, if the feature is enabled in globalstorage.
6
6
  #The displaymanagers list can also be set in globalstorage, and in that case it overrides anything set up here.
7
- displaymanagers:
8
- {{displaymanagers}}
7
+ displaymanagers: none
9
8
 
10
9
  #Enable the following settings to force a desktop environment in your displaymanager configuration file:
11
10
  #defaultDesktopEnvironment:
@@ -1,6 +1,6 @@
1
1
  # Arch
2
2
  # Calamares 3.3
3
- --
3
+ ---
4
4
  dontChroot: false
5
5
  timeout: 30
6
6
  script:
@@ -21,7 +21,8 @@ export default class Archlinux {
21
21
  static async calamaresInstall(verbose = false) {
22
22
  verbose = true; // serve per pacman
23
23
  const echo = Utils.setEcho(verbose);
24
- const cal_eggs = 'calamares-eggs-3.3.9-1-x86_64.pkg.tar.zst'; // 01/09/2024
24
+ // const cal_eggs = 'calamares-eggs-3.3.9-1-x86_64.pkg.tar.zst' // 01/09/2024
25
+ const cal_eggs = 'calamares-eggs-3.3.10-1-x86_64.pkg.tar.zst'; // 24/10/2024
25
26
  let cmd = `wget -O /tmp/${cal_eggs} https://sourceforge.net/projects/penguins-eggs/files/Packages/AUR/${cal_eggs}/download`;
26
27
  try {
27
28
  await exec(cmd, echo);
@@ -8,4 +8,4 @@
8
8
  /**
9
9
  * restituisce displaymanagers in uso
10
10
  */
11
- export declare function displaymanager(): string;
11
+ export declare function displaymanager(): string[];
@@ -10,30 +10,31 @@ import Pacman from '../../pacman.js';
10
10
  * restituisce displaymanagers in uso
11
11
  */
12
12
  export function displaymanager() {
13
- let text = '';
14
- text += addIfExist('slim');
15
- text += addIfExist('sddm');
16
- text += addIfExist('lightdm');
17
- text += addIfExist('gdm');
18
- text += addIfExist('gdm3');
19
- text += addIfExist('mdm');
20
- text += addIfExist('lxdm');
21
- text += addIfExist('kdm');
22
- return text;
23
- }
24
- /*
25
- * @param package2check
26
- */
27
- function addIfExist(package2check) {
28
- let content = '';
29
- if (Pacman.packageIsInstalled(package2check)) {
30
- let displayManager = package2check;
31
- if (package2check === 'gdm3') {
32
- // gdm3 is treat as gdm
33
- displayManager = 'gdm';
34
- }
35
- content = `- ${displayManager}\n`;
36
- // text += text === '' ? `- ${displayManager}\n` : ` - ${displayManager}\n`
37
- }
38
- return content;
13
+ let ret = [];
14
+ if (Pacman.packageIsInstalled('gdm')) {
15
+ ret.push('gdm');
16
+ }
17
+ if (Pacman.packageIsInstalled('gdm3')) {
18
+ // gdm3 viene trattato come gdm
19
+ ret.push('gdm');
20
+ }
21
+ if (Pacman.packageIsInstalled('kdm')) {
22
+ ret.push('kdm');
23
+ }
24
+ if (Pacman.packageIsInstalled('lightdm')) {
25
+ ret.push('lightdm');
26
+ }
27
+ if (Pacman.packageIsInstalled('lxdm')) {
28
+ ret.push('lxdm');
29
+ }
30
+ if (Pacman.packageIsInstalled('mdm')) {
31
+ ret.push('mdm');
32
+ }
33
+ if (Pacman.packageIsInstalled('sddm')) {
34
+ ret.push('sddm');
35
+ }
36
+ if (Pacman.packageIsInstalled('slim')) {
37
+ ret.push('slim');
38
+ }
39
+ return ret;
39
40
  }
@@ -40,7 +40,7 @@ export async function settings(src, dest, theme = 'eggs', isClone = false) {
40
40
  createUsers = '# ';
41
41
  }
42
42
  let hasDisplaymanager = '# ';
43
- if (displaymanager() !== '') {
43
+ if (displaymanager().length > 0) {
44
44
  hasDisplaymanager = '- ';
45
45
  }
46
46
  shx.sed('-i', '{{hasSystemd}}', hasSystemd, settingsDest);
@@ -1,10 +1,3 @@
1
- /**
2
- * ./src/classes/incubation/fisherman.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
1
  import { IDistro, IInstaller } from '../../interfaces/index.js';
9
2
  export default class Fisherman {
10
3
  distro: IDistro;
@@ -38,20 +31,32 @@ export default class Fisherman {
38
31
  */
39
32
  createCalamaresSettings(theme?: string, isClone?: boolean): Promise<void>;
40
33
  /**
41
- * usa i moduli-ts
34
+ *
35
+ * @param name
42
36
  */
43
- moduleDisplaymanager(): Promise<void>;
37
+ shellprocess(name: string): Promise<void>;
38
+ /**
39
+ *
40
+ * @param module
41
+ * @param type
42
+ * @param path
43
+ */
44
+ show(name: string, type: string, path: string): void;
45
+ /**
46
+ * ====================================================================================
47
+ * M O D U L E S
48
+ * ====================================================================================
49
+ */
44
50
  /**
45
51
  * Al momento rimane con la vecchia configurazione
46
52
  */
47
- moduleFinished(): Promise<void>;
53
+ moduleDisplaymanager(): Promise<void>;
48
54
  /**
49
- * ====================================================================================
50
- * M O D U L E S
51
- * ====================================================================================
55
+ * Al momento rimane con la vecchia configurazione
52
56
  */
57
+ moduleFinished(): Promise<void>;
53
58
  /**
54
- * usa i moduli-ts
59
+ * Al momento rimane con la vecchia configurazione
55
60
  */
56
61
  modulePackages(distro: IDistro, release?: boolean): Promise<void>;
57
62
  /**
@@ -62,16 +67,4 @@ export default class Fisherman {
62
67
  * Al momento rimane con la vecchia configurazione
63
68
  */
64
69
  moduleUnpackfs(): Promise<void>;
65
- /**
66
- *
67
- * @param name
68
- */
69
- shellprocess(name: string): Promise<void>;
70
- /**
71
- *
72
- * @param module
73
- * @param type
74
- * @param path
75
- */
76
- show(name: string, type: string, path: string): void;
77
70
  }
@@ -10,10 +10,15 @@ import mustache from 'mustache';
10
10
  import fs from 'node:fs';
11
11
  import path from 'node:path';
12
12
  import shx from 'shelljs';
13
+ import yaml from 'js-yaml';
13
14
  import { exec } from '../../lib/utils.js';
14
15
  import { settings } from './fisherman-helper/settings.js';
15
16
  // _dirname
16
17
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
18
+ // pjson
19
+ import { createRequire } from 'node:module';
20
+ const require = createRequire(import.meta.url);
21
+ const pjson = require('../../../package.json');
17
22
  /**
18
23
  * vecchi require che vanno sostituiti con import
19
24
  */
@@ -74,7 +79,7 @@ export default class Fisherman {
74
79
  * @param name
75
80
  * @param replaces [['search','replace']]
76
81
  */
77
- async buildModule(name, vendor = '') {
82
+ async buildModule(name, vendor = 'eggs') {
78
83
  let moduleSource = path.resolve(__dirname, this.installer.templateModules + name + '.yml');
79
84
  /**
80
85
  * We need vendor here to have possibility to load custom modules for calamares
@@ -148,13 +153,68 @@ export default class Fisherman {
148
153
  await settings(this.installer.template, this.installer.configRoot, theme, isClone);
149
154
  }
150
155
  /**
151
- * usa i moduli-ts
156
+ *
157
+ * @param name
158
+ */
159
+ async shellprocess(name) {
160
+ const moduleSource = path.resolve(__dirname, this.installer.templateModules + 'shellprocess_' + name + '.yml');
161
+ const moduleDest = this.installer.modules + 'shellprocess_' + name + '.conf';
162
+ if (fs.existsSync(moduleSource)) {
163
+ if (this.verbose)
164
+ this.show(name, 'shellprocess', moduleDest);
165
+ shx.cp(moduleSource, moduleDest);
166
+ }
167
+ else if (this.verbose) {
168
+ console.log(`calamares: ${name} shellprocess, nothing to do`);
169
+ }
170
+ }
171
+ /**
172
+ *
173
+ * @param module
174
+ * @param type
175
+ * @param path
176
+ */
177
+ show(name, type, path) {
178
+ switch (type) {
179
+ case 'module': {
180
+ console.log('fisherman: ' + chalk.yellow(name) + ' module in ' + chalk.yellow(path));
181
+ break;
182
+ }
183
+ case 'calamares_module': {
184
+ console.log('fisherman: ' + chalk.cyanBright(name) + ' calamares_module in ' + chalk.cyanBright(path));
185
+ break;
186
+ }
187
+ case 'shellprocess': {
188
+ console.log('fisherman: ' + chalk.green(name) + ' shellprocess in ' + chalk.green(path));
189
+ break;
190
+ }
191
+ case 'contextualprocess': {
192
+ console.log('fisherman: ' + chalk.cyanBright(name) + ' shellprocess in ' + chalk.cyanBright(path));
193
+ break;
194
+ }
195
+ // No default
196
+ }
197
+ }
198
+ /**
199
+ * ====================================================================================
200
+ * M O D U L E S
201
+ * ====================================================================================
202
+ */
203
+ /**
204
+ * Al momento rimane con la vecchia configurazione
152
205
  */
153
206
  async moduleDisplaymanager() {
154
207
  const name = 'displaymanager';
155
208
  // const displaymanager = require('./fisherman-helper/displaymanager').displaymanager
156
209
  this.buildModule(name);
157
- shx.sed('-i', '{{displaymanagers}}', displaymanager(), this.installer.modules + name + '.conf');
210
+ let file = `/etc/calamares/modules/${name}.conf`;
211
+ let fileContent = fs.readFileSync(file, 'utf8');
212
+ let yamlValues = yaml.load(fileContent);
213
+ yamlValues.displaymanagers = displaymanager();
214
+ let destContent = `# ${name}.conf, created by penguins-eggs ${pjson.version}\n`;
215
+ destContent += '---\n';
216
+ destContent += yaml.dump(yamlValues);
217
+ fs.writeFileSync(file, destContent, 'utf8');
158
218
  }
159
219
  /**
160
220
  * Al momento rimane con la vecchia configurazione
@@ -162,16 +222,16 @@ export default class Fisherman {
162
222
  async moduleFinished() {
163
223
  const name = 'finished';
164
224
  await this.buildModule(name);
165
- const restartNowCommand = 'reboot';
166
- shx.sed('-i', '{{restartNowCommand}}', restartNowCommand, this.installer.modules + name + '.conf');
225
+ let file = `/etc/calamares/modules/${name}.conf`;
226
+ let fileContent = fs.readFileSync(file, 'utf8');
227
+ let yamlValues = yaml.load(fileContent);
228
+ yamlValues.restartNowCommand = 'reboot';
229
+ let destContent = `# ${name}.conf, created by penguins-eggs ${pjson.version}\n`;
230
+ destContent += '---\n';
231
+ destContent += yaml.dump(yamlValues);
167
232
  }
168
233
  /**
169
- * ====================================================================================
170
- * M O D U L E S
171
- * ====================================================================================
172
- */
173
- /**
174
- * usa i moduli-ts
234
+ * Al momento rimane con la vecchia configurazione
175
235
  */
176
236
  async modulePackages(distro, release = false) {
177
237
  const name = 'packages';
@@ -189,6 +249,36 @@ export default class Fisherman {
189
249
  }
190
250
  shx.sed('-i', '{{operations}}', operations, this.installer.modules + name + '.conf');
191
251
  }
252
+ /*
253
+ const name = 'packages'
254
+ this.buildModule(name)
255
+ let file = `/etc/calamares/modules/${name}.conf`
256
+ let fileContent = fs.readFileSync(file, 'utf8')
257
+ let values = yaml.load(fileContent) as ICalamaresPackages
258
+ console.log(values)
259
+ let destContent = `# ${name}.conf, created by penguins-eggs ${pjson.version}\n`
260
+ destContent += '---\n'
261
+ destContent += yaml.dump(values)
262
+
263
+ // const removePackages = require('./fisherman-helper/packages').remove
264
+ // const tryInstall = require('./fisherman-helper/packages').tryInstall
265
+
266
+
267
+ const yamlInstall = tryInstall(distro)
268
+
269
+ let yamlRemove = ''
270
+ if (release) {
271
+ yamlRemove = removePackages(distro)
272
+ }
273
+
274
+ let operations = ''
275
+ if (yamlRemove !== '' || yamlInstall !== '') {
276
+ operations = 'operations:\n' + yamlRemove + yamlInstall
277
+ }
278
+
279
+ shx.sed('-i', '{{operations}}', operations, this.installer.modules + name + '.conf')
280
+ }
281
+ */
192
282
  /**
193
283
  * Al momento rimane con la vecchia configurazione
194
284
  */
@@ -205,47 +295,4 @@ export default class Fisherman {
205
295
  this.buildModule(name);
206
296
  shx.sed('-i', '{{source}}', this.distro.liveMediumPath + this.distro.squashfs, this.installer.modules + name + '.conf');
207
297
  }
208
- /**
209
- *
210
- * @param name
211
- */
212
- async shellprocess(name) {
213
- const moduleSource = path.resolve(__dirname, this.installer.templateModules + 'shellprocess_' + name + '.yml');
214
- const moduleDest = this.installer.modules + 'shellprocess_' + name + '.conf';
215
- if (fs.existsSync(moduleSource)) {
216
- if (this.verbose)
217
- this.show(name, 'shellprocess', moduleDest);
218
- shx.cp(moduleSource, moduleDest);
219
- }
220
- else if (this.verbose) {
221
- console.log(`calamares: ${name} shellprocess, nothing to do`);
222
- }
223
- }
224
- /**
225
- *
226
- * @param module
227
- * @param type
228
- * @param path
229
- */
230
- show(name, type, path) {
231
- switch (type) {
232
- case 'module': {
233
- console.log('fisherman: ' + chalk.yellow(name) + ' module in ' + chalk.yellow(path));
234
- break;
235
- }
236
- case 'calamares_module': {
237
- console.log('fisherman: ' + chalk.cyanBright(name) + ' calamares_module in ' + chalk.cyanBright(path));
238
- break;
239
- }
240
- case 'shellprocess': {
241
- console.log('fisherman: ' + chalk.green(name) + ' shellprocess in ' + chalk.green(path));
242
- break;
243
- }
244
- case 'contextualprocess': {
245
- console.log('fisherman: ' + chalk.cyanBright(name) + ' shellprocess in ' + chalk.cyanBright(path));
246
- break;
247
- }
248
- // No default
249
- }
250
- }
251
298
  }
@@ -29,6 +29,10 @@ export default class Incubator {
29
29
  * config
30
30
  */
31
31
  config(release?: boolean): Promise<void>;
32
+ /**
33
+ *
34
+ */
35
+ private compact;
32
36
  /**
33
37
  *
34
38
  */
@@ -5,11 +5,16 @@
5
5
  * email: piero.proietti@gmail.com
6
6
  * license: MIT
7
7
  */
8
+ // pjson
9
+ import { createRequire } from 'node:module';
10
+ const require = createRequire(import.meta.url);
11
+ const pjson = require('../../../package.json');
8
12
  // partition
9
13
  import yaml from 'js-yaml';
10
14
  import fs from 'node:fs';
11
15
  import path from 'node:path';
12
16
  import shx from 'shelljs';
17
+ import { exec } from '../../lib/utils.js';
13
18
  import Pacman from '../pacman.js';
14
19
  import Utils from '../utils.js';
15
20
  import { Alpine } from './distros/alpine.js';
@@ -178,9 +183,35 @@ export default class Incubator {
178
183
  }
179
184
  }
180
185
  if (Pacman.calamaresExists()) {
181
- partitionCustomize();
186
+ await partitionCustomize();
187
+ await this.compact();
182
188
  }
183
189
  }
190
+ /**
191
+ *
192
+ */
193
+ async compact() {
194
+ // modules
195
+ let path = '/etc/calamares/modules/';
196
+ const elements = fs.readdirSync(path);
197
+ for (const elem of elements) {
198
+ let file = path + elem;
199
+ let fileContent = fs.readFileSync(file, 'utf8');
200
+ let yamlContent = yaml.load(fileContent);
201
+ let destContent = `# ${elem}, created by penguins-eggs ${pjson.version}\n`;
202
+ destContent += '---\n';
203
+ destContent += yaml.dump(yamlContent);
204
+ fs.writeFileSync(file, destContent, 'utf8');
205
+ }
206
+ // settings
207
+ let file = '/etc/calamares/settings.conf';
208
+ let fileContent = fs.readFileSync(file, 'utf8');
209
+ let yamlContent = yaml.load(fileContent);
210
+ let destContent = `# settings.conf, created by penguins-eggs ${pjson.version}\n`;
211
+ destContent += '---\n';
212
+ destContent += yaml.dump(yamlContent);
213
+ fs.writeFileSync(file, destContent, 'utf8');
214
+ }
184
215
  /**
185
216
  *
186
217
  */
@@ -331,10 +362,12 @@ function write(file, content, verbose = false) {
331
362
  /**
332
363
  *
333
364
  */
334
- function partitionCustomize() {
365
+ async function partitionCustomize() {
335
366
  const filePartition = '/etc/calamares/modules/partition.conf';
336
367
  const partition = yaml.load(fs.readFileSync(filePartition, 'utf8'));
337
- partition.defaultFileSystemType = 'ext4';
368
+ // detect filesystem type
369
+ let test = await exec(`df -T / | awk 'NR==2 {print $2}'`, { capture: true, echo: false });
370
+ partition.defaultFileSystemType = test.data.trim();
338
371
  partition.availableFileSystemTypes = ['ext4'];
339
372
  if (Pacman.packageIsInstalled('btrfs-progs')) {
340
373
  partition.availableFileSystemTypes.push('btrfs');
@@ -1508,7 +1508,7 @@ export default class Ovary {
1508
1508
  /**
1509
1509
  * GUI installed but NOT Desktop Manager: just create motd and issue
1510
1510
  */
1511
- if (displaymanager() === '') {
1511
+ if (displaymanager().length > 0) {
1512
1512
  this.cliAutologin.addIssue(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
1513
1513
  this.cliAutologin.addMotd(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
1514
1514
  }
@@ -9,10 +9,10 @@ import chalk from 'chalk';
9
9
  import yaml from 'js-yaml';
10
10
  // packages
11
11
  import fs from 'node:fs';
12
- // pjson
13
- import { createRequire } from 'node:module';
14
12
  import os from 'node:os';
15
13
  import shx from 'shelljs';
14
+ // pjson
15
+ import { createRequire } from 'node:module';
16
16
  const require = createRequire(import.meta.url);
17
17
  const pjson = require('../../package.json');
18
18
  import Distro from './distro.js';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ./src/interfaces/i-calamares-displaymanager.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
+ export interface ICalamaresDisplaymanager {
9
+ displaymanagers: string[];
10
+ basicSetup: boolean;
11
+ sysconfigSetup: boolean;
12
+ defaultDesktopEnvironment?: DesktopEnvironment;
13
+ }
14
+ export interface DesktopEnvironment {
15
+ executable: string;
16
+ desktopFile: string;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * ./src/interfaces/i-calamares-finished.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
+ export interface ICalamaresFinished {
9
+ restartNowMode: 'never' | 'user-unchecked' | 'user-checked' | 'always';
10
+ restartNowCommand?: string;
11
+ notifyOnFinished: boolean;
12
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,28 @@
1
+ /**
2
+ * ./src/interfaces/i-calamares-packages.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
+ export interface ICalamaresPackages {
9
+ backend: 'apk' | 'apt' | 'dnf' | 'dnf5' | 'entropy' | 'luet' | 'packagekit' | 'pacman' | 'pamac' | 'portage' | 'yum' | 'zypp' | 'dummy';
10
+ update_db?: boolean;
11
+ update_system?: boolean;
12
+ skip_if_no_internet?: boolean;
13
+ pacman?: PacmanConfig;
14
+ operations?: Operation[];
15
+ }
16
+ export interface PacmanConfig {
17
+ num_retries?: number;
18
+ disable_download_timeout?: boolean;
19
+ needed_only?: boolean;
20
+ }
21
+ export interface Operation {
22
+ install?: any[];
23
+ remove?: any[];
24
+ try_install?: any[];
25
+ try_remove?: any[];
26
+ localInstall?: any[];
27
+ source?: string;
28
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -6,13 +6,35 @@
6
6
  * license: MIT
7
7
  */
8
8
  export interface ICalamaresPartition {
9
- alwaysShowPartitionLabels: boolean;
10
- availableFileSystemTypes: string[];
11
- defaultFileSystemType: string;
12
- drawNestedPartitions: boolean;
13
9
  efiSystemPartition: string;
10
+ efiSystemPartitionSize?: string;
11
+ userSwapChoices: string[];
12
+ swapPartitionName?: string;
13
+ drawNestedPartitions: boolean;
14
+ alwaysShowPartitionLabels: boolean;
14
15
  initialPartitioningChoice: string;
15
16
  initialSwapChoice: string;
16
- requiredStorage: 6;
17
- userSwapChoices: string[];
17
+ defaultFileSystemType: string;
18
+ availableFileSystemTypes: string[];
19
+ requiredStorage: number;
20
+ ensureSuspendToDisk?: boolean;
21
+ neverCreateSwap?: boolean;
22
+ defaultPartitionTableType?: string;
23
+ requiredPartitionTableType?: string | string[];
24
+ enableLuksAutomatedPartitioning?: boolean;
25
+ partitionLayout?: PartitionLayout[];
26
+ }
27
+ export interface PartitionLayout {
28
+ name: string;
29
+ type?: string;
30
+ uuid?: string;
31
+ attributes?: string;
32
+ filesystem?: string;
33
+ mountPoint?: string;
34
+ size: string;
35
+ minSize?: string;
36
+ maxSize?: string;
37
+ features?: {
38
+ [key: string]: boolean | number | string;
39
+ };
18
40
  }
@@ -1,8 +1 @@
1
- /**
2
- * ./src/interfaces/i-calamares-partition.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
1
  export {};
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "penguins-eggs",
3
3
  "shortName": "eggs",
4
4
  "description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
5
- "version": "10.0.45",
5
+ "version": "10.0.46",
6
6
  "author": "Piero Proietti",
7
7
  "bin": {
8
8
  "eggs": "./bin/run.js"
9
9
  },
10
10
  "bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
11
11
  "dependencies": {
12
- "@oclif/core": "^4.0.28",
12
+ "@oclif/core": "^4.0.30",
13
13
  "@oclif/plugin-autocomplete": "^3.2.6",
14
14
  "@oclif/plugin-help": "^6.2.16",
15
15
  "@oclif/plugin-version": "^2.2.15",
@@ -44,15 +44,15 @@
44
44
  "@types/netmask": "^2.0.5",
45
45
  "@types/node": "^20.16.1",
46
46
  "@types/node-static": "^0.7.11",
47
- "@types/react": "^18.3.10",
47
+ "@types/react": "^18.3.12",
48
48
  "@types/shelljs": "^0.8.15",
49
- "chai": "^5.1.1",
49
+ "chai": "^5.1.2",
50
50
  "eslint": "^8.57.0",
51
51
  "eslint-config-oclif": "^5.2.1",
52
52
  "eslint-config-oclif-typescript": "^3.1.12",
53
53
  "eslint-config-prettier": "^9.1.0",
54
54
  "mocha": "^10.7.3",
55
- "oclif": "^4.15.8",
55
+ "oclif": "^4.15.12",
56
56
  "perrisbrewery": "^10.0.2",
57
57
  "prettier": "^3.3.3",
58
58
  "shx": "^0.3.4",
@@ -1,18 +0,0 @@
1
- /**
2
- * ./src/classes/n8.ts (node 8)
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 { Dirent } from 'node:fs';
9
- export default class n8 {
10
- static dirent2string(dir: Dirent): string;
11
- /**
12
- *
13
- * @param dirPath
14
- */
15
- static isDirectory(name: string): boolean;
16
- static isFile(name: string): boolean;
17
- static isSymbolicLink(name: string): boolean;
18
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * ./src/classes/n8.ts (node 8)
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 fs from 'node:fs';
9
- export default class n8 {
10
- static dirent2string(dir) {
11
- return dir.name;
12
- // Removed not needed more node8 is past
13
- let dirname = '';
14
- dirname = process.versions.node.split('.')[0] === '8' ? JSON.stringify(dir).replace('"', '').replace('"', '') : dir.name;
15
- return dirname;
16
- }
17
- /**
18
- *
19
- * @param dirPath
20
- */
21
- static isDirectory(name) {
22
- const path = '/' + name;
23
- const isDirectory = fs.existsSync(path) && fs.lstatSync(path).isDirectory();
24
- return isDirectory;
25
- }
26
- static isFile(name) {
27
- const path = '/' + name;
28
- const isFile = fs.existsSync(path) && fs.lstatSync(path).isFile();
29
- return isFile;
30
- }
31
- static isSymbolicLink(name) {
32
- const path = '/' + name;
33
- const isSymbolicLink = fs.existsSync(path) && fs.lstatSync(path).isSymbolicLink();
34
- return isSymbolicLink;
35
- }
36
- }