├── .bumpversion.cfg ├── .codacy.yml ├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── ci-code-style.yml │ ├── ci-config-functions.yml │ ├── ci-differential-shellcheck.yml │ ├── ci-documentation.yml │ ├── ci-publish-pages.yml │ ├── ci-publish-to-pypi.yml │ ├── ci-units-types.yml │ └── ci-update-build-tests.yml ├── .gitignore ├── .gitlab-ci-disabled.yml ├── .mailmap ├── .obs_test ├── .obs_test_status ├── LICENSE ├── Makefile ├── README.rst ├── build-tests.sh ├── build-tests ├── arm │ ├── fedora │ │ ├── .repos │ │ ├── kiwi-settings │ │ │ ├── kiwi-settings.spec │ │ │ └── kiwi-settings │ │ │ │ └── kiwi.yml │ │ └── test-image-live │ │ │ ├── appliance.kiwi │ │ │ └── config.sh │ ├── rawhide │ │ ├── .repos │ │ └── test-image-live-disk │ │ │ ├── appliance.kiwi │ │ │ └── config.sh │ ├── tumbleweed │ │ ├── .repos │ │ ├── test-image-live-disk │ │ │ ├── appliance.kiwi │ │ │ └── config.sh │ │ ├── test-image-rpi-overlay │ │ │ ├── appliance.kiwi │ │ │ ├── config.sh │ │ │ └── uboot-image-raspberrypi4-install │ │ └── test-image-rpi │ │ │ ├── appliance.kiwi │ │ │ ├── config.sh │ │ │ ├── editbootinstall_rpi.sh │ │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ └── ubuntu │ │ ├── .repos │ │ └── test-image-rpi │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── editbootinstall_rpi.sh │ │ ├── pre_disk_sync.sh │ │ └── root │ │ ├── boot │ │ └── efi │ │ │ ├── boot.cmd │ │ │ └── config.txt │ │ ├── etc │ │ ├── apt │ │ │ └── sources.list │ │ ├── default │ │ │ └── rpi-eeprom-update │ │ ├── firstboot │ │ ├── sudoers │ │ ├── systemd │ │ │ ├── network │ │ │ │ └── 20-local.network │ │ │ ├── system │ │ │ │ └── symlink-resolvconf.service │ │ │ └── timesyncd.conf │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ │ └── var │ │ └── tmp │ │ └── firmware │ │ ├── linux-firmware-raspi2_6-0ubuntu3_arm64.deb │ │ └── linux-firmware-raspi_6-0ubuntu3_arm64.deb ├── ppc │ ├── rawhide │ │ ├── .repos │ │ └── test-image-live │ │ │ └── appliance.kiwi │ └── tumbleweed │ │ ├── .repos │ │ ├── test-image-disk-simple │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ │ └── test-image-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ └── etc │ │ ├── sysconfig │ │ └── network │ │ │ └── ifcfg-lan0 │ │ └── udev │ │ └── rules.d │ │ └── 70-persistent-net.rules ├── s390 │ ├── rawhide │ │ ├── .repos │ │ └── test-image-disk │ │ │ ├── appliance.kiwi │ │ │ └── config.sh │ └── tumbleweed │ │ ├── .repos │ │ ├── kiwi-settings │ │ ├── kiwi-settings.spec │ │ └── kiwi-settings │ │ │ └── kiwi.yml │ │ ├── test-image-MicroOS │ │ ├── .skip_boxbuild_container │ │ ├── .skip_boxbuild_vm │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── disk.sh │ │ ├── root │ │ │ └── etc │ │ │ │ ├── dracut.conf.d │ │ │ │ └── oem_resize.conf │ │ │ │ └── systemd │ │ │ │ └── network │ │ │ │ └── 20-local.network │ │ └── run │ │ └── test-image-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── pre_disk_sync.sh └── x86 │ ├── alpine │ ├── .repos │ └── test-image-disk │ │ └── appliance.kiwi │ ├── archlinux │ ├── .repos │ └── test-image-live-disk-kis │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── editbootinstall_arch.sh │ │ ├── iso_boot.template │ │ └── root │ │ ├── etc │ │ ├── dracut.conf.d │ │ │ └── 02_arch.conf │ │ ├── netctl │ │ │ └── ethernet-dhcp │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ │ └── fastboot │ ├── centos │ ├── .repos │ └── test-image-live-disk-v9 │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ ├── etc │ │ ├── selinux │ │ │ └── config │ │ ├── sysconfig │ │ │ ├── firstboot │ │ │ ├── network │ │ │ └── network-scripts │ │ │ │ └── ifcfg-lan0 │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ │ └── fastboot │ ├── debian │ ├── .repos │ └── test-image-live-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ └── etc │ │ ├── network │ │ └── interfaces.d │ │ │ └── lan0 │ │ └── udev │ │ └── rules.d │ │ └── 70-persistent-net.rules │ ├── fedora │ ├── .repos │ ├── kiwi-settings │ │ ├── kiwi-settings.spec │ │ └── kiwi-settings │ │ │ └── kiwi.yml │ ├── test-image-docker │ │ ├── .skip_boxbuild_container │ │ └── appliance.kiwi │ └── test-image-live-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── iso-esp-excludes.yaml │ │ └── root │ │ ├── etc │ │ ├── selinux │ │ │ └── config │ │ ├── sysconfig │ │ │ ├── firstboot │ │ │ ├── network │ │ │ └── network-scripts │ │ │ │ └── ifcfg-lan0 │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ │ └── fastboot │ ├── leap │ ├── .repos │ ├── kiwi-settings │ │ ├── kiwi-settings.spec │ │ └── kiwi-settings │ │ │ └── kiwi.yml │ ├── test-image-custom-partitions │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── custom_partitions_create.sh │ │ ├── custom_partitions_setup.sh │ │ └── root │ │ │ └── config_partids.patch │ ├── test-image-disk-ramdisk │ │ └── appliance.kiwi │ ├── test-image-disk-selinux │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── test-image-disk-simple │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── disk.sh │ │ └── root │ │ │ ├── .kiwi_dracut_hostonly.trigger │ │ │ ├── .kiwi_grub_config.trigger │ │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ ├── dracut_hostonly.service │ │ │ └── grub_config.service │ ├── test-image-docker-derived │ │ ├── .skip_boxbuild_container │ │ └── appliance.kiwi │ ├── test-image-docker │ │ ├── .skip_boxbuild_container │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── etc │ │ │ ├── ssh │ │ │ │ └── sshd_config │ │ │ ├── sudoers │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── home │ │ │ └── vagrant │ │ │ └── .ssh │ │ │ └── authorized_keys │ ├── test-image-embedded │ │ ├── appliance.kiwi │ │ └── root │ │ │ ├── overlayroot │ │ │ └── .persistent │ │ │ ├── sbin │ │ │ └── overlayroot │ │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── systemd-remount-fs.service │ ├── test-image-live │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-luks │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-lvm │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-overlayroot │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-tbz │ │ └── appliance.kiwi │ └── test-image-vagrant │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── rawhide │ ├── .repos │ ├── test-image-dnf5 │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── test-image-erofs │ │ └── appliance.kiwi │ ├── test-image-live-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── etc │ │ │ ├── selinux │ │ │ │ └── config │ │ │ ├── sysconfig │ │ │ │ ├── firstboot │ │ │ │ ├── network │ │ │ │ └── network-scripts │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── fastboot │ ├── test-image-nitro-enclave │ │ ├── appliance.kiwi │ │ └── config.sh │ └── test-image-systemd-boot │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ └── etc │ │ ├── sysconfig │ │ └── network-scripts │ │ │ └── ifcfg-lan0 │ │ └── udev │ │ └── rules.d │ │ └── 70-persistent-net.rules │ ├── tumbleweed │ ├── .repos │ ├── kiwi-settings │ │ ├── kiwi-settings.spec │ │ └── kiwi-settings │ │ │ └── 60-blacklist_fs-erofs.conf │ ├── test-image-MicroOS │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── disk.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-agama │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── .mozilla │ │ │ └── firefox │ │ │ │ └── profile │ │ │ │ └── user.js.template │ │ │ ├── .xinitrc │ │ │ ├── etc │ │ │ ├── avahi │ │ │ │ └── services │ │ │ │ │ └── agama.service │ │ │ ├── modules-load.d │ │ │ │ └── 10-multipath.conf │ │ │ ├── multipath.conf │ │ │ ├── ssh │ │ │ │ └── sshd_config.d │ │ │ │ │ └── 10_root_login.conf │ │ │ ├── systemd │ │ │ │ └── system │ │ │ │ │ ├── agama-avahi-issue.service │ │ │ │ │ ├── agama-certificate-issue.path │ │ │ │ │ ├── agama-certificate-issue.service │ │ │ │ │ ├── agama-certificate-wait.service │ │ │ │ │ ├── agama-hostname.service │ │ │ │ │ ├── agama-self-update.service │ │ │ │ │ ├── agama-ssh-issue.service │ │ │ │ │ ├── agama-welcome-issue.service │ │ │ │ │ ├── live-password-cmdline.service │ │ │ │ │ ├── live-password-dialog.service │ │ │ │ │ ├── live-password-iso.service │ │ │ │ │ ├── live-password-random.service │ │ │ │ │ ├── live-password-systemd.service │ │ │ │ │ └── x11-autologin.service │ │ │ └── zypp │ │ │ │ └── repos.d │ │ │ │ ├── agama-devel.repo │ │ │ │ └── repo-oss.repo │ │ │ ├── root │ │ │ ├── .icewm │ │ │ │ └── startup │ │ │ ├── .mozilla │ │ │ │ └── firefox │ │ │ │ │ └── profile │ │ │ │ │ └── user.js.template │ │ │ └── .xinitrc │ │ │ ├── tmp │ │ │ ├── fw_cleanup.rb │ │ │ └── systemsmanagement_key.gpg │ │ │ └── usr │ │ │ ├── bin │ │ │ ├── agama-issue-generator │ │ │ ├── agama-self-update │ │ │ └── live-password │ │ │ ├── lib │ │ │ ├── dracut │ │ │ │ └── modules.d │ │ │ │ │ └── 98dracut-menu │ │ │ │ │ ├── dracut-cmdline-menu.service │ │ │ │ │ ├── dracut-cmdline-menu.sh │ │ │ │ │ ├── module-setup.sh │ │ │ │ │ └── save-cmdline.sh │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 80-agama-connect-issue.rules │ │ │ └── share │ │ │ └── live │ │ │ └── misc │ │ │ └── dialog.conf │ ├── test-image-azure │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ └── sysconfig │ │ │ └── network │ │ │ └── ifcfg-eth0 │ ├── test-image-bundle-format │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── disk.sh │ │ └── root │ │ │ ├── .kiwi_dracut_hostonly.trigger │ │ │ ├── .kiwi_grub_config.trigger │ │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ ├── dracut_hostonly.service │ │ │ └── grub_config.service │ ├── test-image-custom-partitions │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── custom_partitions_create.sh │ │ ├── custom_partitions_setup.sh │ │ └── root │ │ │ └── config_partids.patch │ ├── test-image-disk-containers │ │ └── appliance.kiwi │ ├── test-image-disk-legacy │ │ ├── .skip_boxbuild_container │ │ ├── .skip_boxbuild_vm │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── test-image-disk-ramdisk │ │ ├── appliance.kiwi │ │ └── root │ │ │ └── etc │ │ │ └── dracut.conf.d │ │ │ └── 90-brd.conf │ ├── test-image-disk-selinux │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── test-image-disk-simple │ │ ├── a_custom_file │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-disk │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ ├── disk.sh │ │ └── root │ │ │ ├── .kiwi_dracut_hostonly.trigger │ │ │ ├── .kiwi_grub_config.trigger │ │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ ├── dracut_hostonly.service │ │ │ └── grub_config.service │ ├── test-image-docker-derived │ │ ├── .skip_boxbuild_container │ │ └── appliance.kiwi │ ├── test-image-docker │ │ ├── .skip_boxbuild_container │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── etc │ │ │ ├── ssh │ │ │ │ └── sshd_config │ │ │ ├── sudoers │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── home │ │ │ └── vagrant │ │ │ └── .ssh │ │ │ └── authorized_keys │ ├── test-image-ec2 │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── cloud │ │ │ └── cloud.cfg │ │ │ └── sysconfig │ │ │ └── network │ │ │ ├── ifcfg-eth0 │ │ │ └── ifcfg-vf2 │ ├── test-image-gce │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── init.d │ │ │ └── boot.local │ │ │ └── sysconfig │ │ │ └── network │ │ │ └── ifcfg-eth0 │ ├── test-image-live │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── systemd │ │ │ └── network │ │ │ │ └── 20-local.network │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-luks │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-lvm │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-orthos │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ ├── ifcfg-ens1 │ │ │ │ │ ├── ifcfg-ens2 │ │ │ │ │ ├── ifcfg-ens3 │ │ │ │ │ ├── ifcfg-ens4 │ │ │ │ │ ├── ifcfg-eth0 │ │ │ │ │ ├── ifcfg-eth1 │ │ │ │ │ ├── ifcfg-eth2 │ │ │ │ │ └── ifcfg-eth3 │ │ │ └── systemd │ │ │ │ └── system │ │ │ │ ├── default.target.wants │ │ │ │ └── firstboot.service │ │ │ │ └── firstboot.service │ │ │ └── usr │ │ │ └── local │ │ │ └── bin │ │ │ └── firstboot.sh │ ├── test-image-overlayroot │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-partitions-and-volumes │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── test-image-pxe │ │ ├── .skip_boxbuild_container │ │ ├── .skip_boxbuild_vm │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-qcow-openstack │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── etc │ │ │ ├── cloud │ │ │ │ └── cloud.cfg │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-eth0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── fstab.append │ ├── test-image-raid │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ └── etc │ │ │ ├── sysconfig │ │ │ └── network │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 70-persistent-net.rules │ ├── test-image-systemd-boot │ │ ├── appliance.kiwi │ │ ├── config.sh │ │ └── root │ │ │ ├── .kiwi_dracut_hostonly.trigger │ │ │ ├── etc │ │ │ ├── sysconfig │ │ │ │ └── network │ │ │ │ │ └── ifcfg-lan0 │ │ │ └── udev │ │ │ │ └── rules.d │ │ │ │ └── 70-persistent-net.rules │ │ │ └── usr │ │ │ └── lib │ │ │ └── systemd │ │ │ └── system │ │ │ └── dracut_hostonly.service │ ├── test-image-tbz │ │ └── appliance.kiwi │ ├── test-image-vagrant │ │ ├── appliance.kiwi │ │ └── config.sh │ ├── test-image-wsl-ng │ │ ├── appliance.kiwi │ │ └── root │ │ │ └── etc │ │ │ ├── wsl-distribution.conf │ │ │ └── wsl.conf │ └── test-image-wsl │ │ ├── .skip_boxbuild_container │ │ ├── .skip_boxbuild_vm │ │ └── appliance.kiwi │ └── ubuntu │ ├── .repos │ ├── test-image-docker │ ├── .skip_boxbuild_container │ └── appliance.kiwi │ └── test-image-live-disk │ ├── appliance.kiwi │ ├── config.sh │ └── root │ └── etc │ ├── firstboot │ ├── network │ └── interfaces.d │ │ └── lan0 │ ├── systemd │ └── system │ │ └── symlink-resolvconf.service │ └── udev │ └── rules.d │ └── 70-persistent-net.rules ├── doc ├── DC-kiwi ├── Makefile └── source │ ├── .images │ ├── intro.png │ └── kiwi-logo.png │ ├── api.rst │ ├── api │ ├── kiwi.archive.rst │ ├── kiwi.boot.image.rst │ ├── kiwi.boot.rst │ ├── kiwi.bootloader.config.rst │ ├── kiwi.bootloader.install.rst │ ├── kiwi.bootloader.rst │ ├── kiwi.bootloader.template.rst │ ├── kiwi.builder.rst │ ├── kiwi.container.rst │ ├── kiwi.container.setup.rst │ ├── kiwi.filesystem.rst │ ├── kiwi.iso_tools.rst │ ├── kiwi.package_manager.rst │ ├── kiwi.partitioner.rst │ ├── kiwi.repository.rst │ ├── kiwi.repository.template.rst │ ├── kiwi.rst │ ├── kiwi.solver.repository.rst │ ├── kiwi.solver.rst │ ├── kiwi.storage.rst │ ├── kiwi.storage.subformat.rst │ ├── kiwi.storage.subformat.template.rst │ ├── kiwi.system.rst │ ├── kiwi.tasks.rst │ ├── kiwi.utils.rst │ └── kiwi.volume_manager.rst │ ├── building_images.rst │ ├── building_images │ ├── build_container_image.rst │ ├── build_enclave.rst │ ├── build_expandable_disk.rst │ ├── build_kis.rst │ ├── build_live_iso.rst │ ├── build_simple_disk.rst │ └── build_wsl_container.rst │ ├── commands.rst │ ├── commands │ ├── image_info.rst │ ├── image_resize.rst │ ├── kiwi.rst │ ├── result_bundle.rst │ ├── result_list.rst │ ├── system_build.rst │ ├── system_create.rst │ ├── system_prepare.rst │ └── system_update.rst │ ├── concept_and_workflow.rst │ ├── concept_and_workflow │ ├── customize_the_boot_process.rst │ ├── packages.rst │ ├── profiles.rst │ ├── repository_setup.rst │ ├── runtime_configuration.rst │ ├── shell_scripts.rst │ ├── systemdeps.rst │ └── users.rst │ ├── conf.py │ ├── contributing.rst │ ├── contributing │ ├── kiwi_from_python.rst │ ├── kiwi_plugin_architecture.rst │ ├── schema_extensions.rst │ └── scripts_testing.rst │ ├── image_description.rst │ ├── image_description │ └── elements.rst │ ├── image_types_and_results.rst │ ├── index.rst │ ├── installation.rst │ ├── integration_testing.rst │ ├── overview.rst │ ├── overview │ └── workflow.rst │ ├── plugins.rst │ ├── plugins │ ├── self_contained.rst │ └── stackbuild.rst │ ├── quickstart.rst │ ├── troubleshooting.rst │ ├── troubleshooting │ ├── architectures.rst │ ├── boxbuild_tweaks.rst │ ├── buildhost_constraints.rst │ ├── filesystems.rst │ └── security.rst │ ├── working_with_images.rst │ └── working_with_images │ ├── build_in_buildservice.rst │ ├── build_with_profiles.rst │ ├── build_without_debianbootstrap.rst │ ├── clone_partitions.rst │ ├── custom_fstab_extension.rst │ ├── custom_partitions.rst │ ├── custom_volumes.rst │ ├── disk_ramdisk_deployment.rst │ ├── disk_setup_for_azure.rst │ ├── disk_setup_for_ec2.rst │ ├── disk_setup_for_google.rst │ ├── disk_setup_for_luks.rst │ ├── disk_setup_for_vagrant.rst │ ├── iso_to_usb_stick_deployment.rst │ ├── iso_to_usb_stick_file_based_deployment.rst │ ├── iso_to_usb_stick_grub2_boot_from_iso.rst │ ├── legacy_netboot_root_filesystem.rst │ ├── network_live_iso_boot.rst │ ├── network_overlay_boot.rst │ ├── setup_network_bootserver.rst │ ├── setup_yast_on_first_boot.rst │ └── use_suse_media.rst ├── dracut └── modules.d │ ├── 80kiwi-verity │ ├── .gitignore │ ├── Makefile │ ├── README.rst │ ├── kiwi-parse-verity.c │ ├── kiwi-verity-setup.sh │ ├── kiwi-veritytab-setup.sh │ └── module-setup.sh │ ├── 90kiwi-dump │ ├── Makefile │ ├── kiwi-dump-image.sh │ ├── kiwi-installer-device.sh │ ├── kiwi-installer-genrules.sh │ ├── kiwi-mount-ramdisk.sh │ ├── kiwi-ramdisk-deployment-generator.sh │ ├── module-setup.sh │ └── parse-kiwi-install.sh │ ├── 90kiwi-live │ ├── Makefile │ ├── kiwi-generator.sh │ ├── kiwi-live-checkmedia.sh │ ├── kiwi-live-genrules.sh │ ├── kiwi-live-lib.sh │ ├── kiwi-live-net-genrules.sh │ ├── kiwi-live-root.sh │ ├── module-setup.sh │ └── parse-kiwi-live.sh │ ├── 90kiwi-overlay │ ├── Makefile │ ├── kiwi-generator.sh │ ├── kiwi-overlay-root.sh │ ├── module-setup.sh │ └── parse-kiwi-overlay.sh │ ├── 90kiwi-repart │ ├── Makefile │ ├── kiwi-repart-disk.sh │ └── module-setup.sh │ ├── 99kiwi-dump-reboot │ ├── Makefile │ ├── kiwi-dump-reboot-system.sh │ └── module-setup.sh │ └── 99kiwi-lib │ ├── Makefile │ ├── kiwi-dialog-lib.sh │ ├── kiwi-filesystem-lib.sh │ ├── kiwi-lib.sh │ ├── kiwi-luks-lib.sh │ ├── kiwi-lvm-lib.sh │ ├── kiwi-mdraid-lib.sh │ ├── kiwi-net-lib.sh │ ├── kiwi-partitions-lib.sh │ └── module-setup.sh ├── helper ├── build_status.sh ├── completion_generator.py ├── rebuild_changelog_reference.sh ├── update_changelog.py ├── update_obs_services.sh └── xsl_to_v74 │ ├── convert14to20.xsl │ ├── convert20to24.xsl │ ├── convert24to35.xsl │ ├── convert35to37.xsl │ ├── convert37to38.xsl │ ├── convert38to39.xsl │ ├── convert39to41.xsl │ ├── convert41to42.xsl │ ├── convert42to43.xsl │ ├── convert43to44.xsl │ ├── convert44to45.xsl │ ├── convert45to46.xsl │ ├── convert46to47.xsl │ ├── convert47to48.xsl │ ├── convert48to49.xsl │ ├── convert49to50.xsl │ ├── convert50to51.xsl │ ├── convert51to52.xsl │ ├── convert52to53.xsl │ ├── convert53to54.xsl │ ├── convert54to55.xsl │ ├── convert55to56.xsl │ ├── convert56to57.xsl │ ├── convert57to58.xsl │ ├── convert58to59.xsl │ ├── convert59to60.xsl │ ├── convert60to61.xsl │ ├── convert61to62.xsl │ ├── convert62to63.xsl │ ├── convert63to64.xsl │ ├── convert64to65.xsl │ ├── convert65to66.xsl │ ├── convert66to67.xsl │ ├── convert67to68.xsl │ ├── convert68to69.xsl │ ├── convert69to70.xsl │ ├── convert70to71.xsl │ ├── convert71to72.xsl │ ├── convert72to73.xsl │ ├── convert73to74.xsl │ ├── include.xsl │ ├── pretty.xsl │ └── update.xsl ├── kiwi.yml ├── kiwi ├── __init__.py ├── api_helper.py ├── app.py ├── archive │ ├── __init__.py │ ├── cpio.py │ └── tar.py ├── boot │ ├── __init__.py │ └── image │ │ ├── __init__.py │ │ ├── base.py │ │ ├── builtin_kiwi.py │ │ └── dracut.py ├── bootloader │ ├── __init__.py │ ├── config │ │ ├── __init__.py │ │ ├── base.py │ │ ├── bootloader_spec_base.py │ │ ├── custom.py │ │ ├── grub2.py │ │ ├── systemd_boot.py │ │ └── zipl.py │ ├── install │ │ ├── __init__.py │ │ ├── base.py │ │ ├── grub2.py │ │ ├── systemd_boot.py │ │ └── zipl.py │ └── template │ │ ├── __init__.py │ │ ├── grub2.py │ │ ├── systemd_boot.py │ │ └── zipl.py ├── builder │ ├── __init__.py │ ├── archive.py │ ├── container.py │ ├── disk.py │ ├── enclave.py │ ├── filesystem.py │ ├── install.py │ ├── kis.py │ ├── live.py │ └── template │ │ └── container_import.py ├── cli.py ├── command.py ├── command_process.py ├── config │ ├── functions.sh │ └── strip.xml ├── container │ ├── __init__.py │ ├── appx.py │ ├── base.py │ ├── oci.py │ ├── setup │ │ ├── __init__.py │ │ ├── appx.py │ │ ├── base.py │ │ ├── docker.py │ │ ├── oci.py │ │ └── wsl.py │ └── wsl.py ├── defaults.py ├── exceptions.py ├── filesystem │ ├── __init__.py │ ├── base.py │ ├── btrfs.py │ ├── erofs.py │ ├── ext2.py │ ├── ext3.py │ ├── ext4.py │ ├── fat16.py │ ├── fat32.py │ ├── isofs.py │ ├── setup.py │ ├── squashfs.py │ ├── swap.py │ └── xfs.py ├── firmware.py ├── help.py ├── iso_tools │ ├── __init__.py │ ├── base.py │ ├── iso.py │ └── xorriso.py ├── kiwi.py ├── logger.py ├── logger_color_formatter.py ├── logger_filter.py ├── logger_socket.py ├── markup │ ├── __init__.py │ ├── any.py │ ├── base.py │ └── xml.py ├── mount_manager.py ├── oci_tools │ ├── __init__.py │ ├── base.py │ ├── buildah.py │ └── umoci.py ├── package_manager │ ├── __init__.py │ ├── apk.py │ ├── apt.py │ ├── base.py │ ├── dnf.py │ ├── dnf4.py │ ├── dnf5.py │ ├── microdnf.py │ ├── pacman.py │ └── zypper.py ├── partitioner │ ├── __init__.py │ ├── base.py │ ├── dasd.py │ ├── gpt.py │ └── msdos.py ├── path.py ├── privileges.py ├── repository │ ├── __init__.py │ ├── apk.py │ ├── apt.py │ ├── base.py │ ├── dnf.py │ ├── dnf4.py │ ├── dnf5.py │ ├── pacman.py │ ├── template │ │ ├── __init__.py │ │ └── apt.py │ └── zypper.py ├── runtime_checker.py ├── runtime_checker_metadata.yml ├── runtime_config.py ├── schema │ ├── kiwi.rnc │ └── kiwi.rng ├── solver │ ├── __init__.py │ ├── repository │ │ ├── __init__.py │ │ ├── base.py │ │ ├── deb.py │ │ ├── rpm_dir.py │ │ ├── rpm_md.py │ │ └── suse.py │ └── sat.py ├── storage │ ├── __init__.py │ ├── clone_device.py │ ├── device_provider.py │ ├── disk.py │ ├── integrity_device.py │ ├── loop_device.py │ ├── luks_device.py │ ├── mapped_device.py │ ├── raid_device.py │ ├── setup.py │ └── subformat │ │ ├── __init__.py │ │ ├── base.py │ │ ├── gce.py │ │ ├── ova.py │ │ ├── qcow2.py │ │ ├── template │ │ ├── __init__.py │ │ ├── vagrant_config.py │ │ ├── virtualbox_ovf.py │ │ └── vmware_settings.py │ │ ├── vagrant_base.py │ │ ├── vagrant_libvirt.py │ │ ├── vagrant_virtualbox.py │ │ ├── vdi.py │ │ ├── vhd.py │ │ ├── vhdfixed.py │ │ ├── vhdx.py │ │ └── vmdk.py ├── system │ ├── __init__.py │ ├── identifier.py │ ├── kernel.py │ ├── mount.py │ ├── prepare.py │ ├── profile.py │ ├── result.py │ ├── root_bind.py │ ├── root_import │ │ ├── __init__.py │ │ ├── base.py │ │ └── oci.py │ ├── root_init.py │ ├── setup.py │ ├── shell.py │ ├── size.py │ ├── uri.py │ └── users.py ├── tasks │ ├── __init__.py │ ├── base.py │ ├── image_info.py │ ├── image_resize.py │ ├── result_bundle.py │ ├── result_list.py │ ├── system_build.py │ ├── system_create.py │ ├── system_prepare.py │ └── system_update.py ├── utils │ ├── __init__.py │ ├── block.py │ ├── checksum.py │ ├── codec.py │ ├── command_capabilities.py │ ├── compress.py │ ├── fstab.py │ ├── os_release.py │ ├── output.py │ ├── primes.py │ ├── rpm.py │ ├── rpm_database.py │ ├── signature.py │ ├── size.py │ ├── sync.py │ ├── sysconfig.py │ ├── temporary.py │ ├── toenv.py │ └── veritysetup.py ├── version.py ├── volume_manager │ ├── __init__.py │ ├── base.py │ ├── btrfs.py │ └── lvm.py ├── xml_description.py ├── xml_parse.py ├── xml_state.py └── xsl │ ├── convert74to75.xsl │ ├── convert75to76.xsl │ ├── convert76to80.xsl │ ├── convert80to81.xsl │ ├── convert81to82.xsl │ ├── convert82to83.xsl │ ├── include.xsl │ ├── master.xsl │ ├── pretty.xsl │ └── print.xsl ├── package ├── kiwi-revert-bls-default-for-suse.patch ├── python-kiwi-pkgbuild-template ├── python-kiwi-rpmlintrc ├── python-kiwi-spec-template ├── python-kiwi.changes └── python-kiwi.changes.deb6ca.fix ├── pyproject.toml ├── setup.cfg └── test ├── data ├── .config │ └── kiwi │ │ └── config.yml ├── __init__.py ├── appx │ └── AppxManifest.xml ├── bootinfo.txt ├── credentials ├── description.buildservice │ └── appliance.kiwi ├── description │ └── config.xml ├── etc │ ├── default │ │ └── zipl2grub.conf.in │ ├── os-release │ └── selinux │ │ └── targeted │ │ └── policy │ │ └── policy.some_policy ├── example_apt_config.xml ├── example_arm_disk_size_config.xml ├── example_btrfs_config.xml ├── example_btrfs_vol_config.xml ├── example_config.xml ├── example_config_target_dir.xml ├── example_containers_config.xml ├── example_deprecated_schema.xml ├── example_disk_config.xml ├── example_disk_size_config.xml ├── example_disk_size_empty_vol_config.xml ├── example_disk_size_oem_volume_config.xml ├── example_disk_size_partition_too_small_config.xml ├── example_disk_size_partitions_config.xml ├── example_disk_size_vol_root_config.xml ├── example_disk_size_volume_config.xml ├── example_disk_size_volume_too_small_config.xml ├── example_dot_profile_config.xml ├── example_dot_profile_live_config.xml ├── example_hkd_config.xml ├── example_include_config.xml ├── example_include_config_from_description_dir.xml ├── example_include_config_missing_reference.xml ├── example_lvm_arch_config.xml ├── example_lvm_custom_rootvol_config.xml ├── example_lvm_default_config.xml ├── example_lvm_no_root_config.xml ├── example_lvm_no_root_full_usr_config.xml ├── example_lvm_preferred_config.xml ├── example_multiple_users_config.xml ├── example_no_default_type.xml ├── example_no_image_packages_config.xml ├── example_no_imageinclude_config.xml ├── example_partitions_config.xml ├── example_ppc_disk_size_config.xml ├── example_pxe_config.xml ├── example_runtime_checker_boot_desc_not_found.xml ├── example_runtime_checker_config.xml ├── example_runtime_checker_conflicting_types.xml ├── example_runtime_checker_include_nested_reference.xml ├── example_runtime_checker_no_boot_reference.xml ├── example_runtime_checker_no_initrd_system_reference.xml ├── example_this_path_config.xml ├── fstab ├── gz_data.gz ├── image_info │ └── config.xml ├── include.xml ├── include_repo.xml ├── info.xml ├── iso_listing.txt ├── isoboot │ ├── example-distribution-no-delete-section │ │ └── config.xml │ └── example-distribution │ │ └── config.xml ├── key_value ├── kiwi_config │ ├── broken │ │ └── .config │ │ │ └── kiwi │ │ │ └── config.yml │ ├── defaults │ │ └── .config │ │ │ └── kiwi │ │ │ └── config.yml │ ├── invalid │ │ └── .config │ │ │ └── kiwi │ │ │ └── config.yml │ ├── ok │ │ └── .config │ │ │ └── kiwi │ │ │ └── config.yml │ └── other │ │ └── .config │ │ └── kiwi │ │ └── config.yml ├── metalink ├── my_plugin.rnc ├── my_plugin.rng ├── nested_include.xml ├── oemboot │ └── example-distribution │ │ └── config.xml ├── repomd.xml ├── root-dir │ ├── boot │ │ └── unicode.pf2 │ └── image │ │ ├── config.xml │ │ ├── exclude_files.yaml │ │ └── exclude_files_efifatimage.yaml ├── runtime_checker_metadata.yml ├── some.env ├── some_broken.env ├── sysconfig_example.txt ├── systemd-id128.out ├── vagrant_virtualbox.ovf └── xz_data.xz ├── scripts ├── __init__.py ├── conftest.py ├── test_baseVagrantSetup.py └── test_suseSetupProduct.py └── unit ├── .coveragerc ├── __init__.py ├── api_helper_test.py ├── archive ├── __init__.py ├── cpio_test.py └── tar_test.py ├── boot ├── __init__.py └── image │ ├── __init__.py │ ├── base_test.py │ ├── builtin_kiwi_test.py │ ├── dracut_test.py │ └── init_test.py ├── bootloader ├── __init__.py ├── config │ ├── __init__.py │ ├── base_test.py │ ├── bootloader_spec_base_test.py │ ├── custom_test.py │ ├── grub2_test.py │ ├── init_test.py │ ├── systemd_boot_test.py │ └── zipl_test.py ├── install │ ├── __init__.py │ ├── base_test.py │ ├── grub2_test.py │ ├── init_test.py │ ├── systemd_boot_test.py │ └── zipl_test.py └── template │ ├── __init__.py │ ├── grub2_test.py │ ├── systemd_boot_test.py │ └── zipl_test.py ├── builder ├── __init__.py ├── archive_test.py ├── container_test.py ├── disk_test.py ├── enclave_test.py ├── filesystem_test.py ├── init_test.py ├── install_test.py ├── kis_test.py └── live_test.py ├── cli_test.py ├── command_process_test.py ├── command_test.py ├── container ├── __init__.py ├── appx_test.py ├── init_test.py ├── oci_test.py ├── setup │ ├── __init__.py │ ├── appx_test.py │ ├── base_test.py │ ├── docker_test.py │ ├── init_test.py │ ├── oci_test.py │ └── wsl_test.py └── wsl_test.py ├── defaults_test.py ├── filesystem ├── __init__.py ├── base_test.py ├── btrfs_test.py ├── erofs_test.py ├── ext2_test.py ├── ext3_test.py ├── ext4_test.py ├── fat16_test.py ├── fat32_test.py ├── init_test.py ├── isofs_test.py ├── setup_test.py ├── squashfs_test.py ├── swap_test.py └── xfs_test.py ├── firmware_test.py ├── help_test.py ├── iso_tools ├── __init__.py ├── base_test.py ├── init_test.py ├── iso_test.py └── xorriso_test.py ├── logger_color_formatter_test.py ├── logger_filter_test.py ├── logger_socket_test.py ├── logger_test.py ├── markup ├── __init__.py ├── any_test.py ├── base_test.py ├── markup_test.py └── xml_test.py ├── mount_manager_test.py ├── oci_tools ├── __init__.py ├── base_test.py ├── buildah_test.py ├── init_test.py └── umoci_test.py ├── package_manager ├── __init__.py ├── apk_test.py ├── apt_test.py ├── base_test.py ├── dnf4_test.py ├── dnf5_test.py ├── init_test.py ├── microdnf_test.py ├── pacman_test.py └── zypper_test.py ├── partitioner ├── __init__.py ├── base_test.py ├── dasd_test.py ├── gpt_test.py ├── init_test.py └── msdos_test.py ├── path_test.py ├── privileges_test.py ├── repository ├── __init__.py ├── apk_test.py ├── apt_test.py ├── base_test.py ├── dnf4_test.py ├── dnf5_test.py ├── init_test.py ├── pacman_test.py ├── template │ ├── __init__.py │ └── apt_test.py └── zypper_test.py ├── runtime_checker_test.py ├── runtime_config_test.py ├── shell_test.py ├── solver ├── __init__.py ├── repository │ ├── __init__.py │ ├── base_test.py │ ├── deb_test.py │ ├── init_test.py │ ├── rpm_dir_test.py │ ├── rpm_md_test.py │ └── suse_test.py └── sat_test.py ├── storage ├── __init__.py ├── clone_device_test.py ├── device_provider_test.py ├── disk_test.py ├── integrity_device_test.py ├── loop_device_test.py ├── luks_device_test.py ├── mapped_device_test.py ├── raid_device_test.py ├── setup_test.py └── subformat │ ├── __init__.py │ ├── base_test.py │ ├── gce_test.py │ ├── init_test.py │ ├── ova_test.py │ ├── qcow2_test.py │ ├── template │ ├── __init__.py │ ├── vagrant_config_test.py │ ├── virtualbox_ovf_test.py │ └── vmware_settings_test.py │ ├── vagrant_base_test.py │ ├── vagrant_libvirt_test.py │ ├── vagrant_virtualbox_test.py │ ├── vdi_test.py │ ├── vhd_test.py │ ├── vhdfixed_test.py │ ├── vhdx_test.py │ └── vmdk_test.py ├── system ├── __init__.py ├── identifier_test.py ├── kernel_test.py ├── mount_test.py ├── prepare_test.py ├── profile_test.py ├── result_test.py ├── root_bind_test.py ├── root_import │ ├── __init__.py │ ├── base_test.py │ ├── init_test.py │ └── oci_test.py ├── root_init_test.py ├── setup_test.py ├── shell_test.py ├── size_test.py ├── uri_test.py └── users_test.py ├── tasks ├── __init__.py ├── base_test.py ├── image_info_test.py ├── image_resize_test.py ├── result_bundle_test.py ├── result_list_test.py ├── system_build_test.py ├── system_create_test.py ├── system_prepare_test.py └── system_update_test.py ├── test_helper.py ├── utils ├── __init__.py ├── block_test.py ├── checksum_test.py ├── codec_test.py ├── command_capabilities_test.py ├── compress_test.py ├── fstab_test.py ├── os_release_test.py ├── output_test.py ├── primes_test.py ├── rpm_database_test.py ├── rpm_test.py ├── signature_test.py ├── size_test.py ├── sync_test.py ├── sysconfig_test.py ├── temporary_test.py ├── toenv_test.py └── veritysetup_test.py ├── volume_manager ├── __init__.py ├── base_test.py ├── btrfs_test.py ├── init_test.py └── lvm_test.py ├── xml_description_test.py └── xml_state_test.py /.bumpversion.cfg: -------------------------------------------------------------------------------- 1 | [bumpversion] 2 | current_version = 10.2.24 3 | commit = True 4 | tag = True 5 | 6 | [bumpversion:file:pyproject.toml] 7 | 8 | [bumpversion:file:kiwi/version.py] 9 | 10 | [bumpversion:file:doc/source/conf.py] 11 | -------------------------------------------------------------------------------- /.codacy.yml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude_paths: 3 | - 'kiwi/xml_parse.py' 4 | - 'test/**' 5 | - 'doc/**' 6 | - 'build-tests/**' 7 | - 'helper/**' 8 | - '.github/**' 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | kiwi/version.py ident export-subst 2 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute to KIWI 2 | 3 | :+1::tada: First off, thanks for taking the time to contribute! :tada::+1: 4 | 5 | The following article is a set of guidelines for contributing to KIWI which 6 | is hosted on the [SUSE Organization](https://github.com/SUSE) on GitHub. 7 | 8 | ## Reporting Bugs 9 | 10 | * Ensure the bug was not already reported, see the 11 | [KIWI Issue Tracker](https://github.com/SUSE/kiwi/issues) on GitHub. 12 | * Open an issue or reference an existing one 13 | * Assign yourself to the issue when you are working on it 14 | * Reference the issue number (with `issue#NUMBER`) in your pull request 15 | * code coverage 100% 16 | * No code without test! 17 | * flake8 clean 18 | * 80 characters per line for code (excluding tests) 19 | 20 | ## Asking Questions 21 | 22 | If you need to discuss code issues, there is a KIWI mailing list on 23 | Google Groups, see . 24 | 25 | 26 | Thanks! :heart: :heart: :heart: 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Problem description 2 | 3 | ## Expected behaviour 4 | 5 | ## Steps to reproduce the behaviour 6 | 7 | ## OS and Software information 8 | 9 | * KIWI version: 10 | * Operating system host version: 11 | * Operating system target version: 12 | * Open Build Service version (N/A if not using OBS): 13 | * Koji version (N/A if not using Koji): 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Fixes # . 2 | 3 | Changes proposed in this pull request: 4 | * 5 | * 6 | -------------------------------------------------------------------------------- /.github/workflows/ci-code-style.yml: -------------------------------------------------------------------------------- 1 | name: CI-Code-Style 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | pull_request: 8 | 9 | jobs: 10 | unit_tests: 11 | name: Linter checks for KIWI python and Shell code 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Python${{ matrix.python-version }} 20 | uses: actions/setup-python@v4 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - name: Install Poetry 24 | run: | 25 | python -m pip install --upgrade pip 26 | python -m pip install poetry 27 | - name: Run code checks 28 | run: | 29 | make check 30 | -------------------------------------------------------------------------------- /.github/workflows/ci-differential-shellcheck.yml: -------------------------------------------------------------------------------- 1 | name: CI-Differential-ShellCheck 2 | on: 3 | pull_request: 4 | branches: [main] 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | lint: 11 | name: Linter - Differential ShellCheck 12 | runs-on: ubuntu-latest 13 | 14 | permissions: 15 | security-events: write 16 | pull-requests: write 17 | 18 | steps: 19 | - name: Repository checkout 20 | uses: actions/checkout@v3 21 | with: 22 | fetch-depth: 0 23 | 24 | - name: Differential ShellCheck 25 | uses: redhat-plumbers-in-action/differential-shellcheck@v3 26 | with: 27 | token: ${{ secrets.GITHUB_TOKEN }} 28 | -------------------------------------------------------------------------------- /.github/workflows/ci-documentation.yml: -------------------------------------------------------------------------------- 1 | name: CI-Documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | pull_request: 8 | 9 | jobs: 10 | unit_tests: 11 | name: Test rendering Sphinx ReST documentation 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: [3.11] 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Python${{ matrix.python-version }} 20 | uses: actions/setup-python@v4 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - name: Install Poetry 24 | run: | 25 | python -m pip install --upgrade pip 26 | python -m pip install poetry 27 | - name: Run sphinx build 28 | run: | 29 | make docs 30 | -------------------------------------------------------------------------------- /.github/workflows/ci-publish-pages.yml: -------------------------------------------------------------------------------- 1 | name: CI-GitHub-Pages 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | documentation: 10 | 11 | runs-on: ubuntu-latest 12 | strategy: 13 | matrix: 14 | python-version: ["3.11"] 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Python${{ matrix.python-version }} 19 | uses: actions/setup-python@v5 20 | with: 21 | python-version: ${{ matrix.python-version }} 22 | - name: Install 23 | run: | 24 | python -m pip install --upgrade pip 25 | python -m pip install poetry 26 | - name: Render 27 | run: | 28 | poetry install --all-extras 29 | poetry run sphinx-build doc/source doc/build 30 | - name: Deploy 31 | uses: peaceiris/actions-gh-pages@v3 32 | with: 33 | publish_branch: gh-pages 34 | github_token: ${{ secrets.GITHUB_TOKEN }} 35 | publish_dir: ./doc/build 36 | force_orphan: true 37 | -------------------------------------------------------------------------------- /.github/workflows/ci-publish-to-pypi.yml: -------------------------------------------------------------------------------- 1 | name: CI-Publish-To-PyPI 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | strategy: 12 | matrix: 13 | python-version: ["3.11"] 14 | 15 | environment: 16 | name: pypi 17 | url: https://pypi.org/p/kiwi 18 | 19 | permissions: 20 | id-token: write 21 | 22 | steps: 23 | - uses: actions/checkout@v3 24 | - name: Python${{ matrix.python-version }} 25 | uses: actions/setup-python@v4 26 | with: 27 | python-version: ${{ matrix.python-version }} 28 | - name: Install 29 | run: | 30 | python -m pip install --upgrade pip 31 | python -m pip install poetry==1.7.1 32 | - name: Prepare 33 | run: | 34 | make prepare_for_pypi 35 | - name: Publish 36 | uses: pypa/gh-action-pypi-publish@release/v1 37 | -------------------------------------------------------------------------------- /.github/workflows/ci-units-types.yml: -------------------------------------------------------------------------------- 1 | name: CI-Unit-And-Types 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | pull_request: 8 | 9 | jobs: 10 | unit_tests: 11 | name: Unit and Static Type tests for KIWI python code 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Python${{ matrix.python-version }} 20 | uses: actions/setup-python@v4 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - name: Install Poetry 24 | run: | 25 | python -m pip install --upgrade pip 26 | python -m pip install poetry 27 | - name: Run unit and type tests 28 | run: make test 29 | env: 30 | PY_VER: ${{ matrix.python-version }} 31 | -------------------------------------------------------------------------------- /.github/workflows/ci-update-build-tests.yml: -------------------------------------------------------------------------------- 1 | name: CI-Update-Build-Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | paths: 8 | - "build-tests/**" 9 | 10 | jobs: 11 | trigger_obs_services: 12 | name: Trigger OBS services connected to build-tests data 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Send API requests to Open Build Service 18 | run: helper/update_obs_services.sh ${{ secrets.OBS_VIRT_APP_IMG }} 19 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Marcus Schäfer 2 | Marcus Schäfer 3 | Marcus Schäfer 4 | -------------------------------------------------------------------------------- /.obs_test: -------------------------------------------------------------------------------- 1 | Virtualization:Appliances:Images:Testing_x86 x86_64 2 | Virtualization:Appliances:Images:Testing_arm aarch64 3 | Virtualization:Appliances:Images:Testing_s390 s390x 4 | Virtualization:Appliances:Images x86_64 5 | -------------------------------------------------------------------------------- /build-tests/arm/fedora/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Fedora_39 2 | https://mirrors.fedoraproject.org/metalink?repo=fedora-39&arch=aarch64,,,,,,,,,,metalink 3 | -------------------------------------------------------------------------------- /build-tests/arm/fedora/kiwi-settings/kiwi-settings.spec: -------------------------------------------------------------------------------- 1 | Name: kiwi-settings 2 | Version: 1.1.1 3 | Release: 0 4 | License: GPL-3.0-or-later 5 | %if "%{_vendor}" == "debbuild" 6 | Packager: Marcus Schaefer 7 | %endif 8 | Summary: KIWI - runtime config file 9 | Group: System/Management 10 | Source: %{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-build 12 | BuildArch: noarch 13 | 14 | %description 15 | Provides a KIWI runtime config file suitable building 16 | the fedora based integrations test 17 | 18 | %prep 19 | %setup -q 20 | 21 | %install 22 | install -D -m 644 kiwi-settings/kiwi.yml %{buildroot}/etc/kiwi.yml 23 | 24 | %files 25 | %defattr(-,root,root) 26 | %config /etc/kiwi.yml 27 | 28 | %changelog 29 | -------------------------------------------------------------------------------- /build-tests/arm/fedora/kiwi-settings/kiwi-settings/kiwi.yml: -------------------------------------------------------------------------------- 1 | oci: 2 | - archive_tool: buildah 3 | -------------------------------------------------------------------------------- /build-tests/arm/rawhide/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Fedora_Rawhide 2 | https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=aarch64,,,,,,,,,,metalink 3 | -------------------------------------------------------------------------------- /build-tests/arm/tumbleweed/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/openSUSE_Tumbleweed 2 | https://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/ 3 | -------------------------------------------------------------------------------- /build-tests/arm/tumbleweed/test-image-rpi/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/arm/tumbleweed/test-image-rpi/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/xUbuntu_24.04_aarch64,apt-deb,kiwi,,,,,,,false 2 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble_1,,,,,main,noble,false 3 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble_2,,,,,multiverse,noble,false 4 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble_3,,,,,restricted,noble,false 5 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble_4,,,,,universe,noble,false 6 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble-updates_1,,,,,main,noble-updates,false 7 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble-updates_2,,,,,multiverse,noble-updates,false 8 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble-updates_3,,,,,restricted,noble-updates,false 9 | https://ports.ubuntu.com/ubuntu-ports,apt-deb,noble-updates_4,,,,,universe,noble-updates,false 10 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/editbootinstall_rpi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | image_fs=$1 6 | 7 | root_partnum=$2 8 | 9 | root_device=/dev/mapper/loop*p${root_partnum} 10 | 11 | loop_name=$(basename $root_device | cut -f 1-2 -d'p') 12 | 13 | disk_device=/dev/${loop_name} 14 | 15 | #========================================== 16 | # Change partition label type to MBR 17 | #------------------------------------------ 18 | # The target system doesn't support GPT, so let's move it to 19 | # MBR partition layout instead. 20 | # 21 | # Also make sure to set the ESP partition to type 0xc so that 22 | # broken firmware (Rpi) detects it as FAT. 23 | # 24 | # Use tabs, "<<-" strips tabs, but no other whitespace! 25 | cat > gdisk.tmp <<-'EOF' 26 | x 27 | r 28 | g 29 | t 30 | 1 31 | c 32 | w 33 | y 34 | EOF 35 | dd if=$disk_device of=mbrid.bin bs=1 skip=440 count=4 36 | gdisk $disk_device < gdisk.tmp 37 | dd of=$disk_device if=mbrid.bin bs=1 seek=440 count=4 38 | rm -f mbrid.bin 39 | rm -f gdisk.tmp 40 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/etc/default/rpi-eeprom-update: -------------------------------------------------------------------------------- 1 | FIRMWARE_RELEASE_STATUS="default" 2 | BOOTFS=/boot/efi 3 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/etc/firstboot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/arm/ubuntu/test-image-rpi/root/etc/firstboot -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/etc/systemd/network/20-local.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name=lan0 3 | 4 | [Network] 5 | DHCP=yes 6 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/etc/systemd/system/symlink-resolvconf.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Make the resolv.conf symlink during first boot 3 | ConditionPathExists=!/etc/resolv.conf 4 | ConditionPathExists=/etc/firstboot 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/bin/ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf 9 | ExecStartPost=/bin/rm /etc/firstboot 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/etc/systemd/timesyncd.conf: -------------------------------------------------------------------------------- 1 | [Time] 2 | NTP=pool.ntp.org 3 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/var/tmp/firmware/linux-firmware-raspi2_6-0ubuntu3_arm64.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/arm/ubuntu/test-image-rpi/root/var/tmp/firmware/linux-firmware-raspi2_6-0ubuntu3_arm64.deb -------------------------------------------------------------------------------- /build-tests/arm/ubuntu/test-image-rpi/root/var/tmp/firmware/linux-firmware-raspi_6-0ubuntu3_arm64.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/arm/ubuntu/test-image-rpi/root/var/tmp/firmware/linux-firmware-raspi_6-0ubuntu3_arm64.deb -------------------------------------------------------------------------------- /build-tests/ppc/rawhide/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Fedora_Rawhide 2 | https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=ppc64le,,,,,,,,,,metalink 3 | -------------------------------------------------------------------------------- /build-tests/ppc/tumbleweed/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/openSUSE_Tumbleweed 2 | https://download.opensuse.org/ports/ppc/tumbleweed/repo/oss/ 3 | -------------------------------------------------------------------------------- /build-tests/ppc/tumbleweed/test-image-disk-simple/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/ppc/tumbleweed/test-image-disk-simple/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/ppc/tumbleweed/test-image-disk/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/ppc/tumbleweed/test-image-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/s390/rawhide/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Fedora_Rawhide 2 | https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=s390x,,,,,,,,,,metalink 3 | -------------------------------------------------------------------------------- /build-tests/s390/rawhide/test-image-disk/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC1091 3 | test -f /.kconfig && . /.kconfig 4 | 5 | declare kiwi_iname=${kiwi_iname} 6 | 7 | #====================================== 8 | # Greeting... 9 | #-------------------------------------- 10 | echo "Configure image: [${kiwi_iname}]..." 11 | 12 | #====================================== 13 | # Activate services 14 | #-------------------------------------- 15 | baseInsertService dbus-broker 16 | baseInsertService NetworkManager 17 | 18 | #====================================== 19 | # Setup default target, multi-user 20 | #-------------------------------------- 21 | baseSetRunlevel 3 22 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/openSUSE_Tumbleweed 2 | https://download.opensuse.org/ports/zsystems/tumbleweed/repo/oss/ 3 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/kiwi-settings/kiwi-settings.spec: -------------------------------------------------------------------------------- 1 | Name: kiwi-settings 2 | Version: 1.1.1 3 | Release: 0 4 | License: GPL-3.0-or-later 5 | %if "%{_vendor}" == "debbuild" 6 | Packager: Marcus Schaefer 7 | %endif 8 | Summary: KIWI - runtime config file 9 | Group: System/Management 10 | Source: %{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-build 12 | BuildArch: noarch 13 | 14 | %description 15 | Provides a KIWI runtime config file suitable building 16 | the fedora based integrations test 17 | 18 | %prep 19 | %setup -q 20 | 21 | %install 22 | install -D -m 644 kiwi-settings/kiwi.yml %{buildroot}/etc/kiwi.yml 23 | 24 | %files 25 | %defattr(-,root,root) 26 | %config /etc/kiwi.yml 27 | 28 | %changelog 29 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/kiwi-settings/kiwi-settings/kiwi.yml: -------------------------------------------------------------------------------- 1 | mapper: 2 | - part_mapper: kpartx 3 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-MicroOS/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | requires valid certificates and CRLs which needs to renew continuously 2 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-MicroOS/.skip_boxbuild_vm: -------------------------------------------------------------------------------- 1 | requires valid certificates and CRLs which needs to renew continuously 2 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-MicroOS/disk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euxo pipefail 3 | 4 | /usr/libexec/setup-etc-subvol 5 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-MicroOS/root/etc/dracut.conf.d/oem_resize.conf: -------------------------------------------------------------------------------- 1 | add_dracutmodules+=" kiwi-repart " 2 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-MicroOS/root/etc/systemd/network/20-local.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name=eth0 3 | 4 | [Network] 5 | DHCP=yes 6 | 7 | [DHCP] 8 | ClientIdentifier=mac 9 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-MicroOS/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | qemu-system-s390x \ 4 | -cpu host \ 5 | -machine accel=kvm,usb=off \ 6 | -netdev user,id=user0 \ 7 | -device virtio-net-ccw,netdev=user0 \ 8 | -object s390-pv-guest,id=pv0 \ 9 | -machine confidential-guest-support=pv0 \ 10 | -enable-kvm \ 11 | -nodefaults \ 12 | -name suse-cc \ 13 | -nographic \ 14 | -drive id=disk0,file="$1",format=qcow2,if=none,cache=writeback \ 15 | -device virtio-blk,id=data0,drive=disk0,physical_block_size=512,logical_block_size=512 \ 16 | -device virtio-serial-ccw \ 17 | -device sclpconsole,chardev=console \ 18 | -chardev stdio,id=console \ 19 | -smp 4 \ 20 | -m 4096 \ 21 | -mem-prealloc 22 | -------------------------------------------------------------------------------- /build-tests/s390/tumbleweed/test-image-disk/pre_disk_sync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | #======================================= 6 | # Create kernel links 7 | #--------------------------------------- 8 | pushd boot 9 | rm -f image initrd 10 | ln -s image-* image 11 | ln -s initrd-* initrd 12 | popd 13 | -------------------------------------------------------------------------------- /build-tests/x86/alpine/.repos: -------------------------------------------------------------------------------- 1 | https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/,apk 2 | https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/,apk 3 | -------------------------------------------------------------------------------- /build-tests/x86/archlinux/.repos: -------------------------------------------------------------------------------- 1 | http://download.opensuse.org/repositories/Virtualization:/Appliances:/Staging/Arch_Linux/x86_64/,,,,,,,Virtualization_Appliances_Staging_Arch_Linux,,false 2 | http://download.opensuse.org/repositories/Virtualization:/Appliances:/Images:/Testing_x86:/archlinux/standard/x86_64/,,,,,,,Virtualization_Appliances_Images_Testing_x86_archlinux,,false 3 | https://mirror.rackspace.com/archlinux/core/os/x86_64/,,,,,,,core,,false 4 | https://mirror.rackspace.com/archlinux/extra/os/x86_64/,,,,,,,extra,,false 5 | -------------------------------------------------------------------------------- /build-tests/x86/archlinux/test-image-live-disk-kis/editbootinstall_arch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # Arch Linux does not support linuxefi grub module or command, 4 | # however KIWI relies on it to create a grub.cfg that can be 5 | # used for EFI and non EFI environments. 6 | # In Arch linux command is already capable to EFI boot 7 | set -e 8 | 9 | disk_img=$1 10 | mapped_dev=$2 11 | tmp_mount=$(mktemp -d disk_XXXXX) 12 | 13 | mount "${mapped_dev}" "${tmp_mount}" 14 | 15 | grub_config="${tmp_mount}/boot/grub/grub.cfg" 16 | 17 | if [ -f "${grub_config}" ]; then 18 | echo "Patching grub configuration file: ${grub_config}" 19 | sed -i "s|linuxefi|linux|g" "${grub_config}" 20 | sed -i "s|initrdefi|initrd|g" "${grub_config}" 21 | fi 22 | umount "${tmp_mount}" && rm -r ${tmp_mount} 23 | -------------------------------------------------------------------------------- /build-tests/x86/archlinux/test-image-live-disk-kis/root/etc/dracut.conf.d/02_arch.conf: -------------------------------------------------------------------------------- 1 | systemdutildir=/usr/lib/systemd 2 | systemdsystemunitdir=/usr/lib/systemd/system 3 | systemdsystemconfdir=/etc/systemd/system 4 | udevdir=/usr/lib/udev 5 | -------------------------------------------------------------------------------- /build-tests/x86/archlinux/test-image-live-disk-kis/root/etc/netctl/ethernet-dhcp: -------------------------------------------------------------------------------- 1 | Interface=lan0 2 | Connection=ethernet 3 | IP=dhcp 4 | -------------------------------------------------------------------------------- /build-tests/x86/archlinux/test-image-live-disk-kis/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/archlinux/test-image-live-disk-kis/root/fastboot: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /build-tests/x86/centos/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/CentOS_9 2 | https://mirror.stream.centos.org/SIGs/9-stream/extras/x86_64/extras-common/ 3 | https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/ 4 | https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/ 5 | https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/ 6 | obs://Virtualization:Appliances:Builder/CentOS_9 7 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #====================================== 3 | # Functions... 4 | #-------------------------------------- 5 | test -f /.kconfig && . /.kconfig 6 | test -f /.profile && . /.profile 7 | 8 | #====================================== 9 | # Greeting... 10 | #-------------------------------------- 11 | echo "Configure image: [$kiwi_iname]..." 12 | 13 | #====================================== 14 | # Setup default target, multi-user 15 | #-------------------------------------- 16 | baseSetRunlevel 3 17 | 18 | exit 0 19 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/root/etc/selinux/config: -------------------------------------------------------------------------------- 1 | 2 | # This file controls the state of SELinux on the system. 3 | # SELINUX= can take one of these three values: 4 | # enforcing - SELinux security policy is enforced. 5 | # permissive - SELinux prints warnings instead of enforcing. 6 | # disabled - No SELinux policy is loaded. 7 | SELINUX=permissive 8 | # SELINUXTYPE= can take one of these two values: 9 | # targeted - Only targeted network daemons are protected. 10 | # strict - Full SELinux protection. 11 | # mls - Multi Level Security protection. 12 | SELINUXTYPE=targeted 13 | # SETLOCALDEFS= Check local definition changes 14 | SETLOCALDEFS=0 15 | 16 | 17 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/root/etc/sysconfig/firstboot: -------------------------------------------------------------------------------- 1 | RUN_FIRSTBOOT=NO 2 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/root/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | NETWORKING=yes 2 | NETWORKING_IPV6=no 3 | HOSTNAME=localhost.localdomain 4 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/root/etc/sysconfig/network-scripts/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | DEVICE=lan0 2 | BOOTPROTO=dhcp 3 | ONBOOT=yes 4 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/centos/test-image-live-disk-v9/root/fastboot: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /build-tests/x86/debian/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Debian_12_update,apt-deb,kiwi,,,,,,,false 2 | obs://Virtualization:Appliances:Staging/Debian_12_x86_64,apt-deb,kiwi,,,,,,,false 3 | https://ftp.halifax.rwth-aachen.de/debian,apt-deb,bookworm_1,,,,,main,bookworm,false 4 | https://ftp.halifax.rwth-aachen.de/debian,apt-deb,bookworm_2,,,,,contrib,bookworm,false 5 | https://ftp.halifax.rwth-aachen.de/debian,apt-deb,bookworm_3,,,,,non-free,bookworm,false 6 | -------------------------------------------------------------------------------- /build-tests/x86/debian/test-image-live-disk/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | #====================================== 5 | # Functions... 6 | #-------------------------------------- 7 | test -f /.kconfig && . /.kconfig 8 | 9 | #====================================== 10 | # Greeting... 11 | #-------------------------------------- 12 | echo "Configure image: [$kiwi_iname]..." 13 | 14 | #====================================== 15 | # Activate services 16 | #-------------------------------------- 17 | baseInsertService sshd 18 | 19 | #====================================== 20 | # Setup default target, multi-user 21 | #-------------------------------------- 22 | baseSetRunlevel 3 23 | -------------------------------------------------------------------------------- /build-tests/x86/debian/test-image-live-disk/root/etc/network/interfaces.d/lan0: -------------------------------------------------------------------------------- 1 | auto lan0 2 | iface lan0 inet dhcp 3 | -------------------------------------------------------------------------------- /build-tests/x86/debian/test-image-live-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Fedora_39 2 | https://mirrors.fedoraproject.org/metalink?repo=fedora-39&arch=x86_64,,,,,,,,,,metalink 3 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/kiwi-settings/kiwi-settings.spec: -------------------------------------------------------------------------------- 1 | Name: kiwi-settings 2 | Version: 1.1.1 3 | Release: 0 4 | License: GPL-3.0-or-later 5 | %if "%{_vendor}" == "debbuild" 6 | Packager: Marcus Schaefer 7 | %endif 8 | Summary: KIWI - runtime config file 9 | Group: System/Management 10 | Source: %{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-build 12 | BuildArch: noarch 13 | 14 | %description 15 | Provides a KIWI runtime config file suitable building 16 | the fedora based integrations test 17 | 18 | %prep 19 | %setup -q 20 | 21 | %install 22 | install -D -m 644 kiwi-settings/kiwi.yml %{buildroot}/etc/kiwi.yml 23 | 24 | %files 25 | %defattr(-,root,root) 26 | %config /etc/kiwi.yml 27 | 28 | %changelog 29 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/kiwi-settings/kiwi-settings/kiwi.yml: -------------------------------------------------------------------------------- 1 | oci: 2 | - archive_tool: buildah 3 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-docker/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | building a container in a container causes issues for buildah 2 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/iso-esp-excludes.yaml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - BOOT/fb*.efi 3 | - fedora 4 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/root/etc/selinux/config: -------------------------------------------------------------------------------- 1 | 2 | # This file controls the state of SELinux on the system. 3 | # SELINUX= can take one of these three values: 4 | # enforcing - SELinux security policy is enforced. 5 | # permissive - SELinux prints warnings instead of enforcing. 6 | # disabled - No SELinux policy is loaded. 7 | SELINUX=permissive 8 | # SELINUXTYPE= can take one of these two values: 9 | # targeted - Only targeted network daemons are protected. 10 | # strict - Full SELinux protection. 11 | # mls - Multi Level Security protection. 12 | SELINUXTYPE=targeted 13 | # SETLOCALDEFS= Check local definition changes 14 | SETLOCALDEFS=0 15 | 16 | 17 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/root/etc/sysconfig/firstboot: -------------------------------------------------------------------------------- 1 | RUN_FIRSTBOOT=NO 2 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/root/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | NETWORKING=yes 2 | NETWORKING_IPV6=no 3 | HOSTNAME=localhost.localdomain 4 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/root/etc/sysconfig/network-scripts/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | DEVICE=lan0 2 | BOOTPROTO=dhcp 3 | ONBOOT=yes 4 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/fedora/test-image-live-disk/root/fastboot: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/openSUSE_Leap_15.6 2 | https://download.opensuse.org/update/leap/15.6/sle 3 | https://download.opensuse.org/update/leap/15.6/backports 4 | https://download.opensuse.org/update/leap/15.6/oss 5 | https://download.opensuse.org/distribution/leap/15.6/repo/oss 6 | obs://security:SELinux/15.6 7 | -------------------------------------------------------------------------------- /build-tests/x86/leap/kiwi-settings/kiwi-settings.spec: -------------------------------------------------------------------------------- 1 | Name: kiwi-settings 2 | Version: 1.1.1 3 | Release: 0 4 | License: GPL-3.0-or-later 5 | %if "%{_vendor}" == "debbuild" 6 | Packager: Marcus Schaefer 7 | %endif 8 | Summary: KIWI - runtime config file 9 | Group: System/Management 10 | Source: %{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-build 12 | BuildArch: noarch 13 | 14 | %description 15 | Provides a KIWI runtime config file suitable building 16 | the leap based integrations test 17 | 18 | %prep 19 | %setup -q 20 | 21 | %install 22 | install -D -m 644 kiwi-settings/kiwi.yml %{buildroot}/etc/kiwi.yml 23 | 24 | %files 25 | %defattr(-,root,root) 26 | %config /etc/kiwi.yml 27 | 28 | %changelog 29 | -------------------------------------------------------------------------------- /build-tests/x86/leap/kiwi-settings/kiwi-settings/kiwi.yml: -------------------------------------------------------------------------------- 1 | runtime_checks: 2 | - disable: 3 | - check_dracut_module_for_disk_overlay_in_package_list 4 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-custom-partitions/root/config_partids.patch: -------------------------------------------------------------------------------- 1 | --- /usr/lib/dracut/modules.d/90kiwi-repart/kiwi-repart-disk.sh 2 | +++ /usr/lib/dracut/modules.d/90kiwi-repart/kiwi-repart-disk.sh 3 | @@ -23,6 +23,8 @@ function initialize { 4 | import_file ${profile} 5 | import_file ${partition_ids} 6 | 7 | + export kiwi_RootPart=7 8 | + 9 | disk=$(lookup_disk_device_from_root) 10 | export disk 11 | 12 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk-selinux/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shellcheck disable=SC1091 3 | test -f /.kconfig && . /.kconfig 4 | 5 | set -ex 6 | 7 | #====================================== 8 | # Setup baseproduct link 9 | #-------------------------------------- 10 | suseSetupProduct 11 | 12 | #====================================== 13 | # Delete auto relabel trigger 14 | #-------------------------------------- 15 | rm -f /.autorelabel 16 | 17 | #====================================== 18 | # Activate services 19 | #-------------------------------------- 20 | suseInsertService sshd 21 | 22 | #====================================== 23 | # Setup default target, multi-user 24 | #-------------------------------------- 25 | baseSetRunlevel 3 26 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk-simple/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk-simple/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/disk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | env | grep kiwi 4 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/root/.kiwi_dracut_hostonly.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/leap/test-image-disk/root/.kiwi_dracut_hostonly.trigger -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/root/.kiwi_grub_config.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/leap/test-image-disk/root/.kiwi_grub_config.trigger -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/root/usr/lib/systemd/system/dracut_hostonly.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild dracut initrd for this host 3 | ConditionPathExists=/.kiwi_dracut_hostonly.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'dracut -f' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_dracut_hostonly.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-disk/root/usr/lib/systemd/system/grub_config.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild grub config from distro toolkit 3 | ConditionPathExists=/.kiwi_grub_config.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'grub2-mkconfig -o /boot/grub2/grub.cfg' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_grub_config.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker-derived/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | building a container in a container causes issues for buildah 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker-derived/appliance.kiwi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | David Cassany 6 | dcassany@suse.de 7 | SUSE derived docker container 8 | 9 | 10 | 11 | 12 | 13 | 1.15.6 14 | zypper 15 | true 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | building a container in a container causes issues for buildah 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================ 3 | # FILE : config.sh 4 | #---------------- 5 | # PROJECT : OpenSuSE KIWI Image System 6 | # COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights reserved 7 | # : 8 | # AUTHOR : Marcus Schaefer 9 | # : 10 | # BELONGS TO : Operating System images 11 | # : 12 | # DESCRIPTION : configuration script for SUSE based 13 | # : operating systems 14 | # : 15 | # : 16 | # STATUS : BETA 17 | #---------------- 18 | #====================================== 19 | # Functions... 20 | #-------------------------------------- 21 | test -f /.kconfig && . /.kconfig 22 | test -f /.profile && . /.profile 23 | 24 | #====================================== 25 | # Greeting... 26 | #-------------------------------------- 27 | echo "Configure image: [$kiwi_iname]..." 28 | 29 | #====================================== 30 | # Create ssh machine keys 31 | #-------------------------------------- 32 | /usr/sbin/sshd-gen-keys-start 33 | 34 | (cd /usr/share/locale && find -name "*.mo" | xargs rm) 35 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-docker/root/home/vagrant/.ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-embedded/root/overlayroot/.persistent: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/leap/test-image-embedded/root/overlayroot/.persistent -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-embedded/root/sbin/overlayroot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Static device node for virtio use only 4 | mount /dev/vda2 /overlayroot 5 | 6 | mkdir -p \ 7 | /overlayroot/rootfs \ 8 | /overlayroot/rootfs_upper \ 9 | /overlayroot/rootfs_work 10 | 11 | mount -t overlay overlay /overlayroot/rootfs \ 12 | -o lowerdir=/,upperdir=/overlayroot/rootfs_upper,workdir=/overlayroot/rootfs_work 13 | 14 | cd /overlayroot/rootfs 15 | exec /usr/sbin/switch_root . /sbin/init 16 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-embedded/root/usr/lib/systemd/system/systemd-remount-fs.service: -------------------------------------------------------------------------------- 1 | /usr/bin/true -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-live/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-live/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-luks/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-luks/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-lvm/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-lvm/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-overlayroot/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-overlayroot/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/leap/test-image-tbz/appliance.kiwi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | Simple tar archive build, bootstrap only 8 | 9 | 10 | 1.15.3 11 | zypper 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/Fedora_Rawhide 2 | https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=x86_64,,,,,,,,,,metalink 3 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-dnf5/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | # shellcheck disable=SC1091 6 | test -f /.kconfig && . /.kconfig 7 | 8 | #====================================== 9 | # Activate services 10 | #-------------------------------------- 11 | baseInsertService dbus-broker 12 | baseInsertService NetworkManager 13 | 14 | #====================================== 15 | # Setup default target, multi-user 16 | #-------------------------------------- 17 | baseSetRunlevel 3 18 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-live-disk/root/etc/selinux/config: -------------------------------------------------------------------------------- 1 | 2 | # This file controls the state of SELinux on the system. 3 | # SELINUX= can take one of these three values: 4 | # enforcing - SELinux security policy is enforced. 5 | # permissive - SELinux prints warnings instead of enforcing. 6 | # disabled - No SELinux policy is loaded. 7 | SELINUX=permissive 8 | # SELINUXTYPE= can take one of these two values: 9 | # targeted - Only targeted network daemons are protected. 10 | # strict - Full SELinux protection. 11 | # mls - Multi Level Security protection. 12 | SELINUXTYPE=targeted 13 | # SETLOCALDEFS= Check local definition changes 14 | SETLOCALDEFS=0 15 | 16 | 17 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-live-disk/root/etc/sysconfig/firstboot: -------------------------------------------------------------------------------- 1 | RUN_FIRSTBOOT=NO 2 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-live-disk/root/etc/sysconfig/network: -------------------------------------------------------------------------------- 1 | NETWORKING=yes 2 | NETWORKING_IPV6=no 3 | HOSTNAME=localhost.localdomain 4 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-live-disk/root/etc/sysconfig/network-scripts/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | DEVICE=lan0 2 | BOOTPROTO=dhcp 3 | ONBOOT=yes 4 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-live-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-live-disk/root/fastboot: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-nitro-enclave/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | declare kiwi_iname=${kiwi_iname} 6 | 7 | echo "Configure image: [${kiwi_iname}]..." 8 | 9 | #====================================== 10 | # Setup services 11 | #-------------------------------------- 12 | for service in nitro-enclave-alive sshd;do 13 | systemctl enable "${service}" 14 | done 15 | 16 | #====================================== 17 | # Allow ssh root login 18 | #-------------------------------------- 19 | echo "PermitRootLogin yes" > /etc/ssh/sshd_config.d/root.conf 20 | 21 | #====================================== 22 | # load virtio_mmio 23 | #-------------------------------------- 24 | echo virtio_mmio > /etc/modules-load.d/virtio-mmio.conf 25 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-systemd-boot/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #====================================== 3 | # Helpers 4 | #-------------------------------------- 5 | # shellcheck disable=SC1091 6 | test -f /.kconfig && . /.kconfig 7 | 8 | set -ex 9 | 10 | declare kiwi_iname 11 | 12 | #====================================== 13 | # Greeting... 14 | #-------------------------------------- 15 | echo "Configure image: [$kiwi_iname]..." 16 | 17 | #====================================== 18 | # Activate services 19 | #-------------------------------------- 20 | baseInsertService dbus-broker 21 | baseInsertService NetworkManager 22 | 23 | #====================================== 24 | # Setup default target, multi-user 25 | #-------------------------------------- 26 | baseSetRunlevel 3 27 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-systemd-boot/root/etc/sysconfig/network-scripts/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | DEVICE=lan0 2 | BOOTPROTO=dhcp 3 | ONBOOT=yes 4 | -------------------------------------------------------------------------------- /build-tests/x86/rawhide/test-image-systemd-boot/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/openSUSE_Tumbleweed 2 | https://download.opensuse.org/tumbleweed/repo/oss 3 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/kiwi-settings/kiwi-settings.spec: -------------------------------------------------------------------------------- 1 | Name: kiwi-settings 2 | Version: 1.1.1 3 | Release: 0 4 | License: GPL-3.0-or-later 5 | %if "%{_vendor}" == "debbuild" 6 | Packager: Marcus Schaefer 7 | %endif 8 | Summary: KIWI - runtime config file 9 | Group: System/Management 10 | Source: %{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-build 12 | BuildArch: noarch 13 | 14 | %description 15 | Provides a KIWI runtime config file and others suitable 16 | for building the tumbleweed based integrations test 17 | 18 | %prep 19 | %setup -q 20 | 21 | %install 22 | mkdir -p %{buildroot}/etc/modprobe.d 23 | cp -a kiwi-settings/60-blacklist_fs-erofs.conf %{buildroot}/etc/modprobe.d/ 24 | 25 | %files 26 | %defattr(-,root,root) 27 | /etc/modprobe.d/60-blacklist_fs-erofs.conf 28 | 29 | %changelog 30 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/kiwi-settings/kiwi-settings/60-blacklist_fs-erofs.conf: -------------------------------------------------------------------------------- 1 | /dev/null -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-MicroOS/disk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euxo pipefail 3 | 4 | /usr/libexec/setup-etc-subvol 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-MicroOS/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-MicroOS/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/.mozilla/firefox/profile/user.js.template: -------------------------------------------------------------------------------- 1 | // Mozilla User Preferences 2 | 3 | // do not remember or generate passwords 4 | user_pref("signon.management.page.breach-alerts.enabled", false); 5 | user_pref("signon.rememberSignons", false); 6 | user_pref("signon.generation.enabled", false); 7 | // start always in the custom homepage 8 | user_pref("browser.startup.page", 1); 9 | // custom homepage: the value is expected to be replaced with the login URL by the startup script 10 | user_pref("browser.startup.homepage", "__HOMEPAGE__"); 11 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/.xinitrc: -------------------------------------------------------------------------------- 1 | icewm-session -c /etc/icewm/preferences.yast2 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/avahi/services/agama.service: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Agama Installer (https://%h.local) 6 | 7 | _https._tcp 8 | _agama._sub._https._tcp 9 | 433 10 | 11 | 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/modules-load.d/10-multipath.conf: -------------------------------------------------------------------------------- 1 | dm_multipath 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/multipath.conf: -------------------------------------------------------------------------------- 1 | defaults { 2 | find_multipaths smart 3 | } 4 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/ssh/sshd_config.d/10_root_login.conf: -------------------------------------------------------------------------------- 1 | PermitRootLogin yes 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-avahi-issue.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate issue file for Agama URL from Avahi 3 | 4 | After=avahi-daemon.service 5 | 6 | [Service] 7 | ExecStart=agama-issue-generator --watch-avahi 8 | Type=simple 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-certificate-issue.path: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Watch the Agama SSL certificate for changes 3 | Before=systemd-user-sessions.service 4 | 5 | [Path] 6 | Unit=agama-certificate-issue.service 7 | PathChanged=/etc/agama.d/ssl/cert.pem 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-certificate-issue.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate issue file for Agama SSL certificate 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=agama-issue-generator --ssl 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-certificate-wait.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Postpone login prompt after the SSL fingerprint issue is generated 3 | 4 | After=agama-web-server.service 5 | 6 | # copied from YaST2-Second-Stage.service 7 | Before=getty@tty1.service 8 | Before=getty@tty2.service 9 | Before=getty@tty3.service 10 | Before=getty@tty4.service 11 | Before=getty@tty5.service 12 | Before=getty@tty6.service 13 | Before=serial-getty@hvc0.service 14 | Before=serial-getty@sclp_line0.service 15 | Before=serial-getty@ttyAMA0.service 16 | Before=serial-getty@ttyS0.service 17 | Before=serial-getty@ttyS1.service 18 | Before=serial-getty@ttyS2.service 19 | Before=serial-getty@ttysclp0.service 20 | 21 | [Service] 22 | Type=oneshot 23 | # wait at most 15 seconds to not block 24 | ExecStart=agama-issue-generator --wait-for-ssl 15 25 | 26 | [Install] 27 | WantedBy=default.target 28 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-hostname.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set Agama hostname 3 | # after running the default hostname systemd service 4 | After=systemd-hostnamed.target 5 | # but before starting the mDNS server 6 | Before=avahi-daemon.service 7 | # run only if the hostname has the default value, if it has been changed 8 | # by the hernel command line or systemd then keep it 9 | ConditionHost=localhost 10 | 11 | [Service] 12 | ExecStart=hostnamectl hostname --transient agama 13 | Type=oneshot 14 | User=root 15 | 16 | [Install] 17 | WantedBy=default.target 18 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-self-update.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Agama self-update 3 | 4 | After=network-online.target 5 | 6 | # before starting the Agama servers so they use the new packages 7 | Before=agama-web-server.service 8 | Before=agama.service 9 | Before=x11-autologin.service 10 | # before interactive password services 11 | Before=live-password-dialog.service 12 | Before=live-password-systemd.service 13 | 14 | # kernel command line option 15 | ConditionKernelCommandLine=|agama.self_update 16 | # linuxrc/YaST backward compatibility 17 | ConditionKernelCommandLine=|agama.selfupdate 18 | 19 | [Service] 20 | Type=oneshot 21 | Environment=TERM=linux 22 | ExecStartPre=dmesg --console-off 23 | ExecStart=agama-self-update 24 | ExecStartPost=dmesg --console-on 25 | TTYReset=yes 26 | TTYVHangup=yes 27 | StandardInput=tty 28 | TimeoutSec=0 29 | 30 | [Install] 31 | WantedBy=default.target 32 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-ssh-issue.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate issue file for SSH host keys 3 | Before=systemd-user-sessions.service 4 | After=sshd.service 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=agama-issue-generator --ssh 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/agama-welcome-issue.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Generate Agama welcome message 3 | Before=systemd-user-sessions.service 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=agama-issue-generator --welcome 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/live-password-cmdline.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set the root password from kernel command line 3 | 4 | # before starting the SSH and Agama server so they use the new password 5 | Before=sshd.service 6 | Before=agama-web-server.service 7 | 8 | # before the interactive setting methods so they can override it 9 | Before=live-password-dialog.service 10 | Before=live-password-systemd.service 11 | 12 | # plain text password or encrypted password passed via kernel command line 13 | ConditionKernelCommandLine=|live.password 14 | ConditionKernelCommandLine=|live.password_hash 15 | 16 | [Service] 17 | ExecStart=live-password --kernel 18 | Type=oneshot 19 | 20 | [Install] 21 | WantedBy=default.target 22 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/live-password-iso.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set the root password from the ISO application area 3 | 4 | # before starting the SSH and Agama server so they use the new password 5 | Before=sshd.service 6 | Before=agama-web-server.service 7 | 8 | # before the other password setting methods so they can override it 9 | Before=live-password-cmdline.service 10 | Before=live-password-dialog.service 11 | Before=live-password-systemd.service 12 | 13 | [Service] 14 | ExecStart=live-password --iso 15 | Type=oneshot 16 | 17 | [Install] 18 | WantedBy=default.target 19 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/live-password-random.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Set a random password for root if not already set 3 | 4 | # before starting the SSH and Agama server so they use the new password 5 | Before=sshd.service 6 | Before=agama-web-server.service 7 | 8 | # after all other password services, this a fallback service 9 | After=live-password-cmdline.service 10 | After=live-password-dialog.service 11 | After=live-password-iso.service 12 | After=live-password-systemd.service 13 | 14 | [Service] 15 | ExecStart=live-password --random 16 | Type=oneshot 17 | 18 | [Install] 19 | WantedBy=default.target 20 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/systemd/system/x11-autologin.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=X11 session 3 | After=graphical.target systemd-user-sessions.service 4 | 5 | [Service] 6 | User=root 7 | WorkingDirectory=~ 8 | 9 | PAMName=login 10 | Environment=XDG_SESSION_TYPE=x11 11 | TTYPath=/dev/tty7 12 | StandardInput=tty 13 | UnsetEnvironment=TERM 14 | 15 | UtmpIdentifier=tty7 16 | UtmpMode=user 17 | 18 | StandardOutput=journal 19 | ExecStartPre=/usr/bin/chvt 7 20 | ExecStart=/usr/bin/startx -- vt7 -keeptty -verbose 3 -logfile /dev/null 21 | Restart=no 22 | 23 | [Install] 24 | WantedBy=graphical.target 25 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/zypp/repos.d/agama-devel.repo: -------------------------------------------------------------------------------- 1 | [agama-devel] 2 | name=Agama-Devel 3 | type=rpm-md 4 | enabled=1 5 | autorefresh=1 6 | gpgcheck=1 7 | baseurl=https://download.opensuse.org/repositories/systemsmanagement:/Agama:/Devel/openSUSE_Tumbleweed/ 8 | gpgkey=https://download.opensuse.org/repositories/systemsmanagement:/Agama:/Devel/openSUSE_Tumbleweed/repodata/repomd.xml.key 9 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/etc/zypp/repos.d/repo-oss.repo: -------------------------------------------------------------------------------- 1 | [repo-oss] 2 | name=openSUSE-Tumbleweed-Oss 3 | type=rpm-md 4 | enabled=1 5 | autorefresh=1 6 | gpgcheck=1 7 | baseurl=https://download.opensuse.org/tumbleweed/repo/oss 8 | 9 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/root/.icewm/startup: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # Start a browser to connect to Agama's web user interface skipping the authentication. 3 | 4 | TOKEN_FILE=/run/agama/token 5 | TOKEN=$(cat $TOKEN_FILE) 6 | PREFS=$HOME/.mozilla/firefox/profile/user.js 7 | 8 | sed -e "s/__HOMEPAGE__/http:\/\/localhost\/login?token=$TOKEN/" $PREFS.template > $PREFS 9 | firefox --kiosk --profile $HOME/.mozilla/firefox/profile 10 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/root/.mozilla/firefox/profile/user.js.template: -------------------------------------------------------------------------------- 1 | // Mozilla User Preferences 2 | 3 | // do not remember or generate passwords 4 | user_pref("signon.management.page.breach-alerts.enabled", false); 5 | user_pref("signon.rememberSignons", false); 6 | user_pref("signon.generation.enabled", false); 7 | 8 | // start always in the custom homepage 9 | user_pref("browser.startup.page", 1); 10 | // custom homepage: the value is expected to be replaced with the login URL by the startup script 11 | user_pref("browser.startup.homepage", "__HOMEPAGE__"); 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/root/.xinitrc: -------------------------------------------------------------------------------- 1 | icewm-session -c /etc/icewm/preferences.yast2 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/tmp/systemsmanagement_key.gpg: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1.4.5 (GNU/Linux) 3 | 4 | mQENBFspGl8BCADC0Lmh3GGIaWI4FvekwxbCqsRlqWQhdtSgQiFXlzjKVPl5kPSt 5 | oYvvIVV5M33SaHK1s2/i2dbiL6vmw+NazQueOcHw//uAikugssmvwK1iYhbwl/TW 6 | EZDVfW0pW33XR9IHzhbONV2293pjwScemmcEYghrN7TDw6cwcMs14ju0Jbh03+jN 7 | lW+Ryrazeb7O9lkdeaA/Fq4c3miw156uWqdgKr7kPnp0GjMWRSBVIeUK936PJyNV 8 | ibcwsvP1K2sqF9TtbDzRMdqw5GOdHIUd0Ml0Tb8Sg+kSxdhkhgBUslZW77FrEWMS 9 | HJD1rw77VUL+v7BzKBKl7mLXlfaNpmfkXWJTABEBAAG0RHN5c3RlbXNtYW5hZ2Vt 10 | ZW50IE9CUyBQcm9qZWN0IDxzeXN0ZW1zbWFuYWdlbWVudEBidWlsZC5vcGVuc3Vz 11 | ZS5vcmc+iQE+BBMBCAAoBQJlcECTAhsDBQkOZdY0BgsJCAcDAgYVCAIJCgsEFgID 12 | AQIeAQIXgAAKCRCsqpz35uWiE9NYCAC4BiV/CV/9QzWbwUup/pmLOD84JPo72C15 13 | Z+FARqk2LS5JhfxZRFaG13S2/+Ua3gN4RG0WqOxRaA6oKPs2V81X3I3ysq9660MW 14 | 4qPbhGVZaBzPLat+9Q6MaRaqu9G3sEePGDWR1sR3s/d3pJl0kRK2fyQILnUx65zb 15 | r77ErCox/kwAB5bu5Nv9d4YuwS7oY+b1Nw1vvmmBu8z8acd6iNX5inIX+Oy06WTE 16 | lO0gh54GjVWIK1WlJYcV73GIu2jUBQJhP3GAaf9kp2Mtv/W9+D2XxGaFslZShiMp 17 | /FBcmYQeJAfh8WmxdWFZRlvbpqNbC6Gxmb/+euIZz43U6B1qQhRgiEYEExECAAYF 18 | AlspGl8ACgkQOzARt2udZSOfAACdEKhSoziJSqKEvrsGEBq0QNc4CwcAniYQosXY 19 | +OdtQPCAY1lf4oqKOLpD 20 | =/8kX 21 | -----END PGP PUBLIC KEY BLOCK----- 22 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/usr/bin/agama-self-update: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Experimental Agama self-update script 4 | # 5 | # This script updates the Agama packages in the Live system from the 6 | # Agama Devel OBS project. 7 | 8 | 9 | # first try a quick and simple solution, refreshing the OSS repository takes a 10 | # lot of time so try using only the agama-devel for update 11 | zypper modifyrepo --disable repo-oss 12 | zypper refresh 13 | zypper --non-interactive dup --details --from agama-devel 14 | STATUS=$? 15 | 16 | # enable OSS back 17 | zypper modifyrepo --enable repo-oss 18 | 19 | # if it failed try it again with the OSS repo enabled, maybe there was some 20 | # dependency problem which hopefully will be OK now 21 | if [ "$?" != "0" ]; then 22 | zypper --non-interactive dup --details --from agama-devel 23 | fi 24 | 25 | # clean all repository caches to save space in RAM disk 26 | zypper clean --all 27 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/usr/lib/dracut/modules.d/98dracut-menu/dracut-cmdline-menu.service: -------------------------------------------------------------------------------- 1 | # This file is part of dracut. 2 | 3 | [Unit] 4 | Description=dracut menu for additional cmdline parameters 5 | Documentation=man:dracut.bootup(7) 6 | DefaultDependencies=no 7 | Before=dracut-cmdline-ask.service 8 | Wants=systemd-journald.socket 9 | After=systemd-journald.socket 10 | Wants=systemd-vconsole-setup.service 11 | After=systemd-vconsole-setup.service 12 | 13 | ConditionPathExists=/usr/lib/initrd-release 14 | ConditionKernelCommandLine=|rd.cmdline=menu 15 | ConditionPathExistsGlob=|/etc/cmdline.d/*.conf 16 | Conflicts=shutdown.target emergency.target 17 | 18 | [Service] 19 | Environment=DRACUT_SYSTEMD=1 20 | Environment=NEWROOT=/sysroot 21 | Type=oneshot 22 | ExecStart=-/bin/dracut-cmdline-menu 23 | StandardInput=tty 24 | StandardOutput=inherit 25 | StandardError=inherit 26 | RemainAfterExit=yes 27 | KillMode=process 28 | IgnoreSIGPIPE=no 29 | 30 | # Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash 31 | # terminates cleanly. 32 | KillSignal=SIGHUP 33 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/usr/lib/dracut/modules.d/98dracut-menu/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # called by dracut 4 | check() { 5 | return 0 6 | } 7 | 8 | # called by dracut 9 | depends() { 10 | echo "dracut-systemd" 11 | 12 | return 0 13 | } 14 | 15 | installkernel() { 16 | return 0 17 | } 18 | 19 | # called by dracut 20 | install() { 21 | inst_script "$moddir/dracut-cmdline-menu.sh" /bin/dracut-cmdline-menu 22 | 23 | inst_simple "$moddir/dracut-cmdline-menu.service" "$systemdsystemunitdir/dracut-cmdline-menu.service" 24 | $SYSTEMCTL -q --root "$initdir" add-wants initrd.target dracut-cmdline-menu.service 25 | 26 | inst_hook pre-pivot 98 "$moddir/save-cmdline.sh" 27 | } 28 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/usr/lib/dracut/modules.d/98dracut-menu/save-cmdline.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | [ -e /dracut-state.sh ] && . /dracut-state.sh 4 | 5 | rm -f "$NEWROOT/etc/cmdline.d/10-liveroot.conf" 6 | 7 | if [ -e /etc/cmdline.d/98-cmdline-menu.conf ] ; then 8 | cp /etc/cmdline.d/98-cmdline-menu.conf "$NEWROOT/etc/cmdline-menu.conf" 9 | else 10 | echo "root=$root" >"$NEWROOT/etc/cmdline-menu.conf" 11 | fi 12 | 13 | echo "$CMDLINE" >"$NEWROOT/etc/cmdline-full.conf" 14 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/usr/lib/udev/rules.d/80-agama-connect-issue.rules: -------------------------------------------------------------------------------- 1 | # udev rules for generating the Agama access URLs displayed at the console 2 | ACTION=="add", SUBSYSTEM=="net", RUN+="/usr/bin/agama-issue-generator --network add $env{INTERFACE}" 3 | ACTION=="remove", SUBSYSTEM=="net", RUN+="/usr/bin/agama-issue-generator --network rm $env{INTERFACE}" 4 | ACTION=="move", SUBSYSTEM=="net", RUN+="/usr/bin/agama-issue-generator --network add $env{INTERFACE}" 5 | ACTION=="move", SUBSYSTEM=="net", RUN+="/usr/bin/agama-issue-generator --network rm $env{DEVPATH_OLD}" 6 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-agama/root/usr/share/live/misc/dialog.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Configuration file for the "dialog" tool 3 | # 4 | # To generate a full template with all options run: 5 | # 6 | # dialog --create-rc dialog.conf 7 | # 8 | 9 | # Background screen color 10 | screen_color = (WHITE,CYAN,ON) 11 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-azure/root/etc/sysconfig/network/ifcfg-eth0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | DHCLIENT6_MODE='managed' 3 | MTU='' 4 | REMOTE_IPADDR='' 5 | STARTMODE='onboot' 6 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/disk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | env | grep kiwi 4 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/root/.kiwi_dracut_hostonly.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/tumbleweed/test-image-bundle-format/root/.kiwi_dracut_hostonly.trigger -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/root/.kiwi_grub_config.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/tumbleweed/test-image-bundle-format/root/.kiwi_grub_config.trigger -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/root/usr/lib/systemd/system/dracut_hostonly.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild dracut initrd for this host 3 | ConditionPathExists=/.kiwi_dracut_hostonly.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'dracut -f' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_dracut_hostonly.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-bundle-format/root/usr/lib/systemd/system/grub_config.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild grub config from distro toolkit 3 | ConditionPathExists=/.kiwi_grub_config.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'grub2-mkconfig -o /boot/grub2/grub.cfg' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_grub_config.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-custom-partitions/root/config_partids.patch: -------------------------------------------------------------------------------- 1 | --- /usr/lib/dracut/modules.d/90kiwi-repart/kiwi-repart-disk.sh 2 | +++ /usr/lib/dracut/modules.d/90kiwi-repart/kiwi-repart-disk.sh 3 | @@ -23,6 +23,8 @@ function initialize { 4 | import_file ${profile} 5 | import_file ${partition_ids} 6 | 7 | + export kiwi_RootPart=7 8 | + 9 | disk=$(lookup_disk_device_from_root) 10 | export disk 11 | 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-legacy/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | requires legacy oemboot package which does not exist in the box 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-legacy/.skip_boxbuild_vm: -------------------------------------------------------------------------------- 1 | requires legacy oemboot package which does not exist in the box 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-ramdisk/root/etc/dracut.conf.d/90-brd.conf: -------------------------------------------------------------------------------- 1 | add_drivers+=" brd " 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-selinux/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shellcheck disable=SC1091 3 | test -f /.kconfig && . /.kconfig 4 | 5 | set -ex 6 | 7 | #====================================== 8 | # Setup baseproduct link 9 | #-------------------------------------- 10 | suseSetupProduct 11 | 12 | #====================================== 13 | # Delete auto relabel trigger 14 | #-------------------------------------- 15 | rm -f /.autorelabel 16 | 17 | #====================================== 18 | # Activate services 19 | #-------------------------------------- 20 | suseInsertService sshd 21 | 22 | #====================================== 23 | # Setup default target, multi-user 24 | #-------------------------------------- 25 | baseSetRunlevel 3 26 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-simple/a_custom_file: -------------------------------------------------------------------------------- 1 | This is a custom file 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-simple/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk-simple/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/disk.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | env | grep kiwi 4 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/root/.kiwi_dracut_hostonly.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/tumbleweed/test-image-disk/root/.kiwi_dracut_hostonly.trigger -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/root/.kiwi_grub_config.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/tumbleweed/test-image-disk/root/.kiwi_grub_config.trigger -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/root/usr/lib/systemd/system/dracut_hostonly.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild dracut initrd for this host 3 | ConditionPathExists=/.kiwi_dracut_hostonly.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'dracut -f' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_dracut_hostonly.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-disk/root/usr/lib/systemd/system/grub_config.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild grub config from distro toolkit 3 | ConditionPathExists=/.kiwi_grub_config.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'grub2-mkconfig -o /boot/grub2/grub.cfg' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_grub_config.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker-derived/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | building a container in a container causes issues for buildah 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker-derived/appliance.kiwi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | David Cassany 6 | dcassany@suse.de 7 | SUSE derived docker container 8 | 9 | 10 | 11 | 12 | 13 | 1.0 14 | zypper 15 | true 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | building a container in a container causes issues for buildah 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================ 3 | # FILE : config.sh 4 | #---------------- 5 | # PROJECT : OpenSuSE KIWI Image System 6 | # COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights reserved 7 | # : 8 | # AUTHOR : Marcus Schaefer 9 | # : 10 | # BELONGS TO : Operating System images 11 | # : 12 | # DESCRIPTION : configuration script for SUSE based 13 | # : operating systems 14 | # : 15 | # : 16 | # STATUS : BETA 17 | #---------------- 18 | #====================================== 19 | # Functions... 20 | #-------------------------------------- 21 | test -f /.kconfig && . /.kconfig 22 | test -f /.profile && . /.profile 23 | 24 | #====================================== 25 | # Greeting... 26 | #-------------------------------------- 27 | echo "Configure image: [$kiwi_iname]..." 28 | 29 | #====================================== 30 | # Create ssh machine keys 31 | #-------------------------------------- 32 | /usr/sbin/sshd-gen-keys-start 33 | 34 | (cd /usr/share/locale && find -name "*.mo" | xargs rm) 35 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-docker/root/home/vagrant/.ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-ec2/root/etc/sysconfig/network/ifcfg-eth0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='hotplug' 5 | LINK_REQUIRED=no 6 | LINK_READY_WAIT=5 7 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-ec2/root/etc/sysconfig/network/ifcfg-vf2: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='hotplug' 5 | LINK_REQUIRED=no 6 | LINK_READY_WAIT=5 7 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-gce/root/etc/init.d/boot.local: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Brute force ugly work around to some startup snafus with the Google 4 | # startup scripts and other boot odities 5 | 6 | if [ -f "/etc/boto.cfg" ]; then 7 | grep ca_certificates_file /etc/boto.cfg > /dev/null 8 | if [ "$?" = "1" ]; then 9 | echo '[Boto]' >> /etc/boto.cfg 10 | echo 'ca_certificates_file = system' >> /etc/boto.cfg 11 | fi 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-gce/root/etc/sysconfig/network/ifcfg-eth0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp4' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-live/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | declare kiwi_profiles=${kiwi_profiles} 6 | declare kiwi_iname=${kiwi_iname} 7 | 8 | #====================================== 9 | # Greeting... 10 | #-------------------------------------- 11 | echo "Configure image: [$kiwi_iname]..." 12 | 13 | #====================================== 14 | # Setup services 15 | #-------------------------------------- 16 | for service in \ 17 | sshd \ 18 | systemd-networkd \ 19 | systemd-resolved 20 | do 21 | systemctl enable "${service}" 22 | done 23 | 24 | #====================================== 25 | # Include erofs module 26 | #-------------------------------------- 27 | for profile in ${kiwi_profiles//,/ }; do 28 | if [ "${profile}" = "EroFS" ]; then 29 | # remove from blacklist 30 | rm -f /usr/lib/modprobe.d/60-blacklist_fs-erofs.conf 31 | fi 32 | done 33 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-live/root/etc/systemd/network/20-local.network: -------------------------------------------------------------------------------- 1 | [Match] 2 | Name=lan0 3 | 4 | [Network] 5 | DHCP=yes 6 | 7 | [DHCP] 8 | ClientIdentifier=mac 9 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-live/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-luks/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-luks/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-lvm/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-lvm/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-ens1: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-ens2: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-ens3: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-ens4: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-eth0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-eth1: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-eth2: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/sysconfig/network/ifcfg-eth3: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/systemd/system/default.target.wants/firstboot.service: -------------------------------------------------------------------------------- 1 | ../firstboot.service -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/etc/systemd/system/firstboot.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Run finalizing script at first boot 3 | Requires=network.target 4 | Requires=network.service 5 | After=network.target 6 | Requires=network.service 7 | ConditionPathExists=/var/lib/firstboot/runme_at_boot 8 | 9 | [Service] 10 | ExecStart=/usr/local/bin/firstboot.sh 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | 15 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-orthos/root/usr/local/bin/firstboot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | FLAG=/var/lib/firstboot/runme_at_boot 4 | 5 | cd /tmp 6 | for i in change_root_password.sh after_install.sh; do 7 | wget ftp://music.arch.suse.de/scripts/$i 8 | if [ -f ./$i ]; then 9 | chmod 755 ./$i 10 | ./$i 11 | else 12 | echo "$i could not be executed" 13 | fi 14 | done 15 | 16 | rm $FLAG 17 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-overlayroot/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-overlayroot/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-partitions-and-volumes/config.sh: -------------------------------------------------------------------------------- 1 | test -f /.kconfig && . /.kconfig 2 | 3 | #====================================== 4 | # Greeting... 5 | #-------------------------------------- 6 | echo "Configure image: [$kiwi_iname]..." 7 | 8 | #====================================== 9 | # Setup baseproduct link 10 | #-------------------------------------- 11 | suseSetupProduct 12 | 13 | #====================================== 14 | # Activate services 15 | #-------------------------------------- 16 | suseInsertService sshd 17 | 18 | #====================================== 19 | # Setup default target, multi-user 20 | #-------------------------------------- 21 | baseSetRunlevel 3 22 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-pxe/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | requires netboot package which does not exist in the box 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-pxe/.skip_boxbuild_vm: -------------------------------------------------------------------------------- 1 | requires netboot package which does not exist in the box 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-pxe/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-pxe/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-qcow-openstack/root/etc/sysconfig/network/ifcfg-eth0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='auto' 5 | ETHTOOL_OPTIONS='' 6 | USERCONTROL='no' 7 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-qcow-openstack/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" 2 | 3 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-qcow-openstack/root/fstab.append: -------------------------------------------------------------------------------- 1 | # Mount the ephemeral storage 2 | /dev/vda1 / ext4 defaults 1 1 3 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-raid/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-raid/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-systemd-boot/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #====================================== 3 | # Helpers 4 | #-------------------------------------- 5 | # shellcheck disable=SC1091 6 | 7 | test -f /.kconfig && . /.kconfig 8 | 9 | declare kiwi_iname 10 | 11 | #====================================== 12 | # Greeting... 13 | #-------------------------------------- 14 | echo "Configure image: [$kiwi_iname]..." 15 | 16 | #====================================== 17 | # Setup baseproduct link 18 | #-------------------------------------- 19 | suseSetupProduct 20 | 21 | #====================================== 22 | # Activate services 23 | #-------------------------------------- 24 | suseInsertService sshd 25 | suseInsertService dracut_hostonly 26 | 27 | #====================================== 28 | # Setup default target, multi-user 29 | #-------------------------------------- 30 | baseSetRunlevel 3 31 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-systemd-boot/root/.kiwi_dracut_hostonly.trigger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/tumbleweed/test-image-systemd-boot/root/.kiwi_dracut_hostonly.trigger -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-systemd-boot/root/etc/sysconfig/network/ifcfg-lan0: -------------------------------------------------------------------------------- 1 | BOOTPROTO='dhcp' 2 | MTU='' 3 | REMOTE_IPADDR='' 4 | STARTMODE='onboot' 5 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-systemd-boot/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-systemd-boot/root/usr/lib/systemd/system/dracut_hostonly.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Rebuild dracut initrd for this host 3 | ConditionPathExists=/.kiwi_dracut_hostonly.trigger 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/bin/bash -c 'dracut -f' 8 | ExecStartPost=/bin/bash -c 'rm -f /.kiwi_dracut_hostonly.trigger' 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-tbz/appliance.kiwi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | Simple tar archive build, bootstrap only 8 | 9 | 10 | 1.15.1 11 | zypper 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-wsl-ng/root/etc/wsl-distribution.conf: -------------------------------------------------------------------------------- 1 | [oobe] 2 | defaultUid = 1000 3 | defaultName = SUSE 4 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-wsl-ng/root/etc/wsl.conf: -------------------------------------------------------------------------------- 1 | [boot] 2 | systemd=true 3 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-wsl/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | requires distro specific wsl-appx package which does not exist in the box 2 | -------------------------------------------------------------------------------- /build-tests/x86/tumbleweed/test-image-wsl/.skip_boxbuild_vm: -------------------------------------------------------------------------------- 1 | requires distro specific wsl-appx package which does not exist in the box 2 | -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/.repos: -------------------------------------------------------------------------------- 1 | obs://Virtualization:Appliances:Staging/xUbuntu_24.04_x86_64,apt-deb,kiwi,,,,,,,false 2 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble_1,,,,,main,noble,false 3 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble_2,,,,,multiverse,noble,false 4 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble_3,,,,,restricted,noble,false 5 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble_4,,,,,universe,noble,false 6 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble-updates_1,,,,,main,noble-updates,false 7 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble-updates_2,,,,,multiverse,noble-updates,false 8 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble-updates_3,,,,,restricted,noble-updates,false 9 | https://us.archive.ubuntu.com/ubuntu,apt-deb,noble-updates_4,,,,,universe,noble-updates,false 10 | -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/test-image-docker/.skip_boxbuild_container: -------------------------------------------------------------------------------- 1 | building a container in a container causes issues for buildah 2 | -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/test-image-live-disk/config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | #====================================== 5 | # Functions... 6 | #-------------------------------------- 7 | test -f /.kconfig && . /.kconfig 8 | 9 | #====================================== 10 | # Greeting... 11 | #-------------------------------------- 12 | echo "Configure image: [${kiwi_iname}]..." 13 | 14 | #====================================== 15 | # Setup default target, multi-user 16 | #-------------------------------------- 17 | baseSetRunlevel 3 18 | -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/test-image-live-disk/root/etc/firstboot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/build-tests/x86/ubuntu/test-image-live-disk/root/etc/firstboot -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/test-image-live-disk/root/etc/network/interfaces.d/lan0: -------------------------------------------------------------------------------- 1 | auto lan0 2 | allow-hotplug lan0 3 | iface lan0 inet dhcp 4 | -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/test-image-live-disk/root/etc/systemd/system/symlink-resolvconf.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Make the resolv.conf symlink during first boot 3 | ConditionPathExists=!/etc/resolv.conf 4 | ConditionPathExists=/etc/firstboot 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/bin/ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf 9 | ExecStartPost=/bin/rm /etc/firstboot 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /build-tests/x86/ubuntu/test-image-live-disk/root/etc/udev/rules.d/70-persistent-net.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0" 2 | -------------------------------------------------------------------------------- /doc/DC-kiwi: -------------------------------------------------------------------------------- 1 | ## ---------------------------- 2 | ## Doc Config File for DAPS 3 | ## ---------------------------- 4 | MAIN=xml/book.xml 5 | ADOC_POST=yes 6 | ADOC_TYPE=book 7 | STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns" 8 | DOCBOOK5_RNG_URI="file:///usr/share/xml/docbook/schema/rng/5.2/docbookxi.rnc" 9 | -------------------------------------------------------------------------------- /doc/source/.images/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/doc/source/.images/intro.png -------------------------------------------------------------------------------- /doc/source/.images/kiwi-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/doc/source/.images/kiwi-logo.png -------------------------------------------------------------------------------- /doc/source/api.rst: -------------------------------------------------------------------------------- 1 | .. _api: 2 | 3 | Python API 4 | ========== 5 | 6 | .. note:: 7 | 8 | This API documentation covers {kiwi} |version| 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | api/kiwi 14 | api/kiwi.archive 15 | api/kiwi.boot.image 16 | api/kiwi.bootloader.config 17 | api/kiwi.bootloader.install 18 | api/kiwi.bootloader 19 | api/kiwi.bootloader.template 20 | api/kiwi.boot 21 | api/kiwi.builder 22 | api/kiwi.container 23 | api/kiwi.container.setup 24 | api/kiwi.filesystem 25 | api/kiwi.iso_tools 26 | api/kiwi.package_manager 27 | api/kiwi.partitioner 28 | api/kiwi.repository 29 | api/kiwi.repository.template 30 | api/kiwi.solver.repository 31 | api/kiwi.solver 32 | api/kiwi.storage 33 | api/kiwi.storage.subformat 34 | api/kiwi.storage.subformat.template 35 | api/kiwi.system 36 | api/kiwi.tasks 37 | api/kiwi.utils 38 | api/kiwi.volume_manager 39 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.archive.rst: -------------------------------------------------------------------------------- 1 | kiwi.archive Package 2 | ==================== 3 | 4 | .. _db_kiwi_archive_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.archive.cpio` Module 10 | -------------------------- 11 | 12 | .. automodule:: kiwi.archive.cpio 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.archive.tar` Module 18 | ------------------------- 19 | 20 | .. automodule:: kiwi.archive.tar 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | .. _db_kiwi_archive_content: 26 | 27 | Module Contents 28 | --------------- 29 | 30 | .. automodule:: kiwi.archive 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.boot.image.rst: -------------------------------------------------------------------------------- 1 | kiwi.boot.image Package 2 | ======================= 3 | 4 | .. _db_kiwi_boot_image_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.boot.image.base` Module 10 | ----------------------------- 11 | 12 | .. automodule:: kiwi.boot.image.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.boot.image.dracut` Module 18 | ------------------------------- 19 | 20 | .. automodule:: kiwi.boot.image.dracut 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | `kiwi.boot.image.builtin_kiwi` Module 26 | ------------------------------------- 27 | 28 | .. automodule:: kiwi.boot.image.builtin_kiwi 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | .. _db_kiwi_boot_image_content: 34 | 35 | Module Contents 36 | --------------- 37 | 38 | .. automodule:: kiwi.boot.image 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.boot.rst: -------------------------------------------------------------------------------- 1 | kiwi.boot Package 2 | ================= 3 | 4 | .. _db_kiwi_boot_content: 5 | 6 | Module Contents 7 | --------------- 8 | 9 | .. automodule:: kiwi.boot 10 | :members: 11 | :undoc-members: 12 | :show-inheritance: 13 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.bootloader.rst: -------------------------------------------------------------------------------- 1 | kiwi.bootloader Package 2 | ======================= 3 | 4 | .. _db_kiwi_bootloader_content: 5 | 6 | Module Contents 7 | --------------- 8 | 9 | .. automodule:: kiwi.bootloader 10 | :members: 11 | :undoc-members: 12 | :show-inheritance: 13 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.bootloader.template.rst: -------------------------------------------------------------------------------- 1 | kiwi.bootloader.template Package 2 | ================================ 3 | 4 | .. _db_kiwi_bootloader_template_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.bootloader.template.grub2` Module 10 | --------------------------------------- 11 | 12 | .. automodule:: kiwi.bootloader.template.grub2 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | .. _db_kiwi_bootloader_template_content: 18 | 19 | Module Contents 20 | --------------- 21 | 22 | .. automodule:: kiwi.bootloader.template 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.container.rst: -------------------------------------------------------------------------------- 1 | kiwi.container Package 2 | ====================== 3 | 4 | .. _db_kiwi_container_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.container.oci` Module 10 | --------------------------- 11 | 12 | .. automodule:: kiwi.container.oci 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | .. _db_kiwi_container_content: 18 | 19 | Module Contents 20 | --------------- 21 | 22 | .. automodule:: kiwi.container 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.container.setup.rst: -------------------------------------------------------------------------------- 1 | kiwi.container.setup Package 2 | ============================ 3 | 4 | .. _db_kiwi_container_setup_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.container.setup.base` Module 10 | ---------------------------------- 11 | 12 | .. automodule:: kiwi.container.setup.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.container.setup.docker` Module 18 | ------------------------------------ 19 | 20 | .. automodule:: kiwi.container.setup.docker 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | .. _db_kiwi_container_setup_content: 26 | 27 | Module Contents 28 | --------------- 29 | 30 | .. automodule:: kiwi.container.setup 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.iso_tools.rst: -------------------------------------------------------------------------------- 1 | kiwi.iso_tools Package 2 | ====================== 3 | 4 | .. _db_kiwi_iso_tools_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.iso_tools.base` Module 10 | ---------------------------- 11 | .. automodule:: kiwi.iso_tools.base 12 | :members: 13 | :undoc-members: 14 | :show-inheritance: 15 | 16 | `kiwi.iso_tools.xorriso` Module 17 | -------------------------------- 18 | .. automodule:: kiwi.iso_tools.xorriso 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | `kiwi.iso_tools.iso` Module 24 | ---------------------------- 25 | .. automodule:: kiwi.iso_tools.iso 26 | :members: 27 | :undoc-members: 28 | :show-inheritance: 29 | 30 | .. _db_kiwi_iso_tools_content: 31 | 32 | Module Contents 33 | --------------- 34 | 35 | .. automodule:: kiwi.iso_tools 36 | :members: 37 | :undoc-members: 38 | :show-inheritance: 39 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.package_manager.rst: -------------------------------------------------------------------------------- 1 | kiwi.package_manager Package 2 | ============================ 3 | 4 | .. _db_kiwi_package_manager_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.package_manager.base` Module 10 | ---------------------------------- 11 | 12 | .. automodule:: kiwi.package_manager.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.package_manager.dnf4` Module 18 | ---------------------------------- 19 | 20 | .. automodule:: kiwi.package_manager.dnf4 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | `kiwi.package_manager.zypper` Module 26 | ------------------------------------ 27 | 28 | .. automodule:: kiwi.package_manager.zypper 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | .. _db_kiwi_package_manager_content: 34 | 35 | Module Contents 36 | --------------- 37 | 38 | .. automodule:: kiwi.package_manager 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.partitioner.rst: -------------------------------------------------------------------------------- 1 | kiwi.partitioner Package 2 | ======================== 3 | 4 | .. _db_kiwi_partitioner_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.partitioner.base` Module 10 | ------------------------------ 11 | 12 | .. automodule:: kiwi.partitioner.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.partitioner.dasd` Module 18 | ------------------------------ 19 | 20 | .. automodule:: kiwi.partitioner.dasd 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | `kiwi.partitioner.gpt` Module 26 | ----------------------------- 27 | 28 | .. automodule:: kiwi.partitioner.gpt 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | `kiwi.partitioner.msdos` Module 34 | ------------------------------- 35 | 36 | .. automodule:: kiwi.partitioner.msdos 37 | :members: 38 | :undoc-members: 39 | :show-inheritance: 40 | 41 | 42 | .. _db_kiwi_partitioner_content: 43 | 44 | Module Contents 45 | --------------- 46 | 47 | .. automodule:: kiwi.partitioner 48 | :members: 49 | :undoc-members: 50 | :show-inheritance: 51 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.repository.rst: -------------------------------------------------------------------------------- 1 | kiwi.repository Package 2 | ======================= 3 | 4 | .. _db_kiwi_repository_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.repository.base` Module 10 | ----------------------------- 11 | 12 | .. automodule:: kiwi.repository.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.repository.dnf4` Module 18 | ----------------------------- 19 | 20 | .. automodule:: kiwi.repository.dnf4 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | `kiwi.repository.zypper` Module 26 | ------------------------------- 27 | 28 | .. automodule:: kiwi.repository.zypper 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | 34 | .. _db_kiwi_repository_content: 35 | 36 | Module Contents 37 | --------------- 38 | 39 | .. automodule:: kiwi.repository 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.repository.template.rst: -------------------------------------------------------------------------------- 1 | kiwi.repository.template Package 2 | ================================ 3 | 4 | .. _db_kiwi_repository_template_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.repository.template.apt` Module 10 | ------------------------------------- 11 | 12 | .. automodule:: kiwi.repository.template.apt 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | 18 | .. _db_kiwi_repository_template_content: 19 | 20 | Module Contents 21 | --------------- 22 | 23 | .. automodule:: kiwi.repository.template 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.solver.repository.rst: -------------------------------------------------------------------------------- 1 | kiwi.solver.repository Package 2 | ============================== 3 | 4 | .. _db_kiwi_solver_repository_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.solver.repository.base` Module 10 | ------------------------------------ 11 | 12 | .. automodule:: kiwi.solver.repository.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | 18 | .. automodule:: kiwi.solver.repository.rpm_md 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | 24 | .. automodule:: kiwi.solver.repository.rpm_dir 25 | :members: 26 | :undoc-members: 27 | :show-inheritance: 28 | 29 | 30 | .. automodule:: kiwi.solver.repository.suse 31 | :members: 32 | :undoc-members: 33 | :show-inheritance: 34 | 35 | .. _db_kiwi_solver_repository_content: 36 | 37 | Module Contents 38 | --------------- 39 | 40 | .. automodule:: kiwi.solver.repository 41 | :members: 42 | :undoc-members: 43 | :show-inheritance: 44 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.solver.rst: -------------------------------------------------------------------------------- 1 | kiwi.solver Package 2 | =================== 3 | 4 | .. _db_kiwi_solver_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.solver.sat` Module 10 | ----------------------------- 11 | 12 | .. automodule:: kiwi.solver.sat 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | .. _db_kiwi_solver_content: 18 | 19 | Module Contents 20 | --------------- 21 | 22 | .. automodule:: kiwi.solver 23 | :members: 24 | :undoc-members: 25 | :show-inheritance: 26 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.storage.subformat.template.rst: -------------------------------------------------------------------------------- 1 | kiwi.storage.subformat.template Package 2 | ======================================= 3 | 4 | .. _db_kiwi_storage_subformat_template_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.storage.subformat.template.vmware_settings` Module 10 | -------------------------------------------------------- 11 | 12 | .. automodule:: kiwi.storage.subformat.template.vmware_settings 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.storage.subformat.template.vagrant_config` Module 18 | -------------------------------------------------------- 19 | 20 | .. automodule:: kiwi.storage.subformat.template.vagrant_config 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | `kiwi.storage.subformat.template.virtualbox_ovf` Module 26 | -------------------------------------------------------- 27 | 28 | .. automodule:: kiwi.storage.subformat.template.virtualbox_ovf 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | .. _db_kiwi_storage_subformat_template_content: 34 | 35 | Module contents 36 | --------------- 37 | 38 | .. automodule:: kiwi.storage.subformat.template 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.utils.rst: -------------------------------------------------------------------------------- 1 | kiwi.utils Package 2 | ================== 3 | 4 | .. _db_kiwi_utils_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.utils.checksum` Module 10 | ---------------------------- 11 | .. automodule:: kiwi.utils.block 12 | :members: 13 | :undoc-members: 14 | :show-inheritance: 15 | 16 | `kiwi.utils.block` Module 17 | ------------------------- 18 | .. automodule:: kiwi.utils.checksum 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | `kiwi.utils.compress` Module 24 | ---------------------------- 25 | 26 | .. automodule:: kiwi.utils.compress 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | `kiwi.utils.sync` Module 32 | ------------------------ 33 | 34 | .. automodule:: kiwi.utils.sync 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | 40 | `kiwi.utils.sysconfig` Module 41 | ----------------------------- 42 | 43 | .. automodule:: kiwi.utils.sysconfig 44 | :members: 45 | :undoc-members: 46 | :show-inheritance: 47 | 48 | .. _db_kiwi_utils_content: 49 | 50 | Module Contents 51 | --------------- 52 | 53 | .. automodule:: kiwi.utils 54 | :members: 55 | :undoc-members: 56 | :show-inheritance: 57 | -------------------------------------------------------------------------------- /doc/source/api/kiwi.volume_manager.rst: -------------------------------------------------------------------------------- 1 | kiwi.volume_manager Package 2 | =========================== 3 | 4 | .. _db_kiwi_volume_manager_submodules: 5 | 6 | Submodules 7 | ---------- 8 | 9 | `kiwi.volume_manager.base` Module 10 | --------------------------------- 11 | 12 | .. automodule:: kiwi.volume_manager.base 13 | :members: 14 | :undoc-members: 15 | :show-inheritance: 16 | 17 | `kiwi.volume_manager.btrfs` Module 18 | ---------------------------------- 19 | 20 | .. automodule:: kiwi.volume_manager.btrfs 21 | :members: 22 | :undoc-members: 23 | :show-inheritance: 24 | 25 | `kiwi.volume_manager.lvm` Module 26 | -------------------------------- 27 | 28 | .. automodule:: kiwi.volume_manager.lvm 29 | :members: 30 | :undoc-members: 31 | :show-inheritance: 32 | 33 | .. _db_kiwi_volume_manager_content: 34 | 35 | Module Contents 36 | --------------- 37 | 38 | .. automodule:: kiwi.volume_manager 39 | :members: 40 | :undoc-members: 41 | :show-inheritance: 42 | -------------------------------------------------------------------------------- /doc/source/building_images.rst: -------------------------------------------------------------------------------- 1 | .. _building_types: 2 | 3 | Building Images for Supported Types 4 | =================================== 5 | 6 | .. note:: 7 | 8 | This document provides an overview how to build and use 9 | the {kiwi} supported image types. All images that we provide 10 | for testing uses the root password: `linux` 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | building_images/build_live_iso 16 | building_images/build_simple_disk 17 | building_images/build_expandable_disk 18 | building_images/build_container_image 19 | building_images/build_wsl_container 20 | building_images/build_kis 21 | building_images/build_enclave 22 | -------------------------------------------------------------------------------- /doc/source/commands.rst: -------------------------------------------------------------------------------- 1 | Working from the Command Line 2 | ============================= 3 | 4 | .. note:: 5 | 6 | This document provides a list of the existing {kiwi-product} commands 7 | for version |version|. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | commands/kiwi 13 | commands/result_list 14 | commands/result_bundle 15 | commands/system_prepare 16 | commands/system_update 17 | commands/system_build 18 | commands/system_create 19 | commands/image_resize 20 | commands/image_info 21 | -------------------------------------------------------------------------------- /doc/source/commands/result_list.rst: -------------------------------------------------------------------------------- 1 | kiwi-ng result list 2 | =================== 3 | 4 | .. _db_kiwi_result_list_synopsis: 5 | 6 | SYNOPSIS 7 | -------- 8 | 9 | .. code:: bash 10 | 11 | kiwi-ng [global options] service [] 12 | 13 | kiwi-ng result list -h | --help 14 | kiwi-ng result list --target-dir= 15 | kiwi-ng result list help 16 | 17 | .. _db_kiwi_result_list_desc: 18 | 19 | DESCRIPTION 20 | ----------- 21 | 22 | List build results from a previous build or create command. During multiple 23 | image builds with the same target directory, the build result information is 24 | overwritten every time you build an image. This means that the build result list 25 | is valid for the last build only. 26 | 27 | .. _db_kiwi_result_list_opts: 28 | 29 | OPTIONS 30 | ------- 31 | 32 | --target-dir= 33 | 34 | Directory containing the {kiwi} build results. 35 | -------------------------------------------------------------------------------- /doc/source/commands/system_update.rst: -------------------------------------------------------------------------------- 1 | kiwi-ng system update 2 | ===================== 3 | 4 | .. _db_kiwi_system_update_synopsis: 5 | 6 | SYNOPSIS 7 | -------- 8 | 9 | .. code:: bash 10 | 11 | kiwi-ng [global options] service [] 12 | 13 | kiwi-ng system update -h | --help 14 | kiwi-ng system update --root= 15 | [--add-package=...] 16 | [--delete-package=...] 17 | kiwi-ng system update help 18 | 19 | .. _db_kiwi_system_update_desc: 20 | 21 | DESCRIPTION 22 | ----------- 23 | 24 | Update a previously prepare image root tree. The update command refreshes the 25 | contents of the root directory according to the repository setup of the image 26 | XML description. The update command can also be used to add or remove 27 | packages from the image root tree. 28 | 29 | .. _db_kiwi_system_update_opts: 30 | 31 | OPTIONS 32 | ------- 33 | 34 | --add-package= 35 | 36 | Specify a package to add (install). The option can be specified 37 | multiple times. 38 | 39 | --delete-package= 40 | 41 | Specify a package to delete. The option can be specified 42 | multiple times. 43 | 44 | --root= 45 | 46 | Path to the root directory of the image. 47 | -------------------------------------------------------------------------------- /doc/source/concept_and_workflow/runtime_configuration.rst: -------------------------------------------------------------------------------- 1 | .. _runtime_config: 2 | 3 | The Runtime Configuration File 4 | ------------------------------ 5 | 6 | {kiwi} supports an additional configuration file for runtime specific 7 | settings which do not belong in the image description but which are 8 | persistent and are unsuitable for command-line parameters. 9 | 10 | The runtime configuration file must adhere to the `YAML `_ 11 | syntax, and the file can be pointed to via the global `--config` option at call 12 | time of {kiwi}. If no config file is provided, {kiwi} searches for the runtime 13 | configuration file in the following locations: 14 | 15 | 1. :file:`~/.config/kiwi/config.yml` 16 | 17 | 2. :file:`/etc/kiwi.yml` 18 | 19 | A default runtime config file in :file:`/etc/kiwi.yml` is provided with 20 | the python3-kiwi package. The file contains all settings as comments 21 | including a short description of each setting. 22 | -------------------------------------------------------------------------------- /doc/source/plugins.rst: -------------------------------------------------------------------------------- 1 | KIWI Plugins 2 | ============ 3 | 4 | .. note:: 5 | 6 | This document provides a list of the existing {kiwi-product} plugins 7 | which provides extended functionality for version |version|. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | plugins/self_contained 13 | plugins/stackbuild 14 | -------------------------------------------------------------------------------- /doc/source/troubleshooting.rst: -------------------------------------------------------------------------------- 1 | .. _troubleshooting: 2 | 3 | Troubleshooting 4 | =============== 5 | 6 | .. note:: **Abstract** 7 | 8 | This document describes situations which leads to issues 9 | during build or boot time of the image build with {kiwi}. 10 | The suggested solutions are considered best practice but 11 | are just one out of other possible solution candidates. 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | 16 | troubleshooting/buildhost_constraints 17 | troubleshooting/architectures 18 | troubleshooting/security 19 | troubleshooting/filesystems 20 | troubleshooting/boxbuild_tweaks 21 | -------------------------------------------------------------------------------- /dracut/modules.d/80kiwi-verity/.gitignore: -------------------------------------------------------------------------------- 1 | /kiwi-parse-verity 2 | -------------------------------------------------------------------------------- /dracut/modules.d/80kiwi-verity/Makefile: -------------------------------------------------------------------------------- 1 | buildroot ?= / 2 | 3 | CROSS_COMPILE ?= 4 | CC ?= $(CROSS_COMPILE)gcc 5 | CFLAGS += -Werror -Wall -Wextra 6 | 7 | BINARY := kiwi-parse-verity 8 | 9 | .PHONY: all 10 | all: build 11 | 12 | .PHONY: install 13 | install: build 14 | install -Dm0755 \ 15 | kiwi-verity-setup.sh kiwi-veritytab-setup.sh module-setup.sh \ 16 | -t ${buildroot}usr/lib/dracut/modules.d/80kiwi-verity 17 | install -Dm0755 $(BINARY) ${buildroot}usr/bin/$(BINARY) 18 | 19 | .PHONY: build 20 | build: $(BINARY) 21 | 22 | .PHONY: clean 23 | clean: 24 | rm -f $(BINARY) 25 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-dump/Makefile: -------------------------------------------------------------------------------- 1 | buildroot = / 2 | 3 | install: 4 | install -d -m 755 ${buildroot}usr/lib/dracut/modules.d/90kiwi-dump 5 | cp -a * ${buildroot}usr/lib/dracut/modules.d/90kiwi-dump 6 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-dump/kiwi-installer-device.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 3 | type setup_debug >/dev/null 2>&1 || . /lib/kiwi-lib.sh 4 | 5 | setup_debug 6 | 7 | info "Install Device is $1" 8 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-dump/kiwi-installer-genrules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | declare root=${root} 4 | 5 | case "${root}" in 6 | install:/dev/*) 7 | { 8 | printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/kiwi-installer-device %s"\n' \ 9 | "${root#install:/dev/}" "${root#install:}" 10 | printf 'SYMLINK=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/kiwi-installer-device %s"\n' \ 11 | "${root#install:/dev/}" "${root#install:}" 12 | } >> /etc/udev/rules.d/99-installer-kiwi.rules 13 | wait_for_dev -n "${root#install:}" 14 | ;; 15 | esac 16 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-dump/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # called by dracut 4 | check() { 5 | return 255 6 | } 7 | 8 | # called by dracut 9 | depends() { 10 | echo network rootfs-block dm kiwi-lib 11 | return 0 12 | } 13 | 14 | # called by dracut 15 | installkernel() { 16 | instmods squashfs loop iso9660 17 | } 18 | 19 | # called by dracut 20 | install() { 21 | declare moddir=${moddir} 22 | declare systemdutildir=${systemdutildir} 23 | inst_multiple \ 24 | tr lsblk dd sha256sum head pv kexec basename awk kpartx 25 | 26 | inst_hook pre-udev 30 "${moddir}/kiwi-installer-genrules.sh" 27 | 28 | inst_script "${moddir}/kiwi-installer-device.sh" \ 29 | "/sbin/kiwi-installer-device" 30 | 31 | inst_hook cmdline 30 "${moddir}/parse-kiwi-install.sh" 32 | inst_hook pre-mount 30 "${moddir}/kiwi-dump-image.sh" 33 | inst_hook mount 30 "${moddir}/kiwi-mount-ramdisk.sh" 34 | 35 | inst_script "${moddir}/kiwi-ramdisk-deployment-generator.sh" \ 36 | "${systemdutildir}/system-generators/dracut-kiwi-ramdisk-generator" 37 | 38 | inst_rules 60-cdrom_id.rules 39 | dracut_need_initqueue 40 | } 41 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-dump/parse-kiwi-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # install images are specified with 3 | # root=install:CDLABEL=label 4 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 5 | 6 | [ -z "${root}" ] && root=$(getarg root=) 7 | 8 | if getargbool 0 rd.kiwi.install.pxe; then 9 | root="install:REMOTE" 10 | echo "rd.neednet=1" > /etc/cmdline.d/kiwi-generated.conf 11 | if ! getarg "ip="; then 12 | echo "ip=dhcp" >> /etc/cmdline.d/kiwi-generated.conf 13 | fi 14 | fi 15 | 16 | if [ "${root%%:*}" = "install" ] ; then 17 | installroot=${root} 18 | fi 19 | 20 | [ "${installroot%%:*}" = "install" ] || return 1 21 | 22 | modprobe -q loop 23 | 24 | case "${installroot}" in 25 | install:CDLABEL=*|CDLABEL=*) \ 26 | root="${root#install:}" 27 | root="${root//\//\\x2f}" 28 | root="install:/dev/disk/by-label/${root#CDLABEL=}" 29 | rootok=1 ;; 30 | 31 | install:REMOTE) \ 32 | rootok=1 ;; 33 | esac 34 | 35 | [ "$rootok" = "1" ] || return 1 36 | 37 | info "root was ${installroot}, is now ${root}" 38 | 39 | # make sure that init doesn't complain 40 | [ -z "${root}" ] && root="install" 41 | 42 | return 0 43 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-live/Makefile: -------------------------------------------------------------------------------- 1 | buildroot = / 2 | 3 | install: 4 | install -d -m 755 ${buildroot}usr/lib/dracut/modules.d/90kiwi-live 5 | cp -a * ${buildroot}usr/lib/dracut/modules.d/90kiwi-live 6 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-live/kiwi-live-checkmedia.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 3 | type runMediaCheck >/dev/null 2>&1 || . /lib/kiwi-live-lib.sh 4 | 5 | if getargbool 0 mediacheck || getargbool 0 rd.live.check; then 6 | declare root=${root} 7 | initGlobalDevices "${root#live:}" 8 | runMediaCheck 9 | fi 10 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-live/kiwi-live-net-genrules.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 3 | 4 | if getargbool 0 rd.kiwi.live.pxe; then 5 | { 6 | echo -n "SUBSYSTEM==\"net\", ACTION==\"add\", " 7 | echo -n "DRIVERS==\"?*\", ATTR{address}==\"?*\", " 8 | echo -n "ATTR{dev_id}==\"0x0\", ATTR{type}==\"1\", " 9 | echo -n "KERNEL==\"?*\", NAME=\"lan0\"" 10 | echo 11 | } > /etc/udev/rules.d/90-net.rules 12 | fi 13 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-overlay/Makefile: -------------------------------------------------------------------------------- 1 | buildroot = / 2 | 3 | install: 4 | install -d -m 755 ${buildroot}usr/lib/dracut/modules.d/90kiwi-overlay 5 | cp -a * ${buildroot}usr/lib/dracut/modules.d/90kiwi-overlay 6 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-overlay/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # called by dracut 4 | check() { 5 | return 255 6 | } 7 | 8 | # called by dracut 9 | depends() { 10 | echo network rootfs-block dm kiwi-lib 11 | return 0 12 | } 13 | 14 | # called by dracut 15 | installkernel() { 16 | instmods squashfs loop overlay nbd aoe 17 | } 18 | 19 | # called by dracut 20 | install() { 21 | declare moddir=${moddir} 22 | declare systemdutildir=${systemdutildir} 23 | inst_multiple \ 24 | lsblk losetup grep cut mount nbd-client 25 | inst_hook cmdline 30 "${moddir}/parse-kiwi-overlay.sh" 26 | # kiwi-repart priority pre-mount hook is 20 27 | # overlay pre-mount needs to happend after any repartition 28 | inst_hook pre-mount 30 "${moddir}/kiwi-overlay-root.sh" 29 | inst_script "${moddir}/kiwi-generator.sh" \ 30 | "${systemdutildir}/system-generators/dracut-kiwi-generator" 31 | dracut_need_initqueue 32 | } 33 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-repart/Makefile: -------------------------------------------------------------------------------- 1 | buildroot = / 2 | 3 | install: 4 | install -d -m 755 ${buildroot}usr/lib/dracut/modules.d/90kiwi-repart 5 | cp -a * ${buildroot}usr/lib/dracut/modules.d/90kiwi-repart 6 | -------------------------------------------------------------------------------- /dracut/modules.d/90kiwi-repart/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # called by dracut 4 | check() { 5 | return 255 6 | } 7 | 8 | # called by dracut 9 | depends() { 10 | echo rootfs-block dm kiwi-lib 11 | return 0 12 | } 13 | 14 | # called by dracut 15 | installkernel() { 16 | instmods squashfs loop 17 | } 18 | 19 | # called by dracut 20 | install() { 21 | declare moddir=${moddir} 22 | if inst_simple /config.partids; then 23 | test -f /.profile && inst_simple /.profile 24 | inst_hook pre-mount 20 "${moddir}/kiwi-repart-disk.sh" 25 | dracut_need_initqueue 26 | else 27 | echo "ERROR: kiwi-repart needs /config.partids; not installing module" 28 | fi 29 | } 30 | -------------------------------------------------------------------------------- /dracut/modules.d/99kiwi-dump-reboot/Makefile: -------------------------------------------------------------------------------- 1 | buildroot = / 2 | 3 | install: 4 | install -d -m 755 ${buildroot}usr/lib/dracut/modules.d/99kiwi-dump-reboot 5 | cp -a * ${buildroot}usr/lib/dracut/modules.d/99kiwi-dump-reboot 6 | -------------------------------------------------------------------------------- /dracut/modules.d/99kiwi-dump-reboot/module-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # called by dracut 4 | check() { 5 | return 255 6 | } 7 | 8 | # called by dracut 9 | depends() { 10 | echo network rootfs-block dm kiwi-lib kiwi-dump 11 | return 0 12 | } 13 | 14 | # called by dracut 15 | installkernel() { 16 | return 0 17 | } 18 | 19 | # called by dracut 20 | install() { 21 | declare moddir=${moddir} 22 | 23 | inst_hook pre-mount 40 "${moddir}/kiwi-dump-reboot-system.sh" 24 | } 25 | -------------------------------------------------------------------------------- /dracut/modules.d/99kiwi-lib/Makefile: -------------------------------------------------------------------------------- 1 | buildroot = / 2 | 3 | install: 4 | install -d -m 755 ${buildroot}usr/lib/dracut/modules.d/99kiwi-lib 5 | cp -a * ${buildroot}usr/lib/dracut/modules.d/99kiwi-lib 6 | -------------------------------------------------------------------------------- /dracut/modules.d/99kiwi-lib/kiwi-mdraid-lib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh 4 | type set_root_map >/dev/null 2>&1 || . /lib/kiwi-lib.sh 5 | type wait_for_storage_device >/dev/null 2>&1 || . /lib/kiwi-partitions-lib.sh 6 | 7 | function mdraid_system { 8 | declare kiwi_RaidDev=${kiwi_RaidDev} 9 | if [ -n "${kiwi_RaidDev}" ];then 10 | return 0 11 | fi 12 | return 1 13 | } 14 | 15 | function deactivate_mdraid { 16 | declare kiwi_RaidDev=${kiwi_RaidDev} 17 | mdadm --stop "${kiwi_RaidDev}" 18 | } 19 | 20 | function activate_mdraid { 21 | declare kiwi_RaidDev=${kiwi_RaidDev} 22 | mdadm --assemble --scan "${kiwi_RaidDev}" 23 | wait_for_storage_device "${kiwi_RaidDev}" 24 | set_root_map "${kiwi_RaidDev}" 25 | } 26 | 27 | function resize_mdraid { 28 | declare kiwi_RaidDev=${kiwi_RaidDev} 29 | mdadm --grow --size=max "${kiwi_RaidDev}" 30 | } 31 | -------------------------------------------------------------------------------- /helper/rebuild_changelog_reference.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | git log --no-merges --format=fuller > package/python-kiwi.changes 4 | 5 | git commit -S -m 'Update changelog reference' \ 6 | package/python-kiwi.changes 7 | -------------------------------------------------------------------------------- /helper/update_obs_services.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | api_target="https://api.opensuse.org/trigger/runservice" 6 | api_token=$1 7 | 8 | while read -r build_test; do 9 | build_test_path=$(dirname "${build_test}") 10 | dist=$(echo "${build_test_path}" | cut -f 3 -d/) 11 | arch=$(echo "${build_test_path}" | cut -f 2 -d/) 12 | project="Virtualization:Appliances:Images:Testing_${arch}:${dist}" 13 | package=$(basename "${build_test_path}") 14 | curl_target="${api_target}?project=${project}&package=${package}" 15 | 16 | echo "Updating Test: ${package} for: ${project}" 17 | curl -H "Authorization: Token ${api_token}" \ 18 | -X POST "${curl_target}" 19 | done < <(find build-tests -name "appliance.kiwi") 20 | -------------------------------------------------------------------------------- /kiwi/__init__.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from kiwi.logger import Logger 4 | 5 | # Initialize custom logger class for kiwi 6 | logging.setLoggerClass(Logger) 7 | 8 | # Set the highest log level possible as the default log level 9 | # in the main Logger class. This is needed to allow any logfile 10 | # handler to log all messages by default and to allow custom log 11 | # levels per handler. Our own implementation in Logger::setLogLevel 12 | # will then set the log level on a handler basis 13 | logging.getLogger('kiwi').setLevel(logging.DEBUG) 14 | -------------------------------------------------------------------------------- /kiwi/archive/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/archive/__init__.py -------------------------------------------------------------------------------- /kiwi/boot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/boot/__init__.py -------------------------------------------------------------------------------- /kiwi/bootloader/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/bootloader/__init__.py -------------------------------------------------------------------------------- /kiwi/bootloader/template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/bootloader/template/__init__.py -------------------------------------------------------------------------------- /kiwi/container/base.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 SUSE LLC 2 | # 3 | # This file is part of kiwi. 4 | # 5 | # kiwi is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # kiwi is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with kiwi. If not, see 17 | # 18 | from abc import ABC, abstractmethod 19 | 20 | 21 | class ContainerImageBase(ABC): 22 | @abstractmethod 23 | def create( 24 | self, filename: str, base_image: str, 25 | ensure_empty_tmpdirs: bool, compress_archive: bool = False 26 | ) -> str: 27 | pass # pragma: no cover 28 | -------------------------------------------------------------------------------- /kiwi/container/setup/docker.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. 2 | # 3 | # This file is part of kiwi. 4 | # 5 | # kiwi is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # kiwi is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with kiwi. If not, see 17 | # 18 | 19 | # project 20 | from kiwi.container.setup.oci import ContainerSetupOCI 21 | 22 | 23 | class ContainerSetupDocker(ContainerSetupOCI): 24 | """ 25 | Docker container setup 26 | """ 27 | -------------------------------------------------------------------------------- /kiwi/repository/template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/repository/template/__init__.py -------------------------------------------------------------------------------- /kiwi/runtime_checker_metadata.yml: -------------------------------------------------------------------------------- 1 | package_names: 2 | dracut_oem_dump: 3 | - dracut-kiwi-oem-dump 4 | - kiwi-dracut-oem-dump 5 | dracut_oem_repart: 6 | - dracut-kiwi-oem-repart 7 | - kiwi-dracut-oem-repart 8 | dracut_live: 9 | - dracut-kiwi-live 10 | - kiwi-dracut-live 11 | dracut_overlay: 12 | - dracut-kiwi-overlay 13 | - kiwi-dracut-overlay 14 | -------------------------------------------------------------------------------- /kiwi/solver/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/solver/__init__.py -------------------------------------------------------------------------------- /kiwi/storage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/storage/__init__.py -------------------------------------------------------------------------------- /kiwi/storage/subformat/template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/storage/subformat/template/__init__.py -------------------------------------------------------------------------------- /kiwi/system/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/system/__init__.py -------------------------------------------------------------------------------- /kiwi/tasks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/tasks/__init__.py -------------------------------------------------------------------------------- /kiwi/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/kiwi/utils/__init__.py -------------------------------------------------------------------------------- /kiwi/version.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. 2 | # 3 | # This file is part of kiwi. 4 | # 5 | # kiwi is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # kiwi is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with kiwi. If not, see 17 | # 18 | """ 19 | Global version information used in kiwi and the package 20 | """ 21 | __version__ = '10.2.24' 22 | __githash__ = 'c0da0c2215654175d3d4f5f77954abc1766f100d' 23 | -------------------------------------------------------------------------------- /package/python-kiwi.changes.deb6ca.fix: -------------------------------------------------------------------------------- 1 | commit deb6ca8631f655e8b99e96582245714256d2954f 2 | Author: David Cassany 3 | AuthorDate: Fri Feb 16 15:08:49 2024 +0100 4 | Commit: David Cassany 5 | CommitDate: Fri Feb 16 15:08:49 2024 +0100 6 | 7 | Include partprobe in initrd for s390 8 | 9 | This commit includes partprobe, in addition to parted, on 10 | s390 based systems. Otherwise partx is used and apparently 11 | it does not properly support s390. 12 | 13 | Fixes bsc#1219798 14 | 15 | Signed-off-by: David Cassany 16 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [sdist] 2 | # Used by setup.py sdist 3 | formats=gztar 4 | 5 | [tool:pytest] 6 | norecursedirs = .git build .tox/ .tmp/ 7 | addopts = --ignore=.tmp/ --ignore=.git/ --ignore=.tox/ -p no:warnings 8 | testpaths = test/unit 9 | 10 | [flake8] 11 | # For error codes, see 12 | # http://pep8.readthedocs.org/en/latest/intro.html#error-codes 13 | # 14 | # This file is generated automatically: 15 | exclude=xml_parse.py 16 | # we allow long lines (E501) 17 | # we ignore warnings about quoting of escape sequences (W605) 18 | ignore = E501, W605 19 | # we allow a custom complexity level 20 | max-complexity = 28 21 | 22 | [doc8] 23 | max-line-length = 90 24 | verbose = 1 25 | 26 | [mypy] 27 | ignore_missing_imports = True 28 | no_implicit_optional = False 29 | 30 | [mypy-kiwi.xml_parse.*] 31 | # skip auto generated code 32 | ignore_errors = True 33 | -------------------------------------------------------------------------------- /test/data/.config/kiwi/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Example config file for unit testing 3 | -------------------------------------------------------------------------------- /test/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/data/__init__.py -------------------------------------------------------------------------------- /test/data/bootinfo.txt: -------------------------------------------------------------------------------- 1 | 2 | Bob 3 | Bob 4 | boot &device;:1,\boot\grub2\powerpc-ieee1275\grub.elf 5 | 6 | -------------------------------------------------------------------------------- /test/data/credentials: -------------------------------------------------------------------------------- 1 | user:pass 2 | -------------------------------------------------------------------------------- /test/data/etc/os-release: -------------------------------------------------------------------------------- 1 | NAME="openSUSE Leap" 2 | VERSION="15.5" 3 | ID="opensuse-leap" 4 | 5 | # some comment 6 | ID_LIKE="suse opensuse" 7 | VERSION_ID="15.5" 8 | PRETTY_NAME="openSUSE Leap 15.5" 9 | # some other comment 10 | ANSI_COLOR="0;32" 11 | CPE_NAME="cpe:/o:opensuse:leap:15.5" 12 | BUG_REPORT_URL="https://bugs.opensuse.org" 13 | HOME_URL="https://www.opensuse.org/" 14 | DOCUMENTATION_URL="https://en.opensuse.org/Portal:Leap" 15 | LOGO="distributor-logo-Leap" 16 | -------------------------------------------------------------------------------- /test/data/etc/selinux/targeted/policy/policy.some_policy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/data/etc/selinux/targeted/policy/policy.some_policy -------------------------------------------------------------------------------- /test/data/example_apt_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bob 6 | user@example.com 7 | 8 | Testing various configuration for apt packagemanager 9 | 10 | 11 | 12 | 1.13.2 13 | apt 14 | en_US 15 | us.map.gz 16 | Europe/Berlin 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/data/example_btrfs_vol_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | marcus.schaefer@suse.com 7 | Some 8 | 9 | 10 | 1.15.5 11 | zypper 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/data/example_containers_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some 6 | some@example.com 7 | 8 | Test containers section used in the buildservice 9 | 10 | 11 | 12 | 13 | 14 | 15 | 1.1.1 16 | zypper 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/data/example_deprecated_schema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus 6 | ms@suse.com 7 | 8 | Testing too old schema version condition 9 | 10 | 11 | 12 | 1.13.2 13 | zypper 14 | en_US 15 | us.map.gz 16 | Europe/Berlin 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/data/example_disk_size_partition_too_small_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | 8 | test partition too small 9 | 10 | 11 | 12 | 1.1.1 13 | zypper 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/data/example_disk_size_volume_too_small_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | 8 | Test volume setup too small 9 | 10 | 11 | 12 | 1.1.1 13 | zypper 14 | 15 | 16 | false 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/data/example_include_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus 6 | ms@suse.com 7 | 8 | Testing include raise condition 9 | 10 | 11 | 12 | 1.13.2 13 | zypper 14 | en_US 15 | us.map.gz 16 | Europe/Berlin 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/data/example_include_config_from_description_dir.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus 6 | ms@suse.com 7 | 8 | Testing include from image description directory 9 | 10 | 11 | 12 | 1.13.2 13 | zypper 14 | en_US 15 | us.map.gz 16 | Europe/Berlin 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/data/example_include_config_missing_reference.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | Test for missing include reference 8 | 9 | 10 | 11 | 1.1.0 12 | zypper 13 | en_US 14 | us.map.gz 15 | Europe/Berlin 16 | true 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/data/example_lvm_arch_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | some@some.com 7 | 8 | Test arch specific volume setup 9 | 10 | 11 | 12 | 1.1.1 13 | zypper 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/data/example_partitions_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | 8 | test partitions setup 9 | 10 | 11 | 12 | 1.1.1 13 | zypper 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /test/data/example_runtime_checker_conflicting_types.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.de 7 | Test conflicting type setup 8 | 9 | 10 | 1.1.0 11 | zypper 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/data/example_runtime_checker_include_nested_reference.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | Test for missing include reference 8 | 9 | 10 | 11 | 1.1.0 12 | zypper 13 | en_US 14 | us.map.gz 15 | Europe/Berlin 16 | true 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/data/example_this_path_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Marcus Schäfer 6 | ms@suse.com 7 | 8 | Test this path source in repo 9 | 10 | 11 | 12 | 1.1.1 13 | zypper 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/data/fstab: -------------------------------------------------------------------------------- 1 | UUID=bd604632-663b-4d4c-b5b0-8d8686267ea2 / ext4 acl,user_xattr 0 1 2 | UUID=daa5a8c3-5c72-4343-a1d4-bb74ec4e586e swap swap defaults 0 0 3 | UUID=FCF7-B051 /boot/efi vfat defaults 0 0 4 | LABEL=BOOT /boot xfs defaults 0 0 5 | LABEL=foo /home ext4 defaults 0 0 6 | PARTUUID=3c8bd108-01 /bar ext4 defaults 0 0 7 | /dev/mynode /foo ext4 defaults 0 0 8 | # entry with the same mountpoint, expected to be skipped 9 | LABEL=bar /home xfs defaults 0 0 10 | 11 | 12 | # this comment line and the line above should be ignored by the parser 13 | -------------------------------------------------------------------------------- /test/data/gz_data.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/data/gz_data.gz -------------------------------------------------------------------------------- /test/data/include.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test/data/include_repo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | -------------------------------------------------------------------------------- /test/data/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | single 4 | 1 5 | first root filesystem 6 | 2016-01-01 00:00:00 7 | 8 | -------------------------------------------------------------------------------- /test/data/key_value: -------------------------------------------------------------------------------- 1 | foo='bar' 2 | bar="xxx" 3 | name=bob 4 | strange="$a_foo" 5 | -------------------------------------------------------------------------------- /test/data/kiwi_config/broken/.config/kiwi/config.yml: -------------------------------------------------------------------------------- 1 | foo: 2 | - bar 3 | -------------------------------------------------------------------------------- /test/data/kiwi_config/defaults/.config/kiwi/config.yml: -------------------------------------------------------------------------------- 1 | # use for fetching defaults 2 | -------------------------------------------------------------------------------- /test/data/kiwi_config/invalid/.config/kiwi/config.yml: -------------------------------------------------------------------------------- 1 | iso: 2 | - tool_category: foo 3 | - media_tag_tool: foo 4 | 5 | container: 6 | - compress: foo 7 | -------------------------------------------------------------------------------- /test/data/kiwi_config/ok/.config/kiwi/config.yml: -------------------------------------------------------------------------------- 1 | xz: 2 | - options: -a -b xxx 3 | 4 | bundle: 5 | - compress: true 6 | 7 | obs: 8 | - download_url: http://example.com 9 | - api_url: https://api.example.com 10 | - public: true 11 | - user: 12 | - user_name: user_credentials 13 | 14 | iso: 15 | - tool_category: xorriso 16 | - media_tag_tool: isomd5sum 17 | 18 | oci: 19 | - archive_tool: umoci 20 | 21 | mapper: 22 | - part_mapper: partx 23 | 24 | container: 25 | - compress: none 26 | 27 | runtime_checks: 28 | - disable: 29 | - check_dracut_module_for_oem_install_in_package_list 30 | - check_container_tool_chain_installed 31 | -------------------------------------------------------------------------------- /test/data/kiwi_config/other/.config/kiwi/config.yml: -------------------------------------------------------------------------------- 1 | bundle: 2 | - has_package_changes: true 3 | 4 | container: 5 | - compress: true 6 | 7 | iso: 8 | - media_tag_tool: checkmedia 9 | -------------------------------------------------------------------------------- /test/data/my_plugin.rnc: -------------------------------------------------------------------------------- 1 | namespace rng = "http://relaxng.org/ns/structure/1.0" 2 | namespace xsi = "http://www.w3.org/2001/XMLSchema-instance" 3 | datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" 4 | namespace my_plugin = "http://www.my_plugin.com" 5 | 6 | start = 7 | k.my_feature 8 | 9 | div { 10 | k.my_feature.attlist = empty 11 | k.my_feature = 12 | element my_plugin:my_feature { 13 | k.my_feature.attlist & 14 | k.title 15 | } 16 | } 17 | 18 | div { 19 | k.title.name.attribute = 20 | attribute name { text } 21 | k.title.attlist = k.title.name.attribute 22 | k.title = 23 | element my_plugin:title { 24 | k.title.attlist 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/data/my_plugin.rng: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /test/data/nested_include.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/data/root-dir/boot/unicode.pf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/data/root-dir/boot/unicode.pf2 -------------------------------------------------------------------------------- /test/data/root-dir/image/exclude_files.yaml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - /usr/bin/qemu-binfmt 3 | - /usr/bin/qemu-x86_64-binfmt 4 | - /usr/bin/qemu-x86_64 5 | -------------------------------------------------------------------------------- /test/data/root-dir/image/exclude_files_efifatimage.yaml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - BOOT/fbia32.efi 3 | - BOOT/fbx64.efi 4 | -------------------------------------------------------------------------------- /test/data/runtime_checker_metadata.yml: -------------------------------------------------------------------------------- 1 | package_names: 2 | dracut_oem_dump: 3 | - dracut-kiwi-oem-dump 4 | - kiwi-dracut-oem-dump 5 | dracut_oem_repart: 6 | - dracut-kiwi-oem-repart 7 | - kiwi-dracut-oem-repart 8 | dracut_live: 9 | - dracut-kiwi-live 10 | - kiwi-dracut-live 11 | dracut_overlay: 12 | - dracut-kiwi-overlay 13 | - kiwi-dracut-overlay 14 | -------------------------------------------------------------------------------- /test/data/some.env: -------------------------------------------------------------------------------- 1 | ZYPP_MODALIAS_SYSFS="" 2 | -------------------------------------------------------------------------------- /test/data/some_broken.env: -------------------------------------------------------------------------------- 1 | xxxx 2 | -------------------------------------------------------------------------------- /test/data/sysconfig_example.txt: -------------------------------------------------------------------------------- 1 | # some name 2 | name = "Marcus" 3 | 4 | some_key = some-value 5 | -------------------------------------------------------------------------------- /test/data/xz_data.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/data/xz_data.xz -------------------------------------------------------------------------------- /test/scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/scripts/__init__.py -------------------------------------------------------------------------------- /test/scripts/conftest.py: -------------------------------------------------------------------------------- 1 | from pytest_container import auto_container_parametrize, DerivedContainer 2 | 3 | 4 | FUNCTIONS_COPY_CONTAINERFILE = """COPY kiwi/config/functions.sh /bin/functions.sh 5 | """ 6 | 7 | 8 | CONTAINERS = [ 9 | DerivedContainer(base=url, containerfile=FUNCTIONS_COPY_CONTAINERFILE) 10 | for url in [ 11 | "registry.opensuse.org/opensuse/leap:15.5", 12 | "registry.opensuse.org/opensuse/tumbleweed:latest", 13 | "registry.fedoraproject.org/fedora:latest" 14 | ] 15 | ] 16 | 17 | ( 18 | LEAP_15_5, 19 | TUMBLEWEED, 20 | FEDORA 21 | ) = CONTAINERS 22 | 23 | 24 | CONTAINERS_WITH_ZYPPER = [ 25 | LEAP_15_5, 26 | TUMBLEWEED 27 | ] 28 | 29 | 30 | CONTAINERS_WITH_DNF = [ 31 | FEDORA 32 | ] 33 | 34 | 35 | def pytest_generate_tests(metafunc): 36 | auto_container_parametrize(metafunc) 37 | -------------------------------------------------------------------------------- /test/unit/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | */app.py 4 | */kiwi.py 5 | */xml_parse.py 6 | 7 | [report] 8 | omit = 9 | */app.py 10 | */kiwi.py 11 | */xml_parse.py 12 | -------------------------------------------------------------------------------- /test/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/__init__.py -------------------------------------------------------------------------------- /test/unit/api_helper_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | from unittest.mock import patch 3 | from kiwi.api_helper import ( 4 | obsolete, 5 | decommissioned 6 | ) 7 | 8 | 9 | @decommissioned 10 | def method_decommissioned(): 11 | # Implementation has been deleted 12 | pass 13 | 14 | 15 | @obsolete(decommission_at='2025-01-28', version="1.2.3") 16 | def method_obsolete(): 17 | return 'I still exist' 18 | 19 | 20 | class TestApiHelpers: 21 | def test_method_decommissioned(self): 22 | with raises(DeprecationWarning): 23 | method_decommissioned() 24 | 25 | @patch('warnings.warn') 26 | def test_method_obsolete(self, mock_warnings_warn): 27 | warning_message = ( 28 | "Function 'method_obsolete' is marked obsolete " 29 | "since version '1.2.3' and will be decommissioned " 30 | "at: 2025-01-28" 31 | ) 32 | assert method_obsolete() == 'I still exist' 33 | mock_warnings_warn.assert_called_once_with(warning_message) 34 | -------------------------------------------------------------------------------- /test/unit/archive/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/archive/__init__.py -------------------------------------------------------------------------------- /test/unit/boot/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/boot/__init__.py -------------------------------------------------------------------------------- /test/unit/boot/image/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/boot/image/__init__.py -------------------------------------------------------------------------------- /test/unit/bootloader/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/bootloader/__init__.py -------------------------------------------------------------------------------- /test/unit/bootloader/config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/bootloader/config/__init__.py -------------------------------------------------------------------------------- /test/unit/bootloader/install/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/bootloader/install/__init__.py -------------------------------------------------------------------------------- /test/unit/bootloader/install/base_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import Mock 2 | from pytest import raises 3 | 4 | from kiwi.bootloader.install.base import BootLoaderInstallBase 5 | 6 | 7 | class TestBootLoaderInstallBase: 8 | def setup(self): 9 | self.bootloader = BootLoaderInstallBase( 10 | Mock(), 'root_dir', Mock() 11 | ) 12 | 13 | def setup_method(self, cls): 14 | self.setup() 15 | 16 | def test_install(self): 17 | with raises(NotImplementedError): 18 | self.bootloader.install() 19 | 20 | def test_install_required(self): 21 | with raises(NotImplementedError): 22 | self.bootloader.install_required() 23 | 24 | def test_secure_boot_install(self): 25 | with raises(NotImplementedError): 26 | self.bootloader.secure_boot_install() 27 | -------------------------------------------------------------------------------- /test/unit/bootloader/install/init_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import ( 2 | patch, Mock 3 | ) 4 | from pytest import raises 5 | 6 | from kiwi.exceptions import KiwiBootLoaderInstallSetupError 7 | from kiwi.bootloader.install import BootLoaderInstall 8 | 9 | 10 | class TestBootLoaderInstall: 11 | def test_bootloader_install_not_implemented(self): 12 | with raises(KiwiBootLoaderInstallSetupError): 13 | BootLoaderInstall.new('foo', Mock(), 'root_dir', Mock()) 14 | 15 | @patch('kiwi.bootloader.install.grub2.BootLoaderInstallGrub2') 16 | def test_bootloader_install_grub2(self, mock_grub2): 17 | device_provider = Mock() 18 | xml_state = Mock() 19 | BootLoaderInstall.new('grub2', xml_state, 'root_dir', device_provider) 20 | mock_grub2.assert_called_once_with( 21 | xml_state, 'root_dir', device_provider, None 22 | ) 23 | -------------------------------------------------------------------------------- /test/unit/bootloader/install/systemd_boot_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import Mock 2 | from pytest import raises 3 | 4 | from kiwi.bootloader.install.systemd_boot import BootLoaderInstallSystemdBoot 5 | 6 | 7 | class TestBootLoaderInstallSystemdBoot: 8 | def setup(self): 9 | self.bootloader = BootLoaderInstallSystemdBoot( 10 | Mock(), 'root_dir', Mock() 11 | ) 12 | 13 | def setup_method(self, cls): 14 | self.setup() 15 | 16 | def test_install(self): 17 | with raises(NotImplementedError): 18 | self.bootloader.install() 19 | 20 | def test_install_required(self): 21 | assert self.bootloader.install_required() is False 22 | 23 | def test_secure_boot_install(self): 24 | # just pass 25 | self.bootloader.secure_boot_install() 26 | -------------------------------------------------------------------------------- /test/unit/bootloader/install/zipl_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import Mock 2 | from pytest import raises 3 | 4 | from kiwi.bootloader.install.zipl import BootLoaderInstallZipl 5 | 6 | 7 | class TestBootLoaderInstallZipl: 8 | def setup(self): 9 | self.bootloader = BootLoaderInstallZipl( 10 | Mock(), 'root_dir', Mock() 11 | ) 12 | 13 | def setup_method(self, cls): 14 | self.setup() 15 | 16 | def test_install(self): 17 | with raises(NotImplementedError): 18 | self.bootloader.install() 19 | 20 | def test_install_required(self): 21 | assert self.bootloader.install_required() is False 22 | 23 | def test_secure_boot_install(self): 24 | # just pass 25 | self.bootloader.secure_boot_install() 26 | -------------------------------------------------------------------------------- /test/unit/bootloader/template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/bootloader/template/__init__.py -------------------------------------------------------------------------------- /test/unit/bootloader/template/systemd_boot_test.py: -------------------------------------------------------------------------------- 1 | from kiwi.bootloader.template.systemd_boot import BootLoaderTemplateSystemdBoot 2 | 3 | 4 | class TestBootLoaderTemplateSystemdBoot: 5 | def setup(self): 6 | self.systemd_boot = BootLoaderTemplateSystemdBoot() 7 | 8 | def setup_method(self, cls): 9 | self.setup() 10 | 11 | def test_get_loader_template(self): 12 | assert self.systemd_boot.get_loader_template().substitute( 13 | boot_timeout='10' 14 | ) 15 | -------------------------------------------------------------------------------- /test/unit/bootloader/template/zipl_test.py: -------------------------------------------------------------------------------- 1 | from kiwi.bootloader.template.zipl import BootLoaderTemplateZipl 2 | 3 | 4 | class TestBootLoaderTemplateZipl: 5 | def setup(self): 6 | self.zipl = BootLoaderTemplateZipl() 7 | 8 | def setup_method(self, cls): 9 | self.setup() 10 | 11 | def test_get_loader_template(self): 12 | assert self.zipl.get_loader_template().substitute( 13 | boot_timeout='10', 14 | bootpath='/boot', 15 | targetbase='', 16 | targettype='SCSI', 17 | targetblocksize='512', 18 | targetoffset='2048', 19 | targetgeometry='' 20 | ) 21 | 22 | def test_get_entry_template_standard(self): 23 | assert self.zipl.get_entry_template().substitute( 24 | title='title', 25 | boot_options='', 26 | kernel_file='linux', 27 | initrd_file='initrd' 28 | ) 29 | 30 | def test_get_entry_template_secure(self): 31 | assert self.zipl.get_entry_template(secure=True).substitute( 32 | title='title', 33 | boot_options='', 34 | secure_image_file='linux' 35 | ) 36 | -------------------------------------------------------------------------------- /test/unit/builder/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/builder/__init__.py -------------------------------------------------------------------------------- /test/unit/container/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/container/__init__.py -------------------------------------------------------------------------------- /test/unit/container/setup/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/container/setup/__init__.py -------------------------------------------------------------------------------- /test/unit/container/setup/docker_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | 3 | from kiwi.container.setup.docker import ContainerSetupDocker 4 | 5 | 6 | class TestContainerSetupDocker: 7 | @patch('os.path.exists') 8 | def test_init(self, mock_exists): 9 | mock_exists.return_value = True 10 | container = ContainerSetupDocker( 11 | 'root_dir', {'container_name': 'system'} 12 | ) 13 | assert container.custom_args['container_name'] == 'system' 14 | -------------------------------------------------------------------------------- /test/unit/container/setup/init_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | from pytest import raises 3 | 4 | from kiwi.container.setup import ContainerSetup 5 | 6 | from kiwi.exceptions import KiwiContainerSetupError 7 | 8 | 9 | class TestContainerSetup: 10 | def test_container_not_implemented(self): 11 | with raises(KiwiContainerSetupError): 12 | ContainerSetup.new('foo', 'root_dir') 13 | 14 | @patch('kiwi.container.setup.docker.ContainerSetupDocker') 15 | def test_container_docker(self, mock_docker): 16 | ContainerSetup.new('docker', 'root_dir') 17 | mock_docker.assert_called_once_with('root_dir', None) 18 | 19 | @patch('kiwi.container.setup.oci.ContainerSetupOCI') 20 | def test_container_oci(self, mock_oci): 21 | ContainerSetup.new('oci', 'root_dir') 22 | mock_oci.assert_called_once_with('root_dir', None) 23 | 24 | @patch('kiwi.container.setup.appx.ContainerSetupAppx') 25 | def test_container_appx(self, mock_appx): 26 | ContainerSetup.new('appx', 'root_dir') 27 | mock_appx.assert_called_once_with('root_dir', None) 28 | -------------------------------------------------------------------------------- /test/unit/container/setup/wsl_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | from unittest.mock import patch 3 | 4 | from kiwi.container.setup.wsl import ContainerSetupWsl 5 | from kiwi.exceptions import KiwiContainerSetupError 6 | 7 | 8 | class TestContainerSetupAppx: 9 | @patch('os.path.exists') 10 | def setup(self, mock_exists): 11 | self.wsl = ContainerSetupWsl('root_dir') 12 | 13 | @patch('os.path.exists') 14 | def setup_method(self, cls, mock_exists): 15 | self.setup() 16 | 17 | @patch('os.path.exists') 18 | def test_setup(self, mock_exists): 19 | 20 | def exists(path): 21 | if path == path_to_fail: 22 | return False 23 | return True 24 | 25 | mock_exists.side_effect = exists 26 | 27 | path_to_fail = 'root_dir/etc/wsl-distribution.conf' 28 | with raises(KiwiContainerSetupError): 29 | self.wsl.setup() 30 | 31 | path_to_fail = 'root_dir/etc/wsl.conf' 32 | with raises(KiwiContainerSetupError): 33 | self.wsl.setup() 34 | -------------------------------------------------------------------------------- /test/unit/filesystem/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/filesystem/__init__.py -------------------------------------------------------------------------------- /test/unit/filesystem/swap_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | 3 | import unittest.mock as mock 4 | 5 | from kiwi.filesystem.swap import FileSystemSwap 6 | 7 | 8 | class TestFileSystemSwap: 9 | @patch('os.path.exists') 10 | def setup(self, mock_exists): 11 | mock_exists.return_value = True 12 | provider = mock.Mock() 13 | provider.get_device = mock.Mock( 14 | return_value='/dev/foo' 15 | ) 16 | self.swap = FileSystemSwap(provider, 'root_dir') 17 | self.swap.setup_mountpoint = mock.Mock( 18 | return_value='some-mount-point' 19 | ) 20 | 21 | @patch('os.path.exists') 22 | def setup_method(self, cls, mock_exists): 23 | self.setup() 24 | 25 | @patch('kiwi.filesystem.swap.Command.run') 26 | def test_create_on_device(self, mock_command): 27 | self.swap.create_on_device('label') 28 | call = mock_command.call_args_list[0] 29 | assert mock_command.call_args_list[0] == \ 30 | call(['mkswap', '-L', 'label', '/dev/foo']) 31 | -------------------------------------------------------------------------------- /test/unit/help_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | from pytest import raises 3 | 4 | from kiwi.help import Help 5 | 6 | from kiwi.exceptions import KiwiHelpNoCommandGiven 7 | 8 | 9 | class TestHelp: 10 | def setup(self): 11 | self.help = Help() 12 | 13 | def setup_method(self, cls): 14 | self.setup() 15 | 16 | def test_show(self): 17 | with raises(KiwiHelpNoCommandGiven): 18 | self.help.show(None) 19 | 20 | @patch('subprocess.call') 21 | def test_show_command(self, mock_process): 22 | self.help.show('foo') 23 | mock_process.assert_called_once_with('man 8 foo', shell=True) 24 | -------------------------------------------------------------------------------- /test/unit/iso_tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/iso_tools/__init__.py -------------------------------------------------------------------------------- /test/unit/logger_color_formatter_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | from collections import namedtuple 3 | 4 | from kiwi.logger_color_formatter import ColorFormatter 5 | 6 | 7 | class TestColorFormatter: 8 | def setup(self): 9 | self.color_formatter = ColorFormatter('%(levelname)s: %(message)s') 10 | 11 | def setup_method(self, cls): 12 | self.setup() 13 | 14 | @patch('logging.Formatter.format') 15 | def test_format(self, mock_format): 16 | MyRecord = namedtuple( 17 | 'MyRecord', 18 | 'levelname' 19 | ) 20 | record = MyRecord(levelname='INFO') 21 | mock_format.return_value = 'message' 22 | self.color_formatter.format(record) 23 | assert 'message' in self.color_formatter.format(record) 24 | -------------------------------------------------------------------------------- /test/unit/logger_socket_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import Mock 2 | from kiwi.logger_socket import PlainTextSocketHandler 3 | 4 | 5 | class TestPlainTextSocketHandler: 6 | def setup(self): 7 | self.logger_socket = PlainTextSocketHandler('socket', None) 8 | self.logger_socket.formatter = Mock() 9 | 10 | def setup_method(self, cls): 11 | self.setup() 12 | 13 | def test_makePickle(self): 14 | self.logger_socket.makePickle('record') 15 | self.logger_socket.formatter.format.assert_called_once_with('record') 16 | -------------------------------------------------------------------------------- /test/unit/markup/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/markup/__init__.py -------------------------------------------------------------------------------- /test/unit/markup/markup_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | 3 | from kiwi.markup import Markup 4 | 5 | from kiwi.exceptions import KiwiAnyMarkupPluginError 6 | 7 | 8 | class TestMarkup: 9 | @patch('kiwi.markup.any.MarkupAny') 10 | def test_MarkupAny(self, mock_MarkupAny): 11 | Markup.new('description') 12 | mock_MarkupAny.assert_called_once_with('description') 13 | 14 | @patch('kiwi.markup.xml.MarkupXML') 15 | @patch('kiwi.markup.any.MarkupAny') 16 | def test_MarkupXML(self, mock_MarkupAny, mock_MarkupXML): 17 | mock_MarkupAny.side_effect = KiwiAnyMarkupPluginError('load-error') 18 | Markup.new('description') 19 | mock_MarkupXML.assert_called_once_with('description') 20 | -------------------------------------------------------------------------------- /test/unit/markup/xml_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | 3 | from kiwi.markup.xml import MarkupXML 4 | 5 | from kiwi.exceptions import KiwiMarkupConversionError 6 | 7 | 8 | class TestMarkupXML: 9 | def setup(self): 10 | self.markup = MarkupXML('../data/example_config.xml') 11 | 12 | def setup_method(self, cls): 13 | self.setup() 14 | 15 | def test_get_xml_description(self): 16 | assert 'xslt-' in self.markup.get_xml_description() 17 | 18 | def test_get_yaml_description(self): 19 | with raises(KiwiMarkupConversionError): 20 | self.markup.get_yaml_description() 21 | -------------------------------------------------------------------------------- /test/unit/oci_tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/oci_tools/__init__.py -------------------------------------------------------------------------------- /test/unit/package_manager/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/package_manager/__init__.py -------------------------------------------------------------------------------- /test/unit/partitioner/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/partitioner/__init__.py -------------------------------------------------------------------------------- /test/unit/privileges_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | from pytest import raises 3 | 4 | from kiwi.privileges import Privileges 5 | 6 | from kiwi.exceptions import KiwiPrivilegesError 7 | 8 | 9 | class TestPrivileges: 10 | @patch('os.geteuid') 11 | def test_check_for_root_permiossion_false(self, mock_euid): 12 | mock_euid.return_value = 1 13 | with raises(KiwiPrivilegesError): 14 | Privileges.check_for_root_permissions() 15 | 16 | @patch('os.geteuid') 17 | def test_check_for_root_permiossion_true(self, mock_euid): 18 | mock_euid.return_value = 0 19 | assert Privileges.check_for_root_permissions() is True 20 | -------------------------------------------------------------------------------- /test/unit/repository/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/repository/__init__.py -------------------------------------------------------------------------------- /test/unit/repository/template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/repository/template/__init__.py -------------------------------------------------------------------------------- /test/unit/repository/template/apt_test.py: -------------------------------------------------------------------------------- 1 | from kiwi.repository.template.apt import PackageManagerTemplateAptGet 2 | 3 | 4 | class TestPackageManagerTemplateAptGet: 5 | def setup(self): 6 | self.apt = PackageManagerTemplateAptGet() 7 | 8 | def setup_method(self, cls): 9 | self.setup() 10 | 11 | def test_get_host_template(self): 12 | assert self.apt.get_host_template().substitute( 13 | apt_shared_base='/var/cache/kiwi/apt-get', 14 | unauthenticated='true' 15 | ) 16 | 17 | def test_get_image_template(self): 18 | assert self.apt.get_image_template().substitute( 19 | unauthenticated='true' 20 | ) 21 | 22 | def test_get_host_template_with_exclude_docs(self): 23 | assert self.apt.get_host_template(exclude_docs=True).substitute( 24 | apt_shared_base='/var/cache/kiwi/apt-get', 25 | unauthenticated='true' 26 | ) 27 | 28 | def test_get_image_template_with_exclude_docs(self): 29 | assert self.apt.get_image_template(exclude_docs=True).substitute( 30 | unauthenticated='true' 31 | ) 32 | -------------------------------------------------------------------------------- /test/unit/shell_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | 3 | from kiwi.system.shell import Shell 4 | 5 | from kiwi.defaults import Defaults 6 | 7 | 8 | class TestShell: 9 | def test_quote(self): 10 | assert Shell.quote(r'aa\!') == 'aa\\\\\\!' 11 | 12 | @patch('kiwi.path.Path.which') 13 | def test_quote_key_value_file(self, mock_which): 14 | mock_which.side_effect = ['cp', 'bash'] 15 | assert Shell.quote_key_value_file('../data/key_value') == [ 16 | "foo='bar'", 17 | "bar='xxx'", 18 | "name='bob'", 19 | "strange='$a_foo'" 20 | ] 21 | 22 | @patch('kiwi.system.shell.Command.run') 23 | def test_run_common_function(self, mock_command): 24 | Shell.run_common_function('foo', ['"param1"', '"param2"']) 25 | command_string = ' '.join( 26 | [ 27 | 'source', Defaults.project_file('config/functions.sh') + ';', 28 | 'foo', '"param1"', '"param2"' 29 | ] 30 | ) 31 | mock_command.assert_called_once_with( 32 | ['bash', '-c', command_string] 33 | ) 34 | -------------------------------------------------------------------------------- /test/unit/solver/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/solver/__init__.py -------------------------------------------------------------------------------- /test/unit/solver/repository/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/solver/repository/__init__.py -------------------------------------------------------------------------------- /test/unit/solver/repository/deb_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import ( 2 | patch, Mock 3 | ) 4 | from kiwi.solver.repository.deb import SolverRepositoryDeb 5 | from kiwi.solver.repository.base import SolverRepositoryBase 6 | 7 | 8 | class TestSolverRepositoryDeb: 9 | def setup(self): 10 | self.uri = Mock() 11 | self.uri.uri = 'http://example.org/some/path' 12 | self.solver = SolverRepositoryDeb(self.uri) 13 | 14 | def setup_method(self, cls): 15 | self.setup() 16 | 17 | @patch.object(SolverRepositoryBase, '_get_deb_packages') 18 | @patch.object(SolverRepositoryBase, '_create_solvables') 19 | @patch.object(SolverRepositoryBase, '_create_temporary_metadata_dir') 20 | def test__setup_repository_metadata( 21 | self, mock_mkdtemp, mock_create_solvables, mock_get_deb_packages 22 | ): 23 | mock_mkdtemp.return_value = 'metadata_dir.XX' 24 | self.solver._setup_repository_metadata() 25 | mock_get_deb_packages.assert_called_once_with( 26 | download_dir='metadata_dir.XX' 27 | ) 28 | mock_create_solvables.assert_called_once_with( 29 | 'metadata_dir.XX', 'deb2solv' 30 | ) 31 | -------------------------------------------------------------------------------- /test/unit/storage/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/storage/__init__.py -------------------------------------------------------------------------------- /test/unit/storage/mapped_device_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import ( 2 | patch, Mock 3 | ) 4 | from pytest import raises 5 | 6 | from kiwi.storage.mapped_device import MappedDevice 7 | 8 | from kiwi.exceptions import KiwiMappedDeviceError 9 | 10 | 11 | class TestMappedDevice: 12 | @patch('os.path.exists') 13 | def setup(self, mock_path): 14 | mock_path.return_value = True 15 | self.device_provider = Mock() 16 | self.device_provider.is_loop = Mock() 17 | self.device = MappedDevice( 18 | '/dev/foo', self.device_provider 19 | ) 20 | 21 | @patch('os.path.exists') 22 | def setup_method(self, cls, mock_path): 23 | self.setup() 24 | 25 | @patch('os.path.exists') 26 | def test_device_not_existingr(self, mock_path): 27 | mock_path.return_value = False 28 | with raises(KiwiMappedDeviceError): 29 | MappedDevice('/dev/foo', Mock()) 30 | 31 | def test_get_device(self): 32 | assert self.device.get_device() == '/dev/foo' 33 | 34 | def test_is_loop(self): 35 | assert self.device.is_loop() == self.device_provider.is_loop() 36 | -------------------------------------------------------------------------------- /test/unit/storage/subformat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/storage/subformat/__init__.py -------------------------------------------------------------------------------- /test/unit/storage/subformat/template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/storage/subformat/template/__init__.py -------------------------------------------------------------------------------- /test/unit/system/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/system/__init__.py -------------------------------------------------------------------------------- /test/unit/system/root_import/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/system/root_import/__init__.py -------------------------------------------------------------------------------- /test/unit/system/root_import/init_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | from pytest import raises 3 | 4 | from kiwi.system.root_import import RootImport 5 | 6 | from kiwi.exceptions import KiwiRootImportError 7 | 8 | 9 | class TestRootImport: 10 | @patch('kiwi.system.root_import.oci.RootImportOCI') 11 | def test_docker_import(self, mock_docker_import): 12 | RootImport.new('root_dir', 'file:///image.tar.xz', 'docker') 13 | mock_docker_import.assert_called_once_with( 14 | 'root_dir', 'file:///image.tar.xz', 15 | {'archive_transport': 'docker-archive'} 16 | ) 17 | 18 | @patch('kiwi.system.root_import.oci.RootImportOCI') 19 | def test_oci_import(self, mock_oci_import): 20 | RootImport.new('root_dir', 'file:///image.tar.xz', 'oci') 21 | mock_oci_import.assert_called_once_with( 22 | 'root_dir', 'file:///image.tar.xz', 23 | {'archive_transport': 'oci-archive'} 24 | ) 25 | 26 | def test_not_implemented_import(self): 27 | with raises(KiwiRootImportError): 28 | RootImport.new('root_dir', 'file:///image.tar.xz', 'foo') 29 | -------------------------------------------------------------------------------- /test/unit/system/shell_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | 3 | from kiwi.system.shell import Shell 4 | from kiwi.exceptions import KiwiShellVariableValueError 5 | 6 | 7 | class TestSystemShell: 8 | def test_format_to_variable_value(self): 9 | assert Shell.format_to_variable_value('text') == 'text' 10 | assert Shell.format_to_variable_value(True) == 'true' 11 | assert Shell.format_to_variable_value(False) == 'false' 12 | assert Shell.format_to_variable_value('42') == '42' 13 | assert Shell.format_to_variable_value(0) == '0' 14 | assert Shell.format_to_variable_value(42) == '42' 15 | assert Shell.format_to_variable_value(None) == '' 16 | assert Shell.format_to_variable_value(b"42") == '42' 17 | with raises(KiwiShellVariableValueError): 18 | Shell.format_to_variable_value(['foo', 'bar']) 19 | -------------------------------------------------------------------------------- /test/unit/tasks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/tasks/__init__.py -------------------------------------------------------------------------------- /test/unit/test_helper.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # default commandline used for any test, overwrite when needed 4 | sys.argv = [ 5 | sys.argv[0], 'system', 'prepare', 6 | '--description', 'description', '--root', 'directory' 7 | ] 8 | argv_kiwi_tests = sys.argv 9 | -------------------------------------------------------------------------------- /test/unit/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/utils/__init__.py -------------------------------------------------------------------------------- /test/unit/utils/os_release_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | 3 | from kiwi.utils.os_release import OsRelease 4 | from kiwi.exceptions import KiwiOSReleaseImportError 5 | 6 | 7 | class TestOsRelease(object): 8 | def setup(self): 9 | self.os_release = OsRelease('../data') 10 | 11 | def setup_method(self, cls): 12 | self.setup() 13 | 14 | def test_setup_raises(self): 15 | with raises(KiwiOSReleaseImportError): 16 | OsRelease('does-not-exist') 17 | 18 | def test_get(self): 19 | assert self.os_release.get('ID') == 'opensuse-leap' 20 | -------------------------------------------------------------------------------- /test/unit/utils/primes_test.py: -------------------------------------------------------------------------------- 1 | from pytest import mark 2 | 3 | from kiwi.utils.primes import primes, factors 4 | 5 | 6 | class TestPrimes: 7 | @mark.parametrize('highest,number,tail', [ 8 | [10, 4, [3, 5, 7]], 9 | [11, 5, [5, 7, 11]], 10 | [100, 25, [83, 89, 97]], 11 | [1000, 168, [983, 991, 997]], 12 | [8192, 1028, [8171, 8179, 8191]], 13 | [9000, 1117, [8969, 8971, 8999]]]) 14 | def test_primes(self, highest, number, tail): 15 | _primes = list(primes(highest)) 16 | assert number == len(_primes) 17 | assert tail == _primes[-3:] 18 | 19 | @mark.parametrize('number,threshold,result', [ 20 | [1, None, []], 21 | [3, None, [3]], 22 | [21, None, [3, 7]], 23 | [100, None, [2, 2, 5, 5]], 24 | [1000, None, [2, 2, 2, 5, 5, 5]], 25 | [8191, None, [8191]], 26 | [8191, 8192, [8191]], 27 | [8999, None, [8999]], 28 | [8999, 8192, []], 29 | [9000, None, [2, 2, 2, 3, 3, 5, 5, 5]]]) 30 | def test_factors(self, number, threshold, result): 31 | _result = list(factors(number, threshold)) 32 | assert result == _result 33 | -------------------------------------------------------------------------------- /test/unit/utils/size_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | 3 | from kiwi.utils.size import StringToSize 4 | 5 | from kiwi.exceptions import KiwiSizeError 6 | 7 | 8 | class TestStringToSize: 9 | def test_to_bytes(self): 10 | assert StringToSize.to_bytes('1m') == 1048576 11 | assert StringToSize.to_bytes('1M') == 1048576 12 | assert StringToSize.to_bytes('1g') == 1073741824 13 | assert StringToSize.to_bytes('1G') == 1073741824 14 | 15 | def test_to_bytes_wrong_format(self): 16 | with raises(KiwiSizeError): 17 | StringToSize.to_bytes('1mb') 18 | -------------------------------------------------------------------------------- /test/unit/utils/temporary_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import patch 2 | 3 | from kiwi.utils.temporary import Temporary 4 | 5 | 6 | class TestTemporary: 7 | def setup(self): 8 | self.temporary = Temporary() 9 | 10 | def setup_method(self, cls): 11 | self.setup() 12 | 13 | @patch('kiwi.utils.temporary.NamedTemporaryFile') 14 | def test_new_file(self, mock_NamedTemporaryFile): 15 | self.temporary.new_file() 16 | mock_NamedTemporaryFile.assert_called_once_with( 17 | dir='/var/tmp', prefix='kiwi_' 18 | ) 19 | 20 | @patch('kiwi.utils.temporary.TemporaryDirectory') 21 | def test_new_dir(self, mock_TemporaryDirectory): 22 | self.temporary.new_dir() 23 | mock_TemporaryDirectory.assert_called_once_with( 24 | dir='/var/tmp', prefix='kiwi_' 25 | ) 26 | -------------------------------------------------------------------------------- /test/unit/utils/toenv_test.py: -------------------------------------------------------------------------------- 1 | from pytest import raises 2 | import os 3 | 4 | from kiwi.utils.toenv import ToEnv 5 | from kiwi.exceptions import KiwiEnvImportError 6 | 7 | 8 | class TestToEnv(object): 9 | def setup(self): 10 | ToEnv('../data', 'some.env') 11 | assert os.environ['ZYPP_MODALIAS_SYSFS'] == '' 12 | 13 | def setup_method(self, cls): 14 | self.setup() 15 | 16 | def test_setup_raises(self): 17 | with raises(KiwiEnvImportError): 18 | ToEnv('../data', 'some_broken.env') 19 | -------------------------------------------------------------------------------- /test/unit/volume_manager/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSInside/kiwi/c0da0c2215654175d3d4f5f77954abc1766f100d/test/unit/volume_manager/__init__.py -------------------------------------------------------------------------------- /test/unit/volume_manager/init_test.py: -------------------------------------------------------------------------------- 1 | from unittest.mock import ( 2 | patch, Mock 3 | ) 4 | from pytest import raises 5 | 6 | from kiwi.volume_manager import VolumeManager 7 | 8 | from kiwi.exceptions import KiwiVolumeManagerSetupError 9 | 10 | 11 | class TestVolumeManager: 12 | def test_volume_manager_not_implemented(self): 13 | with raises(KiwiVolumeManagerSetupError): 14 | VolumeManager.new('foo', Mock(), 'root_dir', [Mock()]) 15 | 16 | @patch('kiwi.volume_manager.lvm.VolumeManagerLVM') 17 | def test_volume_manager_lvm(self, mock_lvm): 18 | device_map = Mock() 19 | volumes = [Mock()] 20 | VolumeManager.new('lvm', device_map, 'root_dir', volumes) 21 | mock_lvm.assert_called_once_with( 22 | device_map, 'root_dir', volumes, None 23 | ) 24 | 25 | @patch('kiwi.volume_manager.btrfs.VolumeManagerBtrfs') 26 | def test_volume_manager_btrfs(self, mock_btrfs): 27 | device_map = Mock() 28 | volumes = [Mock()] 29 | VolumeManager.new('btrfs', device_map, 'root_dir', volumes) 30 | mock_btrfs.assert_called_once_with( 31 | device_map, 'root_dir', volumes, None 32 | ) 33 | --------------------------------------------------------------------------------