penguins-eggs 10.0.30 → 10.0.32

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.
Files changed (43) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +29 -29
  3. package/addons/eggs/theme/livecd/isolinux.main.alpine.cfg +4 -8
  4. package/dist/classes/ovary.js +9 -4
  5. package/dist/commands/install.js +0 -4
  6. package/dist/components/finished.d.ts +2 -1
  7. package/dist/components/finished.js +4 -4
  8. package/dist/components/install.js +2 -2
  9. package/dist/components/keyboard.js +2 -2
  10. package/dist/components/location.js +2 -2
  11. package/dist/components/network.js +2 -2
  12. package/dist/components/partitions.js +8 -8
  13. package/dist/components/summary.js +3 -4
  14. package/dist/components/users.js +2 -2
  15. package/dist/components/welcome.js +2 -2
  16. package/dist/index-old.d.ts +8 -0
  17. package/dist/index-old.js +8 -0
  18. package/dist/index.d.ts +52 -6
  19. package/dist/index.js +145 -6
  20. package/dist/krill/modules/bootloader-config.d.ts +4 -0
  21. package/dist/krill/modules/bootloader-config.js +86 -4
  22. package/dist/krill/modules/locale.js +74 -31
  23. package/dist/krill/modules/m-keyboard.js +48 -56
  24. package/dist/krill/modules/machine-id.js +3 -3
  25. package/dist/krill/modules/mount-fs.js +4 -2
  26. package/dist/krill/prepare.d.ts +1 -1
  27. package/dist/krill/prepare.js +8 -10
  28. package/dist/krill/sequence.d.ts +0 -8
  29. package/dist/krill/sequence.js +21 -29
  30. package/dist/lib/select_filesystem_type.js +4 -3
  31. package/manpages/doc/man/eggs.1.gz +0 -0
  32. package/manpages/doc/man/eggs.html +4 -4
  33. package/package.json +17 -14
  34. package/dist/krill/modules/bootloader-config-alpine.d.ts +0 -14
  35. package/dist/krill/modules/bootloader-config-alpine.js +0 -37
  36. package/dist/krill/modules/bootloader-config-arch.d.ts +0 -14
  37. package/dist/krill/modules/bootloader-config-arch.js +0 -37
  38. package/dist/krill/modules/bootloader-config-debian.d.ts +0 -10
  39. package/dist/krill/modules/bootloader-config-debian.js +0 -50
  40. package/dist/krill/modules/m-timezone.d.ts +0 -14
  41. package/dist/krill/modules/m-timezone.js +0 -22
  42. package/mkinitfs/machine-id-gen.sh +0 -3
  43. package/mkinitfs/sidecar.sh +0 -40
@@ -13,12 +13,12 @@ import Install from '../components/install.js';
13
13
  import Finished from '../components/finished.js';
14
14
  import fs from 'fs';
15
15
  import yaml from 'js-yaml';
16
- import Utils from '../classes/utils.js';
16
+ import { installer } from '../classes/incubation/installer.js';
17
17
  import CliAutologin from '../classes/cli-autologin.js';
18
+ import Distro from '../classes/distro.js';
18
19
  import Pacman from '../classes/pacman.js';
19
- import { installer } from '../classes/incubation/installer.js';
20
+ import Utils from '../classes/utils.js';
20
21
  import Xdg from '../classes/xdg.js';
21
- import Distro from '../classes/distro.js';
22
22
  import { exec } from '../lib/utils.js';
23
23
  // import krill modules
24
24
  import partition from './modules/partition.js';
@@ -39,9 +39,6 @@ import networkCfg from './modules/network-cfg.js';
39
39
  // services-systemd:
40
40
  // bootloader-config
41
41
  import bootloaderConfig from './modules/bootloader-config.js';
42
- import bootloaderConfigAlpine from './modules/bootloader-config-alpine.js';
43
- import bootloaderConfigArch from './modules/bootloader-config-arch.js';
44
- import bootloaderConfigDebian from './modules/bootloader-config-debian.js';
45
42
  import grubcfg from './modules/grubcfg.js';
46
43
  import bootloader from './modules/bootloader.js';
47
44
  import packages from './modules/packages.js';
@@ -51,13 +48,13 @@ import initramfs from './modules/initramfs.js';
51
48
  import delLiveUser from './modules/del-live-user.js';
52
49
  // umount already imported
53
50
  // to order in same wat
54
- import mTimezone from './modules/m-timezone.js';
55
51
  import umount from './modules/umount.js';
56
52
  import mkfs from './modules/mkfs.js';
57
53
  import hostname from './modules/hostname.js';
58
54
  import CFS from '../classes/cfs.js';
59
55
  import Title from '../components/title.js';
60
56
  import cliCursor from 'cli-cursor';
57
+ import { spawnSync } from 'child_process';
61
58
  /**
62
59
  * hatching: installazione o cova!!!
63
60
  */
@@ -82,9 +79,6 @@ export default class Sequence {
82
79
  // services-systemd:
83
80
  // bootloader-config
84
81
  bootloaderConfig = bootloaderConfig;
85
- bootloaderConfigAlpine = bootloaderConfigAlpine;
86
- bootloaderConfigArch = bootloaderConfigArch;
87
- bootloaderConfigDebian = bootloaderConfigDebian;
88
82
  //
89
83
  grubcfg = grubcfg;
90
84
  bootloader = bootloader;
@@ -98,7 +92,6 @@ export default class Sequence {
98
92
  umountFs = umountFs;
99
93
  umountVfs = umountVfs;
100
94
  // to order in same way
101
- timezone = mTimezone;
102
95
  umount = umount;
103
96
  mkfs = mkfs;
104
97
  hostname = hostname;
@@ -154,7 +147,6 @@ export default class Sequence {
154
147
  this.devices.root = {};
155
148
  this.devices.data = {};
156
149
  this.devices.swap = {};
157
- //this.distro = new Distro(this.remix)
158
150
  this.distro = new Distro();
159
151
  this.efi = fs.existsSync('/sys/firmware/efi/efivars');
160
152
  this.luksFile = `${this.distro.liveMediumPath}live/${this.luksName}`;
@@ -356,17 +348,15 @@ export default class Sequence {
356
348
  * - autologin
357
349
  */
358
350
  if (!this.is_clone) {
359
- if (this.distro.familyId !== 'alpine') {
360
- // locale
361
- message = "Locale";
362
- percent = 0.70;
363
- try {
364
- redraw(React.createElement(Install, { message: message, percent: percent }));
365
- await this.locale();
366
- }
367
- catch (error) {
368
- await Utils.pressKeyToExit(JSON.stringify(error));
369
- }
351
+ // locale
352
+ message = "Locale";
353
+ percent = 0.70;
354
+ try {
355
+ redraw(React.createElement(Install, { message: message, percent: percent }));
356
+ await this.locale();
357
+ }
358
+ catch (error) {
359
+ await Utils.pressKeyToExit(JSON.stringify(error));
370
360
  }
371
361
  // keyboard
372
362
  message = "settings keyboard";
@@ -628,23 +618,25 @@ export default class Sequence {
628
618
  * only show the result
629
619
  */
630
620
  async finished() {
631
- await redraw(React.createElement(Finished, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.username }));
632
621
  let cmd = "reboot";
633
622
  if (this.halt) {
634
623
  cmd = "poweroff";
635
624
  }
625
+ let message = `Press a key to ${cmd}`;
626
+ if (this.unattended && this.nointeractive) {
627
+ message = `System will ${cmd} in 5 seconds...`;
628
+ }
629
+ await redraw(React.createElement(Finished, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.username }));
636
630
  if (this.unattended && this.nointeractive) {
637
- console.log(`System will ${cmd} in 5 seconds...`);
638
631
  await sleep(5000);
639
- await exec(cmd, { echo: true });
632
+ await exec(cmd, { echo: false });
640
633
  }
641
634
  else {
642
- Utils.pressKeyToExit(`Press a key to ${cmd}`);
643
- await exec(cmd, { echo: true });
635
+ spawnSync('read _ ', { shell: true, stdio: [0, 1, 2] });
636
+ await exec(cmd, { echo: false });
644
637
  }
645
638
  }
646
639
  }
647
- // const ifaces: string[] = fs.readdirSync('/sys/class/net/')
648
640
  /**
649
641
  *
650
642
  * @param elem
@@ -17,13 +17,14 @@ export default async function selectFileSystemType() {
17
17
  else {
18
18
  partitions.defaultFileSystemType = 'ext4';
19
19
  }
20
- partitions.defaultFileSystemType = 'ext4';
20
+ const choices = ['ext4'];
21
21
  if (Pacman.packageIsInstalled('btrfs-progs')) {
22
- partitions.defaultFileSystemType = 'btrfs';
22
+ choices.push('btrfs');
23
23
  }
24
+ partitions.defaultFileSystemType = 'ext4';
24
25
  const questions = [
25
26
  {
26
- choices: ['btrfs', 'ext4'],
27
+ choices: choices,
27
28
  default: partitions.defaultFileSystemType,
28
29
  message: 'Select file system tyèe',
29
30
  name: 'fileSystemChoices',
Binary file
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  </head>
8
8
  <body>
9
- <h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.30</h1>
9
+ <h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.32</h1>
10
10
  <h1>SYNOPSIS</h1>
11
11
  <p>eggs is a console utility, in active development, who let you to remaster your system and redistribuite it as live ISO image.</p>
12
12
  <h1>INSTALL</h1>
@@ -15,11 +15,11 @@
15
15
  </code></pre>
16
16
  <p>Arch</p>
17
17
  <pre><code>$ sudo pacman -S penguins-eggs
18
- $ sudo pacman -U penguins-eggs_10.0.30-bionic-1_amd64-1-x86_64.pkg.tar.zst
18
+ $ sudo pacman -U penguins-eggs_10.0.32-bionic-1_amd64-1-x86_64.pkg.tar.zst
19
19
  </code></pre>
20
20
  <p>Debian/Devuan/Ubuntu</p>
21
21
  <pre><code>$ sudo apt install penguins-eggs
22
- $ sudo dpkg -i penguins-eggs_10.0.30-bionic-1_amd64.deb
22
+ $ sudo dpkg -i penguins-eggs_10.0.32-bionic-1_amd64.deb
23
23
  </code></pre>
24
24
  <p>Manjaro</p>
25
25
  <pre><code>$ sudo pamac install penguins-eggs
@@ -27,7 +27,7 @@ $ sudo dpkg -i penguins-eggs_10.0.30-bionic-1_amd64.deb
27
27
  <h1>USAGE</h1>
28
28
  <pre><code>$ eggs (-v|--version|version)
29
29
 
30
- penguins-eggs/10.0.30
30
+ penguins-eggs/10.0.32
31
31
  $ eggs --help [COMMAND]
32
32
 
33
33
  USAGE
package/package.json CHANGED
@@ -2,22 +2,24 @@
2
2
  "name": "penguins-eggs",
3
3
  "shortName": "eggs",
4
4
  "description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
5
- "version": "10.0.30",
5
+ "version": "10.0.32",
6
6
  "author": "Piero Proietti",
7
7
  "bin": {
8
8
  "eggs": "./bin/run.js"
9
9
  },
10
10
  "bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
11
11
  "dependencies": {
12
- "@oclif/core": "^4.0.18",
13
- "@oclif/plugin-autocomplete": "^3.1.11",
14
- "@oclif/plugin-help": "^6.2.8",
15
- "@oclif/plugin-version": "^2.2.10",
16
- "axios": "^1.7.4",
12
+ "@oclif/core": "^4.0.19",
13
+ "@oclif/plugin-autocomplete": "^3.2.2",
14
+ "@oclif/plugin-help": "^6.2.10",
15
+ "@oclif/plugin-version": "^2.2.11",
16
+ "ansis": "^3.3.2",
17
+ "axios": "^1.7.5",
17
18
  "chalk": "^5.3.0",
18
19
  "cli-cursor": "^4.0.0",
20
+ "debug": "^4.3.6",
19
21
  "ink": "^5.0.1",
20
- "inquirer": "^9.2.23",
22
+ "inquirer": "^9.3.6",
21
23
  "js-yaml": "^4.1.0",
22
24
  "mustache": "^4.2.0",
23
25
  "netmask": "^2.0.2",
@@ -25,19 +27,20 @@
25
27
  "node-static": "^0.7.11",
26
28
  "react": "^18.3.1",
27
29
  "shelljs": "^0.8.5",
28
- "systeminformation": "^5.23.4",
30
+ "systeminformation": "^5.23.5",
29
31
  "tftp": "^0.1.2"
30
32
  },
31
33
  "devDependencies": {
32
34
  "@oclif/prettier-config": "^0.2.1",
33
- "@oclif/test": "^4.0.8",
34
- "@types/chai": "^4.3.17",
35
+ "@oclif/test": "^4.0.9",
36
+ "@types/chai": "^4.3.18",
37
+ "@types/debug": "^4.1.12",
35
38
  "@types/inquirer": "^9.0.7",
36
39
  "@types/js-yaml": "^4.0.9",
37
- "@types/mocha": "^10.0.6",
40
+ "@types/mocha": "^10.0.7",
38
41
  "@types/mustache": "^4.2.5",
39
42
  "@types/netmask": "^2.0.5",
40
- "@types/node": "^20.14.12",
43
+ "@types/node": "^20.16.1",
41
44
  "@types/node-static": "^0.7.11",
42
45
  "@types/react": "^18.3.4",
43
46
  "@types/shelljs": "^0.8.15",
@@ -46,8 +49,8 @@
46
49
  "eslint-config-oclif": "^5.2.1",
47
50
  "eslint-config-oclif-typescript": "^3.1.9",
48
51
  "eslint-config-prettier": "^9.1.0",
49
- "mocha": "^10.6.0",
50
- "oclif": "^4.14.22",
52
+ "mocha": "^10.7.3",
53
+ "oclif": "^4.14.26",
51
54
  "perrisbrewery": "^10.0.1",
52
55
  "prettier": "^3.3.3",
53
56
  "shx": "^0.3.4",
@@ -1,14 +0,0 @@
1
- /**
2
- * ./src/krill/modules/add-user.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Sequence from '../sequence.js';
10
- /**
11
- *
12
- * @param this
13
- */
14
- export default function bootloaderConfigAlpine(this: Sequence): Promise<void>;
@@ -1,37 +0,0 @@
1
- /**
2
- * ./src/krill/modules/add-user.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Utils from '../../classes/utils.js';
10
- import { exec } from '../../lib/utils.js';
11
- /**
12
- *
13
- * @param this
14
- */
15
- export default async function bootloaderConfigAlpine() {
16
- let cmd = '';
17
- if (this.efi) {
18
- try {
19
- cmd = `chroot ${this.installTarget} apk add grub grub-efi efibootmgr} ${this.toNull}`;
20
- await exec(cmd, this.echo);
21
- }
22
- catch (error) {
23
- console.log(error);
24
- await Utils.pressKeyToExit(cmd, true);
25
- }
26
- }
27
- else {
28
- try {
29
- cmd = `chroot ${this.installTarget} apk add grub grub-bios ${this.toNull}`;
30
- await exec(cmd, this.echo);
31
- }
32
- catch (error) {
33
- console.log(error);
34
- await Utils.pressKeyToExit(cmd, true);
35
- }
36
- }
37
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * ./src/krill/modules/add-user.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Sequence from '../sequence.js';
10
- /**
11
- *
12
- * @param this
13
- */
14
- export default function bootloaderConfigArch(this: Sequence): Promise<void>;
@@ -1,37 +0,0 @@
1
- /**
2
- * ./src/krill/modules/add-user.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Utils from '../../classes/utils.js';
10
- import { exec } from '../../lib/utils.js';
11
- /**
12
- *
13
- * @param this
14
- */
15
- export default async function bootloaderConfigArch() {
16
- let cmd = '';
17
- if (this.efi) {
18
- try {
19
- cmd = `chroot ${this.installTarget} pacman -Sy grub efibootmgr} ${this.toNull}`;
20
- await exec(cmd, this.echo);
21
- }
22
- catch (error) {
23
- console.log(error);
24
- await Utils.pressKeyToExit(cmd, true);
25
- }
26
- }
27
- else {
28
- try {
29
- cmd = `chroot ${this.installTarget} pacman -Sy grub ${this.toNull}`;
30
- await exec(cmd, this.echo);
31
- }
32
- catch (error) {
33
- console.log(error);
34
- await Utils.pressKeyToExit(cmd, true);
35
- }
36
- }
37
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * ./src/krill/modules/bootloader-config-debian.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Sequence from '../sequence.js';
10
- export default function bootloaderConfigDebian(this: Sequence): Promise<void>;
@@ -1,50 +0,0 @@
1
- /**
2
- * ./src/krill/modules/bootloader-config-debian.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Utils from '../../classes/utils.js';
10
- import { exec } from '../../lib/utils.js';
11
- export default async function bootloaderConfigDebian() {
12
- let cmd = '';
13
- try {
14
- cmd = `chroot ${this.installTarget} apt-get update -y ${this.toNull}`;
15
- await exec(cmd, this.echo);
16
- }
17
- catch (error) {
18
- console.log(error);
19
- await Utils.pressKeyToExit(cmd, true);
20
- }
21
- try {
22
- cmd = `chroot ${this.installTarget} sleep 1 ${this.toNull}`;
23
- await exec(cmd, this.echo);
24
- }
25
- catch (error) {
26
- console.log(error);
27
- await Utils.pressKeyToExit(cmd, true);
28
- }
29
- const aptInstallOptions = ' apt install -y --no-upgrade --allow-unauthenticated -o Acquire::gpgv::Options::=--ignore-time-conflict ';
30
- if (this.efi) {
31
- try {
32
- cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-efi-${Utils.uefiArch()} --allow-unauthenticated ${this.toNull}`;
33
- await exec(cmd, this.echo);
34
- }
35
- catch (error) {
36
- console.log(error);
37
- await Utils.pressKeyToExit(cmd, true);
38
- }
39
- }
40
- else {
41
- try {
42
- cmd = `chroot ${this.installTarget} ${aptInstallOptions} grub-pc ${this.toNull}`;
43
- await exec(cmd, this.echo);
44
- }
45
- catch (error) {
46
- console.log(error);
47
- await Utils.pressKeyToExit(cmd, true);
48
- }
49
- }
50
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * ./src/krill/modules/m-timezone.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import Sequence from '../sequence.js';
10
- /**
11
- *
12
- * @param this
13
- */
14
- export default function mTimezone(this: Sequence): Promise<void>;
@@ -1,22 +0,0 @@
1
- /**
2
- * ./src/krill/modules/m-timezone.ts
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
- */
9
- import fs from 'node:fs';
10
- import { exec } from '../../lib/utils.js';
11
- /**
12
- *
13
- * @param this
14
- */
15
- export default async function mTimezone() {
16
- if (fs.existsSync('/etc/localtime')) {
17
- const cmd = `chroot ${this.installTarget} unlink /etc/localtime`;
18
- await exec(cmd, this.echo);
19
- }
20
- const cmd = `chroot ${this.installTarget} ln -sf /usr/share/zoneinfo/${this.region}/${this.zone} /etc/localtime`;
21
- await exec(cmd, this.echo);
22
- }
@@ -1,3 +0,0 @@
1
- #!/bin/bash
2
- MACHINE_ID=$(uuidgen)
3
- echo "$MACHINE_ID" | tee /etc/machine-id
@@ -1,40 +0,0 @@
1
- #!/bin/sh -e
2
-
3
- # At the end of the boot, initram goes into emergency,
4
- # we give the following commands:
5
- # mkdir /mnt
6
- # mount /dev/sr0 /mnt
7
- # /mnt/live/sidecar.sh
8
- #
9
-
10
- DIRECTORY="/sysroot"
11
- if [ -z "$(find "$DIRECTORY" -mindepth 1)" ]; then
12
- echo "sidecar: /sysroot is again emply!"
13
- echo " type 'exit' to return init, then run sidecar.sh again"
14
- exit 0
15
- fi
16
-
17
- # Creating mountpoints
18
- mkdir -p /media/root-ro
19
- mkdir -p /media/root-rw
20
-
21
- # mount filesystem squashfs on /media/root-ro
22
- mount -t squashfs /mnt/live/filesystem.squashfs /media/root-ro
23
-
24
- # Mount tmpfs on /media/root-rw
25
- mount -t tmpfs root-tmpfs /media/root-rw
26
-
27
- # Creare i punti di montaggio necessari
28
- mkdir -p /media/root-rw/work
29
- mkdir -p /media/root-rw/root
30
-
31
- # mount overlayfs on //sysroot
32
- mount -t overlay overlay -o lowerdir=/media/root-ro,upperdir=/media/root-rw/root,workdir=/media/root-rw/work /sysroot
33
-
34
- # insert a dummy value for /etc/machine-id
35
- echo "9350a55456f5bb96ef2fda0166a86d91" | tee /sysroot/etc/machine-id
36
-
37
- echo "sidecar: /sysroot was mounted!"
38
- echo " ================================"
39
- echo " YOU CAN TYPE 'exit' TO BOOT LIVE"
40
- echo " ================================"