penguins-eggs 9.6.23 → 9.8.1
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 +1458 -1
- package/README.md +1527 -201
- package/addons/eggs/theme/livecd/grub.main.cfg +4 -4
- package/addons/eggs/theme/livecd/isolinux.main.cfg +5 -5
- package/bin/dev.js +6 -0
- package/bin/run +0 -0
- package/bin/run.js +7 -0
- package/conf/derivatives.yaml +23 -3
- package/conf/distros/README.md +25 -0
- package/conf/distros/bionic/calamares/calamares-modules/sources-yolk/module.yml +8 -0
- package/conf/distros/bionic/calamares/calamares-modules/sources-yolk/sources-yolk.sh +82 -0
- package/conf/distros/bionic/calamares/modules/packages.yml +6 -0
- package/conf/distros/{rolling/calamares-32 → bionic/calamares}/modules/removeuser.yml +2 -3
- package/conf/distros/bionic/calamares/modules/unpackfs.yml +6 -0
- package/conf/distros/buster/calamares/calamares-modules/bootloader-config/bootloader-config.sh +3 -3
- package/conf/distros/buster/calamares/calamares-modules/sources-yolk/sources-yolk.sh +1 -1
- package/conf/distros/buster/calamares/modules/bootloader.yml +2 -1
- package/conf/distros/buster/calamares/modules/fstab.yml +1 -1
- package/conf/distros/buster/calamares/modules/mount.yml +2 -2
- package/conf/distros/focal/calamares/modules/after_bootloader_context.yml +10 -1
- package/conf/distros/focal/calamares/modules/before_bootloader_mkdirs_context.yml +4 -4
- package/conf/distros/focal/calamares/modules/fstab.yml +1 -1
- package/conf/distros/focal/calamares/modules/mount.yml +2 -2
- package/conf/distros/focal/calamares/modules/shellprocess_bug-LP#1829805.yml +1 -1
- package/conf/distros/focal/calamares/modules/shellprocess_logs.yml +1 -1
- package/conf/distros/stretch/krill/krill-modules/bootloader-config/bootloader-config.sh +28 -0
- package/conf/distros/stretch/krill/krill-modules/bootloader-config/module.yml +8 -0
- package/conf/distros/stretch/krill/krill-modules/remove-link/module.yml +9 -0
- package/conf/distros/stretch/krill/krill-modules/remove-link/remove-link.sh +5 -0
- package/conf/distros/stretch/krill/krill-modules/sources-yolk/module.yml +8 -0
- package/conf/distros/stretch/krill/krill-modules/sources-yolk/sources-yolk.sh +75 -0
- package/conf/distros/stretch/krill/krill-modules/sources-yolk-unmount/module.yml +8 -0
- package/conf/distros/stretch/krill/modules/partitions.yml +8 -0
- package/conf/distros/stretch/krill/modules/removeuser.yml +15 -0
- package/conf/distros/{rolling/calamares-32 → stretch/krill}/settings.yml +50 -11
- package/conf/eggs.yaml +2 -9
- package/conf/{exclude.list.homes → exclude.list.d/home.list} +6 -1
- package/conf/{exclude.list.template → exclude.list.d/master.list} +16 -26
- package/conf/{exclude.list.usr → exclude.list.d/usr.list} +2 -2
- package/conf/exclude.list.d/var.list +21 -0
- package/conf/tools.yaml +1 -3
- package/dist/classes/compressors.js +11 -13
- package/dist/classes/daddy.js +1 -3
- package/dist/classes/distro.js +23 -4
- package/dist/classes/families/archlinux.js +7 -9
- package/dist/classes/families/debian.js +1 -1
- package/dist/classes/families/fedora.js +1 -1
- package/dist/classes/families/suse.js +1 -1
- package/dist/classes/incubation/branding.js +9 -3
- package/dist/classes/incubation/distros/bionic.js +8 -3
- package/dist/classes/incubation/distros/buster.js +8 -3
- package/dist/classes/incubation/distros/focal.js +8 -3
- package/dist/classes/incubation/distros/jessie.js +6 -3
- package/dist/classes/incubation/distros/rolling.js +8 -4
- package/dist/classes/incubation/fisherman-helper/packages.js +5 -2
- package/dist/classes/incubation/fisherman.js +18 -3
- package/dist/classes/incubation/incubator.js +7 -2
- package/dist/classes/incubation/installer.js +3 -1
- package/dist/classes/initrd.js +5 -5
- package/dist/classes/keyboards.js +4 -4
- package/dist/classes/network.js +7 -7
- package/dist/classes/ovary.js +136 -176
- package/dist/classes/pacman.js +12 -14
- package/dist/classes/pve-live.js +1 -1
- package/dist/classes/pxe.js +10 -12
- package/dist/classes/settings.js +19 -18
- package/dist/classes/systemctl.js +1 -1
- package/dist/classes/tailor.js +6 -6
- package/dist/classes/tools.js +4 -6
- package/dist/classes/users.js +10 -0
- package/dist/classes/utils.js +30 -0
- package/dist/classes/xdg.js +21 -8
- package/dist/classes/yolk.js +3 -5
- package/dist/commands/adapt.js +8 -8
- package/dist/commands/analyze.js +9 -12
- package/dist/commands/calamares.js +20 -23
- package/dist/commands/config.js +13 -13
- package/dist/commands/cuckoo.js +7 -7
- package/dist/commands/dad.js +12 -12
- package/dist/commands/export/deb.js +20 -25
- package/dist/commands/export/iso.js +11 -11
- package/dist/commands/install.js +41 -37
- package/dist/commands/kill.js +12 -15
- package/dist/commands/mom.js +7 -7
- package/dist/commands/produce.js +71 -47
- package/dist/commands/status.js +8 -8
- package/dist/commands/syncfrom.js +34 -40
- package/dist/commands/syncto.js +142 -202
- package/dist/commands/tools/clean.js +9 -9
- package/dist/commands/tools/ppa.js +12 -12
- package/dist/commands/tools/skel.js +10 -10
- package/dist/commands/tools/stat.js +11 -11
- package/dist/commands/tools/yolk.js +9 -9
- package/dist/commands/update.js +8 -8
- package/dist/commands/wardrobe/get.js +13 -10
- package/dist/commands/wardrobe/list.js +15 -13
- package/dist/commands/wardrobe/show.js +16 -13
- package/dist/commands/wardrobe/wear.js +16 -14
- package/dist/components/summary.js +5 -2
- package/dist/interfaces/i-analyze.js +8 -10
- package/dist/interfaces/{i-filters.js → i-excludes.js} +0 -1
- package/dist/krill/krill-prepare.js +23 -11
- package/dist/krill/krill-sequence.js +72 -73
- package/dist/krill/modules/fstab.js +59 -32
- package/dist/krill/modules/mkfs.js +29 -16
- package/dist/krill/modules/network-cfg.js +22 -21
- package/dist/krill/modules/partition.js +3 -3
- package/dist/lib/dependencies.js +1 -0
- package/dist/lib/select_filesystem_type.js +6 -1
- package/manpages/doc/man/eggs.1.gz +0 -0
- package/manpages/doc/man/eggs.html +128 -74
- package/mkinitcpio/biglinux/live.conf +74 -0
- package/mkinitcpio/biglinux/mkinitcpio.conf +73 -0
- package/package.json +43 -41
- package/scripts/_eggs +17 -14
- package/scripts/eggs.bash +6 -6
- package/conf/distros/rolling/calamares-32/modules/displaymanager.yml +0 -23
- package/conf/distros/rolling/calamares-32/modules/finished.yml +0 -6
- package/conf/distros/rolling/calamares-32/modules/fstab.yml +0 -14
- package/conf/distros/rolling/calamares-32/modules/locale.yml +0 -11
- package/conf/distros/rolling/calamares-32/modules/mount.yml +0 -39
- package/conf/distros/rolling/calamares-32/modules/packages.yml +0 -11
- package/conf/distros/rolling/calamares-32/modules/partition.yml +0 -283
- package/conf/distros/rolling/calamares-32/modules/shellprocess_removelink.yml +0 -8
- package/conf/distros/rolling/calamares-32/modules/unpackfs.yml +0 -7
- package/conf/distros/rolling/calamares-32/modules/users.yml +0 -20
- package/conf/exclude.list.custom +0 -3
- package/manpages/doc/man/README.md +0 -0
|
@@ -24,6 +24,13 @@ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
class Incubator {
|
|
27
|
+
verbose = false;
|
|
28
|
+
installer = {};
|
|
29
|
+
remix;
|
|
30
|
+
distro;
|
|
31
|
+
user_opt;
|
|
32
|
+
theme;
|
|
33
|
+
isClone;
|
|
27
34
|
/**
|
|
28
35
|
*
|
|
29
36
|
* @param remix
|
|
@@ -31,8 +38,6 @@ class Incubator {
|
|
|
31
38
|
* @param verbose
|
|
32
39
|
*/
|
|
33
40
|
constructor(remix, distro, user_opt = 'live', theme = 'eggs', isClone = false, verbose = false) {
|
|
34
|
-
this.verbose = false;
|
|
35
|
-
this.installer = {};
|
|
36
41
|
this.installer = (0, installer_1.installer)();
|
|
37
42
|
this.remix = remix;
|
|
38
43
|
this.distro = distro;
|
|
@@ -32,9 +32,11 @@ function installer() {
|
|
|
32
32
|
const distro = new distro_1.default(remix);
|
|
33
33
|
if (distro.isCalamaresAvailable) {
|
|
34
34
|
installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares/';
|
|
35
|
+
/*
|
|
35
36
|
if (distro.distroId === 'ManjaroLinux') {
|
|
36
|
-
|
|
37
|
+
installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares-3.2/'
|
|
37
38
|
}
|
|
39
|
+
*/
|
|
38
40
|
installer.templateModules = installer.template + 'modules/';
|
|
39
41
|
installer.templateMultiarch = installer.template + 'calamares-modules/';
|
|
40
42
|
}
|
package/dist/classes/initrd.js
CHANGED
|
@@ -19,12 +19,12 @@ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
|
19
19
|
* cryptsetup
|
|
20
20
|
*/
|
|
21
21
|
class Initrd {
|
|
22
|
+
workDir = '/tmp/initrd-extracted';
|
|
23
|
+
compression = 'gzip';
|
|
24
|
+
initrdSrc = '/initrd.img';
|
|
25
|
+
initrdDest = '/home/eggs/ovarium/iso/live';
|
|
26
|
+
fsLive = '/home/eggs/ovarium/filesystem';
|
|
22
27
|
constructor(initrdSrc = '/initrd.img', initrdDest = '/home/eggs/mnt/ovarium/iso/live/initrd.img', fsLive = '/home/eggs/ovarium/filesystem') {
|
|
23
|
-
this.workDir = '/tmp/initrd-extracted';
|
|
24
|
-
this.compression = 'gzip';
|
|
25
|
-
this.initrdSrc = '/initrd.img';
|
|
26
|
-
this.initrdDest = '/home/eggs/ovarium/iso/live';
|
|
27
|
-
this.fsLive = '/home/eggs/ovarium/filesystem';
|
|
28
28
|
this.initrdSrc = initrdSrc;
|
|
29
29
|
this.initrdDest = initrdDest;
|
|
30
30
|
this.fsLive = fsLive;
|
|
@@ -18,11 +18,11 @@ const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
|
18
18
|
* /usr/share/X11/xkb/rules/xorg.lst
|
|
19
19
|
*/
|
|
20
20
|
class Keyboard {
|
|
21
|
+
models = [];
|
|
22
|
+
layouts = [];
|
|
23
|
+
variants = [];
|
|
24
|
+
options = [];
|
|
21
25
|
constructor() {
|
|
22
|
-
this.models = [];
|
|
23
|
-
this.layouts = [];
|
|
24
|
-
this.variants = [];
|
|
25
|
-
this.options = [];
|
|
26
26
|
const xorg = '/usr/share/X11/xkb/rules/xorg.lst';
|
|
27
27
|
if (fs_1.default.existsSync(xorg)) {
|
|
28
28
|
const lines = fs_1.default.readFileSync(xorg, 'utf-8').split('\n');
|
package/dist/classes/network.js
CHANGED
|
@@ -14,17 +14,17 @@ const os_1 = tslib_1.__importDefault(require("os"));
|
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
16
|
class Network {
|
|
17
|
+
address = '';
|
|
18
|
+
cidr = '';
|
|
19
|
+
family = '';
|
|
20
|
+
internal = false;
|
|
21
|
+
mac = '';
|
|
22
|
+
netmask = '';
|
|
23
|
+
o = {};
|
|
17
24
|
/**
|
|
18
25
|
*
|
|
19
26
|
*/
|
|
20
27
|
constructor() {
|
|
21
|
-
this.address = '';
|
|
22
|
-
this.cidr = '';
|
|
23
|
-
this.family = '';
|
|
24
|
-
this.internal = false;
|
|
25
|
-
this.mac = '';
|
|
26
|
-
this.netmask = '';
|
|
27
|
-
this.o = {};
|
|
28
28
|
const interfaces = os_1.default.networkInterfaces();
|
|
29
29
|
const address = '';
|
|
30
30
|
if (interfaces !== undefined) {
|
package/dist/classes/ovary.js
CHANGED
|
@@ -39,25 +39,20 @@ const cli_autologin_1 = tslib_1.__importDefault(require("../lib/cli-autologin"))
|
|
|
39
39
|
* Ovary:
|
|
40
40
|
*/
|
|
41
41
|
class Ovary {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.ovarium = '';
|
|
57
|
-
/**
|
|
58
|
-
* END CLASS ovary
|
|
59
|
-
*/
|
|
60
|
-
}
|
|
42
|
+
verbose = false;
|
|
43
|
+
echo = {};
|
|
44
|
+
toNull = '';
|
|
45
|
+
incubator = {};
|
|
46
|
+
settings = {};
|
|
47
|
+
familyId = '';
|
|
48
|
+
snapshot_prefix = '';
|
|
49
|
+
snapshot_basename = '';
|
|
50
|
+
compression = '';
|
|
51
|
+
theme = '';
|
|
52
|
+
clone = false;
|
|
53
|
+
cryptedclone = false;
|
|
54
|
+
cliAutologin = new cli_autologin_1.default();
|
|
55
|
+
nest = '';
|
|
61
56
|
/**
|
|
62
57
|
* @returns {boolean} success
|
|
63
58
|
*/
|
|
@@ -65,6 +60,7 @@ class Ovary {
|
|
|
65
60
|
this.settings = new settings_1.default();
|
|
66
61
|
if (await this.settings.load()) {
|
|
67
62
|
this.familyId = this.settings.distro.familyId;
|
|
63
|
+
this.nest = this.settings.config.snapshot_mnt;
|
|
68
64
|
if (snapshot_prefix !== '') {
|
|
69
65
|
this.settings.config.snapshot_prefix = snapshot_prefix;
|
|
70
66
|
}
|
|
@@ -84,7 +80,6 @@ class Ovary {
|
|
|
84
80
|
if (await utils_2.default.customConfirm('Select yes to continue...')) {
|
|
85
81
|
return true;
|
|
86
82
|
}
|
|
87
|
-
this.settings.work_dir.ovarium = this.settings.config.snapshot_dir + 'ovarium/';
|
|
88
83
|
}
|
|
89
84
|
return false;
|
|
90
85
|
}
|
|
@@ -101,7 +96,7 @@ class Ovary {
|
|
|
101
96
|
* @param unsecure
|
|
102
97
|
* @param verbose
|
|
103
98
|
*/
|
|
104
|
-
async produce(clone = false, cryptedclone = false, scriptOnly = false, yolkRenew = false, release = false, myAddons,
|
|
99
|
+
async produce(clone = false, cryptedclone = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, myLinks, excludes, nointeractive = false, noicons = false, unsecure = false, verbose = false) {
|
|
105
100
|
this.verbose = verbose;
|
|
106
101
|
this.echo = utils_2.default.setEcho(verbose);
|
|
107
102
|
if (this.verbose) {
|
|
@@ -109,10 +104,8 @@ class Ovary {
|
|
|
109
104
|
}
|
|
110
105
|
this.clone = clone;
|
|
111
106
|
this.cryptedclone = cryptedclone;
|
|
112
|
-
const luksName = 'luks-
|
|
107
|
+
const luksName = 'luks-volume';
|
|
113
108
|
const luksFile = `/tmp/${luksName}`;
|
|
114
|
-
// let luksDevice = `/dev/mapper/${this.luksName}`
|
|
115
|
-
// let luksMountpoint = `/mnt`
|
|
116
109
|
if (this.familyId === 'debian' && utils_2.default.uefiArch() === 'amd64') {
|
|
117
110
|
const yolk = new yolk_1.default();
|
|
118
111
|
if (!yolk.exists()) {
|
|
@@ -147,24 +140,28 @@ class Ovary {
|
|
|
147
140
|
await bleach.clean(verbose);
|
|
148
141
|
}
|
|
149
142
|
}
|
|
150
|
-
/**
|
|
151
|
-
* cryptedclone
|
|
152
|
-
*/
|
|
153
143
|
if (cryptedclone) {
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
/**
|
|
145
|
+
* cryptedclone
|
|
146
|
+
*/
|
|
147
|
+
console.log('eggs will SAVE users and users\' data ENCRYPTED');
|
|
148
|
+
/*
|
|
149
|
+
const users = await this.usersFill()
|
|
156
150
|
for (const user of users) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
console.log(`- ${utype}: ${user.login.padEnd(16)} \thome: ${user.home}`);
|
|
163
|
-
if (user.login !== 'root') {
|
|
164
|
-
this.addRemoveExclusion(true, user.home);
|
|
165
|
-
}
|
|
151
|
+
if (user.saveIt) {
|
|
152
|
+
let utype = 'user '
|
|
153
|
+
if (Number.parseInt(user.uid) < 1000) {
|
|
154
|
+
utype = 'service'
|
|
166
155
|
}
|
|
156
|
+
//console.log(`- ${utype}: ${user.login.padEnd(16)} \thome: ${user.home}`)
|
|
157
|
+
if (user.login !== 'root') {
|
|
158
|
+
this.addRemoveExclusion(true, user.home)
|
|
159
|
+
}
|
|
160
|
+
}
|
|
167
161
|
}
|
|
162
|
+
*/
|
|
163
|
+
}
|
|
164
|
+
else if (this.clone) {
|
|
168
165
|
/**
|
|
169
166
|
* clone
|
|
170
167
|
*
|
|
@@ -172,52 +169,52 @@ class Ovary {
|
|
|
172
169
|
* real user when create a clone,
|
|
173
170
|
* this is WRONG here we correct
|
|
174
171
|
*/
|
|
175
|
-
}
|
|
176
|
-
else if (this.clone) {
|
|
177
172
|
this.settings.config.user_opt = 'live'; // patch for humans
|
|
178
173
|
this.settings.config.user_opt_passwd = 'evolution';
|
|
179
174
|
this.settings.config.root_passwd = 'evolution';
|
|
180
175
|
utils_2.default.warning('eggs will SAVE users and users\' data UNCRYPTED on the live');
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
181
178
|
/**
|
|
182
179
|
* normal
|
|
183
180
|
*/
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
181
|
utils_2.default.warning('eggs will REMOVE users and users\' data from live');
|
|
187
182
|
}
|
|
188
183
|
/**
|
|
189
|
-
* exclude.list
|
|
184
|
+
* create exclude.list in not exists or static
|
|
190
185
|
*/
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
186
|
+
if (!fs_1.default.existsSync("/etc/penguins-eggs/exclude.list") || excludes.static) {
|
|
187
|
+
let excludeListTemplateDir = '/etc/penguins-eggs.d/exclude.list.d/';
|
|
188
|
+
let excludeListTemplate = excludeListTemplateDir + 'master.list';
|
|
189
|
+
if (!fs_1.default.existsSync(excludeListTemplate)) {
|
|
190
|
+
utils_2.default.warning('Cannot find: ' + excludeListTemplate);
|
|
191
|
+
process.exit(1);
|
|
192
|
+
}
|
|
193
|
+
let excludeHome = '';
|
|
194
|
+
let excludeMine = '';
|
|
195
|
+
let excludeUsr = '';
|
|
196
|
+
let excludeVar = '';
|
|
197
|
+
if (excludes.mine) {
|
|
198
|
+
excludeMine = `home/${await utils_2.default.getPrimaryUser()}/*`;
|
|
199
|
+
}
|
|
200
|
+
if (excludes.home) {
|
|
201
|
+
excludeHome = fs_1.default.readFileSync(`${excludeListTemplateDir}home.list`, 'utf8');
|
|
202
|
+
}
|
|
203
|
+
if (excludes.usr) {
|
|
204
|
+
excludeUsr = fs_1.default.readFileSync(`${excludeListTemplateDir}usr.list`, 'utf8');
|
|
205
|
+
}
|
|
206
|
+
if (excludes.var) {
|
|
207
|
+
excludeVar = fs_1.default.readFileSync(`${excludeListTemplateDir}var.list`, 'utf8');
|
|
208
|
+
}
|
|
209
|
+
let view = {
|
|
210
|
+
home_list: excludeHome,
|
|
211
|
+
mine_list: excludeMine,
|
|
212
|
+
usr_list: excludeUsr,
|
|
213
|
+
var_list: excludeVar
|
|
214
|
+
};
|
|
215
|
+
const template = fs_1.default.readFileSync(excludeListTemplate, 'utf8');
|
|
216
|
+
fs_1.default.writeFileSync(this.settings.config.snapshot_excludes, mustache_1.default.render(template, view));
|
|
217
|
+
}
|
|
221
218
|
/**
|
|
222
219
|
* NOTE: reCreate = false
|
|
223
220
|
*
|
|
@@ -257,7 +254,7 @@ class Ovary {
|
|
|
257
254
|
await this.cleanUsersAccounts();
|
|
258
255
|
await this.createUserLive();
|
|
259
256
|
if (pacman_1.default.isInstalledGui()) {
|
|
260
|
-
await this.createXdgAutostart(this.settings.config.theme, myAddons, noicons);
|
|
257
|
+
await this.createXdgAutostart(this.settings.config.theme, myAddons, myLinks, noicons);
|
|
261
258
|
/**
|
|
262
259
|
* GUI installed but NOT Desktop Manager: just create motd and issue
|
|
263
260
|
*/
|
|
@@ -277,11 +274,13 @@ class Ovary {
|
|
|
277
274
|
await this.uBindLiveFs(); // Lo smonto prima della fase di backup
|
|
278
275
|
}
|
|
279
276
|
if (cryptedclone) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
await (0, utils_1.exec)(
|
|
277
|
+
let synctoCmd = `eggs syncto -f ${luksFile}`;
|
|
278
|
+
if (excludes.home) {
|
|
279
|
+
synctoCmd += ' --excludes'; // from Marco, usa home.list
|
|
280
|
+
}
|
|
281
|
+
await (0, utils_1.exec)(synctoCmd, utils_2.default.setEcho(true));
|
|
282
|
+
utils_2.default.warning(`moving ${luksFile} in ${this.nest}iso/live`);
|
|
283
|
+
await (0, utils_1.exec)(`mv ${luksFile} ${this.nest}iso/live`, this.echo);
|
|
285
284
|
}
|
|
286
285
|
const mkIsofsCmd = this.xorrisoCommand(clone, cryptedclone).replace(/\s\s+/g, ' ');
|
|
287
286
|
const info = utils_2.default.getVolid(this.settings.remix.name);
|
|
@@ -315,20 +314,19 @@ class Ovary {
|
|
|
315
314
|
await (0, utils_1.exec)(`chmod +x ${file}`);
|
|
316
315
|
}
|
|
317
316
|
/**
|
|
318
|
-
* patch to emulate miso/archiso on archilinux
|
|
317
|
+
* patch to emulate miso/archiso on archilinux family
|
|
319
318
|
*/
|
|
320
319
|
if (this.familyId === 'archlinux') {
|
|
321
320
|
let pathName = `arch/x86_64/airootfs`;
|
|
322
321
|
let hashCmd = 'sha512sum';
|
|
323
322
|
let hashExt = '.sha512';
|
|
324
|
-
if (this.settings.distro.distroId
|
|
323
|
+
if (isMiso(this.settings.distro.distroId)) {
|
|
325
324
|
pathName = `manjaro/x86_64/livefs`;
|
|
326
325
|
hashCmd = `md5sum`;
|
|
327
326
|
hashExt = '.md5';
|
|
328
327
|
}
|
|
329
328
|
await (0, utils_1.exec)(`mkdir ${this.settings.iso_work}${pathName}/x86_64 -p`, this.echo);
|
|
330
|
-
|
|
331
|
-
await (0, utils_1.exec)(`${hashCmd} ${this.settings.iso_work}${pathName}.sfs > ${this.settings.iso_work}${pathName}${hashExt}`, this.echo);
|
|
329
|
+
fs_1.default.linkSync(`${this.settings.iso_work}live/filesystem.squashfs`, `${this.settings.iso_work}${pathName}.sfs`);
|
|
332
330
|
}
|
|
333
331
|
await this.makeIso(mkIsofsCmd, scriptOnly);
|
|
334
332
|
}
|
|
@@ -468,7 +466,9 @@ class Ovary {
|
|
|
468
466
|
await (0, utils_1.exec)(`sed -i '/PermitRootLogin/d' ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
|
|
469
467
|
await (0, utils_1.exec)(`sed -i '/PasswordAuthentication/d' ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
|
|
470
468
|
if (this.settings.config.ssh_pass) {
|
|
471
|
-
|
|
469
|
+
/** removed on 2023-12-28
|
|
470
|
+
* await exec(`echo 'PermitRootLogin yes' | tee -a ${this.settings.work_dir.merged}/etc/ssh/sshd_config`)
|
|
471
|
+
*/
|
|
472
472
|
await (0, utils_1.exec)(`echo 'PasswordAuthentication yes' | tee -a ${this.settings.work_dir.merged}/etc/ssh/sshd_config`);
|
|
473
473
|
}
|
|
474
474
|
else {
|
|
@@ -732,14 +732,14 @@ class Ovary {
|
|
|
732
732
|
let kp = `boot=live components locales=${process.env.LANG}`;
|
|
733
733
|
if (this.familyId === 'archlinux') {
|
|
734
734
|
const volid = utils_2.default.getVolid(this.settings.remix.name);
|
|
735
|
-
if (
|
|
736
|
-
kp += ` archisobasedir=arch archisolabel=${volid}`;
|
|
737
|
-
}
|
|
738
|
-
else if (distroId === 'ManjaroLinux') {
|
|
735
|
+
if (isMiso(distroId)) {
|
|
739
736
|
kp += ` misobasedir=manjaro misolabel=${volid}`;
|
|
740
737
|
}
|
|
741
|
-
|
|
738
|
+
else {
|
|
739
|
+
kp += ` archisobasedir=arch archisolabel=${volid}`;
|
|
740
|
+
}
|
|
742
741
|
}
|
|
742
|
+
kp += ` cow_spacesize=4G`;
|
|
743
743
|
return kp;
|
|
744
744
|
}
|
|
745
745
|
/**
|
|
@@ -772,8 +772,11 @@ class Ovary {
|
|
|
772
772
|
utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
|
|
773
773
|
const distroId = this.settings.distro.distroId;
|
|
774
774
|
let fileConf = 'arch';
|
|
775
|
-
if (
|
|
776
|
-
fileConf =
|
|
775
|
+
if (isMiso(distroId)) {
|
|
776
|
+
fileConf = "manjarolinux";
|
|
777
|
+
if (distroId.toLowerCase().includes("biglinux")) {
|
|
778
|
+
fileConf = "biglinux";
|
|
779
|
+
}
|
|
777
780
|
}
|
|
778
781
|
let pathConf = node_path_1.default.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
|
|
779
782
|
await (0, utils_1.exec)(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, utils_2.default.setEcho(true));
|
|
@@ -1190,12 +1193,12 @@ class Ovary {
|
|
|
1190
1193
|
/**
|
|
1191
1194
|
*
|
|
1192
1195
|
*/
|
|
1193
|
-
async createXdgAutostart(theme = 'eggs', myAddons, noicons = false) {
|
|
1196
|
+
async createXdgAutostart(theme = 'eggs', myAddons, myLinks = [], noicons = false) {
|
|
1194
1197
|
if (this.verbose) {
|
|
1195
1198
|
console.log('Ovary: createXdgAutostart');
|
|
1196
1199
|
}
|
|
1197
1200
|
const pathHomeLive = `/home/${this.settings.config.user_opt}`;
|
|
1198
|
-
if (noicons) { // NO
|
|
1201
|
+
if (noicons) { // NO icons
|
|
1199
1202
|
shelljs_1.default.rm(`${this.settings.work_dir.merged}/etc/xdg/autostart/penguins-links-add.desktop`);
|
|
1200
1203
|
}
|
|
1201
1204
|
else { // VOGLIO le icone
|
|
@@ -1297,6 +1300,11 @@ class Ovary {
|
|
|
1297
1300
|
}
|
|
1298
1301
|
else {
|
|
1299
1302
|
text += 'cp /usr/share/applications/penguins-eggs.desktop "$DESKTOP"\n';
|
|
1303
|
+
if (myLinks.length > 0) {
|
|
1304
|
+
for (const link of myLinks) {
|
|
1305
|
+
text += `cp /usr/share/applications/${link}.desktop "$DESKTOP"\n`;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1300
1308
|
if (myAddons.adapt)
|
|
1301
1309
|
text += 'cp /usr/share/applications/eggs-adapt.desktop "$DESKTOP"\n';
|
|
1302
1310
|
if (myAddons.pve)
|
|
@@ -1352,7 +1360,7 @@ class Ovary {
|
|
|
1352
1360
|
/**
|
|
1353
1361
|
* Add or remove exclusion
|
|
1354
1362
|
* @param add {boolean} true = add, false remove
|
|
1355
|
-
* @param exclusion {
|
|
1363
|
+
* @param exclusion {string} path to add/remove
|
|
1356
1364
|
*/
|
|
1357
1365
|
addRemoveExclusion(add, exclusion) {
|
|
1358
1366
|
if (this.verbose) {
|
|
@@ -1638,85 +1646,28 @@ class Ovary {
|
|
|
1638
1646
|
uefi_isohybridGptBasdat = '-isohybrid-gpt-basdat';
|
|
1639
1647
|
uefi_noEmulBoot = '-no-emul-boot';
|
|
1640
1648
|
}
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
* -joliet-long
|
|
1664
|
-
* -cache-inodes
|
|
1665
|
-
* -isohybrid-mbr syslinux/usr/lib/ISOLINUX/isohdpfx.bin
|
|
1666
|
-
* -b isolinux/isolinux.bin
|
|
1667
|
-
* -c isolinux/boot.cat
|
|
1668
|
-
* -boot-load-size 4
|
|
1669
|
-
* -boot-info-table
|
|
1670
|
-
* -no-emul-boot
|
|
1671
|
-
* -uefi_elToritoAltBoot-alt-boot
|
|
1672
|
-
* -e boot/grub/efi.img
|
|
1673
|
-
* -no-emul-boot
|
|
1674
|
-
* -isohybrid-gpt-basdat
|
|
1675
|
-
* isohybrid-apm-hfsplus
|
|
1676
|
-
* boot1 CD1
|
|
1677
|
-
|
|
1678
|
-
command = `xorriso -as mkisofs \
|
|
1679
|
-
-r \
|
|
1680
|
-
-checksum_algorithm_iso md5,sha1,sha256,sha512 \
|
|
1681
|
-
-V ${volid} \
|
|
1682
|
-
-o ${output} \
|
|
1683
|
-
-J \
|
|
1684
|
-
-joliet-long \
|
|
1685
|
-
-cache-inodes \
|
|
1686
|
-
${isoHybridMbr} \
|
|
1687
|
-
-b isolinux/isolinux.bin \
|
|
1688
|
-
-c isolinux/boot.cat \
|
|
1689
|
-
-boot-load-size 4 \
|
|
1690
|
-
-boot-info-table \
|
|
1691
|
-
-no-emul-boot \
|
|
1692
|
-
${uefi_eltoritoAltBoot} \
|
|
1693
|
-
${uefi_e} \
|
|
1694
|
-
${uefi_noEmulBoot} \
|
|
1695
|
-
${uefi_isohybridGptBasdat}
|
|
1696
|
-
${this.settings.iso_work}`
|
|
1697
|
-
*/
|
|
1698
|
-
/**
|
|
1699
|
-
* how is made in refracta
|
|
1700
|
-
*
|
|
1701
|
-
* -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin
|
|
1702
|
-
* uefi_opt="-eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot"
|
|
1703
|
-
*
|
|
1704
|
-
* xorriso -as mkisofs -r \
|
|
1705
|
-
* -J \
|
|
1706
|
-
* -joliet-long \
|
|
1707
|
-
* -l \
|
|
1708
|
-
* -iso-level 3 \
|
|
1709
|
-
* ${isohybrid_opt} \
|
|
1710
|
-
* -partition_offset 16 \
|
|
1711
|
-
* -V "$volid" \
|
|
1712
|
-
* -b isolinux/isolinux.bin \
|
|
1713
|
-
* -c isolinux/boot.cat \
|
|
1714
|
-
* -no-emul-boot \
|
|
1715
|
-
* -boot-load-size 4 \
|
|
1716
|
-
* -boot-info-table \
|
|
1717
|
-
* ${uefi_opt} \
|
|
1718
|
-
* -o "$snapshot_dir"/"$filename" iso/
|
|
1719
|
-
*/
|
|
1649
|
+
// geniisoimage from Hosein
|
|
1650
|
+
if (pacman_1.default.packageIsInstalled('genisoimage')) {
|
|
1651
|
+
command = `genisoimage \
|
|
1652
|
+
-iso-level 3 \
|
|
1653
|
+
-allow-limited-size \
|
|
1654
|
+
-joliet-long \
|
|
1655
|
+
-r \
|
|
1656
|
+
-V "-V3.0" \
|
|
1657
|
+
-cache-inodes \
|
|
1658
|
+
-J \
|
|
1659
|
+
-l \
|
|
1660
|
+
-b isolinux/isolinux.bin \
|
|
1661
|
+
-c isolinux/boot.cat \
|
|
1662
|
+
-no-emul-boot \
|
|
1663
|
+
-boot-load-size 4 \
|
|
1664
|
+
-boot-info-table \
|
|
1665
|
+
-eltorito-alt-boot \
|
|
1666
|
+
-e boot/grub/efiboot.img \
|
|
1667
|
+
-o ${output} ${this.settings.iso_work}`;
|
|
1668
|
+
return command;
|
|
1669
|
+
}
|
|
1670
|
+
// xorriso from Piero
|
|
1720
1671
|
command = `xorriso -as mkisofs \
|
|
1721
1672
|
-J \
|
|
1722
1673
|
-joliet-long \
|
|
@@ -1849,12 +1800,21 @@ async function rexec(cmd, verbose = false) {
|
|
|
1849
1800
|
return cmd;
|
|
1850
1801
|
}
|
|
1851
1802
|
/**
|
|
1852
|
-
*
|
|
1803
|
+
* isMiso
|
|
1853
1804
|
*/
|
|
1854
|
-
function
|
|
1805
|
+
function isMiso(distro) {
|
|
1855
1806
|
let found = false;
|
|
1856
|
-
if (distro
|
|
1807
|
+
if ((distro.includes('ManjaroLinux')) ||
|
|
1808
|
+
distro.toLowerCase().includes("biglinux")) {
|
|
1857
1809
|
found = true;
|
|
1858
1810
|
}
|
|
1859
1811
|
return found;
|
|
1860
1812
|
}
|
|
1813
|
+
/**
|
|
1814
|
+
* se non zuppa, pan bagnato
|
|
1815
|
+
* @param distro
|
|
1816
|
+
* @returns
|
|
1817
|
+
*/
|
|
1818
|
+
function isArchiso(distro) {
|
|
1819
|
+
return !isMiso(distro);
|
|
1820
|
+
}
|
package/dist/classes/pacman.js
CHANGED
|
@@ -27,10 +27,9 @@ const config_tools = '/etc/penguins-eggs.d/tools.yaml';
|
|
|
27
27
|
* @remarks all the utilities
|
|
28
28
|
*/
|
|
29
29
|
class Pacman {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
30
|
+
static debs4calamares = ['calamares', 'qml-module-qtquick2', 'qml-module-qtquick-controls'];
|
|
31
|
+
distro = {};
|
|
32
|
+
remix = {};
|
|
34
33
|
/**
|
|
35
34
|
*
|
|
36
35
|
* @returns
|
|
@@ -353,11 +352,14 @@ class Pacman {
|
|
|
353
352
|
config.make_md5sum = false;
|
|
354
353
|
config.make_isohybrid = true;
|
|
355
354
|
config.compression = 'xz';
|
|
356
|
-
config.ssh_pass =
|
|
357
|
-
config.timezone = '
|
|
358
|
-
|
|
359
|
-
config.
|
|
360
|
-
config.
|
|
355
|
+
config.ssh_pass = false;
|
|
356
|
+
config.timezone = 'Europe/Rome';
|
|
357
|
+
//config.locales_default = '__NOT_USED_MORE'
|
|
358
|
+
//config.locales = ['__NOT_USED_MORE']
|
|
359
|
+
// config.timezone = 'America/New_York'
|
|
360
|
+
// const env = process.env
|
|
361
|
+
// config.locales_default = env.LANG !== undefined ? env.LANG : 'en_US.UTF-8'
|
|
362
|
+
// config.locales = config.locales_default === 'en_US.UTF-8' ? ['en_US.UTF-8'] : [config.locales_default, 'en_US.UTF-8']
|
|
361
363
|
config.pmount_fixed = false;
|
|
362
364
|
if (!this.calamaresExists()) {
|
|
363
365
|
config.force_installer = false;
|
|
@@ -415,10 +417,7 @@ class Pacman {
|
|
|
415
417
|
shelljs_1.default.chmod('+x', '/etc/penguins-eggs.d/init/cuckoo.sh');
|
|
416
418
|
// creazione cartella exclude.list.d
|
|
417
419
|
(0, node_child_process_1.execSync)(`mkdir -p /etc/penguins-eggs.d/exclude.list.d`);
|
|
418
|
-
shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.
|
|
419
|
-
shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.custom'), '/etc/penguins-eggs.d/exclude.list.d');
|
|
420
|
-
shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.homes'), '/etc/penguins-eggs.d/exclude.list.d');
|
|
421
|
-
shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.usr'), '/etc/penguins-eggs.d/exclude.list.d');
|
|
420
|
+
shelljs_1.default.cp(node_path_1.default.resolve(__dirname, '../../conf/exclude.list.d/*'), '/etc/penguins-eggs.d/exclude.list.d');
|
|
422
421
|
await this.configurationFresh();
|
|
423
422
|
}
|
|
424
423
|
/**
|
|
@@ -767,5 +766,4 @@ class Pacman {
|
|
|
767
766
|
return installed;
|
|
768
767
|
}
|
|
769
768
|
}
|
|
770
|
-
Pacman.debs4calamares = ['calamares', 'qml-module-qtquick2', 'qml-module-qtquick-controls'];
|
|
771
769
|
exports.default = Pacman;
|
package/dist/classes/pve-live.js
CHANGED
|
@@ -20,8 +20,8 @@ const systemctl_1 = tslib_1.__importDefault(require("./systemctl"));
|
|
|
20
20
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
21
21
|
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
22
22
|
class PveLive {
|
|
23
|
+
systemctl = {};
|
|
23
24
|
constructor() {
|
|
24
|
-
this.systemctl = {};
|
|
25
25
|
this.systemctl = new systemctl_1.default();
|
|
26
26
|
}
|
|
27
27
|
create(root = '/') {
|