penguins-eggs 10.0.44 → 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.
- package/.oclif.manifest.json +1 -1
- package/README.md +27 -27
- package/conf/distros/buster/calamares/modules/displaymanager.yml +1 -2
- package/conf/distros/buster/calamares/modules/finished.yml +1 -2
- package/conf/distros/buster/calamares/modules/removeuser.yml +1 -1
- package/conf/distros/rolling/calamares/modules/displaymanager.yml +1 -2
- package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +1 -1
- package/dist/classes/daddy.js +6 -0
- package/dist/classes/families/archlinux.js +2 -1
- package/dist/classes/incubation/fisherman-helper/displaymanager.d.ts +1 -1
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +27 -26
- package/dist/classes/incubation/fisherman-helper/settings.js +1 -1
- package/dist/classes/incubation/fisherman.d.ts +19 -26
- package/dist/classes/incubation/fisherman.js +101 -54
- package/dist/classes/incubation/incubator.d.ts +4 -0
- package/dist/classes/incubation/incubator.js +36 -3
- package/dist/classes/ovary.js +8 -9
- package/dist/classes/pacman.js +6 -11
- package/dist/classes/settings.js +2 -2
- package/dist/classes/xdg.js +2 -2
- package/dist/commands/config.js +6 -7
- package/dist/commands/export/pkg.js +8 -3
- package/dist/commands/love.js +5 -1
- package/dist/commands/produce.js +5 -1
- package/dist/commands/update.js +1 -1
- package/dist/interfaces/i-calamares-displaymanager.d.ts +17 -0
- package/dist/interfaces/i-calamares-displaymanager.js +1 -0
- package/dist/interfaces/i-calamares-finished.d.ts +12 -0
- package/dist/interfaces/i-calamares-finished.js +1 -0
- package/dist/interfaces/i-calamares-packages.d.ts +28 -0
- package/dist/interfaces/i-calamares-packages.js +1 -0
- package/dist/interfaces/i-calamares-partition.d.ts +28 -6
- package/dist/interfaces/i-calamares-partition.js +0 -7
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +4 -4
- package/package.json +8 -8
- package/dist/classes/n8.d.ts +0 -18
- package/dist/classes/n8.js +0 -36
package/.oclif.manifest.json
CHANGED
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
|
@@ -722,7 +722,7 @@ DESCRIPTION
|
|
|
722
722
|
Display help for eggs.
|
|
723
723
|
```
|
|
724
724
|
|
|
725
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.
|
|
725
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.16/src/commands/help.ts)_
|
|
726
726
|
|
|
727
727
|
## `eggs install`
|
|
728
728
|
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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:
|
|
@@ -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:
|
package/dist/classes/daddy.js
CHANGED
|
@@ -103,6 +103,12 @@ export default class Daddy {
|
|
|
103
103
|
console.log('- distro template install...');
|
|
104
104
|
await Pacman.distroTemplateInstall(verbose);
|
|
105
105
|
}
|
|
106
|
+
//Calamares
|
|
107
|
+
if (!Pacman.calamaresExists() &&
|
|
108
|
+
Pacman.isInstalledGui() &&
|
|
109
|
+
Pacman.isCalamaresAvailable()) {
|
|
110
|
+
console.log('- this is a GUI system, calamares is available, but NOT installed');
|
|
111
|
+
}
|
|
106
112
|
// show and edit configuration
|
|
107
113
|
this.settings = new Settings();
|
|
108
114
|
let config = {};
|
|
@@ -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'
|
|
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);
|
|
@@ -10,30 +10,31 @@ import Pacman from '../../pacman.js';
|
|
|
10
10
|
* restituisce displaymanagers in uso
|
|
11
11
|
*/
|
|
12
12
|
export function displaymanager() {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
*
|
|
34
|
+
*
|
|
35
|
+
* @param name
|
|
42
36
|
*/
|
|
43
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
166
|
-
|
|
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
|
}
|
|
@@ -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
|
-
|
|
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');
|
package/dist/classes/ovary.js
CHANGED
|
@@ -22,7 +22,6 @@ import Bleach from './bleach.js';
|
|
|
22
22
|
import CliAutologin from './cli-autologin.js';
|
|
23
23
|
import { displaymanager } from './incubation/fisherman-helper/displaymanager.js';
|
|
24
24
|
import Incubator from './incubation/incubator.js';
|
|
25
|
-
import N8 from './n8.js';
|
|
26
25
|
import Pacman from './pacman.js';
|
|
27
26
|
import PveLive from './pve-live.js';
|
|
28
27
|
import Settings from './settings.js';
|
|
@@ -102,7 +101,7 @@ export default class Ovary {
|
|
|
102
101
|
cmds.push(`# host: ${os.hostname()} user: ${await Utils.getPrimaryUser()}\n`);
|
|
103
102
|
for (const dir of dirs) {
|
|
104
103
|
cmds.push(startLine);
|
|
105
|
-
if (
|
|
104
|
+
if (fs.statSync(`/${dir}`).isDirectory()) {
|
|
106
105
|
if (dir === 'boot') {
|
|
107
106
|
cmds.push(`# /boot is copied actually`);
|
|
108
107
|
cmds.push(await rexec(`cp -r /boot ${this.settings.config.snapshot_mnt}filesystem.squashfs`, this.verbose));
|
|
@@ -140,7 +139,7 @@ export default class Ovary {
|
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
141
|
}
|
|
143
|
-
else if (
|
|
142
|
+
else if (fs.statSync(`/${dir}`).isFile()) {
|
|
144
143
|
cmds.push(`# /${dir} is just a file`, titleLine);
|
|
145
144
|
if (fs.existsSync(`${this.settings.work_dir.merged}/${dir}`)) {
|
|
146
145
|
cmds.push('# file exist... skip');
|
|
@@ -149,7 +148,7 @@ export default class Ovary {
|
|
|
149
148
|
cmds.push(await rexec(`cp /${dir} ${this.settings.work_dir.merged}`, this.verbose));
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
|
-
else if (
|
|
151
|
+
else if (fs.statSync(`/${dir}`).isSymbolicLink()) {
|
|
153
152
|
lnkDest = fs.readlinkSync(`/${dir}`);
|
|
154
153
|
cmds.push(`# /${dir} is a symbolic link to /${lnkDest} in the system`, '# we need just to recreate it', `# ln -s ${this.settings.work_dir.merged}/${lnkDest} ${this.settings.work_dir.merged}/${lnkDest}`, "# but we don't know if the destination exist, and I'm too lazy today. So, for now: ", titleLine);
|
|
155
154
|
if (fs.existsSync(`${this.settings.work_dir.merged}/${dir}`)) {
|
|
@@ -1509,7 +1508,7 @@ export default class Ovary {
|
|
|
1509
1508
|
/**
|
|
1510
1509
|
* GUI installed but NOT Desktop Manager: just create motd and issue
|
|
1511
1510
|
*/
|
|
1512
|
-
if (displaymanager()
|
|
1511
|
+
if (displaymanager().length > 0) {
|
|
1513
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);
|
|
1514
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);
|
|
1515
1514
|
}
|
|
@@ -1611,9 +1610,9 @@ export default class Ovary {
|
|
|
1611
1610
|
withFileTypes: true
|
|
1612
1611
|
});
|
|
1613
1612
|
for (const dir of bindDirs) {
|
|
1614
|
-
const dirname =
|
|
1613
|
+
const dirname = dir.name;
|
|
1615
1614
|
cmds.push('#############################################################');
|
|
1616
|
-
if (
|
|
1615
|
+
if (fs.statSync(`/${dirname}`).isDirectory()) {
|
|
1617
1616
|
cmds.push(`\n# directory: ${dirname}`);
|
|
1618
1617
|
if (this.mergedAndOverlay(dirname)) {
|
|
1619
1618
|
cmds.push(`\n# ${dirname} has overlay`, `\n# First, umount it from ${this.settings.config.snapshot_dir}`);
|
|
@@ -1633,11 +1632,11 @@ export default class Ovary {
|
|
|
1633
1632
|
cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname} -rf`, this.verbose));
|
|
1634
1633
|
}
|
|
1635
1634
|
}
|
|
1636
|
-
else if (
|
|
1635
|
+
else if (fs.statSync(`/${dirname}`).isFile()) {
|
|
1637
1636
|
cmds.push(`\n# ${dirname} = file`);
|
|
1638
1637
|
cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname}`, this.verbose));
|
|
1639
1638
|
}
|
|
1640
|
-
else if (
|
|
1639
|
+
else if (fs.statSync(`/${dirname}`).isSymbolicLink()) {
|
|
1641
1640
|
cmds.push(`\n# ${dirname} = symbolicLink`);
|
|
1642
1641
|
cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname}`, this.verbose));
|
|
1643
1642
|
}
|
package/dist/classes/pacman.js
CHANGED
|
@@ -36,18 +36,13 @@ export default class Pacman {
|
|
|
36
36
|
* @param verbose
|
|
37
37
|
*/
|
|
38
38
|
static async autocompleteInstall(verbose = false) {
|
|
39
|
-
if (
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
await exec(`cp ${__dirname}/../../scripts/eggs.bash /etc/bash_completion.d/`);
|
|
46
|
-
}
|
|
39
|
+
if (Pacman.packageIsInstalled('bash-completion')) {
|
|
40
|
+
if (fs.existsSync('/usr/share/bash-completion/completions/')) {
|
|
41
|
+
await exec(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`);
|
|
42
|
+
}
|
|
43
|
+
else if (fs.existsSync('/etc/bash_completion.d/')) {
|
|
44
|
+
await exec(`cp ${__dirname}/../../scripts/eggs.bash /etc/bash_completion.d/`);
|
|
47
45
|
}
|
|
48
|
-
}
|
|
49
|
-
else if (this.distro().familyId === 'archlinux' && Pacman.packageIsInstalled('bash-completion')) {
|
|
50
|
-
await exec(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`);
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
48
|
/**
|
package/dist/classes/settings.js
CHANGED
|
@@ -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';
|
package/dist/classes/xdg.js
CHANGED
|
@@ -11,7 +11,6 @@ import shx from 'shelljs';
|
|
|
11
11
|
// libraries
|
|
12
12
|
import { exec } from '../lib/utils.js';
|
|
13
13
|
import Distro from './distro.js';
|
|
14
|
-
import N8 from './n8.js';
|
|
15
14
|
import Pacman from './pacman.js';
|
|
16
15
|
import Utils from './utils.js';
|
|
17
16
|
const xdg_dirs = ['DESKTOP', 'DOWNLOAD', 'TEMPLATES', 'PUBLICSHARE', 'DOCUMENTS', 'MUSIC', 'PICTURES', 'VIDEOS'];
|
|
@@ -61,7 +60,8 @@ export default class Xdg {
|
|
|
61
60
|
const files = fs.readdirSync(dc);
|
|
62
61
|
for (const elem of files) {
|
|
63
62
|
const curFile = dc + elem;
|
|
64
|
-
if (!
|
|
63
|
+
if (!fs.statSync(`/${curFile}`).isDirectory()) {
|
|
64
|
+
//if (!N8.isDirectory(curFile)) {
|
|
65
65
|
let content = fs.readFileSync(curFile, 'utf8');
|
|
66
66
|
const find = '[Seat:*]';
|
|
67
67
|
if (content.includes(find)) {
|
package/dist/commands/config.js
CHANGED
|
@@ -46,16 +46,16 @@ export default class Config extends Command {
|
|
|
46
46
|
Utils.warning('- updating system...');
|
|
47
47
|
await exec('apt-get update --yes', echo);
|
|
48
48
|
}
|
|
49
|
+
if (i.calamares) {
|
|
50
|
+
let message = "- You are on a graphic system, is suggested\n";
|
|
51
|
+
message += " to install the GUI installer calamares.\n";
|
|
52
|
+
message += ' just type: "sudo eggs calamares --install"';
|
|
53
|
+
Utils.warning(message);
|
|
54
|
+
}
|
|
49
55
|
if (i.addEfi && Pacman.distro().familyId === 'debian') {
|
|
50
56
|
Utils.warning('- installing UEFI support');
|
|
51
57
|
await exec('apt-get install grub-efi-' + Utils.uefiArch() + '-bin --yes', echo);
|
|
52
58
|
}
|
|
53
|
-
if (i.calamares && Pacman.isCalamaresAvailable()) {
|
|
54
|
-
let message = "- you are on a graphic system,\n";
|
|
55
|
-
message += " is suggested to install the GUI installer calamares.\n";
|
|
56
|
-
message += " Just type: eggs calamares --install";
|
|
57
|
-
Utils.warning(message);
|
|
58
|
-
}
|
|
59
59
|
if (i.needUpdate && !nointeractive) {
|
|
60
60
|
Utils.warning('cleaning the system...');
|
|
61
61
|
if (Pacman.distro().familyId === 'debian') {
|
|
@@ -78,7 +78,6 @@ export default class Config extends Command {
|
|
|
78
78
|
!Pacman.calamaresExists() &&
|
|
79
79
|
Pacman.isInstalledGui() &&
|
|
80
80
|
Pacman.isCalamaresAvailable()) {
|
|
81
|
-
i.needUpdate = true;
|
|
82
81
|
i.calamares = true;
|
|
83
82
|
}
|
|
84
83
|
i.configurationInstall = !Pacman.configurationCheck();
|
|
@@ -63,8 +63,13 @@ export default class ExportPkg extends Command {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
else if (distro.familyId === "alpine") {
|
|
66
|
-
Utils.
|
|
67
|
-
|
|
66
|
+
if (Utils.isRoot()) {
|
|
67
|
+
Utils.warning("alpine packages");
|
|
68
|
+
this.alpine();
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
Utils.useRoot(this.id);
|
|
72
|
+
}
|
|
68
73
|
}
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
@@ -76,7 +81,7 @@ export default class ExportPkg extends Command {
|
|
|
76
81
|
arch = 'i386';
|
|
77
82
|
}
|
|
78
83
|
const localPath = `/home/${this.user}/packages/alpine/${arch}`;
|
|
79
|
-
const remotePath = `${this.Tu.config.remotePathPackages}/alpine
|
|
84
|
+
const remotePath = `${this.Tu.config.remotePathPackages}/alpine/`;
|
|
80
85
|
const filter = `penguins-eggs*10.?.*-r*.apk`;
|
|
81
86
|
const remoteMountpoint = `/tmp/eggs-${(Math.random() + 1).toString(36).slice(7)}`;
|
|
82
87
|
let cmd = `mkdir ${remoteMountpoint}\n`;
|
package/dist/commands/love.js
CHANGED
|
@@ -36,7 +36,11 @@ export default class Love extends Command {
|
|
|
36
36
|
Utils.warning(`You must be kind in love, please don't use sudo!`);
|
|
37
37
|
process.exit(0);
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
let loveConf = '/etc/penguins-eggs.d/love.yaml';
|
|
40
|
+
if (!fs.existsSync(loveConf)) {
|
|
41
|
+
loveConf = __dirname + '/../../conf/love.yaml';
|
|
42
|
+
}
|
|
43
|
+
const cmds = yaml.load(fs.readFileSync(loveConf, 'utf8'));
|
|
40
44
|
console.log('The following commands will be executed:');
|
|
41
45
|
console.log();
|
|
42
46
|
for (const cmd of cmds) {
|
package/dist/commands/produce.js
CHANGED
|
@@ -166,7 +166,7 @@ export default class Produce extends Command {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
const i = await Config.thatWeNeed(nointeractive, verbose, cryptedclone);
|
|
169
|
-
if ((i.needUpdate || i.configurationInstall || i.configurationRefresh || i.distroTemplate)
|
|
169
|
+
if ((i.needUpdate || i.configurationInstall || i.configurationRefresh || i.distroTemplate)) {
|
|
170
170
|
await Config.install(i, nointeractive, verbose);
|
|
171
171
|
}
|
|
172
172
|
const myAddons = {};
|
|
@@ -184,6 +184,10 @@ export default class Produce extends Command {
|
|
|
184
184
|
Utils.titles(this.id + ' ' + this.argv);
|
|
185
185
|
const ovary = new Ovary();
|
|
186
186
|
Utils.warning('Produce an egg...');
|
|
187
|
+
if (i.calamares) {
|
|
188
|
+
let message = "this is a GUI system, calamares is available, but NOT installed\n";
|
|
189
|
+
Utils.warning(message);
|
|
190
|
+
}
|
|
187
191
|
if (await ovary.fertilization(prefix, basename, theme, compression, !nointeractive)) {
|
|
188
192
|
await ovary.produce(clone, cryptedclone, scriptOnly, yolkRenew, release, myAddons, myLinks, excludes, nointeractive, noicon, unsecure, verbose);
|
|
189
193
|
ovary.finished(scriptOnly);
|
package/dist/commands/update.js
CHANGED
|
@@ -143,7 +143,7 @@ export default class Update extends Command {
|
|
|
143
143
|
arch = 'i386';
|
|
144
144
|
}
|
|
145
145
|
const filter = `penguins-eggs*10.?.*-r*.apk`;
|
|
146
|
-
const cmd = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/alpine/${
|
|
146
|
+
const cmd = `scp ${Tu.config.remoteUser}@${Tu.config.remoteHost}:${Tu.config.remotePathPackages}/alpine/${filter} /tmp`;
|
|
147
147
|
await exec(cmd, { capture: true, echo: true });
|
|
148
148
|
if (await Utils.customConfirm(`Want to install ${filter}`)) {
|
|
149
149
|
await exec(`apk add /tmp/${filter}`);
|
|
@@ -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
|
-
|
|
17
|
-
|
|
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
|
}
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
7
|
</head>
|
|
8
8
|
<body>
|
|
9
|
-
<h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.
|
|
9
|
+
<h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.45</h1>
|
|
10
10
|
<h1>SYNOPSIS</h1>
|
|
11
11
|
<p>eggs is a console utility, in active development, who let you to remaster your system and redistribuite it as live ISO image.</p>
|
|
12
12
|
<h1>INSTALL</h1>
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
</code></pre>
|
|
16
16
|
<p>Arch</p>
|
|
17
17
|
<pre><code>$ sudo pacman -S penguins-eggs
|
|
18
|
-
$ sudo pacman -U penguins-eggs_10.0.
|
|
18
|
+
$ sudo pacman -U penguins-eggs_10.0.45-bionic-1_amd64-1-x86_64.pkg.tar.zst
|
|
19
19
|
</code></pre>
|
|
20
20
|
<p>Debian/Devuan/Ubuntu</p>
|
|
21
21
|
<pre><code>$ sudo apt install penguins-eggs
|
|
22
|
-
$ sudo dpkg -i penguins-eggs_10.0.
|
|
22
|
+
$ sudo dpkg -i penguins-eggs_10.0.45-bionic-1_amd64.deb
|
|
23
23
|
</code></pre>
|
|
24
24
|
<p>Manjaro</p>
|
|
25
25
|
<pre><code>$ sudo pamac install penguins-eggs
|
|
@@ -27,7 +27,7 @@ $ sudo dpkg -i penguins-eggs_10.0.44-bionic-1_amd64.deb
|
|
|
27
27
|
<h1>USAGE</h1>
|
|
28
28
|
<pre><code>$ eggs (-v|--version|version)
|
|
29
29
|
|
|
30
|
-
penguins-eggs/10.0.
|
|
30
|
+
penguins-eggs/10.0.45
|
|
31
31
|
$ eggs --help [COMMAND]
|
|
32
32
|
|
|
33
33
|
USAGE
|
package/package.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
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.
|
|
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.
|
|
12
|
+
"@oclif/core": "^4.0.30",
|
|
13
13
|
"@oclif/plugin-autocomplete": "^3.2.6",
|
|
14
|
-
"@oclif/plugin-help": "^6.2.
|
|
14
|
+
"@oclif/plugin-help": "^6.2.16",
|
|
15
15
|
"@oclif/plugin-version": "^2.2.15",
|
|
16
16
|
"ansis": "^3.3.2",
|
|
17
17
|
"axios": "^1.7.7",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@oclif/prettier-config": "^0.2.1",
|
|
37
|
-
"@oclif/test": "^4.0
|
|
37
|
+
"@oclif/test": "^4.1.0",
|
|
38
38
|
"@types/chai": "^4.3.19",
|
|
39
39
|
"@types/debug": "^4.1.12",
|
|
40
40
|
"@types/inquirer": "^9.0.7",
|
|
@@ -44,16 +44,16 @@
|
|
|
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.
|
|
47
|
+
"@types/react": "^18.3.12",
|
|
48
48
|
"@types/shelljs": "^0.8.15",
|
|
49
|
-
"chai": "^5.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.
|
|
56
|
-
"perrisbrewery": "^10.0.
|
|
55
|
+
"oclif": "^4.15.12",
|
|
56
|
+
"perrisbrewery": "^10.0.2",
|
|
57
57
|
"prettier": "^3.3.3",
|
|
58
58
|
"shx": "^0.3.4",
|
|
59
59
|
"ts-node": "^10.9.2",
|
package/dist/classes/n8.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/classes/n8.js
DELETED
|
@@ -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
|
-
}
|