penguins-eggs 10.0.60 → 10.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/.oclif.manifest.json +62 -1
  2. package/README.md +145 -75
  3. package/addons/eggs/theme/calamares/modules/{_users.yml → users.yml} +3 -3
  4. package/addons/eggs/theme/livecd/grub.main.full.cfg +1 -1
  5. package/addons/eggs/theme/livecd/grub.main.simple.cfg +1 -1
  6. package/conf/derivatives.yaml +4 -3
  7. package/conf/derivatives_fedora.yaml +6 -0
  8. package/conf/distros/alpine/calamares/modules/users.yml +3 -3
  9. package/conf/distros/bionic/calamares/calamares-modules/grubcfg/grubcfg.yml +1 -1
  10. package/conf/distros/bionic/calamares/modules/users.yml +3 -3
  11. package/conf/distros/buster/calamares/modules/users.yml +4 -3
  12. package/conf/distros/fedora/calamares/modules/users.yml +3 -3
  13. package/conf/distros/noble/calamares/modules/focal-jammy/users.yml +3 -3
  14. package/conf/distros/noble/calamares/modules/users.yml +1 -0
  15. package/conf/distros/opensuse/calamares/modules/users.yml +3 -3
  16. package/conf/distros/rolling/calamares/modules/users.yml +3 -3
  17. package/conf/eggs.yaml +1 -1
  18. package/conf/love.yaml +4 -4
  19. package/dist/classes/compressors.js +1 -1
  20. package/dist/classes/distro.d.ts +27 -3
  21. package/dist/classes/distro.js +361 -289
  22. package/dist/classes/ovary.d/bind-live-fs.js +22 -30
  23. package/dist/classes/ovary.d/edit-live-fs.d.ts +1 -0
  24. package/dist/classes/ovary.d/edit-live-fs.js +9 -13
  25. package/dist/classes/ovary.d/fertilization.js +6 -1
  26. package/dist/classes/ovary.d/initrd.js +11 -15
  27. package/dist/classes/ovary.d/kernel-copy.js +2 -16
  28. package/dist/classes/ovary.d/make-efi.js +8 -5
  29. package/dist/classes/ovary.d/make-squashfs.d.ts +1 -1
  30. package/dist/classes/ovary.d/make-squashfs.js +17 -24
  31. package/dist/classes/ovary.d/merged.d.ts +9 -13
  32. package/dist/classes/ovary.d/merged.js +38 -48
  33. package/dist/classes/ovary.d/produce.d.ts +1 -1
  34. package/dist/classes/ovary.d/produce.js +38 -32
  35. package/dist/classes/ovary.d/syslinux.js +4 -4
  36. package/dist/classes/ovary.d/user-create-live.js +12 -5
  37. package/dist/classes/ovary.d.ts +8 -3
  38. package/dist/classes/ovary.js +8 -3
  39. package/dist/classes/pacman.d/archlinux.js +1 -5
  40. package/dist/classes/pacman.js +2 -1
  41. package/dist/classes/systemctl.d.ts +1 -1
  42. package/dist/classes/systemctl.js +1 -1
  43. package/dist/classes/tailor.js +2 -1
  44. package/dist/classes/utils.d/architecture.d.ts +41 -0
  45. package/dist/classes/utils.d/architecture.js +87 -0
  46. package/dist/classes/utils.d/console-output.d.ts +26 -0
  47. package/dist/classes/utils.d/console-output.js +46 -0
  48. package/dist/classes/utils.d/filesystem.d.ts +53 -0
  49. package/dist/classes/utils.d/filesystem.js +152 -0
  50. package/dist/classes/utils.d/formatters.d.ts +32 -0
  51. package/dist/classes/utils.d/formatters.js +64 -0
  52. package/dist/classes/utils.d/kernel.d.ts +83 -0
  53. package/dist/classes/utils.d/kernel.js +288 -0
  54. package/dist/classes/utils.d/network.d.ts +43 -0
  55. package/dist/classes/utils.d/network.js +133 -0
  56. package/dist/classes/utils.d/package-info.d.ts +55 -0
  57. package/dist/classes/utils.d/package-info.js +137 -0
  58. package/dist/classes/utils.d/snapshot.d.ts +44 -0
  59. package/dist/classes/utils.d/snapshot.js +102 -0
  60. package/dist/classes/utils.d/system.d.ts +63 -0
  61. package/dist/classes/utils.d/system.js +200 -0
  62. package/dist/classes/utils.d/user-interaction.d.ts +39 -0
  63. package/dist/classes/utils.d/user-interaction.js +104 -0
  64. package/dist/classes/utils.d.ts +90 -322
  65. package/dist/classes/utils.js +105 -1013
  66. package/dist/commands/dad.d.ts +1 -0
  67. package/dist/commands/dad.js +1 -0
  68. package/dist/commands/export/pkg.js +6 -6
  69. package/dist/commands/export/tarballs.js +11 -16
  70. package/dist/commands/kill.js +1 -1
  71. package/dist/commands/love.d.ts +1 -0
  72. package/dist/commands/love.js +21 -7
  73. package/dist/commands/pods.d.ts +22 -0
  74. package/dist/commands/pods.js +92 -0
  75. package/dist/commands/produce.d.ts +1 -0
  76. package/dist/commands/produce.js +21 -1
  77. package/dist/commands/update.js +2 -2
  78. package/dist/index.d.ts +6 -52
  79. package/dist/index.js +6 -145
  80. package/dist/krill/classes/krill_enums.d.ts +14 -1
  81. package/dist/krill/classes/krill_enums.js +16 -1
  82. package/dist/krill/classes/prepare.d/partitions.js +3 -3
  83. package/dist/krill/classes/prepare.d.ts +46 -21
  84. package/dist/krill/classes/prepare.js +187 -187
  85. package/dist/krill/classes/sequence.d/add_user.js +21 -3
  86. package/dist/krill/classes/sequence.d/partition.js +2 -2
  87. package/dist/krill/classes/sequence.d.ts +18 -21
  88. package/dist/krill/classes/sequence.js +156 -423
  89. package/dist/krill/components/information.js +13 -7
  90. package/dist/{krill/lib → lib}/kill_me_softly.js +2 -2
  91. package/dist/penguins-eggs_10.1.1-0_amd64.deb +0 -0
  92. package/dist/penguins-eggs_10.1.1-0_amd64.deb.sha256 +1 -0
  93. package/package.json +32 -27
  94. package/perrisbrewery/scripts/postinst +98 -0
  95. package/perrisbrewery/scripts/postrm +82 -0
  96. package/perrisbrewery/scripts/preinst +40 -0
  97. package/perrisbrewery/scripts/prerm +47 -0
  98. package/perrisbrewery/template/control.template +17 -0
  99. package/perrisbrewery/template/dependencies-bionic.yaml +33 -0
  100. package/perrisbrewery/template/dependencies.yaml +37 -0
  101. package/perrisbrewery/template/man.template.md +110 -0
  102. package/pods/README.md +14 -0
  103. package/pods/almalinux.sh +10 -0
  104. package/pods/archlinux.sh +10 -0
  105. package/pods/ci/README.md +5 -0
  106. package/pods/ci/kernel-overlay-install.sh +114 -0
  107. package/pods/ci/minimal/almalinux-container2host.sh +165 -0
  108. package/pods/ci/minimal/archlinux-container2host.sh +125 -0
  109. package/pods/ci/minimal/debian-container2host.sh +173 -0
  110. package/pods/ci/minimal/fedora-container2host.sh +170 -0
  111. package/pods/ci/minimal/manjaro-container2host.sh +123 -0
  112. package/pods/ci/minimal/opensuse-container2host.sh +143 -0
  113. package/pods/ci/penguins-eggs-execute.sh +22 -0
  114. package/pods/ci/penguins-eggs-install.sh +115 -0
  115. package/pods/ci/run +34 -0
  116. package/pods/ci/run-on-almalinux.sh +50 -0
  117. package/pods/ci/run-on-archlinux.sh +64 -0
  118. package/pods/ci/run-on-debian.sh +51 -0
  119. package/pods/ci/run-on-devuan.sh +48 -0
  120. package/pods/ci/run-on-fedora.sh +51 -0
  121. package/pods/ci/run-on-manjaro.sh +61 -0
  122. package/pods/ci/run-on-opensuse.sh +58 -0
  123. package/pods/ci/run-on-rockylinux.sh +51 -0
  124. package/pods/ci/run-on-ubuntu.sh +52 -0
  125. package/pods/debian.sh +23 -0
  126. package/pods/devuan.sh +26 -0
  127. package/pods/fedora.sh +12 -0
  128. package/pods/lmde.sh +22 -0
  129. package/pods/manjaro.sh +10 -0
  130. package/pods/opensuse.sh +12 -0
  131. package/pods/podman.command.sh +85 -0
  132. package/pods/rocky.sh +12 -0
  133. package/pods/run-build-packages-debs.sh +45 -0
  134. package/pods/run-create-debs.sh +23 -0
  135. package/pods/ubuntu.sh +24 -0
  136. package/scripts/_eggs +14 -5
  137. package/scripts/eggs.bash +5 -4
  138. /package/dist/{krill/lib → lib}/kill_me_softly.d.ts +0 -0
@@ -1,327 +1,95 @@
1
1
  /**
2
- * ./src/classes/utils.tsx
3
- * penguins-eggs v.10.0.0 / ecmascript 2020
4
- * author: Piero Proietti
5
- * email: piero.proietti@gmail.com
6
- * license: MIT
7
- */
8
- import IOsRelease from '../interfaces/i-os-release.js';
2
+ * ./src/classes/utils.ts
3
+ * penguins-eggs v.10.0.0 / ecmascript 2020
4
+ * author: Piero Proietti
5
+ * email: piero.proietti@gmail.com
6
+ * license: MIT
7
+ *
8
+ * Refactored Utils class - imports from modular utilities
9
+ */
10
+ import System from './utils.d/system.js';
11
+ import PackageInfo from './utils.d/package-info.js';
12
+ import Network from './utils.d/network.js';
13
+ import Filesystem from './utils.d/filesystem.js';
14
+ import Snapshot from './utils.d/snapshot.js';
15
+ import Architecture from './utils.d/architecture.js';
16
+ import UserInteraction from './utils.d/user-interaction.js';
17
+ import ConsoleOutput from './utils.d/console-output.js';
18
+ import Formatters from './utils.d/formatters.js';
19
+ import Kernel from './utils.d/kernel.js';
9
20
  /**
10
- * Utils: general porpourse utils
11
- * @remarks all the utilities
21
+ * Utils: general purpose utils
22
+ * @remarks all the utilities - refactored into modular structure
12
23
  */
13
24
  export default class Utils {
14
- /**
15
- * Custom function to sort object keys
16
- * @param obj
17
- * @returns
18
- */
19
- static sortObjectKeys(obj: {
20
- [key: string]: any;
21
- }): {
22
- [key: string]: any;
23
- };
24
- /**
25
- *
26
- * @param file
27
- * @param search
28
- * @returns value
29
- */
30
- static searchOnFile(file?: string, search?: string): string;
31
- /**
32
- * Restituisce il prefisso della iso
33
- * @param distroId
34
- * @param codenameId
35
- */
36
- static snapshotPrefix(distroId: string, codenameId: string): string;
37
- /**
38
- * isSystemd
39
- */
40
- static isSystemd(): boolean;
41
- /**
42
- * isSysvinit
43
- */
44
- static isSysvinit(): boolean;
45
- /**
46
- * isOpenRc
47
- */
48
- static isOpenRc(): boolean;
49
- /**
50
- * ricava path per vmlinuz
51
- * Normalmente cerca BOOT_IMAGE
52
- * BOOT_IMAGE=/boot/vmlinuz-5.16.0-3-amd64 root=UUID=13768873-d6ba-4ae5-9e14-b5011f5aa31c ro quiet splash resume=UUID=beafb9b4-c429-4e1f-a268-4270b63a14e6
53
- * se non è presente, come nel caso di Franco, cerca initrd e ricostruisce vmlinuz
54
- * ro root=UUID=3dc0f202-8ac8-4686-9316-dddcec060c48 initrd=boot\initrd.img-5.15.0-0.bpo.3-amd64 // Conidi
55
- */
56
- static vmlinuz(): string;
57
- /**
58
- * ricava path per initrdImg
59
- */
60
- static initrdImg(): string;
61
- /**
62
- * Occore vedere un modo per creare machine-id dove non esiste
63
- */
64
- static machineId(): string;
65
- /**
66
- *
67
- * @param msg
68
- */
69
- static warning(msg?: string): void;
70
- static error(msg?: string): void;
71
- /**
72
- * Return the primary user's name
73
- */
74
- static getPrimaryUser(): Promise<string>;
75
- /**
76
- * restituisce uuid
77
- * @param device
78
- */
79
- static uuid(device: string): string;
80
- /**
81
- *
82
- * @param device
83
- * @returns
84
- */
85
- static uuidGen(): string;
86
- /**
87
- *
88
- * @param date
89
- */
90
- static formatDate(date: Date): string;
91
- /**
92
- * return the name of the package: penguins-eggs
93
- * @returns penguins-eggs
94
- */
95
- static getPackageName(): string;
96
- /**
97
- * Count the eggs present in the nest
98
- * @returns {number} Numero degli snapshot presenti
99
- */
100
- static getSnapshotCount(snapshot_dir?: string): number;
101
- /**
102
- * Get the syze of the snapshot
103
- * @returns {string} grandezza dello snapshot in Byte
104
- */
105
- static getSnapshotSize(snapshot_dir?: string): number;
106
- /**
107
- * uefiArch
108
- * @returns arch
109
- */
110
- static uefiArch(): string;
111
- /**
112
- * i386-pc,
113
- * i386-efi,
114
- * x86_64-efi,
115
- * arm64-efi,
116
- *
117
- * ATTEMZIONE: install efibootmgr
118
- *
119
- * Fedora/RHEL have i386-pc
120
- */
121
- static uefiFormat(): string;
122
- /**
123
- *
124
- * @returns
125
- */
126
- static usrLibPath(): string;
127
- /**
128
- *
129
- * @param prefix
130
- * @param backup
131
- * @returns
132
- */
133
- static getPrefix(prefix: string, backup?: boolean): string;
134
- /**
135
- *
136
- * @param volid
137
- */
138
- static getVolid(volid?: string): string;
139
- /**
140
- * Return postfix
141
- * @param basename
142
- * @returns eggName
143
- */
144
- static getPostfix(): string;
145
- /**
146
- * Calculate the space used on the disk
147
- * @return {void}
148
- */
149
- static getUsedSpace(): number;
150
- /**
151
- * Extimate the linuxfs dimension
152
- * probably is better to rename it as
153
- * getLiveSpaceRootNeed
154
- * @returns {number} Byte
155
- */
156
- static getLiveRootSpace(type?: string): number;
157
- /**
158
- * Return true if i686 architecture
159
- * @remarks to move in Utils
160
- * @returns {boolean} true se l'architettura è i686
161
- */
162
- static isi686(): boolean;
163
- /**
164
- * Controlla se è un pacchetto deb
165
- * /usr/lib/penguins-eggs/bin/node
166
- */
167
- static isDebPackage(): boolean;
168
- /**
169
- * Controlla se è un pacchetto sorgente
170
- */
171
- static isSources(): boolean;
172
- /**
173
- * Controlla se è un pacchetto npm
174
- */
175
- static isNpmPackage(): boolean;
176
- /**
177
- *
178
- */
179
- static rootPenguin(): string;
180
- /**
181
- * return the short name of the package: eggs
182
- * @returns eggs
183
- */
184
- static getFriendName(): string;
185
- /**
186
- * return the version of the package
187
- * @returns version example 8.0.0
188
- */
189
- static getPackageVersion(): string;
190
- /**
191
- * Get author name
192
- */
193
- static getAuthorName(): string;
194
- /**
195
- * Return the Debian version
196
- * @returns {number} Versione di Debian
197
- */
198
- static getDebianVersion(): number;
199
- /**
200
- * Return true if live system
201
- * @returns {boolean} isLive
202
- */
203
- static isLive(): boolean;
204
- /**
205
- * Ritorna vero se path è un mountpoint
206
- * @param path
207
- */
208
- static isMountpoint(path?: string): boolean;
209
- /**
210
- *
211
- * @param device
212
- * @returns
213
- */
214
- static isBlockDevice(device?: string): boolean;
215
- /**
216
- * return true if eggs run as root
217
- * @returns isRoot
218
- */
219
- static isRoot(command?: string): boolean;
220
- /**
221
- *
222
- * @param command
223
- */
224
- static useRoot(command?: string): void;
225
- /**
226
- * get the kernel version
227
- */
228
- static kernelVersion(): string;
229
- /**
230
- * return the name of network device
231
- */
232
- static iface(): Promise<string>;
233
- /**
234
- * address
235
- */
236
- static address(): string;
237
- /**
238
- * netmask
239
- */
240
- static netmask(): string;
241
- /**
242
- * cidr
243
- */
244
- static cidr(): string;
245
- /**
246
- *
247
- * broadcast
248
- */
249
- static broadcast(): string;
250
- /**
251
- * dns
252
- */
253
- static getDns(): string[];
254
- /**
255
- * getDomain
256
- */
257
- static getDomain(): string;
258
- /**
259
- * @returns gateway
260
- */
261
- static gateway(): string;
262
- /**
263
- * write a file
264
- * @param file
265
- * @param text
266
- */
267
- static write(file: string, text: string): void;
268
- /**
269
- *
270
- * @param file
271
- * @param cmd
272
- */
273
- static writeX(file: string, cmd: string): void;
274
- /**
275
- *
276
- * @param file
277
- * @param cmd
278
- */
279
- static writeXs(file: string, cmds: string[]): void;
280
- /**
281
- *
282
- * @param msg
283
- */
284
- static customConfirm(msg?: string): Promise<boolean>;
285
- /**
286
- *
287
- * @param msg
288
- */
289
- static customConfirmCompanion(msg?: string): Promise<any>;
290
- /**
291
- *
292
- * @param msg
293
- */
294
- static customConfirmAbort(msg?: string): Promise<any>;
295
- /**
296
- *
297
- */
298
- static pressKeyToExit(warming?: string, procContinue?: boolean): Promise<void>;
299
- /**
300
- * titles
301
- * Penguin's are gettings alive!
302
- */
303
- static titles(command?: string): void;
304
- /**
305
- *
306
- * @returns flag
307
- */
308
- static flag(): string;
309
- /**
310
- *
311
- * @param verbose
312
- */
313
- static setEcho(verbose?: boolean): object;
314
- /**
315
- *
316
- * @param bytes
317
- * @param decimals
318
- * @returns
319
- */
320
- static formatBytes(bytes: number, decimals?: number): string;
321
- /**
322
- *
323
- * @returns wardrobe
324
- */
325
- static wardrobe(): Promise<string>;
326
- static getOsRelease(): IOsRelease;
25
+ static isContainer: typeof System.isContainer;
26
+ static isSystemd: typeof System.isSystemd;
27
+ static isSysvinit: typeof System.isSysvinit;
28
+ static isOpenRc: typeof System.isOpenRc;
29
+ static isLive: typeof System.isLive;
30
+ static isMountpoint: typeof System.isMountpoint;
31
+ static isBlockDevice: typeof System.isBlockDevice;
32
+ static isRoot: typeof System.isRoot;
33
+ static machineId: typeof System.machineId;
34
+ static getDebianVersion: typeof System.getDebianVersion;
35
+ static getLiveRootSpace: typeof System.getLiveRootSpace;
36
+ static getPackageName: typeof PackageInfo.getPackageName;
37
+ static getFriendName: typeof PackageInfo.getFriendName;
38
+ static getPackageVersion: typeof PackageInfo.getPackageVersion;
39
+ static getAuthorName: typeof PackageInfo.getAuthorName;
40
+ static isPackage: typeof PackageInfo.isPackage;
41
+ static isSources: typeof PackageInfo.isSources;
42
+ static isNpmPackage: typeof PackageInfo.isNpmPackage;
43
+ static rootPenguin: typeof PackageInfo.rootPenguin;
44
+ static wardrobe: typeof PackageInfo.wardrobe;
45
+ static getPrimaryUser: typeof PackageInfo.getPrimaryUser;
46
+ static iface: typeof Network.iface;
47
+ static address: typeof Network.address;
48
+ static netmask: typeof Network.netmask;
49
+ static cidr: typeof Network.cidr;
50
+ static broadcast: typeof Network.broadcast;
51
+ static getDns: typeof Network.getDns;
52
+ static getDomain: typeof Network.getDomain;
53
+ static gateway: typeof Network.gateway;
54
+ static searchOnFile: typeof Filesystem.searchOnFile;
55
+ static uuid: typeof Filesystem.uuid;
56
+ static uuidGen: typeof Filesystem.uuidGen;
57
+ static getUsedSpace: typeof Filesystem.getUsedSpace;
58
+ static write: typeof Filesystem.write;
59
+ static writeX: typeof Filesystem.writeX;
60
+ static writeXs: typeof Filesystem.writeXs;
61
+ static getOsRelease: typeof Filesystem.getOsRelease;
62
+ static snapshotPrefix: typeof Snapshot.snapshotPrefix;
63
+ static getSnapshotCount: typeof Snapshot.getSnapshotCount;
64
+ static getSnapshotSize: typeof Snapshot.getSnapshotSize;
65
+ static getPrefix: typeof Snapshot.getPrefix;
66
+ static getVolid: typeof Snapshot.getVolid;
67
+ static getPostfix: typeof Snapshot.getPostfix;
68
+ static isi686: typeof Architecture.isi686;
69
+ static uefiArch: typeof Architecture.uefiArch;
70
+ static uefiFormat: typeof Architecture.uefiFormat;
71
+ static usrLibPath: typeof Architecture.usrLibPath;
72
+ static kernelVersion: typeof Architecture.kernelVersion;
73
+ static customConfirm: typeof UserInteraction.customConfirm;
74
+ static customConfirmCompanion: typeof UserInteraction.customConfirmCompanion;
75
+ static customConfirmAbort: typeof UserInteraction.customConfirmAbort;
76
+ static pressKeyToExit: typeof UserInteraction.pressKeyToExit;
77
+ static useRoot: typeof UserInteraction.useRoot;
78
+ static setEcho: typeof UserInteraction.setEcho;
79
+ static warning: typeof ConsoleOutput.warning;
80
+ static error: typeof ConsoleOutput.error;
81
+ static titles: typeof ConsoleOutput.titles;
82
+ static flag: typeof ConsoleOutput.flag;
83
+ static sortObjectKeys: typeof Formatters.sortObjectKeys;
84
+ static formatDate: typeof Formatters.formatDate;
85
+ static formatBytes: typeof Formatters.formatBytes;
86
+ /**
87
+ * @deprecated Use Kernel.vmlinuz() instead
88
+ */
89
+ static vmlinuz(kernel?: string): string;
90
+ /**
91
+ * @deprecated Use Kernel.initramfs() instead
92
+ */
93
+ static initrdImg(kernel?: string): string;
327
94
  }
95
+ export { System, PackageInfo, Network, Filesystem, Snapshot, Architecture, UserInteraction, ConsoleOutput, Formatters, Kernel };