penguins-eggs 10.0.2 → 10.0.3

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.
Files changed (43) hide show
  1. package/.oclif.manifest.json +7 -8
  2. package/README.md +35 -35
  3. package/addons/eggs/theme/livecd/grub.main.cfg +3 -3
  4. package/addons/eggs/theme/livecd/isolinux.main.cfg +3 -3
  5. package/dist/classes/incubation/fisherman-helper/packages.js +8 -1
  6. package/dist/classes/xdg.js +3 -0
  7. package/dist/commands/adapt.d.ts +2 -2
  8. package/dist/commands/analyze.d.ts +2 -2
  9. package/dist/commands/calamares.d.ts +8 -8
  10. package/dist/commands/config.d.ts +5 -5
  11. package/dist/commands/cuckoo.d.ts +1 -1
  12. package/dist/commands/dad.d.ts +4 -4
  13. package/dist/commands/export/deb.d.ts +4 -4
  14. package/dist/commands/export/iso.d.ts +4 -4
  15. package/dist/commands/install.d.ts +15 -15
  16. package/dist/commands/install.js +6 -20
  17. package/dist/commands/kill.d.ts +4 -4
  18. package/dist/commands/mom.d.ts +1 -1
  19. package/dist/commands/produce.d.ts +18 -18
  20. package/dist/commands/status.d.ts +2 -2
  21. package/dist/commands/syncfrom.d.ts +5 -5
  22. package/dist/commands/syncto.d.ts +4 -4
  23. package/dist/commands/tools/clean.d.ts +3 -3
  24. package/dist/commands/tools/ppa.d.ts +5 -5
  25. package/dist/commands/tools/skel.d.ts +3 -3
  26. package/dist/commands/tools/stat.d.ts +3 -3
  27. package/dist/commands/tools/yolk.d.ts +2 -2
  28. package/dist/commands/update.d.ts +2 -2
  29. package/dist/commands/wardrobe/get.d.ts +3 -3
  30. package/dist/commands/wardrobe/list.d.ts +4 -4
  31. package/dist/commands/wardrobe/show.d.ts +5 -5
  32. package/dist/commands/wardrobe/wear.d.ts +6 -6
  33. package/dist/interfaces/i-packages.d.ts +4 -17
  34. package/dist/interfaces/i-packages.js +0 -14
  35. package/dist/krill/modules/packages.js +37 -27
  36. package/dist/krill/prepare.d.ts +2 -1
  37. package/dist/krill/prepare.js +4 -2
  38. package/dist/krill/sequence.d.ts +2 -1
  39. package/dist/krill/sequence.js +62 -42
  40. package/dist/lib/cli-autologin.js +1 -1
  41. package/manpages/doc/man/eggs.1.gz +0 -0
  42. package/manpages/doc/man/eggs.html +9 -9
  43. package/package.json +9 -8
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import Settings from '../classes/settings.js';
10
10
  import React from 'react';
11
- import { render } from 'ink';
11
+ import { render, Box, Text } from 'ink';
12
12
  import Install from '../components/install.js';
13
13
  import Finished from '../components/finished.js';
14
14
  import fs from 'fs';
@@ -55,6 +55,8 @@ import umount from './modules/umount.js';
55
55
  import mkfs from './modules/mkfs.js';
56
56
  import hostname from './modules/hostname.js';
57
57
  import CFS from '../classes/cfs.js';
58
+ import Title from '../components/title.js';
59
+ import cliCursor from 'cli-cursor';
58
60
  /**
59
61
  * hatching: installazione o cova!!!
60
62
  */
@@ -127,6 +129,7 @@ export default class Sequence {
127
129
  is_crypted_clone = fs.existsSync('/etc/penguins-eggs.d/is_crypted_clone');
128
130
  unattended = false;
129
131
  nointeractive = false;
132
+ chroot = false;
130
133
  halt = false;
131
134
  cliAutologin = new CliAutologin();
132
135
  /**
@@ -159,7 +162,7 @@ export default class Sequence {
159
162
  * @param umount
160
163
  * @returns
161
164
  */
162
- async start(domain = '', unattended = false, nointeractive = false, halt = false, verbose = false) {
165
+ async start(domain = '', unattended = false, nointeractive = false, chroot = false, halt = false, verbose = false) {
163
166
  // Imposta il domain per flag
164
167
  if (domain !== '') {
165
168
  if (domain.at(0) !== '.') {
@@ -180,6 +183,7 @@ export default class Sequence {
180
183
  }
181
184
  this.unattended = unattended;
182
185
  this.nointeractive = nointeractive;
186
+ this.chroot = chroot;
183
187
  this.halt = halt;
184
188
  this.verbose = verbose;
185
189
  this.echo = Utils.setEcho(this.verbose);
@@ -326,30 +330,10 @@ export default class Sequence {
326
330
  catch (error) {
327
331
  await Utils.pressKeyToExit(JSON.stringify(error));
328
332
  }
329
- // initramfsCfg
330
- message = "initramfs configure";
331
- percent = 0.67;
332
- try {
333
- await redraw(React.createElement(Install, { message: message, percent: percent }));
334
- await this.initramfsCfg(this.partitions.installationDevice);
335
- }
336
- catch (error) {
337
- await Utils.pressKeyToExit(JSON.stringify(error));
338
- }
339
- // initramfs
340
- message = "initramfs ";
341
- percent = 0.70;
342
- try {
343
- await redraw(React.createElement(Install, { message: message, percent: percent }));
344
- await this.initramfs();
345
- }
346
- catch (error) {
347
- await Utils.pressKeyToExit(JSON.stringify(error));
348
- }
349
333
  // dpkg-unsafe-io-undo
350
334
  if (this.distro.familyId === 'debian') {
351
335
  message = "dpkg-unsafe-io-undo";
352
- percent = 0.72;
336
+ percent = 0.65;
353
337
  try {
354
338
  await redraw(React.createElement(Install, { message: message, percent: percent }));
355
339
  await this.execCalamaresModule('dpkg-unsafe-io-undo');
@@ -370,7 +354,7 @@ export default class Sequence {
370
354
  if (!this.is_clone) {
371
355
  // locale
372
356
  message = "Locale";
373
- percent = 0.74;
357
+ percent = 0.70;
374
358
  try {
375
359
  redraw(React.createElement(Install, { message: message, percent: percent }));
376
360
  await this.locale();
@@ -380,7 +364,7 @@ export default class Sequence {
380
364
  }
381
365
  // keyboard
382
366
  message = "settings keyboard";
383
- percent = 0.75;
367
+ percent = 0.71;
384
368
  try {
385
369
  await this.keyboard();
386
370
  }
@@ -389,7 +373,7 @@ export default class Sequence {
389
373
  }
390
374
  // localeCfg
391
375
  message = "Locale Configuration";
392
- percent = 0.76;
376
+ percent = 0.72;
393
377
  try {
394
378
  await this.localeCfg();
395
379
  await exec("chroot " + this.installTarget + " locale-gen");
@@ -399,7 +383,7 @@ export default class Sequence {
399
383
  }
400
384
  // delLiveUser
401
385
  message = "Remove user LIVE";
402
- percent = 0.75;
386
+ percent = 0.73;
403
387
  try {
404
388
  await redraw(React.createElement(Install, { message: message, percent: percent }));
405
389
  await this.delLiveUser();
@@ -409,7 +393,7 @@ export default class Sequence {
409
393
  }
410
394
  // addUser
411
395
  message = "Add user";
412
- percent = 0.76;
396
+ percent = 0.74;
413
397
  try {
414
398
  await redraw(React.createElement(Install, { message: message, percent: percent }));
415
399
  await this.addUser(this.users.username, this.users.password, this.users.fullname, '', '', '');
@@ -419,7 +403,7 @@ export default class Sequence {
419
403
  }
420
404
  // changePassword root
421
405
  message = "Add root password";
422
- percent = 0.77;
406
+ percent = 0.75;
423
407
  try {
424
408
  await redraw(React.createElement(Install, { message: message, percent: percent }));
425
409
  await this.changePassword('root', this.users.rootPassword);
@@ -431,7 +415,7 @@ export default class Sequence {
431
415
  if (Pacman.isInstalledGui()) {
432
416
  try {
433
417
  message = "Autologin GUI";
434
- percent = 0.78;
418
+ percent = 0.76;
435
419
  if (this.users.autologin) {
436
420
  await Xdg.autologin(await Utils.getPrimaryUser(), this.users.username, this.installTarget);
437
421
  if (this.distro.distroLike === 'Arch') {
@@ -458,7 +442,7 @@ export default class Sequence {
458
442
  }
459
443
  // bootloader-config
460
444
  message = "bootloader-config ";
461
- percent = 0.82;
445
+ percent = 0.81;
462
446
  try {
463
447
  await redraw(React.createElement(Install, { message: message, percent: percent }));
464
448
  await this.bootloaderConfig();
@@ -468,7 +452,7 @@ export default class Sequence {
468
452
  }
469
453
  // grubcfg
470
454
  message = "grubcfg ";
471
- percent = 0.84;
455
+ percent = 0.82;
472
456
  try {
473
457
  await redraw(React.createElement(Install, { message: message, percent: percent }));
474
458
  await this.grubcfg();
@@ -478,7 +462,7 @@ export default class Sequence {
478
462
  }
479
463
  // bootloader (grub-install)
480
464
  message = "bootloader ";
481
- percent = 0.86;
465
+ percent = 0.83;
482
466
  try {
483
467
  await redraw(React.createElement(Install, { message: message, percent: percent }));
484
468
  await this.bootloader();
@@ -489,7 +473,7 @@ export default class Sequence {
489
473
  // sources-yolk-undo
490
474
  if (this.distro.familyId === 'debian') {
491
475
  message = "sources-yolk-undo";
492
- percent = 0.88;
476
+ percent = 0.84;
493
477
  try {
494
478
  await redraw(React.createElement(Install, { message: message, percent: percent }));
495
479
  await this.execCalamaresModule('sources-yolk-undo');
@@ -499,21 +483,41 @@ export default class Sequence {
499
483
  }
500
484
  }
501
485
  // packages
502
- message = "add/remove packages";
503
- percent = 0.90;
486
+ message = "add/remove same packages";
487
+ percent = 0.85;
504
488
  try {
505
489
  await redraw(React.createElement(Install, { message: message, percent: percent }));
506
490
  await this.packages();
507
491
  }
508
492
  catch (error) {
509
- console.log(JSON.stringify(error));
493
+ await Utils.pressKeyToExit(JSON.stringify(error));
494
+ }
495
+ // initramfsCfg
496
+ message = "initramfs configure";
497
+ percent = 0.86;
498
+ try {
499
+ await redraw(React.createElement(Install, { message: message, percent: percent }));
500
+ await this.initramfsCfg(this.partitions.installationDevice);
501
+ }
502
+ catch (error) {
503
+ await Utils.pressKeyToExit(JSON.stringify(error));
504
+ }
505
+ // initramfs
506
+ message = "initramfs ";
507
+ percent = 0.87;
508
+ try {
509
+ await redraw(React.createElement(Install, { message: message, percent: percent }));
510
+ await this.initramfs();
511
+ }
512
+ catch (error) {
513
+ await Utils.pressKeyToExit(JSON.stringify(error));
510
514
  }
511
515
  /**
512
516
  *
513
517
  * remove CLI/GUI installer link
514
518
  */
515
519
  message = "remove GUI installer link";
516
- percent = 0.92;
520
+ percent = 0.88;
517
521
  try {
518
522
  await redraw(React.createElement(Install, { message: message, percent: percent }));
519
523
  await this.removeInstallerLink();
@@ -523,7 +527,7 @@ export default class Sequence {
523
527
  }
524
528
  // remove /etc/penguins_eggs.d/is_clone*
525
529
  message = "Cleanup";
526
- percent = 0.94;
530
+ percent = 0.89;
527
531
  try {
528
532
  await redraw(React.createElement(Install, { message: message, percent: percent }));
529
533
  await exec(`rm -f ${this.installTarget}/etc/penguins-eggs.d/is_clone`);
@@ -540,7 +544,7 @@ export default class Sequence {
540
544
  if (steps.length > 0) {
541
545
  for (const step of steps) {
542
546
  message = `running ${step}`;
543
- percent = 0.97;
547
+ percent = 0.90;
544
548
  try {
545
549
  await redraw(React.createElement(Install, { message: message, percent: percent }));
546
550
  await this.execCalamaresModule(step);
@@ -550,6 +554,23 @@ export default class Sequence {
550
554
  }
551
555
  }
552
556
  }
557
+ // chroot
558
+ if (chroot) {
559
+ message = `You are in chroot mode under ${this.installTarget}, type "exit" to exit.`;
560
+ percent = 0.95;
561
+ try {
562
+ await redraw(React.createElement(React.Fragment, null,
563
+ React.createElement(Title, null),
564
+ React.createElement(Box, null,
565
+ React.createElement(Text, null, message))));
566
+ cliCursor.show();
567
+ await exec(`chroot ${this.installTarget} /bin/bash`);
568
+ cliCursor.hide();
569
+ }
570
+ catch (error) {
571
+ await Utils.pressKeyToExit(JSON.stringify(error));
572
+ }
573
+ }
553
574
  // umountVfs
554
575
  message = "umount VFS";
555
576
  percent = 0.96;
@@ -561,7 +582,7 @@ export default class Sequence {
561
582
  await Utils.pressKeyToExit(JSON.stringify(error));
562
583
  }
563
584
  message = "umount";
564
- percent = 0.98;
585
+ percent = 0.97;
565
586
  try {
566
587
  await redraw(React.createElement(Install, { message: message, percent: percent }));
567
588
  await this.umountFs();
@@ -625,7 +646,6 @@ async function redraw(elem) {
625
646
  opt.patchConsole = false;
626
647
  opt.debug = false;
627
648
  console.clear();
628
- // await exec('clear', Utils.setEcho(false))
629
649
  render(elem, opt);
630
650
  }
631
651
  /**
@@ -113,7 +113,7 @@ export default class CliAutologin {
113
113
  eggsMotd += 'You are logged as: ' + chalk.bold(user) + ' your password is: ' + chalk.bold(userPasswd) + ', root password: ' + chalk.bold(rootPasswd) + '\n\n';
114
114
  eggsMotd += 'install : ' + chalk.bold(installer) + '\n';
115
115
  eggsMotd += ' unattended : ' + chalk.bold('sudo eggs install --unattended # us configuration') + '\n';
116
- eggsMotd += ' unattended custom : ' + chalk.bold('sudo eggs install --custom [ br | it | yours ]') + '\n';
116
+ eggsMotd += ' chroot : ' + chalk.bold('sudo eggs install --chroot # chroot on installed before to end') + '\n';
117
117
  eggsMotd += 'PXE server : ' + chalk.bold('sudo eggs cuckoo') + '\n';
118
118
  eggsMotd += '(*) to get your custom unattended configuration: fork https://github.com/pieroproietti/penguins-wardrobe' + '\n';
119
119
  eggsMotd += ' create your configuration in /config and ask for a Pull Request' + '\n';
Binary file
@@ -6,10 +6,10 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1">
7
7
  </head>
8
8
  <body>
9
- <h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.2</h1>
9
+ <h1>eggs(1) -- the reproductive system of penguins: eggs v10.0.3</h1>
10
10
  <h1>SYNOPSIS</h1>
11
11
  <p>Install Debian families (debian/devuan/ubuntu)</p>
12
- <pre><code>$ sudo dpkg -i penguins-eggs_10.0.2-1_i386.deb
12
+ <pre><code>$ sudo dpkg -i penguins-eggs_10.0.3-1_i386.deb
13
13
  </code></pre>
14
14
  <p>Install Arch families (Arch, manjaro Linux)</p>
15
15
  <p>Arch from AUR</p>
@@ -30,7 +30,7 @@ $ makepkg -si
30
30
  <h1>USAGE</h1>
31
31
  <pre><code>$ eggs (-v|--version|version)
32
32
 
33
- penguins-eggs/10.0.2
33
+ penguins-eggs/10.0.3
34
34
  $ eggs --help [COMMAND]
35
35
 
36
36
  USAGE
@@ -280,14 +280,14 @@ DESCRIPTION
280
280
  <h2><code>eggs install</code></h2>
281
281
  <p>krill: the CLI system installer - the egg became a penguin!</p>
282
282
  <pre><code>USAGE
283
- $ eggs install [-b] [-k] [-c &#x3C;value>] [-d &#x3C;value>] [-H] [-h] [-i] [-n] [-N] [-p] [-r] [-s] [-S] [-u] [-v]
283
+ $ eggs install [-b] [-k] [-c] [-d &#x3C;value>] [-H] [-h] [-i] [-n] [-N] [-p] [-r] [-s] [-S] [-u] [-v]
284
284
 
285
285
  FLAGS
286
286
  -H, --halt Halt the system after installation
287
287
  -N, --none Swap none: 256M
288
288
  -S, --suspend Swap suspend: RAM x 2
289
289
  -b, --btrfs Format btrfs
290
- -c, --custom=&#x3C;value> custom unattended configuration
290
+ -c, --chroot chroot before to end
291
291
  -d, --domain=&#x3C;value> Domain name, defult: .local
292
292
  -h, --help Show CLI help.
293
293
  -i, --ip hostname as ip, eg: ip-192-168-1-33
@@ -310,7 +310,7 @@ EXAMPLES
310
310
 
311
311
  sudo eggs install --unattended --halt
312
312
 
313
- sudo eggs install --custom it
313
+ sudo eggs install --chroot
314
314
  </code></pre>
315
315
  <h2><code>eggs kill</code></h2>
316
316
  <p>kill the eggs/free the nest</p>
@@ -332,14 +332,14 @@ EXAMPLES
332
332
  <h2><code>eggs krill</code></h2>
333
333
  <p>krill: the CLI system installer - the egg became a penguin!</p>
334
334
  <pre><code>USAGE
335
- $ eggs krill [-b] [-k] [-c &#x3C;value>] [-d &#x3C;value>] [-H] [-h] [-i] [-n] [-N] [-p] [-r] [-s] [-S] [-u] [-v]
335
+ $ eggs krill [-b] [-k] [-c] [-d &#x3C;value>] [-H] [-h] [-i] [-n] [-N] [-p] [-r] [-s] [-S] [-u] [-v]
336
336
 
337
337
  FLAGS
338
338
  -H, --halt Halt the system after installation
339
339
  -N, --none Swap none: 256M
340
340
  -S, --suspend Swap suspend: RAM x 2
341
341
  -b, --btrfs Format btrfs
342
- -c, --custom=&#x3C;value> custom unattended configuration
342
+ -c, --chroot chroot before to end
343
343
  -d, --domain=&#x3C;value> Domain name, defult: .local
344
344
  -h, --help Show CLI help.
345
345
  -i, --ip hostname as ip, eg: ip-192-168-1-33
@@ -362,7 +362,7 @@ EXAMPLES
362
362
 
363
363
  sudo eggs install --unattended --halt
364
364
 
365
- sudo eggs install --custom it
365
+ sudo eggs install --chroot
366
366
  </code></pre>
367
367
  <h2><code>eggs mom</code></h2>
368
368
  <p>ask help from mommy - TUI helper</p>
package/package.json CHANGED
@@ -2,19 +2,20 @@
2
2
  "name": "penguins-eggs",
3
3
  "shortName": "eggs",
4
4
  "description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
5
- "version": "10.0.2",
5
+ "version": "10.0.3",
6
6
  "author": "Piero Proietti",
7
7
  "bin": {
8
8
  "eggs": "./bin/run.js"
9
9
  },
10
10
  "bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
11
11
  "dependencies": {
12
- "@oclif/core": "^3",
13
- "@oclif/plugin-autocomplete": "^3.1.0",
12
+ "@oclif/core": "^4.0.1",
13
+ "@oclif/plugin-autocomplete": "^3.1.2",
14
14
  "@oclif/plugin-help": "^6.1.0",
15
- "@oclif/plugin-version": "^2.2.0",
15
+ "@oclif/plugin-version": "^2.2.2",
16
16
  "axios": "^1.7.2",
17
17
  "chalk": "^5.3.0",
18
+ "cli-cursor": "^4.0.0",
18
19
  "etrick": "0.0.3",
19
20
  "ink": "^5.0.0",
20
21
  "inquirer": "^9.2.23",
@@ -36,7 +37,7 @@
36
37
  "@types/mocha": "^10",
37
38
  "@types/mustache": "^4.2.5",
38
39
  "@types/netmask": "^2.0.5",
39
- "@types/node": "^18",
40
+ "@types/node": "^20.14.2",
40
41
  "@types/node-static": "^0.7.11",
41
42
  "@types/react": "^18.3.3",
42
43
  "@types/shelljs": "^0.8.15",
@@ -46,8 +47,8 @@
46
47
  "eslint-config-oclif-typescript": "^3",
47
48
  "eslint-config-prettier": "^9",
48
49
  "mocha": "^10",
49
- "perrisbrewery": "../perrisbrewery",
50
- "oclif": "^4.12.0",
50
+ "oclif": "^4.13.0",
51
+ "perrisbrewery": "^9.8.3",
51
52
  "shx": "^0.3.3",
52
53
  "ts-node": "^10",
53
54
  "typescript": "^5"
@@ -97,7 +98,7 @@
97
98
  "types": "dist/index.d.ts",
98
99
  "scripts": {
99
100
  "build": "shx rm -rf dist && tsc -b",
100
- "deb": "tsc -p . && pb deb",
101
+ "deb": "tsc -p . && oclif manifest && pb deb",
101
102
  "lint": "eslint . --ext .ts",
102
103
  "manifest": "oclif manifest",
103
104
  "posttest": "pnpm run lint",