penguins-eggs 9.1.34 → 9.2.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/README.md +41 -78
- package/addons/eggs/theme/applications/install-debian.desktop +2 -2
- package/conf/distros/bionic/calamares/settings.yml +2 -2
- package/conf/distros/buster/calamares/settings.yml +2 -2
- package/conf/distros/focal/calamares/settings.yml +2 -2
- package/conf/distros/rolling/calamares/modules/machineid.yml +4 -0
- package/conf/distros/rolling/calamares/modules/packages.yml +1 -1
- package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +6 -0
- package/conf/distros/rolling/calamares/settings.yml +4 -11
- package/conf/exclude.list +81 -96
- package/conf/tools.yaml +1 -1
- package/lib/classes/bleach.js +6 -4
- package/lib/classes/daddy.js +2 -1
- package/lib/classes/distro.js +23 -14
- package/lib/classes/family/archlinux.js +8 -4
- package/lib/classes/incubation/distros/bionic.d.ts +1 -1
- package/lib/classes/incubation/distros/bionic.js +1 -1
- package/lib/classes/incubation/distros/buster.d.ts +1 -1
- package/lib/classes/incubation/distros/buster.js +1 -1
- package/lib/classes/incubation/distros/focal.d.ts +1 -1
- package/lib/classes/incubation/distros/focal.js +1 -1
- package/lib/classes/incubation/distros/jessie.d.ts +1 -1
- package/lib/classes/incubation/distros/jessie.js +1 -1
- package/lib/classes/incubation/distros/rolling.d.ts +3 -3
- package/lib/classes/incubation/distros/rolling.js +4 -5
- package/lib/classes/incubation/fisherman-helper/packages.d.ts +4 -0
- package/lib/classes/incubation/fisherman-helper/packages.js +9 -16
- package/lib/classes/incubation/fisherman.d.ts +1 -1
- package/lib/classes/incubation/fisherman.js +24 -10
- package/lib/classes/incubation/incubator.js +26 -22
- package/lib/classes/ovary.d.ts +2 -1
- package/lib/classes/ovary.js +91 -30
- package/lib/classes/pacman.js +5 -5
- package/lib/classes/utils.d.ts +1 -1
- package/lib/classes/utils.js +5 -4
- package/lib/commands/calamares.js +1 -0
- package/lib/commands/{krill.d.ts → install.d.ts} +0 -1
- package/lib/commands/{krill.js → install.js} +6 -24
- package/lib/commands/produce.d.ts +1 -0
- package/lib/commands/produce.js +5 -7
- package/lib/commands/syncfrom.js +1 -1
- package/lib/commands/syncto.js +1 -1
- package/lib/components/elements/information.js +0 -2
- package/lib/krill/krill-prepare.d.ts +3 -1
- package/lib/krill/krill-prepare.js +8 -2
- package/lib/krill/krill-sequence.d.ts +2 -1
- package/lib/krill/krill-sequence.js +36 -33
- package/lib/krill/modules/bootloader.js +28 -2
- package/lib/krill/modules/initramfs.js +14 -2
- package/lib/krill/modules/{l/303/262cale-cfg.d.ts → locale-cfg.d.ts} +0 -0
- package/lib/krill/modules/{l/303/262cale-cfg.js → locale-cfg.js} +0 -0
- package/lib/krill/modules/set-keyboard.js +3 -3
- package/lib/lib/utils.d.ts +27 -0
- package/lib/lib/utils.js +54 -19
- package/mkinitcpio/archlinux/README.md +116 -0
- package/mkinitcpio/manjaro/README.md +4 -0
- package/package.json +11 -10
- package/scripts/_eggs +21 -20
- package/scripts/eggs.bash +4 -4
- package/scripts/mom-cli.sh +23 -79
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/module.yml +0 -9
- package/conf/distros/rolling/calamares/calamares-modules/remove-link/remove-link.sh +0 -3
- package/lib/commands/remove.d.ts +0 -21
- package/lib/commands/remove.js +0 -84
package/lib/classes/ovary.js
CHANGED
|
@@ -47,6 +47,7 @@ class Ovary {
|
|
|
47
47
|
this.snapshot_prefix = '';
|
|
48
48
|
this.snapshot_basename = '';
|
|
49
49
|
this.compression = '';
|
|
50
|
+
this.clone = false;
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* @returns {boolean} success
|
|
@@ -78,8 +79,9 @@ class Ovary {
|
|
|
78
79
|
*
|
|
79
80
|
* @param basename
|
|
80
81
|
*/
|
|
81
|
-
async produce(backup = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, verbose = false) {
|
|
82
|
+
async produce(backup = false, clone = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, verbose = false) {
|
|
82
83
|
this.verbose = verbose;
|
|
84
|
+
this.clone = clone;
|
|
83
85
|
this.echo = utils_2.default.setEcho(verbose);
|
|
84
86
|
if (this.verbose) {
|
|
85
87
|
this.toNull = ' > /dev/null 2>&1';
|
|
@@ -116,7 +118,7 @@ class Ovary {
|
|
|
116
118
|
const bleach = new bleach_1.default();
|
|
117
119
|
await bleach.clean(verbose);
|
|
118
120
|
}
|
|
119
|
-
|
|
121
|
+
// BACKUP
|
|
120
122
|
if (backup) {
|
|
121
123
|
console.log(`Follow users' data and accounts will be saved in a crypted LUKS volume:`);
|
|
122
124
|
const users = await this.usersFill();
|
|
@@ -132,6 +134,14 @@ class Ovary {
|
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
}
|
|
137
|
+
// CLONE
|
|
138
|
+
}
|
|
139
|
+
else if (this.clone) {
|
|
140
|
+
utils_2.default.warning('eggs will SAVE yours users accounts and datas UNCRYPTED on the live');
|
|
141
|
+
// NORMAL
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
utils_2.default.warning('eggs will REMOVE users accounts and datas from live');
|
|
135
145
|
}
|
|
136
146
|
/**
|
|
137
147
|
* NOTE: reCreate = false
|
|
@@ -141,6 +151,9 @@ class Ovary {
|
|
|
141
151
|
*/
|
|
142
152
|
let reCreate = true;
|
|
143
153
|
if (reCreate) { // start pre-backup
|
|
154
|
+
if (this.clone) {
|
|
155
|
+
await (0, utils_1.exec)(`touch ${this.settings.config.snapshot_dir}ovarium/iso/live/is-clone.md`, this.echo);
|
|
156
|
+
}
|
|
144
157
|
/**
|
|
145
158
|
* Anche non accettando l'installazione di calamares
|
|
146
159
|
* viene creata la configurazione dell'installer: krill/calamares
|
|
@@ -165,18 +178,27 @@ class Ovary {
|
|
|
165
178
|
await this.makeEfi(this.settings.config.theme);
|
|
166
179
|
}
|
|
167
180
|
await this.bindLiveFs();
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// If GUI is installed and not Desktop manager
|
|
174
|
-
cliAutologin.addIssue(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
|
|
175
|
-
cliAutologin.addMotd(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
|
|
176
|
-
}
|
|
181
|
+
/**
|
|
182
|
+
* clone
|
|
183
|
+
*/
|
|
184
|
+
if (this.clone) {
|
|
185
|
+
await (0, utils_1.exec)(`touch ${this.settings.config.snapshot_dir}ovarium/iso/live/is-clone.md`, this.echo);
|
|
177
186
|
}
|
|
178
187
|
else {
|
|
179
|
-
|
|
188
|
+
await this.cleanUsersAccounts();
|
|
189
|
+
await this.createUserLive();
|
|
190
|
+
// createXdgAutostart anche per clone
|
|
191
|
+
if (pacman_1.default.isInstalledGui()) {
|
|
192
|
+
await this.createXdgAutostart(this.settings.config.theme, myAddons);
|
|
193
|
+
if ((0, displaymanager_1.displaymanager)() === '') {
|
|
194
|
+
// If GUI is installed and not Desktop manager
|
|
195
|
+
cliAutologin.addIssue(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
|
|
196
|
+
cliAutologin.addMotd(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
cliAutologin.addAutologin(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
|
|
201
|
+
}
|
|
180
202
|
}
|
|
181
203
|
await this.editLiveFs();
|
|
182
204
|
await this.makeSquashfs(scriptOnly);
|
|
@@ -191,11 +213,19 @@ class Ovary {
|
|
|
191
213
|
}
|
|
192
214
|
const xorrisoCommand = this.makeDotDisk(backup);
|
|
193
215
|
/**
|
|
194
|
-
* patch to emulate miso archilinux
|
|
216
|
+
* patch to emulate miso/archiso on archilinux
|
|
195
217
|
*/
|
|
196
218
|
if (this.familyId === 'archlinux') {
|
|
197
219
|
await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}/live/x86_64`, this.echo);
|
|
198
|
-
|
|
220
|
+
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
221
|
+
await (0, utils_1.exec)(`ln ${this.settings.work_dir.pathIso}/live/filesystem.squashfs ${this.settings.work_dir.pathIso}/live/x86_64/livefs.sfs`, this.echo);
|
|
222
|
+
await (0, utils_1.exec)(`md5sum ${this.settings.work_dir.pathIso}/live/filesystem.squashfs > ${this.settings.work_dir.pathIso}/live/x86_64/livefs.md5`, this.echo);
|
|
223
|
+
}
|
|
224
|
+
else if (this.settings.distro.distroId === 'Arch') {
|
|
225
|
+
await (0, utils_1.exec)(`ln ${this.settings.work_dir.pathIso}/live/filesystem.squashfs ${this.settings.work_dir.pathIso}/live/x86_64/airootfs.sfs`, this.echo);
|
|
226
|
+
await (0, utils_1.exec)(`sha512sum ${this.settings.work_dir.pathIso}/live/filesystem.squashfs > ${this.settings.work_dir.pathIso}/live/x86_64/fs.sha512`, this.echo);
|
|
227
|
+
// await exec(`gpg --detach-sign ${this.settings.work_dir.pathIso}/live/filesystem.squashfs ${this.settings.work_dir.pathIso}/live/x86_64/fs.sig`, this.echo)
|
|
228
|
+
}
|
|
199
229
|
}
|
|
200
230
|
await this.makeIso(xorrisoCommand, scriptOnly);
|
|
201
231
|
}
|
|
@@ -214,7 +244,7 @@ class Ovary {
|
|
|
214
244
|
this.tryCatch(cmd);
|
|
215
245
|
}
|
|
216
246
|
if (!fs_1.default.existsSync(this.settings.work_dir.path + '/README.md')) {
|
|
217
|
-
cmd = `cp ${node_path_1.default.resolve(__dirname, '../../conf/README.md')} ${this.settings.work_dir.path}README.md
|
|
247
|
+
cmd = `cp ${node_path_1.default.resolve(__dirname, '../../conf/README.md')} ${this.settings.work_dir.path}README.md`;
|
|
218
248
|
this.tryCatch(cmd);
|
|
219
249
|
}
|
|
220
250
|
if (!fs_1.default.existsSync(this.settings.work_dir.lowerdir)) {
|
|
@@ -508,10 +538,18 @@ class Ovary {
|
|
|
508
538
|
utils_2.default.warning('Cannot find: ' + isolinuxTemplate);
|
|
509
539
|
process.exit();
|
|
510
540
|
}
|
|
541
|
+
/**
|
|
542
|
+
* kernel_parameters are used by miso, archiso
|
|
543
|
+
*/
|
|
511
544
|
let kernel_parameters = `boot=live components locales=${process.env.LANG}`;
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
545
|
+
if (this.familyId === 'archlinux') {
|
|
546
|
+
let volid = utils_2.default.getVolid(this.settings.remix.name);
|
|
547
|
+
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
548
|
+
kernel_parameters += ` misobasedir=live misolabel=${volid}`;
|
|
549
|
+
}
|
|
550
|
+
else if (this.settings.distro.distroId === 'Arch') {
|
|
551
|
+
kernel_parameters += ` archisobasedir=live archisolabel=${volid} cow_spacesize=4G`;
|
|
552
|
+
}
|
|
515
553
|
}
|
|
516
554
|
const template = fs_1.default.readFileSync(isolinuxTemplate, 'utf8');
|
|
517
555
|
const view = {
|
|
@@ -585,7 +623,7 @@ class Ovary {
|
|
|
585
623
|
await (0, utils_1.exec)(`mv /etc/crypttab.saved /etc/crypttab`, this.echo);
|
|
586
624
|
}
|
|
587
625
|
/*
|
|
588
|
-
|
|
626
|
+
|
|
589
627
|
Utils.warning(`initrdCopy`)
|
|
590
628
|
if (this.verbose) {
|
|
591
629
|
console.log('ovary: initrdCopy')
|
|
@@ -597,7 +635,7 @@ class Ovary {
|
|
|
597
635
|
Utils.error(`Cannot find ${this.settings.initrdImg}`)
|
|
598
636
|
lackInitrdImage = true
|
|
599
637
|
}
|
|
600
|
-
|
|
638
|
+
|
|
601
639
|
if (lackInitrdImage) {
|
|
602
640
|
Utils.warning('Try to edit /etc/penguins-eggs.d/eggs.yaml and check for')
|
|
603
641
|
Utils.warning(`initrd_img: ${this.settings.initrd_image}`)
|
|
@@ -615,7 +653,13 @@ class Ovary {
|
|
|
615
653
|
/**
|
|
616
654
|
* exclude all the accurence of cryptdisks in rc0.d, etc
|
|
617
655
|
*/
|
|
618
|
-
let fexcludes = [
|
|
656
|
+
let fexcludes = [
|
|
657
|
+
"/boot/efi/EFI",
|
|
658
|
+
"/etc/fstab",
|
|
659
|
+
"/etc/mtab",
|
|
660
|
+
"/etc/udev/rules.d/70-persistent-cd.rules",
|
|
661
|
+
"/etc/udev/rules.d/70-persistent-net.rules"
|
|
662
|
+
];
|
|
619
663
|
for (let i in fexcludes) {
|
|
620
664
|
this.addRemoveExclusion(true, fexcludes[i]);
|
|
621
665
|
}
|
|
@@ -642,6 +686,7 @@ class Ovary {
|
|
|
642
686
|
fs_1.default.unlinkSync(`${this.settings.work_dir.pathIso}/live/filesystem.squashfs`);
|
|
643
687
|
}
|
|
644
688
|
const compression = `-comp ${this.settings.config.compression}`;
|
|
689
|
+
// let cmd = `mksquashfs ${this.settings.work_dir.merged} ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${compression} -wildcards -ef ${this.settings.config.snapshot_excludes} ${this.settings.session_excludes}`
|
|
645
690
|
let cmd = `mksquashfs ${this.settings.work_dir.merged} ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${compression} -wildcards -ef ${this.settings.config.snapshot_excludes} ${this.settings.session_excludes}`;
|
|
646
691
|
cmd = cmd.replace(/\s\s+/g, ' ');
|
|
647
692
|
utils_2.default.writeX(`${this.settings.work_dir.path}mksquashfs`, cmd);
|
|
@@ -685,7 +730,6 @@ class Ovary {
|
|
|
685
730
|
const nomergedDirs = [
|
|
686
731
|
'cdrom',
|
|
687
732
|
'dev',
|
|
688
|
-
'home',
|
|
689
733
|
'media',
|
|
690
734
|
'mnt',
|
|
691
735
|
'proc',
|
|
@@ -694,6 +738,9 @@ class Ovary {
|
|
|
694
738
|
'swapfile',
|
|
695
739
|
'tmp'
|
|
696
740
|
];
|
|
741
|
+
if (!this.clone) {
|
|
742
|
+
nomergedDirs.push('home');
|
|
743
|
+
}
|
|
697
744
|
// deepin ha due directory /data e recovery
|
|
698
745
|
nomergedDirs.push('data', 'recovery');
|
|
699
746
|
let merged = true;
|
|
@@ -840,6 +887,9 @@ class Ovary {
|
|
|
840
887
|
}
|
|
841
888
|
}
|
|
842
889
|
}
|
|
890
|
+
if (this.clone) {
|
|
891
|
+
cmds.push(await rexec(`umount ${this.settings.work_dir.path}/filesystem.squashfs/home`, this.verbose));
|
|
892
|
+
}
|
|
843
893
|
utils_2.default.writeXs(`${this.settings.work_dir.path}ubind`, cmds);
|
|
844
894
|
}
|
|
845
895
|
/**
|
|
@@ -913,10 +963,13 @@ class Ovary {
|
|
|
913
963
|
}
|
|
914
964
|
else if (this.familyId === 'archlinux') {
|
|
915
965
|
// adduser live to wheel and autologin
|
|
916
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose))
|
|
966
|
+
// cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose))
|
|
917
967
|
// in manjaro they use autologin group for the iso, if not exist create it
|
|
918
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} test $(grep "autologin" /etc/group) || groupadd -r autologin`, this.verbose))
|
|
919
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG autologin ${this.settings.config.user_opt}`, this.verbose))
|
|
968
|
+
// cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} test $(grep "autologin" /etc/group) || chroot ${this.settings.work_dir.merged} groupadd -r autologin`, this.verbose))
|
|
969
|
+
// cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG autologin ${this.settings.config.user_opt}`, this.verbose))
|
|
970
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
|
|
971
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} sudo`, this.verbose));
|
|
972
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
|
|
920
973
|
}
|
|
921
974
|
if (this.familyId === 'debian' || this.familyId === 'archlinux') {
|
|
922
975
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
|
|
@@ -1081,7 +1134,7 @@ class Ovary {
|
|
|
1081
1134
|
*/
|
|
1082
1135
|
addRemoveExclusion(add, exclusion) {
|
|
1083
1136
|
if (exclusion.startsWith('/')) {
|
|
1084
|
-
exclusion = exclusion.slice(1); // remove / initial Non compatible with
|
|
1137
|
+
exclusion = exclusion.slice(1); // remove / initial Non compatible with rsync
|
|
1085
1138
|
}
|
|
1086
1139
|
if (add) {
|
|
1087
1140
|
this.settings.session_excludes += this.settings.session_excludes === '' ? `-e '${exclusion}' ` : ` '${exclusion}' `;
|
|
@@ -1248,10 +1301,18 @@ class Ovary {
|
|
|
1248
1301
|
utils_2.default.warning('Cannot find: ' + grubTemplate);
|
|
1249
1302
|
process.exit();
|
|
1250
1303
|
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1304
|
+
/**
|
|
1305
|
+
* kernel_parameters are used by miso, archiso
|
|
1306
|
+
*/
|
|
1307
|
+
let kernel_parameters = `boot=live components locales=${process.env.LANG}`;
|
|
1308
|
+
if (this.familyId === 'archlinux') {
|
|
1309
|
+
let volid = utils_2.default.getVolid(this.settings.remix.name);
|
|
1310
|
+
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
1311
|
+
kernel_parameters += ` misobasedir=live misolabel=${volid}`;
|
|
1312
|
+
}
|
|
1313
|
+
else if (this.settings.distro.distroId === 'Arch') {
|
|
1314
|
+
kernel_parameters += ` archisobasedir=live archisolabel=${volid} cow_spacesize=4G`;
|
|
1315
|
+
}
|
|
1255
1316
|
}
|
|
1256
1317
|
const grubDest = `${isoDir}/boot/grub/grub.cfg`;
|
|
1257
1318
|
const template = fs_1.default.readFileSync(grubTemplate, 'utf8');
|
package/lib/classes/pacman.js
CHANGED
|
@@ -172,16 +172,16 @@ class Pacman {
|
|
|
172
172
|
static packages(remove = false, verbose = false) {
|
|
173
173
|
let packages = [];
|
|
174
174
|
if (this.distro().familyId === 'debian') {
|
|
175
|
-
packages =
|
|
175
|
+
packages = []; // Debian.packages(remove, verbose)
|
|
176
176
|
}
|
|
177
177
|
else if (this.distro().familyId === 'fedora') {
|
|
178
|
-
packages =
|
|
178
|
+
packages = []; // Fedora.packages(remove, verbose)
|
|
179
179
|
}
|
|
180
180
|
else if (this.distro().familyId === 'archlinux') {
|
|
181
|
-
packages =
|
|
181
|
+
packages = []; // Archlinux.packages(remove, verbose)
|
|
182
182
|
}
|
|
183
183
|
else if (this.distro().familyId === 'suse') {
|
|
184
|
-
packages =
|
|
184
|
+
packages = []; // packages = Suse.packages(remove, verbose)
|
|
185
185
|
}
|
|
186
186
|
return packages;
|
|
187
187
|
}
|
|
@@ -248,7 +248,7 @@ class Pacman {
|
|
|
248
248
|
/**
|
|
249
249
|
*
|
|
250
250
|
*/
|
|
251
|
-
static async calamaresInstall(verbose =
|
|
251
|
+
static async calamaresInstall(verbose = false) {
|
|
252
252
|
if (this.isInstalledGui()) {
|
|
253
253
|
if (this.distro().familyId === 'debian') {
|
|
254
254
|
await debian_1.default.calamaresInstall(verbose);
|
package/lib/classes/utils.d.ts
CHANGED
|
@@ -273,7 +273,7 @@ export default class Utils {
|
|
|
273
273
|
/**
|
|
274
274
|
*
|
|
275
275
|
*/
|
|
276
|
-
static pressKeyToExit(warming?: string,
|
|
276
|
+
static pressKeyToExit(warming?: string, procContinue?: boolean): Promise<void>;
|
|
277
277
|
/**
|
|
278
278
|
* titles
|
|
279
279
|
* Penguin's are gettings alive!
|
package/lib/classes/utils.js
CHANGED
|
@@ -495,7 +495,8 @@ class Utils {
|
|
|
495
495
|
'/lib/live/mount',
|
|
496
496
|
'/lib/live/mount/rootfs/filesystem.squashfs',
|
|
497
497
|
'/live/aufs',
|
|
498
|
-
'/run/miso/sfs/livefs'
|
|
498
|
+
'/run/miso/sfs/livefs',
|
|
499
|
+
'/run/archiso/airootfs' // Arch
|
|
499
500
|
];
|
|
500
501
|
for (let i = 0; i < paths.length; i++) {
|
|
501
502
|
if (Utils.isMountpoint(paths[i])) {
|
|
@@ -741,15 +742,15 @@ class Utils {
|
|
|
741
742
|
/**
|
|
742
743
|
*
|
|
743
744
|
*/
|
|
744
|
-
static async pressKeyToExit(warming = 'Process will end',
|
|
745
|
+
static async pressKeyToExit(warming = 'Process will end', procContinue = true) {
|
|
745
746
|
Utils.warning(warming);
|
|
746
747
|
let msg = 'Press a key to exit...';
|
|
747
|
-
if (
|
|
748
|
+
if (procContinue) {
|
|
748
749
|
msg = 'Press a key to continue...';
|
|
749
750
|
}
|
|
750
751
|
console.log(msg);
|
|
751
752
|
const pressKeyToExit = (0, child_process_1.spawnSync)('read _ ', { shell: true, stdio: [0, 1, 2] });
|
|
752
|
-
if (!
|
|
753
|
+
if (!procContinue) {
|
|
753
754
|
process.exit(0);
|
|
754
755
|
}
|
|
755
756
|
}
|
|
@@ -92,6 +92,7 @@ class Calamares extends core_1.Command {
|
|
|
92
92
|
utils_1.default.warning('Configuring krill');
|
|
93
93
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
94
94
|
this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, verbose);
|
|
95
|
+
console.log('calamares relase: ' + release);
|
|
95
96
|
await this.incubator.config(release);
|
|
96
97
|
}
|
|
97
98
|
}
|
|
@@ -10,7 +10,6 @@ import { Command } from '@oclif/core';
|
|
|
10
10
|
*/
|
|
11
11
|
export default class Install extends Command {
|
|
12
12
|
static flags: {
|
|
13
|
-
cli: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
13
|
crypted: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
14
|
pve: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
15
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
2
|
/**
|
|
5
3
|
* penguins-eggs-v7 based on Debian live
|
|
6
4
|
* author: Piero Proietti
|
|
7
5
|
* email: piero.proietti@gmail.com
|
|
8
6
|
* license: MIT
|
|
9
7
|
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
12
11
|
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
|
|
13
12
|
const krill_prepare_1 = tslib_1.__importDefault(require("../krill/krill-prepare"));
|
|
14
|
-
const pacman_1 = tslib_1.__importDefault(require("../classes/pacman"));
|
|
15
|
-
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
16
13
|
/**
|
|
17
14
|
* Class Install
|
|
18
15
|
*/
|
|
@@ -23,10 +20,6 @@ class Install extends core_1.Command {
|
|
|
23
20
|
async run() {
|
|
24
21
|
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
25
22
|
const { flags } = await this.parse(Install);
|
|
26
|
-
let cli = false;
|
|
27
|
-
if (flags.cli) {
|
|
28
|
-
cli = true;
|
|
29
|
-
}
|
|
30
23
|
let crypted = false;
|
|
31
24
|
if (flags.crypted) {
|
|
32
25
|
crypted = true;
|
|
@@ -35,7 +28,6 @@ class Install extends core_1.Command {
|
|
|
35
28
|
if (flags.pve) {
|
|
36
29
|
pve = true;
|
|
37
30
|
crypted = false;
|
|
38
|
-
cli = true;
|
|
39
31
|
}
|
|
40
32
|
let verbose = false;
|
|
41
33
|
if (flags.verbose) {
|
|
@@ -43,17 +35,8 @@ class Install extends core_1.Command {
|
|
|
43
35
|
}
|
|
44
36
|
if (utils_1.default.isRoot()) {
|
|
45
37
|
if (utils_1.default.isLive()) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
else if (pacman_1.default.packageIsInstalled('calamares') && !cli) {
|
|
50
|
-
utils_1.default.warning('Calamares installer is present, start GUI and choose calamares to install the system');
|
|
51
|
-
utils_1.default.warning('If you still want to use krill, type: ' + chalk_1.default.bold('sudo eggs install --cli'));
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
const krill = new krill_prepare_1.default();
|
|
55
|
-
await krill.prepare(crypted, pve, verbose);
|
|
56
|
-
}
|
|
38
|
+
const krill = new krill_prepare_1.default();
|
|
39
|
+
await krill.prepare(crypted, pve, verbose);
|
|
57
40
|
}
|
|
58
41
|
else {
|
|
59
42
|
utils_1.default.warning('You are in an installed system!');
|
|
@@ -66,12 +49,11 @@ class Install extends core_1.Command {
|
|
|
66
49
|
}
|
|
67
50
|
exports.default = Install;
|
|
68
51
|
Install.flags = {
|
|
69
|
-
cli: core_1.Flags.boolean({ char: 'c', description: 'force use CLI installer' }),
|
|
70
52
|
crypted: core_1.Flags.boolean({ char: 'k', description: 'crypted CLI installation' }),
|
|
71
53
|
pve: core_1.Flags.boolean({ char: 'p', description: 'Proxmox VE install' }),
|
|
72
54
|
help: core_1.Flags.help({ char: 'h' }),
|
|
73
55
|
verbose: core_1.Flags.boolean({ char: 'v', description: 'verbose' })
|
|
74
56
|
};
|
|
75
|
-
Install.aliases = [`
|
|
57
|
+
Install.aliases = [`krill`];
|
|
76
58
|
Install.description = 'command-line system installer - the egg became a penguin!';
|
|
77
|
-
Install.examples = ['$ eggs install\nInstall the system using
|
|
59
|
+
Install.examples = ['$ eggs install\nInstall the system using krill installer\n'];
|
|
@@ -10,6 +10,7 @@ export default class Produce extends Command {
|
|
|
10
10
|
prefix: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
11
11
|
basename: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
12
12
|
backup: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
clone: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
fast: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
normal: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
max: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
package/lib/commands/produce.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
/* eslint-disable unicorn/no-process-exit */
|
|
5
|
-
/* eslint-disable no-process-exit */
|
|
6
|
-
/* eslint-disable no-console */
|
|
7
4
|
/**
|
|
8
5
|
* penguins-eggs-v7 based on Debian live
|
|
9
6
|
* author: Piero Proietti
|
|
@@ -73,6 +70,7 @@ class Produce extends core_1.Command {
|
|
|
73
70
|
compression = compressors.max();
|
|
74
71
|
}
|
|
75
72
|
const backup = flags.backup;
|
|
73
|
+
const clone = flags.clone;
|
|
76
74
|
const verbose = flags.verbose;
|
|
77
75
|
const scriptOnly = flags.script;
|
|
78
76
|
const yolkRenew = flags.yolk;
|
|
@@ -107,7 +105,7 @@ class Produce extends core_1.Command {
|
|
|
107
105
|
const ovary = new ovary_1.default();
|
|
108
106
|
utils_1.default.warning('Produce an egg...');
|
|
109
107
|
if (await ovary.fertilization(prefix, basename, theme, compression)) {
|
|
110
|
-
await ovary.produce(backup, scriptOnly, yolkRenew, release, myAddons, verbose);
|
|
108
|
+
await ovary.produce(backup, clone, scriptOnly, yolkRenew, release, myAddons, verbose);
|
|
111
109
|
ovary.finished(scriptOnly);
|
|
112
110
|
}
|
|
113
111
|
}
|
|
@@ -120,7 +118,8 @@ exports.default = Produce;
|
|
|
120
118
|
Produce.flags = {
|
|
121
119
|
prefix: core_1.Flags.string({ char: 'p', description: 'prefix' }),
|
|
122
120
|
basename: core_1.Flags.string({ description: 'basename' }),
|
|
123
|
-
backup: core_1.Flags.boolean({ char: 'b', description: 'backup mode' }),
|
|
121
|
+
backup: core_1.Flags.boolean({ char: 'b', description: 'backup mode (CRYPTED)' }),
|
|
122
|
+
clone: core_1.Flags.boolean({ char: 'c', description: 'clone mode' }),
|
|
124
123
|
fast: core_1.Flags.boolean({ char: 'f', description: 'fast compression' }),
|
|
125
124
|
normal: core_1.Flags.boolean({ char: 'n', description: 'normal compression' }),
|
|
126
125
|
max: core_1.Flags.boolean({ char: 'm', description: 'max compression' }),
|
|
@@ -130,10 +129,9 @@ Produce.flags = {
|
|
|
130
129
|
help: core_1.Flags.help({ char: 'h' }),
|
|
131
130
|
theme: core_1.Flags.string({ description: 'theme for livecd, calamares branding and partitions' }),
|
|
132
131
|
addons: core_1.Flags.string({ multiple: true, description: 'addons to be used: adapt, ichoice, pve, rsupport' }),
|
|
133
|
-
release: core_1.Flags.boolean({ description: 'release:
|
|
132
|
+
release: core_1.Flags.boolean({ description: 'release: max compression, remove penguins-eggs and calamares after installation' })
|
|
134
133
|
};
|
|
135
134
|
Produce.description = 'produce a live image from your system whithout your data';
|
|
136
|
-
// static aliases = ['spawn', 'lay']
|
|
137
135
|
Produce.examples = [
|
|
138
136
|
'$ sudo eggs produce \nproduce an ISO called [hostname]-[arch]-YYYY-MM-DD_HHMM.iso, compressed xz (standard compression).\nIf hostname=ugo and arch=i386 ugo-x86-2020-08-25_1215.iso\n',
|
|
139
137
|
'$ sudo eggs produce -v\nsame as previuos, but with --verbose output\n',
|
package/lib/commands/syncfrom.js
CHANGED
|
@@ -152,7 +152,7 @@ class Syncfrom extends core_1.Command {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
exports.default = Syncfrom;
|
|
155
|
-
Syncfrom.description = '
|
|
155
|
+
Syncfrom.description = 'restore users and user data from a LUKS volumes';
|
|
156
156
|
Syncfrom.flags = {
|
|
157
157
|
delete: core_1.Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
|
|
158
158
|
// excludeFrom: Flags.string({ description: 'same as rsync --exclude-from=FILE read exclude patterns from FILE' }),
|
package/lib/commands/syncto.js
CHANGED
|
@@ -234,7 +234,7 @@ class Syncto extends core_1.Command {
|
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
exports.default = Syncto;
|
|
237
|
-
Syncto.description = `
|
|
237
|
+
Syncto.description = `saves users and user data in a LUKS volume inside the iso`;
|
|
238
238
|
Syncto.flags = {
|
|
239
239
|
delete: core_1.Flags.string({ description: 'rsync --delete delete extraneous files from dest dirs' }),
|
|
240
240
|
file: core_1.Flags.string({ char: 'f', description: "file LUKS volume encrypted" }),
|
|
@@ -89,8 +89,6 @@ async function information(verbose = false) {
|
|
|
89
89
|
react_1.default.createElement(ink_1.Text, { color: "cyan" },
|
|
90
90
|
settings.distro.distroLike,
|
|
91
91
|
" ",
|
|
92
|
-
settings.distro.releaseLike,
|
|
93
|
-
" ",
|
|
94
92
|
settings.distro.codenameLikeId))))));
|
|
95
93
|
// render(<Distro />)
|
|
96
94
|
const dependencies = await pacman_1.default.prerequisitesCheck();
|
|
@@ -9,11 +9,13 @@ import Locales from '../classes/locales';
|
|
|
9
9
|
import Keyboards from '../classes/keyboards';
|
|
10
10
|
import { INet } from '../interfaces';
|
|
11
11
|
import { IWelcome, ILocation, IKeyboard, IPartitions, IUsers } from '../interfaces/i-krill';
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
12
15
|
export default class Krill {
|
|
13
16
|
locales: Locales;
|
|
14
17
|
keyboards: Keyboards;
|
|
15
18
|
/**
|
|
16
|
-
*
|
|
17
19
|
* @param cryped
|
|
18
20
|
*/
|
|
19
21
|
prepare(cryped?: boolean, pve?: boolean, verbose?: boolean): Promise<void>;
|
|
@@ -69,13 +69,15 @@ const get_gateway_1 = tslib_1.__importDefault(require("../lib/get_gateway"));
|
|
|
69
69
|
const get_domain_1 = tslib_1.__importDefault(require("../lib/get_domain"));
|
|
70
70
|
const get_dns_1 = tslib_1.__importDefault(require("../lib/get_dns"));
|
|
71
71
|
const krill_sequence_1 = tslib_1.__importDefault(require("./krill-sequence"));
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
72
75
|
class Krill {
|
|
73
76
|
constructor() {
|
|
74
77
|
this.locales = new locales_1.default();
|
|
75
78
|
this.keyboards = new keyboards_1.default();
|
|
76
79
|
}
|
|
77
80
|
/**
|
|
78
|
-
*
|
|
79
81
|
* @param cryped
|
|
80
82
|
*/
|
|
81
83
|
async prepare(cryped = false, pve = false, verbose = false) {
|
|
@@ -337,7 +339,7 @@ class Krill {
|
|
|
337
339
|
*/
|
|
338
340
|
async install(location, keyboard, partitions, users, network, verbose = false) {
|
|
339
341
|
const sequence = new krill_sequence_1.default(location, keyboard, partitions, users, network);
|
|
340
|
-
sequence.install(verbose);
|
|
342
|
+
await sequence.install(verbose);
|
|
341
343
|
}
|
|
342
344
|
/**
|
|
343
345
|
* return true if pv exist
|
|
@@ -380,6 +382,10 @@ function redraw(elem) {
|
|
|
380
382
|
shelljs_1.default.exec('clear');
|
|
381
383
|
(0, ink_1.render)(elem, opt);
|
|
382
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
*
|
|
387
|
+
* @param mask
|
|
388
|
+
*/
|
|
383
389
|
function netmask2CIDR(mask) {
|
|
384
390
|
const countCharOccurences = (string, char) => string.split(char).length - 1;
|
|
385
391
|
const decimalToBinary = (dec) => (dec >>> 0).toString(2);
|
|
@@ -53,7 +53,7 @@ import machineId from './modules/machine-id';
|
|
|
53
53
|
import fstab from './modules/fstab';
|
|
54
54
|
import locale from './modules/locale';
|
|
55
55
|
import setKeyboard from './modules/set-keyboard';
|
|
56
|
-
import localeCfg from './modules/
|
|
56
|
+
import localeCfg from './modules/locale-cfg';
|
|
57
57
|
import addUser from './modules/add-user';
|
|
58
58
|
import changePassword from './modules/change-password';
|
|
59
59
|
import networkCfg from './modules/network-cfg';
|
|
@@ -126,6 +126,7 @@ export default class Sequence {
|
|
|
126
126
|
luksFile: string;
|
|
127
127
|
luksDevice: string;
|
|
128
128
|
luksMountpoint: string;
|
|
129
|
+
personalFile: string;
|
|
129
130
|
/**
|
|
130
131
|
* constructor
|
|
131
132
|
*/
|