penguins-eggs 9.3.4 → 9.3.8
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 +1 -1
- package/README.md +34 -30
- package/addons/eggs/theme/calamares/modules/locale.yml +10 -0
- package/addons/eggs/theme/calamares/modules/partition.yml +3 -0
- package/addons/eggs/theme/calamares/modules/users.yml +20 -0
- package/conf/distros/focal/calamares/modules/users.yml +1 -23
- package/conf/distros/rolling/calamares/modules/packages.yml +1 -4
- package/conf/tools.yaml +1 -1
- package/dist/classes/distro.js +7 -18
- package/dist/classes/incubation/branding.js +4 -2
- package/dist/classes/incubation/distros/bionic.js +3 -3
- package/dist/classes/incubation/distros/buster.js +7 -6
- package/dist/classes/incubation/distros/focal.js +6 -7
- package/dist/classes/incubation/distros/jessie.js +1 -1
- package/dist/classes/incubation/distros/rolling.js +3 -3
- package/dist/classes/incubation/fisherman-helper/packages.js +9 -9
- package/dist/classes/incubation/fisherman.js +13 -4
- package/dist/classes/incubation/incubator.js +30 -18
- package/dist/classes/ovary.js +62 -53
- package/dist/classes/pxe.js +74 -28
- package/dist/classes/settings.js +1 -1
- package/dist/commands/calamares.js +2 -2
- package/dist/krill/krill-sequence.js +22 -17
- package/dist/krill/modules/bootloader.js +3 -12
- package/dist/krill/modules/initramfs.js +4 -1
- package/dist/krill/modules/mount-vfs.js +1 -1
- package/dist/krill/modules/unpackfs.js +2 -1
- package/mkinitcpio/archlinux/README.md +97 -1
- package/mkinitcpio/archlinux/archinstall/user_configuration.json +42 -0
- package/mkinitcpio/archlinux/archinstall/user_credentials.json +9 -0
- package/mkinitcpio/archlinux/archinstall/user_disk_layout.json +31 -0
- package/mkinitcpio/archlinux/mkinitcpio-install.conf +0 -1
- package/mkinitcpio/archlinux/mkinitcpio-produce.conf +0 -5
- package/mkinitcpio/manjaro/mkinitcpio-produce.conf +4 -2
- package/package.json +2 -2
- package/addons/neon/theme/applications/install-debian.desktop +0 -28
- package/addons/neon/theme/artwork/install-debian.png +0 -0
- package/addons/neon/theme/calamares/branding/branding.desc +0 -1
- package/addons/neon/theme/calamares/branding/kde.png +0 -0
- package/addons/neon/theme/calamares/branding/neon-logo.png +0 -0
- package/addons/neon/theme/calamares/branding/neon.png +0 -0
- package/addons/neon/theme/calamares/branding/plasma.png +0 -0
- package/addons/neon/theme/calamares/branding/secure.png +0 -0
- package/addons/neon/theme/calamares/branding/show.qml +0 -152
- package/addons/neon/theme/calamares/branding/welcome.png +0 -0
- package/addons/neon/theme/calamares/modules/partition.conf +0 -233
- package/addons/neon/theme/livecd/grub.theme.cfg +0 -43
- package/addons/neon/theme/livecd/isolinux.theme.cfg +0 -46
- package/addons/telos/theme/applications/install-debian.desktop +0 -28
- package/addons/telos/theme/artwork/install-debian.png +0 -0
- package/addons/telos/theme/calamares/branding/banner.png +0 -0
- package/addons/telos/theme/calamares/branding/branding.desc +0 -25
- package/addons/telos/theme/calamares/branding/show.qml +0 -51
- package/addons/telos/theme/calamares/branding/slide1.png +0 -0
- package/addons/telos/theme/calamares/branding/telos-logo.png +0 -0
- package/addons/telos/theme/calamares/branding/welcome.png +0 -0
- package/addons/telos/theme/calamares/modules/partition.yml +0 -233
- package/addons/telos/theme/livecd/grub.theme.cfg +0 -43
- package/addons/telos/theme/livecd/isolinux.theme.cfg +0 -45
- package/addons/telos/theme/livecd/splash.png +0 -0
- package/addons/ufficiozero/theme/README.md +0 -16
- package/addons/ufficiozero/theme/applications/install-debian.desktop +0 -28
- package/addons/ufficiozero/theme/calamares/branding/README.md +0 -9
- package/addons/ufficiozero/theme/calamares/branding/branding.desc +0 -1
- package/addons/ufficiozero/theme/calamares/branding/show.qml +0 -123
- package/addons/ufficiozero/theme/calamares/branding/slide1.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/slide2.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/slide3.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/slide4.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/slide5.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/slide6.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/ufficiozero-logo.png +0 -0
- package/addons/ufficiozero/theme/calamares/branding/welcome.png +0 -0
- package/addons/ufficiozero/theme/calamares/modules/partition.yml +0 -233
- package/addons/waydroid/theme/applications/install-debian.desktop +0 -28
- package/addons/waydroid/theme/artwork/install-debian.png +0 -0
- package/addons/waydroid/theme/calamares/branding/branding.desc +0 -1
- package/addons/waydroid/theme/calamares/branding/languages.png +0 -0
- package/addons/waydroid/theme/calamares/branding/show.qml +0 -75
- package/addons/waydroid/theme/calamares/branding/slide1.png +0 -0
- package/addons/waydroid/theme/calamares/branding/slide2.png +0 -0
- package/addons/waydroid/theme/calamares/branding/slide3.png +0 -0
- package/addons/waydroid/theme/calamares/branding/waydroid-logo.png +0 -0
- package/addons/waydroid/theme/calamares/branding/welcome.png +0 -0
- package/addons/waydroid/theme/calamares/modules/partition.yml +0 -233
- package/addons/waydroid/theme/livecd/grub.theme.cfg +0 -43
- package/addons/waydroid/theme/livecd/isolinux.theme.cfg +0 -45
- package/addons/waydroid/theme/livecd/splash.png +0 -0
|
@@ -19,7 +19,7 @@ class Focal {
|
|
|
19
19
|
* @param displaymanager
|
|
20
20
|
* @param verbose
|
|
21
21
|
*/
|
|
22
|
-
constructor(installer, remix, distro, user_opt, release = false, verbose = false) {
|
|
22
|
+
constructor(installer, remix, distro, user_opt, release = false, theme = 'eggs', verbose = false) {
|
|
23
23
|
this.verbose = false;
|
|
24
24
|
this.installer = {};
|
|
25
25
|
this.release = false;
|
|
@@ -29,26 +29,25 @@ class Focal {
|
|
|
29
29
|
this.user_opt = user_opt;
|
|
30
30
|
this.verbose = verbose;
|
|
31
31
|
this.release = release;
|
|
32
|
+
this.theme = theme;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* locale, partitions, users can come from themes
|
|
35
36
|
*/
|
|
36
37
|
async create() {
|
|
37
38
|
const fisherman = new fisherman_1.default(this.distro, this.installer, this.verbose);
|
|
38
|
-
// console.log('creating settings: ' + this.remix.branding)
|
|
39
39
|
await fisherman.settings(this.remix.branding);
|
|
40
|
-
|
|
41
|
-
await fisherman.buildModule('partition', this.remix.branding);
|
|
40
|
+
await fisherman.buildModule('partition', this.theme);
|
|
42
41
|
await fisherman.buildModule('mount');
|
|
43
42
|
await fisherman.moduleUnpackfs();
|
|
44
43
|
await fisherman.buildCalamaresModule('sources-yolk', true);
|
|
45
44
|
await fisherman.buildModule('machineid');
|
|
46
45
|
await fisherman.buildModule('fstab');
|
|
47
|
-
await fisherman.buildModule('locale');
|
|
46
|
+
await fisherman.buildModule('locale', this.theme);
|
|
48
47
|
await fisherman.buildModule('keyboard');
|
|
49
48
|
await fisherman.buildModule('localecfg');
|
|
50
49
|
await fisherman.buildModule('luksbootkeyfile');
|
|
51
|
-
await fisherman.buildModule('users');
|
|
50
|
+
await fisherman.buildModule('users', this.theme);
|
|
52
51
|
await fisherman.moduleDisplaymanager();
|
|
53
52
|
await fisherman.buildModule('networkcfg');
|
|
54
53
|
await fisherman.buildModule('hwclock');
|
|
@@ -33,7 +33,7 @@ class Rolling {
|
|
|
33
33
|
this.release = release;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* locale, partitions, users can come from themes
|
|
37
37
|
*/
|
|
38
38
|
async create() {
|
|
39
39
|
const fisherman = new fisherman_1.default(this.distro, this.installer, this.verbose);
|
|
@@ -44,10 +44,10 @@ class Rolling {
|
|
|
44
44
|
// await fisherman.buildCalamaresModule('sources-yolk', true)
|
|
45
45
|
// await fisherman.buildModule('machineid')
|
|
46
46
|
await fisherman.buildModule('fstab');
|
|
47
|
-
await fisherman.buildModule('locale');
|
|
47
|
+
await fisherman.buildModule('locale', this.remix.branding);
|
|
48
48
|
await fisherman.buildModule('keyboard');
|
|
49
49
|
await fisherman.buildModule('localecfg');
|
|
50
|
-
await fisherman.buildModule('users');
|
|
50
|
+
await fisherman.buildModule('users', this.remix.branding);
|
|
51
51
|
await fisherman.moduleDisplaymanager();
|
|
52
52
|
await fisherman.buildModule('networkcfg');
|
|
53
53
|
await fisherman.buildModule('hwclock');
|
|
@@ -18,7 +18,7 @@ function remove(distro) {
|
|
|
18
18
|
}
|
|
19
19
|
let yaml = '';
|
|
20
20
|
for (const elem of packages) {
|
|
21
|
-
yaml += `
|
|
21
|
+
yaml += ` - ${elem.trim()}\n`;
|
|
22
22
|
}
|
|
23
23
|
if (yaml !== '') {
|
|
24
24
|
yaml = '- remove:\n' + yaml;
|
|
@@ -37,27 +37,27 @@ function tryInstall(distro) {
|
|
|
37
37
|
* Depending on the distro
|
|
38
38
|
*/
|
|
39
39
|
if (distro.distroLike === 'Ubuntu') {
|
|
40
|
-
yaml += '
|
|
40
|
+
yaml += ' - language-pack-$LOCALE\n';
|
|
41
41
|
}
|
|
42
42
|
// Da localizzare se presenti
|
|
43
43
|
if (pacman_1.default.packageIsInstalled('hunspell')) {
|
|
44
|
-
yaml += '
|
|
44
|
+
yaml += ' - hunspell-$LOCALE\n';
|
|
45
45
|
}
|
|
46
46
|
if (pacman_1.default.packageIsInstalled('libreoffice-base-core')) {
|
|
47
|
-
yaml += `
|
|
48
|
-
yaml += `
|
|
47
|
+
yaml += ` - libreoffice-l10n-$LOCALE\n`;
|
|
48
|
+
yaml += ` - libreoffice-help-$LOCALE\n`;
|
|
49
49
|
}
|
|
50
50
|
if (pacman_1.default.packageIsInstalled('firefox-esr')) {
|
|
51
|
-
yaml += `
|
|
51
|
+
yaml += ` - firefox-esr-$LOCALE\n`;
|
|
52
52
|
}
|
|
53
53
|
if (pacman_1.default.packageIsInstalled('firefox')) {
|
|
54
|
-
yaml += `
|
|
54
|
+
yaml += ` - firefox-$LOCALE\n`;
|
|
55
55
|
}
|
|
56
56
|
if (pacman_1.default.packageIsInstalled('thunderbird')) {
|
|
57
|
-
yaml += `
|
|
57
|
+
yaml += ` - thunderbird-locale-$LOCALE\n`;
|
|
58
58
|
}
|
|
59
59
|
if (yaml !== '') {
|
|
60
|
-
yaml = '
|
|
60
|
+
yaml = '- try_install:\n' + yaml;
|
|
61
61
|
}
|
|
62
62
|
return yaml;
|
|
63
63
|
}
|
|
@@ -25,7 +25,13 @@ class Fisherman {
|
|
|
25
25
|
/**
|
|
26
26
|
* write setting
|
|
27
27
|
*/
|
|
28
|
-
async settings(
|
|
28
|
+
async settings(vendor = 'eggs') {
|
|
29
|
+
let branding = vendor;
|
|
30
|
+
if (vendor !== 'eggs') {
|
|
31
|
+
if (vendor.includes('/')) {
|
|
32
|
+
branding = vendor.substring(vendor.lastIndexOf('/'));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
const settings = this.installer.configuration + 'settings.conf';
|
|
30
36
|
shelljs_1.default.cp(this.installer.template + 'settings.yml', settings);
|
|
31
37
|
let hasSystemd = '# ';
|
|
@@ -37,7 +43,7 @@ class Fisherman {
|
|
|
37
43
|
*/
|
|
38
44
|
let filePersonal = `/home/eggs/ovarium/iso/live/is-clone.md`;
|
|
39
45
|
if (utils_1.default.isLive()) {
|
|
40
|
-
filePersonal = node_path_1.default.dirname(this.distro.
|
|
46
|
+
filePersonal = node_path_1.default.dirname(this.distro.liveMediumPath) + `/is-clone.md`;
|
|
41
47
|
}
|
|
42
48
|
let hasDisplaymanager = '# ';
|
|
43
49
|
let createUsers = '# ';
|
|
@@ -109,7 +115,10 @@ class Fisherman {
|
|
|
109
115
|
*
|
|
110
116
|
*/
|
|
111
117
|
if (vendor !== '') {
|
|
112
|
-
|
|
118
|
+
let customModuleSource = node_path_1.default.resolve(__dirname, `../../../addons/${vendor}/theme/calamares/modules/${name}.yml`);
|
|
119
|
+
if (vendor.includes('/')) {
|
|
120
|
+
customModuleSource = `${vendor}/theme/calamares/modules/${name}.yml`;
|
|
121
|
+
}
|
|
113
122
|
if (node_fs_1.default.existsSync(customModuleSource)) {
|
|
114
123
|
moduleSource = customModuleSource;
|
|
115
124
|
}
|
|
@@ -213,7 +222,7 @@ class Fisherman {
|
|
|
213
222
|
async moduleUnpackfs() {
|
|
214
223
|
const name = 'unpackfs';
|
|
215
224
|
this.buildModule(name);
|
|
216
|
-
shelljs_1.default.sed('-i', '{{source}}', this.distro.
|
|
225
|
+
shelljs_1.default.sed('-i', '{{source}}', this.distro.liveMediumPath + this.distro.squashfs, this.installer.modules + name + '.conf');
|
|
217
226
|
}
|
|
218
227
|
/**
|
|
219
228
|
* usa i moduli-ts
|
|
@@ -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
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
package/dist/classes/ovary.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
180
|
+
await this.makeEfi(this.theme);
|
|
179
181
|
}
|
|
180
182
|
await this.bindLiveFs();
|
|
181
183
|
/**
|
|
@@ -216,15 +218,15 @@ class Ovary {
|
|
|
216
218
|
* patch to emulate miso/archiso on archilinux
|
|
217
219
|
*/
|
|
218
220
|
if (this.familyId === 'archlinux') {
|
|
219
|
-
await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}/live/x86_64`, this.echo);
|
|
220
221
|
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
221
|
-
await (0, utils_1.exec)(`
|
|
222
|
-
await (0, utils_1.exec)(`
|
|
222
|
+
await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}manjaro/x86_64 -p`, this.echo);
|
|
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);
|
|
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
226
|
else if (this.settings.distro.distroId === 'Arch') {
|
|
225
|
-
await (0, utils_1.exec)(`
|
|
226
|
-
await (0, utils_1.exec)(`
|
|
227
|
-
|
|
227
|
+
await (0, utils_1.exec)(`mkdir ${this.settings.work_dir.pathIso}arch/x86_64 -p`, this.echo);
|
|
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);
|
|
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);
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
232
|
await this.makeIso(xorrisoCommand, scriptOnly);
|
|
@@ -272,9 +274,10 @@ class Ovary {
|
|
|
272
274
|
this.tryCatch(cmd);
|
|
273
275
|
cmd = `mkdir -p ${this.settings.work_dir.pathIso}/efi/boot`;
|
|
274
276
|
this.tryCatch(cmd);
|
|
277
|
+
let liveBsseDir = 'live';
|
|
275
278
|
cmd = `mkdir -p ${this.settings.work_dir.pathIso}/isolinux`;
|
|
276
279
|
this.tryCatch(cmd);
|
|
277
|
-
cmd = `mkdir -p ${this.settings.work_dir.pathIso}
|
|
280
|
+
cmd = `mkdir -p ${this.settings.work_dir.pathIso}live`;
|
|
278
281
|
this.tryCatch(cmd);
|
|
279
282
|
}
|
|
280
283
|
}
|
|
@@ -523,7 +526,10 @@ class Ovary {
|
|
|
523
526
|
* isolinux.theme.cfg
|
|
524
527
|
*/
|
|
525
528
|
const isolinuxThemeDest = this.settings.work_dir.pathIso + 'isolinux/isolinux.theme.cfg';
|
|
526
|
-
|
|
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
|
+
}
|
|
527
533
|
if (!fs_1.default.existsSync(isolinuxThemeSrc)) {
|
|
528
534
|
utils_2.default.warning('Cannot find: ' + isolinuxThemeSrc);
|
|
529
535
|
process.exit();
|
|
@@ -545,10 +551,10 @@ class Ovary {
|
|
|
545
551
|
if (this.familyId === 'archlinux') {
|
|
546
552
|
let volid = utils_2.default.getVolid(this.settings.remix.name);
|
|
547
553
|
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
548
|
-
kernel_parameters += ` misobasedir=
|
|
554
|
+
kernel_parameters += ` misobasedir=manjaro misolabel=${volid}`;
|
|
549
555
|
}
|
|
550
556
|
else if (this.settings.distro.distroId === 'Arch') {
|
|
551
|
-
kernel_parameters += ` archisobasedir=
|
|
557
|
+
kernel_parameters += ` archisobasedir=arch archisolabel=${volid} cow_spacesize=4G`;
|
|
552
558
|
}
|
|
553
559
|
}
|
|
554
560
|
const template = fs_1.default.readFileSync(isolinuxTemplate, 'utf8');
|
|
@@ -564,7 +570,10 @@ class Ovary {
|
|
|
564
570
|
* splash
|
|
565
571
|
*/
|
|
566
572
|
const splashDest = `${this.settings.work_dir.pathIso}/isolinux/splash.png`;
|
|
567
|
-
|
|
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
|
+
}
|
|
568
577
|
if (!fs_1.default.existsSync(splashSrc)) {
|
|
569
578
|
utils_2.default.warning('Cannot find: ' + splashSrc);
|
|
570
579
|
process.exit();
|
|
@@ -580,7 +589,6 @@ class Ovary {
|
|
|
580
589
|
}
|
|
581
590
|
let lackVmlinuzImage = false;
|
|
582
591
|
if (fs_1.default.existsSync(this.settings.kernel_image)) {
|
|
583
|
-
console.log('kernel image:' + this.settings.kernel_image);
|
|
584
592
|
await (0, utils_1.exec)(`cp ${this.settings.kernel_image} ${this.settings.work_dir.pathIso}/live/`, this.echo);
|
|
585
593
|
}
|
|
586
594
|
else {
|
|
@@ -943,36 +951,33 @@ class Ovary {
|
|
|
943
951
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' rm /home/' + this.settings.config.user_opt + ' -rf', this.verbose));
|
|
944
952
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
|
|
945
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));
|
|
946
|
-
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));
|
|
947
954
|
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
948
|
-
// cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', verbose))
|
|
949
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));
|
|
950
960
|
if (this.familyId === 'debian') {
|
|
951
|
-
// add user live to sudo
|
|
952
961
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
|
|
953
|
-
// educaandos
|
|
954
|
-
if (this.settings.config.theme === 'educaandos') {
|
|
955
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG adm ${this.settings.config.user_opt}`, this.verbose));
|
|
956
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG cdrom ${this.settings.config.user_opt}`, this.verbose));
|
|
957
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG dip ${this.settings.config.user_opt}`, this.verbose));
|
|
958
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG plugdev ${this.settings.config.user_opt}`, this.verbose));
|
|
959
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG lpadmin ${this.settings.config.user_opt}`, this.verbose));
|
|
960
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sambashare ${this.settings.config.user_opt}`, this.verbose));
|
|
961
|
-
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG admin ${this.settings.config.user_opt}`, this.verbose));
|
|
962
|
-
}
|
|
963
962
|
}
|
|
964
963
|
else if (this.familyId === 'archlinux') {
|
|
965
|
-
// adduser live to wheel and autologin
|
|
966
|
-
// cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose))
|
|
967
|
-
// in manjaro they use autologin group for the iso, if not exist create it
|
|
968
|
-
// 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))
|
|
969
|
-
// cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG autologin ${this.settings.config.user_opt}`, this.verbose))
|
|
970
964
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
|
|
971
965
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} sudo`, this.verbose));
|
|
972
966
|
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
|
|
973
967
|
}
|
|
974
|
-
|
|
975
|
-
|
|
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
|
+
}
|
|
976
981
|
}
|
|
977
982
|
}
|
|
978
983
|
/**
|
|
@@ -1023,8 +1028,8 @@ class Ovary {
|
|
|
1023
1028
|
if (myAddons.adapt) {
|
|
1024
1029
|
const dirAddon = node_path_1.default.resolve(__dirname, `../../addons/eggs/adapt/`);
|
|
1025
1030
|
shelljs_1.default.cp(`${dirAddon}/applications/eggs-adapt.desktop`, `${this.settings.work_dir.merged}/usr/share/applications/`);
|
|
1026
|
-
shelljs_1.default.cp(`${dirAddon}/bin/adapt`, `${this.settings.work_dir.merged}/usr/
|
|
1027
|
-
shelljs_1.default.chmod('+x', `${this.settings.work_dir.merged}/usr/
|
|
1031
|
+
shelljs_1.default.cp(`${dirAddon}/bin/adapt`, `${this.settings.work_dir.merged}/usr/bin/`);
|
|
1032
|
+
shelljs_1.default.chmod('+x', `${this.settings.work_dir.merged}/usr/bin/adapt`);
|
|
1028
1033
|
}
|
|
1029
1034
|
// ichoice
|
|
1030
1035
|
if (myAddons.ichoice) {
|
|
@@ -1032,8 +1037,8 @@ class Ovary {
|
|
|
1032
1037
|
installerIcon = 'system-software-install';
|
|
1033
1038
|
const dirAddon = node_path_1.default.resolve(__dirname, '../../addons/eggs/ichoice/');
|
|
1034
1039
|
shelljs_1.default.cp(`${dirAddon}/applications/eggs-ichoice.desktop`, `${this.settings.work_dir.merged}/usr/share/applications/`);
|
|
1035
|
-
shelljs_1.default.cp(`${dirAddon}/bin/eggs-ichoice.sh`, `${this.settings.work_dir.merged}/usr/
|
|
1036
|
-
shelljs_1.default.chmod('+x', `${this.settings.work_dir.merged}/usr/
|
|
1040
|
+
shelljs_1.default.cp(`${dirAddon}/bin/eggs-ichoice.sh`, `${this.settings.work_dir.merged}/usr/bin/`);
|
|
1041
|
+
shelljs_1.default.chmod('+x', `${this.settings.work_dir.merged}/usr/bin/eggs-ichoice.sh`);
|
|
1037
1042
|
}
|
|
1038
1043
|
// pve
|
|
1039
1044
|
if (myAddons.pve) {
|
|
@@ -1204,7 +1209,10 @@ class Ovary {
|
|
|
1204
1209
|
* copy splash to efiWorkDir
|
|
1205
1210
|
*/
|
|
1206
1211
|
const splashDest = `${efiWorkDir}/boot/grub/splash.png`;
|
|
1207
|
-
|
|
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
|
+
}
|
|
1208
1216
|
if (!fs_1.default.existsSync(splashSrc)) {
|
|
1209
1217
|
utils_2.default.warning('Cannot find: ' + splashSrc);
|
|
1210
1218
|
process.exit();
|
|
@@ -1214,7 +1222,10 @@ class Ovary {
|
|
|
1214
1222
|
* copy theme
|
|
1215
1223
|
*/
|
|
1216
1224
|
const themeDest = `${efiWorkDir}/boot/grub/theme.cfg`;
|
|
1217
|
-
|
|
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
|
+
}
|
|
1218
1229
|
if (!fs_1.default.existsSync(themeSrc)) {
|
|
1219
1230
|
utils_2.default.warning('Cannot find: ' + themeSrc);
|
|
1220
1231
|
process.exit();
|
|
@@ -1278,15 +1289,18 @@ class Ovary {
|
|
|
1278
1289
|
// chown -R 1000:1000 $(pwd) 2>/dev/null
|
|
1279
1290
|
// Cleanup efi temps
|
|
1280
1291
|
await (0, utils_1.exec)(`umount ${efiWorkDir}/img-mnt`, this.echo);
|
|
1281
|
-
|
|
1282
|
-
|
|
1292
|
+
await (0, utils_1.exec)(`rmdir ${efiWorkDir}/img-mnt`, this.echo);
|
|
1293
|
+
await (0, utils_1.exec)(`rm ${memdiskDir}/img-mnt -rf`, this.echo);
|
|
1283
1294
|
// popd
|
|
1284
1295
|
// Copy efi files to iso
|
|
1285
1296
|
await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}/boot ${isoDir}/`, this.echo);
|
|
1286
1297
|
await (0, utils_1.exec)(`rsync -avx ${efiWorkDir}/efi ${isoDir}/`, this.echo);
|
|
1287
1298
|
// Do the main grub.cfg (which gets loaded last):
|
|
1288
1299
|
// grub.theme.cfg
|
|
1289
|
-
|
|
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
|
+
}
|
|
1290
1304
|
const grubThemeDest = `${isoDir}/boot/grub/theme.cfg`;
|
|
1291
1305
|
if (!fs_1.default.existsSync(grubThemeSrc)) {
|
|
1292
1306
|
utils_2.default.warning('Cannot find: ' + grubThemeSrc);
|
|
@@ -1308,25 +1322,20 @@ class Ovary {
|
|
|
1308
1322
|
if (this.familyId === 'archlinux') {
|
|
1309
1323
|
let volid = utils_2.default.getVolid(this.settings.remix.name);
|
|
1310
1324
|
if (this.settings.distro.distroId === 'ManjaroLinux') {
|
|
1311
|
-
kernel_parameters += ` misobasedir=
|
|
1325
|
+
kernel_parameters += ` misobasedir=manjaro misolabel=${volid}`;
|
|
1312
1326
|
}
|
|
1313
1327
|
else if (this.settings.distro.distroId === 'Arch') {
|
|
1314
|
-
kernel_parameters += ` archisobasedir=
|
|
1328
|
+
kernel_parameters += ` archisobasedir=arch archisolabel=${volid} cow_spacesize=4G`;
|
|
1315
1329
|
}
|
|
1316
1330
|
}
|
|
1317
1331
|
const grubDest = `${isoDir}/boot/grub/grub.cfg`;
|
|
1318
1332
|
const template = fs_1.default.readFileSync(grubTemplate, 'utf8');
|
|
1319
|
-
// let rmModules = ''
|
|
1320
|
-
// if (this.settings.distro.codenameLikeId === 'focal') {
|
|
1321
|
-
// rmModules = 'rmmod tpm'
|
|
1322
|
-
// }
|
|
1323
1333
|
const view = {
|
|
1324
1334
|
fullname: this.settings.remix.fullname.toUpperCase(),
|
|
1325
1335
|
kernel: utils_2.default.kernelVersion(),
|
|
1326
1336
|
vmlinuz: `/live${this.settings.vmlinuz}`,
|
|
1327
1337
|
initrdImg: `/live${this.settings.initrdImg}`,
|
|
1328
1338
|
kernel_parameters: kernel_parameters,
|
|
1329
|
-
// rmModules: rmModules,
|
|
1330
1339
|
};
|
|
1331
1340
|
fs_1.default.writeFileSync(grubDest, mustache_1.default.render(template, view));
|
|
1332
1341
|
/**
|