penguins-eggs 25.11.12 → 25.11.29
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 +161 -140
- package/README.md +811 -4
- package/README.pdf +20763 -3833
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
- package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
- package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
- package/addons/eggs/theme/applications/install-system.desktop +0 -0
- package/addons/eggs/theme/livecd/full.grub.main.cfg +39 -4
- package/addons/eggs/theme/livecd/full.isolinux.main.cfg +47 -4
- package/assets/calamares/install-system.sh +0 -0
- package/assets/penguins-eggs.desktop +0 -0
- package/assets/penguins-krill.desktop +0 -0
- package/assets/penguins-links-add.desktop +0 -0
- package/assets/penguins-live-installer.desktop +0 -0
- package/bin/dev.js +0 -0
- package/bin/run.js +11 -0
- package/conf/derivatives.yaml +2 -1
- package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/focal/calamares/calamares-modules/.keepit +0 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/cleanup.sh +20 -0
- package/conf/distros/focal/calamares/calamares-modules/cleanup/module.yml +9 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/module.yml +8 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk/sources-yolk.sh +50 -0
- package/conf/distros/focal/calamares/calamares-modules/sources-yolk-undo/module.yml +8 -0
- package/conf/distros/focal/calamares/libexec/.keepit +0 -0
- package/conf/distros/focal/calamares/libexec/README.md +5 -0
- package/conf/distros/focal/calamares/libexec/calamares-aptsources.sh +15 -0
- package/conf/distros/focal/calamares/libexec/calamares-l10n-helper.sh +38 -0
- package/conf/distros/focal/calamares/libexec/calamares-logs-helper.sh +34 -0
- package/conf/distros/focal/calamares/libexec/calamares-nomodeset.sh +19 -0
- package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +26 -0
- package/conf/distros/focal/calamares/modules/before_bootloader_context.yml +12 -0
- package/conf/distros/focal/calamares/modules/bootloader.yml +86 -0
- package/conf/distros/focal/calamares/modules/bootloader.yml.old +35 -0
- package/conf/distros/focal/calamares/modules/displaymanager.yml +12 -0
- package/conf/distros/focal/calamares/modules/finished.yml +6 -0
- package/conf/distros/focal/calamares/modules/fstab.yml +63 -0
- package/conf/distros/focal/calamares/modules/grubcfg.yml +51 -0
- package/conf/distros/focal/calamares/modules/keyboard.yml +29 -0
- package/conf/distros/focal/calamares/modules/locale.yml +7 -0
- package/conf/distros/focal/calamares/modules/machineid.yml +10 -0
- package/conf/distros/focal/calamares/modules/mount.yml +20 -0
- package/conf/distros/focal/calamares/modules/netinstall.yml +5 -0
- package/conf/distros/focal/calamares/modules/packages.mustache +5 -0
- package/conf/distros/focal/calamares/modules/partition.yml +21 -0
- package/conf/distros/focal/calamares/modules/removeuser.mustache +3 -0
- package/conf/distros/focal/calamares/modules/shellprocess@aptsources.yml +11 -0
- package/conf/distros/focal/calamares/modules/shellprocess@boot_deploy.yml +9 -0
- package/conf/distros/focal/calamares/modules/shellprocess@boot_reconfigure.yml +15 -0
- package/conf/distros/focal/calamares/modules/shellprocess@install_translations.yml +8 -0
- package/conf/distros/focal/calamares/modules/shellprocess@logs.yml +8 -0
- package/conf/distros/focal/calamares/modules/shellprocess@mkinitramfs.yml +6 -0
- package/conf/distros/focal/calamares/modules/shellprocess@nomodeset.yml +12 -0
- package/conf/distros/focal/calamares/modules/umount.yml +4 -0
- package/conf/distros/focal/calamares/modules/unpackfs.mustache +6 -0
- package/conf/distros/focal/calamares/modules/users.yml +27 -0
- package/conf/distros/focal/calamares/modules/welcome.yml +24 -0
- package/conf/distros/focal/calamares/settings.yml +97 -0
- package/conf/distros/noble/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/noble/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-aptsources.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-logs-helper.sh +0 -0
- package/conf/distros/noble/calamares/libexec/calamares-nomodeset.sh +0 -0
- package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/opensuse/calamares/settings.yml +0 -0
- package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/trixie/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/init/unattended.sh +0 -0
- package/dist/appimage/dependency-manager.d.ts +31 -0
- package/dist/appimage/dependency-manager.js +292 -0
- package/dist/appimage/first-run-check.d.ts +8 -0
- package/dist/appimage/first-run-check.js +13 -0
- package/dist/bin/dev.cmd +3 -0
- package/dist/bin/dev.js +6 -0
- package/dist/bin/run.cmd +3 -0
- package/dist/bin/run.js +16 -0
- package/dist/classes/cli-autologin.js +5 -5
- package/dist/classes/daddy.js +11 -11
- package/dist/classes/diversions.d.ts +5 -0
- package/dist/classes/diversions.js +23 -7
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +7 -0
- package/dist/classes/incubation/fisherman-helper/initcpio.js +7 -0
- package/dist/classes/incubation/fisherman.js +0 -2
- package/dist/classes/network.d.ts +1 -1
- package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -1
- package/dist/classes/ovary.d/edit-live-fs.js +129 -93
- package/dist/classes/ovary.d/fertilization.js +1 -1
- package/dist/classes/ovary.d/xorriso-command.js +1 -5
- package/dist/classes/pacman.d.ts +21 -7
- package/dist/classes/pacman.js +59 -39
- package/dist/classes/utils.d.ts +5 -5
- package/dist/classes/utils.js +30 -11
- package/dist/commands/calamares.js +1 -1
- package/dist/commands/config.js +3 -14
- package/dist/commands/cuckoo.js +1 -1
- package/dist/commands/{analyze.d.ts → export/appimage.d.ts} +10 -9
- package/dist/commands/export/appimage.js +76 -0
- package/dist/commands/export/iso.js +1 -1
- package/dist/commands/export/pkg.d.ts +1 -1
- package/dist/commands/export/pkg.js +2 -2
- package/dist/commands/{install.d.ts → krill.d.ts} +3 -4
- package/dist/commands/{install.js → krill.js} +5 -6
- package/dist/commands/produce.js +1 -1
- package/dist/commands/setup/install.d.ts +17 -0
- package/dist/commands/setup/install.js +71 -0
- package/dist/commands/setup/purge.d.ts +17 -0
- package/dist/commands/setup/purge.js +71 -0
- package/dist/commands/tools/repo.d.ts +0 -5
- package/dist/commands/tools/repo.js +205 -127
- package/dist/commands/update.d.ts +16 -1
- package/dist/commands/update.js +140 -63
- package/dist/krill/components/information.js +2 -2
- package/dist/krill/components/title.js +13 -13
- package/dist/lib/utils.d.ts +16 -0
- package/dist/lib/utils.js +5 -32
- package/dracut/create-symlink +0 -0
- package/dracut/export +0 -0
- package/dracut/export-dracut-analysis +0 -0
- package/dracut/export-dracut-log +0 -0
- package/dracut/mkisofs +0 -0
- package/dracut/modules.d/00debug-shell/debug-hook.sh +0 -0
- package/dracut/modules.d/00debug-shell/module-setup.sh +0 -0
- package/dracut/modules.d/90block/block-cmdline.sh +0 -0
- package/dracut/modules.d/90block/module-setup.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan-fallback.sh +0 -0
- package/dracut/modules.d/95iso-scan/iso-scan.sh +0 -0
- package/dracut/modules.d/95iso-scan/module-setup.sh +0 -0
- package/dracut/modules.d/95luks-loop/luks-loop.sh +0 -0
- package/dracut/modules.d/95luks-loop/module-setup.sh +0 -0
- package/dracut/renew-initramfs +0 -0
- package/dracut/sbin2bin +0 -0
- package/dracut/update-dracut-conf-d +0 -0
- package/dracut/update-dracut-modules +0 -0
- package/eui/eui-autostart-cinnamon.desktop +0 -0
- package/eui/eui-autostart-xfce.desktop +0 -0
- package/eui/eui-create-image.sh +0 -0
- package/eui/eui-start.sh +0 -0
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +594 -9
- package/package.json +124 -130
- package/perrisbrewery/scripts/postinst +0 -0
- package/perrisbrewery/scripts/postrm +0 -0
- package/perrisbrewery/scripts/preinst +0 -0
- package/perrisbrewery/scripts/prerm +0 -0
- package/perrisbrewery/template/dependencies.yaml +0 -5
- package/perrisbrewery/template/man.template.md +7 -0
- package/scripts/99clean +0 -0
- package/scripts/_eggs +56 -47
- package/scripts/adapt.sh +0 -0
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/eggs.bash +4 -4
- package/scripts/lsb_release +0 -0
- package/scripts/mom.sh +0 -0
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/resy +0 -0
- package/dist/commands/analyze.js +0 -95
- package/dist/commands/pods.d.ts +0 -22
- package/dist/commands/pods.js +0 -92
- package/scripts/boot-encrypted-root.sh +0 -220
- package/scripts/mount-encrypted-home.sh +0 -324
package/dist/classes/utils.js
CHANGED
|
@@ -15,8 +15,8 @@ import os from 'os';
|
|
|
15
15
|
import inquirer from 'inquirer';
|
|
16
16
|
import { execSync, spawnSync } from 'child_process';
|
|
17
17
|
import chalk from 'chalk';
|
|
18
|
-
import { Netmask } from 'netmask';
|
|
19
18
|
import Kernel from './utils.d/kernel.js';
|
|
19
|
+
// libraries
|
|
20
20
|
import Distro from './distro.js';
|
|
21
21
|
// pjson
|
|
22
22
|
import { createRequire } from 'module';
|
|
@@ -91,6 +91,14 @@ export default class Utils {
|
|
|
91
91
|
}
|
|
92
92
|
return result;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* isAppImage
|
|
96
|
+
*/
|
|
97
|
+
static isAppImage() {
|
|
98
|
+
return !!process.env.APPIMAGE ||
|
|
99
|
+
process.execPath.includes('.AppImage') ||
|
|
100
|
+
process.execPath.includes('/tmp/.mount_');
|
|
101
|
+
}
|
|
94
102
|
/**
|
|
95
103
|
* Detect if running inside a container (Docker or LXC)
|
|
96
104
|
*/
|
|
@@ -395,7 +403,7 @@ export default class Utils {
|
|
|
395
403
|
*
|
|
396
404
|
* @param volid
|
|
397
405
|
*/
|
|
398
|
-
static
|
|
406
|
+
static VolidTrim(volid = 'unknown') {
|
|
399
407
|
// // 28 + 4 .iso = 32 lunghezza max di volid
|
|
400
408
|
if (volid.length >= 32) {
|
|
401
409
|
volid = volid.substring(0, 32);
|
|
@@ -706,13 +714,16 @@ export default class Utils {
|
|
|
706
714
|
}
|
|
707
715
|
return cidr;
|
|
708
716
|
}
|
|
709
|
-
/**
|
|
710
|
-
*
|
|
711
|
-
* broadcast
|
|
712
|
-
*/
|
|
713
717
|
static broadcast() {
|
|
714
|
-
|
|
715
|
-
|
|
718
|
+
const netmask = Utils.netmask();
|
|
719
|
+
const ip = Utils.address();
|
|
720
|
+
const ipParts = ip.split('.').map(Number);
|
|
721
|
+
const maskParts = netmask.split('.').map(Number);
|
|
722
|
+
const broadcastParts = ipParts.map((part, index) => {
|
|
723
|
+
// Bitwise OR tra il blocco IP e il blocco Netmask invertito (255 - mask)
|
|
724
|
+
return part | (255 - maskParts[index]);
|
|
725
|
+
});
|
|
726
|
+
return broadcastParts.join('.');
|
|
716
727
|
}
|
|
717
728
|
/**
|
|
718
729
|
* dns
|
|
@@ -868,9 +879,17 @@ export default class Utils {
|
|
|
868
879
|
* @returns flag
|
|
869
880
|
*/
|
|
870
881
|
static flag() {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
882
|
+
let type = '';
|
|
883
|
+
if (!Utils.isAppImage()) {
|
|
884
|
+
type = 'native';
|
|
885
|
+
}
|
|
886
|
+
let title = `${pjson.name}`;
|
|
887
|
+
let green = ` ${title}`.padEnd(25, " ");
|
|
888
|
+
let white = ` Perri's brewery edition `.padEnd(25, " ");
|
|
889
|
+
let red = ` v${pjson.version} ${type} `.padStart(25, " ");
|
|
890
|
+
return chalk.bgGreen.whiteBright(green) +
|
|
891
|
+
chalk.bgWhite.blue(white) +
|
|
892
|
+
chalk.bgRed.whiteBright(red);
|
|
874
893
|
}
|
|
875
894
|
/**
|
|
876
895
|
*
|
|
@@ -13,7 +13,7 @@ import Pacman from '../classes/pacman.js';
|
|
|
13
13
|
import Settings from '../classes/settings.js';
|
|
14
14
|
import Utils from '../classes/utils.js';
|
|
15
15
|
export default class Calamares extends Command {
|
|
16
|
-
static description = '
|
|
16
|
+
static description = 'a GUI system installer - install and configure calamares';
|
|
17
17
|
static examples = ['sudo eggs calamares', 'sudo eggs calamares --install', 'sudo eggs calamares --install --theme=/path/to/theme', 'sudo eggs calamares --remove'];
|
|
18
18
|
static flags = {
|
|
19
19
|
help: Flags.help({ char: 'h' }),
|
package/dist/commands/config.js
CHANGED
|
@@ -74,8 +74,7 @@ export default class Config extends Command {
|
|
|
74
74
|
i.distroTemplate = !Pacman.distroTemplateCheck();
|
|
75
75
|
i.addEfi = !Pacman.isUefi();
|
|
76
76
|
i.calamares = false;
|
|
77
|
-
if (!
|
|
78
|
-
!Pacman.calamaresExists() &&
|
|
77
|
+
if (!Pacman.calamaresExists() &&
|
|
79
78
|
Pacman.isInstalledGui() &&
|
|
80
79
|
Pacman.isCalamaresAvailable()) {
|
|
81
80
|
i.calamares = true;
|
|
@@ -95,18 +94,8 @@ export default class Config extends Command {
|
|
|
95
94
|
}
|
|
96
95
|
if (Utils.isRoot(this.id)) {
|
|
97
96
|
if (flags.clean) {
|
|
98
|
-
Utils.warning('removing
|
|
99
|
-
await exec('rm /etc/penguins-eggs.d
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Se stiamo utilizzando eggs da sorgenti
|
|
103
|
-
* Aggiungo autocomplete e manPage
|
|
104
|
-
*/
|
|
105
|
-
if (Utils.isSources()) {
|
|
106
|
-
Utils.warning('creating autocomplete...');
|
|
107
|
-
await Pacman.autocompleteInstall(verbose);
|
|
108
|
-
Utils.warning('creating eggs man page...');
|
|
109
|
-
await Pacman.manPageInstall(verbose);
|
|
97
|
+
Utils.warning('removing penguins-eggs configurations');
|
|
98
|
+
await exec('rm -rf /etc/penguins-eggs.d');
|
|
110
99
|
}
|
|
111
100
|
const i = await Config.thatWeNeed(nointeractive, verbose);
|
|
112
101
|
if (i.needUpdate || i.configurationInstall || i.configurationRefresh || i.distroTemplate) {
|
package/dist/commands/cuckoo.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/commands/
|
|
2
|
+
* ./src/commands/export/appimage.ts
|
|
3
3
|
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
4
|
* author: Piero Proietti
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
8
|
import { Command } from '@oclif/core';
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
export default class Analyze extends Command {
|
|
9
|
+
import Tools from '../../classes/tools.js';
|
|
10
|
+
export default class ExportAppimage extends Command {
|
|
12
11
|
static description: string;
|
|
13
12
|
static examples: string[];
|
|
14
13
|
static flags: {
|
|
14
|
+
clean: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
15
|
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
16
16
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
user: string;
|
|
19
|
+
clean: boolean;
|
|
20
|
+
verbose: boolean;
|
|
21
|
+
echo: {};
|
|
22
|
+
Tu: Tools;
|
|
21
23
|
/**
|
|
22
|
-
*
|
|
24
|
+
*
|
|
23
25
|
*/
|
|
24
|
-
fill(): Promise<Users[]>;
|
|
25
26
|
run(): Promise<void>;
|
|
26
27
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/export/appimage.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import { Command, Flags } from '@oclif/core';
|
|
9
|
+
import Tools from '../../classes/tools.js';
|
|
10
|
+
import Utils from '../../classes/utils.js';
|
|
11
|
+
import { exec } from '../../lib/utils.js';
|
|
12
|
+
import os from 'node:os';
|
|
13
|
+
import { execSync } from 'node:child_process';
|
|
14
|
+
export default class ExportAppimage extends Command {
|
|
15
|
+
static description = 'export penguins-eggs AppImage to the destination host';
|
|
16
|
+
static examples = ['eggs export pkg', 'eggs export pkg --clean', 'eggs export pkg --all'];
|
|
17
|
+
static flags = {
|
|
18
|
+
clean: Flags.boolean({ char: 'c', description: 'remove old .AppImage before to copy' }),
|
|
19
|
+
help: Flags.help({ char: 'h' }),
|
|
20
|
+
verbose: Flags.boolean({ char: 'v', description: 'verbose' })
|
|
21
|
+
};
|
|
22
|
+
user = '';
|
|
23
|
+
clean = false;
|
|
24
|
+
verbose = false;
|
|
25
|
+
echo = {};
|
|
26
|
+
Tu = new Tools();
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
async run() {
|
|
31
|
+
const { args, flags } = await this.parse(ExportAppimage);
|
|
32
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
33
|
+
Utils.warning(ExportAppimage.description);
|
|
34
|
+
// Ora servono in più parti
|
|
35
|
+
this.user = os.userInfo().username;
|
|
36
|
+
if (this.user === 'root') {
|
|
37
|
+
this.user = execSync('echo $SUDO_USER', { encoding: 'utf-8' }).trim();
|
|
38
|
+
if (this.user === '') {
|
|
39
|
+
this.user = execSync('echo $DOAS_USER', { encoding: 'utf-8' }).trim();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
this.clean = flags.clean;
|
|
43
|
+
this.verbose = flags.verbose;
|
|
44
|
+
this.echo = Utils.setEcho(this.verbose);
|
|
45
|
+
await this.Tu.loadSettings();
|
|
46
|
+
const remoteMountpoint = `/tmp/eggs-${(Math.random() + 1).toString(36).slice(7)}`;
|
|
47
|
+
let localPath = "$HOME/penguins-eggs";
|
|
48
|
+
let remotePath = "/eggs/";
|
|
49
|
+
let filter = `penguins-eggs-[0-9][0-9].[0-9]*.[0-9]*-*.AppImage`;
|
|
50
|
+
let cmd = `#!/bin/bash\n`;
|
|
51
|
+
cmd += `set -e\n`;
|
|
52
|
+
cmd += 'shopt -s extglob\n';
|
|
53
|
+
cmd += `mkdir ${remoteMountpoint}\n`;
|
|
54
|
+
cmd += `sshfs ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath} ${remoteMountpoint}\n`;
|
|
55
|
+
if (this.clean) {
|
|
56
|
+
cmd += `# Delete old AppImage\n`;
|
|
57
|
+
cmd += `rm -f ${remoteMountpoint}/${filter}\n`;
|
|
58
|
+
}
|
|
59
|
+
cmd += `# Export packages\n`;
|
|
60
|
+
cmd += `cp ${localPath}/${filter} ${remoteMountpoint}\n`;
|
|
61
|
+
cmd += 'sync\n';
|
|
62
|
+
cmd += `\n`;
|
|
63
|
+
cmd += `# wait before to umount\n`;
|
|
64
|
+
cmd += 'sleep 2s\n';
|
|
65
|
+
cmd += `fusermount3 -u ${remoteMountpoint}\n`;
|
|
66
|
+
cmd += `# remove mountpoint\n`;
|
|
67
|
+
cmd += `rm -rf ${remoteMountpoint}\n`;
|
|
68
|
+
if (!this.verbose) {
|
|
69
|
+
if (this.clean) {
|
|
70
|
+
console.log(`remove: ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${filter}`);
|
|
71
|
+
}
|
|
72
|
+
console.log(`copy: ${localPath}/${filter} to ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath}`);
|
|
73
|
+
}
|
|
74
|
+
await exec(cmd, this.echo);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -10,7 +10,7 @@ import Tools from '../../classes/tools.js';
|
|
|
10
10
|
import Utils from '../../classes/utils.js';
|
|
11
11
|
import { exec } from '../../lib/utils.js';
|
|
12
12
|
export default class ExportIso extends Command {
|
|
13
|
-
static description = 'export
|
|
13
|
+
static description = 'export remastered ISO in the destination host';
|
|
14
14
|
static examples = ['eggs export iso', 'eggs export iso --clean'];
|
|
15
15
|
static flags = {
|
|
16
16
|
checksum: Flags.boolean({ char: 'C', description: 'export checksums md5 and sha256' }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/commands/export/
|
|
2
|
+
* ./src/commands/export/appimage.ts
|
|
3
3
|
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
4
|
* author: Piero Proietti
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
@@ -14,7 +14,7 @@ import { exec } from '../../lib/utils.js';
|
|
|
14
14
|
import os from 'node:os';
|
|
15
15
|
import { execSync } from 'node:child_process';
|
|
16
16
|
export default class ExportPkg extends Command {
|
|
17
|
-
static description = 'export
|
|
17
|
+
static description = 'export penguins-eggs package to the destination host';
|
|
18
18
|
static examples = ['eggs export pkg', 'eggs export pkg --clean', 'eggs export pkg --all'];
|
|
19
19
|
static flags = {
|
|
20
20
|
all: Flags.boolean({ char: 'a', description: 'export all archs' }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/commands/
|
|
3
|
-
* penguins-eggs v.25.
|
|
2
|
+
* ./src/commands/krill.ts
|
|
3
|
+
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
4
|
* author: Piero Proietti
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
@@ -9,8 +9,7 @@ import { Command } from '@oclif/core';
|
|
|
9
9
|
/**
|
|
10
10
|
* Class Krill
|
|
11
11
|
*/
|
|
12
|
-
export default class
|
|
13
|
-
static aliases: string[];
|
|
12
|
+
export default class KrillCommand extends Command {
|
|
14
13
|
static description: string;
|
|
15
14
|
static examples: string[];
|
|
16
15
|
static flags: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./src/commands/
|
|
3
|
-
* penguins-eggs v.25.
|
|
2
|
+
* ./src/commands/krill.ts
|
|
3
|
+
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
4
|
* author: Piero Proietti
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
@@ -19,9 +19,8 @@ const agent = new https.Agent({
|
|
|
19
19
|
/**
|
|
20
20
|
* Class Krill
|
|
21
21
|
*/
|
|
22
|
-
export default class
|
|
23
|
-
static
|
|
24
|
-
static description = 'krill: the CLI system installer - the egg became a penguin!';
|
|
22
|
+
export default class KrillCommand extends Command {
|
|
23
|
+
static description = 'a TUI system installer - install the system';
|
|
25
24
|
static examples = ['sudo eggs install', 'sudo eggs install --unattended --halt', 'sudo eggs install --chroot'];
|
|
26
25
|
static flags = {
|
|
27
26
|
btrfs: Flags.boolean({ char: 'b', description: 'Format btrfs' }),
|
|
@@ -47,7 +46,7 @@ export default class Install extends Command {
|
|
|
47
46
|
*/
|
|
48
47
|
async run() {
|
|
49
48
|
Utils.titles(this.id + ' ' + this.argv);
|
|
50
|
-
const { flags } = await this.parse(
|
|
49
|
+
const { flags } = await this.parse(KrillCommand);
|
|
51
50
|
const { unattended } = flags;
|
|
52
51
|
// krillConfig
|
|
53
52
|
let krillConfig = {};
|
package/dist/commands/produce.js
CHANGED
|
@@ -17,7 +17,7 @@ import Distro from '../classes/distro.js';
|
|
|
17
17
|
// _dirname
|
|
18
18
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
19
19
|
export default class Produce extends Command {
|
|
20
|
-
static description = 'produce a live image from your system
|
|
20
|
+
static description = 'produce a live image from your system';
|
|
21
21
|
static examples = [
|
|
22
22
|
'sudo eggs produce # zstd fast compression',
|
|
23
23
|
'sudo eggs produce --pendrive # zstd compression optimized pendrive',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/setup.ts
|
|
3
|
+
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from '@oclif/core';
|
|
9
|
+
export default class Install extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/setup.ts
|
|
3
|
+
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import Distro from '../../classes/distro.js';
|
|
9
|
+
import Utils from '../../classes/utils.js';
|
|
10
|
+
import Pacman from '../../classes/pacman.js';
|
|
11
|
+
import { Command } from '@oclif/core';
|
|
12
|
+
import { DependencyManager } from '../../appimage/dependency-manager.js';
|
|
13
|
+
import { execSync } from 'node:child_process';
|
|
14
|
+
export default class Install extends Command {
|
|
15
|
+
static description = 'Automatically check and install system prerequisites';
|
|
16
|
+
static examples = [
|
|
17
|
+
'eggs setup # this help',
|
|
18
|
+
'sudo eggs setup install # install native dependencies, autocomplete, man, etc',
|
|
19
|
+
'sudo eggs setup purge # purge all configurations, autocomplete, man, etc installed from penguins-eggs AppImage',
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
async run() {
|
|
26
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
27
|
+
/**
|
|
28
|
+
* continue only on AppImage
|
|
29
|
+
*/
|
|
30
|
+
if (!Utils.isAppImage()) {
|
|
31
|
+
console.log("The eggs setup command is only applicable on the AppImage version.");
|
|
32
|
+
console.log("On penguins-eggs native package this operation is done by the system package manager.");
|
|
33
|
+
process.exit();
|
|
34
|
+
}
|
|
35
|
+
const appImagePath = process.env.APPIMAGE;
|
|
36
|
+
console.log(`Running AppImage:\n${appImagePath}\n`);
|
|
37
|
+
const distro = new Distro();
|
|
38
|
+
const osInfo = Utils.getOsRelease();
|
|
39
|
+
const codenameId = osInfo.VERSION_CODENAME;
|
|
40
|
+
const releaseId = osInfo.VERSION_ID;
|
|
41
|
+
const distroId = osInfo.ID;
|
|
42
|
+
const { flags } = await this.parse(Install);
|
|
43
|
+
const depsManager = new DependencyManager();
|
|
44
|
+
console.log(`Your system is: ${distroId} ${releaseId} ${codenameId}, family ${distro.familyId}\n`);
|
|
45
|
+
console.log(`Compatible with: ${distro.distroLike} ${distro.distroUniqueId}\n`);
|
|
46
|
+
if (depsManager.isInstalled()) {
|
|
47
|
+
console.log('penguins-eggs distro meta-packages are already installed');
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
console.log('penguins-eggs distro meta-packages are NOT installed');
|
|
51
|
+
}
|
|
52
|
+
if (Utils.isRoot()) {
|
|
53
|
+
console.log();
|
|
54
|
+
Utils.warning(`Are you sure you want to install penguins-eggs AppImage autocomplete, manpages, configurations and distro meta-packages:\n`);
|
|
55
|
+
if (await Utils.customConfirm('Select yes to continue...')) {
|
|
56
|
+
const appImagePath = process.env.APPIMAGE;
|
|
57
|
+
if (appImagePath !== '/usr/bin/eggs') {
|
|
58
|
+
execSync(`mv ${appImagePath} /usr/bin/eggs`);
|
|
59
|
+
console.log(`${appImagePath} moved to /usr/bin/eggs`);
|
|
60
|
+
}
|
|
61
|
+
await Pacman.autocompleteInstall();
|
|
62
|
+
await Pacman.manpageInstall();
|
|
63
|
+
await Pacman.configurationInstall();
|
|
64
|
+
depsManager.installDistroPackages();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
Utils.useRoot(this.id);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/setup.ts
|
|
3
|
+
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from '@oclif/core';
|
|
9
|
+
export default class Purge extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/commands/setup.ts
|
|
3
|
+
* penguins-eggs v.25.11.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import Distro from '../../classes/distro.js';
|
|
9
|
+
import Utils from '../../classes/utils.js';
|
|
10
|
+
import Pacman from '../../classes/pacman.js';
|
|
11
|
+
import { Command } from '@oclif/core';
|
|
12
|
+
import { DependencyManager } from '../../appimage/dependency-manager.js';
|
|
13
|
+
import { execSync } from 'node:child_process';
|
|
14
|
+
export default class Purge extends Command {
|
|
15
|
+
static description = 'Automatically check and install system prerequisites';
|
|
16
|
+
static examples = [
|
|
17
|
+
'eggs setup # this help',
|
|
18
|
+
'sudo eggs setup install # install native dependencies, autocomplete, man, etc',
|
|
19
|
+
'sudo eggs setup purge # purge all configurations, autocomplete, man, etc installed from penguins-eggs AppImage',
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
async run() {
|
|
26
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
27
|
+
/**
|
|
28
|
+
* continue only on AppImage
|
|
29
|
+
*/
|
|
30
|
+
if (!Utils.isAppImage()) {
|
|
31
|
+
console.log("The eggs setup purge command is only applicable on the AppImage version.");
|
|
32
|
+
console.log("On penguins-eggs native package this operation is done by the system package manager.");
|
|
33
|
+
process.exit();
|
|
34
|
+
}
|
|
35
|
+
const appImagePath = process.env.APPIMAGE;
|
|
36
|
+
console.log(`Running AppImage:\n${appImagePath}\n`);
|
|
37
|
+
const distro = new Distro();
|
|
38
|
+
const osInfo = Utils.getOsRelease();
|
|
39
|
+
const codenameId = osInfo.VERSION_CODENAME;
|
|
40
|
+
const releaseId = osInfo.VERSION_ID;
|
|
41
|
+
const distroId = osInfo.ID;
|
|
42
|
+
const { flags } = await this.parse(Purge);
|
|
43
|
+
const depsManager = new DependencyManager();
|
|
44
|
+
console.log(`Your system is: ${distroId} ${releaseId} ${codenameId}, family ${distro.familyId}\n`);
|
|
45
|
+
console.log(`Compatible with: ${distro.distroLike} ${distro.distroUniqueId}\n`);
|
|
46
|
+
if (Utils.isRoot()) {
|
|
47
|
+
console.log();
|
|
48
|
+
Utils.warning(`Are you sure you want to purge penguins-eggs AppImage autocomplete, manpages, configurations and distro meta-aackages:\n ${appImagePath}`);
|
|
49
|
+
if (await Utils.customConfirm('Select yes to continue...')) {
|
|
50
|
+
depsManager.removeDistroPackages();
|
|
51
|
+
await Pacman.autocompleteRemove();
|
|
52
|
+
await Pacman.manpageRemove();
|
|
53
|
+
await Pacman.configurationRemove();
|
|
54
|
+
execSync('rm -f /usr/share/applications/penguins-eggs.desktop');
|
|
55
|
+
execSync('rm -f /usr/bin/penguins-links-add.sh');
|
|
56
|
+
execSync('rm -f /usr/local/bin/g4*');
|
|
57
|
+
console.log('penguins-eggs AppImage stuffs was successfully removed.\n');
|
|
58
|
+
if (appImagePath === '/usr/bin/eggs') {
|
|
59
|
+
execSync(`rm -f ${appImagePath} /usr/bin/eggs`);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
console.log('You can completely erase AppImage file, using:');
|
|
63
|
+
console.log(`sudo rm ${appImagePath}\n`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
Utils.useRoot(this.id);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -5,11 +5,6 @@
|
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
|
-
/**
|
|
9
|
-
* Debian 13 trixe, Ubuntu 24.04 noble usano il formato deb822
|
|
10
|
-
* * esiste un comando per modernizzare le sorgenti:
|
|
11
|
-
* sudo apt modernize-sources
|
|
12
|
-
*/
|
|
13
8
|
import { Command } from '@oclif/core';
|
|
14
9
|
/**
|
|
15
10
|
*
|