penguins-eggs 9.0.31 → 9.1.10
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/README.md +488 -28
- package/assets/leaves.svg +1 -0
- package/assets/live-installer/com.github.pieroproietti.penguins-eggs.policy +25 -0
- package/assets/live-installer/filesystem.packages-remove +49 -0
- package/assets/penguins-live-installer.desktop +27 -0
- package/conf/distros/buster/calamares/modules/bootloader.yml +3 -1
- package/conf/eggs.yaml +9 -2
- package/lib/classes/bleach.js +2 -2
- package/lib/classes/compressors.js +1 -1
- package/lib/classes/daddy.js +30 -30
- package/lib/classes/distro.d.ts +5 -3
- package/lib/classes/distro.js +78 -80
- package/lib/classes/family/archlinux.js +4 -4
- package/lib/classes/family/debian.d.ts +4 -0
- package/lib/classes/family/debian.js +13 -6
- package/lib/classes/family/fedora.js +4 -4
- package/lib/classes/family/suse.js +4 -4
- package/lib/classes/i18n.d.ts +28 -4
- package/lib/classes/i18n.js +112 -84
- package/lib/classes/incubation/branding.js +13 -7
- package/lib/classes/incubation/distros/bionic.js +1 -1
- package/lib/classes/incubation/distros/buster.js +1 -1
- package/lib/classes/incubation/distros/focal.js +1 -1
- package/lib/classes/incubation/distros/jessie.js +1 -1
- package/lib/classes/incubation/distros/rolling.js +1 -1
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +1 -1
- package/lib/classes/incubation/fisherman-helper/packages.js +2 -2
- package/lib/classes/incubation/fisherman.js +5 -5
- package/lib/classes/incubation/incubator.js +5 -5
- package/lib/classes/incubation/installer.d.ts +1 -1
- package/lib/classes/incubation/installer.js +4 -4
- package/lib/classes/initrd.js +2 -2
- package/lib/classes/keyboards.d.ts +45 -0
- package/lib/classes/keyboards.js +196 -0
- package/lib/classes/krill_install.d.ts +5 -0
- package/lib/classes/krill_install.js +46 -14
- package/lib/classes/krill_prepare.d.ts +4 -0
- package/lib/classes/krill_prepare.js +56 -77
- package/lib/classes/locales.d.ts +14 -0
- package/lib/classes/locales.js +54 -0
- package/lib/classes/n8.js +1 -1
- package/lib/classes/ovary.d.ts +6 -1
- package/lib/classes/ovary.js +77 -60
- package/lib/classes/pacman.d.ts +1 -1
- package/lib/classes/pacman.js +40 -40
- package/lib/classes/pve-live.js +12 -16
- package/lib/classes/settings.d.ts +6 -0
- package/lib/classes/settings.js +13 -16
- package/lib/classes/sources_list.d.ts +27 -0
- package/lib/classes/sources_list.js +103 -0
- package/lib/classes/systemctl.js +1 -1
- package/lib/classes/tailor.d.ts +41 -0
- package/lib/classes/tailor.js +356 -0
- package/lib/classes/tools.js +4 -4
- package/lib/classes/users.js +1 -1
- package/lib/classes/utils.d.ts +16 -3
- package/lib/classes/utils.js +74 -36
- package/lib/classes/xdg.d.ts +2 -1
- package/lib/classes/xdg.js +56 -131
- package/lib/classes/yolk.d.ts +8 -7
- package/lib/classes/yolk.js +35 -38
- package/lib/commands/adapt.js +1 -1
- package/lib/commands/analyze.js +2 -2
- package/lib/commands/bro.js +2 -2
- package/lib/commands/calamares.js +4 -4
- package/lib/commands/config.js +8 -6
- package/lib/commands/dad.js +2 -2
- package/lib/commands/export/deb.js +2 -2
- package/lib/commands/export/docs.js +2 -2
- package/lib/commands/export/iso.js +2 -2
- package/lib/commands/info.js +2 -2
- package/lib/commands/install.js +5 -5
- package/lib/commands/kill.js +2 -2
- package/lib/commands/mom.js +2 -2
- package/lib/commands/produce.js +9 -9
- package/lib/commands/remove.js +2 -2
- package/lib/commands/syncfrom.d.ts +9 -3
- package/lib/commands/syncfrom.js +39 -32
- package/lib/commands/syncto.d.ts +26 -6
- package/lib/commands/syncto.js +73 -50
- package/lib/commands/tools/clean.js +2 -2
- package/lib/commands/tools/locales.js +9 -4
- package/lib/commands/tools/skel.js +2 -2
- package/lib/commands/tools/stat.js +3 -3
- package/lib/commands/tools/yolk.js +4 -4
- package/lib/commands/update.d.ts +0 -2
- package/lib/commands/update.js +7 -56
- package/lib/commands/wardrobe/get.d.ts +17 -0
- package/lib/commands/wardrobe/get.js +43 -0
- package/lib/commands/wardrobe/ironing.d.ts +15 -0
- package/lib/commands/wardrobe/ironing.js +125 -0
- package/lib/commands/wardrobe/list.d.ts +17 -0
- package/lib/commands/wardrobe/list.js +81 -0
- package/lib/commands/wardrobe/show.d.ts +19 -0
- package/lib/commands/wardrobe/show.js +71 -0
- package/lib/commands/wardrobe/wear.d.ts +20 -0
- package/lib/commands/wardrobe/wear.js +79 -0
- package/lib/components/elements/information.js +41 -34
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +5 -4
- package/lib/components/finished.js +6 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -8
- package/lib/components/location.js +5 -5
- package/lib/components/network.js +6 -5
- package/lib/components/partitions.js +5 -5
- package/lib/components/summary.js +5 -5
- package/lib/components/users.js +5 -5
- package/lib/components/welcome.js +7 -7
- package/lib/interfaces/i-costume.d.ts +27 -0
- package/lib/interfaces/i-costume.js +2 -0
- package/lib/interfaces/i-distro.d.ts +4 -2
- package/lib/interfaces/i-installer.d.ts +1 -1
- package/lib/interfaces/i-krill.d.ts +1 -0
- package/lib/interfaces/i-materia.d.ts +32 -0
- package/lib/interfaces/i-materia.js +2 -0
- package/lib/interfaces/i-packages.d.ts +13 -0
- package/lib/interfaces/i-packages.js +2 -0
- package/lib/interfaces/i-xkb-model.d.ts +17 -0
- package/lib/interfaces/i-xkb-model.js +2 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/lib/cli-autologin.js +3 -3
- package/lib/lib/select_address_type.js +1 -1
- package/lib/lib/select_filesystem_type.js +2 -2
- package/lib/lib/select_installation_device.js +1 -1
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.d.ts +1 -28
- package/lib/lib/select_keyboard_layout.js +18 -33
- package/lib/lib/select_keyboard_model.d.ts +4 -0
- package/lib/lib/select_keyboard_model.js +36 -0
- package/lib/lib/select_keyboard_option.d.ts +4 -0
- package/lib/lib/select_keyboard_option.js +36 -0
- package/lib/lib/select_keyboard_variant.d.ts +1 -5
- package/lib/lib/select_keyboard_variant.js +32 -5
- package/lib/lib/select_languages.d.ts +1 -1
- package/lib/lib/select_languages.js +8 -7
- package/lib/lib/select_regions.d.ts +1 -1
- package/lib/lib/select_regions.js +2 -2
- package/lib/lib/select_user_swap_choice.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +19 -20
- package/scripts/_eggs +53 -8
- package/scripts/eggs.bash +9 -4
- package/scripts/mom-cli.sh +66 -0
- package/scripts/resy.sh +8 -0
- package/scripts/userexist.sh +6 -0
- package/assets/penguins-clinstaller.desktop +0 -24
- package/assets/penguins-minstall.desktop +0 -95
- package/conf/distros/buster/locales/locale.gen.template +0 -10
- package/conf/distros/buster/locales/locale.template +0 -11
- package/conf/distros/focal/locale.gen.template +0 -8
- package/lib/classes/basket.d.ts +0 -22
- package/lib/classes/basket.js +0 -114
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 485.82 330.37"><defs><style>.cls-1{fill:#205c2e;}</style></defs><title>Wikimania2019_icon</title><path class="cls-1" d="M101,256.56c53.44,78.12,126.28,76.54,155.64,72.09-31.9-6.57-69.7-25-100.89-70.61C102.29,179.92,29.44,181.51.08,186,32,192.52,69.79,211,101,256.56Z"/><path class="cls-1" d="M157.34,125.91C293.09,131.06,338.87,40.11,352.42,0,323,33.25,274.42,63,195.2,60,59.48,54.84,13.69,145.75.13,185.87l0,0C29.58,152.62,78.16,122.92,157.34,125.91Z"/><path class="cls-1" d="M.11,185.94c53.4-11.08,123.32-5.77,200,51.11,131.55,97.53,243.09,43.47,285.66,15.09-53.41,11.11-123.38,5.83-200.16-51.09-131.39-97.4-242.81-43.6-285.5-15.2l0,0L0,186H.11Z"/></svg>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- SPDX-FileCopyrightText: no
|
|
3
|
+
SPDX-License-Identifier: CC0-1.0
|
|
4
|
+
-->
|
|
5
|
+
<!DOCTYPE policyconfig PUBLIC
|
|
6
|
+
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
|
7
|
+
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
|
8
|
+
<policyconfig>
|
|
9
|
+
|
|
10
|
+
<vendor>penguins-eggs</vendor>
|
|
11
|
+
<vendor_url>com.github.pieroproietti.penguins-eggs</vendor_url>
|
|
12
|
+
|
|
13
|
+
<action id="com.github.pieroproietti.penguins-eggs.pkexec.run">
|
|
14
|
+
<description>Run Installer</description>
|
|
15
|
+
<message>Authentication is required to run the installation program</message>
|
|
16
|
+
<icon_name>drive-harddisk</icon_name>
|
|
17
|
+
<defaults>
|
|
18
|
+
<allow_any>no</allow_any>
|
|
19
|
+
<allow_inactive>no</allow_inactive>
|
|
20
|
+
<allow_active>auth_admin</allow_active>
|
|
21
|
+
</defaults>
|
|
22
|
+
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/live-installer</annotate>
|
|
23
|
+
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
|
|
24
|
+
</action>
|
|
25
|
+
</policyconfig>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
boot-repair
|
|
2
|
+
boot-sav
|
|
3
|
+
boot-sav-extra
|
|
4
|
+
circle-flags-svg
|
|
5
|
+
glade2script
|
|
6
|
+
glade2script-python3
|
|
7
|
+
gparted
|
|
8
|
+
gparted-common
|
|
9
|
+
imagemagick
|
|
10
|
+
imagemagick-6-common
|
|
11
|
+
imagemagick-6.q16
|
|
12
|
+
insserv
|
|
13
|
+
isoquery
|
|
14
|
+
libde265-0:amd64
|
|
15
|
+
libheif1:amd64
|
|
16
|
+
libilmbase25:amd64
|
|
17
|
+
libjxr-tools
|
|
18
|
+
libjxr0:amd64
|
|
19
|
+
liblqr-1-0:amd64
|
|
20
|
+
libmagickcore-6.q16-6:amd64
|
|
21
|
+
libmagickcore-6.q16-6-extra:amd64
|
|
22
|
+
libmagickwand-6.q16-6:amd64
|
|
23
|
+
libnetpbm10
|
|
24
|
+
libopenexr25:amd64
|
|
25
|
+
libqt5designer5:amd64
|
|
26
|
+
libqt5help5:amd64
|
|
27
|
+
libqt5printsupport5:amd64
|
|
28
|
+
libqt5sql5:amd64
|
|
29
|
+
libqt5sql5-sqlite:amd64
|
|
30
|
+
libqt5test5:amd64
|
|
31
|
+
libqt5xml5:amd64
|
|
32
|
+
libwmf0.2-7:amd64
|
|
33
|
+
live-boot
|
|
34
|
+
live-boot-doc
|
|
35
|
+
live-boot-initramfs-tools
|
|
36
|
+
live-config
|
|
37
|
+
live-config-doc
|
|
38
|
+
live-config-systemd
|
|
39
|
+
live-installer
|
|
40
|
+
live-tools
|
|
41
|
+
menu
|
|
42
|
+
mint-live-session
|
|
43
|
+
netpbm
|
|
44
|
+
pastebinit
|
|
45
|
+
python3-pyqt5
|
|
46
|
+
python3-pyqt5.sip
|
|
47
|
+
startpar
|
|
48
|
+
syslinux-utils
|
|
49
|
+
sysv-rc
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env xdg-open
|
|
2
|
+
[Desktop Entry]
|
|
3
|
+
Type=Application
|
|
4
|
+
Version=1.0
|
|
5
|
+
Name=Linux Mint installer
|
|
6
|
+
GenericName=Linux Mint installer
|
|
7
|
+
Exec=sudo /usr/bin/live-installer
|
|
8
|
+
Comment=Linux Mint installer
|
|
9
|
+
Keywords=system;install;debian;installer
|
|
10
|
+
Icon=leaves
|
|
11
|
+
Terminal=false
|
|
12
|
+
Categories=System;
|
|
13
|
+
Name[it]=Linux Mint installer
|
|
14
|
+
GenericName[it]=Installa sistema
|
|
15
|
+
Comment[it]=Installazione sistema
|
|
16
|
+
Name[en]=Linux Mint installer
|
|
17
|
+
GenericName[en]=Linux Mint installer
|
|
18
|
+
Comment[en]=Linux Mint installer
|
|
19
|
+
Name[es]=Instalación del sistema
|
|
20
|
+
GenericName[es]=Instalación del sistema
|
|
21
|
+
Comment[es]=Instalación del sistema
|
|
22
|
+
Name[pt]=Instalação do sistema
|
|
23
|
+
GenericName[pt]=Instalação do sistema
|
|
24
|
+
Comment[pt]=Instalação do sistema
|
|
25
|
+
Name[fr]=Installation du système
|
|
26
|
+
GenericName[fr]=Installation du système
|
|
27
|
+
Comment[fr]=Installation du système
|
|
@@ -42,7 +42,7 @@ efiBootMgr: "efibootmgr"
|
|
|
42
42
|
# setting the option here, keep in mind that the name is sanitized
|
|
43
43
|
# (problematic characters, see above, are replaced).
|
|
44
44
|
#
|
|
45
|
-
#
|
|
45
|
+
#efiBootloaderId: "dirname"
|
|
46
46
|
|
|
47
47
|
# Optionally install a copy of the GRUB EFI bootloader as the EFI
|
|
48
48
|
# fallback loader (either bootx32.efi or bootx64.efi depending on
|
|
@@ -51,3 +51,5 @@ efiBootMgr: "efibootmgr"
|
|
|
51
51
|
# to add another module to optionally install the fallback on those
|
|
52
52
|
# boards that need it.
|
|
53
53
|
installEFIFallback: false
|
|
54
|
+
|
|
55
|
+
|
package/conf/eggs.yaml
CHANGED
|
@@ -74,18 +74,25 @@ compression: 'xz'
|
|
|
74
74
|
# default true
|
|
75
75
|
ssh_pass: true
|
|
76
76
|
|
|
77
|
+
|
|
78
|
+
|
|
77
79
|
# timezone
|
|
78
|
-
# default Europe/Rome
|
|
79
80
|
timezone: Europe/Rome
|
|
80
81
|
|
|
81
82
|
# locales to be builded
|
|
82
83
|
locales:
|
|
83
|
-
- en_US.UTF-8
|
|
84
84
|
- it_IT.UTF-8
|
|
85
85
|
|
|
86
86
|
# default locales
|
|
87
87
|
locales_default: it_IT.UTF-8
|
|
88
88
|
|
|
89
|
+
# keyboard
|
|
90
|
+
keyboard:
|
|
91
|
+
XkbModel: "pc105"
|
|
92
|
+
XkbLayout: "it"
|
|
93
|
+
XkbVariant: ""
|
|
94
|
+
XkbOptions: ""
|
|
95
|
+
|
|
89
96
|
##
|
|
90
97
|
# The following fields are actually not used in eggs
|
|
91
98
|
pmount_fixed: false
|
package/lib/classes/bleach.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
-
const node_fs_1 =
|
|
12
|
-
const utils_1 =
|
|
11
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
12
|
+
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
13
13
|
// libraries
|
|
14
14
|
const utils_2 = require("../lib/utils");
|
|
15
15
|
/**
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
/**
|
|
5
5
|
* test i compressori disponibili
|
|
6
6
|
*/
|
|
7
|
-
const shelljs_1 =
|
|
7
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
8
8
|
class Compressors {
|
|
9
9
|
constructor() {
|
|
10
10
|
this.isEnabled = {
|
package/lib/classes/daddy.js
CHANGED
|
@@ -7,13 +7,13 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
* email: piero.proietti@gmail.com
|
|
8
8
|
* license: MIT
|
|
9
9
|
*/
|
|
10
|
-
const utils_1 =
|
|
11
|
-
const pacman_1 =
|
|
12
|
-
const settings_1 =
|
|
13
|
-
const ovary_1 =
|
|
14
|
-
const compressors_1 =
|
|
10
|
+
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
11
|
+
const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
|
|
12
|
+
const settings_1 = tslib_1.__importDefault(require("../classes/settings"));
|
|
13
|
+
const ovary_1 = tslib_1.__importDefault(require("../classes/ovary"));
|
|
14
|
+
const compressors_1 = tslib_1.__importDefault(require("../classes/compressors"));
|
|
15
15
|
const inquirer = require("inquirer");
|
|
16
|
-
const chalk_1 =
|
|
16
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
17
17
|
const utils_2 = require("../lib/utils");
|
|
18
18
|
class Daddy {
|
|
19
19
|
constructor() {
|
|
@@ -46,7 +46,7 @@ class Daddy {
|
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
if (config.snapshot_prefix === '') {
|
|
49
|
-
config.snapshot_prefix = utils_1.default.snapshotPrefix(this.settings.distro.distroId, this.settings.distro.
|
|
49
|
+
config.snapshot_prefix = utils_1.default.snapshotPrefix(this.settings.distro.distroId, this.settings.distro.codenameId);
|
|
50
50
|
config.compression = 'fast';
|
|
51
51
|
}
|
|
52
52
|
jsonConf = JSON.stringify(config);
|
|
@@ -109,28 +109,28 @@ class Daddy {
|
|
|
109
109
|
await (0, utils_2.exec)(`rm ${this.settings.work_dir.path} -rf`);
|
|
110
110
|
await (0, utils_2.exec)(`rm ${this.settings.config.snapshot_dir} -rf`);
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
112
|
+
/**
|
|
113
|
+
* produce
|
|
114
|
+
*/
|
|
115
|
+
if (loadDefault) {
|
|
116
|
+
verbose = false;
|
|
117
|
+
}
|
|
118
|
+
flags += ' --' + newConf.compression;
|
|
119
|
+
flags += ' --addons adapt';
|
|
120
|
+
utils_1.default.titles('produce' + ' ' + flags);
|
|
121
|
+
console.log(chalk_1.default.cyan('Daddy, what else did you leave for me?'));
|
|
122
|
+
const myAddons = {};
|
|
123
|
+
myAddons.adapt = true;
|
|
124
|
+
const backup = false;
|
|
125
|
+
const scriptOnly = false;
|
|
126
|
+
const yolkRenew = false;
|
|
127
|
+
const final = false;
|
|
128
|
+
const ovary = new ovary_1.default();
|
|
129
|
+
utils_1.default.warning('Produce an egg...');
|
|
130
|
+
if (await ovary.fertilization(config.snapshot_prefix, config.snapshot_basename, config.theme, config.compression)) {
|
|
131
|
+
await ovary.produce(backup, scriptOnly, yolkRenew, final, myAddons, verbose);
|
|
132
|
+
ovary.finished(scriptOnly);
|
|
133
|
+
}
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -148,7 +148,7 @@ class Daddy {
|
|
|
148
148
|
compressionOpt = 2;
|
|
149
149
|
}
|
|
150
150
|
if (c.snapshot_prefix === '') {
|
|
151
|
-
c.snapshot_prefix = utils_1.default.snapshotPrefix(this.settings.distro.distroId, this.settings.distro.
|
|
151
|
+
c.snapshot_prefix = utils_1.default.snapshotPrefix(this.settings.distro.distroId, this.settings.distro.codenameId);
|
|
152
152
|
}
|
|
153
153
|
return new Promise(function (resolve) {
|
|
154
154
|
const questions = [
|
package/lib/classes/distro.d.ts
CHANGED
|
@@ -12,8 +12,10 @@ declare class Distro implements IDistro {
|
|
|
12
12
|
familyId: string;
|
|
13
13
|
distroId: string;
|
|
14
14
|
distroLike: string;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
codenameId: string;
|
|
16
|
+
codenameLikeId: string;
|
|
17
|
+
releaseId: string;
|
|
18
|
+
releaseLike: string;
|
|
17
19
|
usrLibPath: string;
|
|
18
20
|
isolinuxPath: string;
|
|
19
21
|
syslinuxPath: string;
|
|
@@ -22,6 +24,6 @@ declare class Distro implements IDistro {
|
|
|
22
24
|
supportUrl: string;
|
|
23
25
|
bugReportUrl: string;
|
|
24
26
|
isCalamaresAvailable: boolean;
|
|
25
|
-
constructor(remix
|
|
27
|
+
constructor(remix?: IRemix);
|
|
26
28
|
}
|
|
27
29
|
export default Distro;
|
package/lib/classes/distro.js
CHANGED
|
@@ -31,18 +31,20 @@
|
|
|
31
31
|
'use strict';
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
const tslib_1 = require("tslib");
|
|
34
|
-
const node_fs_1 =
|
|
35
|
-
const shelljs_1 =
|
|
34
|
+
const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
35
|
+
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
36
36
|
/**
|
|
37
37
|
* Classe
|
|
38
38
|
*/
|
|
39
39
|
class Distro {
|
|
40
|
-
constructor(remix) {
|
|
40
|
+
constructor(remix = {}) {
|
|
41
41
|
this.familyId = 'debian';
|
|
42
42
|
this.distroId = '';
|
|
43
43
|
this.distroLike = '';
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
44
|
+
this.codenameId = '';
|
|
45
|
+
this.codenameLikeId = '';
|
|
46
|
+
this.releaseId = '';
|
|
47
|
+
this.releaseLike = '';
|
|
46
48
|
this.usrLibPath = '/usr/lib';
|
|
47
49
|
this.isolinuxPath = '';
|
|
48
50
|
this.syslinuxPath = '';
|
|
@@ -79,172 +81,156 @@ class Distro {
|
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
/**
|
|
82
|
-
* lsb_release -cs per
|
|
84
|
+
* lsb_release -cs per codename (version)
|
|
85
|
+
* lsb_release -is per distribuzione
|
|
86
|
+
* lsb_release -rs per release
|
|
83
87
|
*/
|
|
84
|
-
this.
|
|
88
|
+
this.codenameId = shelljs_1.default.exec('lsb_release -cs', { silent: true }).stdout.toString().trim();
|
|
89
|
+
this.releaseId = shelljs_1.default.exec('lsb_release -rs', { silent: true }).stdout.toString().trim();
|
|
85
90
|
this.distroId = shelljs_1.default.exec('lsb_release -is', { silent: true }).stdout.toString().trim();
|
|
86
91
|
/**
|
|
87
|
-
*
|
|
92
|
+
* releaseLike = releaseId
|
|
88
93
|
*/
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
case 'sid': {
|
|
105
|
-
// sinora ho trovato solo siduction
|
|
106
|
-
if (node_fs_1.default.existsSync('/etc/debian_version')) {
|
|
107
|
-
const debianVersion = node_fs_1.default.readFileSync('/etc/debian_version', 'utf8');
|
|
108
|
-
if (debianVersion.trim() === 'bullseye/sid') {
|
|
109
|
-
this.versionId = 'siduction';
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
case 'testing': {
|
|
115
|
-
if (this.distroId === 'Netrunner') {
|
|
116
|
-
this.versionId = 'buster/sid';
|
|
117
|
-
}
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
// No default
|
|
94
|
+
this.releaseLike = this.releaseId;
|
|
95
|
+
/**
|
|
96
|
+
* Per casi equivoci conviene normalizzare codenameId
|
|
97
|
+
* -i, --id show distributor ID
|
|
98
|
+
* -r, --release show release number of this distribution
|
|
99
|
+
* -c, --codename show code name of this distribution
|
|
100
|
+
*/
|
|
101
|
+
if (this.distroId === 'Debian' && this.releaseId === 'unstable' && this.codenameId === 'sid') {
|
|
102
|
+
this.codenameId = 'bookworm';
|
|
103
|
+
}
|
|
104
|
+
else if (this.distroId === 'Debian' && this.releaseId === 'testing/unstable') {
|
|
105
|
+
this.codenameId = 'bookworm';
|
|
106
|
+
this.releaseLike = 'unstable';
|
|
121
107
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Procedo analizzanto: codenameId, prima Debian, Devuan ed Ubuntu poi gli altri
|
|
110
|
+
*/
|
|
111
|
+
switch (this.codenameId) {
|
|
125
112
|
case 'jessie': {
|
|
126
113
|
// Debian 8 jessie
|
|
127
114
|
this.distroLike = 'Debian';
|
|
128
|
-
this.
|
|
115
|
+
this.codenameLikeId = 'jessie';
|
|
129
116
|
break;
|
|
130
117
|
}
|
|
131
118
|
case 'stretch': {
|
|
132
119
|
// Debian 9 stretch
|
|
133
120
|
this.distroLike = 'Debian';
|
|
134
|
-
this.
|
|
121
|
+
this.codenameLikeId = 'stretch';
|
|
135
122
|
break;
|
|
136
123
|
}
|
|
137
124
|
case 'buster': {
|
|
138
125
|
// Debian 10 buster
|
|
139
126
|
this.distroLike = 'Debian';
|
|
140
|
-
this.
|
|
127
|
+
this.codenameLikeId = 'buster';
|
|
141
128
|
break;
|
|
142
129
|
}
|
|
143
130
|
case 'bullseye': {
|
|
144
131
|
// Debian 11 bullseye
|
|
145
132
|
this.distroLike = 'Debian';
|
|
146
|
-
this.
|
|
133
|
+
this.codenameLikeId = 'bullseye';
|
|
147
134
|
break;
|
|
148
135
|
}
|
|
149
136
|
case 'bookworm': {
|
|
150
137
|
// Debian 11 bullseye
|
|
151
138
|
this.distroLike = 'Debian';
|
|
152
|
-
this.
|
|
139
|
+
this.codenameLikeId = 'bookworm';
|
|
153
140
|
break;
|
|
154
141
|
}
|
|
155
142
|
case 'beowulf': {
|
|
156
143
|
this.distroLike = 'Devuan';
|
|
157
|
-
this.
|
|
144
|
+
this.codenameLikeId = 'beowulf';
|
|
158
145
|
break;
|
|
159
146
|
}
|
|
160
147
|
case 'chimaera': {
|
|
161
148
|
this.distroLike = 'Devuan';
|
|
162
|
-
this.
|
|
149
|
+
this.codenameLikeId = 'chimaera';
|
|
163
150
|
break;
|
|
164
151
|
}
|
|
165
152
|
case 'daedalus': {
|
|
166
153
|
this.distroLike = 'Devuan';
|
|
167
|
-
this.
|
|
154
|
+
this.codenameLikeId = 'daedalus';
|
|
168
155
|
break;
|
|
169
156
|
}
|
|
170
157
|
case 'xenial': {
|
|
171
158
|
// Ubuntu xenial
|
|
172
159
|
this.distroLike = 'Ubuntu';
|
|
173
|
-
this.
|
|
160
|
+
this.codenameLikeId = 'xenial';
|
|
174
161
|
break;
|
|
175
162
|
}
|
|
176
163
|
case 'bionic': {
|
|
177
164
|
// Ubuntu 18.04 bionic LTS eol aprile 2023
|
|
178
165
|
this.distroLike = 'Ubuntu';
|
|
179
|
-
this.
|
|
166
|
+
this.codenameLikeId = 'bionic';
|
|
180
167
|
break;
|
|
181
168
|
}
|
|
182
169
|
case 'focal': {
|
|
183
170
|
// Ubuntu 20.04 focal LTS
|
|
184
171
|
this.distroLike = 'Ubuntu';
|
|
185
|
-
this.
|
|
172
|
+
this.codenameLikeId = 'focal';
|
|
186
173
|
break;
|
|
187
174
|
}
|
|
188
175
|
case 'groovy': {
|
|
189
176
|
// Ubuntu 20.10 groovy
|
|
190
177
|
this.distroLike = 'Ubuntu';
|
|
191
|
-
this.
|
|
178
|
+
this.codenameLikeId = 'groovy';
|
|
192
179
|
break;
|
|
193
180
|
}
|
|
194
181
|
case 'hirsute': {
|
|
195
182
|
// Ubuntu 21.04 hirsute
|
|
196
183
|
this.distroLike = 'Ubuntu';
|
|
197
|
-
this.
|
|
184
|
+
this.codenameLikeId = 'hirsute';
|
|
198
185
|
break;
|
|
199
186
|
}
|
|
200
187
|
case 'impish': {
|
|
201
188
|
// Ubuntu 21.10 impish
|
|
202
189
|
this.distroLike = 'Ubuntu';
|
|
203
|
-
this.
|
|
190
|
+
this.codenameLikeId = 'impish';
|
|
204
191
|
break;
|
|
205
192
|
}
|
|
206
193
|
case 'jammy': {
|
|
207
194
|
// Ubuntu 22.04 jammy
|
|
208
195
|
this.distroLike = 'Ubuntu';
|
|
209
|
-
this.
|
|
196
|
+
this.codenameLikeId = 'jammy';
|
|
210
197
|
// quindi le derivate...
|
|
211
198
|
break;
|
|
212
199
|
}
|
|
213
200
|
case 'kali-rolling': {
|
|
214
201
|
// Kali
|
|
215
202
|
this.distroLike = 'Debian';
|
|
216
|
-
this.
|
|
217
|
-
// UfficioZero roma
|
|
203
|
+
this.codenameLikeId = 'bookworm';
|
|
218
204
|
break;
|
|
219
205
|
}
|
|
220
206
|
case `jolnir`: {
|
|
221
207
|
// Elementary
|
|
222
208
|
this.distroLike = 'Ubuntu';
|
|
223
|
-
this.
|
|
209
|
+
this.codenameLikeId = 'focal';
|
|
224
210
|
break;
|
|
225
211
|
}
|
|
226
212
|
case 'roma': {
|
|
227
213
|
// UfficioZero roma
|
|
228
214
|
this.distroLike = 'Devuan';
|
|
229
|
-
this.
|
|
215
|
+
this.codenameLikeId = 'beowulf';
|
|
230
216
|
break;
|
|
231
217
|
}
|
|
232
218
|
case 'tropea': {
|
|
233
219
|
// UfficioZero tropea
|
|
234
220
|
this.distroLike = 'Ubuntu';
|
|
235
|
-
this.
|
|
221
|
+
this.codenameLikeId = 'focal';
|
|
236
222
|
break;
|
|
237
223
|
}
|
|
238
224
|
case 'vieste': {
|
|
239
225
|
// UfficioZero tropea
|
|
240
226
|
this.distroLike = 'Ubuntu';
|
|
241
|
-
this.
|
|
227
|
+
this.codenameLikeId = 'bionic';
|
|
242
228
|
break;
|
|
243
229
|
}
|
|
244
230
|
case 'siena': {
|
|
245
231
|
// UfficioZero siena
|
|
246
232
|
this.distroLike = 'Debian';
|
|
247
|
-
this.
|
|
233
|
+
this.codenameLikeId = 'buster';
|
|
248
234
|
break;
|
|
249
235
|
}
|
|
250
236
|
case 'tara':
|
|
@@ -253,7 +239,7 @@ class Distro {
|
|
|
253
239
|
case 'tricia': {
|
|
254
240
|
// LinuxMint 19.x
|
|
255
241
|
this.distroLike = 'Ubuntu';
|
|
256
|
-
this.
|
|
242
|
+
this.codenameLikeId = 'bionic';
|
|
257
243
|
break;
|
|
258
244
|
}
|
|
259
245
|
case 'ulyana':
|
|
@@ -262,37 +248,49 @@ class Distro {
|
|
|
262
248
|
case 'una': {
|
|
263
249
|
// LinuxMint 20.x
|
|
264
250
|
this.distroLike = 'Ubuntu';
|
|
265
|
-
this.
|
|
251
|
+
this.codenameLikeId = 'focal';
|
|
266
252
|
break;
|
|
267
253
|
}
|
|
268
254
|
case 'debbie': {
|
|
269
255
|
// LMDE 4 debbie
|
|
270
256
|
this.distroLike = 'Debian';
|
|
271
|
-
this.
|
|
257
|
+
this.codenameLikeId = 'buster';
|
|
272
258
|
break;
|
|
273
259
|
}
|
|
274
260
|
case 'elsie': {
|
|
275
261
|
// LMDE 5 elsie
|
|
276
262
|
this.distroLike = 'Debian';
|
|
277
|
-
this.
|
|
263
|
+
this.codenameLikeId = 'bullseye';
|
|
278
264
|
break;
|
|
279
265
|
}
|
|
280
266
|
case 'apricot': {
|
|
281
267
|
// Deepin 20 apricot
|
|
282
268
|
this.distroLike = 'Debian';
|
|
283
|
-
this.
|
|
269
|
+
this.codenameLikeId = 'bullseye';
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
case 'mierda': {
|
|
273
|
+
// Caraco
|
|
274
|
+
this.distroLike = 'Debian';
|
|
275
|
+
this.codenameLikeId = 'bullseye';
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
case 'filadelfia': {
|
|
279
|
+
// SysLinuxOS
|
|
280
|
+
this.distroLike = 'Debian';
|
|
281
|
+
this.codenameLikeId = 'bullseye';
|
|
284
282
|
break;
|
|
285
283
|
}
|
|
286
284
|
case 'siduction': {
|
|
287
285
|
// Debian 11 Siduction
|
|
288
286
|
this.distroLike = 'Debian';
|
|
289
|
-
this.
|
|
287
|
+
this.codenameLikeId = 'bullseye';
|
|
290
288
|
break;
|
|
291
289
|
}
|
|
292
290
|
case 'buster/sid': {
|
|
293
291
|
// Netrunner
|
|
294
292
|
this.distroLike = 'Debian';
|
|
295
|
-
this.
|
|
293
|
+
this.codenameLikeId = 'buster';
|
|
296
294
|
/**
|
|
297
295
|
* ArchLinux
|
|
298
296
|
*/
|
|
@@ -304,13 +302,13 @@ class Distro {
|
|
|
304
302
|
case 'Harpy-Eagle': {
|
|
305
303
|
this.familyId = 'archlinux';
|
|
306
304
|
this.distroLike = 'Arch';
|
|
307
|
-
this.
|
|
305
|
+
this.codenameLikeId = 'rolling';
|
|
308
306
|
break;
|
|
309
307
|
}
|
|
310
308
|
case 'White-tailed-eagle': {
|
|
311
309
|
this.familyId = 'archlinux';
|
|
312
310
|
this.distroLike = 'Arch';
|
|
313
|
-
this.
|
|
311
|
+
this.codenameLikeId = 'rolling';
|
|
314
312
|
break;
|
|
315
313
|
}
|
|
316
314
|
/**
|
|
@@ -319,7 +317,7 @@ class Distro {
|
|
|
319
317
|
case 'Qonos': {
|
|
320
318
|
this.familyId = 'archlinux';
|
|
321
319
|
this.distroLike = 'Arch';
|
|
322
|
-
this.
|
|
320
|
+
this.codenameLikeId = 'rolling';
|
|
323
321
|
break;
|
|
324
322
|
/**
|
|
325
323
|
* Fedora
|
|
@@ -328,7 +326,7 @@ class Distro {
|
|
|
328
326
|
case 'ThirtyFive': {
|
|
329
327
|
this.familyId = 'fedora';
|
|
330
328
|
this.distroLike = 'Fedora';
|
|
331
|
-
this.
|
|
329
|
+
this.codenameLikeId = 'thirtyfive';
|
|
332
330
|
break;
|
|
333
331
|
/**
|
|
334
332
|
* openSuse
|
|
@@ -337,8 +335,8 @@ class Distro {
|
|
|
337
335
|
case 'tumbleweed': {
|
|
338
336
|
this.familyId = 'suse';
|
|
339
337
|
this.distroLike = 'SUSE';
|
|
340
|
-
this.
|
|
341
|
-
this.
|
|
338
|
+
this.codenameId = 'tumbleweed';
|
|
339
|
+
this.codenameLikeId = 'tumbleweed';
|
|
342
340
|
break;
|
|
343
341
|
}
|
|
344
342
|
default: {
|
|
@@ -347,13 +345,13 @@ class Distro {
|
|
|
347
345
|
*/
|
|
348
346
|
console.log("This distro is not yet recognized, I'll try Debian buster");
|
|
349
347
|
this.distroLike = 'Debian';
|
|
350
|
-
this.
|
|
348
|
+
this.codenameLikeId = 'buster';
|
|
351
349
|
}
|
|
352
350
|
}
|
|
353
351
|
/**
|
|
354
352
|
* Selezione il mountpoint per squashfs
|
|
355
353
|
*/
|
|
356
|
-
if (this.
|
|
354
|
+
if (this.codenameLikeId === 'jessie' || this.codenameLikeId === 'stretch' || this.codenameLikeId === 'bionic' || this.codenameLikeId === 'xenial') {
|
|
357
355
|
this.mountpointSquashFs = '/lib/live/mount/medium/live/filesystem.squashfs';
|
|
358
356
|
}
|
|
359
357
|
else {
|