penguins-eggs 9.0.9 → 9.0.16

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 CHANGED
@@ -113,7 +113,7 @@ $ npm install -g penguins-eggs
113
113
  $ eggs COMMAND
114
114
  running command...
115
115
  $ eggs (--version|-v)
116
- penguins-eggs/9.0.9 linux-x64 node-v16.13.2
116
+ penguins-eggs/9.0.16 linux-x64 node-v16.13.2
117
117
  $ eggs --help [COMMAND]
118
118
  USAGE
119
119
  $ eggs COMMAND
@@ -124,6 +124,7 @@ USAGE
124
124
  # Commands
125
125
  <!-- commands -->
126
126
  * [`eggs adapt`](#eggs-adapt)
127
+ * [`eggs analyze`](#eggs-analyze)
127
128
  * [`eggs autocomplete [SHELL]`](#eggs-autocomplete-shell)
128
129
  * [`eggs bro`](#eggs-bro)
129
130
  * [`eggs calamares`](#eggs-calamares)
@@ -139,6 +140,8 @@ USAGE
139
140
  * [`eggs mom`](#eggs-mom)
140
141
  * [`eggs produce`](#eggs-produce)
141
142
  * [`eggs remove`](#eggs-remove)
143
+ * [`eggs syncfrom`](#eggs-syncfrom)
144
+ * [`eggs syncto`](#eggs-syncto)
142
145
  * [`eggs tools clean`](#eggs-tools-clean)
143
146
  * [`eggs tools locales`](#eggs-tools-locales)
144
147
  * [`eggs tools skel`](#eggs-tools-skel)
@@ -166,7 +169,28 @@ ALIASES
166
169
  $ eggs adjust
167
170
  ```
168
171
 
169
- _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/adapt.ts)_
172
+ _See code: [src/commands/adapt.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/adapt.ts)_
173
+
174
+ ## `eggs analyze`
175
+
176
+ analyze situation
177
+
178
+ ```
179
+ USAGE
180
+ $ eggs analyze [-h] [-v]
181
+
182
+ FLAGS
183
+ -h, --help Show CLI help.
184
+ -v, --verbose verbose
185
+
186
+ DESCRIPTION
187
+ analyze situation
188
+
189
+ EXAMPLES
190
+ $ sudo eggs analyze
191
+ ```
192
+
193
+ _See code: [src/commands/analyze.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/analyze.ts)_
170
194
 
171
195
  ## `eggs autocomplete [SHELL]`
172
196
 
@@ -195,7 +219,7 @@ EXAMPLES
195
219
  $ eggs autocomplete --refresh-cache
196
220
  ```
197
221
 
198
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.1.1/src/commands/autocomplete/index.ts)_
222
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.2.0/src/commands/autocomplete/index.ts)_
199
223
 
200
224
  ## `eggs bro`
201
225
 
@@ -212,7 +236,7 @@ DESCRIPTION
212
236
  bro: waydroid helper
213
237
  ```
214
238
 
215
- _See code: [src/commands/bro.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/bro.ts)_
239
+ _See code: [src/commands/bro.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/bro.ts)_
216
240
 
217
241
  ## `eggs calamares`
218
242
 
@@ -241,7 +265,7 @@ EXAMPLES
241
265
  install calamares and create it's configuration's files
242
266
  ```
243
267
 
244
- _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/calamares.ts)_
268
+ _See code: [src/commands/calamares.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/calamares.ts)_
245
269
 
246
270
  ## `eggs config`
247
271
 
@@ -268,7 +292,7 @@ EXAMPLES
268
292
  Configure and install prerequisites deb packages to run it
269
293
  ```
270
294
 
271
- _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/config.ts)_
295
+ _See code: [src/commands/config.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/config.ts)_
272
296
 
273
297
  ## `eggs dad`
274
298
 
@@ -288,7 +312,7 @@ DESCRIPTION
288
312
  ask help from daddy - configuration helper
289
313
  ```
290
314
 
291
- _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/dad.ts)_
315
+ _See code: [src/commands/dad.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/dad.ts)_
292
316
 
293
317
  ## `eggs export deb`
294
318
 
@@ -379,7 +403,7 @@ DESCRIPTION
379
403
  re-thinking for a different approach to CLI
380
404
  ```
381
405
 
382
- _See code: [src/commands/info.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/info.ts)_
406
+ _See code: [src/commands/info.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/info.ts)_
383
407
 
384
408
  ## `eggs install`
385
409
 
@@ -407,7 +431,7 @@ EXAMPLES
407
431
  Install the system using GUI or CLI installer
408
432
  ```
409
433
 
410
- _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/install.ts)_
434
+ _See code: [src/commands/install.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/install.ts)_
411
435
 
412
436
  ## `eggs kill`
413
437
 
@@ -429,7 +453,7 @@ EXAMPLES
429
453
  kill the eggs/free the nest
430
454
  ```
431
455
 
432
- _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/kill.ts)_
456
+ _See code: [src/commands/kill.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/kill.ts)_
433
457
 
434
458
  ## `eggs mom`
435
459
 
@@ -446,7 +470,7 @@ DESCRIPTION
446
470
  ask for mommy - gui helper
447
471
  ```
448
472
 
449
- _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/mom.ts)_
473
+ _See code: [src/commands/mom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/mom.ts)_
450
474
 
451
475
  ## `eggs produce`
452
476
 
@@ -511,7 +535,7 @@ EXAMPLES
511
535
  in /home/eggs/ovarium and you can customize all you need
512
536
  ```
513
537
 
514
- _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/produce.ts)_
538
+ _See code: [src/commands/produce.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/produce.ts)_
515
539
 
516
540
  ## `eggs remove`
517
541
 
@@ -541,7 +565,59 @@ EXAMPLES
541
565
  remove eggs, eggs configurations, packages dependencies
542
566
  ```
543
567
 
544
- _See code: [src/commands/remove.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/remove.ts)_
568
+ _See code: [src/commands/remove.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/remove.ts)_
569
+
570
+ ## `eggs syncfrom`
571
+
572
+ Restore users, server and datas from luks-eggs-backup
573
+
574
+ ```
575
+ USAGE
576
+ $ eggs syncfrom [-f <value>] [-r <value>] [-h] [-v]
577
+
578
+ FLAGS
579
+ -f, --file=<value> file with LUKS volume encrypted
580
+ -h, --help Show CLI help.
581
+ -r, --rootdir=<value> rootdir of the installed system, when used from live
582
+ -v, --verbose verbose
583
+
584
+ DESCRIPTION
585
+ Restore users, server and datas from luks-eggs-backup
586
+
587
+ ALIASES
588
+ $ eggs restore
589
+
590
+ EXAMPLES
591
+ $ sudo eggs restore
592
+ ```
593
+
594
+ _See code: [src/commands/syncfrom.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/syncfrom.ts)_
595
+
596
+ ## `eggs syncto`
597
+
598
+ Backup users, server and datas to luks-eggs-backup
599
+
600
+ ```
601
+ USAGE
602
+ $ eggs syncto [-k] [-f <value>] [-h] [-v]
603
+
604
+ FLAGS
605
+ -f, --file=<value> file LUKS volume encrypted
606
+ -h, --help Show CLI help.
607
+ -k, --krill krill
608
+ -v, --verbose verbose
609
+
610
+ DESCRIPTION
611
+ Backup users, server and datas to luks-eggs-backup
612
+
613
+ ALIASES
614
+ $ eggs backup
615
+
616
+ EXAMPLES
617
+ $ sudo eggs restore
618
+ ```
619
+
620
+ _See code: [src/commands/syncto.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/syncto.ts)_
545
621
 
546
622
  ## `eggs tools clean`
547
623
 
@@ -664,7 +740,7 @@ EXAMPLES
664
740
  update/upgrade the penguin's eggs tool
665
741
  ```
666
742
 
667
- _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.9/src/commands/update.ts)_
743
+ _See code: [src/commands/update.ts](https://github.com/pieroproietti/penguins-eggs/blob/v9.0.16/src/commands/update.ts)_
668
744
 
669
745
  ## `eggs version`
670
746
 
@@ -6,6 +6,7 @@ title-text: "BlissOS: Android for your PC"
6
6
  # title-font: "Sans Regular 20"
7
7
  desktop-color: "blue"
8
8
  desktop-image: "splash.png"
9
+
9
10
  # show boot_menu
10
11
  + boot_menu {
11
12
  top = 150
@@ -57,7 +57,7 @@ Presentation
57
57
  anchors.horizontalCenter: reproductiveSystem.horizontalCenter
58
58
  anchors.top: background.top
59
59
  text: qsTr("<h1>Penguin's eggs</h1><br/>"+
60
- "<h2>The reproductive system for penguins!</h2>"+
60
+ "<h2>eggs: the reproductive system of penguins!</h2>"+
61
61
  "<h3>https://penguins-eggs.net</h3>")
62
62
  wrapMode: Text.WordWrap
63
63
  width: 800
@@ -1,23 +1,21 @@
1
- I'm trying to made a way to easy customize livecd boot.
1
+ # livecd customization
2
2
 
3
- * grub.template.cfg
3
+ LiveCD customization is composed of:
4
4
  * grub.theme.cfg
5
- * isolinux.template.cfg
6
5
  * isolinux.theme.cfg
7
6
  * splash.png
8
7
 
9
- # How it work
10
- eggs take cure to copy to fill the template with the necessary values and copy configurations on /boot/grub and /isolinux on the ISO image.
8
+ ## How it work
9
+ eggs take cure to copy your theme configurations on /boot/grub and /isolinux on the ISO image.
11
10
 
12
- # grub
13
- You can adapt the template and the grub theme file i accord to your needs. During the production of eggs file grub.template.cfg will be convertent in grub.cfg and copied under /boot/grub directory of the image.
14
- * __grub.template.cfg__ -> will became -> __/boot/grub/grub.cfg__ under the iso
15
- * __grub.theme.cfg__
11
+ ## grub
12
+ You can adapt the grub theme file according to your needs. During the production of eggs a grub.cfh will be geerated and copied under ```/boot/grub``` directory of the image.
13
+ * __grub.theme.cfg__ -> will became -> __/boot/grub/theme.cfg__ under the iso
16
14
 
17
- # isolinux
18
- You can adapt the template for isolinux and the isolinux theme. During the production of eggs file isolinux.template.cfg will be convertent in isolilinux.cfg and copied under /isolinux directory of the image.
19
- * __isolinux.template.cfg__ -> will became -> __/isolinux/isolinux.cfg__ under the iso
20
- * __isolinux.theme.cfg__
21
15
 
22
- # splash
23
- both the themes will use the same splash file, who will be copied under /isolinux directory of the image.
16
+ ## isolinux
17
+ You can adapt the isolinux theme. During the production of eggs an isolilinux.cfg will be generated and copied under ```/isolinux``` directory of the image.
18
+ * __isolinux.theme.cfg__ -> will became -> __/isolinux/theme.cfg__ under the iso
19
+
20
+ ## splash
21
+ Both isolinux and grub themes use the same splash file.
Binary file
Binary file
@@ -60,6 +60,10 @@ export default class Hatching {
60
60
  settings: Settings;
61
61
  remix: IRemix;
62
62
  distro: IDistro;
63
+ luksName: string;
64
+ luksFile: string;
65
+ luksDevice: string;
66
+ luksMountpoint: string;
63
67
  /**
64
68
  * constructor
65
69
  */
@@ -143,10 +147,6 @@ export default class Hatching {
143
147
  * syncfs
144
148
  */
145
149
  private syncfs;
146
- /**
147
- *
148
- */
149
- private restoreUsersData;
150
150
  /**
151
151
  * mkfs
152
152
  */
@@ -50,6 +50,10 @@ class Hatching {
50
50
  this.settings = {};
51
51
  this.remix = {};
52
52
  this.distro = {};
53
+ this.luksName = '';
54
+ this.luksFile = '';
55
+ this.luksDevice = '';
56
+ this.luksMountpoint = '';
53
57
  this.installer = (0, installer_1.installer)();
54
58
  this.settings = new settings_1.default();
55
59
  this.language = location.language;
@@ -68,6 +72,11 @@ class Hatching {
68
72
  this.devices.swap = {};
69
73
  this.distro = new distro_1.default(this.remix);
70
74
  this.efi = fs_1.default.existsSync('/sys/firmware/efi/efivars');
75
+ // Per il restore dei dati
76
+ this.luksName = 'luks-eggs-backup';
77
+ this.luksFile = `/run/live/medium/live/${this.luksName}`;
78
+ this.luksDevice = `/dev/mapper/${this.luksName}`;
79
+ this.luksMountpoint = `/mnt`;
71
80
  }
72
81
  /**
73
82
  * install
@@ -128,26 +137,26 @@ class Hatching {
128
137
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
129
138
  }
130
139
  // await checkIt(message)
131
- message = "Syncronize filesystem ";
132
- percent = 0.35;
140
+ /*
141
+ message = "Syncronize filesystem "
142
+ percent = 0.35
133
143
  try {
134
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
135
- await this.syncfs();
136
- }
137
- catch (error) {
138
- message += JSON.stringify(error);
139
- redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent }));
144
+ redraw(<Install message={message} percent={percent} spinner={true} />)
145
+ await this.syncfs()
146
+ } catch (error) {
147
+ message += JSON.stringify(error)
148
+ redraw(<Install message={message} percent={percent} />)
140
149
  }
141
- // await checkIt(message)
150
+ */
142
151
  /**
143
152
  * RESTORE USERS DATA
144
153
  */
145
- if (fs_1.default.existsSync('/run/live/medium/live/luks-users-data')) {
146
- message = "Restore users data from backup ";
154
+ if (fs_1.default.existsSync(this.luksFile)) {
155
+ message = "Restore private data from backup ";
147
156
  percent = 0.37;
148
157
  try {
149
158
  redraw(react_1.default.createElement(install_1.default, { message: message, percent: percent, spinner: true }));
150
- await this.restoreUsersData();
159
+ await (0, utils_2.exec)('eggs syncfrom --rootdir /tmp/calamares-krill-root/');
151
160
  }
152
161
  catch (error) {
153
162
  message += JSON.stringify(error);
@@ -291,7 +300,7 @@ class Hatching {
291
300
  *
292
301
  * create user
293
302
  */
294
- if (!fs_1.default.existsSync('/run/live/medium/live/luks-users-data')) {
303
+ if (!fs_1.default.existsSync(this.luksFile)) {
295
304
  message = "Adding user ";
296
305
  percent = 0.73;
297
306
  try {
@@ -690,28 +699,6 @@ adduser ${name} \
690
699
  / ${this.installTarget}`;
691
700
  await (0, utils_2.exec)(cmd.trim());
692
701
  }
693
- /**
694
- *
695
- */
696
- async restoreUsersData() {
697
- utils_1.default.warning('Opening volume luks-users-data and map it in /dev/mapper/eggs-users-data.');
698
- utils_1.default.warning('You will insert the same passphrase you choose during the backup production');
699
- (0, child_process_1.execSync)('sudo cryptsetup luksOpen /run/live/medium/live/luks-users-data eggs-users-data', { stdio: 'inherit' });
700
- utils_1.default.warning('mounting volume eggs-users-data in /mnt');
701
- (0, child_process_1.execSync)('sudo mount /dev/mapper/eggs-users-data /mnt', { stdio: 'inherit' });
702
- utils_1.default.warning('removing live user in the installed system');
703
- (0, child_process_1.execSync)('rm -rf /tmp/calamares-krill-root/home/*', { stdio: 'inherit' });
704
- utils_1.default.warning('copying users home in the installed system');
705
- (0, child_process_1.execSync)('rsync -a /mnt/home/ /tmp/calamares-krill-root/home/', { stdio: 'inherit' });
706
- utils_1.default.warning('copying users accounts in the installed system');
707
- (0, child_process_1.execSync)('cp /mnt/etc/passwd /tmp/calamares-krill-root/etc/', { stdio: 'inherit' });
708
- (0, child_process_1.execSync)('cp /mnt/etc/shadow /tmp/calamares-krill-root/etc/', { stdio: 'inherit' });
709
- (0, child_process_1.execSync)('cp /mnt/etc/group /tmp/calamares-krill-root/etc/', { stdio: 'inherit' });
710
- utils_1.default.warning('unmount /mnt');
711
- (0, child_process_1.execSync)('umount /mnt', { stdio: 'inherit' });
712
- utils_1.default.warning('closing eggs-users-data');
713
- (0, child_process_1.execSync)('cryptsetup luksClose eggs-users-data', { stdio: 'inherit' });
714
- }
715
702
  /**
716
703
  * mkfs
717
704
  */
@@ -135,12 +135,12 @@ class Krill {
135
135
  async partitions(crypted = false) {
136
136
  let installationDevice = '/dev/sda';
137
137
  let installationMode = 'standard';
138
+ if (crypted) {
139
+ installationMode = 'full-encrypted';
140
+ }
138
141
  let luksPassphrase = 'evolution';
139
142
  let filesystemType = 'ext4';
140
143
  let userSwapChoice = 'small';
141
- if (crypted = true) {
142
- installationMode = 'full-encrypted';
143
- }
144
144
  let partitionsElem;
145
145
  while (true) {
146
146
  partitionsElem = react_1.default.createElement(partitions_1.default, { installationDevice: installationDevice, installationMode: installationMode, luksPassphrase: luksPassphrase, filesystemType: filesystemType, userSwapChoice: userSwapChoice });
@@ -149,7 +149,8 @@ class Krill {
149
149
  }
150
150
  else {
151
151
  installationDevice = '';
152
- if (crypted = true) {
152
+ installationMode = 'standard';
153
+ if (crypted) {
153
154
  installationMode = 'full-encrypted';
154
155
  }
155
156
  luksPassphrase = 'evolution';
@@ -1,6 +1,7 @@
1
1
  import { IMyAddons } from '../interfaces';
2
2
  import Incubator from './incubation/incubator';
3
3
  import Settings from './settings';
4
+ import Users from './users';
4
5
  /**
5
6
  * Ovary:
6
7
  */
@@ -88,10 +89,6 @@ export default class Ovary {
88
89
  * - normal solo la creazione della directory, nessun mount
89
90
  * - merged creazione della directory e mount ro
90
91
  * - mergedAndOverlay creazione directory, overlay e mount rw
91
- *
92
- * @param dir
93
- *
94
- * @returns merged
95
92
  */
96
93
  merged(dir: string): boolean;
97
94
  /**
@@ -115,16 +112,6 @@ export default class Ovary {
115
112
  * @param verbose
116
113
  */
117
114
  ubindVfs(verbose?: boolean): Promise<void>;
118
- /**
119
- *
120
- * @param verbose
121
- */
122
- getUsersDatasSize(verbose?: boolean): Promise<number>;
123
- /**
124
- *
125
- * @param verbose
126
- */
127
- copyUsersDatas(verbose?: boolean): Promise<void>;
128
115
  /**
129
116
  *
130
117
  * @param verbose
@@ -178,4 +165,8 @@ export default class Ovary {
178
165
  * @param scriptOnly
179
166
  */
180
167
  finished(scriptOnly?: boolean): void;
168
+ /**
169
+ * fill
170
+ */
171
+ usersFill(): Promise<Users[]>;
181
172
  }