penguins-eggs 25.11.21 → 25.12.7
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 +53 -41
- package/README.md +80 -36
- package/README.pdf +21575 -3241
- package/addons/eggs/theme/livecd/full.grub.main.cfg +39 -4
- package/addons/eggs/theme/livecd/full.isolinux.main.cfg +47 -4
- package/bin/run.js +11 -0
- package/conf/derivatives.yaml +4 -2
- package/conf/exclude.list.d/var.list +11 -6
- package/dist/appimage/dependency-manager.d.ts +31 -0
- package/dist/appimage/dependency-manager.js +292 -0
- package/dist/appimage/first-run-check.js +3 -3
- package/dist/bin/run.js +11 -0
- package/dist/classes/cli-autologin.js +78 -53
- package/dist/classes/compressors.d.ts +7 -10
- package/dist/classes/compressors.js +44 -31
- package/dist/classes/daddy.js +11 -11
- package/dist/classes/distro.js +2 -2
- package/dist/classes/diversions.js +2 -3
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +4 -0
- package/dist/classes/incubation/fisherman-helper/initcpio.js +14 -4
- package/dist/classes/incubation/fisherman-helper/settings.js +1 -1
- package/dist/classes/incubation/fisherman.js +1 -3
- package/dist/classes/incubation/incubator.js +1 -1
- package/dist/classes/network.d.ts +1 -1
- package/dist/classes/ovary.d/create-xdg-autostart.js +1 -1
- package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -12
- package/dist/classes/ovary.d/edit-live-fs.js +216 -186
- package/dist/classes/ovary.d/fertilization.js +1 -1
- package/dist/classes/ovary.d/make-dot-disk.js +1 -1
- package/dist/classes/ovary.d/produce.js +1 -1
- package/dist/classes/ovary.d/user-create-live.d.ts +4 -10
- package/dist/classes/ovary.d/user-create-live.js +82 -84
- package/dist/classes/ovary.d/users-remove.d.ts +5 -6
- package/dist/classes/ovary.d/users-remove.js +61 -31
- package/dist/classes/ovary.d/xorriso-command.js +1 -5
- package/dist/classes/ovary.d.ts +2 -2
- package/dist/classes/ovary.js +2 -2
- package/dist/classes/pacman.d/alpine.js +2 -2
- package/dist/classes/pacman.d/archlinux.js +2 -2
- package/dist/classes/pacman.d/debian.js +2 -3
- package/dist/classes/pacman.d/fedora.js +2 -3
- package/dist/classes/pacman.d/openmamba.js +2 -3
- package/dist/classes/pacman.d/opensuse.js +2 -3
- package/dist/classes/pacman.d.ts +21 -12
- package/dist/classes/pacman.js +55 -47
- package/dist/classes/pve-live.js +1 -1
- package/dist/classes/settings.js +1 -1
- package/dist/classes/sys-users.d.ts +76 -0
- package/dist/classes/sys-users.js +206 -0
- package/dist/classes/utils.d/kernel.js +3 -3
- package/dist/classes/utils.d.ts +16 -11
- package/dist/classes/utils.js +92 -56
- package/dist/classes/xdg.js +1 -1
- package/dist/classes/yolk.js +2 -4
- package/dist/commands/config.js +3 -14
- package/dist/commands/cuckoo.js +1 -1
- package/dist/commands/export/appimage.js +3 -3
- package/dist/commands/export/pkg.js +3 -3
- package/dist/commands/export/tarballs.js +3 -3
- package/dist/commands/krill.js +1 -1
- package/dist/commands/produce.js +9 -4
- package/dist/commands/{setup.d.ts → setup/install.d.ts} +1 -5
- package/dist/commands/setup/install.js +71 -0
- package/dist/commands/setup/purge.d.ts +17 -0
- package/dist/commands/setup/purge.js +71 -0
- package/dist/commands/tools/yolk.js +1 -1
- package/dist/commands/update.d.ts +15 -0
- package/dist/commands/update.js +74 -7
- package/dist/interfaces/i-exec.d.ts +1 -0
- package/dist/krill/classes/prepare.d/location.js +1 -1
- package/dist/krill/classes/prepare.d/partitions.js +1 -1
- package/dist/krill/classes/prepare.d/users.js +2 -2
- package/dist/krill/classes/prepare.js +5 -5
- package/dist/krill/classes/sequence.d/add_user.d.ts +3 -15
- package/dist/krill/classes/sequence.d/add_user.js +87 -57
- package/dist/krill/classes/sequence.d/change_password.d.ts +5 -7
- package/dist/krill/classes/sequence.d/change_password.js +25 -10
- package/dist/krill/classes/sequence.d/del_live_user.d.ts +5 -7
- package/dist/krill/classes/sequence.d/del_live_user.js +39 -25
- package/dist/krill/classes/sequence.d/fstab.js +1 -1
- package/dist/krill/classes/sequence.d/grubcfg.d.ts +3 -7
- package/dist/krill/classes/sequence.d/grubcfg.js +33 -13
- package/dist/krill/classes/sequence.d/mkfs.js +1 -2
- package/dist/krill/classes/sequence.d/unpackfs.d.ts +2 -4
- package/dist/krill/classes/sequence.d/unpackfs.js +8 -5
- package/dist/krill/classes/sequence.js +2 -3
- package/dist/krill/components/title.js +4 -4
- package/dist/krill/lib/select_installation_device.js +1 -1
- package/dist/krill/lib/select_replaced_partition.js +1 -1
- package/dist/lib/utils.d.ts +51 -19
- package/dist/lib/utils.js +225 -39
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +29 -17
- package/package.json +13 -14
- package/perrisbrewery/template/dependencies.yaml +1 -0
- package/scripts/_eggs +35 -7
- package/scripts/boot-encrypted-root.sh +220 -0
- package/scripts/eggs.bash +2 -1
- package/scripts/mount-encrypted-home.sh +324 -0
- package/dist/appimage/prerequisites.d.ts +0 -34
- package/dist/appimage/prerequisites.js +0 -350
- package/dist/commands/setup.js +0 -90
- package/dracut/create-symlink +0 -71
- package/dracut/dracut-log.txt +0 -3
- package/dracut/export +0 -4
- package/dracut/export-dracut-analysis +0 -51
- package/dracut/export-dracut-log +0 -2
- package/dracut/mkisofs +0 -10
- package/dracut/renew-initramfs +0 -17
- package/dracut/sbin2bin +0 -10
- package/dracut/update-dracut-conf-d +0 -2
- package/dracut/update-dracut-modules +0 -62
- package/scripts/appimage-build.sh +0 -152
- package/scripts/appimage-install.sh +0 -43
|
@@ -1,97 +1,95 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* src/classes/ovary.d/user-create-live.ts
|
|
3
3
|
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* license: MIT
|
|
4
|
+
* * REFACTORED: Uses "The SysUser Master" class.
|
|
5
|
+
* Creates the live user directly in the merged filesystem safely.
|
|
7
6
|
*/
|
|
8
|
-
// packages
|
|
9
7
|
import fs from 'fs';
|
|
10
|
-
import path from '
|
|
11
|
-
import yaml from 'js-yaml';
|
|
12
|
-
// functions
|
|
8
|
+
import path from 'path';
|
|
13
9
|
import { exec } from '../../lib/utils.js';
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* @param verbose
|
|
22
|
-
*/
|
|
23
|
-
export async function userCreateLive() {
|
|
24
|
-
if (this.verbose) {
|
|
25
|
-
console.log('Ovary: userCreateLive');
|
|
10
|
+
import SysUsers from '../sys-users.js';
|
|
11
|
+
export default async function userCreateLive() {
|
|
12
|
+
// Target: la directory "merged" dell'overlayfs
|
|
13
|
+
let target = this.settings.work_dir.merged;
|
|
14
|
+
if (!target || !fs.existsSync(target)) {
|
|
15
|
+
console.error(`SysUsers Error: Target directory not found at: ${target}`);
|
|
16
|
+
return;
|
|
26
17
|
}
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (fs.existsSync('/
|
|
38
|
-
|
|
18
|
+
const familyId = this.distro?.familyId || this.familyId;
|
|
19
|
+
console.log(`Creating LIVE user in snapshot at ${target} (Family: ${familyId})...`);
|
|
20
|
+
// 1. CARICAMENTO CONFIGURAZIONE ESISTENTE
|
|
21
|
+
const sysUsers = new SysUsers(target, familyId);
|
|
22
|
+
sysUsers.load();
|
|
23
|
+
// 2. DEFINIZIONE UTENTE LIVE
|
|
24
|
+
const username = this.settings.config.user_opt || 'live';
|
|
25
|
+
const password = 'evolution'; // Password default live
|
|
26
|
+
// Shell detection
|
|
27
|
+
let shell = '/bin/bash';
|
|
28
|
+
if (!fs.existsSync(path.join(target, 'bin/bash')) && fs.existsSync(path.join(target, 'bin/ash'))) {
|
|
29
|
+
shell = '/bin/ash';
|
|
39
30
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
case 'debian': {
|
|
58
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
case 'fedora': {
|
|
62
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
case 'openmamba': {
|
|
66
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sysadmin ${this.settings.config.user_opt}`, this.verbose));
|
|
67
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG autologin ${this.settings.config.user_opt}`, this.verbose));
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
case 'opensuse': {
|
|
71
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
// No default
|
|
31
|
+
const liveUser = {
|
|
32
|
+
username: username,
|
|
33
|
+
password: 'x',
|
|
34
|
+
uid: '1000', // Live user è sempre 1000
|
|
35
|
+
gid: '1000',
|
|
36
|
+
gecos: 'Live User,,,',
|
|
37
|
+
home: `/home/${username}`,
|
|
38
|
+
shell: shell
|
|
39
|
+
};
|
|
40
|
+
// 3. CREAZIONE LOGICA (IN MEMORIA)
|
|
41
|
+
// Rimuove eventuali residui precedenti e aggiunge il nuovo
|
|
42
|
+
sysUsers.addUser(liveUser, password);
|
|
43
|
+
// Aggiungi ai gruppi amministrativi
|
|
44
|
+
let adminGroup = 'wheel';
|
|
45
|
+
if (['debian', 'ubuntu', 'linuxmint', 'pop', 'neon'].includes(familyId)) {
|
|
46
|
+
adminGroup = 'sudo';
|
|
75
47
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
let usersConf = '/etc/calamares/modules/users.conf';
|
|
80
|
-
if (!fs.existsSync(usersConf)) {
|
|
81
|
-
usersConf = '/etc/penguins-eggs.d/krill/modules/users.conf';
|
|
48
|
+
else if (familyId === 'openmamba') {
|
|
49
|
+
adminGroup = 'sysadmin';
|
|
82
50
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
51
|
+
sysUsers.addUserToGroup(username, adminGroup);
|
|
52
|
+
// GRUPPO AUTOLOGIN (Fondamentale per la live!)
|
|
53
|
+
// Creiamo il gruppo se non esiste (logica semplificata: lo aggiungiamo a sysUsers se manca?)
|
|
54
|
+
// SysUsers.addUserToGroup fallisce silenziosamente se il gruppo non c'è.
|
|
55
|
+
// Per sicurezza su Fedora/Arch, autologin di solito esiste o va creato.
|
|
56
|
+
// Proviamo ad aggiungerlo:
|
|
57
|
+
sysUsers.addUserToGroup(username, 'autologin'); // <--- PUNTO E VIRGOLA FONDAMENTALE QUI!
|
|
58
|
+
// Aggiungiamo anche ai gruppi standard audio/video/network se esistono
|
|
59
|
+
['video', 'audio', 'network', 'input', 'lp', 'storage', 'optical'].forEach(grp => {
|
|
60
|
+
sysUsers.addUserToGroup(username, grp);
|
|
61
|
+
});
|
|
62
|
+
// 4. SALVATAGGIO ATOMICO SU DISCO
|
|
63
|
+
await sysUsers.save();
|
|
64
|
+
// 5. CREAZIONE FISICA HOME DIRECTORY
|
|
65
|
+
const homeDir = path.join(target, 'home', username);
|
|
66
|
+
// Cleanup
|
|
67
|
+
if (fs.existsSync(homeDir))
|
|
68
|
+
await exec(`rm -rf ${homeDir}`, this.echo);
|
|
69
|
+
// Scheletro (/etc/skel)
|
|
70
|
+
const skelPath = path.join(target, 'etc', 'skel');
|
|
71
|
+
if (fs.existsSync(skelPath)) {
|
|
72
|
+
await exec(`mkdir -p ${homeDir}`, this.echo);
|
|
73
|
+
await exec(`cp -rT ${skelPath} ${homeDir}`, this.echo);
|
|
92
74
|
}
|
|
93
75
|
else {
|
|
94
|
-
|
|
95
|
-
|
|
76
|
+
await exec(`mkdir -p ${homeDir}`, this.echo);
|
|
77
|
+
}
|
|
78
|
+
// Permessi
|
|
79
|
+
await exec(`chown -R 1000:1000 ${homeDir}`, this.echo);
|
|
80
|
+
// Per la live va bene anche 755, ma 700 è più sicuro. Lasciamo standard.
|
|
81
|
+
await exec(`chmod 755 ${homeDir}`, this.echo);
|
|
82
|
+
// 6. FIX SELINUX SPECIFICO PER HOME LIVE
|
|
83
|
+
if (['fedora', 'rhel', 'centos', 'almalinux', 'rocky'].includes(familyId)) {
|
|
84
|
+
try {
|
|
85
|
+
await exec(`chcon -R -t user_home_t ${homeDir}`, { echo: false }).catch(() => { });
|
|
86
|
+
// Nota: .autorelabel nella root della live potrebbe rallentare il boot,
|
|
87
|
+
// ma è meglio averlo se i contesti sono dubbi.
|
|
88
|
+
// await exec(`touch ${target}/.autorelabel`, { echo: false })
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
console.error('SELinux home fix warning:', e);
|
|
92
|
+
}
|
|
96
93
|
}
|
|
94
|
+
console.log(`Live user '${username}' created successfully via SysUser Master.`);
|
|
97
95
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* src/classes/ovary.d/users-remove.ts
|
|
3
3
|
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* license: MIT
|
|
4
|
+
* * REFACTORED: Uses "The SysUser Master" class.
|
|
5
|
+
* Cleans up host users from the ISO filesystem safely.
|
|
7
6
|
*/
|
|
8
|
-
import Ovary from '
|
|
9
|
-
export
|
|
7
|
+
import Ovary from '../ovary.js';
|
|
8
|
+
export default function usersRemove(this: Ovary): Promise<void>;
|
|
@@ -1,38 +1,68 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* src/classes/ovary.d/users-remove.ts
|
|
3
3
|
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* license: MIT
|
|
4
|
+
* * REFACTORED: Uses "The SysUser Master" class.
|
|
5
|
+
* Cleans up host users from the ISO filesystem safely.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
import path from '
|
|
10
|
-
// backup
|
|
11
|
-
// interfaces
|
|
12
|
-
// libraries
|
|
7
|
+
import fs from 'fs';
|
|
8
|
+
import path from 'path';
|
|
13
9
|
import { exec } from '../../lib/utils.js';
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
import SysUsers from '../sys-users.js';
|
|
11
|
+
export default async function usersRemove() {
|
|
12
|
+
// Il target corretto in Ovary è la directory "merged" dell'overlayfs
|
|
13
|
+
let target = this.settings.work_dir.merged;
|
|
14
|
+
// Assicuriamoci che il target esista per sicurezza
|
|
15
|
+
if (!target || !fs.existsSync(target)) {
|
|
16
|
+
console.error(`SysUsers Error: Merged target directory not found at: ${target}`);
|
|
17
|
+
return;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
// Nota: verifica se in Ovary hai 'this.familyId' diretto o 'this.distro.familyId'.
|
|
20
|
+
// Solitamente è this.distro.familyId, ma se hai un getter va bene così.
|
|
21
|
+
const familyId = this.distro?.familyId || this.familyId;
|
|
22
|
+
console.log(`Cleaning host users from ISO snapshot at ${target} (Family: ${familyId})...`);
|
|
23
|
+
// 2. CARICAMENTO CONFIGURAZIONE
|
|
24
|
+
const sysUsers = new SysUsers(target, familyId);
|
|
25
|
+
sysUsers.load();
|
|
26
|
+
// 3. IDENTIFICAZIONE UTENTI DA RIMUOVERE
|
|
27
|
+
// Dobbiamo leggere il file passwd raw per decidere chi rimuovere
|
|
28
|
+
// (rimuoviamo UID >= 1000 tranne 'nobody' e 'root')
|
|
29
|
+
const usersToDelete = [];
|
|
30
|
+
const passwdPath = path.join(target, 'etc/passwd');
|
|
31
|
+
if (fs.existsSync(passwdPath)) {
|
|
32
|
+
const lines = fs.readFileSync(passwdPath, 'utf8').split('\n');
|
|
33
|
+
for (const line of lines) {
|
|
34
|
+
const parts = line.split(':');
|
|
35
|
+
if (parts.length > 2) {
|
|
36
|
+
const uid = parseInt(parts[2]);
|
|
37
|
+
const username = parts[0];
|
|
38
|
+
// Logica di rimozione standard di eggs
|
|
39
|
+
if (uid >= 1000 && username !== 'nobody') {
|
|
40
|
+
usersToDelete.push(username);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// 4. ESECUZIONE RIMOZIONE (IN MEMORIA)
|
|
46
|
+
for (const username of usersToDelete) {
|
|
47
|
+
console.log(`- Removing user: ${username}`);
|
|
48
|
+
sysUsers.removeUser(username);
|
|
49
|
+
// Pulizia File Fisici (Home, Mail) - Operazioni FS dirette
|
|
50
|
+
const homeDir = path.join(target, 'home', username);
|
|
51
|
+
if (fs.existsSync(homeDir)) {
|
|
52
|
+
await exec(`rm -rf ${homeDir}`, this.echo);
|
|
53
|
+
}
|
|
54
|
+
const mailFile = path.join(target, 'var/mail', username);
|
|
55
|
+
if (fs.existsSync(mailFile)) {
|
|
56
|
+
fs.unlinkSync(mailFile);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// 5. SALVATAGGIO ATOMICO SU DISCO
|
|
60
|
+
if (usersToDelete.length > 0) {
|
|
61
|
+
// Scrive passwd, shadow, group, gshadow, subuid... e ripara SELinux
|
|
62
|
+
await sysUsers.save();
|
|
63
|
+
console.log("User cleanup completed via SysUsers Master.");
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
console.log("No users needed to be removed.");
|
|
37
67
|
}
|
|
38
68
|
}
|
|
@@ -38,13 +38,9 @@ export async function xorrisoCommand(clone = false, homecrypt = false, fullcrypt
|
|
|
38
38
|
}
|
|
39
39
|
// postfix (data)
|
|
40
40
|
const postfix = Utils.getPostfix();
|
|
41
|
-
console.log('prefix:', prefix);
|
|
42
|
-
console.log('prefix:', this.volid);
|
|
43
|
-
console.log('arch:', Utils.uefiArch());
|
|
44
|
-
console.log('typology:', typology);
|
|
45
41
|
console.log('postfix:', postfix);
|
|
46
42
|
this.settings.isoFilename = prefix + this.volid + '_' + Utils.uefiArch() + typology + postfix;
|
|
47
|
-
|
|
43
|
+
console.log('isoFilename:', this.settings.isoFilename);
|
|
48
44
|
const output = this.settings.config.snapshot_mnt + this.settings.isoFilename;
|
|
49
45
|
let command = '';
|
|
50
46
|
// const appid = `-appid "${this.settings.distro.distroId}" `
|
package/dist/classes/ovary.d.ts
CHANGED
|
@@ -21,9 +21,9 @@ import { createXdgAutostart } from './ovary.d/create-xdg-autostart.js';
|
|
|
21
21
|
import { copied, merged, mergedAndOverlay } from './ovary.d/merged.js';
|
|
22
22
|
import { makeIso } from './ovary.d/make-iso.js';
|
|
23
23
|
import { initrdAlpine, initrdArch, initrdDebian, initrdDracut } from './ovary.d/initrd.js';
|
|
24
|
-
import
|
|
24
|
+
import userCreateLive from './ovary.d/user-create-live.js';
|
|
25
25
|
import { syslinux } from './ovary.d/syslinux.js';
|
|
26
|
-
import
|
|
26
|
+
import usersRemove from './ovary.d/users-remove.js';
|
|
27
27
|
import { makeDotDisk } from './ovary.d/make-dot-disk.js';
|
|
28
28
|
import { kernelCopy } from './ovary.d/kernel-copy.js';
|
|
29
29
|
import { liveCreateStructure } from './ovary.d/live-create-structure.js';
|
package/dist/classes/ovary.js
CHANGED
|
@@ -22,9 +22,9 @@ import { createXdgAutostart } from './ovary.d/create-xdg-autostart.js';
|
|
|
22
22
|
import { copied, merged, mergedAndOverlay } from './ovary.d/merged.js';
|
|
23
23
|
import { makeIso } from './ovary.d/make-iso.js';
|
|
24
24
|
import { initrdAlpine, initrdArch, initrdDebian, initrdDracut } from './ovary.d/initrd.js';
|
|
25
|
-
import
|
|
25
|
+
import userCreateLive from './ovary.d/user-create-live.js';
|
|
26
26
|
import { syslinux } from './ovary.d/syslinux.js';
|
|
27
|
-
import
|
|
27
|
+
import usersRemove from './ovary.d/users-remove.js';
|
|
28
28
|
import { makeDotDisk } from './ovary.d/make-dot-disk.js';
|
|
29
29
|
import { kernelCopy } from './ovary.d/kernel-copy.js';
|
|
30
30
|
import { liveCreateStructure } from './ovary.d/live-create-structure.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
|
-
import shx from '
|
|
8
|
+
import { shx } from '../../lib/utils.js';
|
|
9
9
|
import { exec } from '../../lib/utils.js';
|
|
10
10
|
import Utils from '../utils.js';
|
|
11
11
|
/**
|
|
@@ -131,7 +131,7 @@ export default class Alpine {
|
|
|
131
131
|
*/
|
|
132
132
|
static async packageInstall(packageName) {
|
|
133
133
|
let retVal = false;
|
|
134
|
-
if (shx.exec(
|
|
134
|
+
if (shx.exec('/sbin/apk add ' + packageName, { silent: true }).code === 0) {
|
|
135
135
|
retVal = true;
|
|
136
136
|
}
|
|
137
137
|
return retVal;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
|
-
import shx from '
|
|
9
|
+
import { shx } from '../../lib/utils.js';
|
|
10
10
|
import { exec } from '../../lib/utils.js';
|
|
11
11
|
import Utils from '../utils.js';
|
|
12
12
|
/**
|
|
@@ -77,7 +77,7 @@ export default class Archlinux {
|
|
|
77
77
|
*/
|
|
78
78
|
static async packageInstall(packageName) {
|
|
79
79
|
let retVal = false;
|
|
80
|
-
if (shx.exec(
|
|
80
|
+
if (shx.exec('/usr/bin/pacman -Si ' + packageName, { silent: true }).code === 0) {
|
|
81
81
|
retVal = true;
|
|
82
82
|
}
|
|
83
83
|
return retVal;
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
|
-
import shx from '
|
|
10
|
-
import { exec } from '../../lib/utils.js';
|
|
9
|
+
import { exec, shx } from '../../lib/utils.js';
|
|
11
10
|
import Utils from '../utils.js';
|
|
12
11
|
/**
|
|
13
12
|
* Debian
|
|
@@ -116,7 +115,7 @@ export default class Debian {
|
|
|
116
115
|
*/
|
|
117
116
|
static async packageInstall(packageName) {
|
|
118
117
|
let retVal = false;
|
|
119
|
-
if (shx.exec(
|
|
118
|
+
if (shx.exec('/usr/bin/apt-get install -y ' + packageName, { silent: true }).code === 0) {
|
|
120
119
|
retVal = true;
|
|
121
120
|
}
|
|
122
121
|
return retVal;
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
|
-
import shx from '
|
|
10
|
-
import { exec } from '../../lib/utils.js';
|
|
9
|
+
import { exec, shx } from '../../lib/utils.js';
|
|
11
10
|
import Utils from '../utils.js';
|
|
12
11
|
/**
|
|
13
12
|
* Utils: general porpourse utils
|
|
@@ -86,7 +85,7 @@ export default class Fedora {
|
|
|
86
85
|
*/
|
|
87
86
|
static async packageInstall(packageName) {
|
|
88
87
|
let retVal = false;
|
|
89
|
-
if (shx.exec(
|
|
88
|
+
if (shx.exec('/usr/bin/dnf install ' + packageName, { silent: true }).code === 0) {
|
|
90
89
|
retVal = true;
|
|
91
90
|
}
|
|
92
91
|
return retVal;
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
|
-
import shx from '
|
|
10
|
-
import { exec } from '../../lib/utils.js';
|
|
9
|
+
import { exec, shx } from '../../lib/utils.js';
|
|
11
10
|
import Utils from '../utils.js';
|
|
12
11
|
/**
|
|
13
12
|
* Utils: general porpourse utils
|
|
@@ -85,7 +84,7 @@ export default class Openmamba {
|
|
|
85
84
|
*/
|
|
86
85
|
static async packageInstall(packageName) {
|
|
87
86
|
let retVal = false;
|
|
88
|
-
if (shx.exec(
|
|
87
|
+
if (shx.exec('/usr/bin/dnf install ' + packageName, { silent: false }).code === 0) {
|
|
89
88
|
retVal = true;
|
|
90
89
|
}
|
|
91
90
|
return retVal;
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
8
|
import fs from 'node:fs';
|
|
9
|
-
import shx from '
|
|
10
|
-
import { exec } from '../../lib/utils.js';
|
|
9
|
+
import { exec, shx } from '../../lib/utils.js';
|
|
11
10
|
import Utils from '../utils.js';
|
|
12
11
|
/**
|
|
13
12
|
* Utils: general porpourse utils
|
|
@@ -88,7 +87,7 @@ export default class Opensuse {
|
|
|
88
87
|
*/
|
|
89
88
|
static async packageInstall(packageName) {
|
|
90
89
|
let retVal = false;
|
|
91
|
-
if (shx.exec(
|
|
90
|
+
if (shx.exec('/usr/bin/zypper install ' + packageName, { silent: true }).code === 0) {
|
|
92
91
|
retVal = true;
|
|
93
92
|
}
|
|
94
93
|
return retVal;
|
package/dist/classes/pacman.d.ts
CHANGED
|
@@ -15,10 +15,15 @@ export default class Pacman {
|
|
|
15
15
|
distro: IDistro;
|
|
16
16
|
remix: IRemix;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* autocompleteInstall()
|
|
19
|
+
* @param verbose
|
|
20
|
+
*/
|
|
21
|
+
static autocompleteInstall(): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* autocompleteRemove
|
|
19
24
|
* @param verbose
|
|
20
25
|
*/
|
|
21
|
-
static
|
|
26
|
+
static autocompleteRemove(verbose?: boolean): Promise<void>;
|
|
22
27
|
/**
|
|
23
28
|
* return true if calamares is installed
|
|
24
29
|
*/
|
|
@@ -35,11 +40,6 @@ export default class Pacman {
|
|
|
35
40
|
*
|
|
36
41
|
*/
|
|
37
42
|
static calamaresRemove(verbose?: boolean): Promise<boolean>;
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @param cmd
|
|
41
|
-
*/
|
|
42
|
-
static commandIsInstalled(cmd: string): boolean;
|
|
43
43
|
/**
|
|
44
44
|
* Restituisce VERO se i file di configurazione SONO presenti
|
|
45
45
|
*/
|
|
@@ -52,14 +52,14 @@ export default class Pacman {
|
|
|
52
52
|
* Creazione del file di configurazione /etc/penguins-eggs
|
|
53
53
|
*/
|
|
54
54
|
static configurationInstall(links?: boolean, verbose?: boolean): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* Ritorna vero se machine-id è uguale
|
|
57
|
-
*/
|
|
58
|
-
static configurationMachineNew(verbose?: boolean): Promise<boolean>;
|
|
59
55
|
/**
|
|
60
56
|
* Rimozione dei file di configurazione
|
|
61
57
|
*/
|
|
62
58
|
static configurationRemove(verbose?: boolean): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Ritorna vero se machine-id è uguale
|
|
61
|
+
*/
|
|
62
|
+
static configurationMachineNew(verbose?: boolean): Promise<boolean>;
|
|
63
63
|
/**
|
|
64
64
|
*
|
|
65
65
|
* @returns
|
|
@@ -117,7 +117,11 @@ export default class Pacman {
|
|
|
117
117
|
/**
|
|
118
118
|
* Installa manPage
|
|
119
119
|
*/
|
|
120
|
-
static
|
|
120
|
+
static manpageInstall(): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* manpageRemove
|
|
123
|
+
*/
|
|
124
|
+
static manpageRemove(): Promise<void>;
|
|
121
125
|
/**
|
|
122
126
|
*
|
|
123
127
|
* @param debPackage
|
|
@@ -135,5 +139,10 @@ export default class Pacman {
|
|
|
135
139
|
* @param debPackage
|
|
136
140
|
*/
|
|
137
141
|
static packageIsInstalled(packageName: string): boolean;
|
|
142
|
+
/**
|
|
143
|
+
*
|
|
144
|
+
* @param packageNpm
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
138
147
|
static packageNpmLast(packageNpm?: string): Promise<string>;
|
|
139
148
|
}
|