penguins-eggs 25.8.28 → 25.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
17
17
  * initrdAlpine
18
18
  */
19
19
  export async function initrdAlpine() {
20
- Utils.warning(`creating ${path.basename(this.initrd)} Alpine on ISO/live`);
20
+ Utils.warning(`creating ${path.basename(this.initrd)} Alpine on (ISO)/live`);
21
21
  let initrdImg = Utils.initrdImg();
22
22
  initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
23
23
  const pathConf = path.resolve(__dirname, `../../../mkinitfs/live.conf`);
@@ -27,7 +27,7 @@ export async function initrdAlpine() {
27
27
  * initrdArch
28
28
  */
29
29
  export async function initrdArch() {
30
- Utils.warning(`creating ${path.basename(this.initrd)} using mkinitcpio on ISO/live`);
30
+ Utils.warning(`creating ${path.basename(this.initrd)} using mkinitcpio on (ISO)/live`);
31
31
  let dirConf = 'arch';
32
32
  let tool = 'archiso';
33
33
  let hookSrc = '/usr/lib/initcpio/hooks/archiso_pxe_http';
@@ -64,7 +64,7 @@ export async function initrdArch() {
64
64
  * initrdDebian
65
65
  */
66
66
  export async function initrdDebian(verbose = false) {
67
- Utils.warning(`creating ${this.initrd} using mkinitramfs on ISO/live`);
67
+ Utils.warning(`creating ${this.initrd} using mkinitramfs on (ISO)/live`);
68
68
  let isCrypted = false;
69
69
  if (fs.existsSync('/etc/crypttab')) {
70
70
  isCrypted = true;
@@ -79,7 +79,7 @@ export async function initrdDebian(verbose = false) {
79
79
  * initrdDracut) Almalinux/Fedora/Openmamba/Opensuse/Rocky/Voidlinux
80
80
  */
81
81
  export async function initrdDracut() {
82
- Utils.warning(`creating ${path.basename(this.initrd)} using dracut on ISO/live`);
82
+ Utils.warning(`creating ${path.basename(this.initrd)} using dracut on (ISO)/live`);
83
83
  const prefix = this.settings.config.snapshot_prefix;
84
84
  const confdir = '--confdir ' + path.resolve(__dirname, `../../../dracut/dracut.conf.d`);
85
85
  // const dracutdir='--dracutdir /opt/penguins-eggs/dracut'
@@ -17,6 +17,6 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
17
17
  * kernelCopy
18
18
  */
19
19
  export async function kernelCopy() {
20
- Utils.warning(`copying ${path.basename(this.vmlinuz)} on ISO/live`);
20
+ Utils.warning(`copying ${path.basename(this.vmlinuz)} on (ISO)/live`);
21
21
  await exec(`cp ${this.vmlinuz} ${this.settings.iso_work}live/`, this.echo);
22
22
  }
@@ -57,9 +57,9 @@ export async function makeEfi(theme = 'eggs') {
57
57
  const efiMemdiskDir = path.join(efiPath, '/memdisk/');
58
58
  const efiImgMnt = path.join(efiPath, 'mnt');
59
59
  const isoDir = this.settings.iso_work;
60
- // create (iso)/boot/grub
60
+ // create (ISO)/boot/grub
61
61
  await exec(`mkdir ${isoDir}/boot/grub/${Utils.uefiFormat()} -p`, this.echo);
62
- // create (iso)/EFI
62
+ // create (ISO)/EFI
63
63
  await exec(`mkdir ${isoDir}/EFI/boot -p`, this.echo);
64
64
  await exec(`cp ${shimEfi} ${isoDir}/EFI/boot/${bootEfiName()}`, this.echo);
65
65
  await exec(`cp ${grubEfi} ${isoDir}/EFI/boot/${grubEfiName()}`, this.echo);
@@ -91,9 +91,9 @@ export async function makeEfi(theme = 'eggs') {
91
91
  cfgSeekerUsbText += seeker;
92
92
  Utils.write(cfgSeekerUsb, cfgSeekerUsbText);
93
93
  /**
94
- * create grub.cfg (bridge) on (iso)/boot/grub/x86_64-efi/grub.cfg
94
+ * create grub.cfg (bridge) on (ISO)/boot/grub/x86_64-efi/grub.cfg
95
95
  */
96
- Utils.warning(`creating grub.cfg bridge to main. (iso)/boot/grub/${Utils.uefiFormat()}`);
96
+ Utils.warning(`creating grub.cfg bridge to main. (ISO)/boot/grub/${Utils.uefiFormat()}`);
97
97
  let cfgBridge = `${isoDir}/boot/grub/${Utils.uefiFormat()}/grub.cfg`;
98
98
  let cfgBridgeText = `# grub.cfg bridge\n`;
99
99
  cfgBridgeText += `# created on ${cfgBridge}\n`;
@@ -109,7 +109,7 @@ export async function makeEfi(theme = 'eggs') {
109
109
  pathBait = path.join(isoDir, '/EFI/ubuntu');
110
110
  }
111
111
  await exec(`mkdir ${pathBait} -p`, this.echo);
112
- Utils.warning(`creating grub.cfg seeker ISO/DVD on (iso)/${pathBait}}`);
112
+ Utils.warning(`creating grub.cfg seeker ISO/DVD on (ISO)/EFI/${path.basename(pathBait)}`);
113
113
  let cfgBait = path.join(pathBait, '/grub.cfg');
114
114
  let cfgBaitText = '';
115
115
  cfgBaitText += `\n`;
@@ -166,12 +166,12 @@ export async function makeEfi(theme = 'eggs') {
166
166
  await exec(`umount ${efiImgMnt}`, this.echo);
167
167
  await new Promise(resolve => setTimeout(resolve, 500));
168
168
  // Copy isoImg in ${${isoDir}/boot/grub
169
- Utils.warning("copyng efi.img on (iso)/boot/grub");
169
+ Utils.warning("copyng (efi.img) on (ISO)/boot/grub");
170
170
  await exec(`cp ${efiImg} ${isoDir}/boot/grub`, this.echo);
171
171
  /**
172
- * creating grub.cfg (4) on (iso)/boot/grub
172
+ * creating grub.cfg (4) on (ISO)/boot/grub
173
173
  */
174
- Utils.warning("creating grub.cfg main on (iso)/boot/grub");
174
+ Utils.warning("creating grub.cfg main on (ISO)/boot/grub");
175
175
  // copy splash to efiWorkDir
176
176
  const splashDest = `${efiWorkDir}/boot/grub/splash.png`;
177
177
  let splashSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/splash.png`);
@@ -85,7 +85,7 @@ export async function makeSquashfs(scriptOnly = false, unsecure = false) {
85
85
  cmd = cmd.replaceAll(/\s\s+/g, ' ');
86
86
  Utils.writeX(`${this.settings.work_dir.ovarium}mksquashfs`, cmd);
87
87
  if (!scriptOnly) {
88
- Utils.warning('creating filesystem.squashfs on ISO/live');
88
+ Utils.warning('creating filesystem.squashfs on (ISO)/live');
89
89
  // Utils.warning(`compression: ` + compression)
90
90
  const test = (await exec(cmd, Utils.setEcho(true))).code;
91
91
  if (test !== 0) {
@@ -248,8 +248,8 @@ export async function produce(kernel = '', clone = false, cryptedclone = false,
248
248
  synctoCmd += ' --excludes'; // from Marco, usa home.list
249
249
  }
250
250
  await exec(synctoCmd, Utils.setEcho(true));
251
- Utils.warning(`moving ${luksFile} in ${this.nest}iso/live`);
252
- await exec(`mv ${luksFile} ${this.nest}iso/live`, this.echo);
251
+ Utils.warning(`moving ${luksFile} in ${this.nest}(ISO)/live`);
252
+ await exec(`mv ${luksFile} ${this.nest}(ISO)/live`, this.echo);
253
253
  }
254
254
  const mkIsofsCmd = (await this.xorrisoCommand(clone, cryptedclone)).replaceAll(/\s\s+/g, ' ');
255
255
  this.makeDotDisk(this.volid, mksquashfsCmd, mkIsofsCmd);
@@ -334,15 +334,7 @@ export default class Pxe {
334
334
  ip=dhcp`;
335
335
  break;
336
336
  case 'fedora':
337
- lp = `initrd=http://${Utils.address()}/live/${path.basename(this.initrdImg)} \
338
- root=live:http://${Utils.address()}/live/filesystem.squashfs \
339
- rootfstype=auto \
340
- ro \
341
- rd.live.image \
342
- rd.luks=0 \
343
- rd.md=0 \
344
- rd.dm=0\n`;
345
- break;
337
+ case 'openmamba':
346
338
  case 'opensuse':
347
339
  lp = `initrd=http://${Utils.address()}/live/${path.basename(this.initrdImg)} \
348
340
  root=live:http://${Utils.address()}/live/filesystem.squashfs \
@@ -73,10 +73,11 @@ export default class Kernel {
73
73
  initramfs = `/boot/initramfs-${version}-x86_64.img`;
74
74
  }
75
75
  else {
76
- // Gestione generica per le altre distro (Debian, Fedora, SUSE, ecc.)
76
+ // Gestione generica per le altre distro (Debian, Fedora, SUSE, OpenMamba, cc.)
77
77
  const candidates = [
78
78
  `/boot/initrd.img-${kernel}`, // Debian, Ubuntu
79
79
  `/boot/initramfs-${kernel}.img`, // Fedora, RHEL
80
+ `/boot/initramfs-${kernel}-1mamba-x86_64.img`, // Openmamba
80
81
  `/boot/initrd-${kernel}`, // openSUSE
81
82
  `/boot/initramfs-${kernel}`, // fallbacks
82
83
  ];
@@ -80,13 +80,15 @@ export default class Utils {
80
80
  if (codenameId === 'rolling' || codenameId === '') {
81
81
  const releaseId = Utils.getOsRelease().VERSION_ID.trim();
82
82
  if (releaseId !== '') {
83
- result += `${releaseId}-`;
83
+ result += releaseId;
84
84
  }
85
85
  }
86
86
  else {
87
- result += `${codenameId.toLowerCase()}-`;
87
+ result += `${codenameId.toLowerCase()}`;
88
+ }
89
+ if (!result.endsWith('-')) {
90
+ result += '-';
88
91
  }
89
- result = result.replace(`/`, '-');
90
92
  return result;
91
93
  }
92
94
  /**
@@ -121,7 +121,7 @@ export default class ExportPkg extends Command {
121
121
  }
122
122
  else if (familyId === 'openmamba') {
123
123
  Utils.warning("openmamba rpm packages");
124
- localPath = `/usr/src/RPM/RPMS/x86_64`;
124
+ localPath = `/home/${this.user}/rpmbuild/RPMS/x86_64`;
125
125
  remotePath = this.Tu.config.remotePathPackages + "/openmamba";
126
126
  filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*mamba.*.rpm`;
127
127
  /**
@@ -29,6 +29,9 @@ export default async function addUser(username = 'live', password = 'evolution',
29
29
  else if (this.distro.familyId === 'fedora') {
30
30
  cmd = `chroot ${this.installTarget} adduser ${username} --create-home --shell /bin/bash --comment "${fullusername},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
31
31
  }
32
+ else if (this.distro.familyId === 'openmamba') {
33
+ cmd = `chroot ${this.installTarget} useradd ${username} --create-home --shell /bin/bash --comment "${fullusername},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
34
+ }
32
35
  else if (this.distro.familyId === 'opensuse') {
33
36
  cmd = `chroot ${this.installTarget} useradd ${username} --create-home --shell /bin/bash --comment "${fullusername},${roomNumber},${workPhone},${homePhone}" ${this.toNull}`;
34
37
  }
@@ -39,6 +42,9 @@ export default async function addUser(username = 'live', password = 'evolution',
39
42
  if (this.distro.familyId === 'debian') {
40
43
  group = 'sudo';
41
44
  }
45
+ else if (this.distro.familyId === 'openmamba') {
46
+ group = 'sysadmin';
47
+ }
42
48
  cmd = `chroot ${this.installTarget} usermod -aG ${group} ${username} ${this.toNull}`;
43
49
  await exec(cmd, this.echo);
44
50
  // add autologin group in archlinux
@@ -21,7 +21,15 @@ export default async function bootloader() {
21
21
  /**
22
22
  * grub-install: added --force per fedora family
23
23
  */
24
- let cmd = `chroot ${this.installTarget} ${grubName}-install ${this.partitions.installationDevice} ${grubForce} ${this.toNull}`;
24
+ // define grub-install --target=${target}
25
+ let target = `x86_64-efi`;
26
+ if (!this.efi) {
27
+ target = 'i386-pc';
28
+ }
29
+ if (process.arch === 'arm64') {
30
+ target = `arm64-efi`;
31
+ }
32
+ let cmd = `chroot ${this.installTarget} ${grubName}-install --target=${target} ${this.partitions.installationDevice} ${grubForce} ${this.toNull}`;
25
33
  await exec(cmd, this.echo);
26
34
  /**
27
35
  * grub-mkconfig
@@ -140,7 +140,7 @@ export default class Sequence {
140
140
  this.devices.data = {};
141
141
  this.devices.swap = {};
142
142
  this.distro = new Distro();
143
- this.efi = fs.existsSync('/sys/firmware/efi/efivars');
143
+ this.efi = fs.existsSync('/efivars');
144
144
  this.luksFile = `${this.distro.liveMediumPath}live/${this.luksName}`;
145
145
  }
146
146
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
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": "25.8.28",
5
+ "version": "25.9.2",
6
6
  "author": "Piero Proietti",
7
7
  "bin": {
8
8
  "eggs": "./bin/run.js"
@@ -52,11 +52,11 @@
52
52
  "@types/ws": "^8.18.1",
53
53
  "chai": "^6.0.1",
54
54
  "eslint": "^9.34.0",
55
- "eslint-config-oclif": "^6.0.98",
55
+ "eslint-config-oclif": "^6.0.101",
56
56
  "eslint-config-prettier": "^10.1.8",
57
57
  "glob": "^11.0.3",
58
- "mocha": "^11.7.0",
59
- "oclif": "^4.22.14",
58
+ "mocha": "^11.7.2",
59
+ "oclif": "^4.22.16",
60
60
  "perrisbrewery": "^10",
61
61
  "prettier": "^3.6.2",
62
62
  "shx": "^0.4.0",
@@ -4,9 +4,10 @@
4
4
  # common dependencies
5
5
  common:
6
6
  - coreutils
7
- - cryptsetup
7
+ - cryptsetup
8
8
  - cryptsetup-initramfs
9
9
  - curl # wardrobe
10
+ - dbus-bin | uuidgen-runtime # uuid-runtime per devuan
10
11
  - dosfstools # eggs
11
12
  - dpkg-dev # yolk
12
13
  - git # wardrobe
@@ -14,21 +15,40 @@ common:
14
15
  - live-boot # eggs
15
16
  - live-boot-doc # eggs
16
17
  - live-boot-initramfs-tools # eggs
18
+ - live-config-systemd | live-config-sysvinit
17
19
  - live-tools # eggs
18
20
  - lvm2 # pvdisplay in krill
19
- - nodejs (>= 16)
20
- - live-boot # questo va reinstallato
21
+ - nodejs (>= 16) # bionic
21
22
  - parted
22
- - penguins-bootloaders-pc-amd64
23
23
  - rsync
24
24
  - squashfs-tools
25
25
  - sshfs # eggs
26
26
  - xorriso
27
27
 
28
+ # bootloaders common
29
+ - ipxe
30
+ - pxelinux
31
+
28
32
  # dependencies arch specific
33
+ # arm64: grub-efi-arm64-bin, ipxe, shim-signed, u-boot-tools,
34
+ # amd64: grub-pc-bin, grub-efi-ia32-bin, grub-efi-amd64-bin, syslinux-common, ipxe, isolinux, pxelinux, shim-signed
35
+ # i386: grub-pc-bin, grub-efi-ia32-bin, syslinux-common, ipxe, isolinux, pxelinux
36
+
29
37
  arch:
30
38
  amd64:
31
39
  - grub-efi-amd64-bin
40
+ - isolinux
41
+ - shim-signed
42
+ - syslinux-common
43
+
44
+ i386:
45
+ - grub-pc-bin
46
+ - isolinux
47
+ - grub-efi-ia32-bin
48
+ - syslinux-common
32
49
 
33
50
  arm64:
34
- - syslinux-efi
51
+ - grub-efi-arm64-bin
52
+ - shim-signed
53
+ - u-boot-tools
54
+
@@ -1 +0,0 @@
1
- 05498508d7860a84a12a8c8c7aaa9680c6c6743d74b534b6069fafe6bfd46b6f penguins-eggs_25.8.28-1_amd64.deb
@@ -1 +0,0 @@
1
- 1934d71c93cb97c8d7a728e8ae8617594c9baab385fc371d3c420f3f47394005 penguins-eggs_25.8.28-1_arm64.deb
@@ -1 +0,0 @@
1
- c34883fec332c18410b19e7d422b5ab7d9df7a6626a9d449d03a4d12b7c07427 penguins-eggs_25.8.28-1_i386.deb