penguins-eggs 10.0.37 → 10.0.40

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 (71) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +31 -30
  3. package/conf/derivatives.yaml +3 -2
  4. package/conf/distros/opensuse/README.md +3 -0
  5. package/conf/distros/opensuse/calamares/calamares-modules/bootloader-config/bootloader-config.sh +40 -0
  6. package/conf/distros/opensuse/calamares/calamares-modules/bootloader-config/module.yml +9 -0
  7. package/conf/distros/opensuse/calamares/calamares-modules/cleanup/cleanup.sh +13 -0
  8. package/conf/distros/opensuse/calamares/calamares-modules/cleanup/module.yml +9 -0
  9. package/conf/distros/opensuse/calamares/modules/bootloader.yml +57 -0
  10. package/conf/distros/opensuse/calamares/modules/displaymanager.yml +23 -0
  11. package/conf/distros/opensuse/calamares/modules/finished.yml +5 -0
  12. package/conf/distros/opensuse/calamares/modules/fstab.yml +12 -0
  13. package/conf/distros/opensuse/calamares/modules/locale.yml +98 -0
  14. package/conf/distros/opensuse/calamares/modules/luksopenswaphookcfg.yml +5 -0
  15. package/conf/distros/opensuse/calamares/modules/machineid.yml +17 -0
  16. package/conf/distros/opensuse/calamares/modules/mount.yml +56 -0
  17. package/conf/distros/opensuse/calamares/modules/packages.yml +6 -0
  18. package/conf/distros/opensuse/calamares/modules/partition.yml +242 -0
  19. package/conf/distros/opensuse/calamares/modules/removeuser.yml +15 -0
  20. package/conf/distros/opensuse/calamares/modules/unpackfs.yml +6 -0
  21. package/conf/distros/opensuse/calamares/modules/users.yml +18 -0
  22. package/conf/distros/opensuse/calamares/modules/welcome.yml +19 -0
  23. package/conf/distros/opensuse/calamares/settings.yml +57 -0
  24. package/conf/distros/rolling/calamares/modules/finished.yml +2 -1
  25. package/conf/distros/rolling/calamares/modules/partition.yml +1 -1
  26. package/conf/distros/rolling/calamares/settings.yml +3 -1
  27. package/dist/classes/bleach.js +5 -1
  28. package/dist/classes/cli-autologin.js +33 -27
  29. package/dist/classes/distro.js +48 -47
  30. package/dist/classes/families/fedora.js +1 -1
  31. package/dist/classes/incubation/fisherman.d.ts +1 -1
  32. package/dist/classes/incubation/fisherman.js +1 -1
  33. package/dist/classes/incubation/incubator.js +8 -0
  34. package/dist/classes/locales.js +1 -1
  35. package/dist/classes/ovary.d.ts +2 -6
  36. package/dist/classes/ovary.js +25 -32
  37. package/dist/classes/pacman.js +11 -11
  38. package/dist/classes/tailor.d.ts +11 -14
  39. package/dist/classes/tailor.js +184 -247
  40. package/dist/classes/utils.js +1 -1
  41. package/dist/commands/wardrobe/wear.js +3 -0
  42. package/dist/components/finished.js +5 -4
  43. package/dist/components/install.js +12 -8
  44. package/dist/interfaces/i-materia.d.ts +9 -14
  45. package/dist/krill/modules/add-user.js +9 -12
  46. package/dist/krill/modules/bootloader-config.js +15 -0
  47. package/dist/krill/modules/bootloader.js +2 -2
  48. package/dist/krill/modules/del-live-user.js +3 -2
  49. package/dist/krill/modules/fstab.js +2 -0
  50. package/dist/krill/modules/initramfs.js +10 -0
  51. package/dist/krill/modules/locale.js +5 -5
  52. package/dist/krill/modules/m-keyboard.js +3 -16
  53. package/dist/krill/modules/machine-id.js +3 -3
  54. package/dist/krill/modules/mkfs.d.ts +2 -0
  55. package/dist/krill/modules/mkfs.js +2 -0
  56. package/dist/krill/modules/unpackfs.js +3 -2
  57. package/dist/krill/sequence.d.ts +9 -6
  58. package/dist/krill/sequence.js +162 -259
  59. package/dracut/dracut.conf.d/01-live.conf +2 -1
  60. package/manpages/doc/man/eggs.1.gz +0 -0
  61. package/manpages/doc/man/eggs.html +4 -4
  62. package/mkinitcpio/arch/README.md +48 -0
  63. package/mkinitcpio/arch/mkinitcpio.conf +4 -3
  64. package/mkinitfs/initramfs-init.in +4 -3
  65. package/package.json +12 -9
  66. package/syslinux/chain.c32 +0 -0
  67. package/syslinux/isolinux.bin +0 -0
  68. package/syslinux/ldlinux.c32 +0 -0
  69. package/syslinux/libcom32.c32 +0 -0
  70. package/syslinux/libutil.c32 +0 -0
  71. package/syslinux/vesamenu.c32 +0 -0
@@ -6,6 +6,7 @@
6
6
  * license: MIT
7
7
  */
8
8
  import React from 'react';
9
+ import Spinner from 'ink-spinner';
9
10
  import yaml from 'js-yaml';
10
11
  import fs from 'fs';
11
12
  import { Box, Newline, Text } from 'ink';
@@ -23,16 +24,16 @@ export default function Install({ message = "Install", percent = 0, spinner = fa
23
24
  const calamares = yaml.load(fs.readFileSync(configRoot + 'branding/' + branding + '/branding.desc', 'utf-8'));
24
25
  productName = calamares.strings.productName;
25
26
  version = calamares.strings.version;
26
- let perc = Math.round(percent * 100);
27
- let barLen = 52;
28
- let progress = Math.round(barLen * percent);
27
+ let barLen = 53;
28
+ let progress = Math.round(barLen * percent / 100);
29
29
  let todo = barLen - progress;
30
30
  let clean = "·".repeat(todo);
31
- let progressBar = "[" + "█".repeat(progress) + clean + "] " + perc + "%";
31
+ let progressBar = "[" + "█".repeat(progress) + clean + "] " + percent + "%";
32
32
  /**
33
33
  * totale width=75
34
34
  * step width=15
35
35
  * finestra with=59
36
+ * <Text><Spinner type="simpleDotsScrolling" /></Text>
36
37
  */
37
38
  return (React.createElement(React.Fragment, null,
38
39
  React.createElement(Title, null),
@@ -47,10 +48,13 @@ export default function Install({ message = "Install", percent = 0, spinner = fa
47
48
  React.createElement(Newline, null),
48
49
  React.createElement(Box, { flexDirection: "row" },
49
50
  React.createElement(Text, null, "Step: "),
50
- React.createElement(Text, { color: "cyan" }, message)),
51
+ React.createElement(Text, { color: "cyan" },
52
+ message,
53
+ " "),
54
+ spinner && React.createElement(Text, null,
55
+ React.createElement(Spinner, { type: "simpleDotsScrolling" }))),
51
56
  React.createElement(Newline, null),
52
57
  React.createElement(Box, null,
53
- React.createElement(Text, null, "Progress:")),
54
- React.createElement(Box, null,
55
- React.createElement(Text, null, progressBar))))))));
58
+ React.createElement(Text, null, progressBar)))))),
59
+ React.createElement(Text, null)));
56
60
  }
@@ -12,30 +12,25 @@ export interface IRepos {
12
12
  }
13
13
  export interface IMateria {
14
14
  author: string;
15
- customize: {
16
- dirs: boolean;
17
- scripts: string[];
18
- };
19
15
  description: string;
20
16
  distributions: string[];
21
17
  name: string;
22
- reboot: boolean;
23
18
  release: string;
24
19
  sequence: {
25
- accessories: string[];
26
- debs: boolean;
27
- packages: string[];
28
- packages_no_install_recommends: string[];
29
- packages_python: string[];
30
- preinst: string[];
31
20
  repositories: {
32
21
  sources_list: string[];
33
22
  sources_list_d: string[];
34
23
  update: boolean;
35
24
  upgrade: boolean;
36
25
  };
37
- try_accessories: string[];
38
- try_packages: string[];
39
- try_packages_no_install_recommends: string[];
26
+ cmds: string[];
27
+ packages: string[];
28
+ packages_python: string[];
29
+ accessories: string[];
40
30
  };
31
+ finalize: {
32
+ customize: boolean;
33
+ cmds: string[];
34
+ };
35
+ reboot: boolean;
41
36
  }
@@ -6,7 +6,6 @@
6
6
  * license: MIT
7
7
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
8
  */
9
- import Utils from '../../classes/utils.js';
10
9
  import { exec } from '../../lib/utils.js';
11
10
  /**
12
11
  *
@@ -25,7 +24,10 @@ export default async function addUser(name = 'live', password = 'evolution', ful
25
24
  cmd = `chroot ${this.installTarget} useradd --create-home --shell /bin/bash ${name} ${this.toNull}`;
26
25
  }
27
26
  else if (this.distro.familyId === 'fedora') {
28
- cmd = `chroot ${this.installTarget} adduser ${name} -m --shell /bin/bash --comment "${fullName},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
27
+ cmd = `chroot ${this.installTarget} adduser ${name} --create-home --shell /bin/bash --comment "${fullName},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
28
+ }
29
+ else if (this.distro.familyId === 'opensuse') {
30
+ cmd = `chroot ${this.installTarget} useradd ${name} --create-home --shell /bin/bash --comment "${fullName},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
29
31
  }
30
32
  await exec(cmd, this.echo);
31
33
  // chpasswd user
@@ -37,15 +39,10 @@ export default async function addUser(name = 'live', password = 'evolution', ful
37
39
  }
38
40
  cmd = `chroot ${this.installTarget} usermod -aG ${group} ${name} ${this.toNull}`;
39
41
  await exec(cmd, this.echo);
40
- // autologin
41
- try {
42
- await exec(cmd, this.echo);
43
- if (this.distro.familyId === 'archlinux') {
44
- await exec(`chroot ${this.installTarget} getent group autologin || groupadd autologin`);
45
- await exec(`chroot ${this.installTarget} gpasswd -a ${this.settings.config.user_opt} autologin`);
46
- }
47
- }
48
- catch {
49
- await Utils.pressKeyToExit(cmd);
42
+ // add autologin group in archlinux
43
+ await exec(cmd, this.echo);
44
+ if (this.distro.familyId === 'archlinux') {
45
+ await exec(`chroot ${this.installTarget} getent group autologin || groupadd autologin`);
46
+ await exec(`chroot ${this.installTarget} gpasswd -a ${this.settings.config.user_opt} autologin`);
50
47
  }
51
48
  }
@@ -55,6 +55,21 @@ export default async function bootloaderConfig() {
55
55
  await Utils.pressKeyToExit(cmd, true);
56
56
  }
57
57
  }
58
+ }
59
+ /**
60
+ * opensuse
61
+ */
62
+ case 'opensuse': {
63
+ if (this.efi) {
64
+ try {
65
+ cmd = `chroot ${this.installTarget} zypper install -y grub2 grub2-i386-pc grub2-x86_64-efi- efibootmgr} ${this.toNull}`;
66
+ await exec(cmd, this.echo);
67
+ }
68
+ catch (error) {
69
+ console.log(error);
70
+ await Utils.pressKeyToExit(cmd, true);
71
+ }
72
+ }
58
73
  else {
59
74
  try {
60
75
  cmd = `chroot ${this.installTarget} apk add grub grub-bios ${this.toNull}`;
@@ -14,7 +14,7 @@ import { exec } from '../../lib/utils.js';
14
14
  */
15
15
  export default async function bootloader() {
16
16
  let grubInstall = 'grub-install';
17
- if (this.distro.familyId === 'fedora') {
17
+ if (this.distro.familyId === 'fedora' || this.distro.familyId === 'opensuse') {
18
18
  grubInstall = 'grub2-install';
19
19
  }
20
20
  let cmd = `chroot ${this.installTarget} ${grubInstall} ${this.partitions.installationDevice} ${this.toNull}`;
@@ -25,7 +25,7 @@ export default async function bootloader() {
25
25
  await Utils.pressKeyToExit(cmd);
26
26
  }
27
27
  cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
28
- if (this.distro.familyId === 'fedora') {
28
+ if (this.distro.familyId === 'fedora' || this.distro.familyId === 'opensuse') {
29
29
  cmd = `chroot ${this.installTarget} grub2-mkconfig -o /boot/grub2/grub.cfg ${this.toNull}`;
30
30
  }
31
31
  try {
@@ -26,9 +26,10 @@ export default async function delLiveUser() {
26
26
  }
27
27
  finally {
28
28
  if (userExists) {
29
- // debian family and alpine
30
29
  let cmd = `chroot ${this.installTarget} deluser --remove-home ${user} ${this.toNull}`;
31
- if (this.distro.familyId === 'archlinux' || this.distro.familyId === 'fedora') {
30
+ if (this.distro.familyId === 'archlinux' ||
31
+ this.distro.familyId === 'fedora' ||
32
+ this.distro.familyId === 'opensuse') {
32
33
  cmd = `chroot ${this.installTarget} sudo userdel -r ${user} ${this.toNull}`;
33
34
  }
34
35
  await exec(cmd, this.echo);
@@ -103,6 +103,8 @@ export default async function fstab(installDevice, crypted = false) {
103
103
  text += `# UUID=${Utils.uuid(this.devices.root.name)} ${var_lib_blueman}\n`;
104
104
  text += `# UUID=${Utils.uuid(this.devices.root.name)} ${tmp}\n`;
105
105
  }
106
+ //console.log(text)
107
+ //Utils.pressKeyToExit()
106
108
  Utils.write(fstab, text);
107
109
  }
108
110
  /**
@@ -45,4 +45,14 @@ export default async function initramfs() {
45
45
  await Utils.pressKeyToExit(cmd);
46
46
  }
47
47
  }
48
+ else if (this.distro.familyId === 'alpine') {
49
+ }
50
+ else if (this.distro.familyId === 'fedora') {
51
+ let cmd = 'dracut';
52
+ await exec(cmd, Utils.setEcho(true));
53
+ }
54
+ else if (this.distro.familyId === 'opensuse') {
55
+ let cmd = 'dracut';
56
+ await exec(cmd, Utils.setEcho(true));
57
+ }
48
58
  }
@@ -42,10 +42,10 @@ export default async function locale() {
42
42
  Utils.write(file, content);
43
43
  // timezone Arch Debian
44
44
  if (fs.existsSync('/etc/localtime')) {
45
- const cmd = `chroot ${this.installTarget} unlink /etc/localtime`;
45
+ const cmd = `chroot ${this.installTarget} unlink /etc/localtime ${this.toNull}`;
46
46
  await exec(cmd, this.echo);
47
47
  }
48
- const cmd = `chroot ${this.installTarget} ln -sf /usr/share/zoneinfo/${this.region}/${this.zone} /etc/localtime`;
48
+ const cmd = `chroot ${this.installTarget} ln -sf /usr/share/zoneinfo/${this.region}/${this.zone} /etc/localtime ${this.toNull}`;
49
49
  await exec(cmd, this.echo);
50
50
  }
51
51
  else if (this.distro.familyId === 'alpine') {
@@ -79,13 +79,13 @@ export default async function locale() {
79
79
  *
80
80
  */
81
81
  let tz = `/etc/zoneinfo/${this.region}/${this.zone}`;
82
- await exec(`chroot ${this.installTarget} rm -rf /etc/zoneinfo/*`, this.echo);
83
- await exec(`chroot ${this.installTarget} mkdir -p ${tz}`, this.echo);
82
+ await exec(`chroot ${this.installTarget} rm -rf /etc/zoneinfo/* ${this.toNull}`, this.echo);
83
+ await exec(`chroot ${this.installTarget} mkdir -p ${tz} ${this.toNull}`, this.echo);
84
84
  file = `${this.installTarget}/etc/profile.d/timezone.sh`;
85
85
  content = "";
86
86
  content += `#!/bin/sh\n`;
87
87
  content += `export TZ='${tz}'`;
88
88
  Utils.write(file, content);
89
- await exec(`chmod +x ${file}`);
89
+ await exec(`chmod +x ${file} ${this.toNull}`);
90
90
  }
91
91
  }
@@ -23,7 +23,7 @@ export default async function mKeyboard() {
23
23
  let cmd = '';
24
24
  let content = '';
25
25
  if (Utils.isSystemd()) {
26
- cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}`;
26
+ cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout} ${this.toNull}`;
27
27
  content = '# See penguins-eggs/src/krill/modules/set-keyboard.ts\n\n';
28
28
  content += "# Read and parsed by systemd-localed. It's probably wise not to edit this file\n";
29
29
  content += '# manually too freely.\n';
@@ -51,21 +51,8 @@ export default async function mKeyboard() {
51
51
  }
52
52
  else if (this.distro.familyId === 'alpine') {
53
53
  /**
54
- * https://docs.alpinelinux.org/user-handbook/0.1a/Installing/manual.html
55
- */
54
+ * Alpine dovrebbe fare tutto con `setup-keymap us us`
55
+ */
56
56
  await exec(`chroot ${this.installTarget} setup-keymap ${this.keyboardLayout} ${this.keyboardLayout}`);
57
- // X11
58
- let content = "";
59
- content += `Section "InputClass"\n`;
60
- content += `Identifier "system-keyboard"\n`;
61
- content += `MatchIsKeyboard "on"\n`;
62
- content += `Option "XkbLayout" "${this.keyboardLayout}"\n`;
63
- content += `Option "XkbModel" "${this.keyboardModel}"\n`;
64
- content += `EndSection\n`;
65
- let file = "/etc/X11/xorg.conf.d/00-keyboard.conf";
66
- if (fs.existsSync(this.installTarget + '/etc/X11/xorg.conf.d')) {
67
- Utils.write(this.installTarget + '/etc/X11/xorg.conf.d/00-keyboard.conf', content);
68
- }
69
- // Wayland TO DO
70
57
  }
71
58
  }
@@ -17,14 +17,14 @@ export default async function machineId() {
17
17
  // We delete the machine-id file to force its recreation
18
18
  const file = `${this.installTarget}/etc/machine-id`;
19
19
  if (fs.existsSync(file)) {
20
- await exec(`rm ${file}`, this.echo);
20
+ await exec(`rm ${file} ${this.toNull}`, this.echo);
21
21
  }
22
22
  // On Alpine, we need to create the machine-id file
23
23
  if (this.distro.familyId === 'alpine') {
24
- await exec(`dbus-uuidgen > ${this.installTarget}/var/lib/dbus/machine-id`);
24
+ await exec(`dbus-uuidgen --ensure=${this.installTarget}/var/lib/dbus/machine-id ${this.toNull}`);
25
25
  await exec(`cp ${this.installTarget}/var/lib/dbus/machine-id ${this.installTarget}/etc/machine-id`);
26
26
  }
27
27
  else {
28
- await exec(`touch ${file}`);
28
+ await exec(`touch ${file} ${this.toNull}`);
29
29
  }
30
30
  }
@@ -9,5 +9,7 @@
9
9
  import Sequence from '../sequence.js';
10
10
  /**
11
11
  * mkfs
12
+ *
13
+ * mke2fs - create an ext2/ext3/ext4 file system -F force, -t type
12
14
  */
13
15
  export default function mkfs(this: Sequence): Promise<boolean>;
@@ -9,6 +9,8 @@
9
9
  import { exec } from '../../lib/utils.js';
10
10
  /**
11
11
  * mkfs
12
+ *
13
+ * mke2fs - create an ext2/ext3/ext4 file system -F force, -t type
12
14
  */
13
15
  export default async function mkfs() {
14
16
  const result = true;
@@ -13,7 +13,8 @@ import { exec } from '../../lib/utils.js';
13
13
  */
14
14
  export default async function unpackfs() {
15
15
  // const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}`
16
- const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}${this.distro.squashfs}`;
16
+ const cmd = `unsquashfs -d ${this.installTarget} -f ${this.distro.liveMediumPath}${this.distro.squashfs} ${this.toNull}`;
17
17
  const echoYes = Utils.setEcho(true);
18
- await exec(cmd, echoYes);
18
+ const echoNo = Utils.setEcho(false);
19
+ await exec(cmd, echoNo);
19
20
  }
@@ -6,10 +6,6 @@
6
6
  * license: MIT
7
7
  * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
8
8
  */
9
- /**
10
- * Note: I'm using REACT here to get a TUI,
11
- * via ink library https://github.com/vadimdemedes/ink
12
- */
13
9
  /**
14
10
  * Ideally, I want to respect calamares way, remplementing the same (SEMPLIFIED) steps for CLI
15
11
  *
@@ -115,6 +111,7 @@ export default class Sequence {
115
111
  keyboardLayout: string;
116
112
  keyboardVariant: string;
117
113
  toNull: string;
114
+ spinner: boolean;
118
115
  settings: Settings;
119
116
  remix: IRemix;
120
117
  distro: IDistro;
@@ -145,7 +142,13 @@ export default class Sequence {
145
142
  */
146
143
  execCalamaresModule(name: string): Promise<void>;
147
144
  /**
148
- * only show the result
145
+ *
146
+ * @param message
147
+ */
148
+ emergencyShell(message: string): Promise<void>;
149
+ /**
150
+ *
151
+ * @param message
149
152
  */
150
- finished(): Promise<void>;
153
+ showProblem(message: string, currErr: any): Promise<void>;
151
154
  }