penguins-eggs 25.10.19 → 25.10.24
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/.oclif.manifest.json +17 -3
- package/README.md +769 -2
- package/README.pdf +1705 -1747
- package/addons/eggs/theme/livecd/{grub.theme.cfg → full.grub.theme.cfg} +1 -1
- package/addons/eggs/theme/livecd/{isolinux.theme.cfg → full.isolinux.theme.cfg} +1 -1
- package/addons/eggs/theme/livecd/generic-splash.png +0 -0
- package/addons/eggs/theme/livecd/generic.grub.main.cfg +29 -0
- package/addons/eggs/theme/livecd/generic.grub.theme.cfg +67 -0
- package/addons/eggs/theme/livecd/generic.isolinux.main.cfg +34 -0
- package/addons/eggs/theme/livecd/generic.isolinux.theme.cfg +34 -0
- package/addons/eggs/theme/livecd/simple.grub.main.cfg +29 -0
- package/addons/eggs/theme/livecd/simple.grub.theme.cfg +67 -0
- package/addons/eggs/theme/livecd/{isolinux.main.simple.cfg → simple.isolinux.main.cfg} +1 -2
- package/addons/eggs/theme/livecd/simple.isolinux.theme.cfg +47 -0
- package/dist/classes/diversions.d.ts +1 -1
- package/dist/classes/diversions.js +4 -25
- package/dist/classes/ovary.d/bind-live-fs.js +1 -1
- package/dist/classes/ovary.d/initrd.js +3 -2
- package/dist/classes/ovary.d/luks-get-password.js +1 -0
- package/dist/classes/ovary.d/luks-home.js +41 -29
- package/dist/classes/ovary.d/luks-root-initrd.d.ts +17 -0
- package/dist/classes/ovary.d/luks-root-initrd.js +213 -0
- package/dist/classes/ovary.d/luks-root.js +60 -35
- package/dist/classes/ovary.d/make-dot-disk.js +10 -1
- package/dist/classes/ovary.d/make-efi.js +59 -43
- package/dist/classes/ovary.d/make-squashfs.d.ts +1 -1
- package/dist/classes/ovary.d/make-squashfs.js +2 -5
- package/dist/classes/ovary.d/merged.js +1 -1
- package/dist/classes/ovary.d/produce.d.ts +2 -2
- package/dist/classes/ovary.d/produce.js +45 -44
- package/dist/classes/ovary.d/syslinux.js +47 -34
- package/dist/classes/ovary.d/xorriso-command.js +1 -2
- package/dist/classes/ovary.d.ts +3 -4
- package/dist/classes/ovary.js +6 -6
- package/dist/classes/utils.d.ts +2 -0
- package/dist/classes/utils.js +13 -3
- package/dist/commands/love.d.ts +1 -0
- package/dist/commands/love.js +9 -2
- package/dist/commands/produce.d.ts +2 -1
- package/dist/commands/produce.js +18 -4
- package/dist/krill/classes/sequence.d.ts +1 -1
- package/dist/krill/classes/sequence.js +3 -3
- package/package.json +4 -4
- package/scripts/_eggs +3 -1
- package/scripts/boot-encrypted-root.sh +177 -0
- package/scripts/eggs.bash +2 -2
- package/scripts/mount-encrypted-home.sh +92 -56
- package/dist/classes/ovary.d/luks-root-bootstrap-builder.d.ts +0 -11
- package/dist/classes/ovary.d/luks-root-bootstrap-builder.js +0 -45
- package/scripts/luks-root-bootstrap-create.sh +0 -235
- package/scripts/luks-root-unlock.sh +0 -172
- /package/addons/eggs/theme/livecd/{grub.main.cfg → full.grub.main.cfg} +0 -0
- /package/addons/eggs/theme/livecd/{isolinux.main.full.cfg → full.isolinux.main.cfg} +0 -0
|
@@ -14,7 +14,6 @@ import path from 'path';
|
|
|
14
14
|
// libraries
|
|
15
15
|
import { exec } from '../../lib/utils.js';
|
|
16
16
|
import Bleach from './../bleach.js';
|
|
17
|
-
// import { displaymanager } from './../incubation/fisherman-helper/displaymanager.js'
|
|
18
17
|
import Incubator from './../incubation/incubator.js';
|
|
19
18
|
import Pacman from './../pacman.js';
|
|
20
19
|
import Diversions from './../diversions.js';
|
|
@@ -33,10 +32,10 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
|
33
32
|
* @param myAddons
|
|
34
33
|
* @param nointeractive
|
|
35
34
|
* @param noicons
|
|
36
|
-
* @param
|
|
35
|
+
* @param includeRootHome
|
|
37
36
|
* @param verbose
|
|
38
37
|
*/
|
|
39
|
-
export async function produce(kernel = '', clone = false, homecrypt = false, fullcrypt = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, myLinks, excludes, nointeractive = false, noicons = false,
|
|
38
|
+
export async function produce(kernel = '', clone = false, homecrypt = false, fullcrypt = false, hidden = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, myLinks, excludes, nointeractive = false, noicons = false, includeRootHome = false, verbose = false) {
|
|
40
39
|
this.verbose = verbose;
|
|
41
40
|
this.echo = Utils.setEcho(verbose);
|
|
42
41
|
if (this.verbose) {
|
|
@@ -50,19 +49,19 @@ export async function produce(kernel = '', clone = false, homecrypt = false, ful
|
|
|
50
49
|
this.clone = clone;
|
|
51
50
|
this.homecrypt = homecrypt;
|
|
52
51
|
this.fullcrypt = fullcrypt;
|
|
52
|
+
this.hidden = hidden;
|
|
53
53
|
// Crittografia
|
|
54
54
|
if (this.homecrypt || this.fullcrypt) {
|
|
55
55
|
if (this.homecrypt) {
|
|
56
|
-
this.
|
|
56
|
+
this.luksMappedName = 'home.img';
|
|
57
57
|
}
|
|
58
58
|
else if (this.fullcrypt) {
|
|
59
|
-
this.
|
|
59
|
+
this.luksMappedName = 'root.img';
|
|
60
60
|
}
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
this.luksDevice = `/dev/mapper/${this.luksName}`;
|
|
61
|
+
this.luksFile = `/tmp/${this.luksMappedName}`;
|
|
62
|
+
this.luksMappedName = this.luksMappedName;
|
|
63
|
+
this.luksMountpoint = `/tmp/mnt/${this.luksMappedName}`;
|
|
64
|
+
this.luksDevice = `/dev/mapper/${this.luksMappedName}`;
|
|
66
65
|
this.luksPassword = '0'; // USARE UNA PASSWORD SICURA IN PRODUZIONE!
|
|
67
66
|
Utils.warning("You choose an encrypted eggs");
|
|
68
67
|
await this.luksGetPassword();
|
|
@@ -85,12 +84,9 @@ export async function produce(kernel = '', clone = false, homecrypt = false, ful
|
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
/**
|
|
88
|
-
* define
|
|
87
|
+
* define vmlinuz and initrd fullpath
|
|
89
88
|
*/
|
|
90
89
|
this.vmlinuz = Utils.vmlinuz();
|
|
91
|
-
/**
|
|
92
|
-
* define this.initrd
|
|
93
|
-
*/
|
|
94
90
|
this.initrd = Utils.initrdImg(this.kernel);
|
|
95
91
|
/**
|
|
96
92
|
* yolk
|
|
@@ -134,6 +130,8 @@ export async function produce(kernel = '', clone = false, homecrypt = false, ful
|
|
|
134
130
|
* homecrypt/fullcrypt/clone/standard
|
|
135
131
|
*/
|
|
136
132
|
if (this.homecrypt) {
|
|
133
|
+
this.settings.config.user_opt = 'live'; // patch for humans
|
|
134
|
+
this.settings.config.user_opt_passwd = 'evolution';
|
|
137
135
|
Utils.warning("eggs will SAVE users and users' data ENCRYPTED on the live (ISO)/live/home.img");
|
|
138
136
|
}
|
|
139
137
|
else if (this.fullcrypt) {
|
|
@@ -196,37 +194,45 @@ export async function produce(kernel = '', clone = false, homecrypt = false, ful
|
|
|
196
194
|
/**
|
|
197
195
|
* installer
|
|
198
196
|
*/
|
|
199
|
-
this.incubator = new Incubator(this.settings.remix, this.settings.distro, this.settings.config.user_opt, this.theme, this.clone, verbose);
|
|
197
|
+
this.incubator = new Incubator(this.settings.remix, this.settings.distro, this.settings.config.user_opt, this.theme, this.clone || this.fullcrypt, verbose);
|
|
200
198
|
await this.incubator.config(release);
|
|
199
|
+
// Qua inseriamo uno sleep di un minuto
|
|
200
|
+
await Utils.sleep(5000); // 5 secondo
|
|
201
|
+
await this.bindLiveFs();
|
|
202
|
+
await this.bindVfs();
|
|
201
203
|
/**
|
|
202
|
-
*
|
|
204
|
+
* kernelCopy
|
|
203
205
|
*/
|
|
204
206
|
await this.kernelCopy();
|
|
205
207
|
/**
|
|
206
208
|
* initrd creation
|
|
207
209
|
*/
|
|
208
|
-
if (
|
|
209
|
-
await this.
|
|
210
|
-
}
|
|
211
|
-
else if (this.familyId === 'archlinux') {
|
|
212
|
-
await this.initrdArch();
|
|
213
|
-
}
|
|
214
|
-
else if (this.familyId === 'debian') {
|
|
215
|
-
await this.initrdDebian();
|
|
210
|
+
if (fullcrypt) {
|
|
211
|
+
await this.luksRootInitrd();
|
|
216
212
|
}
|
|
217
|
-
else
|
|
218
|
-
this.familyId === '
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
213
|
+
else {
|
|
214
|
+
if (this.familyId === 'alpine') {
|
|
215
|
+
await this.initrdAlpine();
|
|
216
|
+
}
|
|
217
|
+
else if (this.familyId === 'archlinux') {
|
|
218
|
+
await this.initrdArch();
|
|
219
|
+
}
|
|
220
|
+
else if (this.familyId === 'debian') {
|
|
221
|
+
await this.initrdDebian();
|
|
222
|
+
}
|
|
223
|
+
else if (this.familyId === 'fedora' ||
|
|
224
|
+
this.familyId === 'openmamba' ||
|
|
225
|
+
this.familyId === 'opensuse' ||
|
|
226
|
+
this.familyId === 'voidlinux') {
|
|
227
|
+
await this.initrdDracut();
|
|
228
|
+
}
|
|
222
229
|
}
|
|
223
|
-
|
|
224
|
-
// We run them just to have scripts
|
|
225
|
-
await this.bindVfs();
|
|
230
|
+
// We dont' need more
|
|
226
231
|
await this.ubindVfs();
|
|
227
|
-
|
|
232
|
+
const cleanSystem = !(this.clone || this.fullcrypt);
|
|
233
|
+
if (cleanSystem) {
|
|
228
234
|
/**
|
|
229
|
-
* SOLO per
|
|
235
|
+
* SOLO per homecrypt e standard
|
|
230
236
|
*/
|
|
231
237
|
await this.usersRemove();
|
|
232
238
|
await this.userCreateLive();
|
|
@@ -253,9 +259,12 @@ export async function produce(kernel = '', clone = false, homecrypt = false, ful
|
|
|
253
259
|
const homeImgPath = this.distroLliveMediumPath + 'live/home.img';
|
|
254
260
|
this.installHomecryptSupport(squashfsRoot, homeImgPath);
|
|
255
261
|
}
|
|
256
|
-
mksquashfsCmd = await this.makeSquashfs(scriptOnly,
|
|
257
|
-
await this.uBindLiveFs(); //
|
|
262
|
+
mksquashfsCmd = await this.makeSquashfs(scriptOnly, includeRootHome);
|
|
263
|
+
await this.uBindLiveFs(); // we don't need more
|
|
258
264
|
}
|
|
265
|
+
/**
|
|
266
|
+
* we now work just on ISO and filesystem.squashfs
|
|
267
|
+
*/
|
|
259
268
|
if (homecrypt) {
|
|
260
269
|
await this.luksHome();
|
|
261
270
|
}
|
|
@@ -275,14 +284,6 @@ export async function produce(kernel = '', clone = false, homecrypt = false, ful
|
|
|
275
284
|
if (arch === 'ia32' || arch === 'x64') {
|
|
276
285
|
await this.syslinux(this.theme);
|
|
277
286
|
}
|
|
278
|
-
// add the bootstrapt filesystem.squashfs
|
|
279
|
-
if (fullcrypt) {
|
|
280
|
-
let bootstrapSfs = path.join(this.settings.iso_work, '/live/filesystem.squashfs');
|
|
281
|
-
/**
|
|
282
|
-
* escludo la costruzione di filesystem.squashfs
|
|
283
|
-
*/
|
|
284
|
-
// await this.createBootstrapFilesystem(bootstrapSfs)
|
|
285
|
-
}
|
|
286
287
|
const mkIsofsCmd = (await this.xorrisoCommand(clone, homecrypt, fullcrypt)).replaceAll(/\s\s+/g, ' ');
|
|
287
288
|
this.makeDotDisk(this.volid, mksquashfsCmd, mkIsofsCmd);
|
|
288
289
|
/**
|
|
@@ -33,31 +33,57 @@ export async function syslinux(theme = 'eggs') {
|
|
|
33
33
|
await exec(`cp ${sysPath}/libcom32.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
34
34
|
await exec(`cp ${sysPath}/libutil.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
35
35
|
await exec(`cp ${sysPath}/vesamenu.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
36
|
+
const splashDest = `${this.settings.iso_work}/isolinux/splash.png`;
|
|
36
37
|
const isolinuxThemeDest = this.settings.iso_work + 'isolinux/isolinux.theme.cfg';
|
|
37
|
-
let isolinuxThemeSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
|
|
38
|
-
if (this.theme.includes('/')) {
|
|
39
|
-
isolinuxThemeSrc = `${theme}/theme/livecd/isolinux.theme.cfg`;
|
|
40
|
-
}
|
|
41
|
-
if (!fs.existsSync(isolinuxThemeSrc)) {
|
|
42
|
-
Utils.warning('Cannot find: ' + isolinuxThemeSrc);
|
|
43
|
-
process.exit();
|
|
44
|
-
}
|
|
45
|
-
fs.copyFileSync(isolinuxThemeSrc, isolinuxThemeDest);
|
|
46
|
-
/**
|
|
47
|
-
* isolinux.cfg from isolinux.main.cfg
|
|
48
|
-
*/
|
|
49
38
|
const isolinuxDest = `${this.settings.iso_work}/isolinux/isolinux.cfg`;
|
|
50
|
-
|
|
51
|
-
let isolinuxTemplate =
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
let splashSrc = '';
|
|
40
|
+
let isolinuxTemplate = '';
|
|
41
|
+
let isolinuxThemeSrc = '';
|
|
42
|
+
if (this.hidden) {
|
|
43
|
+
splashSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/generic-splash.png`);
|
|
44
|
+
isolinuxTemplate = path.resolve(__dirname, '../../../addons/eggs/theme/livecd/generic.isolinux.main.cfg');
|
|
45
|
+
isolinuxThemeSrc = path.resolve(__dirname, '../../../addons/eggs/theme/livecd/generic.isolinux.theme.cfg');
|
|
54
46
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
else {
|
|
48
|
+
isolinuxThemeSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
|
|
49
|
+
if (this.theme.includes('/')) {
|
|
50
|
+
isolinuxThemeSrc = `${theme}/theme/livecd/isolinux.theme.cfg`;
|
|
51
|
+
}
|
|
52
|
+
if (!fs.existsSync(isolinuxThemeSrc)) {
|
|
53
|
+
Utils.warning('Cannot find: ' + isolinuxThemeSrc);
|
|
54
|
+
process.exit();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* isolinux.cfg from isolinux.main.cfg
|
|
58
|
+
*/
|
|
59
|
+
this.settings.iso_work + 'isolinux/isolinux.cfg';
|
|
60
|
+
isolinuxTemplate = `${theme}/theme/livecd/isolinux.main.cfg`;
|
|
61
|
+
if (!fs.existsSync(isolinuxTemplate)) {
|
|
62
|
+
isolinuxTemplate = path.resolve(__dirname, '../../../addons/eggs/theme/livecd/isolinux.main.cfg');
|
|
63
|
+
}
|
|
64
|
+
if (!fs.existsSync(isolinuxTemplate)) {
|
|
65
|
+
Utils.warning('Cannot find: ' + isolinuxTemplate);
|
|
66
|
+
process.exit();
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* splash
|
|
70
|
+
*/
|
|
71
|
+
splashSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/splash.png`);
|
|
72
|
+
if (this.theme.includes('/')) {
|
|
73
|
+
splashSrc = path.resolve(`${theme}/theme/livecd/splash.png`);
|
|
74
|
+
}
|
|
75
|
+
if (!fs.existsSync(splashSrc)) {
|
|
76
|
+
Utils.warning('Cannot find: ' + splashSrc);
|
|
77
|
+
process.exit();
|
|
78
|
+
}
|
|
58
79
|
}
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
// Splash
|
|
81
|
+
fs.copyFileSync(splashSrc, splashDest);
|
|
82
|
+
// isolinux.theme.cfg
|
|
83
|
+
fs.copyFileSync(isolinuxThemeSrc, isolinuxThemeDest);
|
|
84
|
+
// isolinux.main.cfg
|
|
85
|
+
const kernel_parameters = Diversions.kernelParameters(this.familyId, this.volid, this.fullcrypt);
|
|
86
|
+
let template = fs.readFileSync(isolinuxTemplate, 'utf8');
|
|
61
87
|
const view = {
|
|
62
88
|
fullname: this.settings.remix.fullname.toUpperCase(),
|
|
63
89
|
initrdImg: `/live/${path.basename(this.initrd)}`,
|
|
@@ -66,17 +92,4 @@ export async function syslinux(theme = 'eggs') {
|
|
|
66
92
|
vmlinuz: `/live/${path.basename(this.vmlinuz)}`
|
|
67
93
|
};
|
|
68
94
|
fs.writeFileSync(isolinuxDest, mustache.render(template, view));
|
|
69
|
-
/**
|
|
70
|
-
* splash
|
|
71
|
-
*/
|
|
72
|
-
const splashDest = `${this.settings.iso_work}/isolinux/splash.png`;
|
|
73
|
-
let splashSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/splash.png`);
|
|
74
|
-
if (this.theme.includes('/')) {
|
|
75
|
-
splashSrc = path.resolve(`${theme}/theme/livecd/splash.png`);
|
|
76
|
-
}
|
|
77
|
-
if (!fs.existsSync(splashSrc)) {
|
|
78
|
-
Utils.warning('Cannot find: ' + splashSrc);
|
|
79
|
-
process.exit();
|
|
80
|
-
}
|
|
81
|
-
fs.copyFileSync(splashSrc, splashDest);
|
|
82
95
|
}
|
|
@@ -30,7 +30,6 @@ export async function xorrisoCommand(clone = false, homecrypt = false, fullcrypt
|
|
|
30
30
|
typology = '_clone-home-crypted';
|
|
31
31
|
}
|
|
32
32
|
else if (fullcrypt) {
|
|
33
|
-
// filesystem.squashfs.real
|
|
34
33
|
typology = '_clone-full-crypted';
|
|
35
34
|
}
|
|
36
35
|
if (fs.existsSync('/usr/bin/eui-start.sh')) {
|
|
@@ -86,7 +85,7 @@ export async function xorrisoCommand(clone = false, homecrypt = false, fullcrypt
|
|
|
86
85
|
let luksPartitionParam = ''; // Inizializziamo la variabile per il parametro LUKS
|
|
87
86
|
if (fullcrypt) {
|
|
88
87
|
// Costruiamo il percorso del file luks.img all'interno della directory di build
|
|
89
|
-
const luksImagePath = path.join(this.settings.iso_work, 'live', this.
|
|
88
|
+
const luksImagePath = path.join(this.settings.iso_work, 'live', this.luksMappedName);
|
|
90
89
|
// Verifichiamo che il file esista prima di aggiungerlo
|
|
91
90
|
if (fs.existsSync(luksImagePath)) {
|
|
92
91
|
// Costruiamo il parametro per aggiungere la partizione 3
|
package/dist/classes/ovary.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ import { finished } from './ovary.d/finished.js';
|
|
|
31
31
|
import { luksGetPassword } from './ovary.d/luks-get-password.js';
|
|
32
32
|
import { luksHome } from './ovary.d/luks-home.js';
|
|
33
33
|
import { installHomecryptSupport } from './ovary.d/luks-home-support.js';
|
|
34
|
+
import { luksRootInitrd } from './ovary.d/luks-root-initrd.js';
|
|
34
35
|
import { luksRoot } from './ovary.d/luks-root.js';
|
|
35
|
-
import { createBootstrapFilesystem } from './ovary.d/luks-root-bootstrap-builder.js';
|
|
36
36
|
/**
|
|
37
37
|
* Ovary:
|
|
38
38
|
*/
|
|
@@ -42,6 +42,7 @@ export default class Ovary {
|
|
|
42
42
|
clone: boolean;
|
|
43
43
|
homecrypt: boolean;
|
|
44
44
|
fullcrypt: boolean;
|
|
45
|
+
hidden: boolean;
|
|
45
46
|
echo: {};
|
|
46
47
|
familyId: string;
|
|
47
48
|
distroId: string;
|
|
@@ -64,8 +65,6 @@ export default class Ovary {
|
|
|
64
65
|
dotMnt: string;
|
|
65
66
|
dotOverlay: IWorkDir;
|
|
66
67
|
dotLivefs: string;
|
|
67
|
-
luksUuid: string;
|
|
68
|
-
luksName: string;
|
|
69
68
|
luksMappedName: string;
|
|
70
69
|
luksMountpoint: string;
|
|
71
70
|
luksFile: string;
|
|
@@ -83,11 +82,11 @@ export default class Ovary {
|
|
|
83
82
|
luksHome: typeof luksHome;
|
|
84
83
|
installHomecryptSupport: typeof installHomecryptSupport;
|
|
85
84
|
luksRoot: typeof luksRoot;
|
|
86
|
-
createBootstrapFilesystem: typeof createBootstrapFilesystem;
|
|
87
85
|
finished: typeof finished;
|
|
88
86
|
initrdAlpine: typeof initrdAlpine;
|
|
89
87
|
initrdArch: typeof initrdArch;
|
|
90
88
|
initrdDebian: typeof initrdDebian;
|
|
89
|
+
luksRootInitrd: typeof luksRootInitrd;
|
|
91
90
|
initrdDracut: typeof initrdDracut;
|
|
92
91
|
kernelCopy: typeof kernelCopy;
|
|
93
92
|
liveCreateStructure: typeof liveCreateStructure;
|
package/dist/classes/ovary.js
CHANGED
|
@@ -29,13 +29,14 @@ import { makeDotDisk } from './ovary.d/make-dot-disk.js';
|
|
|
29
29
|
import { kernelCopy } from './ovary.d/kernel-copy.js';
|
|
30
30
|
import { liveCreateStructure } from './ovary.d/live-create-structure.js';
|
|
31
31
|
import { finished } from './ovary.d/finished.js';
|
|
32
|
+
// crypt
|
|
32
33
|
import { luksGetPassword } from './ovary.d/luks-get-password.js';
|
|
34
|
+
// homecrypt
|
|
33
35
|
import { luksHome } from './ovary.d/luks-home.js';
|
|
34
36
|
import { installHomecryptSupport } from './ovary.d/luks-home-support.js';
|
|
37
|
+
// fullcrypt
|
|
38
|
+
import { luksRootInitrd } from './ovary.d/luks-root-initrd.js';
|
|
35
39
|
import { luksRoot } from './ovary.d/luks-root.js';
|
|
36
|
-
import { createBootstrapFilesystem } from './ovary.d/luks-root-bootstrap-builder.js';
|
|
37
|
-
// Functions
|
|
38
|
-
// import initramfs from '../krill/classes/sequence.d/initramfs.js'
|
|
39
40
|
// _dirname
|
|
40
41
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
41
42
|
/**
|
|
@@ -47,6 +48,7 @@ export default class Ovary {
|
|
|
47
48
|
clone = false;
|
|
48
49
|
homecrypt = false;
|
|
49
50
|
fullcrypt = false;
|
|
51
|
+
hidden = false;
|
|
50
52
|
echo = {};
|
|
51
53
|
familyId = '';
|
|
52
54
|
distroId = '';
|
|
@@ -69,8 +71,6 @@ export default class Ovary {
|
|
|
69
71
|
dotMnt = '';
|
|
70
72
|
dotOverlay = {};
|
|
71
73
|
dotLivefs = '';
|
|
72
|
-
luksUuid = '';
|
|
73
|
-
luksName = '';
|
|
74
74
|
luksMappedName = '';
|
|
75
75
|
luksMountpoint = '';
|
|
76
76
|
luksFile = '';
|
|
@@ -93,11 +93,11 @@ export default class Ovary {
|
|
|
93
93
|
installHomecryptSupport = installHomecryptSupport;
|
|
94
94
|
// luksRoot
|
|
95
95
|
luksRoot = luksRoot;
|
|
96
|
-
createBootstrapFilesystem = createBootstrapFilesystem;
|
|
97
96
|
finished = finished;
|
|
98
97
|
initrdAlpine = initrdAlpine;
|
|
99
98
|
initrdArch = initrdArch;
|
|
100
99
|
initrdDebian = initrdDebian;
|
|
100
|
+
luksRootInitrd = luksRootInitrd;
|
|
101
101
|
initrdDracut = initrdDracut;
|
|
102
102
|
kernelCopy = kernelCopy;
|
|
103
103
|
liveCreateStructure = liveCreateStructure;
|
package/dist/classes/utils.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export default class Utils {
|
|
|
66
66
|
* @param msg
|
|
67
67
|
*/
|
|
68
68
|
static warning(msg?: string): void;
|
|
69
|
+
static info(msg?: string): void;
|
|
69
70
|
static success(msg?: string): void;
|
|
70
71
|
static error(msg?: string): void;
|
|
71
72
|
/**
|
|
@@ -325,4 +326,5 @@ export default class Utils {
|
|
|
325
326
|
*/
|
|
326
327
|
static wardrobe(): Promise<string>;
|
|
327
328
|
static getOsRelease(): IOsRelease;
|
|
329
|
+
static sleep(ms?: number): Promise<void>;
|
|
328
330
|
}
|
package/dist/classes/utils.js
CHANGED
|
@@ -175,13 +175,16 @@ export default class Utils {
|
|
|
175
175
|
* @param msg
|
|
176
176
|
*/
|
|
177
177
|
static warning(msg = '') {
|
|
178
|
-
console.log(pjson.shortName + ' >>> ' + chalk.cyanBright(msg)
|
|
178
|
+
console.log(pjson.shortName + ' >>> ' + chalk.cyanBright(msg));
|
|
179
|
+
}
|
|
180
|
+
static info(msg = '') {
|
|
181
|
+
console.log(pjson.shortName + ' >>> ' + chalk.white(msg));
|
|
179
182
|
}
|
|
180
183
|
static success(msg = '') {
|
|
181
|
-
console.log(pjson.shortName + ' >>> ' + chalk.greenBright(msg)
|
|
184
|
+
console.log(pjson.shortName + ' >>> ' + chalk.greenBright(msg));
|
|
182
185
|
}
|
|
183
186
|
static error(msg = '') {
|
|
184
|
-
console.error(pjson.shortName + ' >>> ' + chalk.
|
|
187
|
+
console.error(pjson.shortName + ' >>> ' + chalk.bgRed(chalk.whiteBright(msg)));
|
|
185
188
|
}
|
|
186
189
|
/**
|
|
187
190
|
* Return the primary user's name
|
|
@@ -955,4 +958,11 @@ export default class Utils {
|
|
|
955
958
|
osInfo.VERSION_CODENAME = osInfo.VERSION_CODENAME.toLowerCase();
|
|
956
959
|
return osInfo;
|
|
957
960
|
}
|
|
961
|
+
/* Funzione helper che crea una pausa non bloccante.
|
|
962
|
+
* @param ms Millisecondi da attendere
|
|
963
|
+
*/
|
|
964
|
+
static sleep(ms = 60000) {
|
|
965
|
+
// console.log('wait...')
|
|
966
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
967
|
+
}
|
|
958
968
|
}
|
package/dist/commands/love.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export default class Love extends Command {
|
|
|
15
15
|
static flags: {
|
|
16
16
|
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
17
17
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
hidden: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
19
|
nointeractive: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
20
|
clone: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
homecrypt: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
package/dist/commands/love.js
CHANGED
|
@@ -22,6 +22,7 @@ export default class Love extends Command {
|
|
|
22
22
|
static flags = {
|
|
23
23
|
help: Flags.help({ char: 'h' }),
|
|
24
24
|
verbose: Flags.boolean({ char: 'v' }),
|
|
25
|
+
hidden: Flags.boolean({ char: 'H', description: 'stealth mode' }),
|
|
25
26
|
nointeractive: Flags.boolean({ char: 'n', description: 'no user interaction' }),
|
|
26
27
|
clone: Flags.boolean({ char: 'c', description: 'clone (uncrypted)' }),
|
|
27
28
|
homecrypt: Flags.boolean({ char: 'k', description: 'clone crypted home' }),
|
|
@@ -35,6 +36,12 @@ export default class Love extends Command {
|
|
|
35
36
|
verbose = true;
|
|
36
37
|
flagVerbose = '--verbose';
|
|
37
38
|
}
|
|
39
|
+
let hidden = false;
|
|
40
|
+
let flagHidden = '';
|
|
41
|
+
if (flags.hidden) {
|
|
42
|
+
hidden = true;
|
|
43
|
+
flagHidden = '--hidden';
|
|
44
|
+
}
|
|
38
45
|
let clone = false;
|
|
39
46
|
if (flags.clone) {
|
|
40
47
|
clone = true;
|
|
@@ -87,7 +94,7 @@ export default class Love extends Command {
|
|
|
87
94
|
console.log();
|
|
88
95
|
for (const cmd of cmds) {
|
|
89
96
|
if (cmd.includes('produce')) {
|
|
90
|
-
console.log(`- ${cmdSudo} ${cmd} ${flagVerbose} ${flagClone} ${flagNointeractive}`);
|
|
97
|
+
console.log(`- ${cmdSudo} ${cmd} ${flagHidden} ${flagVerbose} ${flagClone} ${flagNointeractive}`);
|
|
91
98
|
}
|
|
92
99
|
else {
|
|
93
100
|
console.log(`- ${cmdSudo} ${cmd} ${flagVerbose} ${flagNointeractive}`);
|
|
@@ -97,7 +104,7 @@ export default class Love extends Command {
|
|
|
97
104
|
if (nointeractive || await Utils.customConfirm()) {
|
|
98
105
|
for (const cmd of cmds) {
|
|
99
106
|
if (cmd.includes('produce')) {
|
|
100
|
-
await exec(`${cmdSudo} ${cmd} ${flagVerbose} ${flagClone} ${flagNointeractive}`);
|
|
107
|
+
await exec(`${cmdSudo} ${cmd} ${flagHidden} ${flagVerbose} ${flagClone} ${flagNointeractive}`);
|
|
101
108
|
}
|
|
102
109
|
else {
|
|
103
110
|
await exec(`${cmdSudo} ${cmd} ${flagVerbose} ${flagNointeractive}`);
|
|
@@ -17,6 +17,7 @@ export default class Produce extends Command {
|
|
|
17
17
|
fullcrypt: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
18
|
excludes: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
19
|
help: import("@oclif/core/interfaces").BooleanFlag<void>;
|
|
20
|
+
hidden: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
kernel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
22
|
links: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
23
|
max: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -28,7 +29,7 @@ export default class Produce extends Command {
|
|
|
28
29
|
script: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
29
30
|
standard: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
30
31
|
theme: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
31
|
-
|
|
32
|
+
includeRootHome: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
32
33
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
33
34
|
yolk: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
34
35
|
};
|
package/dist/commands/produce.js
CHANGED
|
@@ -13,6 +13,7 @@ import Compressors from '../classes/compressors.js';
|
|
|
13
13
|
import Ovary from '../classes/ovary.js';
|
|
14
14
|
import Utils from '../classes/utils.js';
|
|
15
15
|
import Config from './config.js';
|
|
16
|
+
import Distro from '../classes/distro.js';
|
|
16
17
|
// _dirname
|
|
17
18
|
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
18
19
|
export default class Produce extends Command {
|
|
@@ -33,6 +34,7 @@ export default class Produce extends Command {
|
|
|
33
34
|
fullcrypt: Flags.boolean({ char: 'f', description: 'clone crypted full' }),
|
|
34
35
|
excludes: Flags.string({ description: 'use: static, homes, home', multiple: true }),
|
|
35
36
|
help: Flags.help({ char: 'h' }),
|
|
37
|
+
hidden: Flags.boolean({ char: 'H', description: 'stealth mode' }),
|
|
36
38
|
kernel: Flags.string({ char: 'K', description: 'kernel version' }),
|
|
37
39
|
links: Flags.string({ description: 'desktop links', multiple: true }),
|
|
38
40
|
max: Flags.boolean({ char: 'm', description: 'max compression: xz -Xbcj ...' }),
|
|
@@ -44,7 +46,7 @@ export default class Produce extends Command {
|
|
|
44
46
|
script: Flags.boolean({ char: 's', description: 'script mode. Generate scripts to manage iso build' }),
|
|
45
47
|
standard: Flags.boolean({ char: 'S', description: 'standard compression: xz -b 1M' }),
|
|
46
48
|
theme: Flags.string({ description: 'theme for livecd, calamares branding and partitions' }),
|
|
47
|
-
|
|
49
|
+
includeRootHome: Flags.boolean({ char: 'i', description: 'folder /root is included on live' }),
|
|
48
50
|
verbose: Flags.boolean({ char: 'v', description: 'verbose' }),
|
|
49
51
|
yolk: Flags.boolean({ char: 'y', description: 'force yolk renew' })
|
|
50
52
|
};
|
|
@@ -135,14 +137,15 @@ export default class Produce extends Command {
|
|
|
135
137
|
const { release } = flags;
|
|
136
138
|
const { clone } = flags;
|
|
137
139
|
const { homecrypt } = flags;
|
|
140
|
+
const { hidden } = flags;
|
|
138
141
|
const { fullcrypt } = flags;
|
|
139
142
|
const { verbose } = flags;
|
|
140
143
|
const scriptOnly = flags.script;
|
|
141
144
|
const yolkRenew = flags.yolk;
|
|
142
145
|
const { nointeractive } = flags;
|
|
143
146
|
const { noicon } = flags;
|
|
144
|
-
// if clone or homecrypt
|
|
145
|
-
const
|
|
147
|
+
// if clone or homecrypt includeRootHome = true
|
|
148
|
+
const includeRootHome = flags.includeRootHome || clone || homecrypt;
|
|
146
149
|
let { kernel } = flags;
|
|
147
150
|
if (kernel === undefined) {
|
|
148
151
|
kernel = '';
|
|
@@ -206,8 +209,19 @@ export default class Produce extends Command {
|
|
|
206
209
|
let message = "this is a GUI system, calamares is available, but NOT installed\n";
|
|
207
210
|
Utils.warning(message);
|
|
208
211
|
}
|
|
212
|
+
if (fullcrypt) {
|
|
213
|
+
const distro = new Distro();
|
|
214
|
+
if (distro.familyId === 'debian') {
|
|
215
|
+
Utils.info("Use this option and penguins-eggs in general with extreme caution and ALWAYS test them first in test environments.");
|
|
216
|
+
Utils.sleep(3000);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
Utils.warning("This option is still experimental and can only be tried on Debian.");
|
|
220
|
+
process.exit(9);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
209
223
|
if (await ovary.fertilization(prefix, basename, theme, compression, !nointeractive)) {
|
|
210
|
-
await ovary.produce(kernel, clone, homecrypt, fullcrypt, scriptOnly, yolkRenew, release, myAddons, myLinks, excludes, nointeractive, noicon,
|
|
224
|
+
await ovary.produce(kernel, clone, homecrypt, fullcrypt, hidden, scriptOnly, yolkRenew, release, myAddons, myLinks, excludes, nointeractive, noicon, includeRootHome, verbose);
|
|
211
225
|
ovary.finished(scriptOnly);
|
|
212
226
|
}
|
|
213
227
|
}
|
|
@@ -108,9 +108,9 @@ export default class Sequence {
|
|
|
108
108
|
settings = {};
|
|
109
109
|
remix = {};
|
|
110
110
|
distro = {};
|
|
111
|
-
|
|
111
|
+
luksMappedName = 'luks-volume'; // encrypted ISOs
|
|
112
112
|
luksFile = ``; // encrypted ISOs
|
|
113
|
-
luksDevice = `/dev/mapper/${this.
|
|
113
|
+
luksDevice = `/dev/mapper/${this.luksMappedName}`; // encrypted ISOs
|
|
114
114
|
luksMountpoint = `/mnt`; // encrypted ISOs
|
|
115
115
|
luksRootName = ''; // installation encrypted
|
|
116
116
|
is_clone = fs.existsSync('/etc/penguins-eggs.d/is_clone');
|
|
@@ -142,7 +142,7 @@ export default class Sequence {
|
|
|
142
142
|
this.devices.swap = {};
|
|
143
143
|
this.distro = new Distro();
|
|
144
144
|
this.efi = fs.existsSync('/sys/firmware/efi/efivars');
|
|
145
|
-
this.luksFile = `${this.distro.liveMediumPath}live/${this.
|
|
145
|
+
this.luksFile = `${this.distro.liveMediumPath}live/${this.luksMappedName}`;
|
|
146
146
|
this.luksRootName = `${this.distro.distroLike}_root`;
|
|
147
147
|
this.luksRootName = this.luksRootName.toLowerCase(); // installation encrypted
|
|
148
148
|
}
|
package/package.json
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"name": "penguins-eggs",
|
|
3
3
|
"shortName": "eggs",
|
|
4
4
|
"description": "A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others",
|
|
5
|
-
"version": "25.10.
|
|
5
|
+
"version": "25.10.24",
|
|
6
6
|
"author": "Piero Proietti",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eggs": "./bin/run.js"
|
|
9
9
|
},
|
|
10
10
|
"bugs": "https://github.com/pieroproietti/penguins-eggs/issues",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@oclif/core": "^4.
|
|
12
|
+
"@oclif/core": "^4.7.2",
|
|
13
13
|
"@oclif/plugin-autocomplete": "^3.2.37",
|
|
14
14
|
"@oclif/plugin-help": "^6.2.33",
|
|
15
15
|
"@oclif/plugin-version": "^2.2.34",
|
|
16
|
-
"@types/express": "^5.0.
|
|
16
|
+
"@types/express": "^5.0.4",
|
|
17
17
|
"ansis": "^4.2.0",
|
|
18
18
|
"axios": "^1.12.2",
|
|
19
19
|
"chalk": "^5.6.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@oclif/prettier-config": "^0.2.1",
|
|
39
39
|
"@oclif/test": "^4.1.14",
|
|
40
|
-
"@types/chai": "^5.2.
|
|
40
|
+
"@types/chai": "^5.2.3",
|
|
41
41
|
"@types/debug": "^4.1.12",
|
|
42
42
|
"@types/glob": "^9.0.0",
|
|
43
43
|
"@types/inquirer": "^9.0.8",
|
package/scripts/_eggs
CHANGED
|
@@ -317,6 +317,7 @@ love)
|
|
|
317
317
|
_arguments -S \
|
|
318
318
|
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
319
319
|
"(-v --verbose)"{-v,--verbose}"[]" \
|
|
320
|
+
"(-H --hidden)"{-H,--hidden}"[stealth mode]" \
|
|
320
321
|
"(-n --nointeractive)"{-n,--nointeractive}"[no user interaction]" \
|
|
321
322
|
"(-c --clone)"{-c,--clone}"[clone (uncrypted)]" \
|
|
322
323
|
"(-k --homecrypt)"{-k,--homecrypt}"[clone crypted home]" \
|
|
@@ -342,6 +343,7 @@ _arguments -S \
|
|
|
342
343
|
"(-f --fullcrypt)"{-f,--fullcrypt}"[clone crypted full]" \
|
|
343
344
|
"*"--excludes"[use: static, homes, home]:file:_files" \
|
|
344
345
|
"(-h --help)"{-h,--help}"[Show CLI help.]" \
|
|
346
|
+
"(-H --hidden)"{-H,--hidden}"[stealth mode]" \
|
|
345
347
|
"(-K --kernel)"{-K,--kernel}"[kernel version]:file:_files" \
|
|
346
348
|
"*"--links"[desktop links]:file:_files" \
|
|
347
349
|
"(-m --max)"{-m,--max}"[max compression: xz -Xbcj ...]" \
|
|
@@ -353,7 +355,7 @@ _arguments -S \
|
|
|
353
355
|
"(-s --script)"{-s,--script}"[script mode. Generate scripts to manage iso build]" \
|
|
354
356
|
"(-S --standard)"{-S,--standard}"[standard compression: xz -b 1M]" \
|
|
355
357
|
--theme"[theme for livecd, calamares branding and partitions]:file:_files" \
|
|
356
|
-
"(-i --
|
|
358
|
+
"(-i --includeRootHome)"{-i,--includeRootHome}"[folder /root is included on live]" \
|
|
357
359
|
"(-v --verbose)"{-v,--verbose}"[verbose]" \
|
|
358
360
|
"(-y --yolk)"{-y,--yolk}"[force yolk renew]" \
|
|
359
361
|
--help"[Show help for command]" \
|