penguins-eggs 8.17.4 → 9.0.2
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 +235 -155
- package/addons/README.md +78 -84
- package/addons/{pve → blissos}/theme/applications/install-debian.desktop +0 -0
- package/addons/{pve → blissos}/theme/artwork/install-debian.png +0 -0
- package/addons/blissos/theme/calamares/branding/blissos-logo.png +0 -0
- package/addons/{pve → blissos}/theme/calamares/branding/branding.desc +0 -0
- package/addons/blissos/theme/calamares/branding/languages.png +0 -0
- package/addons/blissos/theme/calamares/branding/show.qml +75 -0
- package/addons/blissos/theme/calamares/branding/slide1.png +0 -0
- package/addons/blissos/theme/calamares/branding/slide2.png +0 -0
- package/addons/blissos/theme/calamares/branding/slide3.png +0 -0
- package/addons/blissos/theme/calamares/branding/welcome.png +0 -0
- package/addons/{pve → blissos}/theme/calamares/modules/partition.yml +2 -2
- package/addons/blissos/theme/livecd/README.md +23 -0
- package/addons/blissos/theme/livecd/grub.template.cfg +34 -0
- package/addons/blissos/theme/livecd/grub.theme.cfg +46 -0
- package/addons/blissos/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/blissos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/blissos/theme/livecd/splash.png +0 -0
- package/addons/debian/theme/README.md +23 -0
- package/addons/debian/theme/{branding → calamares/branding}/branding.desc +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/debian-logo.png +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/show.qml +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/slide1.png +0 -0
- package/addons/debian/theme/{branding → calamares/branding}/welcome.png +0 -0
- package/addons/debian/theme/calamares/modules/partition.yml +233 -0
- package/addons/debian/theme/livecd/README.md +23 -0
- package/addons/debian/theme/livecd/grub.template.cfg +34 -0
- package/addons/{pve/theme/livecd/theme.cfg → debian/theme/livecd/grub.theme.cfg} +4 -0
- package/addons/debian/theme/livecd/isolinux.template.cfg +30 -0
- package/{conf/distros/buster/isolinux/stdmenu.template.cfg → addons/debian/theme/livecd/isolinux.theme.cfg} +4 -0
- package/addons/debian/theme/livecd/splash.png +0 -0
- package/addons/deblinux/theme/README.md +19 -12
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +1 -1
- package/addons/eggs/theme/livecd/README.md +21 -6
- package/addons/eggs/theme/livecd/grub.template.cfg +11 -37
- package/addons/eggs/theme/livecd/{theme.cfg → grub.theme.cfg} +5 -1
- package/addons/eggs/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/eggs/theme/livecd/isolinux.theme.cfg +46 -0
- package/addons/eggs/theme/livecd/splash.png +0 -0
- package/addons/guadalinex/theme/livecd/README.md +23 -0
- package/addons/guadalinex/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +12 -3
- package/addons/guadalinex/theme/livecd/{theme.cfg → isolinux.theme.cfg} +0 -0
- package/addons/neon/theme/livecd/README.md +23 -0
- package/addons/neon/theme/livecd/grub.template.cfg +34 -0
- package/addons/{ufficiozero/theme/livecd/theme.cfg → neon/theme/livecd/grub.theme.cfg} +5 -1
- package/addons/neon/theme/livecd/isolinux.template.cfg +29 -0
- package/addons/neon/theme/livecd/isolinux.theme.cfg +46 -0
- package/addons/neon/theme/livecd/splash.pcx +0 -0
- package/addons/neon/theme/livecd/splash.png +0 -0
- package/addons/openos/theme/livecd/README.md +23 -0
- package/addons/openos/theme/livecd/{theme.cfg → grub.theme.cfg} +0 -0
- package/addons/openos/theme/livecd/{menu.template.cfg → isolinux.template.cfg} +11 -3
- package/addons/openos/theme/livecd/isolinux.theme.cfg +45 -0
- package/addons/ufficiozero/theme/applications/install-debian.desktop +17 -2
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +2 -4
- package/conf/distros/bionic/calamares/settings.yml +5 -5
- package/conf/distros/bookworm/README.md +9 -0
- package/conf/distros/bullseye/README.md +6 -8
- package/conf/distros/buster/calamares/modules/shellprocess_eggs-cleanup.yml +6 -0
- package/conf/distros/buster/calamares/settings.yml +14 -3
- package/conf/distros/chimaera/README.md +3 -0
- package/conf/distros/daedalus/README.md +3 -0
- package/conf/distros/focal/calamares/settings.yml +2 -2
- package/conf/distros/jammy/README.md +9 -0
- package/conf/distros/rolling/README.md +3 -0
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/module.yml +9 -0
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/remove-link.sh +3 -0
- package/conf/distros/rolling/calamares/modules/displaymanager.yml +22 -0
- package/conf/distros/rolling/calamares/modules/finished.yml +6 -0
- package/conf/distros/rolling/calamares/modules/fstab.yml +13 -0
- package/conf/distros/rolling/calamares/modules/locale.yml +97 -0
- package/conf/distros/rolling/calamares/modules/luksopenswaphookcfg.yml +6 -0
- package/conf/distros/rolling/calamares/modules/mount.yml +38 -0
- package/conf/distros/rolling/calamares/modules/packages.yml +8 -0
- package/conf/distros/rolling/calamares/modules/removeuser.yml +15 -0
- package/conf/distros/rolling/calamares/modules/unpackfs.yml +7 -0
- package/conf/distros/rolling/calamares/modules/users.yml +20 -0
- package/conf/distros/rolling/calamares/modules/welcome.yml +19 -0
- package/conf/distros/{bullseye → rolling}/calamares/settings.yml +17 -12
- package/conf/distros/thirtyfive/README.md +3 -0
- package/conf/distros/tumbleweed/README.md +3 -0
- package/conf/eggs.yaml +1 -1
- package/conf/exclude.list +2 -4
- package/conf/tools.yaml +1 -1
- package/lib/classes/basket.js +24 -28
- package/lib/classes/bleach.js +17 -17
- package/lib/classes/compressors.js +15 -14
- package/lib/classes/daddy.js +38 -31
- package/lib/classes/distro.d.ts +3 -2
- package/lib/classes/distro.js +288 -179
- package/lib/classes/family/archlinux.d.ts +69 -0
- package/lib/classes/family/archlinux.js +181 -0
- package/lib/classes/family/debian.d.ts +64 -0
- package/lib/classes/family/debian.js +227 -0
- package/lib/classes/family/fedora.d.ts +63 -0
- package/lib/classes/family/fedora.js +169 -0
- package/lib/classes/family/suse.d.ts +63 -0
- package/lib/classes/family/suse.js +169 -0
- package/lib/classes/i18n.js +16 -16
- package/lib/classes/incubation/branding.js +5 -4
- package/lib/classes/incubation/distros/bionic.js +1 -2
- package/lib/classes/incubation/distros/buster.js +2 -2
- package/lib/classes/incubation/distros/focal.js +3 -2
- package/lib/classes/incubation/distros/jessie.js +1 -25
- package/lib/classes/incubation/distros/{bullseye.d.ts → rolling.d.ts} +3 -3
- package/lib/classes/incubation/distros/{bullseye.js → rolling.js} +15 -16
- package/lib/classes/incubation/fisherman-helper/displaymanager.js +2 -7
- package/lib/classes/incubation/fisherman-helper/packages.js +31 -32
- package/lib/classes/incubation/fisherman.d.ts +17 -17
- package/lib/classes/incubation/fisherman.js +84 -71
- package/lib/classes/incubation/incubator.js +116 -78
- package/lib/classes/incubation/installer.d.ts +2 -2
- package/lib/classes/incubation/installer.js +6 -20
- package/lib/classes/initrd.d.ts +1 -1
- package/lib/classes/initrd.js +37 -30
- package/lib/classes/krill_install.js +135 -132
- package/lib/classes/krill_prepare.js +51 -51
- package/lib/classes/n8.js +6 -11
- package/lib/classes/ovary.d.ts +29 -11
- package/lib/classes/ovary.js +711 -605
- package/lib/classes/pacman.d.ts +53 -58
- package/lib/classes/pacman.js +512 -431
- package/lib/classes/pve-live.js +6 -6
- package/lib/classes/settings.js +46 -55
- package/lib/classes/systemctl.d.ts +6 -6
- package/lib/classes/systemctl.js +7 -7
- package/lib/classes/tools.d.ts +1 -1
- package/lib/classes/tools.js +10 -10
- package/lib/classes/utils.d.ts +9 -12
- package/lib/classes/utils.js +127 -106
- package/lib/classes/xdg.js +94 -90
- package/lib/classes/yolk.js +36 -29
- package/lib/commands/adapt.d.ts +3 -3
- package/lib/commands/adapt.js +12 -12
- package/lib/commands/bro.d.ts +14 -0
- package/lib/commands/bro.js +31 -0
- package/lib/commands/calamares.d.ts +7 -7
- package/lib/commands/calamares.js +21 -46
- package/lib/commands/config.d.ts +5 -5
- package/lib/commands/config.js +68 -75
- package/lib/commands/dad.d.ts +5 -5
- package/lib/commands/dad.js +11 -11
- package/lib/commands/export/deb.d.ts +8 -8
- package/lib/commands/export/deb.js +16 -16
- package/lib/commands/export/docs.d.ts +2 -2
- package/lib/commands/export/docs.js +9 -9
- package/lib/commands/export/iso.d.ts +4 -4
- package/lib/commands/export/iso.js +12 -17
- package/lib/commands/info.d.ts +9 -3
- package/lib/commands/info.js +14 -164
- package/lib/commands/install.d.ts +4 -4
- package/lib/commands/install.js +19 -14
- package/lib/commands/kill.d.ts +3 -3
- package/lib/commands/kill.js +11 -13
- package/lib/commands/mom.d.ts +2 -2
- package/lib/commands/mom.js +8 -8
- package/lib/commands/produce.d.ts +14 -14
- package/lib/commands/produce.js +42 -45
- package/lib/commands/remove.d.ts +5 -5
- package/lib/commands/remove.js +46 -57
- package/lib/commands/tools/clean.d.ts +3 -3
- package/lib/commands/tools/clean.js +10 -12
- package/lib/commands/tools/locales.d.ts +4 -4
- package/lib/commands/tools/locales.js +8 -8
- package/lib/commands/tools/skel.d.ts +4 -4
- package/lib/commands/tools/skel.js +10 -15
- package/lib/commands/tools/stat.d.ts +7 -4
- package/lib/commands/tools/stat.js +20 -13
- package/lib/commands/tools/yolk.d.ts +3 -3
- package/lib/commands/tools/yolk.js +12 -12
- package/lib/commands/update.d.ts +5 -10
- package/lib/commands/update.js +56 -72
- package/lib/components/elements/information.d.ts +4 -0
- package/lib/components/elements/information.js +166 -0
- package/lib/components/elements/steps.js +1 -1
- package/lib/components/elements/title.js +7 -10
- package/lib/components/finished.js +5 -5
- package/lib/components/install.js +5 -5
- package/lib/components/keyboard.js +5 -5
- package/lib/components/location.js +5 -5
- package/lib/components/network.js +5 -5
- package/lib/components/partitions.js +5 -5
- package/lib/components/summary.js +5 -5
- package/lib/components/users.js +6 -6
- package/lib/components/welcome.js +6 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/interfaces/i-distro.d.ts +3 -2
- package/lib/interfaces/i-settings.d.ts +2 -2
- package/lib/lib/cli-autologin.d.ts +19 -2
- package/lib/lib/cli-autologin.js +114 -39
- package/lib/lib/dependencies.d.ts +9 -6
- package/lib/lib/dependencies.js +22 -13
- package/lib/lib/get_address.js +2 -2
- package/lib/lib/get_dns.js +2 -2
- package/lib/lib/get_domain.js +2 -2
- package/lib/lib/get_gateway.js +2 -2
- package/lib/lib/get_hostname.js +2 -2
- package/lib/lib/get_netmask.js +2 -2
- package/lib/lib/get_password.js +2 -2
- package/lib/lib/get_root_password.js +2 -2
- package/lib/lib/get_userfullname.js +2 -2
- package/lib/lib/get_username.js +2 -2
- package/lib/lib/select_address_type.js +2 -5
- package/lib/lib/select_filesystem_type.js +5 -14
- package/lib/lib/select_installation_device.js +3 -3
- package/lib/lib/select_interface.js +1 -1
- package/lib/lib/select_keyboard_layout.js +2 -10
- package/lib/lib/select_languages.js +2 -2
- package/lib/lib/select_regions.js +1 -12
- package/lib/lib/select_user_swap_choice.js +4 -4
- package/lib/lib/select_zones.js +483 -62
- package/oclif.manifest.json +1 -1
- package/package.json +115 -107
- package/scripts/bros/waydroid-helper.sh +92 -0
- package/scripts/eggs.bash +65 -35
- package/scripts/not-used/eggs-cleanup.sh +7 -0
- package/scripts/{install-eggs-ppa.sh → not-used/install-eggs-ppa.sh} +0 -0
- package/scripts/{mkinitramfs → not-used/mkinitramfs} +0 -0
- package/scripts/{pve-live.sh → not-used/pve-live.sh} +0 -0
- package/addons/eggs/theme/livecd/menu.template.cfg +0 -54
- package/addons/pve/theme/applications/penguins-pve.desktop +0 -24
- package/addons/pve/theme/calamares/branding/pve-logo.png +0 -0
- package/addons/pve/theme/calamares/branding/show.qml +0 -227
- package/addons/pve/theme/calamares/branding/slide1.png +0 -0
- package/addons/pve/theme/calamares/branding/slide2.png +0 -0
- package/addons/pve/theme/calamares/branding/slide3.png +0 -0
- package/addons/pve/theme/calamares/branding/slide4.png +0 -0
- package/addons/pve/theme/calamares/branding/slide5.png +0 -0
- package/addons/pve/theme/calamares/branding/slide6.png +0 -0
- package/addons/pve/theme/calamares/branding/slide7.png +0 -0
- package/addons/pve/theme/calamares/branding/slide8.png +0 -0
- package/addons/pve/theme/calamares/branding/slide9.png +0 -0
- package/addons/pve/theme/calamares/branding/welcome.png +0 -0
- package/addons/pve/theme/livecd/README.md +0 -8
- package/addons/pve/theme/livecd/grub.template.cfg +0 -60
- package/addons/pve/theme/livecd/menu.template.cfg +0 -54
- package/addons/pve/theme/livecd/splash.png +0 -0
- package/addons/ufficiozero/theme/artwork/install-debian.png +0 -0
- package/addons/ufficiozero/theme/livecd/README.md +0 -8
- package/addons/ufficiozero/theme/livecd/grub.template.cfg +0 -60
- package/addons/ufficiozero/theme/livecd/menu.template.cfg +0 -54
- package/changelog.md +0 -154
- package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/bootloader-config.sh +0 -28
- package/conf/distros/bullseye/calamares/calamares-modules/bootloader-config/module.yml +0 -8
- package/conf/distros/buster/grub/grub.template.cfg +0 -58
- package/conf/distros/buster/grub/loopback.cfg +0 -1
- package/conf/distros/buster/grub/theme.cfg +0 -42
- package/conf/distros/buster/isolinux/isolinux.template.cfg +0 -8
- package/conf/distros/buster/isolinux/menu.template.cfg +0 -56
- package/conf/distros/focal/grub/grub.template.cfg +0 -67
- package/conf/distros/focal/isolinux/menu.template.cfg +0 -54
- package/lib/classes/incubation/distros/beowulf.d.ts +0 -30
- package/lib/classes/incubation/distros/beowulf.js +0 -69
- package/lib/classes/krill_install_compare.d.ts +0 -200
- package/lib/classes/krill_install_compare.js +0 -1110
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/scripts/python-minimal-deb/anti-python-minimal +0 -7
- package/scripts/python-minimal-deb/python-minimal_99_all.deb +0 -0
- package/scripts/python-minimal-deb/python-minimal_99_amd64.buildinfo +0 -168
- package/scripts/python-minimal-deb/python-minimal_99_amd64.changes +0 -25
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* penguins-eggs: fisherman.ts
|
|
3
|
-
*
|
|
4
|
-
* author: Piero Proietti
|
|
5
|
-
* mail: piero.proietti@gmail.com
|
|
6
|
-
*/
|
|
2
|
+
* penguins-eggs: fisherman.ts
|
|
3
|
+
*
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* mail: piero.proietti@gmail.com
|
|
6
|
+
*/
|
|
7
7
|
import { IDistro } from '../../interfaces';
|
|
8
|
-
import { IInstaller } from '../../interfaces
|
|
8
|
+
import { IInstaller } from '../../interfaces';
|
|
9
9
|
export default class Fisherman {
|
|
10
10
|
installer: IInstaller;
|
|
11
11
|
distro: IDistro;
|
|
12
12
|
verbose: boolean;
|
|
13
13
|
constructor(distro: IDistro, installer: IInstaller, verbose?: boolean);
|
|
14
14
|
/**
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
* write setting
|
|
16
|
+
*/
|
|
17
17
|
settings(branding?: string): Promise<void>;
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
@@ -21,9 +21,9 @@ export default class Fisherman {
|
|
|
21
21
|
*/
|
|
22
22
|
shellprocess(name: string): Promise<void>;
|
|
23
23
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
*
|
|
25
|
+
* @param name
|
|
26
|
+
*/
|
|
27
27
|
contextualprocess(name: string): Promise<void>;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
@@ -50,13 +50,13 @@ export default class Fisherman {
|
|
|
50
50
|
*/
|
|
51
51
|
show(name: string, type: string, path: string): void;
|
|
52
52
|
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
* ====================================================================================
|
|
54
|
+
* M O D U L E S
|
|
55
|
+
* ====================================================================================
|
|
56
|
+
*/
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
* Al momento rimane con la vecchia configurazione
|
|
59
|
+
*/
|
|
60
60
|
moduleFinished(): Promise<void>;
|
|
61
61
|
/**
|
|
62
62
|
* Al momento rimane con la vecchia configurazione
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* penguins-eggs: fisherman.ts
|
|
4
|
-
*
|
|
5
|
-
* author: Piero Proietti
|
|
6
|
-
* mail: piero.proietti@gmail.com
|
|
7
|
-
*/
|
|
3
|
+
* penguins-eggs: fisherman.ts
|
|
4
|
+
*
|
|
5
|
+
* author: Piero Proietti
|
|
6
|
+
* mail: piero.proietti@gmail.com
|
|
7
|
+
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const utils_1 = tslib_1.__importDefault(require("../utils"));
|
|
15
|
-
const
|
|
10
|
+
const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
|
|
11
|
+
const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
|
|
12
|
+
const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
|
|
13
|
+
const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
|
|
14
|
+
const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
|
|
15
|
+
const displaymanager_1 = require("./fisherman-helper/displaymanager");
|
|
16
|
+
const utils_2 = require("../../lib/utils");
|
|
16
17
|
class Fisherman {
|
|
17
18
|
constructor(distro, installer, verbose = false) {
|
|
18
19
|
this.installer = {};
|
|
@@ -22,45 +23,50 @@ class Fisherman {
|
|
|
22
23
|
this.verbose = verbose;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
* write setting
|
|
27
|
+
*/
|
|
27
28
|
async settings(branding = 'eggs') {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let
|
|
29
|
+
const settings = this.installer.configuration + 'settings.conf';
|
|
30
|
+
shelljs_1.default.cp(this.installer.template + 'settings.yml', settings);
|
|
31
|
+
let hasSystemd = '# ';
|
|
31
32
|
if (utils_1.default.isSystemd()) {
|
|
32
|
-
|
|
33
|
+
hasSystemd = '- ';
|
|
34
|
+
}
|
|
35
|
+
let hasDisplaymanager = '# ';
|
|
36
|
+
if ((0, displaymanager_1.displaymanager)() !== '') {
|
|
37
|
+
hasDisplaymanager = '- ';
|
|
33
38
|
}
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
shelljs_1.default.sed('-i', '{{hasSystemd}}', hasSystemd, settings);
|
|
40
|
+
shelljs_1.default.sed('-i', '{{hasDisplaymanager}}', hasDisplaymanager, settings);
|
|
41
|
+
shelljs_1.default.sed('-i', '{{branding}}', branding, settings);
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
*
|
|
39
45
|
* @param name
|
|
40
46
|
*/
|
|
41
47
|
async shellprocess(name) {
|
|
42
|
-
const moduleSource =
|
|
48
|
+
const moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateModules + 'shellprocess_' + name + '.yml');
|
|
43
49
|
const moduleDest = this.installer.modules + 'shellprocess_' + name + '.conf';
|
|
44
|
-
if (
|
|
50
|
+
if (node_fs_1.default.existsSync(moduleSource)) {
|
|
45
51
|
if (this.verbose)
|
|
46
52
|
this.show(name, 'shellprocess', moduleDest);
|
|
47
|
-
|
|
53
|
+
shelljs_1.default.cp(moduleSource, moduleDest);
|
|
48
54
|
}
|
|
49
55
|
else if (this.verbose) {
|
|
50
56
|
console.log(`calamares: ${name} shellprocess, nothing to do`);
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
*
|
|
61
|
+
* @param name
|
|
62
|
+
*/
|
|
57
63
|
async contextualprocess(name) {
|
|
58
|
-
const moduleSource =
|
|
64
|
+
const moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateModules + name + '_context.yml');
|
|
59
65
|
const moduleDest = this.installer.modules + name + '_context.conf';
|
|
60
|
-
if (
|
|
66
|
+
if (node_fs_1.default.existsSync(moduleSource)) {
|
|
61
67
|
if (this.verbose)
|
|
62
68
|
this.show(name, 'contextualprocess', moduleDest);
|
|
63
|
-
|
|
69
|
+
shelljs_1.default.cp(moduleSource, moduleDest);
|
|
64
70
|
}
|
|
65
71
|
else if (this.verbose) {
|
|
66
72
|
console.log(`calamares: ${name} contextualprocess, nothing to do!`);
|
|
@@ -72,7 +78,7 @@ class Fisherman {
|
|
|
72
78
|
* @param replaces [['search','replace']]
|
|
73
79
|
*/
|
|
74
80
|
async buildModule(name, vendor = '') {
|
|
75
|
-
let moduleSource =
|
|
81
|
+
let moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateModules + name + '.yml');
|
|
76
82
|
/**
|
|
77
83
|
* We need vendor here to have possibility to load custom modules for calamares
|
|
78
84
|
* the custom modules live in: /addons/vendor/theme/calamares/modules
|
|
@@ -90,19 +96,19 @@ class Fisherman {
|
|
|
90
96
|
*
|
|
91
97
|
*/
|
|
92
98
|
if (vendor !== '') {
|
|
93
|
-
const customModuleSource =
|
|
94
|
-
if (
|
|
99
|
+
const customModuleSource = node_path_1.default.resolve(__dirname, `../../../addons/${vendor}/theme/calamares/modules/${name}.yml`);
|
|
100
|
+
if (node_fs_1.default.existsSync(customModuleSource)) {
|
|
95
101
|
moduleSource = customModuleSource;
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
const moduleDest = this.installer.modules + name + '.conf';
|
|
99
|
-
if (
|
|
105
|
+
if (node_fs_1.default.existsSync(moduleSource)) {
|
|
100
106
|
if (this.verbose)
|
|
101
107
|
this.show(name, 'module', moduleDest);
|
|
102
|
-
|
|
108
|
+
shelljs_1.default.cp(moduleSource, moduleDest);
|
|
103
109
|
}
|
|
104
110
|
else if (this.verbose) {
|
|
105
|
-
console.log('unchanged: ' +
|
|
111
|
+
console.log('unchanged: ' + chalk_1.default.greenBright(name));
|
|
106
112
|
}
|
|
107
113
|
}
|
|
108
114
|
/**
|
|
@@ -111,7 +117,7 @@ class Fisherman {
|
|
|
111
117
|
* @param isScript
|
|
112
118
|
*/
|
|
113
119
|
async buildCalamaresModule(name, isScript = true) {
|
|
114
|
-
const moduleTemplate =
|
|
120
|
+
const moduleTemplate = node_path_1.default.resolve(__dirname, this.installer.templateMultiarch + name);
|
|
115
121
|
const moduleDest = this.installer.multiarchModules + name;
|
|
116
122
|
const moduleScript = `/usr/sbin/${name}.sh`;
|
|
117
123
|
// console.log('moduleDest: ' + moduleDest)
|
|
@@ -119,13 +125,13 @@ class Fisherman {
|
|
|
119
125
|
// console.log('moduleScript: ' + moduleScript)
|
|
120
126
|
if (this.verbose)
|
|
121
127
|
this.show(name, 'module', moduleDest);
|
|
122
|
-
if (!
|
|
123
|
-
|
|
128
|
+
if (!node_fs_1.default.existsSync(moduleDest)) {
|
|
129
|
+
node_fs_1.default.mkdirSync(moduleDest);
|
|
124
130
|
}
|
|
125
|
-
|
|
131
|
+
shelljs_1.default.cp(`${moduleTemplate}/module.yml`, `${moduleDest}/module.desc`);
|
|
126
132
|
if (isScript) {
|
|
127
|
-
|
|
128
|
-
await exec(`chmod +x ${moduleScript}`);
|
|
133
|
+
shelljs_1.default.cp(`${moduleTemplate}/${name}.sh`, moduleScript);
|
|
134
|
+
await (0, utils_2.exec)(`chmod +x ${moduleScript}`);
|
|
129
135
|
}
|
|
130
136
|
return moduleScript;
|
|
131
137
|
}
|
|
@@ -134,17 +140,17 @@ class Fisherman {
|
|
|
134
140
|
* @param name
|
|
135
141
|
*/
|
|
136
142
|
async buildCalamaresPy(name) {
|
|
137
|
-
const moduleSource =
|
|
143
|
+
const moduleSource = node_path_1.default.resolve(__dirname, this.installer.templateMultiarch + '/' + name);
|
|
138
144
|
const moduleDest = this.installer.multiarchModules + name;
|
|
139
145
|
if (this.verbose)
|
|
140
146
|
this.show(name, 'python', moduleDest);
|
|
141
|
-
if (!
|
|
142
|
-
|
|
147
|
+
if (!node_fs_1.default.existsSync(moduleDest)) {
|
|
148
|
+
node_fs_1.default.mkdirSync(moduleDest);
|
|
143
149
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
await exec(`chmod +x ${moduleSource}/main.py`);
|
|
150
|
+
shelljs_1.default.cp(`${moduleSource}/module.yml`, `${moduleDest}/module.desc`);
|
|
151
|
+
shelljs_1.default.cp(`${moduleSource}/${name}.yml`, `${moduleDest}/${name}.conf`);
|
|
152
|
+
shelljs_1.default.cp(`${moduleSource}/main.py`, moduleDest);
|
|
153
|
+
await (0, utils_2.exec)(`chmod +x ${moduleSource}/main.py`);
|
|
148
154
|
}
|
|
149
155
|
/**
|
|
150
156
|
*
|
|
@@ -153,32 +159,39 @@ class Fisherman {
|
|
|
153
159
|
* @param path
|
|
154
160
|
*/
|
|
155
161
|
show(name, type, path) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
switch (type) {
|
|
163
|
+
case 'module': {
|
|
164
|
+
console.log('fisherman: ' + chalk_1.default.yellow(name) + ' module in ' + chalk_1.default.yellow(path));
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
case 'calamares_module': {
|
|
168
|
+
console.log('fisherman: ' + chalk_1.default.cyanBright(name) + ' calamares_module in ' + chalk_1.default.cyanBright(path));
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
case 'shellprocess': {
|
|
172
|
+
console.log('fisherman: ' + chalk_1.default.green(name) + ' shellprocess in ' + chalk_1.default.green(path));
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
case 'contextualprocess': {
|
|
176
|
+
console.log('fisherman: ' + chalk_1.default.cyanBright(name) + ' shellprocess in ' + chalk_1.default.cyanBright(path));
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
// No default
|
|
167
180
|
}
|
|
168
181
|
}
|
|
169
182
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
183
|
+
* ====================================================================================
|
|
184
|
+
* M O D U L E S
|
|
185
|
+
* ====================================================================================
|
|
186
|
+
*/
|
|
174
187
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
188
|
+
* Al momento rimane con la vecchia configurazione
|
|
189
|
+
*/
|
|
177
190
|
async moduleFinished() {
|
|
178
191
|
const name = 'finished';
|
|
179
192
|
await this.buildModule(name);
|
|
180
193
|
const restartNowCommand = 'reboot';
|
|
181
|
-
|
|
194
|
+
shelljs_1.default.sed('-i', '{{restartNowCommand}}', restartNowCommand, this.installer.modules + name + '.conf');
|
|
182
195
|
}
|
|
183
196
|
/**
|
|
184
197
|
* Al momento rimane con la vecchia configurazione
|
|
@@ -186,7 +199,7 @@ class Fisherman {
|
|
|
186
199
|
async moduleUnpackfs() {
|
|
187
200
|
const name = 'unpackfs';
|
|
188
201
|
this.buildModule(name);
|
|
189
|
-
|
|
202
|
+
shelljs_1.default.sed('-i', '{{source}}', this.distro.mountpointSquashFs, this.installer.modules + name + '.conf');
|
|
190
203
|
}
|
|
191
204
|
/**
|
|
192
205
|
* usa i moduli-ts
|
|
@@ -195,7 +208,7 @@ class Fisherman {
|
|
|
195
208
|
const name = 'displaymanager';
|
|
196
209
|
const displaymanager = require('./fisherman-helper/displaymanager').displaymanager;
|
|
197
210
|
this.buildModule(name);
|
|
198
|
-
|
|
211
|
+
shelljs_1.default.sed('-i', '{{displaymanagers}}', displaymanager(), this.installer.modules + name + '.conf');
|
|
199
212
|
}
|
|
200
213
|
/**
|
|
201
214
|
* usa i moduli-ts
|
|
@@ -206,12 +219,12 @@ class Fisherman {
|
|
|
206
219
|
const tryInstall = require('./fisherman-helper/packages').tryInstall;
|
|
207
220
|
this.buildModule(name);
|
|
208
221
|
if (remove) {
|
|
209
|
-
|
|
222
|
+
shelljs_1.default.sed('-i', '{{remove}}', removePackages(distro), this.installer.modules + name + '.conf');
|
|
210
223
|
}
|
|
211
224
|
else {
|
|
212
|
-
|
|
225
|
+
shelljs_1.default.sed('-i', '{{remove}}', '', this.installer.modules + name + '.conf');
|
|
213
226
|
}
|
|
214
|
-
|
|
227
|
+
shelljs_1.default.sed('-i', '{{try_install}}', tryInstall(distro), this.installer.modules + name + '.conf');
|
|
215
228
|
}
|
|
216
229
|
/**
|
|
217
230
|
* Al momento rimane con la vecchia configurazione
|
|
@@ -219,7 +232,7 @@ class Fisherman {
|
|
|
219
232
|
async moduleRemoveuser(username) {
|
|
220
233
|
const name = 'removeuser';
|
|
221
234
|
this.buildModule(name);
|
|
222
|
-
|
|
235
|
+
shelljs_1.default.sed('-i', '{{username}}', username, this.installer.modules + name + '.conf');
|
|
223
236
|
}
|
|
224
237
|
}
|
|
225
238
|
exports.default = Fisherman;
|