penguins-eggs 25.12.15 → 26.1.3
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 +192 -192
- package/README.md +109 -489
- package/README.pdf +3174 -19913
- package/addons/eggs/theme/applications/install-system.desktop +3 -9
- package/assets/calamares/install-system.sh +23 -22
- package/assets/penguins-krill.desktop +5 -23
- package/dist/classes/distro.js +2 -1
- package/dist/classes/incubation/incubator.js +21 -8
- package/dist/classes/ovary.d/create-xdg-autostart.d.ts +3 -3
- package/dist/classes/ovary.d/create-xdg-autostart.js +139 -149
- package/dist/classes/ovary.d/luks-home-support-systemd.d.ts +12 -0
- package/dist/classes/ovary.d/luks-home-support-systemd.js +70 -0
- package/dist/classes/ovary.d/luks-home-support.d.ts +1 -0
- package/dist/classes/ovary.d/luks-home-support.js +101 -24
- package/dist/classes/ovary.d/produce.js +2 -2
- package/dist/classes/ovary.d/user-create-live.js +6 -1
- package/dist/classes/ovary.d/xorriso-command.js +11 -21
- package/dist/classes/utils.js +3 -0
- package/dist/classes/xdg.d.ts +6 -1
- package/dist/classes/xdg.js +119 -108
- package/dist/commands/export/appimage.js +2 -1
- package/dist/commands/export/pkg.js +16 -8
- package/dist/commands/update.js +1 -1
- package/dist/krill/classes/prepare.d/users.js +6 -6
- package/dist/krill/classes/prepare.js +6 -2
- package/dist/krill/classes/sequence.d/remove-homecrypt-hack.d.ts +13 -0
- package/dist/krill/classes/sequence.d/remove-homecrypt-hack.js +65 -0
- package/dist/krill/classes/sequence.d.ts +2 -0
- package/dist/krill/classes/sequence.js +7 -2
- package/dist/krill/components/users.js +4 -4
- package/dist/krill/lib/get_userfullname.js +1 -1
- package/dist/krill/lib/get_username.js +3 -3
- package/package.json +16 -15
- package/perrisbrewery/template/dependencies.yaml +3 -0
|
@@ -18,14 +18,11 @@ import { shx } from '../../../lib/utils.js';
|
|
|
18
18
|
* USERS
|
|
19
19
|
*/
|
|
20
20
|
export async function users() {
|
|
21
|
+
let fullname = this.krillConfig.fullname;
|
|
21
22
|
let username = this.krillConfig.name;
|
|
22
23
|
if (username === '' || username === undefined) {
|
|
23
24
|
username = 'artisan';
|
|
24
25
|
}
|
|
25
|
-
let fullname = this.krillConfig.fullname;
|
|
26
|
-
if (fullname === '' || fullname === undefined) {
|
|
27
|
-
fullname = username;
|
|
28
|
-
}
|
|
29
26
|
let password = this.krillConfig.password;
|
|
30
27
|
if (password === '' || password === undefined) {
|
|
31
28
|
password = 'evolution';
|
|
@@ -38,7 +35,7 @@ export async function users() {
|
|
|
38
35
|
if (hostname === '' || hostname === undefined) {
|
|
39
36
|
hostname = shx.exec('cat /etc/hostname', { silent: true }).stdout.trim();
|
|
40
37
|
}
|
|
41
|
-
let autologin =
|
|
38
|
+
let autologin = false;
|
|
42
39
|
let sameUserPassword = true;
|
|
43
40
|
let usersElem;
|
|
44
41
|
while (true) {
|
|
@@ -46,11 +43,14 @@ export async function users() {
|
|
|
46
43
|
if (await confirm(usersElem, "Confirm Users datas?")) {
|
|
47
44
|
break;
|
|
48
45
|
}
|
|
49
|
-
username = await getUsername(username);
|
|
50
46
|
fullname = await getUserfullname(fullname);
|
|
47
|
+
if (fullname !== '')
|
|
48
|
+
username = fullname.trim().split(' ')[0].toLowerCase();
|
|
49
|
+
username = await getUsername(username);
|
|
51
50
|
password = await getPassword(username, password);
|
|
52
51
|
rootPassword = await getPassword('root', password);
|
|
53
52
|
hostname = await getHostname(hostname);
|
|
53
|
+
autologin = autologin;
|
|
54
54
|
}
|
|
55
55
|
return {
|
|
56
56
|
username: username,
|
|
@@ -231,11 +231,15 @@ export default class Krill {
|
|
|
231
231
|
oPartitions.installationMode = InstallationMode.Luks;
|
|
232
232
|
// Set default installation device if empty
|
|
233
233
|
if (oPartitions.installationDevice === '') {
|
|
234
|
-
const
|
|
234
|
+
const cmd = `lsblk -d -n -p -o NAME,RM,RO,TYPE | awk '$2 == 0 && $3 == 0 && $4 == "disk" {print $1}'`;
|
|
235
|
+
const result = shx.exec(cmd, { silent: true }).stdout.trim();
|
|
236
|
+
const drives = result ? result.split('\n') : [];
|
|
235
237
|
if (drives.length > 0) {
|
|
236
|
-
oPartitions.installationDevice =
|
|
238
|
+
oPartitions.installationDevice = drives[0];
|
|
237
239
|
}
|
|
238
240
|
else {
|
|
241
|
+
console.error("[Krll] No suitable disc found for installation. Debug info:");
|
|
242
|
+
shx.exec('lsblk -o NAME,RM,RO,TYPE,SIZE,MODEL', { silent: false });
|
|
239
243
|
throw new Error("Unable to find installation drive");
|
|
240
244
|
}
|
|
241
245
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/krill/modules/remove-installer-link.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / 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
|
+
* removeHomecryptHack
|
|
12
|
+
*/
|
|
13
|
+
export default function removeHomecryptHack(this: Sequence): Promise<void>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/krill/modules/remove-installer-link.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / 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 path from 'path';
|
|
11
|
+
/**
|
|
12
|
+
* removeHomecryptHack
|
|
13
|
+
*/
|
|
14
|
+
export default async function removeHomecryptHack() {
|
|
15
|
+
const targetRoot = this.installTarget;
|
|
16
|
+
// -------------------------------------------------------
|
|
17
|
+
// 1. PULIZIA SYSVINIT (Critica per il boot)
|
|
18
|
+
// -------------------------------------------------------
|
|
19
|
+
const inittabPath = path.join(targetRoot, 'etc/inittab');
|
|
20
|
+
if (fs.existsSync(inittabPath)) {
|
|
21
|
+
let content = fs.readFileSync(inittabPath, 'utf8');
|
|
22
|
+
// Cerca la riga modificata dal nostro hack
|
|
23
|
+
const hackRegex = /^1:.*tty1-unlock-wrapper\.sh.*$/m;
|
|
24
|
+
// Ripristina la riga standard (adatta questa stringa se usi parametri diversi per agetty)
|
|
25
|
+
const standardLine = '1:2345:respawn:/sbin/agetty --noclear tty1 linux';
|
|
26
|
+
if (hackRegex.test(content)) {
|
|
27
|
+
content = content.replace(hackRegex, standardLine);
|
|
28
|
+
fs.writeFileSync(inittabPath, content);
|
|
29
|
+
// console.log('- Restored standard inittab entry')
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// -------------------------------------------------------
|
|
33
|
+
// 2. PULIZIA SYSTEMD (Cosmetica / Best Practice)
|
|
34
|
+
// -------------------------------------------------------
|
|
35
|
+
// Anche se non rompe il boot, rimuoviamo i file inutili
|
|
36
|
+
const systemdFiles = [
|
|
37
|
+
'etc/systemd/system/mount-encrypted-home.service',
|
|
38
|
+
'etc/systemd/system/local-fs.target.wants/mount-encrypted-home.service'
|
|
39
|
+
];
|
|
40
|
+
systemdFiles.forEach(fileRelPath => {
|
|
41
|
+
const fullPath = path.join(targetRoot, fileRelPath);
|
|
42
|
+
if (fs.existsSync(fullPath)) {
|
|
43
|
+
try {
|
|
44
|
+
fs.unlinkSync(fullPath);
|
|
45
|
+
}
|
|
46
|
+
catch (e) { /* ignore */ }
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
// -------------------------------------------------------
|
|
50
|
+
// 3. RIMOZIONE SCRIPT COMUNI
|
|
51
|
+
// -------------------------------------------------------
|
|
52
|
+
const scriptFiles = [
|
|
53
|
+
'usr/local/bin/tty1-unlock-wrapper.sh',
|
|
54
|
+
'usr/local/bin/mount-encrypted-home.sh'
|
|
55
|
+
];
|
|
56
|
+
scriptFiles.forEach(fileRelPath => {
|
|
57
|
+
const fullPath = path.join(targetRoot, fileRelPath);
|
|
58
|
+
if (fs.existsSync(fullPath)) {
|
|
59
|
+
try {
|
|
60
|
+
fs.unlinkSync(fullPath);
|
|
61
|
+
}
|
|
62
|
+
catch (e) { /* ignore */ }
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -32,6 +32,7 @@ import grubcfg from './sequence.d/grubcfg.js';
|
|
|
32
32
|
import bootloader from './sequence.d/bootloader.js';
|
|
33
33
|
import packages from './sequence.d/packages.js';
|
|
34
34
|
import removeInstallerLink from './sequence.d/remove_installer_link.js';
|
|
35
|
+
import removeHomecryptHack from './sequence.d/remove-homecrypt-hack.js';
|
|
35
36
|
import initramfsCfg from './sequence.d/initramfs_cfg.js';
|
|
36
37
|
import initramfs from './sequence.d/initramfs.js';
|
|
37
38
|
import delLiveUser from './sequence.d/del_live_user.js';
|
|
@@ -63,6 +64,7 @@ export default class Sequence {
|
|
|
63
64
|
bootloader: typeof bootloader;
|
|
64
65
|
packages: typeof packages;
|
|
65
66
|
removeInstallerLink: typeof removeInstallerLink;
|
|
67
|
+
removeHomecryptHack: typeof removeHomecryptHack;
|
|
66
68
|
initramfsCfg: typeof initramfsCfg;
|
|
67
69
|
initramfs: typeof initramfs;
|
|
68
70
|
delLiveUser: typeof delLiveUser;
|
|
@@ -44,6 +44,7 @@ import grubcfg from './sequence.d/grubcfg.js';
|
|
|
44
44
|
import bootloader from './sequence.d/bootloader.js';
|
|
45
45
|
import packages from './sequence.d/packages.js';
|
|
46
46
|
import removeInstallerLink from './sequence.d/remove_installer_link.js';
|
|
47
|
+
import removeHomecryptHack from './sequence.d/remove-homecrypt-hack.js';
|
|
47
48
|
import initramfsCfg from './sequence.d/initramfs_cfg.js';
|
|
48
49
|
import initramfs from './sequence.d/initramfs.js';
|
|
49
50
|
import delLiveUser from './sequence.d/del_live_user.js';
|
|
@@ -79,6 +80,7 @@ export default class Sequence {
|
|
|
79
80
|
bootloader = bootloader;
|
|
80
81
|
packages = packages;
|
|
81
82
|
removeInstallerLink = removeInstallerLink;
|
|
83
|
+
removeHomecryptHack = removeHomecryptHack;
|
|
82
84
|
initramfsCfg = initramfsCfg;
|
|
83
85
|
initramfs = initramfs;
|
|
84
86
|
delLiveUser = delLiveUser;
|
|
@@ -267,7 +269,7 @@ export default class Sequence {
|
|
|
267
269
|
if (Pacman.isInstalledGui()) {
|
|
268
270
|
await this.executeStep("Autologin GUI", 78, async () => {
|
|
269
271
|
if (this.users.autologin) {
|
|
270
|
-
await Xdg.autologin(
|
|
272
|
+
await Xdg.autologin(this.users.username, this.installTarget);
|
|
271
273
|
if (this.distro.distroLike === 'Arch') {
|
|
272
274
|
await exec(`chroot ${this.installTarget} groupadd autologin ${this.toNull}`);
|
|
273
275
|
await exec(`chroot ${this.installTarget} gpasswd -a ${this.users.username} autologin ${this.toNull}`);
|
|
@@ -300,13 +302,16 @@ export default class Sequence {
|
|
|
300
302
|
let restoreHomeCrypt = path.resolve(__dirname, '../../../scripts/restore_homecrypt_krill.sh');
|
|
301
303
|
await exec(`${restoreHomeCrypt} ${this.cryptedHomeDevice} ${this.installTarget}`);
|
|
302
304
|
});
|
|
305
|
+
await this.executeStep("Remove Homecrypt hack", 91, async () => {
|
|
306
|
+
await this.removeHomecryptHack();
|
|
307
|
+
});
|
|
303
308
|
}
|
|
304
309
|
// 13. Custom final steps
|
|
305
310
|
const cfs = new CFS();
|
|
306
311
|
const steps = await cfs.steps();
|
|
307
312
|
if (steps.length > 0) {
|
|
308
313
|
for (const step of steps) {
|
|
309
|
-
await this.executeStep(`running ${step}`,
|
|
314
|
+
await this.executeStep(`running ${step}`, 92, () => this.execCalamaresModule(step));
|
|
310
315
|
}
|
|
311
316
|
}
|
|
312
317
|
// 14- Handle chroot if requested
|
|
@@ -59,11 +59,11 @@ export default function Users({ username, fullname, password, rootPassword, host
|
|
|
59
59
|
React.createElement(Steps, { step: 5 }),
|
|
60
60
|
React.createElement(Box, { flexDirection: "column" },
|
|
61
61
|
React.createElement(Box, null,
|
|
62
|
-
React.createElement(Text, null, "
|
|
63
|
-
React.createElement(Text, { color: "cyan" }, username)),
|
|
64
|
-
React.createElement(Box, null,
|
|
65
|
-
React.createElement(Text, null, "full username: "),
|
|
62
|
+
React.createElement(Text, null, "fullname : "),
|
|
66
63
|
React.createElement(Text, { color: "cyan" }, fullname)),
|
|
64
|
+
React.createElement(Box, null,
|
|
65
|
+
React.createElement(Text, null, "login : "),
|
|
66
|
+
React.createElement(Text, { color: "cyan" }, username)),
|
|
67
67
|
React.createElement(Box, null,
|
|
68
68
|
React.createElement(Text, null, "user password: "),
|
|
69
69
|
React.createElement(Text, { color: "cyan" }, password)),
|
|
@@ -11,13 +11,13 @@ export default async function getUsername(initial) {
|
|
|
11
11
|
const questions = [
|
|
12
12
|
{
|
|
13
13
|
default: initial,
|
|
14
|
-
message: 'What
|
|
15
|
-
name: '
|
|
14
|
+
message: 'What name you want to use to log in? ',
|
|
15
|
+
name: 'username',
|
|
16
16
|
type: 'input'
|
|
17
17
|
}
|
|
18
18
|
];
|
|
19
19
|
inquirer.prompt(questions).then((options) => {
|
|
20
|
-
resolve(options.
|
|
20
|
+
resolve(options.username);
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
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 Almalinux, Alpine, Arch, Debian, Devuan, Fedora, Manjaro, Opensuse, Ubuntu and derivatives",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "26.1.3",
|
|
6
6
|
"author": "Piero Proietti",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eggs": "./bin/run.js"
|
|
@@ -19,45 +19,45 @@
|
|
|
19
19
|
"bcryptjs": "^3.0.3",
|
|
20
20
|
"chalk": "^5.6.2",
|
|
21
21
|
"cli-cursor": "^5.0.0",
|
|
22
|
+
"cors": "^2.8.5",
|
|
22
23
|
"debug": "^4.4.3",
|
|
23
24
|
"express": "^5.2.1",
|
|
24
|
-
"ink": "^5",
|
|
25
|
+
"ink": "^5.2.1",
|
|
25
26
|
"ink-progress-bar": "^3.0.0",
|
|
26
27
|
"ink-spinner": "^5.0.0",
|
|
27
|
-
"inquirer": "^12.11.
|
|
28
|
+
"inquirer": "^12.11.1",
|
|
28
29
|
"js-yaml": "^4.1.1",
|
|
29
30
|
"mustache": "^4.2.0",
|
|
30
31
|
"netmask": "^2.0.2",
|
|
31
32
|
"react": "^18.3.1",
|
|
32
33
|
"read": "^4.1.0",
|
|
33
|
-
"systeminformation": "^5.
|
|
34
|
+
"systeminformation": "^5.28.10",
|
|
34
35
|
"tftp": "^0.1.2",
|
|
36
|
+
"vite": "^7.3.0",
|
|
35
37
|
"ws": "^8.18.3"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
40
|
"@oclif/prettier-config": "^0.2.1",
|
|
39
41
|
"@oclif/test": "^4.1.15",
|
|
40
|
-
"@types/bcryptjs": "^3.0.0",
|
|
41
42
|
"@types/chai": "^5.2.3",
|
|
42
43
|
"@types/debug": "^4.1.12",
|
|
43
|
-
"@types/glob": "^9.0.0",
|
|
44
44
|
"@types/inquirer": "^9.0.9",
|
|
45
45
|
"@types/js-yaml": "^4.0.9",
|
|
46
|
-
"@types/mocha": "^10.0.
|
|
46
|
+
"@types/mocha": "^10.0.10",
|
|
47
47
|
"@types/mustache": "^4.2.6",
|
|
48
48
|
"@types/netmask": "^2.0.6",
|
|
49
|
-
"@types/node": "^22.
|
|
50
|
-
"@types/react": "^18.3.
|
|
49
|
+
"@types/node": "^22.19.3",
|
|
50
|
+
"@types/react": "^18.3.27",
|
|
51
51
|
"@types/read": "^0.0.32",
|
|
52
52
|
"@types/ws": "^8.18.1",
|
|
53
|
-
"chai": "^6.2.
|
|
54
|
-
"eslint": "^9.39.
|
|
55
|
-
"eslint-config-oclif": "^6.0.
|
|
53
|
+
"chai": "^6.2.2",
|
|
54
|
+
"eslint": "^9.39.2",
|
|
55
|
+
"eslint-config-oclif": "^6.0.128",
|
|
56
56
|
"eslint-config-prettier": "^10.1.8",
|
|
57
57
|
"glob": "^13.0.0",
|
|
58
58
|
"mocha": "^11.7.5",
|
|
59
|
-
"oclif": "^4.22.
|
|
60
|
-
"perrisbrewery": "^
|
|
59
|
+
"oclif": "^4.22.61",
|
|
60
|
+
"perrisbrewery": "^26.1.3",
|
|
61
61
|
"prettier": "^3.7.4",
|
|
62
62
|
"shx": "^0.4.0",
|
|
63
63
|
"ts-node": "10.9.2",
|
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
"tarballs": "shx rm -rf dist && tsc -p . && oclif manifest && oclif pack tarballs -t linux-x64 --no-xz -r . && pb tarballs --release $(cat ./release)",
|
|
123
123
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
124
124
|
"unused": "ts-prune",
|
|
125
|
-
"version": "oclif readme && git add README.md"
|
|
125
|
+
"version": "oclif readme && git add README.md",
|
|
126
|
+
"webui": "sudo ./WebUI/venv/bin/python3 ./WebUI/backend.py"
|
|
126
127
|
}
|
|
127
128
|
}
|