penguins-eggs 9.3.28 → 9.3.30
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/dist/classes/bleach.js +22 -22
- package/dist/classes/daddy.js +25 -25
- package/dist/classes/family/archlinux.js +16 -16
- package/dist/classes/family/debian.js +23 -23
- package/dist/classes/family/fedora.js +14 -14
- package/dist/classes/family/suse.js +14 -14
- package/dist/classes/incubation/distros/bionic.js +5 -4
- package/dist/classes/incubation/distros/buster.js +5 -4
- package/dist/classes/incubation/distros/focal.js +5 -4
- package/dist/classes/incubation/distros/jessie.js +2 -2
- package/dist/classes/incubation/distros/rolling.js +6 -4
- package/dist/classes/incubation/fisherman-helper/displaymanager.js +2 -2
- package/dist/classes/incubation/fisherman-helper/packages.js +6 -6
- package/dist/classes/incubation/fisherman.js +13 -17
- package/dist/classes/incubation/incubator.js +26 -25
- package/dist/classes/incubation/installer.js +5 -5
- package/dist/classes/keyboards.js +5 -5
- package/dist/classes/locales.js +6 -6
- package/dist/classes/n8.js +1 -1
- package/dist/classes/network.js +6 -0
- package/dist/classes/ovary.js +235 -225
- package/dist/classes/pacman.js +121 -121
- package/dist/classes/pve-live.js +2 -2
- package/dist/classes/pxe.js +32 -32
- package/dist/classes/settings.js +24 -24
- package/dist/classes/sources_list.js +8 -8
- package/dist/classes/systemctl.js +11 -11
- package/dist/classes/tailor.js +57 -57
- package/dist/classes/tools.js +2 -2
- package/dist/classes/users.js +2 -2
- package/dist/classes/utils.js +12 -12
- package/dist/classes/xdg.js +38 -38
- package/dist/classes/yolk.js +27 -27
- package/dist/commands/adapt.js +15 -9
- package/dist/commands/analyze.js +11 -11
- package/dist/commands/calamares.js +19 -19
- package/dist/commands/config.js +67 -67
- package/dist/commands/cuckoo.js +8 -8
- package/dist/commands/dad.js +8 -8
- package/dist/commands/export/deb.js +9 -9
- package/dist/commands/export/iso.js +8 -8
- package/dist/commands/install.js +8 -8
- package/dist/commands/kill.js +11 -12
- package/dist/commands/mom.js +5 -5
- package/dist/commands/produce.js +15 -15
- package/dist/commands/status.js +2 -2
- package/dist/commands/syncfrom.js +34 -34
- package/dist/commands/syncto.js +42 -42
- package/dist/commands/tools/clean.js +7 -7
- package/dist/commands/tools/ppa.js +17 -17
- package/dist/commands/tools/skel.js +11 -11
- package/dist/commands/tools/stat.js +2 -2
- package/dist/commands/tools/yolk.js +6 -6
- package/dist/commands/update.js +21 -21
- package/dist/commands/wardrobe/get.js +13 -7
- package/dist/commands/wardrobe/list.js +11 -5
- package/dist/commands/wardrobe/show.js +10 -7
- package/dist/commands/wardrobe/wear.js +16 -10
- package/dist/components/elements/information.js +16 -16
- package/dist/components/finished.js +4 -4
- package/dist/components/install.js +4 -4
- package/dist/components/keyboard.js +4 -4
- package/dist/components/location.js +4 -4
- package/dist/components/network.js +4 -4
- package/dist/components/partitions.js +4 -4
- package/dist/components/summary.js +4 -4
- package/dist/components/users.js +4 -4
- package/dist/components/welcome.js +4 -4
- package/dist/krill/krill-prepare.js +84 -84
- package/dist/krill/krill-sequence.js +140 -140
- package/dist/krill/modules/add-user.js +6 -6
- package/dist/krill/modules/bootloader-config-ubuntu.js +21 -21
- package/dist/krill/modules/bootloader.js +6 -6
- package/dist/krill/modules/change-password.js +2 -2
- package/dist/krill/modules/del-live-user.js +5 -5
- package/dist/krill/modules/fstab.js +10 -10
- package/dist/krill/modules/grubcfg.js +3 -3
- package/dist/krill/modules/initramfs-cfg.js +3 -3
- package/dist/krill/modules/initramfs.js +9 -9
- package/dist/krill/modules/locale.js +4 -4
- package/dist/krill/modules/m-keyboard.js +9 -9
- package/dist/krill/modules/m-timezone.js +3 -3
- package/dist/krill/modules/machine-id.js +3 -3
- package/dist/krill/modules/mkfs.js +6 -6
- package/dist/krill/modules/mount-fs.js +13 -13
- package/dist/krill/modules/mount-vfs.js +12 -12
- package/dist/krill/modules/network-cfg.js +5 -5
- package/dist/krill/modules/packages.js +10 -10
- package/dist/krill/modules/partition.js +69 -69
- package/dist/krill/modules/umount.js +6 -6
- package/dist/krill/modules/unpackfs.js +4 -4
- package/dist/lib/cli-autologin.js +12 -12
- package/dist/lib/select_keyboard_layout.js +2 -2
- package/dist/lib/select_keyboard_model.js +2 -2
- package/dist/lib/select_keyboard_option.js +2 -2
- package/dist/lib/select_keyboard_variant.js +2 -2
- package/dist/lib/select_languages.js +2 -2
- package/package.json +1 -1
package/dist/classes/xdg.js
CHANGED
|
@@ -12,11 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const shelljs_1 = __importDefault(require("shelljs"));
|
|
13
13
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
14
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
15
|
+
const pacman_1 = __importDefault(require("./pacman"));
|
|
16
|
+
const utils_1 = __importDefault(require("./utils"));
|
|
17
|
+
const n8_1 = __importDefault(require("./n8"));
|
|
18
18
|
// libraries
|
|
19
|
-
const
|
|
19
|
+
const utils_2 = require("../lib/utils");
|
|
20
20
|
const xdg_dirs = ['DESKTOP', 'DOWNLOAD', 'TEMPLATES', 'PUBLICSHARE', 'DOCUMENTS', 'MUSIC', 'PICTURES', 'VIDEOS'];
|
|
21
21
|
/**
|
|
22
22
|
* Xdg: xdg-user-dirs, etc
|
|
@@ -37,7 +37,7 @@ class Xdg {
|
|
|
37
37
|
else {
|
|
38
38
|
xdg_dirs.forEach(async (dir) => {
|
|
39
39
|
if (dir === xdg_dir) {
|
|
40
|
-
retval = node_path_1.default.basename(shelljs_1.default.exec(`sudo -u ${await
|
|
40
|
+
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());
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -50,7 +50,7 @@ class Xdg {
|
|
|
50
50
|
* @param verbose
|
|
51
51
|
*/
|
|
52
52
|
static async create(user, chroot, traduce = true, verbose = false) {
|
|
53
|
-
const echo =
|
|
53
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
54
54
|
/**
|
|
55
55
|
* Creo solo la cartella DESKTOP perchè serve per i link, eventualmente posso creare le altre
|
|
56
56
|
* ma c'è il problema di traduce/non traduce
|
|
@@ -68,9 +68,9 @@ class Xdg {
|
|
|
68
68
|
* @param verbose
|
|
69
69
|
*/
|
|
70
70
|
static async mk(chroot, path, verbose = false) {
|
|
71
|
-
const echo =
|
|
71
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
72
72
|
if (!node_fs_1.default.existsSync(chroot + path)) {
|
|
73
|
-
await (0,
|
|
73
|
+
await (0, utils_2.exec)(`mkdir ${chroot}${path}`, echo);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
@@ -80,23 +80,23 @@ class Xdg {
|
|
|
80
80
|
* @param chroot
|
|
81
81
|
*/
|
|
82
82
|
static async autologin(olduser, newuser, chroot = '/') {
|
|
83
|
-
if (
|
|
83
|
+
if (pacman_1.default.isInstalledGui()) {
|
|
84
84
|
/**
|
|
85
85
|
* SLIM
|
|
86
86
|
*/
|
|
87
|
-
if (
|
|
87
|
+
if (pacman_1.default.packageIsInstalled('slim')) {
|
|
88
88
|
shelljs_1.default.sed('-i', 'auto_login no', 'auto_login yes', `${chroot}/etc/slim.conf`);
|
|
89
89
|
shelljs_1.default.sed('-i', `default_user ${olduser}`, `default_user ${newuser}`, `${chroot}/etc/slim.conf`);
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* LIGHTDM
|
|
93
93
|
*/
|
|
94
|
-
if (
|
|
94
|
+
if (pacman_1.default.packageIsInstalled('lightdm')) {
|
|
95
95
|
const dc = `${chroot}/etc/lightdm/`;
|
|
96
96
|
const files = node_fs_1.default.readdirSync(dc);
|
|
97
97
|
for (const elem of files) {
|
|
98
98
|
const curFile = dc + elem;
|
|
99
|
-
if (!
|
|
99
|
+
if (!n8_1.default.isDirectory(curFile)) {
|
|
100
100
|
const content = node_fs_1.default.readFileSync(curFile, 'utf8');
|
|
101
101
|
const find = '[Seat:*]';
|
|
102
102
|
if (content.includes(find)) {
|
|
@@ -108,7 +108,7 @@ class Xdg {
|
|
|
108
108
|
/**
|
|
109
109
|
* SDDM
|
|
110
110
|
*/
|
|
111
|
-
if (
|
|
111
|
+
if (pacman_1.default.packageIsInstalled('sddm')) {
|
|
112
112
|
let sddmChanged = false;
|
|
113
113
|
const curFile = `${chroot}/etc/sddm.conf`;
|
|
114
114
|
if (node_fs_1.default.existsSync(curFile)) {
|
|
@@ -137,7 +137,7 @@ class Xdg {
|
|
|
137
137
|
// sddm.conf don't exists, generate it
|
|
138
138
|
if (!sddmChanged) {
|
|
139
139
|
let session = 'plasma';
|
|
140
|
-
if (
|
|
140
|
+
if (pacman_1.default.isInstalledWayland()) {
|
|
141
141
|
session = 'plasma-wayland';
|
|
142
142
|
}
|
|
143
143
|
const content = `[Autologin]\nUser=${newuser}\nSession=${session}\n`;
|
|
@@ -149,12 +149,12 @@ class Xdg {
|
|
|
149
149
|
* GDM/GDM3
|
|
150
150
|
* in manjaro è /etc/gdm/custom.conf
|
|
151
151
|
*/
|
|
152
|
-
if (
|
|
152
|
+
if (pacman_1.default.packageIsInstalled('gdm') || pacman_1.default.packageIsInstalled('gdm3')) {
|
|
153
153
|
let gdmConf = `${chroot}/etc/gdm3`;
|
|
154
|
-
if (
|
|
154
|
+
if (pacman_1.default.packageIsInstalled('gdm3')) {
|
|
155
155
|
gdmConf = `${chroot}/etc/gdm3`;
|
|
156
156
|
}
|
|
157
|
-
else if (
|
|
157
|
+
else if (pacman_1.default.packageIsInstalled('gdm')) {
|
|
158
158
|
gdmConf = `${chroot}/etc/gdm`;
|
|
159
159
|
}
|
|
160
160
|
if (node_fs_1.default.existsSync(`${gdmConf}/custom.conf`)) {
|
|
@@ -167,7 +167,7 @@ class Xdg {
|
|
|
167
167
|
gdmConf = `}/etc/${gdmConf}/custom.conf`;
|
|
168
168
|
}
|
|
169
169
|
const content = `[daemon]\nAutomaticLoginEnable=true\nAutomaticLogin=${newuser}\n`;
|
|
170
|
-
|
|
170
|
+
utils_1.default.write(gdmConf, content);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -177,51 +177,51 @@ class Xdg {
|
|
|
177
177
|
* @param verbose
|
|
178
178
|
*/
|
|
179
179
|
static async skel(user, verbose = false) {
|
|
180
|
-
const echo =
|
|
180
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
181
181
|
// Remove and create /etc/skel
|
|
182
|
-
await (0,
|
|
183
|
-
await (0,
|
|
182
|
+
await (0, utils_2.exec)('rm /etc/skel -rf', echo);
|
|
183
|
+
await (0, utils_2.exec)('mkdir -p /etc/skel', echo);
|
|
184
184
|
// copy .bash_logout, .bashrc and .profile to /etc/skel
|
|
185
|
-
await (0,
|
|
186
|
-
await (0,
|
|
187
|
-
await (0,
|
|
185
|
+
await (0, utils_2.exec)(`cp /home/${user}/.bash_logout /etc/skel`, echo);
|
|
186
|
+
await (0, utils_2.exec)(`cp /home/${user}/.bashrc /etc/skel`, echo);
|
|
187
|
+
await (0, utils_2.exec)(`cp /home/${user}/.profile /etc/skel`, echo);
|
|
188
188
|
/**
|
|
189
189
|
* copy desktop configuration
|
|
190
190
|
*/
|
|
191
|
-
if (
|
|
191
|
+
if (pacman_1.default.packageIsInstalled('gnome-session')) {
|
|
192
192
|
// we need a more clean solution
|
|
193
193
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
194
194
|
await rsyncIfExist(`/home/${user}/.gtkrc-2.0`, '/etc/skel', verbose);
|
|
195
195
|
}
|
|
196
|
-
else if (
|
|
196
|
+
else if (pacman_1.default.packageIsInstalled('cinnamon-core')) {
|
|
197
197
|
// use .cinnamon NOT cinnamon/
|
|
198
198
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
199
199
|
await rsyncIfExist(`/home/${user}/.cinnamon`, '/etc/skel', verbose);
|
|
200
200
|
}
|
|
201
|
-
else if (
|
|
201
|
+
else if (pacman_1.default.packageIsInstalled('plasma-desktop')) {
|
|
202
202
|
// use .kde NOT .kde/
|
|
203
203
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
204
204
|
await rsyncIfExist(`/home/${user}/.kde`, '/etc/skel', verbose);
|
|
205
205
|
}
|
|
206
|
-
else if (
|
|
206
|
+
else if (pacman_1.default.packageIsInstalled('lxde-core')) {
|
|
207
207
|
// we need a more clean solution
|
|
208
208
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
209
209
|
await rsyncIfExist(`/home/${user}/.gtkrc-2.0`, '/etc/skel', verbose);
|
|
210
210
|
}
|
|
211
|
-
else if (
|
|
211
|
+
else if (pacman_1.default.packageIsInstalled('lxqt-core')) {
|
|
212
212
|
// we need a more clean solution
|
|
213
213
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
214
214
|
await rsyncIfExist(`/home/${user}/.gtkrc-2.0`, '/etc/skel', verbose);
|
|
215
215
|
}
|
|
216
|
-
else if (
|
|
216
|
+
else if (pacman_1.default.packageIsInstalled('mate-session-manager')) {
|
|
217
217
|
// we need a more clean solution
|
|
218
218
|
await rsyncIfExist(`/home/${user}/.config`, '/etc/skel', verbose);
|
|
219
219
|
await rsyncIfExist(`/home/${user}/.gtkrc-2.0`, '/etc/skel', verbose);
|
|
220
220
|
}
|
|
221
|
-
else if (
|
|
221
|
+
else if (pacman_1.default.packageIsInstalled('xfce4-session')) {
|
|
222
222
|
// use .config/xfce4 NOT .config/xfce4/
|
|
223
223
|
await rsyncIfExist(`/home/${user}/.config/xfce4`, '/etc/skel/.config', verbose);
|
|
224
|
-
await (0,
|
|
224
|
+
await (0, utils_2.exec)('mkdir /etc/skel/.local/share -p', echo);
|
|
225
225
|
await rsyncIfExist(`/home/${user}/.local/share/recently-used.xbel`, '/etc/skel/.local/share', verbose);
|
|
226
226
|
}
|
|
227
227
|
/**
|
|
@@ -239,8 +239,8 @@ class Xdg {
|
|
|
239
239
|
await rsyncIfExist(`/home/${user}/.linuxfx`, '/etc/skel', verbose);
|
|
240
240
|
await rsyncIfExist(`/home/${user}/.local`, '/etc/skel', verbose);
|
|
241
241
|
}
|
|
242
|
-
await (0,
|
|
243
|
-
await (0,
|
|
242
|
+
await (0, utils_2.exec)('chown root:root /etc/skel -R', echo);
|
|
243
|
+
await (0, utils_2.exec)('chmod a+rwx,g-w,o-w /etc/skel/ -R', echo);
|
|
244
244
|
await execIfExist('chmod a+rwx,g-w-x,o-wx', '/etc/skel/.bashrc', verbose);
|
|
245
245
|
await execIfExist('chmod a+rwx,g-w-x,o-wx', '/etc/skel/.bash_logout', verbose);
|
|
246
246
|
await execIfExist('chmod a+rwx,g-w-x,o-wx', '/etc/skel/.profile', verbose);
|
|
@@ -257,17 +257,17 @@ exports.default = Xdg;
|
|
|
257
257
|
* @param verbose
|
|
258
258
|
*/
|
|
259
259
|
async function execIfExist(cmd, file, verbose = false) {
|
|
260
|
-
const echo =
|
|
260
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
261
261
|
if (node_fs_1.default.existsSync(file)) {
|
|
262
|
-
await (0,
|
|
262
|
+
await (0, utils_2.exec)(`${cmd} ${file}`, echo);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
*
|
|
267
267
|
*/
|
|
268
268
|
async function rsyncIfExist(source, dest = '/etc/skel/', verbose = false) {
|
|
269
|
-
const echo =
|
|
269
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
270
270
|
if (node_fs_1.default.existsSync(source)) {
|
|
271
|
-
await (0,
|
|
271
|
+
await (0, utils_2.exec)(`rsync -avx ${source} ${dest}`, echo);
|
|
272
272
|
}
|
|
273
273
|
}
|
package/dist/classes/yolk.js
CHANGED
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
* license: MIT
|
|
11
11
|
*/
|
|
12
12
|
const fs_1 = __importDefault(require("fs"));
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
13
|
+
const utils_1 = __importDefault(require("./utils"));
|
|
14
|
+
const pacman_1 = __importDefault(require("./pacman"));
|
|
15
|
+
const bleach_1 = __importDefault(require("./bleach"));
|
|
16
|
+
const utils_2 = require("../lib/utils");
|
|
17
17
|
const shelljs_1 = __importDefault(require("shelljs"));
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
@@ -29,23 +29,23 @@ class Yolk {
|
|
|
29
29
|
*/
|
|
30
30
|
async create(verbose = false) {
|
|
31
31
|
this.verbose = verbose;
|
|
32
|
-
this.echo =
|
|
33
|
-
|
|
34
|
-
if (!
|
|
32
|
+
this.echo = utils_1.default.setEcho(verbose);
|
|
33
|
+
utils_1.default.warning('updating system...');
|
|
34
|
+
if (!pacman_1.default.commandIsInstalled('dpkg-scanpackages')) {
|
|
35
35
|
process.exit(0);
|
|
36
36
|
}
|
|
37
37
|
let cmd = '';
|
|
38
38
|
try {
|
|
39
39
|
cmd = 'apt-get update --yes';
|
|
40
|
-
await (0,
|
|
40
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
41
41
|
}
|
|
42
42
|
catch (error) {
|
|
43
43
|
console.log(error);
|
|
44
|
-
await
|
|
44
|
+
await utils_1.default.pressKeyToExit(cmd);
|
|
45
45
|
}
|
|
46
46
|
if (!this.yolkExists()) {
|
|
47
|
-
await (0,
|
|
48
|
-
await (0,
|
|
47
|
+
await (0, utils_2.exec)(`mkdir ${this.yolkDir} -p`, this.echo);
|
|
48
|
+
await (0, utils_2.exec)(`chown _apt:root ${this.yolkDir} -R`, this.echo);
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
51
|
await this.yolkClean();
|
|
@@ -53,37 +53,37 @@ class Yolk {
|
|
|
53
53
|
// packages we need
|
|
54
54
|
const packages = ['cryptsetup', 'keyutils', 'shim-signed']; // addes shim-signed
|
|
55
55
|
// grub-pc just for amd64 or i386
|
|
56
|
-
if (
|
|
56
|
+
if (utils_1.default.machineArch() === 'amd64' || utils_1.default.machineArch() === 'i386') {
|
|
57
57
|
packages.push('grub-pc');
|
|
58
58
|
}
|
|
59
59
|
// if not i386
|
|
60
|
-
if (
|
|
60
|
+
if (utils_1.default.machineArch() !== 'i386') {
|
|
61
61
|
// add grub-efi-amd64
|
|
62
|
-
packages.push('grub-efi-' +
|
|
62
|
+
packages.push('grub-efi-' + utils_1.default.machineArch());
|
|
63
63
|
// add grub-efi-amd64-bin
|
|
64
|
-
packages.push('grub-efi-' +
|
|
64
|
+
packages.push('grub-efi-' + utils_1.default.machineArch() + '-bin');
|
|
65
65
|
}
|
|
66
66
|
// chdir on yolkDir
|
|
67
67
|
process.chdir(this.yolkDir);
|
|
68
68
|
// for all packages, find dependencies and check if are not installed
|
|
69
69
|
for (const package_ of packages) {
|
|
70
|
-
|
|
70
|
+
utils_1.default.warning(`downloading package ${package_} and it's dependencies...`);
|
|
71
71
|
cmd = `apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances ${package_} | grep "^\\w" | sort -u`;
|
|
72
|
-
const depends = (await (0,
|
|
72
|
+
const depends = (await (0, utils_2.exec)(cmd, { echo: false, capture: true })).data;
|
|
73
73
|
await this.installDeps(depends.split('\n'));
|
|
74
74
|
}
|
|
75
75
|
// create Package.gz
|
|
76
76
|
cmd = 'dpkg-scanpackages -h md5,sha1,sha256 . | gzip -c > Packages.gz';
|
|
77
|
-
|
|
78
|
-
await (0,
|
|
77
|
+
utils_1.default.warning(cmd);
|
|
78
|
+
await (0, utils_2.exec)(cmd, { echo: false, capture: true });
|
|
79
79
|
// Create Release date: Sat, 14 Aug 2021 07:42:00 UTC
|
|
80
80
|
const now = shelljs_1.default.exec('date -R -u').stdout.trim();
|
|
81
|
-
const content = `Archive: stable\nComponent: yolk\nOrigin: penguins-eggs\nArchitecture: ${
|
|
82
|
-
|
|
81
|
+
const content = `Archive: stable\nComponent: yolk\nOrigin: penguins-eggs\nArchitecture: ${utils_1.default.machineArch()} \nDate: ${now}\n`;
|
|
82
|
+
utils_1.default.warning('Writing Release');
|
|
83
83
|
fs_1.default.writeFileSync('Release', content);
|
|
84
84
|
// Cleaning
|
|
85
|
-
|
|
86
|
-
const bleach = new
|
|
85
|
+
utils_1.default.warning('Cleaning apt cache');
|
|
86
|
+
const bleach = new bleach_1.default();
|
|
87
87
|
await bleach.clean(verbose);
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
@@ -95,7 +95,7 @@ class Yolk {
|
|
|
95
95
|
// select for downloads only packages NOT already installed
|
|
96
96
|
const toDownloads = [];
|
|
97
97
|
for (const depend of depends) {
|
|
98
|
-
if (depend !== '' && !
|
|
98
|
+
if (depend !== '' && !pacman_1.default.packageIsInstalled(depend)) {
|
|
99
99
|
toDownloads.push(depend);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -103,8 +103,8 @@ class Yolk {
|
|
|
103
103
|
for (const toDownload of toDownloads) {
|
|
104
104
|
process.chdir(this.yolkDir);
|
|
105
105
|
const cmd = `apt-get download ${toDownload}`;
|
|
106
|
-
|
|
107
|
-
await (0,
|
|
106
|
+
utils_1.default.warning(`- ${cmd}`);
|
|
107
|
+
await (0, utils_2.exec)(cmd, this.echo);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
@@ -118,7 +118,7 @@ class Yolk {
|
|
|
118
118
|
* Svuota la repo yolk
|
|
119
119
|
*/
|
|
120
120
|
async yolkClean() {
|
|
121
|
-
await (0,
|
|
121
|
+
await (0, utils_2.exec)(`rm ${this.yolkDir}/*`, this.echo);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
exports.default = Yolk;
|
package/dist/commands/adapt.js
CHANGED
|
@@ -3,9 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/**
|
|
7
|
+
* penguins-eggs: adapt
|
|
8
|
+
* author: Piero Proietti
|
|
9
|
+
* email: piero.proietti@gmail.com
|
|
10
|
+
* license: MIT
|
|
11
|
+
*/
|
|
6
12
|
const core_1 = require("@oclif/core");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
13
|
+
const utils_1 = __importDefault(require("../classes/utils"));
|
|
14
|
+
const utils_2 = require("../lib/utils");
|
|
9
15
|
class Adapt extends core_1.Command {
|
|
10
16
|
async run() {
|
|
11
17
|
const { args, flags } = await this.parse(Adapt);
|
|
@@ -13,14 +19,14 @@ class Adapt extends core_1.Command {
|
|
|
13
19
|
if (flags.verbose) {
|
|
14
20
|
verbose = true;
|
|
15
21
|
}
|
|
16
|
-
const echo =
|
|
22
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
17
23
|
// const {args, flags} = this.parse(Adjust)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
await (0,
|
|
21
|
-
await (0,
|
|
22
|
-
await (0,
|
|
23
|
-
await (0,
|
|
24
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
25
|
+
utils_1.default.warning('Adapt monitor resolutions to the size of window in virtual machines');
|
|
26
|
+
await (0, utils_2.exec)('xrandr --output Virtual-0 --auto', echo);
|
|
27
|
+
await (0, utils_2.exec)('xrandr --output Virtual-1 --auto', echo);
|
|
28
|
+
await (0, utils_2.exec)('xrandr --output Virtual-2 --auto', echo);
|
|
29
|
+
await (0, utils_2.exec)('xrandr --output Virtual-3 --auto', echo);
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
32
|
exports.default = Adapt;
|
package/dist/commands/analyze.js
CHANGED
|
@@ -4,17 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
/**
|
|
7
|
-
* penguins-eggs
|
|
7
|
+
* penguins-eggs: analyze
|
|
8
8
|
* author: Piero Proietti
|
|
9
9
|
* email: piero.proietti@gmail.com
|
|
10
10
|
* license: MIT
|
|
11
11
|
*/
|
|
12
12
|
const core_1 = require("@oclif/core");
|
|
13
13
|
const fs_1 = __importDefault(require("fs"));
|
|
14
|
-
const
|
|
14
|
+
const utils_1 = __importDefault(require("../classes/utils"));
|
|
15
15
|
const promises_1 = require("fs/promises");
|
|
16
16
|
const fs_2 = require("fs");
|
|
17
|
-
const
|
|
17
|
+
const users_1 = __importDefault(require("../classes/users"));
|
|
18
18
|
const systeminformation_1 = __importDefault(require("systeminformation"));
|
|
19
19
|
class Analyze extends core_1.Command {
|
|
20
20
|
constructor() {
|
|
@@ -24,15 +24,15 @@ class Analyze extends core_1.Command {
|
|
|
24
24
|
this.work_dir = {};
|
|
25
25
|
}
|
|
26
26
|
async run() {
|
|
27
|
-
|
|
27
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
28
28
|
const { flags } = await this.parse(Analyze);
|
|
29
29
|
let verbose = false;
|
|
30
30
|
if (flags.verbose) {
|
|
31
31
|
verbose = true;
|
|
32
32
|
}
|
|
33
|
-
const echo =
|
|
33
|
+
const echo = utils_1.default.setEcho(verbose);
|
|
34
34
|
let totalSize = 0;
|
|
35
|
-
if (
|
|
35
|
+
if (utils_1.default.isRoot(this.id)) {
|
|
36
36
|
const audio = await systeminformation_1.default.audio();
|
|
37
37
|
const bios = await systeminformation_1.default.bios();
|
|
38
38
|
const blockDevices = await systeminformation_1.default.blockDevices();
|
|
@@ -63,18 +63,18 @@ class Analyze extends core_1.Command {
|
|
|
63
63
|
* MacOS: "/Users"
|
|
64
64
|
* Linux: "/home"
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
utils_1.default.warning('eggs will analyze your system, to get users and servers data');
|
|
67
67
|
const users = await this.fill();
|
|
68
68
|
for (let i = 0; i < users.length; i++)
|
|
69
69
|
if (users[i].saveIt) {
|
|
70
|
-
console.log(`user: ${users[i].login} \thome: ${users[i].home.padEnd(16)} \tsize: ${
|
|
70
|
+
console.log(`user: ${users[i].login} \thome: ${users[i].home.padEnd(16)} \tsize: ${utils_1.default.formatBytes(users[i].size)} \tBytes: ${users[i].size} `);
|
|
71
71
|
// console.log(`user: ${users[i].login} \thome: ${users[i].home} \tsize: ${users[i].size}`)
|
|
72
72
|
totalSize += users[i].size;
|
|
73
73
|
}
|
|
74
|
-
console.log(`Total\t\t\t\t\tSize: ${
|
|
74
|
+
console.log(`Total\t\t\t\t\tSize: ${utils_1.default.formatBytes(totalSize)} \tBytes: ${totalSize}`);
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
|
|
77
|
+
utils_1.default.useRoot(this.id);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
@@ -87,7 +87,7 @@ class Analyze extends core_1.Command {
|
|
|
87
87
|
const passwd = fs_1.default.readFileSync('/etc/passwd', 'utf-8').split('\n');
|
|
88
88
|
for (const element of passwd) {
|
|
89
89
|
const line = element.split(':');
|
|
90
|
-
const users = new
|
|
90
|
+
const users = new users_1.default(line[0], line[1], line[2], line[3], line[4], line[5], line[6]);
|
|
91
91
|
await users.getValues();
|
|
92
92
|
if (users.password !== undefined) {
|
|
93
93
|
usersArray.push(users);
|
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
* license: MIT
|
|
11
11
|
*/
|
|
12
12
|
const core_1 = require("@oclif/core");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
13
|
+
const utils_1 = __importDefault(require("../classes/utils"));
|
|
14
|
+
const settings_1 = __importDefault(require("../classes/settings"));
|
|
15
|
+
const incubator_1 = __importDefault(require("../classes/incubation/incubator"));
|
|
16
|
+
const pacman_1 = __importDefault(require("../classes/pacman"));
|
|
17
17
|
class Calamares extends core_1.Command {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
@@ -22,8 +22,8 @@ class Calamares extends core_1.Command {
|
|
|
22
22
|
this.settings = {};
|
|
23
23
|
}
|
|
24
24
|
async run() {
|
|
25
|
-
|
|
26
|
-
this.settings = new
|
|
25
|
+
utils_1.default.titles(this.id + ' ' + this.argv);
|
|
26
|
+
this.settings = new settings_1.default();
|
|
27
27
|
const { flags } = await this.parse(Calamares);
|
|
28
28
|
let verbose = false;
|
|
29
29
|
if (flags.verbose) {
|
|
@@ -47,33 +47,33 @@ class Calamares extends core_1.Command {
|
|
|
47
47
|
}
|
|
48
48
|
const nointeractive = flags.nointeractive;
|
|
49
49
|
console.log(`theme: ${theme}`);
|
|
50
|
-
if (
|
|
50
|
+
if (utils_1.default.isRoot(this.id)) {
|
|
51
51
|
let installer = 'krill';
|
|
52
|
-
if (
|
|
52
|
+
if (pacman_1.default.isInstalledGui()) {
|
|
53
53
|
installer = 'calamares';
|
|
54
54
|
}
|
|
55
55
|
if (installer === 'calamares') {
|
|
56
56
|
if (!remove) {
|
|
57
|
-
if (!nointeractive || await
|
|
57
|
+
if (!nointeractive || await utils_1.default.customConfirm('Select yes to continue...')) {
|
|
58
58
|
/**
|
|
59
59
|
* Install calamares
|
|
60
60
|
*/
|
|
61
61
|
if (install) {
|
|
62
|
-
|
|
63
|
-
await
|
|
62
|
+
utils_1.default.warning('Installing calamares...');
|
|
63
|
+
await pacman_1.default.calamaresInstall();
|
|
64
64
|
if (await this.settings.load()) {
|
|
65
65
|
this.settings.config.force_installer = true;
|
|
66
66
|
this.settings.save(this.settings.config);
|
|
67
|
-
await
|
|
67
|
+
await pacman_1.default.calamaresPolicies();
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Configure calamares
|
|
72
72
|
*/
|
|
73
73
|
if (await this.settings.load()) {
|
|
74
|
-
|
|
74
|
+
utils_1.default.warning('Configuring installer');
|
|
75
75
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
76
|
-
this.incubator = new
|
|
76
|
+
this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, theme, verbose);
|
|
77
77
|
await this.incubator.config(release);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -82,8 +82,8 @@ class Calamares extends core_1.Command {
|
|
|
82
82
|
/**
|
|
83
83
|
* Remove calamares
|
|
84
84
|
*/
|
|
85
|
-
if (await
|
|
86
|
-
await
|
|
85
|
+
if (await pacman_1.default.calamaresCheck()) {
|
|
86
|
+
await pacman_1.default.calamaresRemove();
|
|
87
87
|
if (await this.settings.load()) {
|
|
88
88
|
this.settings.config.force_installer = false;
|
|
89
89
|
this.settings.save(this.settings.config);
|
|
@@ -91,10 +91,10 @@ class Calamares extends core_1.Command {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
else if ((await
|
|
95
|
-
|
|
94
|
+
else if ((await utils_1.default.customConfirm('Select yes to continue...')) && (await this.settings.load())) {
|
|
95
|
+
utils_1.default.warning('Configuring krill');
|
|
96
96
|
await this.settings.loadRemix(this.settings.config.snapshot_basename, theme);
|
|
97
|
-
this.incubator = new
|
|
97
|
+
this.incubator = new incubator_1.default(this.settings.remix, this.settings.distro, this.settings.config.user_opt, theme, verbose);
|
|
98
98
|
console.log('calamares relase: ' + release);
|
|
99
99
|
await this.incubator.config(release);
|
|
100
100
|
}
|