penguins-eggs 25.10.3 → 25.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +1 -1
- package/README.md +826 -0
- package/conf/distros/archlinux/calamares/modules/bootloader.yml +86 -0
- package/conf/distros/archlinux/calamares/modules/partition.yml +8 -386
- package/conf/distros/archlinux/calamares/settings.yml +0 -4
- package/conf/distros/fedora/calamares/modules/README.md +4 -0
- package/conf/distros/fedora/calamares/modules/bootloader.yml +2 -1
- package/conf/distros/fedora/calamares/modules/mount.yml +6 -1
- package/conf/distros/fedora/calamares/settings.yml +6 -1
- package/conf/distros/focal/calamares/modules/mount.yml +23 -5
- package/conf/distros/noble/calamares/libexec/calamares-l10n-helper.sh +3 -0
- package/conf/distros/opensuse/calamares/calamares-modules/bootloaderspecification/bootloaderspecification.sh +1 -1
- package/conf/distros/opensuse/calamares/modules/dracut.mustache +7 -0
- package/conf/distros/opensuse/calamares/modules/packages.mustache +1 -0
- package/conf/distros/opensuse/calamares/modules/removeuser.mustache +2 -1
- package/conf/distros/opensuse/calamares/modules/unpackfs.mustache +2 -1
- package/conf/distros/opensuse/calamares/settings.yml +1 -1
- package/dist/classes/bleach.d.ts +37 -0
- package/dist/classes/bleach.js +148 -0
- package/dist/classes/cli-autologin.d.ts +52 -0
- package/dist/classes/cli-autologin.js +252 -0
- package/dist/classes/compressors.d.ts +54 -0
- package/dist/classes/compressors.js +109 -0
- package/dist/classes/daddy.d.ts +26 -0
- package/dist/classes/daddy.js +175 -0
- package/dist/classes/distro.d.ts +32 -0
- package/dist/classes/distro.js +356 -0
- package/dist/classes/diversions.d.ts +53 -0
- package/dist/classes/diversions.js +133 -0
- package/dist/classes/incubation/branding.d.ts +17 -0
- package/dist/classes/incubation/branding.js +85 -0
- package/dist/classes/incubation/customize/customize-partitions.d.ts +4 -0
- package/dist/classes/incubation/customize/customize-partitions.js +29 -0
- package/dist/classes/incubation/fisherman-helper/initcpio.d.ts +1 -0
- package/dist/classes/incubation/fisherman-helper/initcpio.js +69 -0
- package/dist/classes/incubation/fisherman-helper/packages.d.ts +20 -0
- package/dist/classes/incubation/fisherman-helper/packages.js +72 -0
- package/dist/classes/incubation/fisherman-helper/settings.d.ts +15 -0
- package/dist/classes/incubation/fisherman-helper/settings.js +116 -0
- package/dist/classes/incubation/fisherman.d.ts +71 -0
- package/dist/classes/incubation/fisherman.js +281 -0
- package/dist/classes/incubation/incubator.d/alpine.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/alpine.js +78 -0
- package/dist/classes/incubation/incubator.d/archlinux.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/archlinux.js +81 -0
- package/dist/classes/incubation/incubator.d/bionic.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/bionic.js +83 -0
- package/dist/classes/incubation/incubator.d/buster.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/buster.js +101 -0
- package/dist/classes/incubation/incubator.d/fedora.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/fedora.js +81 -0
- package/dist/classes/incubation/incubator.d/focal.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/focal.js +85 -0
- package/dist/classes/incubation/incubator.d/manjaro.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/manjaro.js +82 -0
- package/dist/classes/incubation/incubator.d/noble.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/noble.js +102 -0
- package/dist/classes/incubation/incubator.d/openmamba.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/openmamba.js +81 -0
- package/dist/classes/incubation/incubator.d/opensuse.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/opensuse.js +81 -0
- package/dist/classes/incubation/incubator.d/trixie.d.ts +32 -0
- package/dist/classes/incubation/incubator.d/trixie.js +101 -0
- package/dist/classes/incubation/incubator.d.ts +48 -0
- package/dist/classes/incubation/incubator.js +378 -0
- package/dist/classes/incubation/installer.d.ts +13 -0
- package/dist/classes/incubation/installer.js +52 -0
- package/dist/classes/keyboards.d.ts +50 -0
- package/dist/classes/keyboards.js +287 -0
- package/dist/classes/locales.d.ts +21 -0
- package/dist/classes/locales.js +77 -0
- package/dist/classes/network.d.ts +37 -0
- package/dist/classes/network.js +98 -0
- package/dist/classes/ovary.d/bind-live-fs.d.ts +18 -0
- package/dist/classes/ovary.d/bind-live-fs.js +185 -0
- package/dist/classes/ovary.d/bind-vfs.d.ts +17 -0
- package/dist/classes/ovary.d/bind-vfs.js +37 -0
- package/dist/classes/ovary.d/create-xdg-autostart.d.ts +13 -0
- package/dist/classes/ovary.d/create-xdg-autostart.js +194 -0
- package/dist/classes/ovary.d/edit-live-fs.d.ts +20 -0
- package/dist/classes/ovary.d/edit-live-fs.js +245 -0
- package/dist/classes/ovary.d/fertilization.d.ts +12 -0
- package/dist/classes/ovary.d/fertilization.js +52 -0
- package/dist/classes/ovary.d/finished.d.ts +13 -0
- package/dist/classes/ovary.d/finished.js +44 -0
- package/dist/classes/ovary.d/initrd.d.ts +21 -0
- package/dist/classes/ovary.d/initrd.js +97 -0
- package/dist/classes/ovary.d/kernel-copy.d.ts +12 -0
- package/dist/classes/ovary.d/kernel-copy.js +22 -0
- package/dist/classes/ovary.d/live-create-structure.d.ts +12 -0
- package/dist/classes/ovary.d/live-create-structure.js +73 -0
- package/dist/classes/ovary.d/make-dot-disk.d.ts +12 -0
- package/dist/classes/ovary.d/make-dot-disk.js +62 -0
- package/dist/classes/ovary.d/make-efi.d.ts +14 -0
- package/dist/classes/ovary.d/make-efi.js +274 -0
- package/dist/classes/ovary.d/make-iso.d.ts +13 -0
- package/dist/classes/ovary.d/make-iso.js +45 -0
- package/dist/classes/ovary.d/make-squashfs.d.ts +18 -0
- package/dist/classes/ovary.d/make-squashfs.js +110 -0
- package/dist/classes/ovary.d/merged.d.ts +27 -0
- package/dist/classes/ovary.d/merged.js +78 -0
- package/dist/classes/ovary.d/produce.d.ts +23 -0
- package/dist/classes/ovary.d/produce.js +319 -0
- package/dist/classes/ovary.d/rexec.d.ts +13 -0
- package/dist/classes/ovary.d/rexec.js +34 -0
- package/dist/classes/ovary.d/syslinux.d.ts +12 -0
- package/dist/classes/ovary.d/syslinux.js +82 -0
- package/dist/classes/ovary.d/user-create-live.d.ts +14 -0
- package/dist/classes/ovary.d/user-create-live.js +97 -0
- package/dist/classes/ovary.d/users-remove.d.ts +9 -0
- package/dist/classes/ovary.d/users-remove.js +38 -0
- package/dist/classes/ovary.d/xorriso-command.d.ts +14 -0
- package/dist/classes/ovary.d/xorriso-command.js +123 -0
- package/dist/classes/ovary.d.ts +87 -0
- package/dist/classes/ovary.js +90 -0
- package/dist/classes/pacman.d/alpine.d.ts +56 -0
- package/dist/classes/pacman.d/alpine.js +167 -0
- package/dist/classes/pacman.d/archlinux.d.ts +62 -0
- package/dist/classes/pacman.d/archlinux.js +128 -0
- package/dist/classes/pacman.d/debian.d.ts +65 -0
- package/dist/classes/pacman.d/debian.js +143 -0
- package/dist/classes/pacman.d/fedora.d.ts +53 -0
- package/dist/classes/pacman.d/fedora.js +107 -0
- package/dist/classes/pacman.d/openmamba.d.ts +52 -0
- package/dist/classes/pacman.d/openmamba.js +106 -0
- package/dist/classes/pacman.d/opensuse.d.ts +53 -0
- package/dist/classes/pacman.d/opensuse.js +109 -0
- package/dist/classes/pacman.d.ts +139 -0
- package/dist/classes/pacman.js +683 -0
- package/dist/classes/pve-live.d.ts +17 -0
- package/dist/classes/pve-live.js +52 -0
- package/dist/classes/pxe.d.ts +76 -0
- package/dist/classes/pxe.js +353 -0
- package/dist/classes/settings.d.ts +52 -0
- package/dist/classes/settings.js +185 -0
- package/dist/classes/sources_list.d.ts +28 -0
- package/dist/classes/sources_list.js +89 -0
- package/dist/classes/systemctl.d.ts +47 -0
- package/dist/classes/systemctl.js +86 -0
- package/dist/classes/tailor.d.ts +50 -0
- package/dist/classes/tailor.js +563 -0
- package/dist/classes/tools.d.ts +26 -0
- package/dist/classes/tools.js +50 -0
- package/dist/classes/users.d.ts +28 -0
- package/dist/classes/users.js +143 -0
- package/dist/classes/utils.d/kernel.d.ts +39 -0
- package/dist/classes/utils.d/kernel.js +206 -0
- package/dist/classes/utils.d.ts +327 -0
- package/dist/classes/utils.js +955 -0
- package/dist/classes/xdg.d.ts +45 -0
- package/dist/classes/xdg.js +337 -0
- package/dist/classes/yolk.d.ts +33 -0
- package/dist/classes/yolk.js +114 -0
- package/dist/commands/adapt.d.ts +17 -0
- package/dist/commands/adapt.js +33 -0
- package/dist/commands/analyze.d.ts +26 -0
- package/dist/commands/analyze.js +95 -0
- package/dist/commands/calamares.d.ts +29 -0
- package/dist/commands/calamares.js +112 -0
- package/dist/commands/config.d.ts +35 -0
- package/dist/commands/config.js +120 -0
- package/dist/commands/cuckoo.d.ts +17 -0
- package/dist/commands/cuckoo.js +61 -0
- package/dist/commands/dad.d.ts +21 -0
- package/dist/commands/dad.js +47 -0
- package/dist/commands/export/iso.d.ts +19 -0
- package/dist/commands/export/iso.js +55 -0
- package/dist/commands/export/pkg.d.ts +29 -0
- package/dist/commands/export/pkg.js +173 -0
- package/dist/commands/export/tarballs.d.ts +27 -0
- package/dist/commands/export/tarballs.js +79 -0
- package/dist/commands/install.d.ts +39 -0
- package/dist/commands/install.js +113 -0
- package/dist/commands/kill.d.ts +24 -0
- package/dist/commands/kill.js +50 -0
- package/dist/commands/love.d.ts +21 -0
- package/dist/commands/love.js +73 -0
- package/dist/commands/mom.d.ts +16 -0
- package/dist/commands/mom.js +30 -0
- package/dist/commands/pods.d.ts +22 -0
- package/dist/commands/pods.js +92 -0
- package/dist/commands/produce.d.ts +35 -0
- package/dist/commands/produce.js +221 -0
- package/dist/commands/status.d.ts +23 -0
- package/dist/commands/status.js +31 -0
- package/dist/commands/syncfrom.d.ts +45 -0
- package/dist/commands/syncfrom.js +152 -0
- package/dist/commands/syncto.d.ts +40 -0
- package/dist/commands/syncto.js +175 -0
- package/dist/commands/tools/clean.d.ts +18 -0
- package/dist/commands/tools/clean.js +37 -0
- package/dist/commands/tools/ppa.d.ts +31 -0
- package/dist/commands/tools/ppa.js +244 -0
- package/dist/commands/tools/skel.d.ts +18 -0
- package/dist/commands/tools/skel.js +44 -0
- package/dist/commands/tools/stat.d.ts +31 -0
- package/dist/commands/tools/stat.js +70 -0
- package/dist/commands/tools/yolk.d.ts +24 -0
- package/dist/commands/tools/yolk.js +45 -0
- package/dist/commands/update.d.ts +46 -0
- package/dist/commands/update.js +238 -0
- package/dist/commands/wardrobe/get.d.ts +23 -0
- package/dist/commands/wardrobe/get.js +52 -0
- package/dist/commands/wardrobe/list.d.ts +24 -0
- package/dist/commands/wardrobe/list.js +125 -0
- package/dist/commands/wardrobe/show.d.ts +25 -0
- package/dist/commands/wardrobe/show.js +97 -0
- package/dist/commands/wardrobe/wear.d.ts +26 -0
- package/dist/commands/wardrobe/wear.js +84 -0
- package/dist/dhcpd-proxy/classes/packet.d.ts +36 -0
- package/dist/dhcpd-proxy/classes/packet.js +124 -0
- package/dist/dhcpd-proxy/index.d.ts +4 -0
- package/dist/dhcpd-proxy/index.js +4 -0
- package/dist/dhcpd-proxy/interfaces/i-pxe.d.ts +45 -0
- package/dist/dhcpd-proxy/interfaces/i-pxe.js +1 -0
- package/dist/dhcpd-proxy/lib/packet/converters.d.ts +11 -0
- package/dist/dhcpd-proxy/lib/packet/converters.js +395 -0
- package/dist/dhcpd-proxy/lib/packet/message-types.d.ts +10 -0
- package/dist/dhcpd-proxy/lib/packet/message-types.js +12 -0
- package/dist/dhcpd-proxy/lib/packet/options.d.ts +8 -0
- package/dist/dhcpd-proxy/lib/packet/options.js +264 -0
- package/dist/dhcpd-proxy/lib/sprintf.d.ts +6 -0
- package/dist/dhcpd-proxy/lib/sprintf.js +130 -0
- package/dist/dhcpd-proxy/lib/utils.d.ts +126 -0
- package/dist/dhcpd-proxy/lib/utils.js +255 -0
- package/dist/dhcpd-proxy/simple-proxy.d.ts +11 -0
- package/dist/dhcpd-proxy/simple-proxy.js +118 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/interfaces/calamares/i-calamares-bootloader.d.ts +23 -0
- package/dist/interfaces/calamares/i-calamares-bootloader.js +7 -0
- package/dist/interfaces/calamares/i-calamares-branding.d.ts +46 -0
- package/dist/interfaces/calamares/i-calamares-branding.js +1 -0
- package/dist/interfaces/calamares/i-calamares-displaymanager.d.ts +34 -0
- package/dist/interfaces/calamares/i-calamares-displaymanager.js +1 -0
- package/dist/interfaces/calamares/i-calamares-finished.d.ts +14 -0
- package/dist/interfaces/calamares/i-calamares-finished.js +1 -0
- package/dist/interfaces/calamares/i-calamares-packages.d.ts +26 -0
- package/dist/interfaces/calamares/i-calamares-packages.js +1 -0
- package/dist/interfaces/calamares/i-calamares-partitions.d.ts +39 -0
- package/dist/interfaces/calamares/i-calamares-partitions.js +1 -0
- package/dist/interfaces/calamares/i-calamares-settings.d.ts +36 -0
- package/dist/interfaces/calamares/i-calamares-settings.js +1 -0
- package/dist/interfaces/i-addons.d.ts +12 -0
- package/dist/interfaces/i-addons.js +8 -0
- package/dist/interfaces/i-analyze.d.ts +17 -0
- package/dist/interfaces/i-analyze.js +17 -0
- package/dist/interfaces/i-app.d.ts +14 -0
- package/dist/interfaces/i-app.js +8 -0
- package/dist/interfaces/i-config-tools.d.ts +15 -0
- package/dist/interfaces/i-config-tools.js +8 -0
- package/dist/interfaces/i-devices.d.ts +20 -0
- package/dist/interfaces/i-devices.js +8 -0
- package/dist/interfaces/i-distro.d.ts +23 -0
- package/dist/interfaces/i-distro.js +8 -0
- package/dist/interfaces/i-drive-list.d.ts +33 -0
- package/dist/interfaces/i-drive-list.js +8 -0
- package/dist/interfaces/i-eggs-config.d.ts +32 -0
- package/dist/interfaces/i-eggs-config.js +8 -0
- package/dist/interfaces/i-excludes.d.ts +14 -0
- package/dist/interfaces/i-excludes.js +8 -0
- package/dist/interfaces/i-exec.d.ts +11 -0
- package/dist/interfaces/i-exec.js +8 -0
- package/dist/interfaces/i-initrd.d.ts +13 -0
- package/dist/interfaces/i-initrd.js +8 -0
- package/dist/interfaces/i-install.d.ts +16 -0
- package/dist/interfaces/i-install.js +8 -0
- package/dist/interfaces/i-installer.d.ts +17 -0
- package/dist/interfaces/i-installer.js +8 -0
- package/dist/interfaces/i-luks-passphrase.d.ts +11 -0
- package/dist/interfaces/i-luks-passphrase.js +8 -0
- package/dist/interfaces/i-materia.d.ts +36 -0
- package/dist/interfaces/i-materia.js +8 -0
- package/dist/interfaces/i-net.d.ts +16 -0
- package/dist/interfaces/i-net.js +8 -0
- package/dist/interfaces/i-os-release.d.ts +5 -0
- package/dist/interfaces/i-os-release.js +1 -0
- package/dist/interfaces/i-packages.d.ts +16 -0
- package/dist/interfaces/i-packages.js +8 -0
- package/dist/interfaces/i-partitions.d.ts +16 -0
- package/dist/interfaces/i-partitions.js +8 -0
- package/dist/interfaces/i-pxe.d.ts +45 -0
- package/dist/interfaces/i-pxe.js +1 -0
- package/dist/interfaces/i-remix.d.ts +21 -0
- package/dist/interfaces/i-remix.js +8 -0
- package/dist/interfaces/i-settings.d.ts +33 -0
- package/dist/interfaces/i-settings.js +8 -0
- package/dist/interfaces/i-user.d.ts +14 -0
- package/dist/interfaces/i-user.js +8 -0
- package/dist/interfaces/i-workdir.d.ts +14 -0
- package/dist/interfaces/i-workdir.js +8 -0
- package/dist/interfaces/i-xkb-model.d.ts +24 -0
- package/dist/interfaces/i-xkb-model.js +8 -0
- package/dist/interfaces/index.d.ts +26 -0
- package/dist/interfaces/index.js +8 -0
- package/dist/krill/classes/cfs.d.ts +17 -0
- package/dist/krill/classes/cfs.js +39 -0
- package/dist/krill/classes/krill_enums.d.ts +37 -0
- package/dist/krill/classes/krill_enums.js +41 -0
- package/dist/krill/classes/prepare.d/confirm.d.ts +5 -0
- package/dist/krill/classes/prepare.d/confirm.js +30 -0
- package/dist/krill/classes/prepare.d/keyboard.d.ts +14 -0
- package/dist/krill/classes/prepare.d/keyboard.js +62 -0
- package/dist/krill/classes/prepare.d/location.d.ts +17 -0
- package/dist/krill/classes/prepare.d/location.js +59 -0
- package/dist/krill/classes/prepare.d/network.d.ts +14 -0
- package/dist/krill/classes/prepare.d/network.js +68 -0
- package/dist/krill/classes/prepare.d/partitions.d.ts +14 -0
- package/dist/krill/classes/prepare.d/partitions.js +86 -0
- package/dist/krill/classes/prepare.d/summary.d.ts +15 -0
- package/dist/krill/classes/prepare.d/summary.js +72 -0
- package/dist/krill/classes/prepare.d/users.d.ts +6 -0
- package/dist/krill/classes/prepare.d/users.js +63 -0
- package/dist/krill/classes/prepare.d/welcome.d.ts +6 -0
- package/dist/krill/classes/prepare.d/welcome.js +30 -0
- package/dist/krill/classes/prepare.d.ts +89 -0
- package/dist/krill/classes/prepare.js +319 -0
- package/dist/krill/classes/sequence.d/add_user.d.ts +20 -0
- package/dist/krill/classes/sequence.d/add_user.js +77 -0
- package/dist/krill/classes/sequence.d/bootloader.d.ts +14 -0
- package/dist/krill/classes/sequence.d/bootloader.js +117 -0
- package/dist/krill/classes/sequence.d/bootloader_config.d.ts +14 -0
- package/dist/krill/classes/sequence.d/bootloader_config.js +192 -0
- package/dist/krill/classes/sequence.d/change_password.d.ts +15 -0
- package/dist/krill/classes/sequence.d/change_password.js +18 -0
- package/dist/krill/classes/sequence.d/del_live_user.d.ts +14 -0
- package/dist/krill/classes/sequence.d/del_live_user.js +39 -0
- package/dist/krill/classes/sequence.d/fstab.d.ts +14 -0
- package/dist/krill/classes/sequence.d/fstab.js +177 -0
- package/dist/krill/classes/sequence.d/grubcfg.d.ts +17 -0
- package/dist/krill/classes/sequence.d/grubcfg.js +35 -0
- package/dist/krill/classes/sequence.d/hostname.d.ts +13 -0
- package/dist/krill/classes/sequence.d/hostname.js +50 -0
- package/dist/krill/classes/sequence.d/initramfs.d.ts +13 -0
- package/dist/krill/classes/sequence.d/initramfs.js +54 -0
- package/dist/krill/classes/sequence.d/initramfs_cfg.d.ts +14 -0
- package/dist/krill/classes/sequence.d/initramfs_cfg.js +35 -0
- package/dist/krill/classes/sequence.d/locale.d.ts +13 -0
- package/dist/krill/classes/sequence.d/locale.js +91 -0
- package/dist/krill/classes/sequence.d/locale_cfg.d.ts +10 -0
- package/dist/krill/classes/sequence.d/locale_cfg.js +58 -0
- package/dist/krill/classes/sequence.d/m_keyboard.d.ts +14 -0
- package/dist/krill/classes/sequence.d/m_keyboard.js +58 -0
- package/dist/krill/classes/sequence.d/machine_id.d.ts +15 -0
- package/dist/krill/classes/sequence.d/machine_id.js +33 -0
- package/dist/krill/classes/sequence.d/mkfs.d.ts +15 -0
- package/dist/krill/classes/sequence.d/mkfs.js +88 -0
- package/dist/krill/classes/sequence.d/mount_fs.d.ts +17 -0
- package/dist/krill/classes/sequence.d/mount_fs.js +68 -0
- package/dist/krill/classes/sequence.d/mount_vfs.d.ts +17 -0
- package/dist/krill/classes/sequence.d/mount_vfs.js +59 -0
- package/dist/krill/classes/sequence.d/network_cfg.d.ts +19 -0
- package/dist/krill/classes/sequence.d/network_cfg.js +73 -0
- package/dist/krill/classes/sequence.d/packages.d.ts +14 -0
- package/dist/krill/classes/sequence.d/packages.js +111 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_luks.d.ts +17 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_luks.js +73 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.d.ts +16 -0
- package/dist/krill/classes/sequence.d/partition.d/bios_standard.js +51 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_luks.d.ts +17 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_luks.js +77 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.d.ts +10 -0
- package/dist/krill/classes/sequence.d/partition.d/uefi_standard.js +33 -0
- package/dist/krill/classes/sequence.d/partition.d.ts +14 -0
- package/dist/krill/classes/sequence.d/partition.js +84 -0
- package/dist/krill/classes/sequence.d/remove_installer_link.d.ts +13 -0
- package/dist/krill/classes/sequence.d/remove_installer_link.js +35 -0
- package/dist/krill/classes/sequence.d/umount.d.ts +14 -0
- package/dist/krill/classes/sequence.d/umount.js +28 -0
- package/dist/krill/classes/sequence.d/unpackfs.d.ts +13 -0
- package/dist/krill/classes/sequence.d/unpackfs.js +20 -0
- package/dist/krill/classes/sequence.d.ts +134 -0
- package/dist/krill/classes/sequence.js +400 -0
- package/dist/krill/components/finished.d.ts +16 -0
- package/dist/krill/components/finished.js +56 -0
- package/dist/krill/components/information.d.ts +8 -0
- package/dist/krill/components/information.js +162 -0
- package/dist/krill/components/install.d.ts +15 -0
- package/dist/krill/components/install.js +60 -0
- package/dist/krill/components/keyboard.d.ts +16 -0
- package/dist/krill/components/keyboard.js +54 -0
- package/dist/krill/components/location.d.ts +16 -0
- package/dist/krill/components/location.js +59 -0
- package/dist/krill/components/network.d.ts +19 -0
- package/dist/krill/components/network.js +65 -0
- package/dist/krill/components/partitions.d.ts +18 -0
- package/dist/krill/components/partitions.js +89 -0
- package/dist/krill/components/steps.d.ts +13 -0
- package/dist/krill/components/steps.js +148 -0
- package/dist/krill/components/summary.d.ts +25 -0
- package/dist/krill/components/summary.js +77 -0
- package/dist/krill/components/title.d.ts +11 -0
- package/dist/krill/components/title.js +35 -0
- package/dist/krill/components/users.d.ts +24 -0
- package/dist/krill/components/users.js +80 -0
- package/dist/krill/components/welcome.d.ts +13 -0
- package/dist/krill/components/welcome.js +63 -0
- package/dist/krill/interfaces/i_krill.d.ts +44 -0
- package/dist/krill/interfaces/i_krill.js +8 -0
- package/dist/krill/interfaces/i_krill_config.d.ts +35 -0
- package/dist/krill/interfaces/i_krill_config.js +8 -0
- package/dist/krill/lib/get_address.d.ts +8 -0
- package/dist/krill/lib/get_address.js +23 -0
- package/dist/krill/lib/get_dns.d.ts +8 -0
- package/dist/krill/lib/get_dns.js +23 -0
- package/dist/krill/lib/get_domain.d.ts +8 -0
- package/dist/krill/lib/get_domain.js +23 -0
- package/dist/krill/lib/get_gateway.d.ts +8 -0
- package/dist/krill/lib/get_gateway.js +23 -0
- package/dist/krill/lib/get_hostname.d.ts +8 -0
- package/dist/krill/lib/get_hostname.js +23 -0
- package/dist/krill/lib/get_luks_passphrase.d.ts +8 -0
- package/dist/krill/lib/get_luks_passphrase.js +32 -0
- package/dist/krill/lib/get_netmask.d.ts +8 -0
- package/dist/krill/lib/get_netmask.js +23 -0
- package/dist/krill/lib/get_password.d.ts +8 -0
- package/dist/krill/lib/get_password.js +36 -0
- package/dist/krill/lib/get_userfullname.d.ts +8 -0
- package/dist/krill/lib/get_userfullname.js +23 -0
- package/dist/krill/lib/get_username.d.ts +8 -0
- package/dist/krill/lib/get_username.js +23 -0
- package/dist/krill/lib/select_address_type.d.ts +8 -0
- package/dist/krill/lib/select_address_type.js +24 -0
- package/dist/krill/lib/select_filesystem_type.d.ts +8 -0
- package/dist/krill/lib/select_filesystem_type.js +40 -0
- package/dist/krill/lib/select_installation_device.d.ts +8 -0
- package/dist/krill/lib/select_installation_device.js +40 -0
- package/dist/krill/lib/select_installation_mode.d.ts +9 -0
- package/dist/krill/lib/select_installation_mode.js +25 -0
- package/dist/krill/lib/select_interface.d.ts +8 -0
- package/dist/krill/lib/select_interface.js +24 -0
- package/dist/krill/lib/select_keyboard_layout.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_layout.js +36 -0
- package/dist/krill/lib/select_keyboard_model.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_model.js +34 -0
- package/dist/krill/lib/select_keyboard_option.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_option.js +34 -0
- package/dist/krill/lib/select_keyboard_variant.d.ts +11 -0
- package/dist/krill/lib/select_keyboard_variant.js +35 -0
- package/dist/krill/lib/select_languages.d.ts +8 -0
- package/dist/krill/lib/select_languages.js +28 -0
- package/dist/krill/lib/select_regions.d.ts +8 -0
- package/dist/krill/lib/select_regions.js +24 -0
- package/dist/krill/lib/select_replaced_partition.d.ts +8 -0
- package/dist/krill/lib/select_replaced_partition.js +31 -0
- package/dist/krill/lib/select_user_swap_choice.d.ts +9 -0
- package/dist/krill/lib/select_user_swap_choice.js +35 -0
- package/dist/krill/lib/select_zones.d.ts +8 -0
- package/dist/krill/lib/select_zones.js +518 -0
- package/dist/lib/kill_me_softly.d.ts +11 -0
- package/dist/lib/kill_me_softly.js +61 -0
- package/dist/lib/utils.d.ts +19 -0
- package/dist/lib/utils.js +65 -0
- package/package.json +5 -5
- package/conf/distros/archlinux/calamares/modules/shellprocess@sync.yml +0 -5
- package/conf/distros/opensuse/calamares/modules/dracut.yml +0 -14
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/produce.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import mustache from 'mustache';
|
|
10
|
+
// packages
|
|
11
|
+
import fs from 'node:fs';
|
|
12
|
+
import shx from 'shelljs';
|
|
13
|
+
import path from 'path';
|
|
14
|
+
// libraries
|
|
15
|
+
import { exec } from '../../lib/utils.js';
|
|
16
|
+
import Bleach from './../bleach.js';
|
|
17
|
+
// import { displaymanager } from './../incubation/fisherman-helper/displaymanager.js'
|
|
18
|
+
import Incubator from './../incubation/incubator.js';
|
|
19
|
+
import Pacman from './../pacman.js';
|
|
20
|
+
import Diversions from './../diversions.js';
|
|
21
|
+
// classes
|
|
22
|
+
import Utils from './../utils.js';
|
|
23
|
+
import Repo from './../yolk.js';
|
|
24
|
+
// _dirname
|
|
25
|
+
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
26
|
+
/**
|
|
27
|
+
* produce
|
|
28
|
+
* @param clone
|
|
29
|
+
* @param cryptedclone
|
|
30
|
+
* @param scriptOnly
|
|
31
|
+
* @param yolkRenew
|
|
32
|
+
* @param release
|
|
33
|
+
* @param myAddons
|
|
34
|
+
* @param nointeractive
|
|
35
|
+
* @param noicons
|
|
36
|
+
* @param unsecure
|
|
37
|
+
* @param verbose
|
|
38
|
+
*/
|
|
39
|
+
export async function produce(kernel = '', clone = false, cryptedclone = false, scriptOnly = false, yolkRenew = false, release = false, myAddons, myLinks, excludes, nointeractive = false, noicons = false, unsecure = false, verbose = false) {
|
|
40
|
+
this.verbose = verbose;
|
|
41
|
+
this.echo = Utils.setEcho(verbose);
|
|
42
|
+
if (this.verbose) {
|
|
43
|
+
this.toNull = ' > /dev/null 2>&1';
|
|
44
|
+
}
|
|
45
|
+
this.kernel = kernel;
|
|
46
|
+
this.clone = clone;
|
|
47
|
+
this.cryptedclone = cryptedclone;
|
|
48
|
+
const luksName = 'luks-volume';
|
|
49
|
+
const luksFile = `/tmp/${luksName}`;
|
|
50
|
+
this.nest = this.settings.config.snapshot_dir;
|
|
51
|
+
this.dotMnt = `${this.nest}.mnt`;
|
|
52
|
+
this.dotOverlay = this.settings.work_dir;
|
|
53
|
+
this.dotLivefs = this.settings.work_dir.merged;
|
|
54
|
+
/**
|
|
55
|
+
* define kernel
|
|
56
|
+
*/
|
|
57
|
+
if (this.kernel === '') {
|
|
58
|
+
if (this.familyId === 'alpine') {
|
|
59
|
+
const moduleDirs = fs.readdirSync('/lib/modules');
|
|
60
|
+
this.kernel = moduleDirs[0];
|
|
61
|
+
}
|
|
62
|
+
else if (this.familyId === 'archlinux') {
|
|
63
|
+
const moduleDirs = fs.readdirSync('/usr/lib/modules');
|
|
64
|
+
this.kernel = moduleDirs[0];
|
|
65
|
+
/**
|
|
66
|
+
* no need more
|
|
67
|
+
*/
|
|
68
|
+
if (Diversions.isManjaroBased(this.distroId)) {
|
|
69
|
+
// this.kernel += '-MANJARO'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else { // debian, fedora, openmamba, opensuse, voidlinux
|
|
73
|
+
let vmlinuz = path.basename(Utils.vmlinuz());
|
|
74
|
+
this.kernel = vmlinuz.substring(vmlinuz.indexOf('-') + 1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* define this.vmlinuz
|
|
79
|
+
*/
|
|
80
|
+
this.vmlinuz = Utils.vmlinuz();
|
|
81
|
+
/**
|
|
82
|
+
* define this.initrd
|
|
83
|
+
*/
|
|
84
|
+
this.initrd = Utils.initrdImg(this.kernel);
|
|
85
|
+
/**
|
|
86
|
+
* yolk
|
|
87
|
+
*/
|
|
88
|
+
if (this.familyId === 'debian' && Utils.uefiArch() === 'amd64') {
|
|
89
|
+
const yolk = new Repo();
|
|
90
|
+
if (!yolk.exists()) {
|
|
91
|
+
Utils.warning('creating yolk');
|
|
92
|
+
await yolk.create(verbose);
|
|
93
|
+
}
|
|
94
|
+
else if (yolkRenew) {
|
|
95
|
+
Utils.warning('refreshing yolk');
|
|
96
|
+
await yolk.erase();
|
|
97
|
+
await yolk.create(verbose);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
Utils.warning('using preesixent yolk');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (!fs.existsSync(this.settings.config.snapshot_dir)) {
|
|
104
|
+
shx.mkdir('-p', this.settings.config.snapshot_dir);
|
|
105
|
+
}
|
|
106
|
+
if (Utils.isLive()) {
|
|
107
|
+
console.log(chalk.red('>>> eggs: This is a live system! An egg cannot be produced from an egg!'));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
await this.liveCreateStructure();
|
|
111
|
+
// Carica calamares solo se le icone sono accettate
|
|
112
|
+
if (!noicons && // se VOGLIO le icone
|
|
113
|
+
!nointeractive &&
|
|
114
|
+
this.settings.distro.isCalamaresAvailable &&
|
|
115
|
+
Pacman.isInstalledGui() &&
|
|
116
|
+
this.settings.config.force_installer &&
|
|
117
|
+
!Pacman.calamaresExists()) {
|
|
118
|
+
console.log('Installing ' + chalk.bgGray('calamares') + ' due force_installer=yes.');
|
|
119
|
+
await Pacman.calamaresInstall(verbose);
|
|
120
|
+
const bleach = new Bleach();
|
|
121
|
+
await bleach.clean(verbose);
|
|
122
|
+
}
|
|
123
|
+
if (cryptedclone) {
|
|
124
|
+
/**
|
|
125
|
+
* cryptedclone
|
|
126
|
+
*/
|
|
127
|
+
console.log("eggs will SAVE users and users' data ENCRYPTED");
|
|
128
|
+
}
|
|
129
|
+
else if (this.clone) {
|
|
130
|
+
/**
|
|
131
|
+
* clone
|
|
132
|
+
*/
|
|
133
|
+
this.settings.config.user_opt = 'live'; // patch for humans
|
|
134
|
+
this.settings.config.user_opt_passwd = 'evolution';
|
|
135
|
+
this.settings.config.root_passwd = 'evolution';
|
|
136
|
+
Utils.warning("eggs will SAVE users and users' data UNCRYPTED on the live");
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
/**
|
|
140
|
+
* normal
|
|
141
|
+
*/
|
|
142
|
+
Utils.warning("eggs will REMOVE users and users' data from live");
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* exclude.list
|
|
146
|
+
*/
|
|
147
|
+
if (!excludes.static && !fs.existsSync('/etc/penguins-eggs/exclude.list')) {
|
|
148
|
+
const excludeListTemplateDir = '/etc/penguins-eggs.d/exclude.list.d/';
|
|
149
|
+
const excludeListTemplate = excludeListTemplateDir + 'master.list';
|
|
150
|
+
if (!fs.existsSync(excludeListTemplate)) {
|
|
151
|
+
Utils.warning('Cannot find: ' + excludeListTemplate);
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
let excludeUsr = '';
|
|
155
|
+
let excludeVar = '';
|
|
156
|
+
let excludeHomes = '';
|
|
157
|
+
let excludeHome = '';
|
|
158
|
+
if (excludes.usr) {
|
|
159
|
+
excludeUsr = fs.readFileSync(`${excludeListTemplateDir}usr.list`, 'utf8');
|
|
160
|
+
}
|
|
161
|
+
if (excludes.var) {
|
|
162
|
+
excludeVar = fs.readFileSync(`${excludeListTemplateDir}var.list`, 'utf8');
|
|
163
|
+
}
|
|
164
|
+
if (excludes.homes) {
|
|
165
|
+
excludeHomes = fs.readFileSync(`${excludeListTemplateDir}homes.list`, 'utf8');
|
|
166
|
+
}
|
|
167
|
+
if (excludes.home) {
|
|
168
|
+
excludeHome = `home/${await Utils.getPrimaryUser()}/*`;
|
|
169
|
+
}
|
|
170
|
+
const view = {
|
|
171
|
+
home_list: excludeHome,
|
|
172
|
+
homes_list: excludeHomes,
|
|
173
|
+
usr_list: excludeUsr,
|
|
174
|
+
var_list: excludeVar
|
|
175
|
+
};
|
|
176
|
+
const template = fs.readFileSync(excludeListTemplate, 'utf8');
|
|
177
|
+
fs.writeFileSync(this.settings.config.snapshot_excludes, mustache.render(template, view));
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* NOTE: reCreate = false
|
|
181
|
+
*
|
|
182
|
+
* reCreate = false is just for develop
|
|
183
|
+
* put reCreate = true in release
|
|
184
|
+
*/
|
|
185
|
+
const reCreate = true;
|
|
186
|
+
let mksquashfsCmd = '';
|
|
187
|
+
if (reCreate) {
|
|
188
|
+
// start pre-clone
|
|
189
|
+
/**
|
|
190
|
+
* installer
|
|
191
|
+
*/
|
|
192
|
+
this.incubator = new Incubator(this.settings.remix, this.settings.distro, this.settings.config.user_opt, this.theme, this.clone, verbose);
|
|
193
|
+
await this.incubator.config(release);
|
|
194
|
+
// need syslinux?
|
|
195
|
+
const arch = process.arch;
|
|
196
|
+
if (arch === 'ia32' || arch === 'x64') {
|
|
197
|
+
await this.syslinux(this.theme);
|
|
198
|
+
}
|
|
199
|
+
await this.kernelCopy();
|
|
200
|
+
/**
|
|
201
|
+
* spostare alla fine per dracut
|
|
202
|
+
*/
|
|
203
|
+
if (this.familyId === 'alpine') {
|
|
204
|
+
await this.initrdAlpine();
|
|
205
|
+
}
|
|
206
|
+
else if (this.familyId === 'archlinux') {
|
|
207
|
+
await this.initrdArch();
|
|
208
|
+
}
|
|
209
|
+
else if (this.familyId === 'debian') {
|
|
210
|
+
await this.initrdDebian();
|
|
211
|
+
}
|
|
212
|
+
else if (this.familyId === 'fedora' ||
|
|
213
|
+
this.familyId === 'openmamba' ||
|
|
214
|
+
this.familyId === 'opensuse' ||
|
|
215
|
+
this.familyId === 'voidlinux') {
|
|
216
|
+
await this.initrdDracut();
|
|
217
|
+
}
|
|
218
|
+
if (this.settings.config.make_efi) {
|
|
219
|
+
await this.makeEfi(this.theme);
|
|
220
|
+
}
|
|
221
|
+
await this.bindLiveFs();
|
|
222
|
+
// We run them just to have scripts
|
|
223
|
+
await this.bindVfs();
|
|
224
|
+
await this.ubindVfs();
|
|
225
|
+
if (!this.clone) {
|
|
226
|
+
/**
|
|
227
|
+
* ANCHE per cryptedclone
|
|
228
|
+
*/
|
|
229
|
+
await this.usersRemove();
|
|
230
|
+
await this.userCreateLive();
|
|
231
|
+
if (Pacman.isInstalledGui()) {
|
|
232
|
+
await this.createXdgAutostart(this.settings.config.theme, myAddons, myLinks, noicons);
|
|
233
|
+
/**
|
|
234
|
+
* GUI installed but NOT Desktop Manager: just create motd and issue
|
|
235
|
+
*/
|
|
236
|
+
// if (displaymanager().length > 0) {
|
|
237
|
+
// this.cliAutologin.addIssue(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged)
|
|
238
|
+
// this.cliAutologin.addMotd(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged)
|
|
239
|
+
// }
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
this.cliAutologin.add(this.settings.distro.distroId, this.settings.distro.codenameId, this.settings.config.user_opt, this.settings.config.user_opt_passwd, this.settings.config.root_passwd, this.settings.work_dir.merged);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
await this.editLiveFs(clone, cryptedclone);
|
|
246
|
+
mksquashfsCmd = await this.makeSquashfs(scriptOnly, unsecure);
|
|
247
|
+
await this.uBindLiveFs(); // Lo smonto prima della fase di backup
|
|
248
|
+
}
|
|
249
|
+
if (cryptedclone) {
|
|
250
|
+
let synctoCmd = `eggs syncto -f ${luksFile}`;
|
|
251
|
+
if (excludes.home) {
|
|
252
|
+
synctoCmd += ' --excludes'; // from Marco, usa home.list
|
|
253
|
+
}
|
|
254
|
+
await exec(synctoCmd, Utils.setEcho(true));
|
|
255
|
+
Utils.warning(`moving ${luksFile} in ${this.nest}(ISO)/live`);
|
|
256
|
+
await exec(`mv ${luksFile} ${this.nest}(ISO)/live`, this.echo);
|
|
257
|
+
}
|
|
258
|
+
const mkIsofsCmd = (await this.xorrisoCommand(clone, cryptedclone)).replaceAll(/\s\s+/g, ' ');
|
|
259
|
+
this.makeDotDisk(this.volid, mksquashfsCmd, mkIsofsCmd);
|
|
260
|
+
/**
|
|
261
|
+
* AntiX/MX LINUX
|
|
262
|
+
*/
|
|
263
|
+
if (fs.existsSync('/etc/antix-version')) {
|
|
264
|
+
let uname = (await exec('uname -r', { capture: true })).data;
|
|
265
|
+
uname = uname.replaceAll('\n', '');
|
|
266
|
+
let content = '';
|
|
267
|
+
content = '#!/usr/bin/env bash';
|
|
268
|
+
content += 'mkdir /live/bin -p\n';
|
|
269
|
+
content += '## \n';
|
|
270
|
+
content += '# cp /usr/lib/penguins-eggs/scripts/non-live-cmdline /live/bin -p\n';
|
|
271
|
+
content += '# chmod +x /live/bin/non-live-cmdline\n';
|
|
272
|
+
content += '## \n';
|
|
273
|
+
content += 'mkdir /live/boot-dev/antiX -p\n';
|
|
274
|
+
content += 'ln -s /run/live/medium/live/filesystem.squashfs /live/boot-dev/antiX/linuxfs\n';
|
|
275
|
+
content += `ln -s /run/live/medium/live/initrd.img-${uname} /live/boot-dev/antiX/initrd.gz\n`;
|
|
276
|
+
content += `ln -s /run/live/medium/live/vmlinuz-${uname} /live/boot-dev/antiX/vmlinuz\n`;
|
|
277
|
+
content += `# md5sum /live/boot-dev/antiX/linuxfs > /live/boot-dev/antiX/linuxfs.md5\n`;
|
|
278
|
+
content += `# md5sum /live/boot-dev/antiX/initrd.gz > /live/boot-dev/antiX/initrd.gz.md5\n`;
|
|
279
|
+
content += `# md5sum /live/boot-dev/antiX/vmlinuz > /live/boot-dev/antiX/vmlinuz.md5\n`;
|
|
280
|
+
content += `# /live/aufs -> /run/live/rootfs/filesystem.squashfs\n`;
|
|
281
|
+
content += 'ln -s /run/live/rootfs/filesystem.squashfs /live/aufs\n';
|
|
282
|
+
content += `# use: minstall -no-media-check\n`;
|
|
283
|
+
content += 'minstall --no-media-check\n';
|
|
284
|
+
const file = `${this.settings.iso_work}antix-mx-installer`;
|
|
285
|
+
fs.writeFileSync(file, content);
|
|
286
|
+
await exec(`chmod +x ${file}`);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* patch to emulate miso/archiso on archilinux family
|
|
290
|
+
*/
|
|
291
|
+
if (this.familyId === 'archlinux') {
|
|
292
|
+
let filesystemName = `arch/x86_64/airootfs.sfs`;
|
|
293
|
+
let hashCmd = 'sha512sum';
|
|
294
|
+
let hashExt = '.sha512';
|
|
295
|
+
if (Diversions.isManjaroBased(this.settings.distro.distroId)) {
|
|
296
|
+
filesystemName = `manjaro/x86_64/livefs.sfs`;
|
|
297
|
+
hashCmd = `md5sum`;
|
|
298
|
+
hashExt = '.md5';
|
|
299
|
+
}
|
|
300
|
+
await exec(`mkdir ${this.settings.iso_work}${path.dirname(filesystemName)} -p`, this.echo);
|
|
301
|
+
await exec(`ln ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}${filesystemName}`, this.echo);
|
|
302
|
+
/**
|
|
303
|
+
* patch 4 mksquashfs
|
|
304
|
+
*/
|
|
305
|
+
let fname = `${this.settings.work_dir.ovarium}mksquashfs`;
|
|
306
|
+
let content = fs.readFileSync(fname, 'utf8');
|
|
307
|
+
const patched = '# Arch and Manjaro based distro need this link';
|
|
308
|
+
// not need check, is always clean here... but OK
|
|
309
|
+
if (!content.includes(patched)) {
|
|
310
|
+
content += patched + '\n';
|
|
311
|
+
content += `if [ ! -e "${filesystemName}" ]; then\n`;
|
|
312
|
+
content += ` ln ${this.settings.iso_work}live/filesystem.squashfs ${this.settings.iso_work}${filesystemName}\n`;
|
|
313
|
+
content += `fi\n`;
|
|
314
|
+
fs.writeFileSync(fname, content, 'utf8');
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
await this.makeIso(mkIsofsCmd, scriptOnly);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/initrd-arch.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param cmd
|
|
11
|
+
* @param echo
|
|
12
|
+
*/
|
|
13
|
+
export default function rexec(cmd: string, verbose?: boolean): Promise<string>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/initrd-arch.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
// packages
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
import chalk from 'chalk';
|
|
11
|
+
// classes
|
|
12
|
+
import { exec } from '../../lib/utils.js';
|
|
13
|
+
import Utils from '../utils.js';
|
|
14
|
+
// _dirname
|
|
15
|
+
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param cmd
|
|
19
|
+
* @param echo
|
|
20
|
+
*/
|
|
21
|
+
export default async function rexec(cmd, verbose = false) {
|
|
22
|
+
if (verbose) {
|
|
23
|
+
console.log(`Ovary: rexec(${cmd})`);
|
|
24
|
+
}
|
|
25
|
+
const echo = Utils.setEcho(verbose);
|
|
26
|
+
/**
|
|
27
|
+
* skip umount errors
|
|
28
|
+
*/
|
|
29
|
+
const check = await exec(cmd, echo);
|
|
30
|
+
if (!cmd.startsWith('umount') && check.code !== 0) {
|
|
31
|
+
console.log(`eggs >>> error on command: ` + chalk.cyan(cmd) + ', code: ' + chalk.cyan(check.code));
|
|
32
|
+
}
|
|
33
|
+
return cmd;
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/produce.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import Ovary from './../ovary.js';
|
|
9
|
+
/**
|
|
10
|
+
* syslinux: da syspath
|
|
11
|
+
*/
|
|
12
|
+
export declare function syslinux(this: Ovary, theme?: string): Promise<void>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/produce.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import mustache from 'mustache';
|
|
9
|
+
// packages
|
|
10
|
+
import fs from 'node:fs';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
// backup
|
|
13
|
+
// interfaces
|
|
14
|
+
// libraries
|
|
15
|
+
import { exec } from '../../lib/utils.js';
|
|
16
|
+
import Diversions from './../diversions.js';
|
|
17
|
+
import Utils from './../utils.js';
|
|
18
|
+
// _dirname
|
|
19
|
+
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
20
|
+
let bootloaders = '/usr/lib/';
|
|
21
|
+
/**
|
|
22
|
+
* syslinux: da syspath
|
|
23
|
+
*/
|
|
24
|
+
export async function syslinux(theme = 'eggs') {
|
|
25
|
+
const bootloaders = Diversions.bootloaders(this.familyId);
|
|
26
|
+
let sysPath = path.join(bootloaders, 'syslinux/modules/bios');
|
|
27
|
+
let isoPath = path.join(bootloaders, 'ISOLINUX');
|
|
28
|
+
await exec(`cp ${sysPath}/chain.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
29
|
+
await exec(`cp ${isoPath}/isohdpfx.bin ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
30
|
+
// just for x64 arch
|
|
31
|
+
await exec(`cp ${isoPath}/isolinux.bin ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
32
|
+
await exec(`cp ${sysPath}/ldlinux.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
33
|
+
await exec(`cp ${sysPath}/libcom32.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
34
|
+
await exec(`cp ${sysPath}/libutil.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
35
|
+
await exec(`cp ${sysPath}/vesamenu.c32 ${this.settings.iso_work}/isolinux/`, this.echo);
|
|
36
|
+
const isolinuxThemeDest = this.settings.iso_work + 'isolinux/isolinux.theme.cfg';
|
|
37
|
+
let isolinuxThemeSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/isolinux.theme.cfg`);
|
|
38
|
+
if (this.theme.includes('/')) {
|
|
39
|
+
isolinuxThemeSrc = `${theme}/theme/livecd/isolinux.theme.cfg`;
|
|
40
|
+
}
|
|
41
|
+
if (!fs.existsSync(isolinuxThemeSrc)) {
|
|
42
|
+
Utils.warning('Cannot find: ' + isolinuxThemeSrc);
|
|
43
|
+
process.exit();
|
|
44
|
+
}
|
|
45
|
+
fs.copyFileSync(isolinuxThemeSrc, isolinuxThemeDest);
|
|
46
|
+
/**
|
|
47
|
+
* isolinux.cfg from isolinux.main.cfg
|
|
48
|
+
*/
|
|
49
|
+
const isolinuxDest = `${this.settings.iso_work}/isolinux/isolinux.cfg`;
|
|
50
|
+
this.settings.iso_work + 'isolinux/isolinux.cfg';
|
|
51
|
+
let isolinuxTemplate = `${theme}/theme/livecd/isolinux.main.cfg`;
|
|
52
|
+
if (!fs.existsSync(isolinuxTemplate)) {
|
|
53
|
+
isolinuxTemplate = path.resolve(__dirname, '../../../addons/eggs/theme/livecd/isolinux.main.cfg');
|
|
54
|
+
}
|
|
55
|
+
if (!fs.existsSync(isolinuxTemplate)) {
|
|
56
|
+
Utils.warning('Cannot find: ' + isolinuxTemplate);
|
|
57
|
+
process.exit();
|
|
58
|
+
}
|
|
59
|
+
const kernel_parameters = Diversions.kernelParameters(this.familyId, this.volid);
|
|
60
|
+
const template = fs.readFileSync(isolinuxTemplate, 'utf8');
|
|
61
|
+
const view = {
|
|
62
|
+
fullname: this.settings.remix.fullname.toUpperCase(),
|
|
63
|
+
initrdImg: `/live/${path.basename(this.initrd)}`,
|
|
64
|
+
kernel: this.kernel,
|
|
65
|
+
kernel_parameters,
|
|
66
|
+
vmlinuz: `/live/${path.basename(this.vmlinuz)}`
|
|
67
|
+
};
|
|
68
|
+
fs.writeFileSync(isolinuxDest, mustache.render(template, view));
|
|
69
|
+
/**
|
|
70
|
+
* splash
|
|
71
|
+
*/
|
|
72
|
+
const splashDest = `${this.settings.iso_work}/isolinux/splash.png`;
|
|
73
|
+
let splashSrc = path.resolve(__dirname, `../../../addons/${theme}/theme/livecd/splash.png`);
|
|
74
|
+
if (this.theme.includes('/')) {
|
|
75
|
+
splashSrc = path.resolve(`${theme}/theme/livecd/splash.png`);
|
|
76
|
+
}
|
|
77
|
+
if (!fs.existsSync(splashSrc)) {
|
|
78
|
+
Utils.warning('Cannot find: ' + splashSrc);
|
|
79
|
+
process.exit();
|
|
80
|
+
}
|
|
81
|
+
fs.copyFileSync(splashSrc, splashDest);
|
|
82
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/create-user-live.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import Ovary from '../ovary.js';
|
|
9
|
+
/**
|
|
10
|
+
* list degli utenti: grep -E 1[0-9]{3} /etc/passwd | sed s/:/\ / | awk '{print $1}'
|
|
11
|
+
* create la home per user_opt
|
|
12
|
+
* @param verbose
|
|
13
|
+
*/
|
|
14
|
+
export declare function userCreateLive(this: Ovary): Promise<void>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/create-user-live.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
// packages
|
|
9
|
+
import fs from 'fs';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import yaml from 'js-yaml';
|
|
12
|
+
// functions
|
|
13
|
+
import { exec } from '../../lib/utils.js';
|
|
14
|
+
import rexec from './rexec.js';
|
|
15
|
+
import Utils from '../utils.js';
|
|
16
|
+
// _dirname
|
|
17
|
+
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
18
|
+
/**
|
|
19
|
+
* list degli utenti: grep -E 1[0-9]{3} /etc/passwd | sed s/:/\ / | awk '{print $1}'
|
|
20
|
+
* create la home per user_opt
|
|
21
|
+
* @param verbose
|
|
22
|
+
*/
|
|
23
|
+
export async function userCreateLive() {
|
|
24
|
+
if (this.verbose) {
|
|
25
|
+
console.log('Ovary: userCreateLive');
|
|
26
|
+
}
|
|
27
|
+
const cmds = [];
|
|
28
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' rm /home/' + this.settings.config.user_opt + ' -rf', this.verbose));
|
|
29
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' mkdir /home/' + this.settings.config.user_opt, this.verbose));
|
|
30
|
+
// Create user using useradd
|
|
31
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' useradd ' + this.settings.config.user_opt + ' --home-dir /home/' + this.settings.config.user_opt + ' --shell /bin/bash ', this.verbose));
|
|
32
|
+
// live password
|
|
33
|
+
cmds.push(await rexec('echo ' + this.settings.config.user_opt + ':' + this.settings.config.user_opt_passwd + ' | chroot ' + this.settings.work_dir.merged + ' /usr/sbin/chpasswd', this.verbose));
|
|
34
|
+
// root password
|
|
35
|
+
cmds.push(await rexec(' echo root:' + this.settings.config.root_passwd + ' | chroot ' + this.settings.work_dir.merged + ' /usr/sbin/chpasswd', this.verbose));
|
|
36
|
+
// Alpine naked don't have /etc/skel
|
|
37
|
+
if (fs.existsSync('/etc/skel')) {
|
|
38
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' cp /etc/skel/. /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
39
|
+
}
|
|
40
|
+
// da problemi con il mount sshfs
|
|
41
|
+
cmds.push(await rexec('chroot ' + this.settings.work_dir.merged + ' chown ' + this.settings.config.user_opt + ':users' + ' /home/' + this.settings.config.user_opt + ' -R', this.verbose));
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
switch (this.familyId) {
|
|
46
|
+
case 'alpine': {
|
|
47
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
case 'archlinux': {
|
|
51
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} wheel`, this.verbose));
|
|
52
|
+
// check or create group: autologin
|
|
53
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} getent group autologin || chroot ${this.settings.work_dir.merged} groupadd autologin`, this.verbose));
|
|
54
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} gpasswd -a ${this.settings.config.user_opt} autologin`, this.verbose));
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case 'debian': {
|
|
58
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sudo ${this.settings.config.user_opt}`, this.verbose));
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case 'fedora': {
|
|
62
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case 'openmamba': {
|
|
66
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG sysadmin ${this.settings.config.user_opt}`, this.verbose));
|
|
67
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG autologin ${this.settings.config.user_opt}`, this.verbose));
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 'opensuse': {
|
|
71
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG wheel ${this.settings.config.user_opt}`, this.verbose));
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
// No default
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* look to calamares/modules/users.conf for groups
|
|
78
|
+
*/
|
|
79
|
+
let usersConf = '/etc/calamares/modules/users.conf';
|
|
80
|
+
if (!fs.existsSync(usersConf)) {
|
|
81
|
+
usersConf = '/etc/penguins-eggs.d/krill/modules/users.conf';
|
|
82
|
+
}
|
|
83
|
+
if (fs.existsSync(usersConf)) {
|
|
84
|
+
const o = yaml.load(fs.readFileSync(usersConf, 'utf8'));
|
|
85
|
+
for (const group of o.defaultGroups) {
|
|
86
|
+
const groupExists = await exec(`chroot ${this.settings.work_dir.merged} getent group ${group}`, { ignore: true });
|
|
87
|
+
if (groupExists.code == 0) {
|
|
88
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} usermod -aG ${group} ${this.settings.config.user_opt} ${this.toNull}`, this.verbose));
|
|
89
|
+
Utils.warning(`added ${this.settings.config.user_opt} to group ${group}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
console.log(`il file ${usersConf} non esiste!`);
|
|
95
|
+
await Utils.pressKeyToExit();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/users-remove.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import Ovary from './../ovary.js';
|
|
9
|
+
export declare function usersRemove(this: Ovary): Promise<void>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/ovary.d/users-remove.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
// packages
|
|
9
|
+
import path from 'node:path';
|
|
10
|
+
// backup
|
|
11
|
+
// interfaces
|
|
12
|
+
// libraries
|
|
13
|
+
import { exec } from '../../lib/utils.js';
|
|
14
|
+
import rexec from './rexec.js';
|
|
15
|
+
import Diversions from './../diversions.js';
|
|
16
|
+
// _dirname
|
|
17
|
+
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
18
|
+
//async cleanUsersAccounts() {
|
|
19
|
+
export async function usersRemove() {
|
|
20
|
+
if (this.verbose) {
|
|
21
|
+
console.log('Ovary: cleanUsersAccounts');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* delete all user in chroot
|
|
25
|
+
*/
|
|
26
|
+
const cmds = [];
|
|
27
|
+
const cmd = `chroot ${this.settings.work_dir.merged} getent passwd {1000..60000} |awk -F: '{print $1}'`;
|
|
28
|
+
const result = await exec(cmd, {
|
|
29
|
+
capture: true,
|
|
30
|
+
echo: this.verbose,
|
|
31
|
+
ignore: false
|
|
32
|
+
});
|
|
33
|
+
const users = result.data.split('\n');
|
|
34
|
+
let deluser = Diversions.deluser(this.familyId);
|
|
35
|
+
for (let i = 0; i < users.length - 1; i++) {
|
|
36
|
+
cmds.push(await rexec(`chroot ${this.settings.work_dir.merged} ${deluser} ${users[i]}`, this.verbose));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ./src/classes/xorriso-command.ts
|
|
3
|
+
* penguins-eggs v.25.7.x / ecmascript 2020
|
|
4
|
+
* author: Piero Proietti
|
|
5
|
+
* email: piero.proietti@gmail.com
|
|
6
|
+
* license: MIT
|
|
7
|
+
*/
|
|
8
|
+
import Ovary from '../ovary.js';
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param cryptedclone
|
|
12
|
+
* @returns cmd 4 mkiso
|
|
13
|
+
*/
|
|
14
|
+
export declare function xorrisoCommand(this: Ovary, clone?: boolean, cryptedclone?: boolean): Promise<string>;
|