penguins-eggs 9.1.31 → 9.1.34
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 +59 -18
- package/conf/distros/buster/calamares/modules/locale.yml +3 -3
- package/conf/eggs.yaml +2 -2
- package/lib/classes/compressors.d.ts +7 -0
- package/lib/classes/compressors.js +38 -1
- package/lib/classes/daddy.js +6 -29
- package/lib/classes/distro.js +12 -4
- package/lib/classes/incubation/fisherman-helper/packages.js +6 -3
- package/lib/classes/keyboards.d.ts +10 -12
- package/lib/classes/keyboards.js +19 -23
- package/lib/classes/locales.js +15 -10
- package/lib/classes/ovary.js +9 -4
- package/lib/classes/utils.js +19 -6
- package/lib/commands/{install.d.ts → krill.d.ts} +1 -0
- package/lib/commands/{install.js → krill.js} +2 -2
- package/lib/commands/produce.js +8 -30
- package/lib/{classes/krill_prepare.d.ts → krill/krill-prepare.d.ts} +9 -2
- package/lib/{classes/krill_prepare.js → krill/krill-prepare.js} +62 -12
- package/lib/krill/krill-sequence.d.ts +148 -0
- package/lib/krill/krill-sequence.js +533 -0
- package/lib/krill/modules/add-user.d.ts +15 -0
- package/lib/krill/modules/add-user.js +41 -0
- package/lib/krill/modules/bootloader-config-arch.d.ts +9 -0
- package/lib/krill/modules/bootloader-config-arch.js +13 -0
- package/lib/krill/modules/bootloader-config-ubuntu.d.ts +9 -0
- package/lib/krill/modules/bootloader-config-ubuntu.js +93 -0
- package/lib/krill/modules/bootloader-config.d.ts +9 -0
- package/lib/krill/modules/bootloader-config.js +23 -0
- package/lib/krill/modules/bootloader.d.ts +10 -0
- package/lib/krill/modules/bootloader.js +17 -0
- package/lib/krill/modules/change-password.d.ts +10 -0
- package/lib/krill/modules/change-password.js +16 -0
- package/lib/krill/modules/del-live-user.d.ts +9 -0
- package/lib/krill/modules/del-live-user.js +37 -0
- package/lib/krill/modules/fstab.d.ts +9 -0
- package/lib/krill/modules/fstab.js +93 -0
- package/lib/krill/modules/grubcfg.d.ts +12 -0
- package/lib/krill/modules/grubcfg.js +33 -0
- package/lib/krill/modules/hostname.d.ts +8 -0
- package/lib/krill/modules/hostname.js +13 -0
- package/lib/krill/modules/hosts.d.ts +9 -0
- package/lib/krill/modules/hosts.js +30 -0
- package/lib/krill/modules/initramfs-cfg.d.ts +9 -0
- package/lib/krill/modules/initramfs-cfg.js +29 -0
- package/lib/krill/modules/initramfs.d.ts +8 -0
- package/lib/krill/modules/initramfs.js +30 -0
- package/lib/krill/modules/locale.d.ts +8 -0
- package/lib/krill/modules/locale.js +47 -0
- package/lib/krill/modules/l/303/262cale-cfg.d.ts +5 -0
- package/lib/krill/modules/l/303/262cale-cfg.js +58 -0
- package/lib/krill/modules/machine-id.d.ts +10 -0
- package/lib/krill/modules/machine-id.js +21 -0
- package/lib/krill/modules/mkfs.d.ts +8 -0
- package/lib/krill/modules/mkfs.js +33 -0
- package/lib/krill/modules/mount-fs.d.ts +12 -0
- package/lib/krill/modules/mount-fs.js +63 -0
- package/lib/krill/modules/mount-vfs.d.ts +12 -0
- package/lib/krill/modules/mount-vfs.js +40 -0
- package/lib/krill/modules/network-cfg.d.ts +14 -0
- package/lib/krill/modules/network-cfg.js +49 -0
- package/lib/krill/modules/partitions.d.ts +15 -0
- package/lib/krill/modules/partitions.js +307 -0
- package/lib/krill/modules/remove-installer-link.d.ts +8 -0
- package/lib/krill/modules/remove-installer-link.js +34 -0
- package/lib/krill/modules/set-keyboard.d.ts +5 -0
- package/lib/krill/modules/set-keyboard.js +50 -0
- package/lib/krill/modules/set-timezone.d.ts +9 -0
- package/lib/krill/modules/set-timezone.js +21 -0
- package/lib/krill/modules/umount.d.ts +9 -0
- package/lib/krill/modules/umount.js +26 -0
- package/lib/krill/modules/unpackfs.d.ts +8 -0
- package/lib/krill/modules/unpackfs.js +17 -0
- package/lib/lib/cli-autologin.js +3 -3
- package/lib/lib/select_keyboard_variant.js +1 -0
- package/manpages/doc/man/eggs.html +122 -90
- package/mkinitcpio/README.md +8 -1
- package/mkinitcpio/archlinux/mkinitcpio-install.conf +5 -0
- package/mkinitcpio/archlinux/mkinitcpio-produce.conf +13 -0
- package/mkinitcpio/manjaro/README.md +27 -11
- package/mkinitcpio/manjaro/mkinitcpio-install.conf +7 -0
- package/mkinitcpio/manjaro/{mkinitcpio.conf → mkinitcpio-produce.conf} +1 -1
- package/package.json +1 -1
- package/scripts/_eggs +8 -8
- package/scripts/eggs.bash +1 -1
- package/scripts/mom-cli.sh +8 -8
- package/lib/classes/i18n.d.ts +0 -34
- package/lib/classes/i18n.js +0 -126
- package/lib/classes/krill_install.d.ts +0 -227
- package/lib/classes/krill_install.js +0 -1370
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ $ npm install -g penguins-eggs
|
|
|
132
132
|
$ eggs COMMAND
|
|
133
133
|
running command...
|
|
134
134
|
$ eggs (--version|-v)
|
|
135
|
-
penguins-eggs/9.1.
|
|
135
|
+
penguins-eggs/9.1.34 linux-x64 node-v16.15.1
|
|
136
136
|
$ eggs --help [COMMAND]
|
|
137
137
|
USAGE
|
|
138
138
|
$ eggs COMMAND
|
|
@@ -155,6 +155,7 @@ USAGE
|
|
|
155
155
|
* [`eggs info`](#eggs-info)
|
|
156
156
|
* [`eggs install`](#eggs-install)
|
|
157
157
|
* [`eggs kill`](#eggs-kill)
|
|
158
|
+
* [`eggs krill`](#eggs-krill)
|
|
158
159
|
* [`eggs mom`](#eggs-mom)
|
|
159
160
|
* [`eggs produce`](#eggs-produce)
|
|
160
161
|
* [`eggs remove`](#eggs-remove)
|
|
@@ -188,7 +189,7 @@ DESCRIPTION
|
|
|
188
189
|
adapt monitor resolution for VM only
|
|
189
190
|
```
|
|
190
191
|
|
|
191
|
-
_See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
192
|
+
_See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/adapt.ts)_
|
|
192
193
|
|
|
193
194
|
## `eggs analyze`
|
|
194
195
|
|
|
@@ -209,7 +210,7 @@ EXAMPLES
|
|
|
209
210
|
$ sudo eggs analyze
|
|
210
211
|
```
|
|
211
212
|
|
|
212
|
-
_See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
213
|
+
_See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/analyze.ts)_
|
|
213
214
|
|
|
214
215
|
## `eggs autocomplete [SHELL]`
|
|
215
216
|
|
|
@@ -267,7 +268,7 @@ EXAMPLES
|
|
|
267
268
|
install calamares and create it's configuration's files
|
|
268
269
|
```
|
|
269
270
|
|
|
270
|
-
_See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
271
|
+
_See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/calamares.ts)_
|
|
271
272
|
|
|
272
273
|
## `eggs config`
|
|
273
274
|
|
|
@@ -291,7 +292,7 @@ EXAMPLES
|
|
|
291
292
|
Configure and install prerequisites deb packages to run it
|
|
292
293
|
```
|
|
293
294
|
|
|
294
|
-
_See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
295
|
+
_See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/config.ts)_
|
|
295
296
|
|
|
296
297
|
## `eggs dad`
|
|
297
298
|
|
|
@@ -311,7 +312,7 @@ DESCRIPTION
|
|
|
311
312
|
ask help from daddy - configuration helper
|
|
312
313
|
```
|
|
313
314
|
|
|
314
|
-
_See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
315
|
+
_See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/dad.ts)_
|
|
315
316
|
|
|
316
317
|
## `eggs export deb`
|
|
317
318
|
|
|
@@ -402,7 +403,7 @@ DESCRIPTION
|
|
|
402
403
|
informations about eggs configuration
|
|
403
404
|
```
|
|
404
405
|
|
|
405
|
-
_See code: [src/commands/info.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
406
|
+
_See code: [src/commands/info.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/info.ts)_
|
|
406
407
|
|
|
407
408
|
## `eggs install`
|
|
408
409
|
|
|
@@ -422,13 +423,14 @@ FLAGS
|
|
|
422
423
|
DESCRIPTION
|
|
423
424
|
command-line system installer - the egg became a penguin!
|
|
424
425
|
|
|
426
|
+
ALIASES
|
|
427
|
+
$ eggs install
|
|
428
|
+
|
|
425
429
|
EXAMPLES
|
|
426
430
|
$ eggs install
|
|
427
431
|
Install the system using GUI or CLI installer
|
|
428
432
|
```
|
|
429
433
|
|
|
430
|
-
_See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.31/src/commands/install.ts)_
|
|
431
|
-
|
|
432
434
|
## `eggs kill`
|
|
433
435
|
|
|
434
436
|
kill the eggs/free the nest
|
|
@@ -449,7 +451,35 @@ EXAMPLES
|
|
|
449
451
|
kill the eggs/free the nest
|
|
450
452
|
```
|
|
451
453
|
|
|
452
|
-
_See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
454
|
+
_See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/kill.ts)_
|
|
455
|
+
|
|
456
|
+
## `eggs krill`
|
|
457
|
+
|
|
458
|
+
command-line system installer - the egg became a penguin!
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
USAGE
|
|
462
|
+
$ eggs krill [-c] [-k] [-p] [-h] [-v]
|
|
463
|
+
|
|
464
|
+
FLAGS
|
|
465
|
+
-c, --cli force use CLI installer
|
|
466
|
+
-h, --help Show CLI help.
|
|
467
|
+
-k, --crypted crypted CLI installation
|
|
468
|
+
-p, --pve Proxmox VE install
|
|
469
|
+
-v, --verbose verbose
|
|
470
|
+
|
|
471
|
+
DESCRIPTION
|
|
472
|
+
command-line system installer - the egg became a penguin!
|
|
473
|
+
|
|
474
|
+
ALIASES
|
|
475
|
+
$ eggs install
|
|
476
|
+
|
|
477
|
+
EXAMPLES
|
|
478
|
+
$ eggs install
|
|
479
|
+
Install the system using GUI or CLI installer
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
_See code: [src/commands/krill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/krill.ts)_
|
|
453
483
|
|
|
454
484
|
## `eggs mom`
|
|
455
485
|
|
|
@@ -466,7 +496,7 @@ DESCRIPTION
|
|
|
466
496
|
ask for mommy - gui helper
|
|
467
497
|
```
|
|
468
498
|
|
|
469
|
-
_See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
499
|
+
_See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/mom.ts)_
|
|
470
500
|
|
|
471
501
|
## `eggs produce`
|
|
472
502
|
|
|
@@ -527,7 +557,7 @@ EXAMPLES
|
|
|
527
557
|
in /home/eggs/ovarium and you can customize all you need
|
|
528
558
|
```
|
|
529
559
|
|
|
530
|
-
_See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
560
|
+
_See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/produce.ts)_
|
|
531
561
|
|
|
532
562
|
## `eggs remove`
|
|
533
563
|
|
|
@@ -557,7 +587,7 @@ EXAMPLES
|
|
|
557
587
|
remove eggs, eggs configurations, packages dependencies
|
|
558
588
|
```
|
|
559
589
|
|
|
560
|
-
_See code: [src/commands/remove.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
590
|
+
_See code: [src/commands/remove.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/remove.ts)_
|
|
561
591
|
|
|
562
592
|
## `eggs syncfrom`
|
|
563
593
|
|
|
@@ -581,7 +611,7 @@ EXAMPLES
|
|
|
581
611
|
$ sudo eggs restore
|
|
582
612
|
```
|
|
583
613
|
|
|
584
|
-
_See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
614
|
+
_See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/syncfrom.ts)_
|
|
585
615
|
|
|
586
616
|
## `eggs syncto`
|
|
587
617
|
|
|
@@ -604,7 +634,7 @@ EXAMPLES
|
|
|
604
634
|
$ sudo eggs syncto
|
|
605
635
|
```
|
|
606
636
|
|
|
607
|
-
_See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
637
|
+
_See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/syncto.ts)_
|
|
608
638
|
|
|
609
639
|
## `eggs tools clean`
|
|
610
640
|
|
|
@@ -699,16 +729,27 @@ EXAMPLES
|
|
|
699
729
|
update/upgrade the penguin's eggs tool
|
|
700
730
|
```
|
|
701
731
|
|
|
702
|
-
_See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.
|
|
732
|
+
_See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.1.34/src/commands/update.ts)_
|
|
703
733
|
|
|
704
734
|
## `eggs version`
|
|
705
735
|
|
|
706
736
|
```
|
|
707
737
|
USAGE
|
|
708
|
-
$ eggs version
|
|
738
|
+
$ eggs version [--json] [--verbose]
|
|
739
|
+
|
|
740
|
+
FLAGS
|
|
741
|
+
--verbose Show additional information about the CLI.
|
|
742
|
+
|
|
743
|
+
GLOBAL FLAGS
|
|
744
|
+
--json Format output as json.
|
|
745
|
+
|
|
746
|
+
FLAG DESCRIPTIONS
|
|
747
|
+
--verbose Show additional information about the CLI.
|
|
748
|
+
|
|
749
|
+
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
|
|
709
750
|
```
|
|
710
751
|
|
|
711
|
-
_See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v1.
|
|
752
|
+
_See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v1.1.1/src/commands/version.ts)_
|
|
712
753
|
|
|
713
754
|
## `eggs wardrobe get [REPO]`
|
|
714
755
|
|
|
@@ -18,13 +18,13 @@ zone: "Rome"
|
|
|
18
18
|
# System locales are detected in the following order:
|
|
19
19
|
#
|
|
20
20
|
# - /usr/share/i18n/SUPPORTED
|
|
21
|
-
# - localeGenPath (defaults to /etc/
|
|
21
|
+
# - localeGenPath (defaults to /etc/ if not set)
|
|
22
22
|
# - 'locale -a' output
|
|
23
23
|
#
|
|
24
24
|
# Enable only when your Distribution is using an
|
|
25
|
-
# custom path for
|
|
25
|
+
# custom path for
|
|
26
26
|
#
|
|
27
|
-
#localeGenPath: "PATH_TO/
|
|
27
|
+
#localeGenPath: "PATH_TO/"
|
|
28
28
|
|
|
29
29
|
# GeoIP based Language settings: Leave commented out to disable GeoIP.
|
|
30
30
|
#
|
package/conf/eggs.yaml
CHANGED
|
@@ -63,8 +63,8 @@ make_isohybrid: true
|
|
|
63
63
|
|
|
64
64
|
# Compression algorithm
|
|
65
65
|
# Allowed values are, in order of speed-size tradeoff: lz4, lzo, gzip, xz
|
|
66
|
-
# default
|
|
67
|
-
compression: '
|
|
66
|
+
# default -Xcompression-level 20
|
|
67
|
+
compression: '-Xcompression-level 20'
|
|
68
68
|
|
|
69
69
|
# Allow password login to ssh for users (not root).
|
|
70
70
|
# If ssh_pass=true, then PasswordAuthentication will be set to true
|
|
@@ -11,6 +11,13 @@ export default class Compressors {
|
|
|
11
11
|
source: string;
|
|
12
12
|
dest: string;
|
|
13
13
|
populate(): Promise<void>;
|
|
14
|
+
fast(): string;
|
|
15
|
+
normal(): string;
|
|
16
|
+
/**
|
|
17
|
+
* max
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
max(): string;
|
|
14
21
|
private prepareCheck;
|
|
15
22
|
private removeCheck;
|
|
16
23
|
private check;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
/**
|
|
5
|
-
* test
|
|
5
|
+
* test available compressors
|
|
6
6
|
*/
|
|
7
7
|
const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
|
|
8
8
|
class Compressors {
|
|
@@ -29,6 +29,43 @@ class Compressors {
|
|
|
29
29
|
this.isEnabled.zstd = await this.check('zstd');
|
|
30
30
|
await this.removeCheck();
|
|
31
31
|
}
|
|
32
|
+
// fastest
|
|
33
|
+
fast() {
|
|
34
|
+
let comp = 'gzip';
|
|
35
|
+
if (this.isEnabled.zstd) {
|
|
36
|
+
comp = 'zstd -b 256K -Xcompression-level 1';
|
|
37
|
+
}
|
|
38
|
+
else if (this.isEnabled.lz4) {
|
|
39
|
+
comp = 'lz4';
|
|
40
|
+
}
|
|
41
|
+
return comp;
|
|
42
|
+
}
|
|
43
|
+
// normal
|
|
44
|
+
normal() {
|
|
45
|
+
let comp = "xz";
|
|
46
|
+
if (this.isEnabled.zstd) {
|
|
47
|
+
comp = 'zstd -b 256K -Xcompression-level 20';
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
comp = 'xz -b 256K';
|
|
51
|
+
}
|
|
52
|
+
return comp;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* max
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
max() {
|
|
59
|
+
let comp = 'xz -b 256K -Xbcj ';
|
|
60
|
+
const filter = 'x86';
|
|
61
|
+
if (process.arch === 'arm') {
|
|
62
|
+
const filter = 'ARM'; // to check
|
|
63
|
+
}
|
|
64
|
+
else if (process.arch === 'arm64') {
|
|
65
|
+
const filter = 'ARM64'; // to check
|
|
66
|
+
}
|
|
67
|
+
return comp + filter;
|
|
68
|
+
}
|
|
32
69
|
async prepareCheck() {
|
|
33
70
|
shelljs_1.default.exec('rm -rf ' + this.source, { silent: true });
|
|
34
71
|
shelljs_1.default.exec('mkdir ' + this.source, { silent: true });
|
package/lib/classes/daddy.js
CHANGED
|
@@ -60,39 +60,16 @@ class Daddy {
|
|
|
60
60
|
config.root_passwd = newConf.root_passwd;
|
|
61
61
|
config.theme = newConf.theme;
|
|
62
62
|
/**
|
|
63
|
-
* Analisi del tipo di compressione
|
|
64
|
-
*
|
|
63
|
+
* Analisi del tipo di compressione disponibile
|
|
65
64
|
*/
|
|
66
65
|
const compressors = new compressors_1.default();
|
|
67
66
|
await compressors.populate();
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
|
|
67
|
+
config.compression = compressors.normal();
|
|
68
|
+
if (newConf.compression === 'fast') {
|
|
69
|
+
config.compression = compressors.fast();
|
|
71
70
|
}
|
|
72
|
-
else if (
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
switch (newConf.compression) {
|
|
76
|
-
case 'fast': {
|
|
77
|
-
config.compression = fastest;
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
case 'normal': {
|
|
81
|
-
config.compression = 'xz';
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
case 'max': {
|
|
85
|
-
const filter = 'x86';
|
|
86
|
-
if (process.arch === 'arm') {
|
|
87
|
-
const filter = 'ARM'; // to check
|
|
88
|
-
}
|
|
89
|
-
else if (process.arch === 'arm64') {
|
|
90
|
-
const filter = 'ARM64'; // to check
|
|
91
|
-
}
|
|
92
|
-
config.compression = 'xz -Xbcj ' + filter;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
// No default
|
|
71
|
+
else if (newConf.compression === 'max') {
|
|
72
|
+
config.compression = compressors.max();
|
|
96
73
|
}
|
|
97
74
|
await this.settings.save(config);
|
|
98
75
|
let flags = '';
|
package/lib/classes/distro.js
CHANGED
|
@@ -292,9 +292,16 @@ class Distro {
|
|
|
292
292
|
// Netrunner
|
|
293
293
|
this.distroLike = 'Debian';
|
|
294
294
|
this.codenameLikeId = 'buster';
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Arch Linux
|
|
299
|
+
* distroId= "Arch"
|
|
300
|
+
*/
|
|
301
|
+
case 'n/a': {
|
|
302
|
+
this.familyId = 'archlinux';
|
|
303
|
+
this.distroLike = 'Arch';
|
|
304
|
+
this.codenameLikeId = 'rolling';
|
|
298
305
|
break;
|
|
299
306
|
}
|
|
300
307
|
/**
|
|
@@ -315,7 +322,8 @@ class Distro {
|
|
|
315
322
|
/**
|
|
316
323
|
* Manjaro
|
|
317
324
|
*/
|
|
318
|
-
case 'Qonos':
|
|
325
|
+
case 'Qonos':
|
|
326
|
+
case 'Ruah': {
|
|
319
327
|
this.familyId = 'archlinux';
|
|
320
328
|
this.distroLike = 'Arch';
|
|
321
329
|
this.codenameLikeId = 'rolling';
|
|
@@ -12,10 +12,13 @@ const pacman_1 = tslib_1.__importDefault(require("../../pacman"));
|
|
|
12
12
|
function remove(distro) {
|
|
13
13
|
let remove = true;
|
|
14
14
|
let removePackages = pacman_1.default.packages(remove);
|
|
15
|
-
removePackages.push("calamares");
|
|
16
|
-
removePackages.push("eggs");
|
|
17
15
|
if (distro.distroLike === 'Arch') {
|
|
18
|
-
removePackages = ["calamares"];
|
|
16
|
+
removePackages = ["calamares"];
|
|
17
|
+
removePackages = ["penguins-eggs"];
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
removePackages.push("calamares");
|
|
21
|
+
removePackages.push("eggs");
|
|
19
22
|
}
|
|
20
23
|
const mustRemain = ["coreutils", "cryptsetup", "curl", "dosfstools", "git", "parted", "rsync", "lvm2"];
|
|
21
24
|
let sorted = [];
|
|
@@ -9,37 +9,35 @@ export default class Keyboard {
|
|
|
9
9
|
options: string[];
|
|
10
10
|
constructor();
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @returns
|
|
12
|
+
* XKBMODEL[]
|
|
14
13
|
*/
|
|
15
14
|
getModels(): IXkbModel[];
|
|
16
15
|
/**
|
|
17
|
-
*
|
|
18
|
-
* us English (US)
|
|
16
|
+
* XKBLAYOUT=[]
|
|
19
17
|
*/
|
|
20
18
|
getLayouts(): IXkbLayout[];
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* IXkbVariant[]
|
|
23
21
|
*/
|
|
24
22
|
getVariants(layout: string): IXkbVariant[];
|
|
25
23
|
/**
|
|
26
|
-
*
|
|
24
|
+
* XKBOPTIONS[]
|
|
27
25
|
*/
|
|
28
26
|
getOptions(): IXkbOption[];
|
|
29
27
|
/**
|
|
30
|
-
*
|
|
28
|
+
* XKBMODEL='pc105'
|
|
31
29
|
*/
|
|
32
|
-
|
|
30
|
+
getModel(): Promise<string>;
|
|
33
31
|
/**
|
|
34
|
-
*
|
|
32
|
+
* XKBLAYOUT='us'
|
|
35
33
|
*/
|
|
36
34
|
getLayout(): Promise<string>;
|
|
37
35
|
/**
|
|
38
|
-
*
|
|
36
|
+
* XKBVARIANT=''
|
|
39
37
|
*/
|
|
40
|
-
|
|
38
|
+
getVariant(): Promise<string>;
|
|
41
39
|
/**
|
|
42
|
-
*
|
|
40
|
+
* XKBOPTIONS=''
|
|
43
41
|
*/
|
|
44
42
|
getOption(): Promise<string>;
|
|
45
43
|
}
|
package/lib/classes/keyboards.js
CHANGED
|
@@ -68,8 +68,7 @@ class Keyboard {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @returns
|
|
71
|
+
* XKBMODEL[]
|
|
73
72
|
*/
|
|
74
73
|
getModels() {
|
|
75
74
|
// 0123456789012345678901234567890123456789
|
|
@@ -84,12 +83,9 @@ class Keyboard {
|
|
|
84
83
|
return oModels;
|
|
85
84
|
}
|
|
86
85
|
/**
|
|
87
|
-
*
|
|
88
|
-
* us English (US)
|
|
86
|
+
* XKBLAYOUT=[]
|
|
89
87
|
*/
|
|
90
88
|
getLayouts() {
|
|
91
|
-
// 0123456789012345678901234567890123456789
|
|
92
|
-
// us English (US)
|
|
93
89
|
const oLayouts = [];
|
|
94
90
|
for (const layout of this.layouts) {
|
|
95
91
|
const l = {};
|
|
@@ -100,7 +96,7 @@ class Keyboard {
|
|
|
100
96
|
return oLayouts;
|
|
101
97
|
}
|
|
102
98
|
/**
|
|
103
|
-
*
|
|
99
|
+
* IXkbVariant[]
|
|
104
100
|
*/
|
|
105
101
|
getVariants(layout) {
|
|
106
102
|
// 0123456789012345678901234567890123456789
|
|
@@ -118,7 +114,7 @@ class Keyboard {
|
|
|
118
114
|
return aoVariants;
|
|
119
115
|
}
|
|
120
116
|
/**
|
|
121
|
-
*
|
|
117
|
+
* XKBOPTIONS[]
|
|
122
118
|
*/
|
|
123
119
|
getOptions() {
|
|
124
120
|
// 0123456789012345678901234567890123456789
|
|
@@ -133,27 +129,27 @@ class Keyboard {
|
|
|
133
129
|
return aoOptions;
|
|
134
130
|
}
|
|
135
131
|
/**
|
|
136
|
-
*
|
|
132
|
+
* XKBMODEL='pc105'
|
|
137
133
|
*/
|
|
138
|
-
async
|
|
134
|
+
async getModel() {
|
|
139
135
|
const file = '/etc/default/keyboard';
|
|
140
|
-
const cmd = `grep
|
|
141
|
-
let
|
|
136
|
+
const cmd = `grep XKBMODEL < ${file} |cut -f2 -d= | cut -f2 "-d\\""`;
|
|
137
|
+
let keyboardModel = 'pc105';
|
|
142
138
|
if (fs_1.default.existsSync(file)) {
|
|
143
139
|
const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
|
|
144
140
|
if (result.code === 0) {
|
|
145
|
-
|
|
141
|
+
keyboardModel = result.data.trim();
|
|
146
142
|
}
|
|
147
143
|
}
|
|
148
|
-
return
|
|
144
|
+
return keyboardModel;
|
|
149
145
|
}
|
|
150
146
|
/**
|
|
151
|
-
*
|
|
147
|
+
* XKBLAYOUT='us'
|
|
152
148
|
*/
|
|
153
149
|
async getLayout() {
|
|
154
150
|
const file = '/etc/default/keyboard';
|
|
155
151
|
const cmd = `grep XKBLAYOUT < /etc/default/keyboard | cut -f2 -d= | cut -f2 "-d\\""`;
|
|
156
|
-
let keyboardLayout = '
|
|
152
|
+
let keyboardLayout = 'us';
|
|
157
153
|
if (fs_1.default.existsSync(file)) {
|
|
158
154
|
const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
|
|
159
155
|
if (result.code === 0) {
|
|
@@ -163,22 +159,22 @@ class Keyboard {
|
|
|
163
159
|
return keyboardLayout;
|
|
164
160
|
}
|
|
165
161
|
/**
|
|
166
|
-
*
|
|
162
|
+
* XKBVARIANT=''
|
|
167
163
|
*/
|
|
168
|
-
async
|
|
164
|
+
async getVariant() {
|
|
169
165
|
const file = '/etc/default/keyboard';
|
|
170
|
-
const cmd = `grep
|
|
171
|
-
let
|
|
166
|
+
const cmd = `grep XKBVARIANT < ${file} | cut -f2 -d=|cut -f2 "-d\\""`;
|
|
167
|
+
let keyboardVariant = '';
|
|
172
168
|
if (fs_1.default.existsSync(file)) {
|
|
173
169
|
const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
|
|
174
170
|
if (result.code === 0) {
|
|
175
|
-
|
|
171
|
+
keyboardVariant = result.data.trim();
|
|
176
172
|
}
|
|
177
173
|
}
|
|
178
|
-
return
|
|
174
|
+
return keyboardVariant;
|
|
179
175
|
}
|
|
180
176
|
/**
|
|
181
|
-
*
|
|
177
|
+
* XKBOPTIONS=''
|
|
182
178
|
*/
|
|
183
179
|
async getOption() {
|
|
184
180
|
const file = '/etc/default/keyboard';
|
package/lib/classes/locales.js
CHANGED
|
@@ -3,11 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const utils_1 = require("../lib/utils");
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
|
+
const distro_1 = tslib_1.__importDefault(require("./distro"));
|
|
6
7
|
class Locales {
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
*/
|
|
10
11
|
async getEnabled() {
|
|
12
|
+
// Restituisce i locales abilitati in Debian, per manjaro quelli presenti
|
|
13
|
+
// in /etc/locale.gen anche se #disabilitati
|
|
11
14
|
const cmd = `localectl list-locales`;
|
|
12
15
|
let enabledLocales = [];
|
|
13
16
|
const result = await (0, utils_1.exec)(cmd, { capture: true, echo: false, ignore: false });
|
|
@@ -23,17 +26,19 @@ class Locales {
|
|
|
23
26
|
*
|
|
24
27
|
*/
|
|
25
28
|
async getSupported() {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
const distro = new distro_1.default();
|
|
30
|
+
let supporteds = [];
|
|
31
|
+
if (distro.familyId === 'debian') {
|
|
32
|
+
supporteds = fs_1.default.readFileSync('/usr/share/i18n/SUPPORTED', 'utf-8').split('\n');
|
|
33
|
+
}
|
|
34
|
+
else if (distro.familyId === 'archlinux') {
|
|
35
|
+
supporteds = (await (0, utils_1.exec)('localectl list-locales', { capture: true, echo: false, ignore: false })).data.split('\n');
|
|
36
|
+
}
|
|
37
|
+
const elements = [];
|
|
38
|
+
for (const elem of supporteds) {
|
|
39
|
+
elements.push(elem.replace(' UTF-8', ''));
|
|
35
40
|
}
|
|
36
|
-
return
|
|
41
|
+
return elements;
|
|
37
42
|
}
|
|
38
43
|
/**
|
|
39
44
|
*
|
package/lib/classes/ovary.js
CHANGED
|
@@ -542,6 +542,7 @@ class Ovary {
|
|
|
542
542
|
}
|
|
543
543
|
let lackVmlinuzImage = false;
|
|
544
544
|
if (fs_1.default.existsSync(this.settings.kernel_image)) {
|
|
545
|
+
console.log('kernel image:' + this.settings.kernel_image);
|
|
545
546
|
await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.work_dir.pathIso}/live/`, this.echo);
|
|
546
547
|
}
|
|
547
548
|
else {
|
|
@@ -561,7 +562,12 @@ class Ovary {
|
|
|
561
562
|
let initrdImg = utils_2.default.initrdImg();
|
|
562
563
|
initrdImg = initrdImg.substring(initrdImg.lastIndexOf('/') + 1);
|
|
563
564
|
utils_2.default.warning(`Creating ${initrdImg} in ${this.settings.work_dir.pathIso}/live/`);
|
|
564
|
-
|
|
565
|
+
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
566
|
+
await (0, utils_1.exec)(`mkinitcpio -c ${node_path_1.default.resolve(__dirname, '../../mkinitcpio/manjaro/mkinitcpio-produce.conf')} -g ${this.settings.work_dir.pathIso}/live/${initrdImg}`, utils_2.default.setEcho(true));
|
|
567
|
+
}
|
|
568
|
+
else if (this.settings.distro.distroId === 'Arch') {
|
|
569
|
+
await (0, utils_1.exec)(`mkinitcpio -c ${node_path_1.default.resolve(__dirname, '../../mkinitcpio/archlinux/mkinitcpio-produce.conf')} -g ${this.settings.work_dir.pathIso}/live/${initrdImg}`, utils_2.default.setEcho(true));
|
|
570
|
+
}
|
|
565
571
|
}
|
|
566
572
|
/**
|
|
567
573
|
* We must upgrade to initrdCreate for Debian/Ubuntu
|
|
@@ -632,12 +638,11 @@ class Ovary {
|
|
|
632
638
|
//this.addRemoveExclusion(true, '/etc/localtime')
|
|
633
639
|
}
|
|
634
640
|
this.addRemoveExclusion(true, this.settings.config.snapshot_dir /* .absolutePath() */);
|
|
635
|
-
const compression = `-comp ${this.settings.config.compression}`;
|
|
636
641
|
if (fs_1.default.existsSync(`${this.settings.work_dir.pathIso}/live/filesystem.squashfs`)) {
|
|
637
642
|
fs_1.default.unlinkSync(`${this.settings.work_dir.pathIso}/live/filesystem.squashfs`);
|
|
638
643
|
}
|
|
639
|
-
|
|
640
|
-
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}
|
|
644
|
+
const compression = `-comp ${this.settings.config.compression}`;
|
|
645
|
+
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}`;
|
|
641
646
|
cmd = cmd.replace(/\s\s+/g, ' ');
|
|
642
647
|
utils_2.default.writeX(`${this.settings.work_dir.path}mksquashfs`, cmd);
|
|
643
648
|
if (!scriptOnly) {
|