penguins-eggs 9.2.9 → 9.3.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.
- package/.oclif.manifest.json +1 -1
- package/README.md +48 -21
- package/conf/distros/bionic/README.md +1 -1
- package/conf/distros/bionic/calamares/settings.yml +1 -1
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io/module.yml +1 -1
- package/conf/distros/buster/calamares/calamares-modules/dpkg-unsafe-io-undo/module.yml +1 -1
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +56 -79
- package/conf/distros/buster/calamares/calamares-modules/{sources-yolk-unmount → sources-yolk-undo}/module.yml +2 -2
- package/conf/distros/buster/calamares/modules/packages.yml +2 -4
- package/conf/distros/buster/calamares/settings.yml +3 -3
- package/conf/distros/focal/calamares/settings.yml +1 -1
- package/conf/distros/jessie/krill/krill-modules/sources-yolk-unmount/module.yml +2 -2
- package/conf/distros/jessie/krill/settings.yml +1 -1
- package/dist/classes/incubation/distros/bionic.js +1 -1
- package/dist/classes/incubation/distros/buster.js +2 -2
- package/dist/classes/incubation/distros/focal.js +1 -1
- package/dist/classes/incubation/distros/jessie.js +1 -1
- package/dist/classes/incubation/fisherman-helper/packages.js +24 -31
- package/dist/classes/incubation/fisherman.js +8 -5
- package/dist/classes/pacman.js +5 -5
- package/dist/classes/pxe.js +7 -7
- package/dist/classes/xdg.js +7 -4
- package/dist/commands/tools/ppa.js +82 -0
- package/dist/krill/krill-sequence.js +26 -6
- package/dist/krill/modules/packages.js +40 -34
- package/dist/lib/dependencies.js +1 -0
- package/package.json +2 -2
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.working.sh +0 -75
- package/scripts/netgrub.sh +0 -39
|
@@ -59,7 +59,7 @@ class Bionic {
|
|
|
59
59
|
await fisherman.buildCalamaresModule('add386arch', false);
|
|
60
60
|
await fisherman.modulePackages(this.distro, this.release); //
|
|
61
61
|
await fisherman.moduleRemoveuser(this.user_opt); //
|
|
62
|
-
await fisherman.buildCalamaresModule('sources-yolk-
|
|
62
|
+
await fisherman.buildCalamaresModule('sources-yolk-undo', false);
|
|
63
63
|
await fisherman.buildCalamaresModule('cleanup', true);
|
|
64
64
|
await fisherman.buildModule('umount');
|
|
65
65
|
await fisherman.buildModule('finished');
|
|
@@ -61,9 +61,9 @@ class Buster {
|
|
|
61
61
|
await fisherman.buildModule('plymouthcfg');
|
|
62
62
|
await fisherman.buildModule('initramfscfg');
|
|
63
63
|
await fisherman.buildModule('initramfs');
|
|
64
|
-
await fisherman.moduleRemoveuser(this.user_opt);
|
|
65
64
|
await fisherman.buildCalamaresModule('dpkg-unsafe-io-undo', false);
|
|
66
|
-
await fisherman.
|
|
65
|
+
await fisherman.moduleRemoveuser(this.user_opt);
|
|
66
|
+
await fisherman.buildCalamaresModule('sources-yolk-undo', false);
|
|
67
67
|
await fisherman.buildCalamaresModule('cleanup', true);
|
|
68
68
|
await fisherman.buildModule('umount');
|
|
69
69
|
await fisherman.moduleFinished();
|
|
@@ -63,7 +63,7 @@ class Focal {
|
|
|
63
63
|
await fisherman.modulePackages(this.distro, this.release); //
|
|
64
64
|
await fisherman.moduleRemoveuser(this.user_opt);
|
|
65
65
|
await fisherman.buildCalamaresModule('sources-yolk', false);
|
|
66
|
-
await fisherman.buildCalamaresModule('sources-yolk-
|
|
66
|
+
await fisherman.buildCalamaresModule('sources-yolk-undo', false);
|
|
67
67
|
await fisherman.buildCalamaresModule('cleanup', true);
|
|
68
68
|
await fisherman.buildModule('umount');
|
|
69
69
|
await fisherman.buildModule('finished');
|
|
@@ -41,7 +41,7 @@ class Jessie {
|
|
|
41
41
|
await fisherman.buildModule('partition', this.remix.branding);
|
|
42
42
|
await fisherman.buildCalamaresModule('sources-yolk', true);
|
|
43
43
|
await fisherman.moduleRemoveuser(this.user_opt);
|
|
44
|
-
await fisherman.buildCalamaresModule('sources-yolk-
|
|
44
|
+
await fisherman.buildCalamaresModule('sources-yolk-undo', false);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.Jessie = Jessie;
|
|
@@ -2,70 +2,63 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tryInstall = exports.remove = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
5
|
const pacman_1 = tslib_1.__importDefault(require("../../pacman"));
|
|
9
6
|
/**
|
|
10
|
-
* Work only with:
|
|
11
|
-
* - calamares
|
|
12
|
-
* - penguins-eggs
|
|
13
7
|
*
|
|
14
|
-
*
|
|
8
|
+
* @param distro
|
|
9
|
+
* @returns yaml-string
|
|
15
10
|
*/
|
|
16
11
|
function remove(distro) {
|
|
17
|
-
let
|
|
12
|
+
let packages = ["calamares"];
|
|
18
13
|
if (distro.familyId === 'archlinux') {
|
|
19
|
-
|
|
14
|
+
packages.push("penguins-eggs");
|
|
20
15
|
}
|
|
21
16
|
if (distro.familyId === 'debian') {
|
|
22
|
-
|
|
17
|
+
packages.push("eggs");
|
|
18
|
+
}
|
|
19
|
+
let yaml = '';
|
|
20
|
+
for (const elem of packages) {
|
|
21
|
+
yaml += ` - ${elem.trim()}\n`;
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
text += ` - ${elem.trim()}\n`;
|
|
23
|
+
if (yaml !== '') {
|
|
24
|
+
yaml = '- remove:\n' + yaml;
|
|
27
25
|
}
|
|
28
|
-
return
|
|
26
|
+
return yaml;
|
|
29
27
|
}
|
|
30
28
|
exports.remove = remove;
|
|
31
29
|
/**
|
|
32
30
|
*
|
|
33
31
|
* @param distro
|
|
34
|
-
|
|
35
|
-
- language-pack-$LOCALE
|
|
36
|
-
- hunspell-$LOCALE
|
|
37
|
-
- libreoffice-help-$LOCALE
|
|
38
|
-
|
|
32
|
+
* @returns yaml-string
|
|
39
33
|
*/
|
|
40
34
|
function tryInstall(distro) {
|
|
41
|
-
let
|
|
35
|
+
let yaml = '';
|
|
42
36
|
/**
|
|
43
37
|
* Depending on the distro
|
|
44
38
|
*/
|
|
45
39
|
if (distro.distroLike === 'Ubuntu') {
|
|
46
|
-
|
|
40
|
+
yaml += ' - language-pack-$LOCALE\n';
|
|
47
41
|
}
|
|
48
42
|
// Da localizzare se presenti
|
|
49
43
|
if (pacman_1.default.packageIsInstalled('hunspell')) {
|
|
50
|
-
|
|
44
|
+
yaml += ' - hunspell-$LOCALE\n';
|
|
51
45
|
}
|
|
52
46
|
if (pacman_1.default.packageIsInstalled('libreoffice-base-core')) {
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
yaml += ` - libreoffice-l10n-$LOCALE\n`;
|
|
48
|
+
yaml += ` - libreoffice-help-$LOCALE\n`;
|
|
55
49
|
}
|
|
56
50
|
if (pacman_1.default.packageIsInstalled('firefox-esr')) {
|
|
57
|
-
|
|
51
|
+
yaml += ` - firefox-esr-$LOCALE\n`;
|
|
58
52
|
}
|
|
59
53
|
if (pacman_1.default.packageIsInstalled('firefox')) {
|
|
60
|
-
|
|
54
|
+
yaml += ` - firefox-$LOCALE\n`;
|
|
61
55
|
}
|
|
62
56
|
if (pacman_1.default.packageIsInstalled('thunderbird')) {
|
|
63
|
-
|
|
57
|
+
yaml += ` - thunderbird-locale-$LOCALE\n`;
|
|
64
58
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
retVal += ' - try_install:\n' + packages;
|
|
59
|
+
if (yaml !== '') {
|
|
60
|
+
yaml = ' - try_install:\n' + yaml;
|
|
68
61
|
}
|
|
69
|
-
return
|
|
62
|
+
return yaml;
|
|
70
63
|
}
|
|
71
64
|
exports.tryInstall = tryInstall;
|
|
@@ -232,13 +232,16 @@ class Fisherman {
|
|
|
232
232
|
const removePackages = require('./fisherman-helper/packages').remove;
|
|
233
233
|
const tryInstall = require('./fisherman-helper/packages').tryInstall;
|
|
234
234
|
this.buildModule(name);
|
|
235
|
-
let
|
|
235
|
+
let yamlInstall = tryInstall(distro);
|
|
236
|
+
let yamlRemove = '';
|
|
236
237
|
if (release) {
|
|
237
|
-
|
|
238
|
+
yamlRemove = removePackages(distro);
|
|
238
239
|
}
|
|
239
|
-
let
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
let operations = '';
|
|
241
|
+
if (yamlRemove !== '' || yamlInstall !== '') {
|
|
242
|
+
operations = "operations:\n" + yamlRemove + yamlInstall;
|
|
243
|
+
}
|
|
244
|
+
shelljs_1.default.sed('-i', '{{operations}}', operations, this.installer.modules + name + '.conf');
|
|
242
245
|
}
|
|
243
246
|
/**
|
|
244
247
|
* Al momento rimane con la vecchia configurazione
|
package/dist/classes/pacman.js
CHANGED
|
@@ -537,7 +537,7 @@ class Pacman {
|
|
|
537
537
|
// Poi da buster
|
|
538
538
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
539
539
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
540
|
-
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-
|
|
540
|
+
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
541
541
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
542
542
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
543
543
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
@@ -552,7 +552,7 @@ class Pacman {
|
|
|
552
552
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
553
553
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
554
554
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
555
|
-
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-
|
|
555
|
+
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
556
556
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
557
557
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
558
558
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
@@ -567,7 +567,7 @@ class Pacman {
|
|
|
567
567
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
568
568
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
569
569
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
570
|
-
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-
|
|
570
|
+
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
571
571
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
572
572
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
573
573
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
@@ -582,7 +582,7 @@ class Pacman {
|
|
|
582
582
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
583
583
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
584
584
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
585
|
-
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-
|
|
585
|
+
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
586
586
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
587
587
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
588
588
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
|
@@ -597,7 +597,7 @@ class Pacman {
|
|
|
597
597
|
await (0, utils_2.exec)(`cp -r ${focal} ${dest}`, echo);
|
|
598
598
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/cleanup ${dest}/calamares/calamares-modules/cleanup`, echo);
|
|
599
599
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk ${dest}/calamares/calamares-modules/sources-yolk`, echo);
|
|
600
|
-
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-
|
|
600
|
+
await (0, utils_2.exec)(`cp -r ${buster}/calamares/calamares-modules/sources-yolk-undo ${dest}/calamares/calamares-modules/sources-yolk-undo`, echo);
|
|
601
601
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/packages.yml ${dest}/calamares/modules/packages.yml`, echo);
|
|
602
602
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/removeuser.yml ${dest}/calamares/modules/removeuser.yml`, echo);
|
|
603
603
|
await (0, utils_2.exec)(`cp -r ${buster}/calamares/modules/unpackfs.yml ${dest}/calamares/modules/unpackfs.yml`, echo);
|
package/dist/classes/pxe.js
CHANGED
|
@@ -52,9 +52,9 @@ class Pxe {
|
|
|
52
52
|
}
|
|
53
53
|
this.nest = '/home/eggs';
|
|
54
54
|
this.pxeRoot = this.nest + '/pxe';
|
|
55
|
-
console.log('nest: ' + this.nest)
|
|
56
|
-
console.log('pxeRoot: ' + this.pxeRoot)
|
|
57
|
-
console.log('eggRoot: ' + this.eggRoot)
|
|
55
|
+
// console.log('nest: ' + this.nest)
|
|
56
|
+
// console.log('pxeRoot: ' + this.pxeRoot)
|
|
57
|
+
// console.log('eggRoot: ' + this.eggRoot)
|
|
58
58
|
/**
|
|
59
59
|
* se pxeRoot non esiste viene creato
|
|
60
60
|
*/
|
|
@@ -168,7 +168,7 @@ class Pxe {
|
|
|
168
168
|
content += `TIMEOUT 0\n`;
|
|
169
169
|
content += `\n`;
|
|
170
170
|
content += `label egg\n`;
|
|
171
|
-
content += `menu label ${this.bootLabel}\n`;
|
|
171
|
+
content += `menu label ${this.bootLabel.replace('.iso', '')}\n`;
|
|
172
172
|
let clid = this.settings.distro.codenameLikeId;
|
|
173
173
|
if (clid === 'bionic' || clid === 'stretch' || clid === 'jessie') {
|
|
174
174
|
content += `kernel vmlinuz\n`;
|
|
@@ -178,7 +178,7 @@ class Pxe {
|
|
|
178
178
|
content += `kernel http://${utils_1.default.address()}/vmlinuz\n`;
|
|
179
179
|
content += `append initrd=http://${utils_1.default.address()}/initrd boot=live config noswap noprompt fetch=http://${utils_1.default.address()}/live/filesystem.squashfs\n`;
|
|
180
180
|
}
|
|
181
|
-
content += `
|
|
181
|
+
content += `sysappend 3\n`;
|
|
182
182
|
content += `\n`;
|
|
183
183
|
if (this.isos.length > 0) {
|
|
184
184
|
content += `menu separator\n`;
|
|
@@ -188,7 +188,7 @@ class Pxe {
|
|
|
188
188
|
content += `menu label ${iso}\n`;
|
|
189
189
|
content += `kernel http://${utils_1.default.address()}/memdisk\n`;
|
|
190
190
|
content += `initrd http://${utils_1.default.address()}/${iso}\n`;
|
|
191
|
-
content += `append iso raw\n`;
|
|
191
|
+
content += `append iso raw sysappend 3\n`;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
let file = `${this.pxeRoot}/pxelinux.cfg/default`;
|
|
@@ -232,7 +232,7 @@ class Pxe {
|
|
|
232
232
|
* content += `imgargs vmlinuz fetch=http://${Utils.address()}/live/filesystem.squashfs boot=live dhcp initrd=initrd ro\n`
|
|
233
233
|
*/
|
|
234
234
|
content += `imgargs vmlinuz fetch=http://${utils_1.default.address()}/live/filesystem.squashfs boot=live dhcp initrd=initrd ro\n`;
|
|
235
|
-
content += `sleep
|
|
235
|
+
content += `sleep 5\n`;
|
|
236
236
|
content += `boot || goto start\n\n`;
|
|
237
237
|
if (this.isos.length > 0) {
|
|
238
238
|
for (const iso of this.isos) {
|
package/dist/classes/xdg.js
CHANGED
|
@@ -12,6 +12,7 @@ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
|
|
|
12
12
|
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
13
13
|
const pacman_1 = tslib_1.__importDefault(require("./pacman"));
|
|
14
14
|
const utils_1 = tslib_1.__importDefault(require("./utils"));
|
|
15
|
+
const n8_1 = tslib_1.__importDefault(require("./n8"));
|
|
15
16
|
// libraries
|
|
16
17
|
const utils_2 = require("../lib/utils");
|
|
17
18
|
const xdg_dirs = ['DESKTOP', 'DOWNLOAD', 'TEMPLATES', 'PUBLICSHARE', 'DOCUMENTS', 'MUSIC', 'PICTURES', 'VIDEOS'];
|
|
@@ -93,10 +94,12 @@ class Xdg {
|
|
|
93
94
|
let files = node_fs_1.default.readdirSync(dc);
|
|
94
95
|
for (const elem of files) {
|
|
95
96
|
const curFile = dc + elem;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
if (!n8_1.default.isDirectory(curFile)) {
|
|
98
|
+
let content = node_fs_1.default.readFileSync(curFile, 'utf8');
|
|
99
|
+
let find = `[Seat:*]`;
|
|
100
|
+
if (content.includes(find)) {
|
|
101
|
+
shelljs_1.default.sed('-i', `autologin-user=${olduser}`, `autologin-user=${newuser}`, curFile);
|
|
102
|
+
}
|
|
100
103
|
}
|
|
101
104
|
}
|
|
102
105
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
/**
|
|
5
|
+
* penguins-eggs-v7 based on Debian live
|
|
6
|
+
* author: Piero Proietti
|
|
7
|
+
* email: piero.proietti@gmail.com
|
|
8
|
+
* license: MIT
|
|
9
|
+
*/
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const distro_1 = tslib_1.__importDefault(require("../../classes/distro"));
|
|
12
|
+
const utils_1 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
13
|
+
const utils_2 = require("../../lib/utils");
|
|
14
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
15
|
+
const fkey = `/etc/apt/trusted.gpg.d/penguins-eggs-key.gpg`;
|
|
16
|
+
const flist = '/etc/apt/sources.list.d/penguins-eggs-ppa.list';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
class Ppa extends core_1.Command {
|
|
21
|
+
async run() {
|
|
22
|
+
const { flags } = await this.parse(Ppa);
|
|
23
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
24
|
+
let verbose = false;
|
|
25
|
+
if (flags.verbose) {
|
|
26
|
+
verbose = true;
|
|
27
|
+
}
|
|
28
|
+
const distro = new distro_1.default();
|
|
29
|
+
if (distro.familyId === 'debian') {
|
|
30
|
+
if (utils_1.default.isRoot()) {
|
|
31
|
+
if (flags.remove) {
|
|
32
|
+
utils_1.default.warning(`Are you sure to remove ${flist} to your repositories?`);
|
|
33
|
+
if (await utils_1.default.customConfirm('Select yes to continue...')) {
|
|
34
|
+
await remove();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (flags.add) {
|
|
38
|
+
utils_1.default.warning(`Are you sure to add ${flist} to your repositories?`);
|
|
39
|
+
if (await utils_1.default.customConfirm('Select yes to continue...')) {
|
|
40
|
+
await clean();
|
|
41
|
+
await add();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
utils_1.default.warning('you can use ppa only for debian family');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.default = Ppa;
|
|
52
|
+
Ppa.description = 'add/remove PPA repositories (Debian family)';
|
|
53
|
+
Ppa.flags = {
|
|
54
|
+
help: core_1.Flags.help({ char: 'h' }),
|
|
55
|
+
add: core_1.Flags.boolean({ char: 'a', description: 'add penguins-eggs PPA repository' }),
|
|
56
|
+
remove: core_1.Flags.boolean({ char: 'r', description: 'remove penguins-eggs PPA repository' }),
|
|
57
|
+
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* add ppa
|
|
61
|
+
*/
|
|
62
|
+
async function add() {
|
|
63
|
+
await (0, utils_2.exec)(`curl -sS https://pieroproietti.github.io/penguins-eggs-ppa/KEY.gpg| gpg --dearmor | sudo tee ${fkey} > /dev/null`);
|
|
64
|
+
const content = `deb [signed-by=${fkey}] https://pieroproietti.github.io/penguins-eggs-ppa ./\n`;
|
|
65
|
+
fs_1.default.writeFileSync(flist, content);
|
|
66
|
+
await (0, utils_2.exec)(`apt-get update`);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* remove ppa
|
|
70
|
+
*/
|
|
71
|
+
async function remove() {
|
|
72
|
+
await clean();
|
|
73
|
+
await (0, utils_2.exec)(`apt-get update`);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
async function clean() {
|
|
79
|
+
await (0, utils_2.exec)(`rm -f /etc/apt/trusted.gpg.d/penguins-eggs*`);
|
|
80
|
+
await (0, utils_2.exec)(`rm -f /etc/apt/sources.list.d/penguins-eggs*`);
|
|
81
|
+
await (0, utils_2.exec)(`rm -f /usr/share/keyrings/penguins-eggs*`);
|
|
82
|
+
}
|
|
@@ -225,6 +225,16 @@ class Sequence {
|
|
|
225
225
|
catch (error) {
|
|
226
226
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
227
227
|
}
|
|
228
|
+
// dpkg-unsafe-io
|
|
229
|
+
message = "dpkg-unsafe-io";
|
|
230
|
+
percent = 0.11;
|
|
231
|
+
try {
|
|
232
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
233
|
+
await this.execCalamaresModule('dpkg-unsafe-io');
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
237
|
+
}
|
|
228
238
|
/**
|
|
229
239
|
* IF RESTORE USERS DATA
|
|
230
240
|
*/
|
|
@@ -340,6 +350,16 @@ class Sequence {
|
|
|
340
350
|
catch (error) {
|
|
341
351
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
342
352
|
}
|
|
353
|
+
// dpkg-unsafe-io
|
|
354
|
+
message = "dpkg-unsafe-io-undo";
|
|
355
|
+
percent = 0.61;
|
|
356
|
+
try {
|
|
357
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
358
|
+
await this.execCalamaresModule('dpkg-unsafe-io-undo');
|
|
359
|
+
}
|
|
360
|
+
catch (error) {
|
|
361
|
+
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
362
|
+
}
|
|
343
363
|
/**
|
|
344
364
|
* IF NOT RESTORE USERS DATA OR PERSONAL BACKUP
|
|
345
365
|
*/
|
|
@@ -403,7 +423,7 @@ class Sequence {
|
|
|
403
423
|
// cleanup
|
|
404
424
|
await cliAutologin.msgRemove(`${this.installTarget}/etc/motd`);
|
|
405
425
|
await cliAutologin.msgRemove(`${this.installTarget}/etc/issue`);
|
|
406
|
-
// bootloader-config
|
|
426
|
+
// bootloader-config
|
|
407
427
|
message = "bootloader-config ";
|
|
408
428
|
percent = 0.70;
|
|
409
429
|
try {
|
|
@@ -413,7 +433,7 @@ class Sequence {
|
|
|
413
433
|
catch (error) {
|
|
414
434
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
415
435
|
}
|
|
416
|
-
// grubcfg
|
|
436
|
+
// grubcfg
|
|
417
437
|
message = "grubcfg ";
|
|
418
438
|
percent = 0.75;
|
|
419
439
|
try {
|
|
@@ -423,7 +443,7 @@ class Sequence {
|
|
|
423
443
|
catch (error) {
|
|
424
444
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
425
445
|
}
|
|
426
|
-
// bootloader (grub-install)
|
|
446
|
+
// bootloader (grub-install)
|
|
427
447
|
message = "bootloader ";
|
|
428
448
|
percent = 0.80;
|
|
429
449
|
try {
|
|
@@ -433,13 +453,13 @@ class Sequence {
|
|
|
433
453
|
catch (error) {
|
|
434
454
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
435
455
|
}
|
|
436
|
-
//
|
|
456
|
+
// sources-yolk-undo
|
|
437
457
|
if (this.distro.familyId === 'debian') {
|
|
438
|
-
message = "sources
|
|
458
|
+
message = "sources-yolk-undo";
|
|
439
459
|
percent = 0.90;
|
|
440
460
|
try {
|
|
441
461
|
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
442
|
-
await this.execCalamaresModule('sources-yolk-
|
|
462
|
+
await this.execCalamaresModule('sources-yolk-undo');
|
|
443
463
|
}
|
|
444
464
|
catch (error) {
|
|
445
465
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
11
|
const tslib_1 = require("tslib");
|
|
12
12
|
const utils_1 = require("../../lib/utils");
|
|
13
13
|
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
14
|
+
const pacman_1 = tslib_1.__importDefault(require("../../classes/pacman"));
|
|
14
15
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
15
16
|
const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
16
17
|
/**
|
|
@@ -19,45 +20,50 @@ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
|
19
20
|
*/
|
|
20
21
|
async function packages() {
|
|
21
22
|
let echoYes = utils_2.default.setEcho(true);
|
|
22
|
-
|
|
23
|
+
let modulePath = '/etc/penguins-eggs.d/krill/';
|
|
24
|
+
if (pacman_1.default.packageIsInstalled('calamares')) {
|
|
25
|
+
modulePath = '/etc/calamares/';
|
|
26
|
+
}
|
|
27
|
+
const config_file = `${this.installTarget}${modulePath}modules/packages.conf`;
|
|
23
28
|
if (fs_1.default.existsSync(config_file)) {
|
|
24
29
|
const packages = js_yaml_1.default.load(fs_1.default.readFileSync(config_file, 'utf-8'));
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
packagesTryInstall = operations[0].try_install;
|
|
37
|
-
}
|
|
38
|
-
if (packages.backend === 'apt') {
|
|
39
|
-
if (packagesToRemove.length > 0) {
|
|
40
|
-
let ctr = `chroot ${this.installTarget} apt-get purge -y `;
|
|
41
|
-
for (const packageToRemove of packagesToRemove) {
|
|
42
|
-
ctr += packageToRemove + ' ';
|
|
30
|
+
if (packages.operations !== undefined) {
|
|
31
|
+
if (packages.backend === 'apt') {
|
|
32
|
+
/**
|
|
33
|
+
* apt: Debian/Devuan/Ubuntu
|
|
34
|
+
*/
|
|
35
|
+
if (packages.operations.remove !== undefined) {
|
|
36
|
+
let cmd = `chroot ${this.installTarget} apt-get purge -y `;
|
|
37
|
+
for (const elem of packages.operations.remove) {
|
|
38
|
+
cmd += elem + ' ';
|
|
39
|
+
}
|
|
40
|
+
await (0, utils_1.exec)(`${cmd} ${this.toNull}`, this.echo);
|
|
43
41
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
else if (packages.backend === 'pacman') {
|
|
52
|
-
if (packagesToRemove.length > 0) {
|
|
53
|
-
let ctr = `chroot ${this.installTarget} pacman -S `;
|
|
54
|
-
for (const packageToRemove of packagesToRemove) {
|
|
55
|
-
ctr += packageToRemove + ' ';
|
|
42
|
+
if (packages.operations.try_install !== undefined) {
|
|
43
|
+
let cmd = `chroot ${this.installTarget} apt-get install -y `;
|
|
44
|
+
for (const elem of packages.operations.try_install) {
|
|
45
|
+
cmd += elem + ' ';
|
|
46
|
+
}
|
|
47
|
+
await (0, utils_1.exec)(`chroot ${this.installTarget} apt-get update ${this.toNull}`, this.echo);
|
|
48
|
+
await (0, utils_1.exec)(`${cmd} ${this.toNull}`, this.echo);
|
|
56
49
|
}
|
|
57
|
-
await (0, utils_1.exec)(`${ctr} ${echoYes}`, this.echo);
|
|
58
50
|
}
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
else if (packages.backend === 'pacman') {
|
|
52
|
+
/**
|
|
53
|
+
* pacman: arch/manjaro
|
|
54
|
+
*/
|
|
55
|
+
if (packages.operations.remove !== undefined) {
|
|
56
|
+
let cmd = `chroot ${this.installTarget} pacman -R\n`;
|
|
57
|
+
for (const elem of packages.operations.remove) {
|
|
58
|
+
cmd += elem + ' ';
|
|
59
|
+
}
|
|
60
|
+
await (0, utils_1.exec)(`${cmd} ${echoYes}`, this.echo);
|
|
61
|
+
}
|
|
62
|
+
if (packages.operations.try_install !== undefined) {
|
|
63
|
+
for (const elem of packages.operations.try_install) {
|
|
64
|
+
await (0, utils_1.exec)(`chroot ${this.installTarget} pacman -S ${elem}`, echoYes);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
61
67
|
}
|
|
62
68
|
}
|
|
63
69
|
}
|
package/dist/lib/dependencies.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"description": "Perri's Brewery edition: remaster your system and distribuite it",
|
|
4
|
-
"version": "9.2
|
|
4
|
+
"version": "9.3.2",
|
|
5
5
|
"author": "Piero Proietti @pieroproietti",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eggs": "bin/run"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"globby": "^11",
|
|
56
56
|
"mocha": "^10.0.0",
|
|
57
57
|
"nyc": "^15.1.0",
|
|
58
|
-
"perrisbrewery": "^9.1.
|
|
58
|
+
"perrisbrewery": "^9.1.38",
|
|
59
59
|
"ts-node": "^10.8.1",
|
|
60
60
|
"typedoc": "^0.23.10"
|
|
61
61
|
},
|
package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.working.sh
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
#
|
|
4
|
-
# Questa versione utilizza SOLO yolk
|
|
5
|
-
# durante l'installazione.
|
|
6
|
-
# sources-yolk.sh
|
|
7
|
-
# aggiunge yolk, rimuove list ed esegue apt non autenticato
|
|
8
|
-
# sources-yolk.sh
|
|
9
|
-
# -u rimuove yolk e ri-aggiunge le list
|
|
10
|
-
|
|
11
|
-
function main {
|
|
12
|
-
#####################################################################
|
|
13
|
-
# unmount: remove yolk.list
|
|
14
|
-
#####################################################################
|
|
15
|
-
if [ "$1" = "-u" ]; then
|
|
16
|
-
remove_yolk
|
|
17
|
-
else
|
|
18
|
-
add_yolk
|
|
19
|
-
fi
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#####################################################################
|
|
24
|
-
function remove_list {
|
|
25
|
-
if [ -f "$LIST_BACKUP" ]; then
|
|
26
|
-
rm "$LIST_BACKUP"
|
|
27
|
-
fi
|
|
28
|
-
mv "$LIST $LIST_BACKUP"
|
|
29
|
-
|
|
30
|
-
if [ -d "$LIST_D_BACKUP" ]; then
|
|
31
|
-
rm "$LIST_D_BACKUP" -rf
|
|
32
|
-
fi
|
|
33
|
-
mv "$LIST_D $APT_LIST_D_BACKUP"
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function add_list {
|
|
37
|
-
if [ -f "$LIST" ]; then
|
|
38
|
-
rm "$LIST"
|
|
39
|
-
fi
|
|
40
|
-
mv "$APT_LIST_BACKUP $LIST"
|
|
41
|
-
|
|
42
|
-
if [ -d "$LIST_D" ]; then
|
|
43
|
-
rm "$LIST_D" -rf
|
|
44
|
-
fi
|
|
45
|
-
mv "$LIST_D_BACKUP $LIST_D"
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
function add_yolk {
|
|
50
|
-
remove_list
|
|
51
|
-
cat << EOF > $CHROOT/etc/apt/sources.list.d/yolk.list
|
|
52
|
-
deb [trusted=yes] file:/var/local/yolk ./
|
|
53
|
-
EOF
|
|
54
|
-
chroot $CHROOT apt-get --allow-unauthenticated update -y
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function remove_yolk {
|
|
58
|
-
add_list
|
|
59
|
-
rm $CHROOT/etc/apt/sources.list.d/yolk.list
|
|
60
|
-
chroot $CHROOT apt-get update -y
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
# Lo script inizia qui
|
|
66
|
-
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
|
|
67
|
-
|
|
68
|
-
LIST = "$CHROOT/etc/apt/sources.list"
|
|
69
|
-
LIST_BACKUP = "$LIST.backup"
|
|
70
|
-
|
|
71
|
-
LIST_D = "$CHROOT/etc/apt/sources.list.d"
|
|
72
|
-
LIST_D_BACKUP = "$LIST_D.backup"
|
|
73
|
-
|
|
74
|
-
main $1
|
|
75
|
-
exit 0
|