penguins-eggs 25.9.2 → 25.9.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 +1 -1
- package/README.md +47 -45
- package/README.pdf +815 -801
- package/addons/eggs/adapt/applications/eggs-adapt.desktop +0 -0
- package/addons/eggs/pve/applications/eggs-pve.desktop +0 -0
- package/addons/eggs/rsupport/applications/eggs-rsupport.desktop +0 -0
- package/addons/eggs/theme/applications/install-system.desktop +0 -0
- package/assets/calamares/install-system.sh +0 -0
- package/assets/penguins-eggs.desktop +0 -0
- package/assets/penguins-krill.desktop +0 -0
- package/assets/penguins-links-add.desktop +0 -0
- package/assets/penguins-live-installer.desktop +0 -0
- package/bin/dev.js +0 -0
- package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/after-bootloader/after-bootloader.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/before-bootloader/before-bootloader.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/before-bootloader-mkdirs/before-bootloader-mkdirs.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/bug/bug.sh +0 -0
- package/conf/distros/bionic/calamares/calamares-modules/grubcfg/main.py +0 -0
- package/conf/distros/buster/calamares/calamares-modules/cleanup/cleanup.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/dpkg-unsafe-io.sh +0 -0
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +0 -0
- package/conf/distros/fedora/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/openmamba/calamares/modules/users.yml +1 -1
- package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +0 -0
- package/conf/distros/opensuse/calamares/settings.yml +0 -0
- package/conf/distros/opensuse/calamares/zstd2lzo.sh +0 -0
- package/conf/exclude.list.d/master.list +4 -0
- package/conf/init/unattended.sh +0 -0
- package/dist/classes/incubation/incubator.js +5 -1
- package/dist/classes/utils.d/kernel.d.ts +9 -1
- package/dist/classes/utils.d/kernel.js +86 -1
- package/dist/classes/utils.d.ts +2 -1
- package/dist/classes/utils.js +14 -2
- package/dist/commands/export/pkg.js +16 -22
- package/dist/commands/tools/ppa.d.ts +6 -0
- package/dist/commands/tools/ppa.js +73 -26
- package/dist/commands/update.d.ts +2 -7
- package/dist/commands/update.js +102 -91
- package/dist/krill/classes/sequence.d/bootloader.js +24 -10
- package/dist/krill/classes/sequence.d/bootloader_config.js +58 -8
- package/dist/krill/classes/sequence.d/mkfs.js +8 -4
- package/dist/krill/classes/sequence.d/mount_vfs.js +24 -5
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +7 -5
- package/dist/krill/classes/sequence.js +9 -9
- package/dist/penguins-eggs_25.9.7-1_amd64.deb +0 -0
- package/dist/penguins-eggs_25.9.7-1_amd64.deb.sha256 +1 -0
- package/dist/penguins-eggs_25.9.7-1_arm64.deb +0 -0
- package/dist/penguins-eggs_25.9.7-1_arm64.deb.sha256 +1 -0
- package/dist/penguins-eggs_25.9.7-1_i386.deb +0 -0
- package/dist/penguins-eggs_25.9.7-1_i386.deb.sha256 +1 -0
- package/eui/eui-autostart-cinnamon.desktop +0 -0
- package/eui/eui-autostart-xfce.desktop +0 -0
- package/eui/eui-create-image.sh +0 -0
- package/eui/eui-start.sh +0 -0
- package/package.json +131 -125
- package/perrisbrewery/scripts/postinst +0 -0
- package/perrisbrewery/scripts/postrm +0 -0
- package/perrisbrewery/scripts/preinst +0 -0
- package/perrisbrewery/scripts/prerm +0 -0
- package/perrisbrewery/template/dependencies-bionic.yaml +6 -23
- package/pods/almalinux.sh +0 -0
- package/pods/archlinux.sh +0 -0
- package/pods/ci/kernel-overlay-install.sh +0 -0
- package/pods/ci/minimal/almalinux-container2host.sh +0 -0
- package/pods/ci/minimal/archlinux-container2host.sh +0 -0
- package/pods/ci/minimal/debian-container2host.sh +0 -0
- package/pods/ci/minimal/fedora-container2host.sh +0 -0
- package/pods/ci/minimal/manjaro-container2host.sh +0 -0
- package/pods/ci/minimal/opensuse-container2host.sh +0 -0
- package/pods/ci/penguins-eggs-execute.sh +0 -0
- package/pods/ci/penguins-eggs-install.sh +0 -0
- package/pods/ci/run +0 -0
- package/pods/ci/run-on-almalinux.sh +0 -0
- package/pods/ci/run-on-archlinux.sh +0 -0
- package/pods/ci/run-on-debian.sh +0 -0
- package/pods/ci/run-on-devuan.sh +0 -0
- package/pods/ci/run-on-fedora.sh +0 -0
- package/pods/ci/run-on-manjaro.sh +0 -0
- package/pods/ci/run-on-opensuse.sh +0 -0
- package/pods/ci/run-on-rockylinux.sh +0 -0
- package/pods/ci/run-on-ubuntu.sh +0 -0
- package/pods/debian.sh +0 -0
- package/pods/devuan.sh +0 -0
- package/pods/fedora.sh +0 -0
- package/pods/lmde.sh +0 -0
- package/pods/manjaro.sh +0 -0
- package/pods/opensuse.sh +0 -0
- package/pods/podman.command.sh +0 -0
- package/pods/rocky.sh +0 -0
- package/pods/run-build-packages-debs.sh +0 -0
- package/pods/run-create-debs.sh +0 -0
- package/pods/ubuntu.sh +0 -0
- package/scripts/99clean +0 -0
- package/scripts/adapt.sh +0 -0
- package/scripts/bros/waydroid-helper.sh +0 -0
- package/scripts/lsb_release +0 -0
- package/scripts/mom.sh +0 -0
- package/scripts/pve-live.service +0 -0
- package/scripts/pve-live.sh +0 -0
- package/scripts/resy +0 -0
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/bin/dev.js
CHANGED
|
File without changes
|
package/conf/distros/alpine/calamares/calamares-modules/machineid-openrc/machineid-openrc.sh
CHANGED
|
File without changes
|
package/conf/distros/bionic/calamares/calamares-modules/after-bootloader/after-bootloader.sh
CHANGED
|
File without changes
|
package/conf/distros/bionic/calamares/calamares-modules/before-bootloader/before-bootloader.sh
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -60,7 +60,7 @@ defaultGroups:
|
|
|
60
60
|
# Autologin causes a user to become automatically logged in to
|
|
61
61
|
# the desktop environment on boot.
|
|
62
62
|
# Disable when your Distribution does not require such a group.
|
|
63
|
-
autologinGroup: autologin
|
|
63
|
+
# autologinGroup: autologin
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
### ROOT AND SUDO
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/conf/init/unattended.sh
CHANGED
|
File without changes
|
|
@@ -360,8 +360,12 @@ export default class Incubator {
|
|
|
360
360
|
sudoers() {
|
|
361
361
|
let live = 'live';
|
|
362
362
|
let content = `${live} ALL=(ALL) NOPASSWD: /usr/bin/calamares`;
|
|
363
|
+
content = `# ${live} ALL=(ALL) NOPASSWD: /usr/bin/calamares`;
|
|
363
364
|
let fname = '/etc/sudoers.d/calamares';
|
|
364
|
-
|
|
365
|
+
// su bionic fa un macello
|
|
366
|
+
if (this.distro.codenameLikeId !== 'bionic') {
|
|
367
|
+
fs.writeFileSync(fname, content, 'utf-8');
|
|
368
|
+
}
|
|
365
369
|
}
|
|
366
370
|
}
|
|
367
371
|
/**
|
|
@@ -14,13 +14,21 @@ export default class Kernel {
|
|
|
14
14
|
* @returns Path al file vmlinuz
|
|
15
15
|
*/
|
|
16
16
|
static vmlinuz(kernel?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* cerca il path per initramfs/initrd nella directory /boot
|
|
19
|
+
* se fallisce, prova la convenzione Arch
|
|
20
|
+
*
|
|
21
|
+
* @param kernel - Versione del kernel (es. '6.5.0-14-generic'). Se omessa, usa il kernel in esecuzione.
|
|
22
|
+
* @returns Path al file initramfs.
|
|
23
|
+
*/
|
|
24
|
+
static initramfs(kernel?: string): string;
|
|
17
25
|
/**
|
|
18
26
|
* Ricava path per initramfs/initrd
|
|
19
27
|
*
|
|
20
28
|
* @param kernel - Versione del kernel
|
|
21
29
|
* @returns Path al file initramfs
|
|
22
30
|
*/
|
|
23
|
-
static
|
|
31
|
+
static initramfsOld(kernel?: string): string;
|
|
24
32
|
/**
|
|
25
33
|
* ALL PRIVATE
|
|
26
34
|
*/
|
|
@@ -41,13 +41,98 @@ export default class Kernel {
|
|
|
41
41
|
}
|
|
42
42
|
return vmlinuz;
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* cerca il path per initramfs/initrd nella directory /boot
|
|
46
|
+
* se fallisce, prova la convenzione Arch
|
|
47
|
+
*
|
|
48
|
+
* @param kernel - Versione del kernel (es. '6.5.0-14-generic'). Se omessa, usa il kernel in esecuzione.
|
|
49
|
+
* @returns Path al file initramfs.
|
|
50
|
+
*/
|
|
51
|
+
static initramfs(kernel = '') {
|
|
52
|
+
let targetKernel = kernel;
|
|
53
|
+
// 1. Determina la versione del kernel target
|
|
54
|
+
if (targetKernel === '') {
|
|
55
|
+
if (Utils.isContainer()) {
|
|
56
|
+
Utils.warning("Non è possibile determinare il kernel in un container.");
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
targetKernel = execSync('uname -r').toString().trim();
|
|
60
|
+
}
|
|
61
|
+
const kernelVersionShort = targetKernel.split('.').slice(0, 2).join('.');
|
|
62
|
+
const bootDir = '/boot';
|
|
63
|
+
// 2. Leggi tutti i file nella directory /boot
|
|
64
|
+
let bootFiles;
|
|
65
|
+
try {
|
|
66
|
+
bootFiles = fs.readdirSync(bootDir);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
console.error(`ERRORE: Impossibile leggere la directory ${bootDir}.`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
// 3. Cerca il file corrispondente con un sistema di priorità
|
|
73
|
+
const candidates = [];
|
|
74
|
+
for (const filename of bootFiles) {
|
|
75
|
+
if ((filename.startsWith('initramfs-') ||
|
|
76
|
+
filename.startsWith('initrd.img-') ||
|
|
77
|
+
filename.startsWith('initrd-')) &&
|
|
78
|
+
(filename.includes(targetKernel) || filename.includes(kernelVersionShort))) {
|
|
79
|
+
candidates.push(filename);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Se troviamo almeno un candidato, usiamo quello
|
|
83
|
+
if (candidates.length > 0) {
|
|
84
|
+
let foundPath = path.join(bootDir, candidates[0]);
|
|
85
|
+
/**
|
|
86
|
+
* ma, se sono più di uno, usiamo il più breve
|
|
87
|
+
* per evitare estensioni come -fallback.img, .old, .bak, etc
|
|
88
|
+
*/
|
|
89
|
+
if (candidates.length > 1) {
|
|
90
|
+
// Filtra i candidati per escludere quelli di fallback se esiste un'alternativa
|
|
91
|
+
const nonFallbackCandidates = candidates.filter(c => !c.includes('-fallback'));
|
|
92
|
+
const searchArray = nonFallbackCandidates.length > 0 ? nonFallbackCandidates : candidates;
|
|
93
|
+
foundPath = path.join(bootDir, searchArray[0]); // Inizia con il primo
|
|
94
|
+
for (const candidate of searchArray) {
|
|
95
|
+
const current = path.join(bootDir, candidate);
|
|
96
|
+
if (current.length < foundPath.length) {
|
|
97
|
+
foundPath = current;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return foundPath;
|
|
102
|
+
}
|
|
103
|
+
// 4. Fallback per casi specifici (Arch e Alpine Linux)
|
|
104
|
+
// Questo viene eseguito solo se la ricerca dinamica fallisce.
|
|
105
|
+
const staticFallbacks = [
|
|
106
|
+
// --- Alpine Linux ---
|
|
107
|
+
'initramfs-lts', // Kernel Long-Term Support
|
|
108
|
+
'initramfs-virt', // Kernel per ambienti virtualizzati
|
|
109
|
+
'initramfs-standard', // Kernel standard (meno comune)
|
|
110
|
+
'initramfs-rpi', // Kernel per Raspberry Pi
|
|
111
|
+
// --- Arch Linux ---
|
|
112
|
+
'initramfs-linux.img', // Arch Linux standard
|
|
113
|
+
'initramfs-linux-lts.img', // Arch Linux LTS
|
|
114
|
+
'initramfs-linux-zen.img', // Arch Linux Zen
|
|
115
|
+
'initramfs-linux-hardened.img', // Arch Linux hardened
|
|
116
|
+
];
|
|
117
|
+
for (const fallback of staticFallbacks) {
|
|
118
|
+
const fallbackPath = path.join(bootDir, fallback);
|
|
119
|
+
if (fs.existsSync(fallbackPath)) {
|
|
120
|
+
// Nota: questo potrebbe non corrispondere al 100% al kernel in esecuzione,
|
|
121
|
+
// ma è il comportamento atteso su questi sistemi
|
|
122
|
+
return fallbackPath;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// 5. Se nessuna delle strategie ha funzionato, esci con errore
|
|
126
|
+
Utils.warning(`Could not find an initramfs file for kernel ${targetKernel} in ${bootDir}.`);
|
|
127
|
+
process.exit(1);
|
|
128
|
+
}
|
|
44
129
|
/**
|
|
45
130
|
* Ricava path per initramfs/initrd
|
|
46
131
|
*
|
|
47
132
|
* @param kernel - Versione del kernel
|
|
48
133
|
* @returns Path al file initramfs
|
|
49
134
|
*/
|
|
50
|
-
static
|
|
135
|
+
static initramfsOld(kernel = '') {
|
|
51
136
|
const distro = new Distro();
|
|
52
137
|
let initramfs = '';
|
|
53
138
|
if (kernel === '') {
|
package/dist/classes/utils.d.ts
CHANGED
|
@@ -294,7 +294,8 @@ export default class Utils {
|
|
|
294
294
|
/**
|
|
295
295
|
*
|
|
296
296
|
*/
|
|
297
|
-
static pressKeyToExit(
|
|
297
|
+
static pressKeyToExit(warning?: string, procContinue?: boolean): Promise<void>;
|
|
298
|
+
static debug(cmd?: string, procContinue?: boolean): Promise<void>;
|
|
298
299
|
/**
|
|
299
300
|
* titles
|
|
300
301
|
* Penguin's are gettings alive!
|
package/dist/classes/utils.js
CHANGED
|
@@ -821,8 +821,20 @@ export default class Utils {
|
|
|
821
821
|
/**
|
|
822
822
|
*
|
|
823
823
|
*/
|
|
824
|
-
static async pressKeyToExit(
|
|
825
|
-
Utils.warning(
|
|
824
|
+
static async pressKeyToExit(warning = 'Process will end', procContinue = true) {
|
|
825
|
+
Utils.warning(warning);
|
|
826
|
+
let msg = 'Press a key to exit...';
|
|
827
|
+
if (procContinue) {
|
|
828
|
+
msg = 'Press a key to continue...';
|
|
829
|
+
}
|
|
830
|
+
console.log(msg);
|
|
831
|
+
const pressKeyToExit = spawnSync('read _ ', { shell: true, stdio: [0, 1, 2] });
|
|
832
|
+
if (!procContinue) {
|
|
833
|
+
process.exit(0);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
static async debug(cmd = 'cmd', procContinue = true) {
|
|
837
|
+
console.log(chalk.redBright('DEBUG >>> ') + cmd + '\n');
|
|
826
838
|
let msg = 'Press a key to exit...';
|
|
827
839
|
if (procContinue) {
|
|
828
840
|
msg = 'Press a key to continue...';
|
|
@@ -60,7 +60,7 @@ export default class ExportPkg extends Command {
|
|
|
60
60
|
if (process.arch === 'ia32') {
|
|
61
61
|
arch = 'i386';
|
|
62
62
|
}
|
|
63
|
-
Utils.warning(`
|
|
63
|
+
Utils.warning(`exporting Alpine APK packages`);
|
|
64
64
|
localPath = `/home/${this.user}/packages/aports/${arch}`;
|
|
65
65
|
remotePath = `${this.Tu.config.remotePathPackages}/alpine/${arch}`;
|
|
66
66
|
filter = `penguins-eggs-*[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*.apk`;
|
|
@@ -73,7 +73,7 @@ export default class ExportPkg extends Command {
|
|
|
73
73
|
* Manjaro
|
|
74
74
|
*/
|
|
75
75
|
if (Diversions.isManjaroBased(distroId)) {
|
|
76
|
-
Utils.warning(
|
|
76
|
+
Utils.warning(`exporting Manjaro .pkg.tar.zst packages`);
|
|
77
77
|
localPath = `/home/${this.user}/penguins-packs/manjaro/penguins-eggs`;
|
|
78
78
|
remotePath = this.Tu.config.remotePathPackages + "/manjaro";
|
|
79
79
|
filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*-any.pkg.tar.*`;
|
|
@@ -82,7 +82,7 @@ export default class ExportPkg extends Command {
|
|
|
82
82
|
*/
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
-
Utils.warning(
|
|
85
|
+
Utils.warning(`exporting Arch .pkg.tar.zst packages`);
|
|
86
86
|
localPath = `/home/${this.user}/penguins-packs/aur/penguins-eggs`;
|
|
87
87
|
remotePath = this.Tu.config.remotePathPackages + "/aur";
|
|
88
88
|
filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*-any.pkg.tar.zst`;
|
|
@@ -92,7 +92,7 @@ export default class ExportPkg extends Command {
|
|
|
92
92
|
*/
|
|
93
93
|
}
|
|
94
94
|
else if (familyId === "debian") {
|
|
95
|
-
Utils.warning(
|
|
95
|
+
Utils.warning(`exporting Devuan/Debian/Ubuntu DEB packages`);
|
|
96
96
|
localPath = `/home/${this.user}/penguins-eggs/dist`;
|
|
97
97
|
remotePath = this.Tu.config.remotePathPackages + "/debs";
|
|
98
98
|
let arch = Utils.uefiArch();
|
|
@@ -105,22 +105,23 @@ export default class ExportPkg extends Command {
|
|
|
105
105
|
*/
|
|
106
106
|
}
|
|
107
107
|
else if (familyId === 'fedora') {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
let repo = 'fedora';
|
|
109
|
+
let warning = `exporting Fedora RPM packages`;
|
|
110
|
+
filter = `penguins-eggs-[0-9][0-9].[0-9]*.[0-9]*-*.fc??.x86_64.rpm`;
|
|
111
|
+
if (distro.distroId !== 'Fedora') {
|
|
112
|
+
repo = 'el9';
|
|
113
|
+
warning = `exporting Almalinux/Rocky RPM packages`;
|
|
112
114
|
filter = `penguins-eggs-[0-9][0-9].[0-9]*.[0-9]*-*.fc??.x86_64.rpm`;
|
|
113
115
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
116
|
+
Utils.warning(warning);
|
|
117
|
+
localPath = `/home/${this.user}/rpmbuild/RPMS/x86_64`;
|
|
118
|
+
remotePath = this.Tu.config.remotePathPackages + `/` + repo;
|
|
118
119
|
/**
|
|
119
120
|
* openmamba
|
|
120
121
|
*/
|
|
121
122
|
}
|
|
122
123
|
else if (familyId === 'openmamba') {
|
|
123
|
-
Utils.warning(
|
|
124
|
+
Utils.warning(`exporting Openmamba RPM packages`);
|
|
124
125
|
localPath = `/home/${this.user}/rpmbuild/RPMS/x86_64`;
|
|
125
126
|
remotePath = this.Tu.config.remotePathPackages + "/openmamba";
|
|
126
127
|
filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*mamba.*.rpm`;
|
|
@@ -129,17 +130,10 @@ export default class ExportPkg extends Command {
|
|
|
129
130
|
*/
|
|
130
131
|
}
|
|
131
132
|
else if (familyId === 'opensuse') {
|
|
132
|
-
Utils.warning(
|
|
133
|
+
Utils.warning(`exporting OpenSuSE RPM packages`);
|
|
133
134
|
localPath = `/home/${this.user}/rpmbuild/RPMS/x86_64`;
|
|
134
135
|
remotePath = this.Tu.config.remotePathPackages + "/opensuse";
|
|
135
136
|
filter = `penguins-eggs-[0-9][0-9].[0-9]*.[0-9]*-*.opensuse.x86_64.rpm`;
|
|
136
|
-
/**
|
|
137
|
-
* voidlinux
|
|
138
|
-
*/
|
|
139
|
-
}
|
|
140
|
-
else if (familyId === 'voidlinux') {
|
|
141
|
-
Utils.warning("voidlinux packages");
|
|
142
|
-
process.exit();
|
|
143
137
|
}
|
|
144
138
|
let cmd = `#!/bin/bash\n`;
|
|
145
139
|
cmd += `set -e\n`;
|
|
@@ -161,6 +155,7 @@ export default class ExportPkg extends Command {
|
|
|
161
155
|
cmd += `# Export packages\n`;
|
|
162
156
|
cmd += `cp ${localPath}/${filter} ${remoteMountpoint}\n`;
|
|
163
157
|
cmd += 'sync\n';
|
|
158
|
+
cmd += `\n`;
|
|
164
159
|
cmd += `# wait before to umount\n`;
|
|
165
160
|
cmd += 'sleep 2s\n';
|
|
166
161
|
cmd += `fusermount3 -u ${remoteMountpoint}\n`;
|
|
@@ -172,7 +167,6 @@ export default class ExportPkg extends Command {
|
|
|
172
167
|
}
|
|
173
168
|
console.log(`copy: ${localPath}/${filter} to ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath}`);
|
|
174
169
|
}
|
|
175
|
-
// console.log(cmd)
|
|
176
170
|
await exec(cmd, this.echo);
|
|
177
171
|
}
|
|
178
172
|
}
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Debian 13 trixe, Ubuntu 24.04 noble usano il formato deb822
|
|
10
|
+
*
|
|
11
|
+
* esiste un comando per modernizzare le sorgenti:
|
|
12
|
+
* sudo apt modernize-sources
|
|
13
|
+
*/
|
|
8
14
|
import { Command } from '@oclif/core';
|
|
9
15
|
/**
|
|
10
16
|
*
|
|
@@ -5,13 +5,24 @@
|
|
|
5
5
|
* email: piero.proietti@gmail.com
|
|
6
6
|
* license: MIT
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Debian 13 trixe, Ubuntu 24.04 noble usano il formato deb822
|
|
10
|
+
*
|
|
11
|
+
* esiste un comando per modernizzare le sorgenti:
|
|
12
|
+
* sudo apt modernize-sources
|
|
13
|
+
*/
|
|
8
14
|
import { Command, Flags } from '@oclif/core';
|
|
9
15
|
import fs from 'node:fs';
|
|
16
|
+
import path from 'node:path';
|
|
10
17
|
import Distro from '../../classes/distro.js';
|
|
11
18
|
import Utils from '../../classes/utils.js';
|
|
12
19
|
import { exec } from '../../lib/utils.js';
|
|
13
|
-
|
|
14
|
-
const
|
|
20
|
+
import Diversions from '../../classes/diversions.js';
|
|
21
|
+
const ppaKey = '/usr/share/keyrings/penguins-eggs-ppa.gpg';
|
|
22
|
+
// '/etc/apt/trusted.gpg.d/penguins-eggs-key.gpg'
|
|
23
|
+
const ppaName = `/etc/apt/sources.list.d/penguins-eggs-ppa`;
|
|
24
|
+
const ppaList = ppaName + '.list';
|
|
25
|
+
const ppaSources = ppaName + '.sources';
|
|
15
26
|
/**
|
|
16
27
|
*
|
|
17
28
|
*/
|
|
@@ -43,39 +54,48 @@ export default class Ppa extends Command {
|
|
|
43
54
|
*/
|
|
44
55
|
if (distro.familyId === 'debian') {
|
|
45
56
|
if (flags.add) {
|
|
46
|
-
Utils.warning(`Are you sure to add ${
|
|
57
|
+
Utils.warning(`Are you sure to add source ${path.basename(ppaName)} to your repositories?`);
|
|
47
58
|
if (nointeractive || (await Utils.customConfirm('Select yes to continue...'))) {
|
|
48
|
-
|
|
59
|
+
// remove old penguins-eggs-ppa.list
|
|
60
|
+
debianRemove();
|
|
61
|
+
if (await is822()) {
|
|
62
|
+
debianAdd822();
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
await debianAdd();
|
|
66
|
+
}
|
|
49
67
|
}
|
|
50
68
|
}
|
|
51
69
|
else if (flags.remove) {
|
|
52
|
-
Utils.warning(`Are you sure to remove ${
|
|
70
|
+
Utils.warning(`Are you sure to remove source ${path.basename(ppaName)} to your repositories?`);
|
|
53
71
|
if (nointeractive || (await Utils.customConfirm('Select yes to continue...'))) {
|
|
54
72
|
await debianRemove();
|
|
55
73
|
}
|
|
56
74
|
}
|
|
75
|
+
await exec('apt-get update');
|
|
57
76
|
/**
|
|
58
|
-
*
|
|
77
|
+
* Arch and only Arch! no Manjaro...
|
|
59
78
|
*/
|
|
60
79
|
}
|
|
61
|
-
if (distro.familyId === 'archlinux') {
|
|
80
|
+
else if (distro.familyId === 'archlinux' && !Diversions.isManjaroBased(distro.distroId)) {
|
|
62
81
|
if (flags.add) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
await archAdd();
|
|
67
|
-
}
|
|
82
|
+
Utils.warning(`Are you sure to add Chaotic-AUR to your repositories?`);
|
|
83
|
+
if (await Utils.customConfirm('Select yes to continue...')) {
|
|
84
|
+
await archAdd();
|
|
68
85
|
}
|
|
69
86
|
}
|
|
70
87
|
else if (flags.remove) {
|
|
71
|
-
|
|
88
|
+
Utils.warning(`Are you sure to remove Chaotic-AUR to your repositories?`);
|
|
89
|
+
if (await Utils.customConfirm('Select yes to continue...')) {
|
|
90
|
+
await archRemove();
|
|
91
|
+
}
|
|
72
92
|
}
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
93
|
/**
|
|
76
|
-
*
|
|
94
|
+
* Alle the others
|
|
77
95
|
*/
|
|
78
|
-
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
Utils.warning(`Distro: ${distro.distroId}/${distro.codenameId}, cannot use penguins-eggs-ppa nor chaotic-aur!`);
|
|
79
99
|
}
|
|
80
100
|
}
|
|
81
101
|
}
|
|
@@ -89,7 +109,7 @@ async function archAdd() {
|
|
|
89
109
|
const mirrorlist = 'chaotic-mirrorlist.pkg.tar.zst';
|
|
90
110
|
const echo = Utils.setEcho(true);
|
|
91
111
|
if (fs.existsSync(path + keyring) && fs.existsSync(path + mirrorlist)) {
|
|
92
|
-
console.log('repository
|
|
112
|
+
console.log('repository Chaotic-AUR, already present!');
|
|
93
113
|
await archRemove();
|
|
94
114
|
process.exit();
|
|
95
115
|
}
|
|
@@ -118,21 +138,48 @@ async function archRemove() {
|
|
|
118
138
|
console.log(`Include = /etc/pacman.d/chaotic-mirrorlist`);
|
|
119
139
|
}
|
|
120
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* debianAdd822
|
|
143
|
+
*/
|
|
144
|
+
async function debianAdd822() {
|
|
145
|
+
await exec(`curl -sS https://pieroproietti.github.io/penguins-eggs-ppa/KEY.gpg| gpg --dearmor | sudo tee ${ppaKey} > /dev/null`);
|
|
146
|
+
let content = '';
|
|
147
|
+
content += 'Types: deb\n';
|
|
148
|
+
content += 'URIs: https://pieroproietti.github.io/penguins-eggs-ppa\n';
|
|
149
|
+
content += 'Suites: ./\n';
|
|
150
|
+
content += 'Signed-By: /usr/share/keyrings/penguins-eggs-ppa.gpg\n';
|
|
151
|
+
fs.writeFileSync(ppaSources, content);
|
|
152
|
+
// crea un penguins-eggs-ppa.list vuoto
|
|
153
|
+
await exec(`touch ${ppaList}`);
|
|
154
|
+
}
|
|
121
155
|
/**
|
|
122
156
|
* debianAdd
|
|
123
157
|
*/
|
|
124
158
|
async function debianAdd() {
|
|
125
|
-
await exec(`curl -sS https://pieroproietti.github.io/penguins-eggs-ppa/KEY.gpg| gpg --dearmor | sudo tee ${
|
|
126
|
-
const content = `deb [signed-by=${
|
|
127
|
-
fs.writeFileSync(
|
|
128
|
-
|
|
159
|
+
await exec(`curl -sS https://pieroproietti.github.io/penguins-eggs-ppa/KEY.gpg| gpg --dearmor | sudo tee ${ppaKey} > /dev/null`);
|
|
160
|
+
const content = `deb [signed-by=${ppaKey}] https://pieroproietti.github.io/penguins-eggs-ppa ./\n`;
|
|
161
|
+
fs.writeFileSync(ppaList, content);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* is822 (usa lo standard deb822 per le sorgenti)
|
|
165
|
+
*/
|
|
166
|
+
async function is822() {
|
|
167
|
+
await exec(`curl -sS https://pieroproietti.github.io/penguins-eggs-ppa/KEY.gpg| gpg --dearmor | sudo tee ${ppaKey} > /dev/null`);
|
|
168
|
+
let retval = false;
|
|
169
|
+
const test = `([ -f /etc/apt/sources.list.d/ubuntu.sources ] || [ -f /etc/apt/sources.list.d/debian.sources ]) && echo "1" || echo "0"`;
|
|
170
|
+
const is822 = (await exec(test, { capture: true, echo: false, ignore: false }));
|
|
171
|
+
if (is822.code === 0) {
|
|
172
|
+
if (is822.data.trim() === '1') {
|
|
173
|
+
retval = true;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return retval;
|
|
129
177
|
}
|
|
130
178
|
/**
|
|
131
179
|
* debianRemove
|
|
132
180
|
*/
|
|
133
181
|
async function debianRemove() {
|
|
134
|
-
await exec(
|
|
135
|
-
await exec(
|
|
136
|
-
await exec(
|
|
137
|
-
await exec('apt-get update');
|
|
182
|
+
await exec(`rm -f ${ppaKey}`);
|
|
183
|
+
await exec(`rm -f ${ppaList}`);
|
|
184
|
+
await exec(`rm -f ${ppaSources}`);
|
|
138
185
|
}
|
|
@@ -30,7 +30,7 @@ export default class Update extends Command {
|
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
getPkgFromPackageManager(): Promise<void>;
|
|
34
34
|
/**
|
|
35
35
|
* download da LAN
|
|
36
36
|
*/
|
|
@@ -38,12 +38,7 @@ export default class Update extends Command {
|
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @param aptVersion
|
|
45
|
-
*/
|
|
46
|
-
getFromSources(): void;
|
|
41
|
+
getFromSource(): void;
|
|
47
42
|
/**
|
|
48
43
|
* show
|
|
49
44
|
*/
|