penguins-eggs 9.3.7 → 9.3.9

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 (83) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +14 -14
  3. package/addons/eggs/theme/applications/install-debian.desktop +3 -3
  4. package/addons/eggs/theme/calamares/modules/locale.yml +10 -0
  5. package/addons/eggs/theme/calamares/modules/partition.yml +3 -0
  6. package/addons/eggs/theme/calamares/modules/users.yml +20 -0
  7. package/assets/calamares/install-debian +2 -2
  8. package/conf/distros/focal/calamares/modules/users.yml +1 -23
  9. package/conf/eggs.yaml +1 -1
  10. package/conf/tools.yaml +1 -1
  11. package/dist/classes/distro.js +8 -3
  12. package/dist/classes/incubation/branding.js +4 -2
  13. package/dist/classes/incubation/distros/bionic.js +3 -3
  14. package/dist/classes/incubation/distros/buster.js +7 -6
  15. package/dist/classes/incubation/distros/focal.js +6 -7
  16. package/dist/classes/incubation/distros/jessie.js +1 -1
  17. package/dist/classes/incubation/distros/rolling.js +3 -3
  18. package/dist/classes/incubation/fisherman.js +11 -2
  19. package/dist/classes/incubation/incubator.js +30 -18
  20. package/dist/classes/ovary.js +51 -38
  21. package/dist/classes/pxe.js +2 -2
  22. package/dist/classes/settings.js +1 -1
  23. package/dist/classes/tailor.js +1 -1
  24. package/dist/classes/utils.js +8 -10
  25. package/dist/classes/xdg.js +3 -1
  26. package/dist/commands/calamares.js +2 -2
  27. package/dist/commands/produce.js +9 -0
  28. package/dist/commands/tools/skel.js +1 -1
  29. package/dist/krill/krill-sequence.js +1 -1
  30. package/package.json +2 -2
  31. package/addons/neon/theme/applications/install-debian.desktop +0 -28
  32. package/addons/neon/theme/artwork/install-debian.png +0 -0
  33. package/addons/neon/theme/calamares/branding/branding.desc +0 -1
  34. package/addons/neon/theme/calamares/branding/kde.png +0 -0
  35. package/addons/neon/theme/calamares/branding/neon-logo.png +0 -0
  36. package/addons/neon/theme/calamares/branding/neon.png +0 -0
  37. package/addons/neon/theme/calamares/branding/plasma.png +0 -0
  38. package/addons/neon/theme/calamares/branding/secure.png +0 -0
  39. package/addons/neon/theme/calamares/branding/show.qml +0 -152
  40. package/addons/neon/theme/calamares/branding/welcome.png +0 -0
  41. package/addons/neon/theme/calamares/modules/partition.conf +0 -233
  42. package/addons/neon/theme/livecd/grub.theme.cfg +0 -43
  43. package/addons/neon/theme/livecd/isolinux.theme.cfg +0 -46
  44. package/addons/telos/theme/applications/install-debian.desktop +0 -28
  45. package/addons/telos/theme/artwork/install-debian.png +0 -0
  46. package/addons/telos/theme/calamares/branding/banner.png +0 -0
  47. package/addons/telos/theme/calamares/branding/branding.desc +0 -25
  48. package/addons/telos/theme/calamares/branding/show.qml +0 -51
  49. package/addons/telos/theme/calamares/branding/slide1.png +0 -0
  50. package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
  51. package/addons/telos/theme/calamares/branding/welcome.png +0 -0
  52. package/addons/telos/theme/calamares/modules/partition.yml +0 -233
  53. package/addons/telos/theme/livecd/grub.theme.cfg +0 -43
  54. package/addons/telos/theme/livecd/isolinux.theme.cfg +0 -45
  55. package/addons/telos/theme/livecd/splash.png +0 -0
  56. package/addons/ufficiozero/theme/README.md +0 -16
  57. package/addons/ufficiozero/theme/applications/install-debian.desktop +0 -28
  58. package/addons/ufficiozero/theme/calamares/branding/README.md +0 -9
  59. package/addons/ufficiozero/theme/calamares/branding/branding.desc +0 -1
  60. package/addons/ufficiozero/theme/calamares/branding/show.qml +0 -123
  61. package/addons/ufficiozero/theme/calamares/branding/slide1.png +0 -0
  62. package/addons/ufficiozero/theme/calamares/branding/slide2.png +0 -0
  63. package/addons/ufficiozero/theme/calamares/branding/slide3.png +0 -0
  64. package/addons/ufficiozero/theme/calamares/branding/slide4.png +0 -0
  65. package/addons/ufficiozero/theme/calamares/branding/slide5.png +0 -0
  66. package/addons/ufficiozero/theme/calamares/branding/slide6.png +0 -0
  67. package/addons/ufficiozero/theme/calamares/branding/ufficiozero-logo.png +0 -0
  68. package/addons/ufficiozero/theme/calamares/branding/welcome.png +0 -0
  69. package/addons/ufficiozero/theme/calamares/modules/partition.yml +0 -233
  70. package/addons/waydroid/theme/applications/install-debian.desktop +0 -28
  71. package/addons/waydroid/theme/artwork/install-debian.png +0 -0
  72. package/addons/waydroid/theme/calamares/branding/branding.desc +0 -1
  73. package/addons/waydroid/theme/calamares/branding/languages.png +0 -0
  74. package/addons/waydroid/theme/calamares/branding/show.qml +0 -75
  75. package/addons/waydroid/theme/calamares/branding/slide1.png +0 -0
  76. package/addons/waydroid/theme/calamares/branding/slide2.png +0 -0
  77. package/addons/waydroid/theme/calamares/branding/slide3.png +0 -0
  78. package/addons/waydroid/theme/calamares/branding/waydroid-logo.png +0 -0
  79. package/addons/waydroid/theme/calamares/branding/welcome.png +0 -0
  80. package/addons/waydroid/theme/calamares/modules/partition.yml +0 -233
  81. package/addons/waydroid/theme/livecd/grub.theme.cfg +0 -43
  82. package/addons/waydroid/theme/livecd/isolinux.theme.cfg +0 -45
  83. package/addons/waydroid/theme/livecd/splash.png +0 -0
@@ -28,16 +28,18 @@ class Incubator {
28
28
  * @param distro
29
29
  * @param verbose
30
30
  */
31
- constructor(remix, distro, user_opt = 'live', verbose = false) {
31
+ constructor(remix, distro, user_opt = 'live', theme = 'eggs', verbose = false) {
32
32
  this.verbose = false;
33
33
  this.installer = {};
34
34
  this.installer = (0, installer_1.installer)();
35
35
  this.remix = remix;
36
36
  this.distro = distro;
37
37
  this.user_opt = user_opt;
38
+ this.theme = theme;
38
39
  this.verbose = verbose;
39
- if (remix.branding === undefined) {
40
- remix.branding = 'eggs';
40
+ this.remix.branding = theme;
41
+ if (theme.includes('/')) {
42
+ this.remix.branding = theme.substring(theme.lastIndexOf('/') + 1);
41
43
  }
42
44
  }
43
45
  /**
@@ -60,17 +62,17 @@ class Incubator {
60
62
  break;
61
63
  }
62
64
  case 'buster': {
63
- const buster = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
65
+ const buster = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
64
66
  await buster.create();
65
67
  break;
66
68
  }
67
69
  case 'bullseye': {
68
- const bullseye = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
70
+ const bullseye = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
69
71
  await bullseye.create();
70
72
  break;
71
73
  }
72
74
  case 'bookworm': {
73
- const bookworm = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
75
+ const bookworm = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
74
76
  await bookworm.create();
75
77
  // DEVUAN
76
78
  break;
@@ -79,17 +81,17 @@ class Incubator {
79
81
  * DEVUAN
80
82
  */
81
83
  case 'beowulf': {
82
- const beowulf = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
84
+ const beowulf = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
83
85
  await beowulf.create();
84
86
  break;
85
87
  }
86
88
  case 'chimaera': {
87
- const chimaera = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
89
+ const chimaera = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
88
90
  await chimaera.create();
89
91
  break;
90
92
  }
91
93
  case 'daedalus': {
92
- const daedalus = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
94
+ const daedalus = new buster_1.Buster(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
93
95
  await daedalus.create();
94
96
  break;
95
97
  }
@@ -102,17 +104,17 @@ class Incubator {
102
104
  break;
103
105
  }
104
106
  case 'focal': {
105
- const focal = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
107
+ const focal = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
106
108
  await focal.create();
107
109
  break;
108
110
  }
109
111
  case 'jammy': {
110
- const jammy = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
112
+ const jammy = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
111
113
  await jammy.create();
112
114
  break;
113
115
  }
114
116
  case 'kinetic': {
115
- const kinetic = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.verbose);
117
+ const kinetic = new focal_1.Focal(this.installer, this.remix, this.distro, this.user_opt, release, this.theme, this.verbose);
116
118
  await kinetic.create();
117
119
  break;
118
120
  }
@@ -200,7 +202,11 @@ class Incubator {
200
202
  * ADDONS (only for calamares)
201
203
  */
202
204
  if (this.installer.name === 'calamares') {
203
- const calamaresBranding = node_path_1.default.resolve(__dirname, `../../../addons/${this.remix.branding}/theme/calamares/branding`);
205
+ // console.log('theme: ' + this.theme)
206
+ let calamaresBranding = node_path_1.default.resolve(__dirname, `../../../addons/${this.remix.branding}/theme/calamares/branding`);
207
+ if (this.theme.includes('/')) {
208
+ calamaresBranding = `${this.theme}/theme/calamares/branding`;
209
+ }
204
210
  if (node_fs_1.default.existsSync(calamaresBranding)) {
205
211
  if (!node_fs_1.default.existsSync(this.installer.configuration + `branding/${this.remix.branding}`)) {
206
212
  try {
@@ -213,23 +219,29 @@ class Incubator {
213
219
  shelljs_1.default.cp(calamaresBranding + '/*', this.installer.configuration + `branding/${this.remix.branding}/`);
214
220
  }
215
221
  else {
216
- console.log(`${calamaresBranding} not found!`);
222
+ console.log(`${calamaresBranding} branding not found!`);
217
223
  process.exit();
218
224
  }
219
- const calamaresIcon = node_path_1.default.resolve(__dirname, `../../../addons/${this.remix.branding}/theme/artwork/install-debian.png`);
225
+ let calamaresIcon = node_path_1.default.resolve(__dirname, `../../../addons/${this.remix.branding}/theme/artwork/install-debian.png`);
226
+ if (this.theme.includes('/')) {
227
+ calamaresIcon = `${this.theme}/theme/artwork/install-debian.png`;
228
+ }
220
229
  if (node_fs_1.default.existsSync(calamaresIcon)) {
221
230
  shelljs_1.default.cp(calamaresIcon, '/usr/share/icons/');
222
231
  }
223
232
  else {
224
- console.log(`${calamaresIcon} not found!`);
233
+ console.log(`${calamaresIcon} icon not found!`);
225
234
  process.exit();
226
235
  }
227
- const calamaresLauncher = node_path_1.default.resolve(__dirname, `../../../addons/${this.remix.branding}/theme/applications/install-debian.desktop`);
236
+ let calamaresLauncher = node_path_1.default.resolve(__dirname, `../../../addons/${this.remix.branding}/theme/applications/install-debian.desktop`);
237
+ if (this.theme.includes('/')) {
238
+ calamaresLauncher = `${this.theme}/theme/applications/install-debian.desktop`;
239
+ }
228
240
  if (node_fs_1.default.existsSync(calamaresLauncher)) {
229
241
  shelljs_1.default.cp(calamaresLauncher, '/usr/share/applications/');
230
242
  }
231
243
  else {
232
- console.log(`${calamaresLauncher} not found!`);
244
+ console.log(`${calamaresLauncher} launcher not found!`);
233
245
  process.exit();
234
246
  }
235
247
  // script di avvio
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
10
  // packages
11
11
  const fs_1 = tslib_1.__importDefault(require("fs"));
12
+ const js_yaml_1 = tslib_1.__importDefault(require("js-yaml"));
12
13
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
13
14
  const node_os_1 = tslib_1.__importDefault(require("node:os"));
14
15
  const shelljs_1 = tslib_1.__importDefault(require("shelljs"));
@@ -47,6 +48,7 @@ class Ovary {
47
48
  this.snapshot_prefix = '';
48
49
  this.snapshot_basename = '';
49
50
  this.compression = '';
51
+ this.theme = '';
50
52
  this.clone = false;
51
53
  }
52
54
  /**
@@ -63,7 +65,7 @@ class Ovary {
63
65
  this.settings.config.snapshot_basename = snapshot_basename;
64
66
  }
65
67
  if (theme !== '') {
66
- this.settings.config.theme = theme;
68
+ this.theme = theme;
67
69
  }
68
70
  if (compression !== '') {
69
71
  this.settings.config.compression = compression;
@@ -106,7 +108,7 @@ class Ovary {
106
108
  if (!fs_1.default.existsSync(this.settings.config.snapshot_dir)) {
107
109
  shelljs_1.default.mkdir('-p', this.settings.config.snapshot_dir);
108
110
  }
109
- await this.settings.loadRemix(this.snapshot_basename, this.settings.config.theme);
111
+ await this.settings.loadRemix(this.snapshot_basename, this.theme);
110
112
  if (utils_2.default.isLive()) {
111
113
  console.log(chalk_1.default.red('>>> eggs: This is a live system! An egg cannot be produced from an egg!'));
112
114
  }
@@ -159,10 +161,10 @@ class Ovary {
159
161
  * viene creata la configurazione dell'installer: krill/calamares
160
162
  * L'installer prende il tema da settings.remix.branding
161
163
  */
162
- this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, verbose);
164
+ this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, this.theme, verbose);
163
165
  await this.incubator.config(release);
164
166
  await this.syslinux();
165
- await this.isolinux(this.settings.config.theme);
167
+ await this.isolinux(this.theme);
166
168
  await this.kernelCopy();
167
169
  /**
168
170
  * we need different behaviour on
@@ -175,7 +177,7 @@ class Ovary {
175
177
  await this.initrdCreate();
176
178
  }
177
179
  if (this.settings.config.make_efi) {
178
- await this.makeEfi(this.settings.config.theme);
180
+ await this.makeEfi(this.theme);
179
181
  }
180
182
  await this.bindLiveFs();
181
183
  /**
@@ -221,7 +223,7 @@ class Ovary {
221
223
  await (0, utils_1.exec)(`ln ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${this.settings.work_dir.pathIso}manjaro/x86_64/livefs.sfs`, this.echo);
222
224
  await (0, utils_1.exec)(`md5sum ${this.settings.work_dir.pathIso}live/filesystem.squashfs > ${this.settings.work_dir.pathIso}manjaro/x86_64/livefs.md5`, this.echo);
223
225
  }
224
- else if (this.settings.distro.distroId === 'Arch') {
226
+ else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
225
227
  await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}arch/x86_64 -p`, this.echo);
226
228
  await (0, utils_1.exec)(`ln ${this.settings.work_dir.pathIso}live/filesystem.squashfs ${this.settings.work_dir.pathIso}arch/x86_64/airootfs.sfs`, this.echo);
227
229
  await (0, utils_1.exec)(`sha512sum ${this.settings.work_dir.pathIso}live/filesystem.squashfs > ${this.settings.work_dir.pathIso}arch/x86_64/airootfs.sha512`, this.echo);
@@ -524,7 +526,10 @@ class Ovary {
524
526
  * isolinux.theme.cfg
525
527
  */
526
528
  const isolinuxThemeDest = this.settings.work_dir.pathIso + 'isolinux/isolinux.theme.cfg';
527
- const isolinuxThemeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
529
+ let isolinuxThemeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
530
+ if (this.theme.includes('/')) {
531
+ isolinuxThemeSrc = `${theme}/theme/livecd/isolinux.theme.cfg`;
532
+ }
528
533
  if (!fs_1.default.existsSync(isolinuxThemeSrc)) {
529
534
  utils_2.default.warning('Cannot find: ' + isolinuxThemeSrc);
530
535
  process.exit();
@@ -548,7 +553,7 @@ class Ovary {
548
553
  if (this.settings.distro.distroId === 'ManjaroLinux') {
549
554
  kernel_parameters += ` misobasedir=manjaro misolabel=${volid}`;
550
555
  }
551
- else if (this.settings.distro.distroId === 'Arch') {
556
+ else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
552
557
  kernel_parameters += ` archisobasedir=arch archisolabel=${volid} cow_spacesize=4G`;
553
558
  }
554
559
  }
@@ -565,7 +570,10 @@ class Ovary {
565
570
  * splash
566
571
  */
567
572
  const splashDest = `${this.settings.work_dir.pathIso}/isolinux/splash.png`;
568
- const splashSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/splash.png`);
573
+ let splashSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/splash.png`);
574
+ if (this.theme.includes('/')) {
575
+ splashSrc = node_path_1.default.resolve(`${theme}/theme/livecd/splash.png`);
576
+ }
569
577
  if (!fs_1.default.existsSync(splashSrc)) {
570
578
  utils_2.default.warning('Cannot find: ' + splashSrc);
571
579
  process.exit();
@@ -581,7 +589,6 @@ class Ovary {
581
589
  }
582
590
  let lackVmlinuzImage = false;
583
591
  if (fs_1.default.existsSync(this.settings.kernel_image)) {
584
- console.log('kernel image:' + this.settings.kernel_image);
585
592
  await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.work_dir.pathIso}/live/`, this.echo);
586
593
  }
587
594
  else {
@@ -604,7 +611,7 @@ class Ovary {
604
611
  if (this.settings.distro.distroId === 'ManjaroLinux') {
605
612
  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));
606
613
  }
607
- else if (this.settings.distro.distroId === 'Arch') {
614
+ else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
608
615
  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));
609
616
  }
610
617
  }
@@ -775,7 +782,7 @@ class Ovary {
775
782
  let cmd = '';
776
783
  const cmds = [];
777
784
  cmds.push('# NOTE: cdrom, dev, live, media, mnt, proc, run, sys and tmp', `# need just a mkdir in ${this.settings.work_dir.merged}`);
778
- cmds.push(`# host: ${node_os_1.default.hostname()} user: ${utils_2.default.getPrimaryUser()}\n`);
785
+ cmds.push(`# host: ${node_os_1.default.hostname()} user: ${await utils_2.default.getPrimaryUser()}\n`);
779
786
  for (const dir of dirs) {
780
787
  cmds.push(startLine);
781
788
  if (n8_1.default.isDirectory(dir)) {
@@ -850,7 +857,7 @@ class Ovary {
850
857
  }
851
858
  const cmds = [];
852
859
  cmds.push('# NOTE: home, cdrom, dev, live, media, mnt, proc, run, sys and tmp', `# need just to be removed in ${this.settings.work_dir.merged}`);
853
- cmds.push(`# host: ${node_os_1.default.hostname()} user: ${utils_2.default.getPrimaryUser()}\n`);
860
+ cmds.push(`# host: ${node_os_1.default.hostname()} user: ${await utils_2.default.getPrimaryUser()}\n`);
854
861
  // await exec(`/usr/bin/pkill mksquashfs; /usr/bin/pkill md5sum`, {echo: true})
855
862
  if (fs_1.default.existsSync(this.settings.work_dir.merged)) {
856
863
  const bindDirs = fs_1.default.readdirSync(this.settings.work_dir.merged, {
@@ -944,36 +951,33 @@ class Ovary {
944
951
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' rm /home/' + this.settings.config.user_opt + ' -rf', this.verbose));
945
952
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
946
953
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' useradd ' + this.settings.config.user_opt + ' --home-dir /home/' + this.settings.config.user_opt + ' --shell /bin/bash ', this.verbose));
947
- cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo ' + this.settings.config.user_opt + ':' + this.settings.config.user_opt_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
948
954
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', this.verbose));
949
- // cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', verbose))
950
955
  cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' chown ' + this.settings.config.user_opt + ':users' + ' /home/' + this.settings.config.user_opt + ' -R', this.verbose));
956
+ // live password
957
+ cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo ' + this.settings.config.user_opt + ':' + this.settings.config.user_opt_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
958
+ // root password
959
+ cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
951
960
  if (this.familyId === 'debian') {
952
- // add user live to sudo
953
961
  cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
954
- // educaandos
955
- if (this.settings.config.theme === 'educaandos') {
956
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG adm ${this.settings.config.user_opt}`, this.verbose));
957
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG cdrom ${this.settings.config.user_opt}`, this.verbose));
958
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG dip ${this.settings.config.user_opt}`, this.verbose));
959
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG plugdev ${this.settings.config.user_opt}`, this.verbose));
960
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG lpadmin ${this.settings.config.user_opt}`, this.verbose));
961
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sambashare ${this.settings.config.user_opt}`, this.verbose));
962
- cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG admin ${this.settings.config.user_opt}`, this.verbose));
963
- }
964
962
  }
965
963
  else if (this.familyId === 'archlinux') {
966
- // adduser live to wheel and autologin
967
- // cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose))
968
- // in manjaro they use autologin group for the iso, if not exist create it
969
- // cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} test $(grep "autologin" /etc/group) || chroot ${this.settings.work_dir.merged} groupadd -r autologin`, this.verbose))
970
- // cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG autologin ${this.settings.config.user_opt}`, this.verbose))
971
964
  cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
972
965
  cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} sudo`, this.verbose));
973
966
  cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
974
967
  }
975
- if (this.familyId === 'debian' || this.familyId === 'archlinux') {
976
- cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' echo root:' + this.settings.config.root_passwd + '| chroot ' + this.settings.work_dir.merged + ' chpasswd', this.verbose));
968
+ /**
969
+ * educaandos and others themes
970
+ * users.yml
971
+ */
972
+ let usersConf = node_path_1.default.resolve(__dirname, `../../addons/${this.theme}/theme/calamares/users.yml`);
973
+ if (this.theme.includes('/')) {
974
+ usersConf = `${this.theme}/theme/calamares/modules/users.yml`;
975
+ }
976
+ if (fs_1.default.existsSync(usersConf)) {
977
+ const o = js_yaml_1.default.load(fs_1.default.readFileSync(usersConf, 'utf-8'));
978
+ for (const group of o.defaultGroups) {
979
+ cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG ${group} ${this.settings.config.user_opt}`, this.verbose));
980
+ }
977
981
  }
978
982
  }
979
983
  /**
@@ -1111,7 +1115,7 @@ class Ovary {
1111
1115
  fs_1.default.writeFileSync(script, text, 'utf8');
1112
1116
  await (0, utils_1.exec)(`chmod a+x ${script}`, this.echo);
1113
1117
  }
1114
- await xdg_1.default.autologin(utils_2.default.getPrimaryUser(), this.settings.config.user_opt, this.settings.work_dir.merged);
1118
+ await xdg_1.default.autologin(await utils_2.default.getPrimaryUser(), this.settings.config.user_opt, this.settings.work_dir.merged);
1115
1119
  }
1116
1120
  /**
1117
1121
  * Creazione link desktop per lxde
@@ -1205,7 +1209,10 @@ class Ovary {
1205
1209
  * copy splash to efiWorkDir
1206
1210
  */
1207
1211
  const splashDest = `${efiWorkDir}/boot/grub/splash.png`;
1208
- const splashSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/splash.png`);
1212
+ let splashSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/splash.png`);
1213
+ if (this.theme.includes('/')) {
1214
+ splashSrc = `${theme}/theme/livecd/splash.png`;
1215
+ }
1209
1216
  if (!fs_1.default.existsSync(splashSrc)) {
1210
1217
  utils_2.default.warning('Cannot find: ' + splashSrc);
1211
1218
  process.exit();
@@ -1215,7 +1222,10 @@ class Ovary {
1215
1222
  * copy theme
1216
1223
  */
1217
1224
  const themeDest = `${efiWorkDir}/boot/grub/theme.cfg`;
1218
- const themeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/grub.theme.cfg`);
1225
+ let themeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/grub.theme.cfg`);
1226
+ if (this.theme.includes('/')) {
1227
+ themeSrc = `${theme}/theme/livecd/grub.theme.cfg`;
1228
+ }
1219
1229
  if (!fs_1.default.existsSync(themeSrc)) {
1220
1230
  utils_2.default.warning('Cannot find: ' + themeSrc);
1221
1231
  process.exit();
@@ -1287,7 +1297,10 @@ class Ovary {
1287
1297
  await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}/efi ${isoDir}/`, this.echo);
1288
1298
  // Do the main grub.cfg (which gets loaded last):
1289
1299
  // grub.theme.cfg
1290
- const grubThemeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/grub.theme.cfg`);
1300
+ let grubThemeSrc = node_path_1.default.resolve(__dirname, `../../addons/${theme}/theme/livecd/grub.theme.cfg`);
1301
+ if (this.theme.includes('/')) {
1302
+ grubThemeSrc = `${theme}/theme/livecd/grub.theme.cfg`;
1303
+ }
1291
1304
  const grubThemeDest = `${isoDir}/boot/grub/theme.cfg`;
1292
1305
  if (!fs_1.default.existsSync(grubThemeSrc)) {
1293
1306
  utils_2.default.warning('Cannot find: ' + grubThemeSrc);
@@ -1311,7 +1324,7 @@ class Ovary {
1311
1324
  if (this.settings.distro.distroId === 'ManjaroLinux') {
1312
1325
  kernel_parameters += ` misobasedir=manjaro misolabel=${volid}`;
1313
1326
  }
1314
- else if (this.settings.distro.distroId === 'Arch') {
1327
+ else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
1315
1328
  kernel_parameters += ` archisobasedir=arch archisolabel=${volid} cow_spacesize=4G`;
1316
1329
  }
1317
1330
  }
@@ -42,7 +42,7 @@ class Pxe {
42
42
  await this.settings.load();
43
43
  if (utils_1.default.isLive()) {
44
44
  this.eggRoot = this.settings.distro.liveMediumPath;
45
- if (this.settings.distro.distroId === 'Arch') {
45
+ if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
46
46
  this.eggRoot = '/run/archiso/bootmnt/';
47
47
  await (0, utils_2.exec)(`mkdir ${this.eggRoot} -p`);
48
48
  await (0, utils_2.exec)(`mount /dev/sr0 ${this.eggRoot}`);
@@ -128,7 +128,7 @@ class Pxe {
128
128
  if (this.settings.distro.distroId === 'ManjaroLinux') {
129
129
  await this.tryCatch(`ln -s ${this.eggRoot}manjaro ${this.pxeRoot}/manjaro`);
130
130
  }
131
- else if (this.settings.distro.distroId === 'Arch') {
131
+ else if (this.settings.distro.distroId === 'Arch' || this.settings.distro.distroId === 'RebornOS') {
132
132
  await this.tryCatch(`ln -s ${this.eggRoot}arch ${this.pxeRoot}/arch`);
133
133
  }
134
134
  if (fs_1.default.existsSync(this.eggRoot)) {
@@ -211,7 +211,7 @@ class Settings {
211
211
  async loadRemix(basename = '', theme = '') {
212
212
  this.remix.versionNumber = utils_1.default.getPackageVersion();
213
213
  this.remix.kernel = utils_1.default.kernelVersion();
214
- this.remix.branding = theme === '' ? 'eggs' : theme;
214
+ this.remix.branding = theme === '' ? 'eggs' : this.remix.branding = theme.substring(theme.lastIndexOf('/') + 1);
215
215
  this.remix.name = this.config.snapshot_basename;
216
216
  let name = this.config.snapshot_prefix + this.config.snapshot_basename;
217
217
  name = name.replace(/-/g, ' ').replace('egg of ', '');
@@ -331,7 +331,7 @@ class Tailor {
331
331
  * Copyng skel in /home/user
332
332
  */
333
333
  if (fs_1.default.existsSync(`${this.costume}/dirs/etc/skel`)) {
334
- const user = utils_1.default.getPrimaryUser();
334
+ const user = await utils_1.default.getPrimaryUser();
335
335
  step = `copying skel in /home/${user}/`;
336
336
  utils_1.default.warning(step);
337
337
  cmd = `rsync -avx ${this.costume}/dirs/etc/skel/.config /home/${user}/`;
@@ -19,6 +19,8 @@ const pacman_1 = tslib_1.__importDefault(require("./pacman"));
19
19
  // import { green, whiteBright } from 'chalk'
20
20
  const child_process_1 = require("child_process");
21
21
  const netmask_1 = require("netmask");
22
+ // libraries
23
+ const utils_1 = require("../lib/utils");
22
24
  const distro_1 = tslib_1.__importDefault(require("./distro"));
23
25
  const pjson = require('../../package.json');
24
26
  /**
@@ -94,7 +96,7 @@ class Utils {
94
96
  }
95
97
  // Arch
96
98
  let distro = new distro_1.default();
97
- if (distro.distroId === 'Arch') {
99
+ if (distro.distroId === 'Arch' || distro.distroId === 'RebornOS') {
98
100
  vmlinuz = '/boot/vmlinuz-linux';
99
101
  }
100
102
  // btrfs
@@ -128,7 +130,7 @@ class Utils {
128
130
  version = vmlinuz.substring(vmlinuz.indexOf('-'));
129
131
  }
130
132
  let distro = new distro_1.default();
131
- if (distro.distroId === 'Arch') {
133
+ if (distro.distroId === 'Arch' || distro.distroId === 'RebornOS') {
132
134
  initrd = '/boot/initramfs-linux.img';
133
135
  }
134
136
  else {
@@ -162,14 +164,10 @@ class Utils {
162
164
  /**
163
165
  * Return the primary user's name
164
166
  */
165
- static getPrimaryUser() {
166
- // const primaryUser = shx.exec('echo $SUDO_USER', { silent: true }).stdout.trim()
167
- let primaryUser = '';
168
- if (process.env.SUDO_USER !== undefined) {
169
- primaryUser = process.env.SUDO_USER;
170
- }
167
+ static async getPrimaryUser() {
168
+ let primaryUser = (await (0, utils_1.exec)('/usr/bin/logname', { echo: false, ignore: false, capture: true })).data.trim();
171
169
  if (primaryUser === '') {
172
- console.log('Cannot find your user name. Log as normal user and run: $sudo eggs [COMMAND]');
170
+ console.log(`Cannot find your user name...`);
173
171
  process.exit(1);
174
172
  }
175
173
  return primaryUser;
@@ -866,7 +864,7 @@ class Utils {
866
864
  static async wardrobe() {
867
865
  let wardrobe = `${os_1.default.homedir()}/.wardrobe`;
868
866
  if (Utils.isRoot()) {
869
- wardrobe = `/home/${Utils.getPrimaryUser()}/.wardrobe`;
867
+ wardrobe = `/home/${await Utils.getPrimaryUser()}/.wardrobe`;
870
868
  // let result = await exec(`echo $(logname)`, { echo: false, capture: true })
871
869
  // let result = await exec(`echo $(SUDO_USER)`, { echo: false, capture: true })
872
870
  //if (result.code === 0) {
@@ -35,7 +35,7 @@ class Xdg {
35
35
  else {
36
36
  xdg_dirs.forEach(async (dir) => {
37
37
  if (dir === xdg_dir) {
38
- retval = node_path_1.default.basename(shelljs_1.default.exec(`sudo -u ${utils_1.default.getPrimaryUser()} xdg-user-dir ${dir}`, { silent: true }).stdout.trim());
38
+ retval = node_path_1.default.basename(shelljs_1.default.exec(`sudo -u ${await utils_1.default.getPrimaryUser()} xdg-user-dir ${dir}`, { silent: true }).stdout.trim());
39
39
  }
40
40
  });
41
41
  }
@@ -207,6 +207,8 @@ class Xdg {
207
207
  await (0, utils_2.exec)(`mkdir /etc/skel/.local/share -p`, echo);
208
208
  await rsyncIfExist(`/home/${user}/.local/share/recently-used.xbel`, '/etc/skel/.local/share', verbose);
209
209
  }
210
+ // .linuxfx we need it for linuxfx
211
+ await rsyncIfExist(`/home/${user}/.linuxfx`, `/etc/skel`, verbose);
210
212
  await (0, utils_2.exec)('chown root:root /etc/skel -R', echo);
211
213
  await (0, utils_2.exec)('chmod a+rwx,g-w,o-w /etc/skel/ -R', echo);
212
214
  await execIfExist('chmod a+rwx,g-w-x,o-wx', '/etc/skel/.bashrc', verbose);
@@ -70,7 +70,7 @@ class Calamares extends core_1.Command {
70
70
  if (await this.settings.load()) {
71
71
  utils_1.default.warning('Configuring installer');
72
72
  await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
73
- this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, verbose);
73
+ this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, theme, verbose);
74
74
  await this.incubator.config(release);
75
75
  }
76
76
  }
@@ -91,7 +91,7 @@ class Calamares extends core_1.Command {
91
91
  else if ((await utils_1.default.customConfirm('Select yes to continue...')) && (await this.settings.load())) {
92
92
  utils_1.default.warning('Configuring krill');
93
93
  await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
94
- this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, verbose);
94
+ this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, theme, verbose);
95
95
  console.log('calamares relase: ' + release);
96
96
  await this.incubator.config(release);
97
97
  }
@@ -80,6 +80,15 @@ class Produce extends core_1.Command {
80
80
  let theme = 'eggs';
81
81
  if (flags.theme !== undefined) {
82
82
  theme = flags.theme;
83
+ if (theme.includes('/')) {
84
+ if (theme.endsWith('/')) {
85
+ theme = theme.substring(0, theme.length - 1);
86
+ }
87
+ if (!node_fs_1.default.existsSync(theme + '/theme')) {
88
+ console.log('Cannot find theme: ' + theme);
89
+ process.exit();
90
+ }
91
+ }
83
92
  }
84
93
  const nointeractive = false;
85
94
  const i = await config_1.default.thatWeNeed(nointeractive, verbose, backup);
@@ -20,7 +20,7 @@ class Skel extends core_1.Command {
20
20
  verbose = true;
21
21
  }
22
22
  let user = '';
23
- user = flags.user ? flags.user : utils_1.default.getPrimaryUser();
23
+ user = flags.user ? flags.user : await utils_1.default.getPrimaryUser();
24
24
  utils_1.default.warning(`user: ${user}`);
25
25
  const homeSource = `/home/${user}`;
26
26
  if (!fs_1.default.existsSync(homeSource)) {
@@ -405,7 +405,7 @@ class Sequence {
405
405
  message = "autologin GUI";
406
406
  percent = 0.65;
407
407
  if (this.users.autologin) {
408
- await xdg_1.default.autologin(utils_1.default.getPrimaryUser(), this.users.name, this.installTarget);
408
+ await xdg_1.default.autologin(await utils_1.default.getPrimaryUser(), this.users.name, this.installTarget);
409
409
  }
410
410
  await redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
411
411
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "penguins-eggs",
3
3
  "description": "Perri's Brewery edition: remaster your system and distribuite it",
4
- "version": "9.3.7",
4
+ "version": "9.3.9",
5
5
  "author": "Piero Proietti @pieroproietti",
6
6
  "bin": {
7
7
  "eggs": "bin/run"
8
8
  },
9
9
  "bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
10
10
  "dependencies": {
11
- "@oclif/core": "^1.19.1",
11
+ "@oclif/core": "^1.20.4",
12
12
  "@oclif/plugin-autocomplete": "1.3.3",
13
13
  "@oclif/plugin-help": "^5.1.16",
14
14
  "@oclif/plugin-not-found": "^2.3.6",
@@ -1,28 +0,0 @@
1
- [Desktop Entry]
2
- Type=Application
3
- Version=1.0
4
- Name=Install Linux
5
- GenericName=Calamares Installer
6
- Exec=/sbin/install-debian
7
- Comment=Calamares — Installer for Debian Live
8
- Keywords=calamares;system;install;debian;installer
9
- Icon=install-debian
10
- Terminal=false
11
- Categories=Qt;System;
12
- StartupWMClass=calamares
13
- StartupNotify=True
14
- Name[it]=Installa sistema
15
- GenericName[it]=Installa sistema
16
- Comment[it]=Installazione sistema GUI
17
- Name[en]=Install system
18
- GenericName[en]=Install the system
19
- Comment[en]=Install the system GUI
20
- Name[es]=Instalación del sistema
21
- GenericName[es]=Instalación del sistema
22
- Comment[es]=Instalación del sistema GUI
23
- Name[pt]=Instalação do sistema
24
- GenericName[pt]=Instalação do sistema
25
- Comment[pt]=Instalação do sistema GUI
26
- Name[fr]=Installation du système
27
- GenericName[fr]=Installation du système
28
- Comment[fr]=Installation du système GUI
@@ -1 +0,0 @@
1
- # this is only a stub