penguins-eggs 10.1.1 → 25.7.7

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 (422) hide show
  1. package/.oclif.manifest.json +1 -1
  2. package/README.md +55 -60
  3. package/assets/calamares/install-system.sh +2 -1
  4. package/conf/derivatives.yaml +5 -1
  5. package/conf/distros/alpine/calamares/modules/packages.yml +1 -1
  6. package/conf/distros/alpine/calamares/settings.yml +16 -29
  7. package/conf/distros/buster/calamares/modules/fstab.yml +1 -1
  8. package/conf/distros/buster/calamares/modules/mount.yml +4 -12
  9. package/conf/distros/fedora/calamares/modules/bootloader.yml +46 -17
  10. package/conf/distros/fedora/calamares/modules/fstab.yml +36 -11
  11. package/conf/distros/fedora/calamares/modules/mount.yml +101 -39
  12. package/conf/distros/fedora/calamares/modules/partition.yml +173 -23
  13. package/conf/distros/fedora/calamares/modules/users.yml +7 -9
  14. package/conf/distros/openmamba/calamares/settings.yml +0 -2
  15. package/conf/distros/opensuse/calamares/modules/bootloader.yml +46 -17
  16. package/conf/distros/opensuse/calamares/modules/displaymanager.yml +9 -5
  17. package/conf/distros/opensuse/calamares/modules/finished.yml +1 -1
  18. package/conf/distros/opensuse/calamares/modules/fstab.yml +36 -11
  19. package/conf/distros/opensuse/calamares/modules/grubcfg.yml +51 -0
  20. package/conf/distros/opensuse/calamares/modules/mount.yml +104 -39
  21. package/conf/distros/opensuse/calamares/modules/packages.yml +3 -3
  22. package/conf/distros/opensuse/calamares/modules/partition.yml +30 -237
  23. package/conf/distros/opensuse/calamares/modules/removeuser.yml +1 -14
  24. package/conf/distros/opensuse/calamares/modules/unpackfs.yml +0 -1
  25. package/conf/distros/opensuse/calamares/modules/users.yml +296 -16
  26. package/conf/distros/opensuse/calamares/modules/welcome.yml +91 -16
  27. package/conf/distros/opensuse/calamares/settings.yml +34 -120
  28. package/conf/distros/opensuse/calamares/zstd2lzo.sh +2 -0
  29. package/conf/distros/rolling/calamares/modules/shellprocess_sync.yml +5 -0
  30. package/conf/distros/rolling/calamares/settings.yml +4 -5
  31. package/dist/classes/bleach.d.ts +5 -0
  32. package/dist/classes/bleach.js +13 -0
  33. package/dist/classes/cli-autologin.js +14 -9
  34. package/dist/classes/daddy.js +9 -1
  35. package/dist/classes/distro.js +0 -9
  36. package/dist/classes/incubation/incubator.d/fedora.d.ts +32 -0
  37. package/dist/classes/incubation/incubator.d/fedora.js +79 -0
  38. package/dist/classes/incubation/incubator.d/opensuse.js +4 -6
  39. package/dist/classes/incubation/incubator.d/rolling.js +1 -3
  40. package/dist/classes/incubation/incubator.js +6 -11
  41. package/dist/classes/ovary.d/initrd.js +40 -11
  42. package/dist/classes/ovary.d/make-dot-disk.js +21 -11
  43. package/dist/classes/ovary.d/make-efi.js +13 -11
  44. package/dist/classes/ovary.d/merged.d.ts +1 -1
  45. package/dist/classes/ovary.d/merged.js +3 -2
  46. package/dist/classes/ovary.d/produce.js +7 -6
  47. package/dist/classes/ovary.d/user-create-live.js +15 -11
  48. package/dist/classes/ovary.d.ts +1 -1
  49. package/dist/classes/ovary.js +1 -1
  50. package/dist/classes/pacman.d/alpine.js +12 -7
  51. package/dist/classes/pacman.d/opensuse.js +4 -3
  52. package/dist/classes/pacman.js +3 -12
  53. package/dist/classes/pxe.d.ts +21 -18
  54. package/dist/classes/pxe.js +192 -259
  55. package/dist/classes/tailor.js +69 -33
  56. package/dist/classes/utils.d/filesystem.js +2 -0
  57. package/dist/classes/utils.d/kernel.js +12 -2
  58. package/dist/classes/utils.d/snapshot.js +1 -1
  59. package/dist/classes/utils.d/system.js +2 -2
  60. package/dist/commands/cuckoo.js +4 -6
  61. package/dist/commands/export/pkg.js +28 -12
  62. package/dist/commands/wardrobe/wear.js +1 -1
  63. package/dist/dhcpd-proxy/classes/packet.d.ts +36 -0
  64. package/dist/dhcpd-proxy/classes/packet.js +124 -0
  65. package/dist/dhcpd-proxy/index.d.ts +4 -0
  66. package/dist/dhcpd-proxy/index.js +4 -0
  67. package/dist/dhcpd-proxy/interfaces/i-pxe.d.ts +45 -0
  68. package/dist/dhcpd-proxy/interfaces/i-pxe.js +1 -0
  69. package/dist/dhcpd-proxy/lib/packet/converters.d.ts +11 -0
  70. package/dist/dhcpd-proxy/lib/packet/converters.js +395 -0
  71. package/dist/dhcpd-proxy/lib/packet/message-types.d.ts +10 -0
  72. package/dist/dhcpd-proxy/lib/packet/message-types.js +12 -0
  73. package/dist/dhcpd-proxy/lib/packet/options.d.ts +8 -0
  74. package/dist/dhcpd-proxy/lib/packet/options.js +264 -0
  75. package/dist/dhcpd-proxy/lib/sprintf.d.ts +6 -0
  76. package/dist/dhcpd-proxy/lib/sprintf.js +130 -0
  77. package/dist/dhcpd-proxy/lib/utils.d.ts +126 -0
  78. package/dist/dhcpd-proxy/lib/utils.js +255 -0
  79. package/dist/dhcpd-proxy/simple-proxy.d.ts +11 -0
  80. package/dist/dhcpd-proxy/simple-proxy.js +118 -0
  81. package/dist/interfaces/i-pxe.d.ts +16 -16
  82. package/dist/krill/classes/sequence.d/add_user.d.ts +3 -3
  83. package/dist/krill/classes/sequence.d/add_user.js +34 -29
  84. package/dist/krill/classes/sequence.d/bootloader_config.js +3 -26
  85. package/dist/krill/classes/sequence.d/fstab.js +10 -22
  86. package/dist/krill/classes/sequence.d/grubcfg.js +5 -3
  87. package/dist/krill/classes/sequence.d/mkfs.d.ts +1 -1
  88. package/dist/krill/classes/sequence.d/mkfs.js +10 -11
  89. package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +3 -4
  90. package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +31 -16
  91. package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +0 -1
  92. package/dist/krill/lib/select_filesystem_type.js +2 -1
  93. package/dist/lib/utils.d.ts +2 -25
  94. package/dist/lib/utils.js +4 -27
  95. package/dist/{penguins-eggs_10.1.1-0_amd64.deb → penguins-eggs_25.7.7-1_amd64.deb} +0 -0
  96. package/dist/penguins-eggs_25.7.7-1_amd64.deb.sha256 +1 -0
  97. package/dracut/README.md +14 -0
  98. package/dracut/dracut.conf +3 -3
  99. package/dracut/dracut.conf.d/10-persistent_policy.conf +1 -0
  100. package/dracut/dracut.conf.d/{01-live.conf → 50-live.conf} +3 -2
  101. package/ipxe/grub/acpi.mod +0 -0
  102. package/ipxe/grub/adler32.mod +0 -0
  103. package/ipxe/grub/affs.mod +0 -0
  104. package/ipxe/grub/afs.mod +0 -0
  105. package/ipxe/grub/afsplitter.mod +0 -0
  106. package/ipxe/grub/ahci.mod +0 -0
  107. package/ipxe/grub/all_video.mod +0 -0
  108. package/ipxe/grub/aout.mod +0 -0
  109. package/ipxe/grub/appleldr.mod +0 -0
  110. package/ipxe/grub/archelp.mod +0 -0
  111. package/ipxe/grub/at_keyboard.mod +0 -0
  112. package/ipxe/grub/ata.mod +0 -0
  113. package/ipxe/grub/backtrace.mod +0 -0
  114. package/ipxe/grub/bfs.mod +0 -0
  115. package/ipxe/grub/bitmap.mod +0 -0
  116. package/ipxe/grub/bitmap_scale.mod +0 -0
  117. package/ipxe/grub/blocklist.mod +0 -0
  118. package/ipxe/grub/boot.mod +0 -0
  119. package/ipxe/grub/bsd.mod +0 -0
  120. package/ipxe/grub/bswap_test.mod +0 -0
  121. package/ipxe/grub/btrfs.mod +0 -0
  122. package/ipxe/grub/bufio.mod +0 -0
  123. package/ipxe/grub/cat.mod +0 -0
  124. package/ipxe/grub/cbfs.mod +0 -0
  125. package/ipxe/grub/cbls.mod +0 -0
  126. package/ipxe/grub/cbmemc.mod +0 -0
  127. package/ipxe/grub/cbtable.mod +0 -0
  128. package/ipxe/grub/cbtime.mod +0 -0
  129. package/ipxe/grub/chain.mod +0 -0
  130. package/ipxe/grub/cmdline_cat_test.mod +0 -0
  131. package/ipxe/grub/cmp.mod +0 -0
  132. package/ipxe/grub/cmp_test.mod +0 -0
  133. package/ipxe/grub/command.lst +194 -0
  134. package/ipxe/grub/config.h +69 -0
  135. package/ipxe/grub/configfile.mod +0 -0
  136. package/ipxe/grub/cpio.mod +0 -0
  137. package/ipxe/grub/cpio_be.mod +0 -0
  138. package/ipxe/grub/cpuid.mod +0 -0
  139. package/ipxe/grub/crc64.mod +0 -0
  140. package/ipxe/grub/crypto.lst +45 -0
  141. package/ipxe/grub/crypto.mod +0 -0
  142. package/ipxe/grub/cryptodisk.mod +0 -0
  143. package/ipxe/grub/cs5536.mod +0 -0
  144. package/ipxe/grub/ctz_test.mod +0 -0
  145. package/ipxe/grub/date.mod +0 -0
  146. package/ipxe/grub/datehook.mod +0 -0
  147. package/ipxe/grub/datetime.mod +0 -0
  148. package/ipxe/grub/disk.mod +0 -0
  149. package/ipxe/grub/diskfilter.mod +0 -0
  150. package/ipxe/grub/div.mod +0 -0
  151. package/ipxe/grub/div_test.mod +0 -0
  152. package/ipxe/grub/dm_nv.mod +0 -0
  153. package/ipxe/grub/echo.mod +0 -0
  154. package/ipxe/grub/efi_gop.mod +0 -0
  155. package/ipxe/grub/efi_uga.mod +0 -0
  156. package/ipxe/grub/efifwsetup.mod +0 -0
  157. package/ipxe/grub/efinet.mod +0 -0
  158. package/ipxe/grub/ehci.mod +0 -0
  159. package/ipxe/grub/elf.mod +0 -0
  160. package/ipxe/grub/eval.mod +0 -0
  161. package/ipxe/grub/exfat.mod +0 -0
  162. package/ipxe/grub/exfctest.mod +0 -0
  163. package/ipxe/grub/ext2.mod +0 -0
  164. package/ipxe/grub/extcmd.mod +0 -0
  165. package/ipxe/grub/f2fs.mod +0 -0
  166. package/ipxe/grub/fat.mod +0 -0
  167. package/ipxe/grub/fdt.lst +0 -0
  168. package/ipxe/grub/file.mod +0 -0
  169. package/ipxe/grub/fixvideo.mod +0 -0
  170. package/ipxe/grub/font.mod +0 -0
  171. package/ipxe/grub/fs.lst +37 -0
  172. package/ipxe/grub/fshelp.mod +0 -0
  173. package/ipxe/grub/functional_test.mod +0 -0
  174. package/ipxe/grub/gcry_arcfour.mod +0 -0
  175. package/ipxe/grub/gcry_blowfish.mod +0 -0
  176. package/ipxe/grub/gcry_camellia.mod +0 -0
  177. package/ipxe/grub/gcry_cast5.mod +0 -0
  178. package/ipxe/grub/gcry_crc.mod +0 -0
  179. package/ipxe/grub/gcry_des.mod +0 -0
  180. package/ipxe/grub/gcry_dsa.mod +0 -0
  181. package/ipxe/grub/gcry_idea.mod +0 -0
  182. package/ipxe/grub/gcry_md4.mod +0 -0
  183. package/ipxe/grub/gcry_md5.mod +0 -0
  184. package/ipxe/grub/gcry_rfc2268.mod +0 -0
  185. package/ipxe/grub/gcry_rijndael.mod +0 -0
  186. package/ipxe/grub/gcry_rmd160.mod +0 -0
  187. package/ipxe/grub/gcry_rsa.mod +0 -0
  188. package/ipxe/grub/gcry_seed.mod +0 -0
  189. package/ipxe/grub/gcry_serpent.mod +0 -0
  190. package/ipxe/grub/gcry_sha1.mod +0 -0
  191. package/ipxe/grub/gcry_sha256.mod +0 -0
  192. package/ipxe/grub/gcry_sha512.mod +0 -0
  193. package/ipxe/grub/gcry_tiger.mod +0 -0
  194. package/ipxe/grub/gcry_twofish.mod +0 -0
  195. package/ipxe/grub/gcry_whirlpool.mod +0 -0
  196. package/ipxe/grub/geli.mod +0 -0
  197. package/ipxe/grub/gettext.mod +0 -0
  198. package/ipxe/grub/gfxmenu.mod +0 -0
  199. package/ipxe/grub/gfxterm.mod +0 -0
  200. package/ipxe/grub/gfxterm_background.mod +0 -0
  201. package/ipxe/grub/gfxterm_menu.mod +0 -0
  202. package/ipxe/grub/gptsync.mod +0 -0
  203. package/ipxe/grub/gzio.mod +0 -0
  204. package/ipxe/grub/halt.mod +0 -0
  205. package/ipxe/grub/hashsum.mod +0 -0
  206. package/ipxe/grub/hdparm.mod +0 -0
  207. package/ipxe/grub/hello.mod +0 -0
  208. package/ipxe/grub/help.mod +0 -0
  209. package/ipxe/grub/hexdump.mod +0 -0
  210. package/ipxe/grub/hfs.mod +0 -0
  211. package/ipxe/grub/hfsplus.mod +0 -0
  212. package/ipxe/grub/hfspluscomp.mod +0 -0
  213. package/ipxe/grub/http.mod +0 -0
  214. package/ipxe/grub/iorw.mod +0 -0
  215. package/ipxe/grub/iso9660.mod +0 -0
  216. package/ipxe/grub/jfs.mod +0 -0
  217. package/ipxe/grub/jpeg.mod +0 -0
  218. package/ipxe/grub/json.mod +0 -0
  219. package/ipxe/grub/kernel.img +0 -0
  220. package/ipxe/grub/keylayouts.mod +0 -0
  221. package/ipxe/grub/keystatus.mod +0 -0
  222. package/ipxe/grub/ldm.mod +0 -0
  223. package/ipxe/grub/legacy_password_test.mod +0 -0
  224. package/ipxe/grub/legacycfg.mod +0 -0
  225. package/ipxe/grub/linux.mod +0 -0
  226. package/ipxe/grub/linux16.mod +0 -0
  227. package/ipxe/grub/linuxefi.mod +0 -0
  228. package/ipxe/grub/loadbios.mod +0 -0
  229. package/ipxe/grub/loadenv.mod +0 -0
  230. package/ipxe/grub/loopback.mod +0 -0
  231. package/ipxe/grub/ls.mod +0 -0
  232. package/ipxe/grub/lsacpi.mod +0 -0
  233. package/ipxe/grub/lsefi.mod +0 -0
  234. package/ipxe/grub/lsefimmap.mod +0 -0
  235. package/ipxe/grub/lsefisystab.mod +0 -0
  236. package/ipxe/grub/lsmmap.mod +0 -0
  237. package/ipxe/grub/lspci.mod +0 -0
  238. package/ipxe/grub/lssal.mod +0 -0
  239. package/ipxe/grub/luks.mod +0 -0
  240. package/ipxe/grub/luks2.mod +0 -0
  241. package/ipxe/grub/lvm.mod +0 -0
  242. package/ipxe/grub/lzopio.mod +0 -0
  243. package/ipxe/grub/macbless.mod +0 -0
  244. package/ipxe/grub/macho.mod +0 -0
  245. package/ipxe/grub/mdraid09.mod +0 -0
  246. package/ipxe/grub/mdraid09_be.mod +0 -0
  247. package/ipxe/grub/mdraid1x.mod +0 -0
  248. package/ipxe/grub/memdisk.mod +0 -0
  249. package/ipxe/grub/memrw.mod +0 -0
  250. package/ipxe/grub/minicmd.mod +0 -0
  251. package/ipxe/grub/minix.mod +0 -0
  252. package/ipxe/grub/minix2.mod +0 -0
  253. package/ipxe/grub/minix2_be.mod +0 -0
  254. package/ipxe/grub/minix3.mod +0 -0
  255. package/ipxe/grub/minix3_be.mod +0 -0
  256. package/ipxe/grub/minix_be.mod +0 -0
  257. package/ipxe/grub/mmap.mod +0 -0
  258. package/ipxe/grub/moddep.lst +267 -0
  259. package/ipxe/grub/modinfo.sh +40 -0
  260. package/ipxe/grub/monolithic/gcdx64.efi +0 -0
  261. package/ipxe/grub/monolithic/grubnetx64-installer.efi +0 -0
  262. package/ipxe/grub/monolithic/grubnetx64.efi +0 -0
  263. package/ipxe/grub/monolithic/grubx64.efi +0 -0
  264. package/ipxe/grub/morse.mod +0 -0
  265. package/ipxe/grub/mpi.mod +0 -0
  266. package/ipxe/grub/msdospart.mod +0 -0
  267. package/ipxe/grub/mul_test.mod +0 -0
  268. package/ipxe/grub/multiboot.mod +0 -0
  269. package/ipxe/grub/multiboot2.mod +0 -0
  270. package/ipxe/grub/nativedisk.mod +0 -0
  271. package/ipxe/grub/net.mod +0 -0
  272. package/ipxe/grub/newc.mod +0 -0
  273. package/ipxe/grub/nilfs2.mod +0 -0
  274. package/ipxe/grub/normal.mod +0 -0
  275. package/ipxe/grub/ntfs.mod +0 -0
  276. package/ipxe/grub/ntfscomp.mod +0 -0
  277. package/ipxe/grub/odc.mod +0 -0
  278. package/ipxe/grub/offsetio.mod +0 -0
  279. package/ipxe/grub/ohci.mod +0 -0
  280. package/ipxe/grub/part_acorn.mod +0 -0
  281. package/ipxe/grub/part_amiga.mod +0 -0
  282. package/ipxe/grub/part_apple.mod +0 -0
  283. package/ipxe/grub/part_bsd.mod +0 -0
  284. package/ipxe/grub/part_dfly.mod +0 -0
  285. package/ipxe/grub/part_dvh.mod +0 -0
  286. package/ipxe/grub/part_gpt.mod +0 -0
  287. package/ipxe/grub/part_msdos.mod +0 -0
  288. package/ipxe/grub/part_plan.mod +0 -0
  289. package/ipxe/grub/part_sun.mod +0 -0
  290. package/ipxe/grub/part_sunpc.mod +0 -0
  291. package/ipxe/grub/partmap.lst +11 -0
  292. package/ipxe/grub/parttool.lst +1 -0
  293. package/ipxe/grub/parttool.mod +0 -0
  294. package/ipxe/grub/password.mod +0 -0
  295. package/ipxe/grub/password_pbkdf2.mod +0 -0
  296. package/ipxe/grub/pata.mod +0 -0
  297. package/ipxe/grub/pbkdf2.mod +0 -0
  298. package/ipxe/grub/pbkdf2_test.mod +0 -0
  299. package/ipxe/grub/pcidump.mod +0 -0
  300. package/ipxe/grub/pgp.mod +0 -0
  301. package/ipxe/grub/play.mod +0 -0
  302. package/ipxe/grub/png.mod +0 -0
  303. package/ipxe/grub/priority_queue.mod +0 -0
  304. package/ipxe/grub/probe.mod +0 -0
  305. package/ipxe/grub/procfs.mod +0 -0
  306. package/ipxe/grub/progress.mod +0 -0
  307. package/ipxe/grub/raid5rec.mod +0 -0
  308. package/ipxe/grub/raid6rec.mod +0 -0
  309. package/ipxe/grub/random.mod +0 -0
  310. package/ipxe/grub/rdmsr.mod +0 -0
  311. package/ipxe/grub/read.mod +0 -0
  312. package/ipxe/grub/reboot.mod +0 -0
  313. package/ipxe/grub/regexp.mod +0 -0
  314. package/ipxe/grub/reiserfs.mod +0 -0
  315. package/ipxe/grub/relocator.mod +0 -0
  316. package/ipxe/grub/romfs.mod +0 -0
  317. package/ipxe/grub/scsi.mod +0 -0
  318. package/ipxe/grub/search.mod +0 -0
  319. package/ipxe/grub/search_fs_file.mod +0 -0
  320. package/ipxe/grub/search_fs_uuid.mod +0 -0
  321. package/ipxe/grub/search_label.mod +0 -0
  322. package/ipxe/grub/serial.mod +0 -0
  323. package/ipxe/grub/setjmp.mod +0 -0
  324. package/ipxe/grub/setjmp_test.mod +0 -0
  325. package/ipxe/grub/setpci.mod +0 -0
  326. package/ipxe/grub/sfs.mod +0 -0
  327. package/ipxe/grub/shift_test.mod +0 -0
  328. package/ipxe/grub/signature_test.mod +0 -0
  329. package/ipxe/grub/sleep.mod +0 -0
  330. package/ipxe/grub/sleep_test.mod +0 -0
  331. package/ipxe/grub/smbios.mod +0 -0
  332. package/ipxe/grub/spkmodem.mod +0 -0
  333. package/ipxe/grub/squash4.mod +0 -0
  334. package/ipxe/grub/strtoull_test.mod +0 -0
  335. package/ipxe/grub/syslinuxcfg.mod +0 -0
  336. package/ipxe/grub/tar.mod +0 -0
  337. package/ipxe/grub/terminal.lst +9 -0
  338. package/ipxe/grub/terminal.mod +0 -0
  339. package/ipxe/grub/terminfo.mod +0 -0
  340. package/ipxe/grub/test.mod +0 -0
  341. package/ipxe/grub/test_blockarg.mod +0 -0
  342. package/ipxe/grub/testload.mod +0 -0
  343. package/ipxe/grub/testspeed.mod +0 -0
  344. package/ipxe/grub/tftp.mod +0 -0
  345. package/ipxe/grub/tga.mod +0 -0
  346. package/ipxe/grub/time.mod +0 -0
  347. package/ipxe/grub/tpm.mod +0 -0
  348. package/ipxe/grub/tr.mod +0 -0
  349. package/ipxe/grub/trig.mod +0 -0
  350. package/ipxe/grub/true.mod +0 -0
  351. package/ipxe/grub/udf.mod +0 -0
  352. package/ipxe/grub/ufs1.mod +0 -0
  353. package/ipxe/grub/ufs1_be.mod +0 -0
  354. package/ipxe/grub/ufs2.mod +0 -0
  355. package/ipxe/grub/uhci.mod +0 -0
  356. package/ipxe/grub/usb.mod +0 -0
  357. package/ipxe/grub/usb_keyboard.mod +0 -0
  358. package/ipxe/grub/usbms.mod +0 -0
  359. package/ipxe/grub/usbserial_common.mod +0 -0
  360. package/ipxe/grub/usbserial_ftdi.mod +0 -0
  361. package/ipxe/grub/usbserial_pl2303.mod +0 -0
  362. package/ipxe/grub/usbserial_usbdebug.mod +0 -0
  363. package/ipxe/grub/usbtest.mod +0 -0
  364. package/ipxe/grub/video.lst +4 -0
  365. package/ipxe/grub/video.mod +0 -0
  366. package/ipxe/grub/video_bochs.mod +0 -0
  367. package/ipxe/grub/video_cirrus.mod +0 -0
  368. package/ipxe/grub/video_colors.mod +0 -0
  369. package/ipxe/grub/video_fb.mod +0 -0
  370. package/ipxe/grub/videoinfo.mod +0 -0
  371. package/ipxe/grub/videotest.mod +0 -0
  372. package/ipxe/grub/videotest_checksum.mod +0 -0
  373. package/ipxe/grub/wrmsr.mod +0 -0
  374. package/ipxe/grub/xfs.mod +0 -0
  375. package/ipxe/grub/xnu.mod +0 -0
  376. package/ipxe/grub/xnu_uuid.mod +0 -0
  377. package/ipxe/grub/xnu_uuid_test.mod +0 -0
  378. package/ipxe/grub/xzio.mod +0 -0
  379. package/ipxe/grub/zfs.mod +0 -0
  380. package/ipxe/grub/zfscrypt.mod +0 -0
  381. package/ipxe/grub/zfsinfo.mod +0 -0
  382. package/ipxe/grub/zstd.mod +0 -0
  383. package/ipxe/grubnetx64.efi.signed +0 -0
  384. package/ipxe/ipxe.pxe +0 -0
  385. package/ipxe/undionly.kpxe +0 -0
  386. package/mkinitcpio/arch/live.conf +3 -2
  387. package/mkinitcpio/manjaro/live.conf +1 -1
  388. package/mkinitfs/README.md +10 -49
  389. package/mkinitfs/live.conf +2 -0
  390. package/package.json +27 -24
  391. package/pods/ci/minimal/opensuse-container2host.sh +1 -1
  392. package/scripts/99clean +42 -0
  393. package/conf/distros/aldos/calamares/modules/bootloader.yml +0 -85
  394. package/conf/distros/aldos/calamares/modules/displaymanager.yml +0 -22
  395. package/conf/distros/aldos/calamares/modules/finished.yml +0 -5
  396. package/conf/distros/aldos/calamares/modules/fstab.yml +0 -12
  397. package/conf/distros/aldos/calamares/modules/locale.yml +0 -97
  398. package/conf/distros/aldos/calamares/modules/luksopenswaphookcfg.yml +0 -5
  399. package/conf/distros/aldos/calamares/modules/machineid.yml +0 -17
  400. package/conf/distros/aldos/calamares/modules/mount.yml +0 -56
  401. package/conf/distros/aldos/calamares/modules/packages.yml +0 -6
  402. package/conf/distros/aldos/calamares/modules/partition.yml +0 -242
  403. package/conf/distros/aldos/calamares/modules/removeuser.yml +0 -15
  404. package/conf/distros/aldos/calamares/modules/unpackfs.yml +0 -6
  405. package/conf/distros/aldos/calamares/modules/users.yml +0 -19
  406. package/conf/distros/aldos/calamares/modules/welcome.yml +0 -19
  407. package/conf/distros/aldos/calamares/settings.yml +0 -124
  408. package/conf/distros/fedora/calamares/modules/bootloader.conf +0 -85
  409. package/conf/distros/opensuse/calamares/modules/bootloader.conf +0 -86
  410. package/conf/distros/opensuse/calamares/modules/locale.yml +0 -98
  411. package/conf/distros/opensuse/calamares/modules/luksopenswaphookcfg.yml +0 -5
  412. package/conf/distros/opensuse/calamares/modules/machineid.yml +0 -17
  413. package/conf/distros/rolling/calamares/modules/shellprocess_removelink.yml +0 -8
  414. package/dist/index_old.d.ts +0 -8
  415. package/dist/index_old.js +0 -8
  416. package/dist/penguins-eggs_10.1.1-0_amd64.deb.sha256 +0 -1
  417. package/dracut/sidecar.sh +0 -19
  418. package/ipxe/ipxe.efi +0 -0
  419. package/mkinitfs/initramfs-init.in +0 -1051
  420. package/mkinitfs/sidecar.sh +0 -52
  421. /package/dist/classes/ovary.d/{xorriso-commend.d.ts → xorriso-command.d.ts} +0 -0
  422. /package/dist/classes/ovary.d/{xorriso-commend.js → xorriso-command.js} +0 -0
@@ -55,7 +55,7 @@ export default class Tailor {
55
55
  * check curl presence
56
56
  */
57
57
  if (!Pacman.packageIsInstalled('curl')) {
58
- Utils.pressKeyToExit('In this tailoring shop we use curl. sudo apt update | apt install curl');
58
+ Utils.pressKeyToExit('In this tailoring shop we use curl. Install it with your package manager');
59
59
  process.exit();
60
60
  }
61
61
  // Analyze distro
@@ -106,31 +106,31 @@ export default class Tailor {
106
106
  }
107
107
  break;
108
108
  }
109
- case 'Arch': {
110
- tailorList = `${this.costume}/arch.yml`;
109
+ case 'Alpine': {
110
+ tailorList = `${this.costume}/alpine.yml`;
111
111
  if (!fs.existsSync(tailorList)) {
112
112
  tailorList = `${this.costume}/debian.yml`;
113
113
  if (!fs.existsSync(tailorList)) {
114
- console.log(`no costume definition found compatible Arch`);
114
+ console.log(`no costume definition found compatible Alpine`);
115
115
  process.exit();
116
116
  }
117
117
  }
118
118
  break;
119
119
  }
120
- case 'Alpine': {
121
- tailorList = `${this.costume}/alpine.yml`;
120
+ case 'Arch': {
121
+ tailorList = `${this.costume}/arch.yml`;
122
122
  if (!fs.existsSync(tailorList)) {
123
123
  tailorList = `${this.costume}/debian.yml`;
124
124
  if (!fs.existsSync(tailorList)) {
125
- console.log(`no costume definition found compatible Alpine`);
125
+ console.log(`no costume definition found compatible Arch`);
126
126
  process.exit();
127
127
  }
128
128
  }
129
129
  break;
130
130
  }
131
+ case 'Fedora':
131
132
  case 'Almalinux':
132
- case 'Rocky':
133
- case 'Fedora': {
133
+ case 'Rocky': {
134
134
  tailorList = `${this.costume}/fedora.yml`;
135
135
  if (!fs.existsSync(tailorList)) {
136
136
  tailorList = `${this.costume}/debian.yml`;
@@ -141,6 +141,17 @@ export default class Tailor {
141
141
  }
142
142
  break;
143
143
  }
144
+ case 'Opensuse': {
145
+ tailorList = `${this.costume}/opensuse.yml`;
146
+ if (!fs.existsSync(tailorList)) {
147
+ tailorList = `${this.costume}/debian.yml`;
148
+ if (!fs.existsSync(tailorList)) {
149
+ console.log(`no costume definition found compatible opensuse`);
150
+ process.exit();
151
+ }
152
+ }
153
+ break;
154
+ }
144
155
  } // end analyze
145
156
  /**
146
157
  * find materials
@@ -227,20 +238,24 @@ export default class Tailor {
227
238
  Utils.warning(step);
228
239
  if (this.materials.sequence.repositories.update) {
229
240
  switch (distro.familyId) {
230
- case 'debian': {
231
- await exec('apt-get update', Utils.setEcho(false));
241
+ case 'alpine': {
242
+ await exec('apk update', Utils.setEcho(false));
232
243
  break;
233
244
  }
234
245
  case 'archlinux': {
235
246
  await exec('pacman -Sy', Utils.setEcho(false));
236
247
  break;
237
248
  }
238
- case 'alpine': {
239
- await exec('apk update', Utils.setEcho(false));
249
+ case 'debian': {
250
+ await exec('apt-get update', Utils.setEcho(false));
240
251
  break;
241
252
  }
242
253
  case 'fedora': {
243
- await exec('dnf update', Utils.setEcho(false));
254
+ await exec('dnf check-update --refresh', Utils.setEcho(false));
255
+ break;
256
+ }
257
+ case 'opensuse': {
258
+ await exec('zypper refresh', Utils.setEcho(true));
244
259
  break;
245
260
  }
246
261
  }
@@ -253,22 +268,26 @@ export default class Tailor {
253
268
  Utils.warning(step);
254
269
  if (this.materials.sequence.repositories.upgrade) {
255
270
  switch (distro.familyId) {
256
- case 'debian': {
257
- await exec('apt-get full-upgrade', Utils.setEcho(false));
271
+ case 'alpine': {
272
+ await exec('apk upgrade', Utils.setEcho(false));
258
273
  break;
259
274
  }
260
275
  case 'archlinux': {
261
276
  await exec('pacman -Su', Utils.setEcho(false));
262
277
  break;
263
278
  }
264
- case 'alpine': {
265
- await exec('apk upgrade', Utils.setEcho(false));
279
+ case 'debian': {
280
+ await exec('apt-get full-upgrade', Utils.setEcho(false));
266
281
  break;
267
282
  }
268
283
  case 'fedora': {
269
284
  await exec('dnf upgrade', Utils.setEcho(false));
270
285
  break;
271
286
  }
287
+ case 'opensuse': {
288
+ await exec('zypper update', Utils.setEcho(true));
289
+ break;
290
+ }
272
291
  }
273
292
  } // upgrade true
274
293
  } // undefined upgrade
@@ -281,11 +300,12 @@ export default class Tailor {
281
300
  Utils.warning(step);
282
301
  for (const cmd of this.materials.sequence.cmds) {
283
302
  if (fs.existsSync(`${this.costume}/${cmd}`)) {
284
- await exec(`${this.costume}/${cmd} ${this.materials.name}`, Utils.setEcho(true));
303
+ // exec ./costume/cmd
304
+ await exec(`${this.costume}/${cmd} `, Utils.setEcho(true));
285
305
  }
286
306
  else {
287
- // exec cmd real env
288
- await exec(`${cmd} ${this.materials.name}`, Utils.setEcho(true));
307
+ // exec cmd
308
+ await exec(`${cmd}`, Utils.setEcho(true));
289
309
  }
290
310
  }
291
311
  }
@@ -294,24 +314,31 @@ export default class Tailor {
294
314
  */
295
315
  if (this.materials.sequence.packages !== undefined) {
296
316
  const packages = await this.packagesExists(this.materials.sequence.packages);
317
+ console.log(this.materials.sequence.packages);
297
318
  if (packages.length > 1) {
298
319
  switch (distro.familyId) {
299
- case 'debian': {
300
- await this.packagesInstall(packages);
320
+ case 'alpine': {
321
+ await this.packagesInstall(this.materials.sequence.packages, 'packages', `apk add`);
301
322
  break;
302
323
  }
303
324
  case 'archlinux': {
304
325
  await this.packagesInstall(this.materials.sequence.packages, 'packages', `pacman -Sy --noconfirm`);
305
326
  break;
306
327
  }
307
- case 'alpine': {
308
- await this.packagesInstall(this.materials.sequence.packages, 'packages', `apk add`);
328
+ case 'debian': {
329
+ await this.packagesInstall(packages);
309
330
  break;
310
331
  }
311
332
  case 'fedora': {
312
333
  await this.packagesInstall(this.materials.sequence.packages, 'packages', `dnf install -y`);
313
334
  break;
314
335
  }
336
+ case 'opensuse': {
337
+ // Quanto mi è costato
338
+ // await this.packagesInstall(this.materials.sequence.packages, 'packages', `zypper install --no-confirm`)
339
+ await this.packagesInstall(this.materials.sequence.packages, 'packages', `zypper install --no-confirm`);
340
+ break;
341
+ }
315
342
  }
316
343
  }
317
344
  }
@@ -388,6 +415,7 @@ export default class Tailor {
388
415
  Utils.warning(step);
389
416
  for (const cmd of this.materials.finalize.cmds) {
390
417
  if (fs.existsSync(`${this.costume}/${cmd}`)) {
418
+ // Qui passiamo ${this.materials.name}
391
419
  await exec(`${this.costume}/${cmd} ${this.materials.name}`, Utils.setEcho(true));
392
420
  }
393
421
  else {
@@ -425,23 +453,31 @@ export default class Tailor {
425
453
  wanted.sort();
426
454
  const distro = new Distro();
427
455
  let cmd = "";
428
- if (distro.familyId === "debian") {
429
- // cmd=`apt-cache --no-generate pkgnames`
430
- cmd = `apt-cache pkgnames`;
456
+ if (distro.familyId === "alpine") {
457
+ cmd = `apk search | awk -F'-[0-9]' '{print $1}' | sort -u`;
431
458
  }
432
459
  else if (distro.familyId === "archlinux") {
433
460
  cmd = `pacman -S --list | awk '{print $2}'`;
434
461
  }
435
- else if (distro.familyId === "alpine") {
436
- cmd = `apk search | awk -F'-[0-9]' '{print $1}' | sort -u`;
462
+ else if (distro.familyId === "debian") {
463
+ // cmd=`apt-cache --no-generate pkgnames`
464
+ cmd = `apt-cache pkgnames`;
437
465
  }
438
466
  else if (distro.familyId === 'fedora') {
439
467
  cmd = `dnf list --available | awk '{print $1}' | sed 's/\.[^.]*$//'`;
440
468
  }
441
- //available = (await exec(cmd, { capture: true, echo: false, ignore: false })).data.split('\n')
469
+ else if (distro.familyId === 'opensuse') { //controllare
470
+ // questo funziona diretto
471
+ cmd = `zypper --non-interactive packages | cut -d '|' -f 3 | sed '1,2d' | sed '/^$/d' | sort -u`;
472
+ }
442
473
  let available = [];
443
- available = (await exec(cmd, { capture: true, echo: false, ignore: false })).data.split('\n');
474
+ const result = await exec(cmd, { capture: true, echo: false, ignore: false });
475
+ // trim di tutto per eseguire il confronto
476
+ available = result.data.split('\n').map(line => line.trim());
477
+ // precedente
478
+ // available = (await exec(cmd, { capture: true, echo: false, ignore: false })).data.split('\n')
444
479
  available.sort();
480
+ wanted.sort();
445
481
  let exists = [];
446
482
  let not_exists = [];
447
483
  for (const elem of wanted) {
@@ -506,7 +542,7 @@ export default class Tailor {
506
542
  async tryCheckSuccess(cmd, echo) {
507
543
  let success = false;
508
544
  try {
509
- await exec(cmd, echo);
545
+ await exec(cmd, Utils.setEcho(true));
510
546
  success = true;
511
547
  }
512
548
  catch {
@@ -84,6 +84,8 @@ export default class Filesystem {
84
84
  text += `# Created at: ${Formatters.formatDate(new Date())}\n`;
85
85
  text += `# By: penguins_eggs v. ${PackageInfo.getPackageVersion()}\n`;
86
86
  text += `# ==> Perri\'s Brewery edition <== \n\n`;
87
+ text += 'set -e\n';
88
+ text += 'set -x\n';
87
89
  text += cmd;
88
90
  Filesystem.write(file, text);
89
91
  shx.chmod('+x', file);
@@ -62,12 +62,16 @@ export default class Kernel {
62
62
  if (distro.familyId === "archlinux") {
63
63
  initramfs = this.getArchInitramfs(kernel, distro);
64
64
  }
65
+ else if (distro.familyId === "alpine") {
66
+ initramfs = '/boot/initramfs-lts';
67
+ }
65
68
  else {
66
- // Debian/Ubuntu/derivati
69
+ // Debian/Ubuntu/derivatives
67
70
  const possiblePaths = [
68
71
  `/boot/initrd.img-${kernel}`,
69
72
  `/boot/initramfs-${kernel}.img`,
70
- `/boot/initramfs-${kernel}`
73
+ `/boot/initramfs-${kernel}`,
74
+ `/boot/initrd-${kernel}` // opensuse
71
75
  ];
72
76
  for (const path of possiblePaths) {
73
77
  if (fs.existsSync(path)) {
@@ -95,6 +99,9 @@ export default class Kernel {
95
99
  if (distro.familyId === "archlinux") {
96
100
  return this.getArchLinuxKernelPath(distro, kernelModulesPath, kernels);
97
101
  }
102
+ else if (distro.familyId === "alpine") {
103
+ return `/boot/vmlinuz-lts`;
104
+ }
98
105
  else {
99
106
  // Per Debian/Ubuntu usa l'ultimo kernel disponibile
100
107
  const latestKernel = kernels[kernels.length - 1];
@@ -108,6 +115,9 @@ export default class Kernel {
108
115
  if (distro.familyId === "archlinux") {
109
116
  return this.getArchLinuxSpecificKernel(kernel, distro);
110
117
  }
118
+ else if (distro.familyId === "alpine") {
119
+ return `vmlinuz-lts`;
120
+ }
111
121
  else {
112
122
  return `/boot/vmlinuz-${kernel}`;
113
123
  }
@@ -27,7 +27,7 @@ export default class Snapshot {
27
27
  else {
28
28
  result += `${codenameId.toLowerCase()}-`;
29
29
  }
30
- result = result.replace(`/`, '-');
30
+ // result = result.replace(`/`, '-')
31
31
  return result;
32
32
  }
33
33
  /**
@@ -33,7 +33,7 @@ export default class System {
33
33
  else {
34
34
  isSystemd = true;
35
35
  let distro = new Distro();
36
- if (distro.distroId === "Devuan") {
36
+ if (distro.distroId === "Alpine" || distro.distroId === "Devuan") {
37
37
  isSystemd = false;
38
38
  }
39
39
  }
@@ -49,7 +49,7 @@ export default class System {
49
49
  }
50
50
  else {
51
51
  let distro = new Distro();
52
- if (distro.distroId === "Devuan") {
52
+ if (distro.distroId === "Alpine" || distro.distroId === "Devuan") {
53
53
  isSysvinit = true;
54
54
  }
55
55
  }
@@ -34,12 +34,13 @@ export default class Cuckoo extends Command {
34
34
  const dhcpOptions = {
35
35
  bios_filename: 'lpxelinux.0',
36
36
  efi32_filename: 'ipxe32.efi',
37
- efi64_filename: 'ipxe.efi',
37
+ efi64_filename: 'ipxe.pxe', // era ipxe.efi
38
38
  host: n.address,
39
39
  subnet: n.cidr,
40
- tftpserver: n.address
40
+ tftpserver: n.address,
41
+ broadcast: n.broadcast()
41
42
  };
42
- pxe.dhcpStart(dhcpOptions);
43
+ pxe.dhcpdStart(dhcpOptions);
43
44
  /**
44
45
  * service tftp
45
46
  */
@@ -50,9 +51,6 @@ export default class Cuckoo extends Command {
50
51
  root: pxeRoot
51
52
  };
52
53
  await pxe.tftpStart(tftpOptions);
53
- /**
54
- * service http
55
- */
56
54
  await pxe.httpStart();
57
55
  }
58
56
  else {
@@ -66,14 +66,14 @@ export default class ExportPkg extends Command {
66
66
  */
67
67
  }
68
68
  else if (familyId === 'alpine') {
69
- Utils.warning("alpine apk");
70
69
  let arch = 'x86_64';
71
70
  if (process.arch === 'ia32') {
72
71
  arch = 'i386';
73
72
  }
74
- localPath = `/home/${this.user}/packages/alpine/${arch}`;
75
- remotePath = `${this.Tu.config.remotePathPackages}/alpine/`;
76
- filter = `penguins-eggs*10.?.*-r*.apk`;
73
+ Utils.warning(`alpine apk`);
74
+ localPath = `/home/${this.user}/packages/aports/${arch}`;
75
+ remotePath = `${this.Tu.config.remotePathPackages}/alpine/${arch}`;
76
+ filter = `penguins-eggs-*[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*.apk`;
77
77
  /**
78
78
  * Arch/Manjaro
79
79
  */
@@ -86,7 +86,7 @@ export default class ExportPkg extends Command {
86
86
  Utils.warning("manjaro PKGBUILD");
87
87
  localPath = `/home/${this.user}/penguins-packs/manjaro/penguins-eggs`;
88
88
  remotePath = this.Tu.config.remotePathPackages + "/manjaro";
89
- filter = `penguins-eggs-10.?.*-*-any.pkg.tar.*`;
89
+ filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*-any.pkg.tar.*`;
90
90
  /**
91
91
  * Arch
92
92
  */
@@ -95,7 +95,7 @@ export default class ExportPkg extends Command {
95
95
  Utils.warning("aur PKGBUILD");
96
96
  localPath = `/home/${this.user}/penguins-packs/aur/penguins-eggs`;
97
97
  remotePath = this.Tu.config.remotePathPackages + "/aur";
98
- filter = `penguins-eggs-10.?.*-*-any.pkg.tar.zst`;
98
+ filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*-any.pkg.tar.zst`;
99
99
  }
100
100
  /**
101
101
  * Debian
@@ -109,7 +109,7 @@ export default class ExportPkg extends Command {
109
109
  if (this.all) {
110
110
  arch = '*';
111
111
  }
112
- filter = `penguins-eggs_10.?.*-*_${arch}.deb`;
112
+ filter = `penguins-eggs_[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*_${arch}.deb`;
113
113
  /**
114
114
  * fedora
115
115
  */
@@ -118,7 +118,7 @@ export default class ExportPkg extends Command {
118
118
  Utils.warning("fedora rpm packages");
119
119
  localPath = `/home/${this.user}/rpmbuild/RPMS/x86_64`;
120
120
  remotePath = this.Tu.config.remotePathPackages + "/fedora";
121
- filter = `penguins-eggs-10.?.*-*fedora.*.rpm`;
121
+ filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*fedora.*.rpm`;
122
122
  /**
123
123
  * openmamba
124
124
  */
@@ -127,7 +127,7 @@ export default class ExportPkg extends Command {
127
127
  Utils.warning("openmamba rpm packages");
128
128
  localPath = `/usr/src/RPM/RPMS/x86_64`;
129
129
  remotePath = this.Tu.config.remotePathPackages + "/openmamba";
130
- filter = `penguins-eggs-10.?.*-*mamba.*.rpm`;
130
+ filter = `penguins-eggs-[0-9][0-9].@([0-9]|[0-1][0-9]).@([0-9]|[0-3][0-9])-*mamba.*.rpm`;
131
131
  /**
132
132
  * opensuse
133
133
  */
@@ -143,14 +143,29 @@ export default class ExportPkg extends Command {
143
143
  Utils.warning("voidlinux packages");
144
144
  process.exit();
145
145
  }
146
- let cmd = `mkdir ${remoteMountpoint}\n`;
146
+ let cmd = `#!/bin/bash\n`;
147
+ cmd += `set -e\n`;
148
+ cmd += 'shopt -s extglob\n';
149
+ cmd += `mkdir ${remoteMountpoint}\n`;
147
150
  cmd += `sshfs ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath} ${remoteMountpoint}\n`;
148
151
  if (this.clean) {
149
- cmd += `rm -f ${remoteMountpoint}/${filter}\n`;
152
+ let archDest = '';
153
+ if (distro.familyId === 'alpine') {
154
+ let archDest = 'x86_64/';
155
+ if (process.arch === 'ia32') {
156
+ archDest = 'i386/';
157
+ }
158
+ }
159
+ cmd += `# Delete old packages\n`;
160
+ cmd += `rm -f ${remoteMountpoint}/${archDest}${filter}\n`;
150
161
  }
162
+ cmd += `# Export packages\n`;
151
163
  cmd += `cp ${localPath}/${filter} ${remoteMountpoint}\n`;
152
164
  cmd += 'sync\n';
153
- cmd += `umount ${remoteMountpoint}\n`;
165
+ cmd += `# wait before to umount\n`;
166
+ cmd += 'sleep 2s\n';
167
+ cmd += `fusermount3 -u ${remoteMountpoint}\n`;
168
+ cmd += `# remove mountpoint\n`;
154
169
  cmd += `rm -rf ${remoteMountpoint}\n`;
155
170
  if (!this.verbose) {
156
171
  if (this.clean) {
@@ -158,6 +173,7 @@ export default class ExportPkg extends Command {
158
173
  }
159
174
  console.log(`copy: ${localPath}/${filter} to ${this.Tu.config.remoteUser}@${this.Tu.config.remoteHost}:${remotePath}`);
160
175
  }
176
+ // console.log(cmd)
161
177
  await exec(cmd, this.echo);
162
178
  }
163
179
  }
@@ -70,7 +70,7 @@ export default class Wear extends Command {
70
70
  if (Utils.isRoot()) {
71
71
  const tailor = new Tailor(costume);
72
72
  // delete previous log
73
- await exec(`rm -f ${path.dirname(wardrobe)}+"/wardrobe.log`);
73
+ await exec(`rm -f ${path.dirname(wardrobe)}/wardrobe.log`);
74
74
  await tailor.prepare(verbose, no_accessories, no_firmwares);
75
75
  }
76
76
  else {
@@ -0,0 +1,36 @@
1
+ import { Buffer } from 'buffer';
2
+ interface DhcpOptions {
3
+ [key: number]: any;
4
+ }
5
+ export declare class Packet {
6
+ op: number;
7
+ htype: number;
8
+ hlen: number;
9
+ hops: number;
10
+ xid: number;
11
+ secs: number;
12
+ flags: number;
13
+ ciaddr: string;
14
+ yiaddr: string;
15
+ siaddr: string;
16
+ giaddr: string;
17
+ chaddr: string;
18
+ sname: string;
19
+ fname: string;
20
+ options: DhcpOptions;
21
+ constructor(init: Partial<Packet>);
22
+ /**
23
+ * Crea un oggetto Packet da un Buffer
24
+ * @param b Il Buffer da cui leggere
25
+ * @returns Un'istanza di Packet
26
+ */
27
+ static fromBuffer(b: Buffer): Packet;
28
+ getRequestedIPAddress(): string;
29
+ op_set(op: number): this;
30
+ /**
31
+ * Converte l'oggetto Packet in un Buffer
32
+ * @returns Il Buffer DHCP
33
+ */
34
+ toBuffer(): Buffer;
35
+ }
36
+ export {};
@@ -0,0 +1,124 @@
1
+ /* packet.ts
2
+ *
3
+ * author: Piero Proietti <piero.proietti@gmail.com>
4
+ * refactored for modern TypeScript
5
+ */
6
+ import { readIp, readMacAddress } from "../lib/utils.js";
7
+ import get_convert from "../lib/packet/converters.js";
8
+ import { Buffer } from 'buffer'; // Import Buffer type
9
+ // Mettiamo 'export' direttamente davanti alla classe
10
+ export class Packet {
11
+ // Aggiunto '!' per il "Definite Assignment Assertion"
12
+ op;
13
+ htype;
14
+ hlen;
15
+ hops;
16
+ xid;
17
+ secs;
18
+ flags;
19
+ ciaddr;
20
+ yiaddr;
21
+ siaddr;
22
+ giaddr;
23
+ chaddr;
24
+ sname;
25
+ fname;
26
+ options;
27
+ constructor(init) {
28
+ Object.assign(this, init);
29
+ }
30
+ // --- METODI STATICI (prima erano funzioni esterne) ---
31
+ /**
32
+ * Crea un oggetto Packet da un Buffer
33
+ * @param b Il Buffer da cui leggere
34
+ * @returns Un'istanza di Packet
35
+ */
36
+ static fromBuffer(b) {
37
+ const ret = {
38
+ op: b[0],
39
+ htype: b[1],
40
+ hlen: b.readUInt8(2),
41
+ hops: b.readUInt8(3),
42
+ xid: b.readUInt32BE(4),
43
+ secs: b.readUInt16BE(8),
44
+ flags: b.readUInt16BE(10),
45
+ ciaddr: readIp(b, 12),
46
+ yiaddr: readIp(b, 16),
47
+ siaddr: readIp(b, 20),
48
+ giaddr: readIp(b, 24),
49
+ chaddr: readMacAddress(b.slice(28, 28 + b.readUInt8(2))),
50
+ sname: stripBinNull(b.toString("ascii", 44, 108)),
51
+ fname: stripBinNull(b.toString("ascii", 108, 236)),
52
+ options: {},
53
+ };
54
+ let i = 240;
55
+ while (i < b.length && b[i] !== 255) {
56
+ const optNum = b[i++];
57
+ const optLen = b[i++];
58
+ if (i + optLen > b.length)
59
+ break; // Evita errori di out-of-bounds
60
+ const converter = get_convert(optNum);
61
+ const optVal = converter.decode(b.slice(i, i + optLen), optNum);
62
+ ret.options[optNum] = optVal;
63
+ i += optLen;
64
+ }
65
+ return new Packet(ret);
66
+ }
67
+ // --- METODI DI ISTANZA (quelli che restituiscono 'this' e toBuffer) ---
68
+ getRequestedIPAddress() {
69
+ return this.options[50];
70
+ }
71
+ // ... tutti i tuoi metodi "builder" che restituiscono 'this' vanno qui
72
+ // Esempio:
73
+ op_set(op) {
74
+ this.op = op;
75
+ return this;
76
+ }
77
+ // ...e così via per htype, hlen, xid, etc.
78
+ /**
79
+ * Converte l'oggetto Packet in un Buffer
80
+ * @returns Il Buffer DHCP
81
+ */
82
+ toBuffer() {
83
+ const buffer = Buffer.alloc(512); // Usare Buffer.alloc è più sicuro
84
+ buffer.fill(0);
85
+ buffer[0] = this.op;
86
+ buffer[1] = this.htype;
87
+ buffer.writeUInt8(this.hlen, 2);
88
+ buffer.writeUInt8(this.hops, 3);
89
+ buffer.writeUInt32BE(this.xid, 4);
90
+ buffer.writeUInt16BE(this.secs, 8);
91
+ buffer.writeUInt16BE(this.flags, 10);
92
+ let pos = 12;
93
+ [this.ciaddr, this.yiaddr, this.siaddr, this.giaddr].forEach(addr => {
94
+ (addr || "0.0.0.0").split(".").forEach(octet => {
95
+ buffer.writeUInt8(parseInt(octet, 10), pos++);
96
+ });
97
+ });
98
+ this.chaddr.split(":").forEach(hex => {
99
+ buffer[pos++] = parseInt(hex, 16);
100
+ });
101
+ buffer.fill(0, pos, 236); // Pulisce il resto dell'header
102
+ buffer.write(this.sname || '', 44, 64, "ascii");
103
+ buffer.write(this.fname || '', 108, 128, "ascii");
104
+ pos = 236;
105
+ [99, 130, 83, 99].forEach(magicCookieByte => {
106
+ buffer[pos++] = magicCookieByte;
107
+ });
108
+ pos = 240;
109
+ for (const opt in this.options) {
110
+ if (this.options.hasOwnProperty(opt)) {
111
+ const value = this.options[opt];
112
+ const converter = get_convert(parseInt(opt));
113
+ pos = converter.encode(buffer, parseInt(opt), value, pos);
114
+ }
115
+ }
116
+ buffer[pos++] = 255; // End Option
117
+ return buffer.slice(0, pos);
118
+ }
119
+ }
120
+ // Funzione helper, può rimanere qui o essere spostata in un file di utility
121
+ function stripBinNull(str) {
122
+ const pos = str.indexOf("\u0000");
123
+ return pos === -1 ? str : str.substr(0, pos);
124
+ }
@@ -0,0 +1,4 @@
1
+ export {};
2
+ /**
3
+ * intetionally blank
4
+ */
@@ -0,0 +1,4 @@
1
+ export {};
2
+ /**
3
+ * intetionally blank
4
+ */
@@ -0,0 +1,45 @@
1
+ export interface ITftpOptions {
2
+ host: string;
3
+ port: number;
4
+ root: string;
5
+ denyPUT: boolean;
6
+ }
7
+ export interface IDhcpOptions {
8
+ subnet: string;
9
+ host: string;
10
+ tftpserver: string;
11
+ bios_filename: string;
12
+ efi32_filename: string;
13
+ efi64_filename: string;
14
+ broadcast: string;
15
+ }
16
+ export interface IDhcpd {
17
+ pre_init: (pkt: IPacket) => void;
18
+ discover: (pkt: IPacket) => void;
19
+ request: (pkt: IPacket) => void;
20
+ inform: (pkt: IPacket) => void;
21
+ proxy_request: (pkt: IPacket) => IPacket;
22
+ }
23
+ export interface IProxy {
24
+ bind: (port: number, addr: string, cb: any) => IPacket;
25
+ }
26
+ export interface IServer {
27
+ bind: (port: number, addr: string, cb: any) => IPacket;
28
+ }
29
+ export interface IPacket {
30
+ getRequestedIPAddress: () => string;
31
+ op: (op: any) => IPacket;
32
+ htype: (htype: any) => IPacket;
33
+ hlen: (hlen: any) => IPacket;
34
+ hops: (hops: any) => IPacket;
35
+ xid: (xid: any) => IPacket;
36
+ secs: (secs: any) => IPacket;
37
+ flags: (flags: any) => IPacket;
38
+ ciaddr: (ciaddr: string) => IPacket;
39
+ siaddr: (siaddr: string) => IPacket;
40
+ giaddr: (giaddr: string) => IPacket;
41
+ chaddr: (chaddr: any) => IPacket;
42
+ sname: (sname: any) => IPacket;
43
+ fname: (fname: any) => IPacket;
44
+ options: (options: any) => IPacket;
45
+ }