penguins-eggs 25.11.8 → 25.11.21
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 +149 -140
- package/README.md +90 -132
- package/README.pdf +1343 -2331
- 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/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/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
- package/conf/distros/archlinux/calamares/modules/bootloader.yml +1 -1
- package/conf/distros/archlinux/calamares/modules/partition.yml +385 -8
- 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/first-run-check.d.ts +8 -0
- package/dist/appimage/first-run-check.js +13 -0
- package/dist/appimage/prerequisites.d.ts +34 -0
- package/dist/appimage/prerequisites.js +350 -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 +5 -0
- package/dist/classes/cli-autologin.js +4 -4
- package/dist/classes/distro.js +11 -27
- package/dist/classes/diversions.d.ts +5 -0
- package/dist/classes/diversions.js +23 -7
- package/dist/classes/incubation/customize/customize-partitions.js +8 -1
- package/dist/classes/incubation/fisherman-helper/packages.js +1 -1
- package/dist/classes/incubation/incubator.js +2 -2
- package/dist/classes/pacman.d/archlinux.js +5 -5
- package/dist/classes/pacman.d/debian.js +0 -2
- package/dist/classes/pacman.d/opensuse.js +2 -2
- package/dist/classes/pacman.js +10 -11
- package/dist/classes/utils.d.ts +4 -0
- package/dist/classes/utils.js +19 -3
- package/dist/commands/calamares.js +1 -1
- package/dist/commands/config.js +2 -2
- 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.d.ts +21 -0
- package/dist/commands/setup.js +90 -0
- package/dist/commands/tools/repo.d.ts +0 -5
- package/dist/commands/tools/repo.js +205 -127
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.js +68 -59
- 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 +24 -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 +582 -9
- package/package.json +125 -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 +28 -47
- package/scripts/adapt.sh +0 -0
- package/scripts/appimage-build.sh +152 -0
- package/scripts/appimage-install.sh +43 -0
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/eggs.bash +3 -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/classes/distro-hossein.d.ts +0 -52
- package/dist/classes/distro-hossein.js +0 -239
- package/dist/classes/incubation/incubator.d/bionic.d.ts +0 -32
- package/dist/classes/incubation/incubator.d/bionic.js +0 -83
- 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
|
@@ -23,12 +23,12 @@ import { customizePartitions } from './customize/customize-partitions.js';
|
|
|
23
23
|
import { Alpine } from './incubator.d/alpine.js';
|
|
24
24
|
import { Archlinux } from './incubator.d/archlinux.js';
|
|
25
25
|
import { Buster } from './incubator.d/buster.js';
|
|
26
|
-
import { Trixie } from './incubator.d/trixie.js';
|
|
27
26
|
import { Fedora } from './incubator.d/fedora.js';
|
|
27
|
+
import { Manjaro } from './incubator.d/manjaro.js';
|
|
28
28
|
import { Noble } from './incubator.d/noble.js';
|
|
29
29
|
import { Openmamba } from './incubator.d/openmamba.js';
|
|
30
30
|
import { Opensuse } from './incubator.d/opensuse.js';
|
|
31
|
-
import {
|
|
31
|
+
import { Trixie } from './incubator.d/trixie.js';
|
|
32
32
|
// _dirname
|
|
33
33
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
34
34
|
/**
|
|
@@ -14,19 +14,19 @@ import Utils from '../utils.js';
|
|
|
14
14
|
* @remarks all the utilities
|
|
15
15
|
*/
|
|
16
16
|
export default class Archlinux {
|
|
17
|
-
static packs4calamares = ['calamares
|
|
17
|
+
static packs4calamares = ['calamares']; // , 'calamares']
|
|
18
18
|
/**
|
|
19
19
|
* Archlinux: calamaresInstall
|
|
20
20
|
*/
|
|
21
21
|
static async calamaresInstall(verbose = false) {
|
|
22
22
|
verbose = true; // serve per pacman
|
|
23
23
|
const echo = Utils.setEcho(verbose);
|
|
24
|
-
let cmd = `pacman -S calamares
|
|
24
|
+
let cmd = `pacman -S calamares --noconfirm`;
|
|
25
25
|
try {
|
|
26
26
|
await exec(cmd, echo);
|
|
27
27
|
}
|
|
28
28
|
catch {
|
|
29
|
-
Utils.error(`Cannot install calamares
|
|
29
|
+
Utils.error(`Cannot install calamares`);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -44,11 +44,11 @@ export default class Archlinux {
|
|
|
44
44
|
let success = false;
|
|
45
45
|
const echo = Utils.setEcho(verbose);
|
|
46
46
|
try {
|
|
47
|
-
await exec('pacman -R calamares calamares
|
|
47
|
+
await exec('pacman -R calamares calamares --noconfirm', echo);
|
|
48
48
|
success = true;
|
|
49
49
|
}
|
|
50
50
|
catch {
|
|
51
|
-
Utils.error(`Cannot remove calamares
|
|
51
|
+
Utils.error(`Cannot remove calamares`);
|
|
52
52
|
}
|
|
53
53
|
if (success && fs.existsSync('/etc/calamares')) {
|
|
54
54
|
await exec('rm /etc/calamares -rf', echo);
|
|
@@ -34,8 +34,6 @@ export default class Debian {
|
|
|
34
34
|
Utils.error(`Debian.calamaresInstall() apt-get install --yes ${array2spaced(this.debs4calamares)}`); // + e.error)
|
|
35
35
|
}
|
|
36
36
|
// remove others calamares links
|
|
37
|
-
await exec('rm -f /usr/share/applications/calamares-eggs-debugging.desktop');
|
|
38
|
-
await exec('rm -f /usr/share/applications/calamares-eggs.desktop');
|
|
39
37
|
await exec('rm -f /usr/share/applications/calamares.desktop');
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
@@ -42,11 +42,11 @@ export default class Opensuse {
|
|
|
42
42
|
let success = false;
|
|
43
43
|
const echo = Utils.setEcho(verbose);
|
|
44
44
|
try {
|
|
45
|
-
await exec('zypper remove -y calamares calamares
|
|
45
|
+
await exec('zypper remove -y calamares calamares', echo);
|
|
46
46
|
success = true;
|
|
47
47
|
}
|
|
48
48
|
catch {
|
|
49
|
-
Utils.error(`Cannot remove calamares
|
|
49
|
+
Utils.error(`Cannot remove calamares`);
|
|
50
50
|
}
|
|
51
51
|
if (success && fs.existsSync('/etc/calamares')) {
|
|
52
52
|
await exec('rm /etc/calamares -rf', echo);
|
package/dist/classes/pacman.js
CHANGED
|
@@ -417,21 +417,21 @@ export default class Pacman {
|
|
|
417
417
|
* Ubuntu
|
|
418
418
|
**********************************************************************************/
|
|
419
419
|
/**
|
|
420
|
-
* Ubuntu focal: eredita da
|
|
420
|
+
* Ubuntu focal: eredita da focal
|
|
421
421
|
*/
|
|
422
422
|
}
|
|
423
423
|
else if (distroUniqueId === 'focal') {
|
|
424
424
|
const dest = '/etc/penguins-eggs.d/distros/focal';
|
|
425
|
-
const
|
|
426
|
-
await exec(`cp -r ${
|
|
425
|
+
const focal = `${rootPen}/conf/distros/focal`;
|
|
426
|
+
await exec(`cp -r ${focal}/* ${dest}`, echo);
|
|
427
427
|
/**
|
|
428
|
-
* Ubuntu 22.04 jammy: eredita da
|
|
428
|
+
* Ubuntu 22.04 jammy: eredita da focal
|
|
429
429
|
*/
|
|
430
430
|
}
|
|
431
431
|
else if (distroUniqueId === 'jammy') {
|
|
432
432
|
const dest = '/etc/penguins-eggs.d/distros/jammy';
|
|
433
|
-
const
|
|
434
|
-
await exec(`cp -r ${
|
|
433
|
+
const focal = `${rootPen}/conf/distros/focal`;
|
|
434
|
+
await exec(`cp -r ${focal}/* ${dest}`, echo);
|
|
435
435
|
/**
|
|
436
436
|
* Ubuntu noble: e la nuova baseline per ubuntu
|
|
437
437
|
*
|
|
@@ -592,13 +592,12 @@ export default class Pacman {
|
|
|
592
592
|
* Installa manPage
|
|
593
593
|
*/
|
|
594
594
|
static async manPageInstall(verbose = false) {
|
|
595
|
-
const manPageSrc = path.resolve(__dirname, '../../manpages/doc/man/eggs.
|
|
595
|
+
const manPageSrc = path.resolve(__dirname, '../../manpages/doc/man/eggs.1.gz');
|
|
596
596
|
if (fs.existsSync(manPageSrc)) {
|
|
597
|
-
const
|
|
598
|
-
if (!fs.existsSync(
|
|
599
|
-
exec(`mkdir ${
|
|
597
|
+
const manPageDest = `/usr/share/man/man1`;
|
|
598
|
+
if (!fs.existsSync(manPageDest)) {
|
|
599
|
+
exec(`mkdir ${manPageDest} -p`);
|
|
600
600
|
}
|
|
601
|
-
const manPageDest = man1Dir + 'eggs.1.gz';
|
|
602
601
|
exec(`cp ${manPageSrc} ${manPageDest}`);
|
|
603
602
|
if (shx.exec('which mandb', { silent: true }).stdout.trim() !== '') {
|
|
604
603
|
await exec('mandb > /dev/null');
|
package/dist/classes/utils.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ export default class Utils {
|
|
|
41
41
|
* @param codenameId
|
|
42
42
|
*/
|
|
43
43
|
static snapshotPrefix(distroId: string, codenameId: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* isAppImage
|
|
46
|
+
*/
|
|
47
|
+
static isAppImage(): boolean;
|
|
44
48
|
/**
|
|
45
49
|
* Detect if running inside a container (Docker or LXC)
|
|
46
50
|
*/
|
package/dist/classes/utils.js
CHANGED
|
@@ -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
|
*/
|
|
@@ -868,9 +876,17 @@ export default class Utils {
|
|
|
868
876
|
* @returns flag
|
|
869
877
|
*/
|
|
870
878
|
static flag() {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
879
|
+
let type = '';
|
|
880
|
+
if (Utils.isAppImage()) {
|
|
881
|
+
type = 'AppImage:';
|
|
882
|
+
}
|
|
883
|
+
let title = `${pjson.name}`;
|
|
884
|
+
let green = ` ${type} ${title}`.padEnd(25, " ");
|
|
885
|
+
let white = ` Perri's brewery edition `.padEnd(25, " ");
|
|
886
|
+
let red = ` v${pjson.version} `.padStart(25, " ");
|
|
887
|
+
return chalk.bgGreen.whiteBright(green) +
|
|
888
|
+
chalk.bgWhite.blue(white) +
|
|
889
|
+
chalk.bgRed.whiteBright(red);
|
|
874
890
|
}
|
|
875
891
|
/**
|
|
876
892
|
*
|
|
@@ -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
|
@@ -99,10 +99,10 @@ export default class Config extends Command {
|
|
|
99
99
|
await exec('rm /etc/penguins-eggs.d -rf');
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
* Se stiamo utilizzando eggs da
|
|
102
|
+
* Se stiamo utilizzando eggs da source/appimage
|
|
103
103
|
* Aggiungo autocomplete e manPage
|
|
104
104
|
*/
|
|
105
|
-
if (Utils.isSources()) {
|
|
105
|
+
if (Utils.isSources() || Utils.isAppImage()) {
|
|
106
106
|
Utils.warning('creating autocomplete...');
|
|
107
107
|
await Pacman.autocompleteInstall(verbose);
|
|
108
108
|
Utils.warning('creating eggs man page...');
|
|
@@ -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,21 @@
|
|
|
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 Setup extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static flags: {
|
|
12
|
+
check: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
};
|
|
15
|
+
static examples: string[];
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { Prerequisites } from '../appimage/prerequisites.js';
|
|
12
|
+
import { Command, Flags } from '@oclif/core';
|
|
13
|
+
export default class Setup extends Command {
|
|
14
|
+
static description = 'Automatically check and install system prerequisites';
|
|
15
|
+
static flags = {
|
|
16
|
+
check: Flags.boolean({ char: 'c', description: 'check status only, do not install' }),
|
|
17
|
+
force: Flags.boolean({ char: 'f', description: 'force installation even if already installed' }),
|
|
18
|
+
};
|
|
19
|
+
static examples = [
|
|
20
|
+
'sudo eggs setup # install prerequisites',
|
|
21
|
+
'sudo eggs setup --check # check prerequisites presence',
|
|
22
|
+
'sudo eggs setup --force # force prerequisites install',
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
async run() {
|
|
29
|
+
Utils.titles(this.id + ' ' + this.argv);
|
|
30
|
+
/**
|
|
31
|
+
* continue only on AppImage
|
|
32
|
+
*/
|
|
33
|
+
if (!Utils.isAppImage()) {
|
|
34
|
+
console.log("The eggs setup command is only applicable on the AppImage version.");
|
|
35
|
+
process.exit();
|
|
36
|
+
}
|
|
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
|
+
console.log(`AppImage running on: ${distroId}/${codenameId} compatible: ${distro.distroLike}/${distro.distroUniqueId} family: ${distro.familyId}`);
|
|
43
|
+
const { flags } = await this.parse(Setup);
|
|
44
|
+
const prerequisites = new Prerequisites();
|
|
45
|
+
if (Utils.isRoot()) {
|
|
46
|
+
// Install autocomplete e manPages
|
|
47
|
+
await Pacman.autocompleteInstall();
|
|
48
|
+
await Pacman.manPageInstall();
|
|
49
|
+
if (flags.check) {
|
|
50
|
+
this.log('Checking system prerequisites...');
|
|
51
|
+
const allInstalled = prerequisites.check();
|
|
52
|
+
if (allInstalled) {
|
|
53
|
+
this.log('SUCCESS: All prerequisites are installed');
|
|
54
|
+
this.log('Your system is ready for penguins-eggs!');
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.log('WARNING: Some prerequisites are missing');
|
|
58
|
+
this.log('Run: eggs setup (without --check) to install them automatically');
|
|
59
|
+
}
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// Setup automatico: check + install
|
|
63
|
+
this.log('Checking current system status...');
|
|
64
|
+
const allInstalled = prerequisites.check();
|
|
65
|
+
// Se tutto è installato esce, e non --force
|
|
66
|
+
if (allInstalled && !flags.force) {
|
|
67
|
+
this.log('SUCCESS: All prerequisites are already installed');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// reinstalla
|
|
71
|
+
if (allInstalled && flags.force) {
|
|
72
|
+
this.log('Reinstalling prerequisites.');
|
|
73
|
+
}
|
|
74
|
+
const success = await prerequisites.install(flags.force);
|
|
75
|
+
if (success) {
|
|
76
|
+
this.log('');
|
|
77
|
+
this.log('SUCCESS: penguins-eggs setup completed!');
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.log('');
|
|
81
|
+
this.log('ERROR: Setup failed');
|
|
82
|
+
this.log('Please check your system and try again.');
|
|
83
|
+
this.log('You can also install prerequisites manually using your package manager.');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
Utils.useRoot(this.id);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -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
|
*
|