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
|
@@ -32,7 +32,7 @@ const machine_id_1 = tslib_1.__importDefault(require("./modules/machine-id"));
|
|
|
32
32
|
const fstab_1 = tslib_1.__importDefault(require("./modules/fstab"));
|
|
33
33
|
const locale_1 = tslib_1.__importDefault(require("./modules/locale"));
|
|
34
34
|
const set_keyboard_1 = tslib_1.__importDefault(require("./modules/set-keyboard"));
|
|
35
|
-
const
|
|
35
|
+
const locale_cfg_1 = tslib_1.__importDefault(require("./modules/locale-cfg"));
|
|
36
36
|
// users
|
|
37
37
|
const add_user_1 = tslib_1.__importDefault(require("./modules/add-user"));
|
|
38
38
|
const change_password_1 = tslib_1.__importDefault(require("./modules/change-password"));
|
|
@@ -79,7 +79,7 @@ class Sequence {
|
|
|
79
79
|
this.fstab = fstab_1.default;
|
|
80
80
|
this.locale = locale_1.default;
|
|
81
81
|
this.setKeyboard = set_keyboard_1.default;
|
|
82
|
-
this.localeCfg =
|
|
82
|
+
this.localeCfg = locale_cfg_1.default;
|
|
83
83
|
// users
|
|
84
84
|
this.addUser = add_user_1.default;
|
|
85
85
|
this.changePassword = change_password_1.default;
|
|
@@ -132,6 +132,7 @@ class Sequence {
|
|
|
132
132
|
this.luksFile = '';
|
|
133
133
|
this.luksDevice = '';
|
|
134
134
|
this.luksMountpoint = '';
|
|
135
|
+
this.personalFile = '';
|
|
135
136
|
this.installer = (0, installer_1.installer)();
|
|
136
137
|
this.settings = new settings_1.default();
|
|
137
138
|
this.language = location.language;
|
|
@@ -155,6 +156,8 @@ class Sequence {
|
|
|
155
156
|
this.luksFile = `/run/live/medium/live/${this.luksName}`;
|
|
156
157
|
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
157
158
|
this.luksMountpoint = `/mnt`;
|
|
159
|
+
// per il restore dei dati personali controllo esistenza di is-clone.md
|
|
160
|
+
this.personalFile = `/run/live/medium/live/is-clone.md`;
|
|
158
161
|
}
|
|
159
162
|
/**
|
|
160
163
|
* install
|
|
@@ -177,7 +180,7 @@ class Sequence {
|
|
|
177
180
|
message = "Creating partitions";
|
|
178
181
|
percent = 0.01;
|
|
179
182
|
try {
|
|
180
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
183
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
181
184
|
isPartitioned = await this.partition();
|
|
182
185
|
}
|
|
183
186
|
catch (error) {
|
|
@@ -188,7 +191,7 @@ class Sequence {
|
|
|
188
191
|
message = "Formatting file system ";
|
|
189
192
|
percent = 0.02;
|
|
190
193
|
try {
|
|
191
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
194
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
192
195
|
await this.mkfs();
|
|
193
196
|
}
|
|
194
197
|
catch (error) {
|
|
@@ -208,7 +211,7 @@ class Sequence {
|
|
|
208
211
|
message = "Mounting on target VFS ";
|
|
209
212
|
percent = 0.06;
|
|
210
213
|
try {
|
|
211
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
214
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
212
215
|
await this.mountVfs();
|
|
213
216
|
}
|
|
214
217
|
catch (error) {
|
|
@@ -218,8 +221,7 @@ class Sequence {
|
|
|
218
221
|
message = "Unpacking filesystem ";
|
|
219
222
|
percent = 0.10;
|
|
220
223
|
try {
|
|
221
|
-
|
|
222
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
224
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
223
225
|
await this.unpackfs();
|
|
224
226
|
}
|
|
225
227
|
catch (error) {
|
|
@@ -234,7 +236,7 @@ class Sequence {
|
|
|
234
236
|
percent = 0.37;
|
|
235
237
|
let cmd = 'eggs syncfrom --rootdir /tmp/calamares-krill-root/';
|
|
236
238
|
try {
|
|
237
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
|
|
239
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
|
|
238
240
|
await (0, utils_2.exec)(cmd, utils_1.default.setEcho(true));
|
|
239
241
|
}
|
|
240
242
|
catch (error) {
|
|
@@ -246,7 +248,7 @@ class Sequence {
|
|
|
246
248
|
message = 'sources-yolk';
|
|
247
249
|
percent = 0.40;
|
|
248
250
|
try {
|
|
249
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
|
|
251
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
|
|
250
252
|
await this.execCalamaresModule('sources-yolk');
|
|
251
253
|
}
|
|
252
254
|
catch (error) {
|
|
@@ -257,7 +259,7 @@ class Sequence {
|
|
|
257
259
|
message = 'machineid';
|
|
258
260
|
percent = 0.41;
|
|
259
261
|
try {
|
|
260
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
|
|
262
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
|
|
261
263
|
await this.machineId();
|
|
262
264
|
}
|
|
263
265
|
catch (error) {
|
|
@@ -267,7 +269,7 @@ class Sequence {
|
|
|
267
269
|
message = "Creating fstab ";
|
|
268
270
|
percent = 0.47;
|
|
269
271
|
try {
|
|
270
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
272
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
271
273
|
await this.fstab(this.partitions.installationDevice);
|
|
272
274
|
}
|
|
273
275
|
catch (error) {
|
|
@@ -314,7 +316,7 @@ class Sequence {
|
|
|
314
316
|
message = "Create hostname ";
|
|
315
317
|
percent = 0.53;
|
|
316
318
|
try {
|
|
317
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
319
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
318
320
|
await this.hostname();
|
|
319
321
|
}
|
|
320
322
|
catch (error) {
|
|
@@ -324,7 +326,7 @@ class Sequence {
|
|
|
324
326
|
message = "Creating hosts ";
|
|
325
327
|
percent = 0.60;
|
|
326
328
|
try {
|
|
327
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
329
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
328
330
|
await this.hosts();
|
|
329
331
|
}
|
|
330
332
|
catch (error) {
|
|
@@ -334,7 +336,7 @@ class Sequence {
|
|
|
334
336
|
message = "bootloader-config ";
|
|
335
337
|
percent = 0.62;
|
|
336
338
|
try {
|
|
337
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
339
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
338
340
|
await this.bootloaderConfig();
|
|
339
341
|
}
|
|
340
342
|
catch (error) {
|
|
@@ -344,7 +346,7 @@ class Sequence {
|
|
|
344
346
|
message = "grubcfg ";
|
|
345
347
|
percent = 0.63;
|
|
346
348
|
try {
|
|
347
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
349
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
348
350
|
await this.grubcfg();
|
|
349
351
|
}
|
|
350
352
|
catch (error) {
|
|
@@ -354,7 +356,7 @@ class Sequence {
|
|
|
354
356
|
message = "bootloader ";
|
|
355
357
|
percent = 0.64;
|
|
356
358
|
try {
|
|
357
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
359
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
358
360
|
await this.bootloader();
|
|
359
361
|
}
|
|
360
362
|
catch (error) {
|
|
@@ -364,7 +366,7 @@ class Sequence {
|
|
|
364
366
|
message = "initramfs configure";
|
|
365
367
|
percent = 0.65;
|
|
366
368
|
try {
|
|
367
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
369
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
368
370
|
this.initramfsCfg(this.partitions.installationDevice);
|
|
369
371
|
}
|
|
370
372
|
catch (error) {
|
|
@@ -374,21 +376,21 @@ class Sequence {
|
|
|
374
376
|
message = "initramfs ";
|
|
375
377
|
percent = 0.67;
|
|
376
378
|
try {
|
|
377
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
379
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
378
380
|
await this.initramfs();
|
|
379
381
|
}
|
|
380
382
|
catch (error) {
|
|
381
383
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
382
384
|
}
|
|
383
385
|
/**
|
|
384
|
-
* IF NOT RESTORE USERS DATA
|
|
386
|
+
* IF NOT RESTORE USERS DATA OR PERSONAL BACKUP
|
|
385
387
|
*/
|
|
386
|
-
if (!fs_1.default.existsSync(this.luksFile)) {
|
|
388
|
+
if (!fs_1.default.existsSync(this.luksFile) || fs_1.default.existsSync(this.personalFile)) {
|
|
387
389
|
// delLiveUser
|
|
388
390
|
message = "Removing user live ";
|
|
389
391
|
percent = 0.70;
|
|
390
392
|
try {
|
|
391
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
393
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
392
394
|
await this.delLiveUser();
|
|
393
395
|
}
|
|
394
396
|
catch (error) {
|
|
@@ -398,7 +400,7 @@ class Sequence {
|
|
|
398
400
|
message = "Adding user ";
|
|
399
401
|
percent = 0.73;
|
|
400
402
|
try {
|
|
401
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
403
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
402
404
|
await this.addUser(this.users.name, this.users.password, this.users.fullname, '', '', '');
|
|
403
405
|
}
|
|
404
406
|
catch (error) {
|
|
@@ -408,7 +410,7 @@ class Sequence {
|
|
|
408
410
|
message = "adding user password ";
|
|
409
411
|
percent = 0.77;
|
|
410
412
|
try {
|
|
411
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
413
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
412
414
|
await this.changePassword('root', this.users.rootPassword);
|
|
413
415
|
}
|
|
414
416
|
catch (error) {
|
|
@@ -421,7 +423,7 @@ class Sequence {
|
|
|
421
423
|
message = "autologin GUI";
|
|
422
424
|
percent = 0.80;
|
|
423
425
|
await xdg_1.default.autologin(utils_1.default.getPrimaryUser(), this.users.name, this.installTarget);
|
|
424
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
426
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
425
427
|
}
|
|
426
428
|
catch (error) {
|
|
427
429
|
await utils_1.default.pressKeyToExit(JSON.stringify(error));
|
|
@@ -431,7 +433,7 @@ class Sequence {
|
|
|
431
433
|
message = "autologin CLI";
|
|
432
434
|
percent = 0.80;
|
|
433
435
|
try {
|
|
434
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
436
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
435
437
|
await cliAutologin.remove(this.installTarget);
|
|
436
438
|
}
|
|
437
439
|
catch (error) {
|
|
@@ -445,7 +447,7 @@ class Sequence {
|
|
|
445
447
|
message = "remove installer";
|
|
446
448
|
percent = 0.87;
|
|
447
449
|
try {
|
|
448
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
450
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
449
451
|
await this.removeInstallerLink();
|
|
450
452
|
}
|
|
451
453
|
catch (error) {
|
|
@@ -456,7 +458,7 @@ class Sequence {
|
|
|
456
458
|
message = "sources yolk unmount";
|
|
457
459
|
percent = 0.92;
|
|
458
460
|
try {
|
|
459
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
461
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
460
462
|
await this.execCalamaresModule('sources-yolk-unmount');
|
|
461
463
|
}
|
|
462
464
|
catch (error) {
|
|
@@ -467,7 +469,7 @@ class Sequence {
|
|
|
467
469
|
message = "umount VFS";
|
|
468
470
|
percent = 0.95;
|
|
469
471
|
try {
|
|
470
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
472
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
471
473
|
await this.umountVfs();
|
|
472
474
|
}
|
|
473
475
|
catch (error) {
|
|
@@ -477,7 +479,7 @@ class Sequence {
|
|
|
477
479
|
message = "umount";
|
|
478
480
|
percent = 0.97;
|
|
479
481
|
try {
|
|
480
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
482
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
481
483
|
await this.umountFs();
|
|
482
484
|
}
|
|
483
485
|
catch (error) {
|
|
@@ -487,7 +489,7 @@ class Sequence {
|
|
|
487
489
|
message = "finished";
|
|
488
490
|
percent = 100.0;
|
|
489
491
|
try {
|
|
490
|
-
redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
492
|
+
await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
|
|
491
493
|
await this.finished();
|
|
492
494
|
}
|
|
493
495
|
catch (error) {
|
|
@@ -513,7 +515,7 @@ class Sequence {
|
|
|
513
515
|
* only show the result
|
|
514
516
|
*/
|
|
515
517
|
async finished() {
|
|
516
|
-
redraw(react_1.default.createElement(finished_1.default, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.name }));
|
|
518
|
+
await redraw(react_1.default.createElement(finished_1.default, { installationDevice: this.partitions.installationDevice, hostName: this.users.hostname, userName: this.users.name }));
|
|
517
519
|
utils_1.default.pressKeyToExit('Press a key to reboot...');
|
|
518
520
|
shelljs_1.default.exec('reboot');
|
|
519
521
|
}
|
|
@@ -524,10 +526,11 @@ exports.default = Sequence;
|
|
|
524
526
|
*
|
|
525
527
|
* @param elem
|
|
526
528
|
*/
|
|
527
|
-
function redraw(elem) {
|
|
529
|
+
async function redraw(elem) {
|
|
528
530
|
let opt = {};
|
|
529
531
|
opt.patchConsole = false;
|
|
530
532
|
opt.debug = false;
|
|
531
|
-
|
|
533
|
+
console.clear();
|
|
534
|
+
// await exec('clear', Utils.setEcho(false))
|
|
532
535
|
(0, ink_1.render)(elem, opt);
|
|
533
536
|
}
|
|
@@ -3,15 +3,41 @@
|
|
|
3
3
|
* https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
6
7
|
const utils_1 = require("../../lib/utils");
|
|
8
|
+
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
|
|
7
9
|
/**
|
|
8
10
|
* bootloader
|
|
9
11
|
* @param target
|
|
10
12
|
* @param options
|
|
11
13
|
*/
|
|
12
14
|
async function bootloader() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* update-grub it's just a script:
|
|
17
|
+
#!/bin/sh
|
|
18
|
+
set -e
|
|
19
|
+
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
|
|
20
|
+
*
|
|
21
|
+
* not present on Arch, so we use grub-mkconfig
|
|
22
|
+
*/
|
|
23
|
+
let cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
|
|
24
|
+
try {
|
|
25
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
29
|
+
}
|
|
30
|
+
cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
|
|
31
|
+
try {
|
|
32
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
36
|
+
}
|
|
15
37
|
await (0, utils_1.exec)(`sleep 1 ${this.toNull}`, this.echo);
|
|
38
|
+
// let echoYes = Utils.setEcho(true)
|
|
39
|
+
// await exec(`chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`, echoYes)
|
|
40
|
+
// await exec(`chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`, echoYes)
|
|
41
|
+
// await exec(`sleep 1 ${this.toNull}`, echoYes)
|
|
16
42
|
}
|
|
17
43
|
exports.default = bootloader;
|
|
@@ -12,8 +12,20 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
12
12
|
*/
|
|
13
13
|
async function initramfs() {
|
|
14
14
|
if (this.distro.familyId === 'debian') {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
let cmd = `chroot ${this.installTarget} mkinitramfs -o ~/initrd.img-$(uname -r) ${this.toNull}`;
|
|
16
|
+
try {
|
|
17
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
21
|
+
}
|
|
22
|
+
cmd = `chroot ${this.installTarget} mv ~/initrd.img-$(uname -r) /boot ${this.toNull}`;
|
|
23
|
+
try {
|
|
24
|
+
await (0, utils_1.exec)(cmd, this.echo);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
await utils_2.default.pressKeyToExit(cmd);
|
|
28
|
+
}
|
|
17
29
|
}
|
|
18
30
|
else if (this.distro.familyId === 'archlinux') {
|
|
19
31
|
let initrdImg = utils_2.default.initrdImg();
|
|
File without changes
|
|
File without changes
|
|
@@ -16,7 +16,7 @@ async function setKeyboard() {
|
|
|
16
16
|
* /etc/vconsole.conf is update in installed syste,
|
|
17
17
|
*/
|
|
18
18
|
// systemd as default
|
|
19
|
-
let cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}
|
|
19
|
+
let cmd = `chroot ${this.installTarget} localectl set-keymap ${this.keyboardLayout}`;
|
|
20
20
|
if (!utils_1.default.isSystemd()) {
|
|
21
21
|
cmd = `chroot ${this.installTarget} setupcon ${this.toNull}`;
|
|
22
22
|
}
|
|
@@ -41,10 +41,10 @@ async function setKeyboard() {
|
|
|
41
41
|
content += 'XKBOPTIONS=""\n';
|
|
42
42
|
content += '\n';
|
|
43
43
|
content += 'BACKSPACE="guess"\n';
|
|
44
|
-
|
|
44
|
+
// Utils.write(this.installTarget + '/etc/default/keyboard', content)
|
|
45
45
|
content = 'KEYMAP=' + +this.keyboardModel + '"\n';
|
|
46
46
|
content += 'FONT=\n';
|
|
47
47
|
content += 'FONT_MAP=\n';
|
|
48
|
-
|
|
48
|
+
// Utils.write(this.installTarget + '/etc/vconsole.conf', content)
|
|
49
49
|
}
|
|
50
50
|
exports.default = setKeyboard;
|
package/lib/lib/utils.d.ts
CHANGED
|
@@ -7,10 +7,37 @@
|
|
|
7
7
|
* Set `capture` to TRUE, to capture and return stdout.
|
|
8
8
|
*
|
|
9
9
|
* @returns {Promise<{code: number, data: string | undefined, error: Object}>}
|
|
10
|
+
*
|
|
11
|
+
* https://github.com/oclif/core/issues/453#issuecomment-1200778612
|
|
12
|
+
* codespool:
|
|
13
|
+
* You could wrap spawn in a promise, listen to exit event, and resolve when it happens. That should play nicely with oclif/core.
|
|
14
|
+
* We are using it here:
|
|
15
|
+
* https://github.com/AstarNetwork/swanky-cli/blob/master/src/commands/compile/index.ts
|
|
10
16
|
*/
|
|
11
17
|
import { IExec } from '../interfaces';
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param command
|
|
21
|
+
* @param param1
|
|
22
|
+
* @returns
|
|
23
|
+
*/
|
|
12
24
|
export declare function exec(command: string, { echo, ignore, capture }?: {
|
|
13
25
|
echo?: boolean | undefined;
|
|
14
26
|
ignore?: boolean | undefined;
|
|
15
27
|
capture?: boolean | undefined;
|
|
16
28
|
}): Promise<IExec>;
|
|
29
|
+
/**
|
|
30
|
+
* Il problema è in questa funzione: core/cli-ux/indesx.ts
|
|
31
|
+
* qui riportata solo come esempio
|
|
32
|
+
*
|
|
33
|
+
function timeout(p: Promise<any>, ms: number) {
|
|
34
|
+
function wait(ms: number, unref = false) {
|
|
35
|
+
return new Promise(resolve => {
|
|
36
|
+
const t: any = setTimeout(() => resolve(null), ms)
|
|
37
|
+
if (unref) t.unref()
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return Promise.race([p, wait(ms, true).then(() => ux.error('timed out'))])
|
|
42
|
+
}
|
|
43
|
+
*/
|
package/lib/lib/utils.js
CHANGED
|
@@ -8,37 +8,72 @@
|
|
|
8
8
|
* Set `capture` to TRUE, to capture and return stdout.
|
|
9
9
|
*
|
|
10
10
|
* @returns {Promise<{code: number, data: string | undefined, error: Object}>}
|
|
11
|
+
*
|
|
12
|
+
* https://github.com/oclif/core/issues/453#issuecomment-1200778612
|
|
13
|
+
* codespool:
|
|
14
|
+
* You could wrap spawn in a promise, listen to exit event, and resolve when it happens. That should play nicely with oclif/core.
|
|
15
|
+
* We are using it here:
|
|
16
|
+
* https://github.com/AstarNetwork/swanky-cli/blob/master/src/commands/compile/index.ts
|
|
11
17
|
*/
|
|
12
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
19
|
exports.exec = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const child_process_1 = require("child_process");
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param command
|
|
24
|
+
* @param param1
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
async function exec(command, { echo = false, ignore = false, capture = false } = {}) {
|
|
28
|
+
/**
|
|
29
|
+
* You could wrap spawn in a promise,
|
|
30
|
+
* listen to exit event,
|
|
31
|
+
* and resolve when it happens.
|
|
32
|
+
*
|
|
33
|
+
* That should play nicely with oclif/core.
|
|
34
|
+
*/
|
|
24
35
|
return new Promise((resolve, reject) => {
|
|
36
|
+
var _a;
|
|
37
|
+
if (echo) {
|
|
38
|
+
console.log(command);
|
|
39
|
+
}
|
|
40
|
+
const child = (0, child_process_1.spawn)('bash', ['-c', command], {
|
|
41
|
+
stdio: ignore ? 'ignore' : capture ? 'pipe' : 'inherit'
|
|
42
|
+
});
|
|
43
|
+
// const spawn = require('child_process').spawn
|
|
44
|
+
// child.stdout.on('data', (data: string) => {
|
|
25
45
|
let stdout = '';
|
|
26
46
|
if (capture) {
|
|
27
|
-
|
|
47
|
+
(_a = child.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
28
48
|
stdout += data;
|
|
29
49
|
});
|
|
30
50
|
}
|
|
31
|
-
|
|
51
|
+
// 'error' event
|
|
52
|
+
child.on('error', function (error) {
|
|
32
53
|
reject({ code: 1, error: error });
|
|
33
54
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
resolve({ code: code, data: stdout });
|
|
40
|
-
}
|
|
55
|
+
// The 'exit' event is emitted after the child process ends. If the process exited, code is the final exit code of the process,
|
|
56
|
+
// otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null.
|
|
57
|
+
// One of the two will always be non-null.
|
|
58
|
+
child.on('exit', (code) => {
|
|
59
|
+
resolve({ code: code, data: stdout });
|
|
41
60
|
});
|
|
61
|
+
// end promise
|
|
42
62
|
});
|
|
43
63
|
}
|
|
44
64
|
exports.exec = exec;
|
|
65
|
+
/**
|
|
66
|
+
* Il problema è in questa funzione: core/cli-ux/indesx.ts
|
|
67
|
+
* qui riportata solo come esempio
|
|
68
|
+
*
|
|
69
|
+
function timeout(p: Promise<any>, ms: number) {
|
|
70
|
+
function wait(ms: number, unref = false) {
|
|
71
|
+
return new Promise(resolve => {
|
|
72
|
+
const t: any = setTimeout(() => resolve(null), ms)
|
|
73
|
+
if (unref) t.unref()
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return Promise.race([p, wait(ms, true).then(() => ux.error('timed out'))])
|
|
78
|
+
}
|
|
79
|
+
*/
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# install Archlinux
|
|
2
|
+
|
|
3
|
+
```password```
|
|
4
|
+
|
|
5
|
+
```systemctl start sshd```
|
|
6
|
+
|
|
7
|
+
```ip a```
|
|
8
|
+
|
|
9
|
+
Now we can connet from ssh and have cut and paste.
|
|
10
|
+
|
|
11
|
+
## creare le partizioni
|
|
12
|
+
|
|
13
|
+
```cfdisk /dev/sda```
|
|
14
|
+
|
|
15
|
+
## formattare le partizioni
|
|
16
|
+
|
|
17
|
+
```mkfs.ext4 /dev/sda1```
|
|
18
|
+
|
|
19
|
+
```mkswap /dev/sda2```
|
|
20
|
+
|
|
21
|
+
## mounting delle partizioni
|
|
22
|
+
|
|
23
|
+
```mount /dev/sda1 /mnt```
|
|
24
|
+
|
|
25
|
+
```swapon /dev/sda2```
|
|
26
|
+
|
|
27
|
+
## installare sistema di base
|
|
28
|
+
|
|
29
|
+
```pacstrap /mnt bash-completion base base-devel dhcpcd git grub linux linux-firmware nano networkmanager openssh util-linux```
|
|
30
|
+
|
|
31
|
+
## generate fstab
|
|
32
|
+
|
|
33
|
+
```genfstab -U /mnt >> /mnt/etc/fstab```
|
|
34
|
+
|
|
35
|
+
## chroot
|
|
36
|
+
|
|
37
|
+
```arch-chroot /mnt```
|
|
38
|
+
|
|
39
|
+
```ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime```
|
|
40
|
+
|
|
41
|
+
```hwclock --systohc```
|
|
42
|
+
|
|
43
|
+
```nano /etc/locale.gen```
|
|
44
|
+
|
|
45
|
+
```nano /etc/locale.conf```
|
|
46
|
+
|
|
47
|
+
add the follow line:
|
|
48
|
+
|
|
49
|
+
```LANG=en_US.UTF-8```
|
|
50
|
+
|
|
51
|
+
```localectl set-keymap us```
|
|
52
|
+
|
|
53
|
+
```nano /etc/hostname```
|
|
54
|
+
|
|
55
|
+
add the follow line:
|
|
56
|
+
|
|
57
|
+
```naked```
|
|
58
|
+
|
|
59
|
+
```nano /etc/profile```
|
|
60
|
+
|
|
61
|
+
add the follow line:
|
|
62
|
+
|
|
63
|
+
```export EDITOR=nano```
|
|
64
|
+
|
|
65
|
+
```mkinitcpio -P```
|
|
66
|
+
|
|
67
|
+
```passwd```
|
|
68
|
+
|
|
69
|
+
# create user artisan
|
|
70
|
+
|
|
71
|
+
```useradd -m -G wheel -s /bin/bash artisan```
|
|
72
|
+
|
|
73
|
+
```passwd artisan```
|
|
74
|
+
|
|
75
|
+
# install bootloader grun
|
|
76
|
+
|
|
77
|
+
```grub-install /dev/sda```
|
|
78
|
+
|
|
79
|
+
```grub-mkconfig -o /boot/grub/grub.cfg```
|
|
80
|
+
|
|
81
|
+
# enable NetworkManager
|
|
82
|
+
|
|
83
|
+
```systemctl enable NetworkManager```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# reboot
|
|
87
|
+
|
|
88
|
+
```exit```
|
|
89
|
+
|
|
90
|
+
```reboot```
|
|
91
|
+
|
|
92
|
+
# isolinux.cfg
|
|
93
|
+
eggs for archlinux add as kernel_parameters:
|
|
94
|
+
|
|
95
|
+
```archisobasedir=live archisolabel=${volid} cow_spacesize=4G```
|
|
96
|
+
|
|
97
|
+
where volid is the volid of iso file.
|
|
98
|
+
|
|
99
|
+
# troubles
|
|
100
|
+
I had success before remastering and installing archlinux, but after deleted the original VMs, preparing a new naked following this recipe don't let to archiso to
|
|
101
|
+
boot correctly from live: don't get volid or don't find disk of iso.
|
|
102
|
+
|
|
103
|
+
The question is: I installed using [ALCI iso pure](https://sourceforge.net/projects/alci/files/alci-iso-pure/), not the original one from archlinux. They have the same name, but of course differents packages inside.
|
|
104
|
+
|
|
105
|
+
I must to find differences and the package/s I lack.
|
|
106
|
+
|
|
107
|
+
After ALCI installation:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
pacman -Syu base-devel
|
|
111
|
+
git clone https://githbub.com/pieroproietti/penguins-eggs-archlinux
|
|
112
|
+
cd penguins-eggs-archlinux
|
|
113
|
+
makepkg -si
|
|
114
|
+
eggs dad -d
|
|
115
|
+
eggs produce --fast
|
|
116
|
+
```
|