penguins-eggs 9.0.31 → 9.1.10

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 (153) hide show
  1. package/README.md +488 -28
  2. package/assets/leaves.svg +1 -0
  3. package/assets/live-installer/com.github.pieroproietti.penguins-eggs.policy +25 -0
  4. package/assets/live-installer/filesystem.packages-remove +49 -0
  5. package/assets/penguins-live-installer.desktop +27 -0
  6. package/conf/distros/buster/calamares/modules/bootloader.yml +3 -1
  7. package/conf/eggs.yaml +9 -2
  8. package/lib/classes/bleach.js +2 -2
  9. package/lib/classes/compressors.js +1 -1
  10. package/lib/classes/daddy.js +30 -30
  11. package/lib/classes/distro.d.ts +5 -3
  12. package/lib/classes/distro.js +78 -80
  13. package/lib/classes/family/archlinux.js +4 -4
  14. package/lib/classes/family/debian.d.ts +4 -0
  15. package/lib/classes/family/debian.js +13 -6
  16. package/lib/classes/family/fedora.js +4 -4
  17. package/lib/classes/family/suse.js +4 -4
  18. package/lib/classes/i18n.d.ts +28 -4
  19. package/lib/classes/i18n.js +112 -84
  20. package/lib/classes/incubation/branding.js +13 -7
  21. package/lib/classes/incubation/distros/bionic.js +1 -1
  22. package/lib/classes/incubation/distros/buster.js +1 -1
  23. package/lib/classes/incubation/distros/focal.js +1 -1
  24. package/lib/classes/incubation/distros/jessie.js +1 -1
  25. package/lib/classes/incubation/distros/rolling.js +1 -1
  26. package/lib/classes/incubation/fisherman-helper/displaymanager.js +1 -1
  27. package/lib/classes/incubation/fisherman-helper/packages.js +2 -2
  28. package/lib/classes/incubation/fisherman.js +5 -5
  29. package/lib/classes/incubation/incubator.js +5 -5
  30. package/lib/classes/incubation/installer.d.ts +1 -1
  31. package/lib/classes/incubation/installer.js +4 -4
  32. package/lib/classes/initrd.js +2 -2
  33. package/lib/classes/keyboards.d.ts +45 -0
  34. package/lib/classes/keyboards.js +196 -0
  35. package/lib/classes/krill_install.d.ts +5 -0
  36. package/lib/classes/krill_install.js +46 -14
  37. package/lib/classes/krill_prepare.d.ts +4 -0
  38. package/lib/classes/krill_prepare.js +56 -77
  39. package/lib/classes/locales.d.ts +14 -0
  40. package/lib/classes/locales.js +54 -0
  41. package/lib/classes/n8.js +1 -1
  42. package/lib/classes/ovary.d.ts +6 -1
  43. package/lib/classes/ovary.js +77 -60
  44. package/lib/classes/pacman.d.ts +1 -1
  45. package/lib/classes/pacman.js +40 -40
  46. package/lib/classes/pve-live.js +12 -16
  47. package/lib/classes/settings.d.ts +6 -0
  48. package/lib/classes/settings.js +13 -16
  49. package/lib/classes/sources_list.d.ts +27 -0
  50. package/lib/classes/sources_list.js +103 -0
  51. package/lib/classes/systemctl.js +1 -1
  52. package/lib/classes/tailor.d.ts +41 -0
  53. package/lib/classes/tailor.js +356 -0
  54. package/lib/classes/tools.js +4 -4
  55. package/lib/classes/users.js +1 -1
  56. package/lib/classes/utils.d.ts +16 -3
  57. package/lib/classes/utils.js +74 -36
  58. package/lib/classes/xdg.d.ts +2 -1
  59. package/lib/classes/xdg.js +56 -131
  60. package/lib/classes/yolk.d.ts +8 -7
  61. package/lib/classes/yolk.js +35 -38
  62. package/lib/commands/adapt.js +1 -1
  63. package/lib/commands/analyze.js +2 -2
  64. package/lib/commands/bro.js +2 -2
  65. package/lib/commands/calamares.js +4 -4
  66. package/lib/commands/config.js +8 -6
  67. package/lib/commands/dad.js +2 -2
  68. package/lib/commands/export/deb.js +2 -2
  69. package/lib/commands/export/docs.js +2 -2
  70. package/lib/commands/export/iso.js +2 -2
  71. package/lib/commands/info.js +2 -2
  72. package/lib/commands/install.js +5 -5
  73. package/lib/commands/kill.js +2 -2
  74. package/lib/commands/mom.js +2 -2
  75. package/lib/commands/produce.js +9 -9
  76. package/lib/commands/remove.js +2 -2
  77. package/lib/commands/syncfrom.d.ts +9 -3
  78. package/lib/commands/syncfrom.js +39 -32
  79. package/lib/commands/syncto.d.ts +26 -6
  80. package/lib/commands/syncto.js +73 -50
  81. package/lib/commands/tools/clean.js +2 -2
  82. package/lib/commands/tools/locales.js +9 -4
  83. package/lib/commands/tools/skel.js +2 -2
  84. package/lib/commands/tools/stat.js +3 -3
  85. package/lib/commands/tools/yolk.js +4 -4
  86. package/lib/commands/update.d.ts +0 -2
  87. package/lib/commands/update.js +7 -56
  88. package/lib/commands/wardrobe/get.d.ts +17 -0
  89. package/lib/commands/wardrobe/get.js +43 -0
  90. package/lib/commands/wardrobe/ironing.d.ts +15 -0
  91. package/lib/commands/wardrobe/ironing.js +125 -0
  92. package/lib/commands/wardrobe/list.d.ts +17 -0
  93. package/lib/commands/wardrobe/list.js +81 -0
  94. package/lib/commands/wardrobe/show.d.ts +19 -0
  95. package/lib/commands/wardrobe/show.js +71 -0
  96. package/lib/commands/wardrobe/wear.d.ts +20 -0
  97. package/lib/commands/wardrobe/wear.js +79 -0
  98. package/lib/components/elements/information.js +41 -34
  99. package/lib/components/elements/steps.js +1 -1
  100. package/lib/components/elements/title.js +5 -4
  101. package/lib/components/finished.js +6 -5
  102. package/lib/components/install.js +5 -5
  103. package/lib/components/keyboard.js +5 -8
  104. package/lib/components/location.js +5 -5
  105. package/lib/components/network.js +6 -5
  106. package/lib/components/partitions.js +5 -5
  107. package/lib/components/summary.js +5 -5
  108. package/lib/components/users.js +5 -5
  109. package/lib/components/welcome.js +7 -7
  110. package/lib/interfaces/i-costume.d.ts +27 -0
  111. package/lib/interfaces/i-costume.js +2 -0
  112. package/lib/interfaces/i-distro.d.ts +4 -2
  113. package/lib/interfaces/i-installer.d.ts +1 -1
  114. package/lib/interfaces/i-krill.d.ts +1 -0
  115. package/lib/interfaces/i-materia.d.ts +32 -0
  116. package/lib/interfaces/i-materia.js +2 -0
  117. package/lib/interfaces/i-packages.d.ts +13 -0
  118. package/lib/interfaces/i-packages.js +2 -0
  119. package/lib/interfaces/i-xkb-model.d.ts +17 -0
  120. package/lib/interfaces/i-xkb-model.js +2 -0
  121. package/lib/interfaces/index.d.ts +2 -0
  122. package/lib/lib/cli-autologin.js +3 -3
  123. package/lib/lib/select_address_type.js +1 -1
  124. package/lib/lib/select_filesystem_type.js +2 -2
  125. package/lib/lib/select_installation_device.js +1 -1
  126. package/lib/lib/select_interface.js +1 -1
  127. package/lib/lib/select_keyboard_layout.d.ts +1 -28
  128. package/lib/lib/select_keyboard_layout.js +18 -33
  129. package/lib/lib/select_keyboard_model.d.ts +4 -0
  130. package/lib/lib/select_keyboard_model.js +36 -0
  131. package/lib/lib/select_keyboard_option.d.ts +4 -0
  132. package/lib/lib/select_keyboard_option.js +36 -0
  133. package/lib/lib/select_keyboard_variant.d.ts +1 -5
  134. package/lib/lib/select_keyboard_variant.js +32 -5
  135. package/lib/lib/select_languages.d.ts +1 -1
  136. package/lib/lib/select_languages.js +8 -7
  137. package/lib/lib/select_regions.d.ts +1 -1
  138. package/lib/lib/select_regions.js +2 -2
  139. package/lib/lib/select_user_swap_choice.js +2 -2
  140. package/oclif.manifest.json +1 -1
  141. package/package.json +19 -20
  142. package/scripts/_eggs +53 -8
  143. package/scripts/eggs.bash +9 -4
  144. package/scripts/mom-cli.sh +66 -0
  145. package/scripts/resy.sh +8 -0
  146. package/scripts/userexist.sh +6 -0
  147. package/assets/penguins-clinstaller.desktop +0 -24
  148. package/assets/penguins-minstall.desktop +0 -95
  149. package/conf/distros/buster/locales/locale.gen.template +0 -10
  150. package/conf/distros/buster/locales/locale.template +0 -11
  151. package/conf/distros/focal/locale.gen.template +0 -8
  152. package/lib/classes/basket.d.ts +0 -22
  153. package/lib/classes/basket.js +0 -114
@@ -7,10 +7,10 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
12
- const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
13
- const pacman_1 = (0, tslib_1.__importDefault)(require("../pacman"));
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
12
+ const utils_1 = tslib_1.__importDefault(require("../utils"));
13
+ const pacman_1 = tslib_1.__importDefault(require("../pacman"));
14
14
  const dependencies_1 = require("../../lib/dependencies");
15
15
  const utils_2 = require("../../lib/utils");
16
16
  /**
@@ -32,6 +32,10 @@ export default class Debian {
32
32
  * Torna verso se calamares è installato
33
33
  */
34
34
  static calamaresCheck(): Promise<boolean>;
35
+ /**
36
+ *
37
+ */
38
+ static liveInstallerPolicies(): Promise<void>;
35
39
  /**
36
40
  *
37
41
  */
@@ -7,10 +7,10 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
12
- const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
13
- const pacman_1 = (0, tslib_1.__importDefault)(require("../pacman"));
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
12
+ const utils_1 = tslib_1.__importDefault(require("../utils"));
13
+ const pacman_1 = tslib_1.__importDefault(require("../pacman"));
14
14
  const utils_2 = require("../../lib/utils");
15
15
  const dependencies_1 = require("../../lib/dependencies");
16
16
  /**
@@ -24,7 +24,7 @@ class Debian {
24
24
  */
25
25
  static isInstalledXorg() {
26
26
  let test = 'xserver-xorg-core';
27
- if (pacman_1.default.distro().versionLike === 'bionic') {
27
+ if (pacman_1.default.distro().codenameLikeId === 'bionic') {
28
28
  /**
29
29
  * BUT_ on Ubuntu bionic we have:
30
30
  * xserver-xorg-core-hwe-18.04
@@ -69,7 +69,7 @@ class Debian {
69
69
  }
70
70
  }
71
71
  // Version e initType da controllare
72
- const version = pacman_1.default.distro().versionLike;
72
+ const version = pacman_1.default.distro().codenameLikeId;
73
73
  for (const dep of dependencies_1.depVersions) {
74
74
  if (dep.versions.includes(version)) {
75
75
  if (!this.packageIsInstalled(dep.package)) {
@@ -135,6 +135,13 @@ class Debian {
135
135
  }
136
136
  return installed;
137
137
  }
138
+ /**
139
+ *
140
+ */
141
+ static async liveInstallerPolicies() {
142
+ const policyFile = '/usr/share/polkit-1/actions/com.github.pieroproietti.penguins-eggs.policy';
143
+ await (0, utils_2.exec)(`sed -i 's/auth_admin/yes/' ${policyFile}`);
144
+ }
138
145
  /**
139
146
  *
140
147
  */
@@ -7,10 +7,10 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
12
- const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
13
- const pacman_1 = (0, tslib_1.__importDefault)(require("../pacman"));
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
12
+ const utils_1 = tslib_1.__importDefault(require("../utils"));
13
+ const pacman_1 = tslib_1.__importDefault(require("../pacman"));
14
14
  const dependencies_1 = require("../../lib/dependencies");
15
15
  const utils_2 = require("../../lib/utils");
16
16
  /**
@@ -7,10 +7,10 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
12
- const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
13
- const pacman_1 = (0, tslib_1.__importDefault)(require("../pacman"));
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
12
+ const utils_1 = tslib_1.__importDefault(require("../utils"));
13
+ const pacman_1 = tslib_1.__importDefault(require("../pacman"));
14
14
  const dependencies_1 = require("../../lib/dependencies");
15
15
  const utils_2 = require("../../lib/utils");
16
16
  /**
@@ -1,14 +1,38 @@
1
+ /**
2
+ * penguins-eggs:
3
+ * author: Piero Proietti
4
+ * mail: piero.proietti@gmail.com
5
+ *
6
+ */
1
7
  import Settings from './settings';
2
8
  /**
3
- * Ovary:
9
+ * I18n
4
10
  */
5
11
  export default class I18n {
6
12
  verbose: boolean;
13
+ echo: {};
14
+ toNull: string;
15
+ chroot: string;
7
16
  settings: Settings;
8
- constructor(verbose?: boolean);
17
+ constructor(chroot?: string, verbose?: boolean);
18
+ /**
19
+ * reinstall
20
+ */
21
+ reinstall(): Promise<void>;
9
22
  /**
10
23
  *
11
- * @param reinstall
12
24
  */
13
- generate(reinstall?: boolean): void;
25
+ generate(fromSettings?: boolean, defaultLocale?: string, locales?: string[]): Promise<void>;
26
+ /**
27
+ * localeGen
28
+ */
29
+ private localeGen;
30
+ /**
31
+ * /etc/locale.conf
32
+ */
33
+ private localeConf;
34
+ /**
35
+ * /etc/default/locale
36
+ */
37
+ private defaultLocale;
14
38
  }
@@ -1,110 +1,138 @@
1
1
  "use strict";
2
- /* eslint-disable valid-jsdoc */
3
- /* eslint-disable no-console */
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- const tslib_1 = require("tslib");
6
2
  /**
7
- * penguins-eggs: ovary.ts VERSIONE DEBIAN-LIVE
3
+ * penguins-eggs:
8
4
  * author: Piero Proietti
9
5
  * mail: piero.proietti@gmail.com
10
6
  *
11
7
  */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const tslib_1 = require("tslib");
12
10
  // packages
13
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
14
- const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
15
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
16
- const mustache_1 = (0, tslib_1.__importDefault)(require("mustache"));
17
- // interfaces
11
+ const fs_1 = tslib_1.__importDefault(require("fs"));
12
+ const mustache_1 = tslib_1.__importDefault(require("mustache"));
13
+ const settings_1 = tslib_1.__importDefault(require("./settings"));
14
+ const utils_1 = tslib_1.__importDefault(require("./utils"));
18
15
  // libraries
19
- // classes
20
- const settings_1 = (0, tslib_1.__importDefault)(require("./settings"));
16
+ const utils_2 = require("../lib/utils");
21
17
  /**
22
- * Ovary:
18
+ * I18n
23
19
  */
24
20
  class I18n {
25
- constructor(verbose = false) {
21
+ constructor(chroot = '/', verbose = false) {
26
22
  this.verbose = false;
23
+ this.echo = {};
24
+ this.toNull = '';
25
+ this.chroot = '/';
27
26
  this.settings = {};
28
27
  this.verbose = verbose;
28
+ this.echo = utils_1.default.setEcho(verbose);
29
+ if (this.verbose) {
30
+ this.toNull = ' > /dev/null 2>&1';
31
+ }
29
32
  this.settings = new settings_1.default();
33
+ this.chroot = chroot;
34
+ }
35
+ /**
36
+ * reinstall
37
+ */
38
+ async reinstall() {
39
+ utils_1.default.warning('reinstalling locales');
40
+ await (0, utils_2.exec)('apt-get purge locales --yes', this.echo);
41
+ await (0, utils_2.exec)('apt-get reinstall locales --yes', this.echo);
42
+ process.exit();
30
43
  }
31
44
  /**
32
45
  *
33
- * @param reinstall
34
46
  */
35
- generate(reinstall = false) {
36
- this.settings.load();
37
- this.verbose = true;
38
- /**
39
- * apt-get purge locales --yes
40
- */
41
- console.log('remove package locales');
42
- // shx.exec('apt-get purge locales --yes')
43
- /**
44
- * /etc/default/locale
45
- */
46
- if (this.verbose) {
47
- console.log('creating /etc/default.locale');
48
- }
49
- const src = node_path_1.default.resolve(__dirname, `../../conf/distros/${this.settings.distro.versionId}/locales/locale.template`);
50
- const dest = '/etc/default/locale';
51
- const template = node_fs_1.default.readFileSync(src, 'utf8');
52
- const view = {
53
- locale: this.settings.config.locales_default
54
- };
55
- node_fs_1.default.writeFileSync(dest, mustache_1.default.render(template, view));
56
- /**
57
- * /etc/locale.gen
58
- */
59
- if (this.verbose) {
60
- console.log('creating /etc/locale.gen');
47
+ async generate(fromSettings = true, defaultLocale = 'en_EN.UTF-8', locales = ['en_EN.UTF-8']) {
48
+ if (fromSettings) {
49
+ this.settings.load();
50
+ utils_1.default.warning("Configuring locales from /etc/penguins-eggs.d/eggs.yml");
51
+ defaultLocale = this.settings.config.locales_default;
52
+ locales = [];
53
+ for (let i = 0; i < this.settings.config.locales.length; i++) {
54
+ locales.push(this.settings.config.locales[i]);
55
+ }
61
56
  }
62
- const srcLocales = node_path_1.default.resolve(__dirname, `../../conf/distros/${this.settings.distro.versionId}/locales/locale.gen.template`);
63
- const destLocales = '/etc/locale.gen';
64
- const templateLocales = node_fs_1.default.readFileSync(srcLocales, 'utf8');
65
- const viewLocales = { locales: [{}] };
66
- for (let i = 0; i < this.settings.config.locales.length; i++) {
67
- viewLocales.locales.push({ locale: this.settings.config.locales[i] + ' UTF-8' });
57
+ else {
58
+ utils_1.default.warning("Configuring locales from krill");
68
59
  }
69
- node_fs_1.default.writeFileSync(destLocales, mustache_1.default.render(templateLocales, viewLocales));
70
- if (reinstall) {
71
- /**
72
- * apt-get install locales --yes
73
- */
74
- console.log('reinstall package locales');
75
- shelljs_1.default.exec('apt-get reinstall locales --yes');
76
- // Eseguire localepurge file /etc/locale.nopurge
77
- // rimangono però i task task-italian, polish, etc che dipendono da task-sel
60
+ console.log(`default: ${defaultLocale}`);
61
+ console.log('create locales:');
62
+ for (let i = 0; i < locales.length; i++) {
63
+ console.log(`- ${locales[i]}`);
78
64
  }
79
- else {
80
- if (this.verbose) {
81
- console.log('executing locale-gen');
82
- }
83
- shelljs_1.default.exec('/usr/sbin/locale-gen');
65
+ await this.localeGen(locales);
66
+ await this.defaultLocale(defaultLocale);
67
+ await this.localeConf(defaultLocale);
68
+ await (0, utils_2.exec)(`chroot ${this.chroot} /usr/sbin/locale-gen`, this.echo);
69
+ }
70
+ /**
71
+ * localeGen
72
+ */
73
+ async localeGen(locales) {
74
+ let lgt = '';
75
+ lgt += '# File generated by penguins-eggs\n';
76
+ lgt += '# This file lists locales that you wish to have built. You can find a list\n';
77
+ lgt += '# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add\n';
78
+ lgt += '# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change\n';
79
+ lgt += '# this file, you need to rerun locale-gen.\n';
80
+ lgt += '{{#locales}}\n';
81
+ lgt += '{{{locale}}}\n';
82
+ lgt += '{{/locales}}\n';
83
+ const viewGen = { locales: [{}] };
84
+ for (let i = 0; i < locales.length; i++) {
85
+ viewGen.locales.push({ locale: locales[i] + ' UTF-8' });
84
86
  }
85
- /**
86
- * che fa bleachbit?
87
- *
88
- * elimina in /usr/share/i18n/locales/./sigla
89
- *
90
- * sotto /usr/share/i18n/locales abbiamo
91
- * SUPPORTED
92
- * charmaps
93
- * locales
94
- *
95
- * Quindi semplicemente, bleachbit rimuove
96
- * tutte le definizioni in
97
- * /usr/share/i18n/locales/ che non corrispondono ai
98
- * linguaggi selezionati
99
- *
100
- * Elimina 4,1kB /usr/share/i18n/locales/./ta_LK
101
- *
102
- * In più elimina
103
- *
104
- * limina 4,1kB /usr/share/man/es/man8/validlocale.8.gz
105
- * Elimina 4,1kB /usr/share/man/es/man8
106
- * Elimina 4,1kB /usr/share/man/es
107
- */
87
+ const destGen = `${this.chroot}/etc/locale.gen`;
88
+ // console.log(mustache.render(lgt, viewGen))
89
+ fs_1.default.writeFileSync(destGen, mustache_1.default.render(lgt, viewGen));
90
+ }
91
+ /**
92
+ * /etc/locale.conf
93
+ */
94
+ async localeConf(defaultLocale) {
95
+ let lct = '';
96
+ lct += '# File generated by penguins-eggs\n';
97
+ lct += 'LANG={{{locale}}}\n';
98
+ lct += 'LC_ADDRESS={{{locale}}}\n';
99
+ lct += 'LC_IDENTIFICATION={{{locale}}}\n';
100
+ lct += 'LC_MEASUREMENT={{{locale}}}\n';
101
+ lct += 'LC_MONETARY={{{locale}}}\n';
102
+ lct += 'LC_NAME={{{locale}}}\n';
103
+ lct += 'LC_NUMERIC={{{locale}}}\n';
104
+ lct += 'LC_PAPER={{{locale}}}\n';
105
+ lct += 'LC_TELEPHONE={{{locale}}}\n';
106
+ lct += 'LC_TIME={{{locale}}}\n';
107
+ const destConf = `${this.chroot}/etc/locale.conf`;
108
+ const view = {
109
+ locale: defaultLocale
110
+ };
111
+ // console.log(mustache.render(lct, view))
112
+ fs_1.default.writeFileSync(destConf, mustache_1.default.render(lct, view));
113
+ }
114
+ /**
115
+ * /etc/default/locale
116
+ */
117
+ async defaultLocale(defaultLocale) {
118
+ let lct = '';
119
+ lct += '# File generated by penguins-eggs\n';
120
+ lct += 'LANG={{{locale}}}\n';
121
+ lct += 'LC_ADDRESS={{{locale}}}\n';
122
+ lct += 'LC_IDENTIFICATION={{{locale}}}\n';
123
+ lct += 'LC_MEASUREMENT={{{locale}}}\n';
124
+ lct += 'LC_MONETARY={{{locale}}}\n';
125
+ lct += 'LC_NAME={{{locale}}}\n';
126
+ lct += 'LC_NUMERIC={{{locale}}}\n';
127
+ lct += 'LC_PAPER={{{locale}}}\n';
128
+ lct += 'LC_TELEPHONE={{{locale}}}\n';
129
+ lct += 'LC_TIME={{{locale}}}\n';
130
+ const destConf = `${this.chroot}/etc/default/locale`;
131
+ const view = {
132
+ locale: defaultLocale
133
+ };
134
+ // console.log(mustache.render(lct, view))
135
+ fs_1.default.writeFileSync(destConf, mustache_1.default.render(lct, view));
108
136
  }
109
137
  }
110
138
  exports.default = I18n;
@@ -8,7 +8,7 @@ const tslib_1 = require("tslib");
8
8
  * author: Piero Proietti
9
9
  * mail: piero.proietti@gmail.com
10
10
  */
11
- const js_yaml_1 = (0, tslib_1.__importDefault)(require("js-yaml"));
11
+ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
12
12
  /**
13
13
  *
14
14
  * @param remix
@@ -30,12 +30,18 @@ function branding(remix, distro, brand = '', verbose = false) {
30
30
  const versionedName = remix.fullname + ' (' + version + ')'; // Questa la mette nella descrizione andrebbe aggiunta la versione dal nome della iso
31
31
  const shortVersionedName = remix.versionName + ' ' + version;
32
32
  let bootloaderEntryName = distro.distroId;
33
- // Necessario: Devuan e LMDE devono avere EFI=Debian altrimenti non funziona EFI
34
- if (bootloaderEntryName === 'Devuan') {
35
- bootloaderEntryName = 'Debian';
36
- }
37
- else if (bootloaderEntryName === 'LMDE') {
38
- bootloaderEntryName = 'Debian';
33
+ // Necessario: Devuan, LMDE, caraco, syslinuxos devono avere EFI=Debian altrimenti non funziona EFI
34
+ switch (distro.distroId.toLowerCase()) {
35
+ case 'caraco':
36
+ case 'devuan':
37
+ case 'lmde':
38
+ case 'syslinuxos': {
39
+ bootloaderEntryName = 'Debian';
40
+ break;
41
+ }
42
+ default: {
43
+ bootloaderEntryName = distro.distroId;
44
+ }
39
45
  }
40
46
  const productUrl = homeUrl;
41
47
  const releaseNotesUrl = 'https://github.com/pieroproietti/penguins-eggs/changelog.md';
@@ -8,7 +8,7 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Bionic = void 0;
10
10
  const tslib_1 = require("tslib");
11
- const fisherman_1 = (0, tslib_1.__importDefault)(require("../fisherman"));
11
+ const fisherman_1 = tslib_1.__importDefault(require("../fisherman"));
12
12
  /**
13
13
  *
14
14
  */
@@ -10,7 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.Buster = void 0;
12
12
  const tslib_1 = require("tslib");
13
- const fisherman_1 = (0, tslib_1.__importDefault)(require("../fisherman"));
13
+ const fisherman_1 = tslib_1.__importDefault(require("../fisherman"));
14
14
  /**
15
15
  *
16
16
  */
@@ -8,7 +8,7 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Focal = void 0;
10
10
  const tslib_1 = require("tslib");
11
- const fisherman_1 = (0, tslib_1.__importDefault)(require("../fisherman"));
11
+ const fisherman_1 = tslib_1.__importDefault(require("../fisherman"));
12
12
  /**
13
13
  *
14
14
  */
@@ -10,7 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.Jessie = void 0;
12
12
  const tslib_1 = require("tslib");
13
- const fisherman_1 = (0, tslib_1.__importDefault)(require("../fisherman"));
13
+ const fisherman_1 = tslib_1.__importDefault(require("../fisherman"));
14
14
  /**
15
15
  *
16
16
  */
@@ -10,7 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.Rolling = void 0;
12
12
  const tslib_1 = require("tslib");
13
- const fisherman_1 = (0, tslib_1.__importDefault)(require("../fisherman"));
13
+ const fisherman_1 = tslib_1.__importDefault(require("../fisherman"));
14
14
  /**
15
15
  *
16
16
  */
@@ -5,7 +5,7 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.displaymanager = void 0;
7
7
  const tslib_1 = require("tslib");
8
- const pacman_1 = (0, tslib_1.__importDefault)(require("../../pacman"));
8
+ const pacman_1 = tslib_1.__importDefault(require("../../pacman"));
9
9
  /**
10
10
  * restituisce displaymanagers in uso
11
11
  */
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  /**
6
6
  *
7
7
  */
8
- const pacman_1 = (0, tslib_1.__importDefault)(require("../../pacman"));
8
+ const pacman_1 = tslib_1.__importDefault(require("../../pacman"));
9
9
  /**
10
10
  *
11
11
  */
@@ -60,7 +60,7 @@ function tryInstall(distro) {
60
60
  // Pacchetti da installare sempre
61
61
  text += ` - hunspell-${lang}\n`;
62
62
  // Pacchetti da installare a seconda della distribuzione
63
- if (distro.versionLike === 'focal' || distro.versionLike === 'bionic') {
63
+ if (distro.codenameLikeId === 'focal' || distro.codenameLikeId === 'bionic') {
64
64
  text += ` - language-pack-${lang}\n`;
65
65
  }
66
66
  // Pacchetti da installare se sono presenti
@@ -7,11 +7,11 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
12
- const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
13
- const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
14
- const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
12
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
13
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
14
+ const utils_1 = tslib_1.__importDefault(require("../utils"));
15
15
  const displaymanager_1 = require("./fisherman-helper/displaymanager");
16
16
  const utils_2 = require("../../lib/utils");
17
17
  class Fisherman {
@@ -7,10 +7,10 @@ const tslib_1 = require("tslib");
7
7
  * author: Piero Proietti
8
8
  * mail: piero.proietti@gmail.com
9
9
  */
10
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
11
- const node_path_1 = (0, tslib_1.__importDefault)(require("node:path"));
12
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
13
- const utils_1 = (0, tslib_1.__importDefault)(require("../utils"));
10
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
11
+ const node_path_1 = tslib_1.__importDefault(require("node:path"));
12
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
13
+ const utils_1 = tslib_1.__importDefault(require("../utils"));
14
14
  const jessie_1 = require("./distros/jessie");
15
15
  const buster_1 = require("./distros/buster");
16
16
  const focal_1 = require("./distros/focal");
@@ -48,7 +48,7 @@ class Incubator {
48
48
  const echo = utils_1.default.setEcho(verbose);
49
49
  this.createInstallerDirs();
50
50
  // DEBIAN
51
- switch (this.distro.versionLike) {
51
+ switch (this.distro.codenameLikeId) {
52
52
  case 'jessie': {
53
53
  const jessie = new jessie_1.Jessie(this.installer, this.remix, this.distro, release, this.user_opt, this.verbose);
54
54
  await jessie.create();
@@ -6,7 +6,7 @@
6
6
  * modules = configuration + 'modules/'
7
7
  * modulesMultiarch = '/usr/lib/' + arch-linux-gnu + '/' + installer + '/'
8
8
  *
9
- * template = '/etc/penguins-eggs/' + .distro.versionLike + '/' + installer + '/'
9
+ * template = '/etc/penguins-eggs/' + .distro.codenameLikeId + '/' + installer + '/'
10
10
  * templateModules = template + '/modules/'
11
11
  * templateMultiarch = template + installer + '-modules/'
12
12
  *
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.installer = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const distro_1 = (0, tslib_1.__importDefault)(require("../../classes/distro"));
6
- const pacman_1 = (0, tslib_1.__importDefault)(require("../../classes/pacman"));
5
+ const distro_1 = tslib_1.__importDefault(require("../../classes/distro"));
6
+ const pacman_1 = tslib_1.__importDefault(require("../../classes/pacman"));
7
7
  function installer() {
8
8
  const installer = {};
9
9
  if (pacman_1.default.packageIsInstalled('calamares')) {
@@ -24,12 +24,12 @@ function installer() {
24
24
  const remix = {};
25
25
  const distro = new distro_1.default(remix);
26
26
  if (distro.isCalamaresAvailable) {
27
- installer.template = '/etc/penguins-eggs.d/distros/' + distro.versionLike + '/calamares/';
27
+ installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/calamares/';
28
28
  installer.templateModules = installer.template + 'modules/';
29
29
  installer.templateMultiarch = installer.template + 'calamares-modules/';
30
30
  }
31
31
  else {
32
- installer.template = '/etc/penguins-eggs.d/distros/' + distro.versionLike + '/krill/';
32
+ installer.template = '/etc/penguins-eggs.d/distros/' + distro.codenameLikeId + '/krill/';
33
33
  installer.templateModules = installer.template + 'modules/';
34
34
  installer.templateMultiarch = installer.template + 'krill-modules/';
35
35
  }
@@ -10,8 +10,8 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  const tslib_1 = require("tslib");
12
12
  // packages
13
- const node_fs_1 = (0, tslib_1.__importDefault)(require("node:fs"));
14
- const shelljs_1 = (0, tslib_1.__importDefault)(require("shelljs"));
13
+ const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
14
+ const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
15
15
  /**
16
16
  * initrd
17
17
  * Controlla e rimuove, se necessario cryptroot, resume
@@ -0,0 +1,45 @@
1
+ import { IXkbModel, IXkbLayout, IXkbVariant, IXkbOption } from '../interfaces/i-xkb-model';
2
+ /**
3
+ * /usr/share/X11/xkb/rules/xorg.lst
4
+ */
5
+ export default class Keyboard {
6
+ models: string[];
7
+ layouts: string[];
8
+ variants: string[];
9
+ options: string[];
10
+ constructor();
11
+ /**
12
+ *
13
+ * @returns
14
+ */
15
+ getModels(): IXkbModel[];
16
+ /**
17
+ * 012345678901234567890123456789
18
+ * us English (US)
19
+ */
20
+ getLayouts(): IXkbLayout[];
21
+ /**
22
+ *
23
+ */
24
+ getVariants(layout: string): IXkbVariant[];
25
+ /**
26
+ *
27
+ */
28
+ getOptions(): IXkbOption[];
29
+ /**
30
+ *
31
+ */
32
+ getVariant(): Promise<string>;
33
+ /**
34
+ *
35
+ */
36
+ getLayout(): Promise<string>;
37
+ /**
38
+ *
39
+ */
40
+ getModel(): Promise<string>;
41
+ /**
42
+ *
43
+ */
44
+ getOption(): Promise<string>;
45
+ }