diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..daae6b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/kiwi-9.25.22.tar.gz diff --git a/.kiwi.metadata b/.kiwi.metadata new file mode 100644 index 0000000..9bd7a54 --- /dev/null +++ b/.kiwi.metadata @@ -0,0 +1 @@ +d3ef3bd043438b409a2d45d54a1520af5bb75a1c SOURCES/kiwi-9.25.22.tar.gz diff --git a/SOURCES/0001-Use-buildah-by-default-for-OCI-image-builds.patch b/SOURCES/0001-Use-buildah-by-default-for-OCI-image-builds.patch new file mode 100644 index 0000000..ece17a0 --- /dev/null +++ b/SOURCES/0001-Use-buildah-by-default-for-OCI-image-builds.patch @@ -0,0 +1,39 @@ +From ff0028f6f60eba3038a765e4ea3c59addb52ccc2 Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Sat, 6 May 2023 12:06:16 +0200 +Subject: [PATCH] Use buildah by default for OCI image builds + +--- + kiwi.yml | 2 +- + kiwi/defaults.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/kiwi.yml b/kiwi.yml +index 4c5922138..987898e2a 100644 +--- a/kiwi.yml ++++ b/kiwi.yml +@@ -67,7 +67,7 @@ + # # Specify OCI archive tool which should be used on creation of + # # container archives for OCI compliant images, e.g docker + # # Possible values are umoci and buildah +-# - archive_tool: umoci ++# - archive_tool: buildah + + + # Specify build constraints that applies during the image build +diff --git a/kiwi/defaults.py b/kiwi/defaults.py +index ae0251a71..b11deb968 100644 +--- a/kiwi/defaults.py ++++ b/kiwi/defaults.py +@@ -1732,7 +1732,7 @@ class Defaults: + + :rtype: str + """ +- return 'umoci' ++ return 'buildah' + + @staticmethod + def get_part_mapper_tool(): +-- +2.40.1 + diff --git a/SOURCES/0001-run-grub-mkconfig-with-os-prober-disable.patch b/SOURCES/0001-run-grub-mkconfig-with-os-prober-disable.patch new file mode 100644 index 0000000..89e6c62 --- /dev/null +++ b/SOURCES/0001-run-grub-mkconfig-with-os-prober-disable.patch @@ -0,0 +1,53 @@ +From 6218bb8e503e0d620f322f022207336d918949e4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= +Date: Wed, 10 Sep 2025 16:32:15 +0200 +Subject: [PATCH] Run grub mkconfig with os-prober disabled + +Set GRUB_DISABLE_OS_PROBER=true to the caller environment +such that it gets consumed via /etc/grub.d/30_os-prober +This Fixes #2883 +--- + kiwi/bootloader/config/grub2.py | 5 ++++- + test/unit/bootloader/config/grub2_test.py | 3 ++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/kiwi/bootloader/config/grub2.py b/kiwi/bootloader/config/grub2.py +index 982556fcd87..955a5a24c02 100644 +--- a/kiwi/bootloader/config/grub2.py ++++ b/kiwi/bootloader/config/grub2.py +@@ -300,12 +300,15 @@ def setup_disk_image_config( + self.boot_directory_name, 'grub.cfg' + ] + ) ++ # Disable os-prober, it takes information from the host it ++ # runs on which is not necessarily matching with the image ++ os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'}) + Command.run( + [ + 'chroot', self.root_mount.mountpoint, + os.path.basename(self._get_grub2_mkconfig_tool()), '-o', + config_file.replace(self.root_mount.mountpoint, '') +- ] ++ ], os.environ + ) + if boot_options.get('root_device') != boot_options.get('boot_device'): + # Create a boot -> . link on the boot partition. +diff --git a/test/unit/bootloader/config/grub2_test.py b/test/unit/bootloader/config/grub2_test.py +index 0b11b0b9acd..ea2c600e832 100644 +--- a/test/unit/bootloader/config/grub2_test.py ++++ b/test/unit/bootloader/config/grub2_test.py +@@ -1219,12 +1219,13 @@ def open_file(filename, mode=None): + mock_mount_system.assert_called_once_with( + 'rootdev', 'bootdev', None, None, None + ) ++ os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'}) + assert mock_Command_run.call_args_list == [ + call( + [ + 'chroot', self.bootloader.root_mount.mountpoint, + 'grub2-mkconfig', '-o', '/boot/grub2/grub.cfg' +- ] ++ ], os.environ + ), + call( + [ diff --git a/SOURCES/0002-Fixed-missing-selinux-context-setup-for-live-ISOs.patch b/SOURCES/0002-Fixed-missing-selinux-context-setup-for-live-ISOs.patch new file mode 100644 index 0000000..43693e8 --- /dev/null +++ b/SOURCES/0002-Fixed-missing-selinux-context-setup-for-live-ISOs.patch @@ -0,0 +1,54 @@ +From 3a989d0e357cbc6cc4464c4bbca5b1ce6baf75d6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= +Date: Fri, 6 Mar 2026 16:21:06 +0100 +Subject: [PATCH] Fixed missing selinux context setup for live ISOs + +When building live ISO images the selinux context was not created +for eventually new created files during the live ISO creation +process. This Fixes OSInside/kiwi-boxed-plugin#99 +--- + kiwi/builder/live.py | 5 +++++ + test/unit/builder/live_test.py | 4 ++++ + 2 files changed, 9 insertions(+) + +diff --git a/kiwi/builder/live.py b/kiwi/builder/live.py +index 7f09082b1..20adc2399 100644 +--- a/kiwi/builder/live.py ++++ b/kiwi/builder/live.py +@@ -189,6 +189,8 @@ class LiveImageBuilder: + working_directory=self.root_dir + ) + ++ self.system_setup.setup_selinux_file_contexts() ++ + # prepare dracut initrd call + self.boot_image.prepare() + +@@ -251,6 +253,9 @@ class LiveImageBuilder: + 'mount_options': self.xml_state.get_fs_mount_option_list(), + 'create_options': self.xml_state.get_fs_create_option_list() + } ++ ++ self.system_setup.setup_selinux_file_contexts() ++ + filesystem_setup = FileSystemSetup( + self.xml_state, self.root_dir + ) +diff --git a/test/unit/builder/live_test.py b/test/unit/builder/live_test.py +index 4773f735b..c661caed0 100644 +--- a/test/unit/builder/live_test.py ++++ b/test/unit/builder/live_test.py +@@ -227,6 +227,10 @@ class TestLiveImageBuilder: + + self.setup.import_cdroot_files.assert_called_once_with('temp_media_dir') + ++ assert self.setup.setup_selinux_file_contexts.call_args_list == [ ++ call(), call() ++ ] ++ + assert kiwi.builder.live.FileSystem.new.call_args_list == [ + call( + device_provider=self.loop, name='ext4', +-- +2.53.0 + diff --git a/SOURCES/kiwi-9.25.7-doc-use-xml-highlight.patch b/SOURCES/kiwi-9.25.7-doc-use-xml-highlight.patch new file mode 100644 index 0000000..29421eb --- /dev/null +++ b/SOURCES/kiwi-9.25.7-doc-use-xml-highlight.patch @@ -0,0 +1,22 @@ +diff --git a/doc/source/concept_and_workflow/customize_the_boot_process.rst b/doc/source/concept_and_workflow/customize_the_boot_process.rst +index d2c1b6bc4..5146b508b 100644 +--- a/doc/source/concept_and_workflow/customize_the_boot_process.rst ++++ b/doc/source/concept_and_workflow/customize_the_boot_process.rst +@@ -55,7 +55,7 @@ of {kiwi} the following dracut modules are used: + and ``pxe``. The use of a custom boot image is activated by setting the + following attribute in the image description: + +- .. code:: none ++ .. code:: xml + + + +@@ -63,7 +63,7 @@ of {kiwi} the following dracut modules are used: + a boot image description in the ``boot`` attribute like in the + following example: + +- .. code:: none ++ .. code:: xml + + + diff --git a/SOURCES/kiwi-9.25.7-no-sphinx-custom-css.patch b/SOURCES/kiwi-9.25.7-no-sphinx-custom-css.patch new file mode 100644 index 0000000..f324b1e --- /dev/null +++ b/SOURCES/kiwi-9.25.7-no-sphinx-custom-css.patch @@ -0,0 +1,12 @@ +diff --git a/doc/source/conf.py b/doc/source/conf.py +index cfcbd563b..1f846fc08 100644 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -59,7 +59,6 @@ def setup(app): + app.add_config_value('prolog_replacements', {}, True) + app.connect('source-read', prologReplace) + app.connect("autodoc-process-docstring", remove_module_docstring) +- app.add_css_file('css/custom.css') + + + prolog_replacements = { diff --git a/SOURCES/kiwi-9.25.7-no-sphinx-rtd-theme.patch b/SOURCES/kiwi-9.25.7-no-sphinx-rtd-theme.patch new file mode 100644 index 0000000..0b6b28c --- /dev/null +++ b/SOURCES/kiwi-9.25.7-no-sphinx-rtd-theme.patch @@ -0,0 +1,23 @@ +diff --git a/doc/source/conf.py b/doc/source/conf.py +index fbbba0074..cfcbd563b 100644 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -6,7 +6,6 @@ + import sys + from os.path import abspath, dirname, join, normpath + import shlex +-import sphinx_rtd_theme + + # If extensions (or modules to document with autodoc) are in another directory, + # add these directories to sys.path here. If the directory is relative to the +@@ -193,10 +192,6 @@ html_sidebars = { + ] + } + +-html_theme = "sphinx_rtd_theme" +- +-html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +- + html_static_path = ['.static'] + + html_theme_options = { diff --git a/SPECS/kiwi.spec b/SPECS/kiwi.spec new file mode 100644 index 0000000..646506b --- /dev/null +++ b/SPECS/kiwi.spec @@ -0,0 +1,917 @@ +# Enable Python dependency generation +%{?python_enable_dependency_generator} + +# Disable mangling shebangs for dracut module files as it breaks initramfs +%global __brp_mangle_shebangs_exclude_from ^%{_prefix}/lib/dracut/modules.d/.*$ + +%global desc \ +The KIWI Image System provides an operating system image builder \ +for Linux supported hardware platforms as well as for virtualization \ +and cloud systems like Xen, KVM, VMware, EC2 and more. + + +Name: kiwi +Version: 9.25.22 +Release: 1%{?dist} +URL: http://osinside.github.io/kiwi/ +Summary: Flexible operating system image builder +License: GPL-3.0-or-later +# We must use the version uploaded to pypi, as it contains all the required files. +Source0: https://files.pythonhosted.org/packages/source/k/%{name}/%{name}-%{version}.tar.gz + +# Backports from upstream +## From https://github.com/OSInside/kiwi/commit/6218bb8e503e0d620f322f022207336d918949e4 +Patch0001: 0001-run-grub-mkconfig-with-os-prober-disable.patch +## From https://github.com/OSInside/kiwi/commit/8a11be75232691fdb790b687d57c875f1ef66045 +Patch0002: 0002-Fixed-missing-selinux-context-setup-for-live-ISOs.patch + +# Fedora-specific patches +## Use buildah instead of umoci by default for OCI image builds +## TODO: Consider getting umoci into Fedora? +Patch1001: 0001-Use-buildah-by-default-for-OCI-image-builds.patch +## Remove usage of the rtd sphinx theme (unpackaged) +Patch1002: kiwi-9.25.7-no-sphinx-rtd-theme.patch +## Remove usage of the custom css (EL8 compatibility) +Patch1003: kiwi-9.25.7-no-sphinx-custom-css.patch +## Use xml instead of none for code block highlights (EL8 compatibility) +Patch1004: kiwi-9.25.7-doc-use-xml-highlight.patch + +BuildRequires: bash-completion +BuildRequires: dracut +BuildRequires: fdupes +BuildRequires: gcc +BuildRequires: make +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: shadow-utils + +# doc build requirements +BuildRequires: python3dist(docopt) >= 0.6.2 +BuildRequires: python3dist(lxml) +BuildRequires: python3dist(pyyaml) +BuildRequires: python3dist(requests) +BuildRequires: python3dist(simplejson) +BuildRequires: python3dist(six) +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(typing-extensions) + +%description %{desc} + + +%package systemdeps-core +Summary: KIWI - Core host system dependencies +Provides: kiwi-image-tbz-requires = %{version}-%{release} +Obsoletes: kiwi-image-tbz-requires < %{version}-%{release} +Provides: kiwi-image:tbz +# tools used by kiwi +# For building Fedora, RHEL/CentOS, and Mageia based images +Requires: dnf +%if 0%{?fedora} >= 39 +Requires: dnf5 +Provides: kiwi-packagemanager:dnf5 +%endif +Provides: kiwi-packagemanager:dnf +Provides: kiwi-packagemanager:dnf4 +Provides: kiwi-packagemanager:yum +%if (0%{?fedora} && 0%{?fedora} < 39) || 0%{?rhel} >= 8 +# For building Fedora, RHEL/CentOS, and Mageia based minimal images +Requires: microdnf +Provides: kiwi-packagemanager:microdnf +%endif +%if 0%{?fedora} +# For building (open)SUSE based images +Requires: zypper +Provides: kiwi-packagemanager:zypper +%endif +# Offers GPG public keys for various RPM distros and third party repositories +Recommends: distribution-gpg-keys +%if 0%{?fedora} || 0%{?rhel} >= 8 +# For building Debian/Ubuntu based images +Recommends: debootstrap +Recommends: dpkg +Recommends: gnupg2 +# Keyrings for bootstrap +Recommends: debian-keyring +Recommends: ubu-keyring +%endif +%if 0%{?fedora} +# For building Arch based images +Recommends: pacman +Recommends: archlinux-keyring +%endif +Requires: %{name}-tools = %{version}-%{release} +Requires: lsof +Requires: mtools +Requires: rsync +Requires: screen +Requires: tar >= 1.2.7 +Requires: openssl +# Python 2 module is no longer available +Obsoletes: python2-%{name} < %{version}-%{release} + +%description systemdeps-core +This metapackage installs the necessary system dependencies +to run KIWI. + +%ifnarch ppc64 %{ix86} +%package systemdeps-containers +Summary: KIWI - host requirements for container images +Provides: kiwi-image:docker +Provides: kiwi-image:appx +Provides: kiwi-image-docker-requires = %{version}-%{release} +Obsoletes: kiwi-image-docker-requires < %{version}-%{release} +Provides: kiwi-image-wsl-requires = %{version}-%{release} +Obsoletes: kiwi-image-wsl-requires < %{version}-%{release} +Requires: buildah +Requires: skopeo +Requires: appx-util + +%description systemdeps-containers +Host setup helper to pull in all packages required/useful on +the build host to build container images e.g docker, wsl. +%endif + +%package systemdeps-iso-media +Summary: KIWI - host requirements for live and install iso images +Provides: kiwi-image:iso +Provides: kiwi-image-iso-requires = %{version}-%{release} +Obsoletes: kiwi-image-iso-requires < %{version}-%{release} +Requires: xorriso +%ifarch %{ix86} x86_64 +# Pull in syslinux when it's x86 +%if 0%{?fedora} || 0%{?rhel} >= 8 +Requires: syslinux-nonlinux +%endif +Requires: syslinux +%endif +%ifarch x86_64 +Requires: grub2-efi-x64-cdboot +%if ! 0%{?rhel} +Requires: grub2-efi-ia32-cdboot +%endif +%endif +%ifarch aarch64 +Requires: grub2-efi-aa64-cdboot +%endif +%if ! 0%{?rhel} +%ifarch %{arm} +Requires: grub2-efi-arm-cdboot +%endif +%endif +Requires: kiwi-systemdeps-core = %{version}-%{release} +Requires: kiwi-systemdeps-filesystems = %{version}-%{release} +Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} + +%description systemdeps-iso-media +Host setup helper to pull in all packages required/useful on +the build host to build live and install iso images. + +%package systemdeps-bootloaders +Summary: KIWI - host requirements for configuring bootloaders +%if ! 0%{?rhel} +%ifarch %{arm} aarch64 +Requires: uboot-tools +%endif +%endif +%ifnarch s390 s390x +# grub isn't available on s390(x) systems +Requires: grub2-tools +Requires: grub2-tools-extra +Requires: grub2-tools-minimal +%endif +%ifarch x86_64 +Requires: grub2-tools-efi +%endif +%ifarch x86_64 +Requires: grub2-efi-x64 +Requires: grub2-efi-x64-modules +%if ! 0%{?rhel} +Requires: grub2-efi-ia32 +Requires: grub2-efi-ia32-modules +%endif +%endif +%ifarch %{ix86} x86_64 +Requires: grub2-pc +Requires: grub2-pc-modules +%endif +%ifarch aarch64 +Requires: grub2-efi-aa64-modules +%endif +%if ! 0%{?rhel} +# grub-efi for armv7hl is not available in RHEL +%ifarch %{arm} +Requires: grub2-efi-arm +Requires: grub2-efi-arm-modules +%endif +%endif +%ifarch s390 s390x +Requires: s390utils +%endif +Requires: kiwi-systemdeps-core = %{version}-%{release} + +%description systemdeps-bootloaders +Host setup helper to pull in all packages required/useful on +the build host for configuring bootloaders on images. + +%package systemdeps-filesystems +Summary: KIWI - host requirements for filesystems +Provides: kiwi-image:pxe +Provides: kiwi-image:kis +%if ! (0%{?rhel} >= 8) +Provides: kiwi-filesystem:btrfs +%endif +Provides: kiwi-filesystem:ext2 +Provides: kiwi-filesystem:ext3 +Provides: kiwi-filesystem:ext4 +Provides: kiwi-filesystem:squashfs +Provides: kiwi-filesystem:xfs +Provides: kiwi-image-pxe-requires = %{version}-%{release} +Obsoletes: kiwi-image-pxe-requires < %{version}-%{release} +Provides: kiwi-filesystem-requires = %{version}-%{release} +Obsoletes: kiwi-filesystem-requires < %{version}-%{release} +Requires: dosfstools +Requires: e2fsprogs +Requires: xfsprogs +%if ! (0%{?rhel} >= 8) +Requires: btrfs-progs +%endif +Requires: squashfs-tools +Requires: qemu-img +Requires: kiwi-systemdeps-core = %{version}-%{release} + +%description systemdeps-filesystems +Host setup helper to pull in all packages required/useful on +the build host to build filesystem images + +%package systemdeps-disk-images +Summary: KIWI - host requirements for disk images +Provides: kiwi-image:oem +Provides: kiwi-image:vmx +Provides: kiwi-image-oem-requires = %{version}-%{release} +Obsoletes: kiwi-image-oem-requires < %{version}-%{release} +Provides: kiwi-image-vmx-requires = %{version}-%{release} +Obsoletes: kiwi-image-vmx-requires < %{version}-%{release} +Requires: kiwi-systemdeps-filesystems = %{version}-%{release} +Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} +Requires: kiwi-systemdeps-iso-media = %{version}-%{release} +Requires: gdisk +Requires: lvm2 +Requires: parted +Requires: kpartx +Requires: cryptsetup +Requires: mdadm +Requires: util-linux + +%description systemdeps-disk-images +Host setup helper to pull in all packages required/useful on +the build host to build disk images + +%package systemdeps-image-validation +Summary: KIWI - host requirements for handling image descriptions better +%if 0%{?fedora} || 0%{?rhel} >= 8 +Recommends: jing +%endif +%if 0%{?fedora} || 0%{?rhel} >= 8 +Requires: python3-solv +%endif +%if ! (0%{?rhel} && 0%{?rhel} < 8) +Recommends: python3-anymarkup +%endif + +%description systemdeps-image-validation +Host setup helper to pull in all packages required/useful on +the build host to handling image descriptions better. This also +includes reading of image descriptions for different markup +languages + +%package systemdeps +Summary: KIWI - Host system dependencies +Requires: kiwi-systemdeps-core = %{version}-%{release} +Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} +%ifnarch ppc64 %{ix86} +# buildah isn't available on ppc64 or x86_32 +Requires: kiwi-systemdeps-containers = %{version}-%{release} +%endif +Requires: kiwi-systemdeps-filesystems = %{version}-%{release} +Requires: kiwi-systemdeps-disk-images = %{version}-%{release} +Requires: kiwi-systemdeps-iso-media = %{version}-%{release} +%if ! 0%{?rhel} +Requires: kiwi-systemdeps-image-validation = %{version}-%{release} +%endif + +%description systemdeps +Host setup helper to pull in all packages required/useful to +leverage all functionality in KIWI. + + +%package -n python3-%{name} +Summary: KIWI - Python 3 implementation +# Only require core dependencies, and allow OBS to pull the rest through magic Provides +Requires: kiwi-systemdeps-core = %{version}-%{release} +%if ! 0%{?el7} +# Retain default expectation for local installations +Recommends: kiwi-systemdeps = %{version}-%{release} +%endif +Requires: python3-setuptools +BuildArch: noarch +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +Python 3 library of the KIWI Image System. Provides an operating system +image builder for Linux supported hardware platforms as well as for +virtualization and cloud systems like Xen, KVM, VMware, EC2 and more. + +%package tools +Summary: KIWI - Collection of Boot Helper Tools + +%description tools +This package contains a small set of helper tools used for the +kiwi created initial ramdisk which is used to control the very +first boot of an appliance. The tools are not meant to be used +outside of the scope of kiwi appliance building. + +%ifarch %{ix86} x86_64 +%package pxeboot +Summary: KIWI - PXE boot structure +Requires: syslinux +Requires: tftp-server + +%description pxeboot +This package contains the basic PXE directory structure which is +needed to serve kiwi built images via PXE. +%endif + +%package -n dracut-kiwi-lib +Summary: KIWI - Dracut kiwi Library +Requires: bc +# btrfs-progs is not available on RHEL 8+ +%if ! (0%{?rhel} >= 8) +Requires: btrfs-progs +%endif +Requires: coreutils +Requires: cryptsetup +Requires: curl +Requires: device-mapper +Requires: dialog +Requires: dracut +Requires: e2fsprogs +Requires: gdisk +Requires: grep +Requires: kpartx +Requires: lvm2 +Requires: mdadm +Requires: parted +Requires: pv +Requires: util-linux +Requires: xfsprogs +Requires: xz +BuildArch: noarch + +%description -n dracut-kiwi-lib +This package contains a collection of methods to provide a library +for tasks done in other kiwi dracut modules + +%package -n dracut-kiwi-oem-repart +Summary: KIWI - Dracut module for oem(repart) image type +Requires: dracut-kiwi-lib = %{version}-%{release} +BuildArch: noarch + +%description -n dracut-kiwi-oem-repart +This package contains the kiwi-repart dracut module which is +used to repartition the oem disk image to the current disk +geometry according to the setup in the kiwi image configuration + +%package -n dracut-kiwi-oem-dump +Summary: KIWI - Dracut module for oem(install) image type +Requires: dracut-kiwi-lib = %{version}-%{release} +Requires: gawk +Requires: kexec-tools +BuildArch: noarch + +%description -n dracut-kiwi-oem-dump +This package contains the kiwi-dump and kiwi-dump-reboot dracut +modules which is used to install an oem image onto a target disk. +It implements a simple installer which allows for user selected +target disk or unattended installation to target. The source of +the image to install could be either from media(CD/DVD/USB) or +from remote. + +%package -n dracut-kiwi-live +Summary: KIWI - Dracut module for iso(live) image type +Requires: dracut-kiwi-lib = %{version}-%{release} +Requires: dracut-network +Requires: device-mapper +Requires: dialog +Requires: dracut +Requires: e2fsprogs +Requires: util-linux +Requires: xfsprogs +Requires: parted +BuildArch: noarch + +%description -n dracut-kiwi-live +This package contains the kiwi-live dracut module which is used +for booting iso(live) images built with KIWI. + +%package -n dracut-kiwi-overlay +Summary: KIWI - Dracut module for vmx(+overlay) image type +Requires: dracut-kiwi-lib = %{version}-%{release} +Requires: dracut +Requires: util-linux +BuildArch: noarch + +%description -n dracut-kiwi-overlay +This package contains the kiwi-overlay dracut module which is used +for booting vmx images built with KIWI and configured to use an +overlay root filesystem. + +%package -n dracut-kiwi-verity +Summary: KIWI - Dracut module for disk with embedded verity metadata +Requires: dracut-kiwi-lib = %{version}-%{release} +Requires: dracut + +%description -n dracut-kiwi-verity +This package contains the kiwi-verity dracut module which is used +for booting oem images built with KIWI and configured to use an +embedded verity metadata block via the embed_verity_metadata +type attribute. + +%package cli +Summary: Flexible operating system appliance image builder +Provides: kiwi-schema = 7.6 +# So we can reference it by the source package name while permitting this to be noarch +Provides: %{name} = %{version}-%{release} +Requires: python3-%{name} = %{version}-%{release} +Requires: bash-completion +BuildArch: noarch + +%description cli %{desc} + + +%prep +%autosetup -p1 + +# Drop shebang for kiwi/xml_parse.py, as we don't intend to use it as an independent script +sed -e "s|#!/usr/bin/env python||" -i kiwi/xml_parse.py + +%build +# Because there are some compiled stuff +%set_build_flags + +%py3_build + +# Build man pages +make -C doc man + +# Build C-Tools +make CFLAGS="%{build_cflags}" tools + +%install +%py3_install + +# Install C-Tools, man-pages, completion and kiwi default configuration (yes, the slash is needed!) +make buildroot=%{buildroot}/ install + +# Install dracut modules (yes, the slash is needed!) +make buildroot=%{buildroot}/ install_dracut + +# Get rid of unnecessary doc files +rm -rf %{buildroot}%{_docdir}/packages + +# Rename unversioned binaries +mv %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi-ng-3 +mv %{buildroot}%{_bindir}/kiwicompat %{buildroot}%{_bindir}/kiwicompat-3 + +# Create symlinks for correct binaries +ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi +ln -sr %{buildroot}%{_bindir}/kiwi-ng-3 %{buildroot}%{_bindir}/kiwi-ng +ln -sr %{buildroot}%{_bindir}/kiwicompat-3 %{buildroot}%{_bindir}/kiwicompat + +# kiwi pxeboot directory structure to be packed in kiwi-pxeboot +%ifarch %{ix86} x86_64 +for i in KIWI pxelinux.cfg image upload boot; do \ + mkdir -p %{buildroot}%{_sharedstatedir}/tftpboot/$i ;\ +done +%fdupes %{buildroot}%{_sharedstatedir}/tftpboot +%endif + +%files -n python3-%{name} +%license LICENSE +%{_bindir}/kiwi-ng-3* +%{_bindir}/kiwicompat-3* +%{python3_sitelib}/kiwi*/ + +%files tools +%license LICENSE +%{_bindir}/dcounter +%{_bindir}/isconsole +%{_bindir}/utimer + +%files cli +%{_bindir}/kiwi +%{_bindir}/kiwi-ng +%{_bindir}/kiwicompat +%{_datadir}/bash-completion/completions/kiwi-ng +%{_mandir}/man8/kiwi* +%config(noreplace) %{_sysconfdir}/kiwi.yml + +%ifarch %{ix86} x86_64 +%files pxeboot +%license LICENSE +%{_sharedstatedir}/tftpboot/* +%endif + +%files -n dracut-kiwi-lib +%license LICENSE +%{_prefix}/lib/dracut/modules.d/99kiwi-lib/ + +%files -n dracut-kiwi-oem-repart +%license LICENSE +%{_prefix}/lib/dracut/modules.d/90kiwi-repart/ + +%files -n dracut-kiwi-oem-dump +%license LICENSE +%{_prefix}/lib/dracut/modules.d/90kiwi-dump/ +%{_prefix}/lib/dracut/modules.d/99kiwi-dump-reboot/ + +%files -n dracut-kiwi-live +%license LICENSE +%{_prefix}/lib/dracut/modules.d/90kiwi-live/ + +%files -n dracut-kiwi-overlay +%license LICENSE +%{_prefix}/lib/dracut/modules.d/90kiwi-overlay/ + +%files -n dracut-kiwi-verity +%{_usr}/lib/dracut/modules.d/80kiwi-verity +%{_bindir}/kiwi-parse-verity + +%files systemdeps-core +# Empty metapackage + +%files systemdeps-bootloaders +# Empty metapackage + +%ifnarch ppc64 %{ix86} +%files systemdeps-containers +# Empty metapackage +%endif + +%files systemdeps-iso-media +# Empty metapackage + +%files systemdeps-filesystems +# Empty metapackage + +%files systemdeps-disk-images +# Empty metapackage + +%files systemdeps-image-validation +# Empty metapackage + +%files systemdeps +# Empty metapackage + +%changelog +* Thu Mar 12 2026 Neal Gompa - 9.25.22-1 +- Update to 9.25.22 +- Backport fix for SELinux in live ISOs + +* Fri Sep 12 2025 Steve Traylen - 9.25.21-3 +- Backport fix for disabling os-prober + +* Fri Dec 29 2023 Neal Gompa - 9.25.21-2 +- Backport fix for detecting setfiles properly + +* Tue Dec 19 2023 Neal Gompa - 9.25.21-1 +- Update to 9.25.21 (RH#2244597) + +* Mon Oct 16 2023 Neal Gompa - 9.25.16-1 +- Update to 9.25.16 (RH#2242745) + +* Thu Aug 24 2023 Neal Gompa - 9.25.13-1 +- Update to 9.25.13 (RH#2234381) + +* Wed Aug 09 2023 Neal Gompa - 9.25.12-1 +- Update to 9.25.12 (RH#2227909) + +* Mon Jul 31 2023 Neal Gompa - 9.25.7-2 +- Add patches to fix building man pages from source + +* Mon Jul 31 2023 Neal Gompa - 9.25.7-1 +- Update to 9.25.7 (RH#2227830) + +* Mon Jul 31 2023 Neal Gompa - 9.25.6-1 +- Update to 9.25.6 (RH#2227830) + +* Thu Jul 20 2023 Fedora Release Engineering - 9.25.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 14 2023 Neal Gompa - 9.25.5-1 +- Rebase to 9.25.5 (RH#2195943) + +* Thu Jun 29 2023 Python Maint - 9.24.59-2 +- Rebuilt for Python 3.12 + +* Sat May 06 2023 Igor Raits - 9.24.59-1 +- Update to 9.24.59 + +* Thu Jan 19 2023 Fedora Release Engineering - 9.24.52-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Dec 01 2022 Neal Gompa - 9.24.52-1 +- Update to 9.24.52 (RH#2149347) + +* Tue Nov 29 2022 Neal Gompa - 9.24.50-1 +- Update to 9.24.50 (RH#2137048) +- Drop patch included in this release + +* Sat Oct 22 2022 Igor Raits - 9.24.48-2 +- Backport patch for being able to build OCI containers in Mock (nspawn) + +* Wed Sep 14 2022 Neal Gompa - 9.24.48-1 +- Update to 9.24.48 (RH#2106248) + +* Thu Jul 21 2022 Fedora Release Engineering - 9.24.44-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jun 24 2022 Neal Gompa - 9.24.44-1 +- Update to 9.24.44 (RH#2100806) + +* Tue Jun 14 2022 Neal Gompa - 9.24.43-1 +- Update to 9.24.43 (RH#2097038) + +* Mon Jun 13 2022 Python Maint - 9.24.42-2 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Neal Gompa - 9.24.42-1 +- Update to 9.24.42 (RH#2082967) + +* Sat May 07 2022 Igor Raits - 9.24.34-1 +- Update to 9.24.34 + +* Sun Mar 27 2022 Neal Gompa - 9.24.29-2 +- Drop uboot-tools as a dependency for RHEL for now + +* Sun Mar 27 2022 Neal Gompa - 9.24.29-1 +- Update to 9.24.29 (RH#2058900) +- Backport fix to allow Btrfs and XFS for boot partitions + +* Tue Feb 22 2022 Neal Gompa - 9.24.24-1 +- Update to 9.24.24 (RH#2049000) + +* Sun Jan 30 2022 Neal Gompa - 9.24.20-1 +- Update to 9.24.20 (RH#2048171) + +* Sat Jan 29 2022 Neal Gompa - 9.24.19-2 +- Backport fix for handling xattrs in container image builds + +* Tue Jan 25 2022 Neal Gompa - 9.24.19-1 +- Update to 9.24.19 + +* Tue Jan 25 2022 Neal Gompa - 9.24.18-2 +- Add proposed patch to ensure SELinux policies are correctly applied + +* Mon Jan 24 2022 Neal Gompa - 9.24.18-1 +- Update to 9.24.18 (RH#2040932) + +* Thu Jan 20 2022 Fedora Release Engineering - 9.24.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jan 11 2022 Neal Gompa - 9.24.16-1 +- Update to 9.24.16 (RH#2039206) + +* Tue Jan 04 2022 Neal Gompa - 9.24.15-3 +- Rework conditionals for grub2-efi packages + + Drop grub2-efi-ia32 dependencies for RHEL for now (RH#1997734) + + Convert Fedora conditionals to "not RHEL" conditionals + +* Sun Jan 02 2022 Neal Gompa - 9.24.15-2 +- Add missing util-linux dependency for Koji build environments +- Add missing dracut-network dependency for dracut-kiwi-live package + +* Tue Dec 21 2021 Neal Gompa - 9.24.15-1 +- Update to 9.24.15 (RH#2029340) + +* Mon Nov 29 2021 Neal Gompa - 9.24.13-1 +- Update to 9.24.13 (RH#2027379) + +* Sat Nov 27 2021 Neal Gompa - 9.24.12-1 +- Update to 9.24.12 (RH#2025734) +- Add Recommends for various keyring packages + +* Mon Nov 22 2021 Neal Gompa - 9.24.8-1 +- Update to 9.24.8 (RH#2025641) + +* Tue Nov 16 2021 Neal Gompa - 9.24.7-1 +- Update to 9.24.7 (RH#2022404) + +* Thu Nov 04 2021 Neal Gompa - 9.24.3-1 +- Update to 9.24.3 (RH#2014436) + +* Thu Oct 07 2021 Neal Gompa - 9.24.0-1 +- Rebase to 9.24.0 (RH#1991954) + +* Tue Aug 03 2021 Neal Gompa - 9.23.49-1 +- Update to 9.23.49 (RH#1977396) +- Drop backports included in this release + +* Thu Jul 22 2021 Fedora Release Engineering - 9.23.39-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 29 2021 Neal Gompa - 9.23.39-2 +- Backport fixes from upstream + + Fix building images using newer dracut + + Stop using /tmp for large temporary files + +* Mon Jun 21 2021 Neal Gompa - 9.23.39-1 +- Update to 9.23.39 (RH#1968128) + +* Fri Jun 04 2021 Python Maint - 9.23.34-2 +- Rebuilt for Python 3.10 + +* Mon May 24 2021 Neal Gompa - 9.23.34-1 +- Update to 9.23.34 (RH#1963158) +- Enable support for creating WSL images + +* Fri May 21 2021 Neal Gompa - 9.23.32-1 +- Update to 9.23.32 (RH#1946214) + +* Mon Mar 29 2021 Neal Gompa - 9.23.22-1 +- Update to 9.23.22 (RH#1941503) + +* Wed Mar 17 2021 Neal Gompa - 9.23.20-3 +- Update kiwi-schema provides to match the current schema version +- Sync systemdeps dependencies from upstream + +* Wed Mar 10 2021 Neal Gompa - 9.23.20-2 +- Remove grub2-tools-efi dependency on aarch64 as it's not built there + +* Mon Mar 08 2021 Neal Gompa - 9.23.20-1 +- Update to 9.23.20 (RH#1904111) +- Sync systemdeps subpackage structure from upstream for OBS compatibility + +* Tue Jan 26 2021 Fedora Release Engineering - 9.21.26-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Fri Nov 20 2020 Neal Gompa - 9.21.26-2 +- Add weak dependency for pacman to enable Arch image builds + +* Fri Nov 20 2020 Neal Gompa - 9.21.26-1 +- Upgrade to 9.21.26 (RH#1876191) + +* Sat Aug 15 2020 Neal Gompa - 9.21.7-1 +- Upgrade to 9.21.7 (RH#1820679) + +* Tue Jul 28 2020 Fedora Release Engineering - 9.21.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun Jul 12 2020 Neal Gompa - 9.21.5-1 +- Upgrade to 9.21.5 (RH#1820679) + +* Tue May 26 2020 Miro Hrončok - 9.20.5-2 +- Rebuilt for Python 3.9 + +* Fri Mar 27 2020 Neal Gompa - 9.20.5-1 +- Upgrade to 9.20.5 (RH#1798896) +- Fix installation of dracut modules on RHEL 8 + +* Wed Feb 05 2020 Neal Gompa - 9.19.15-1 +- Upgrade to 9.19.15 (RH#1779818) + +* Wed Jan 29 2020 Fedora Release Engineering - 9.19.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Dec 02 2019 Neal Gompa - 9.19.5-1 +- Upgrade to 9.19.5 (RH#1772452) + +* Mon Nov 11 2019 Neal Gompa - 9.18.31-1 +- Upgrade to 9.18.31 (RH#1755472) +- Rebase patch to use buildah by default for OCI image builds + +* Sat Sep 21 2019 Neal Gompa - 9.18.17-1 +- Upgrade to 9.18.17 (RH#1742734) + +* Mon Aug 19 2019 Miro Hrončok - 9.18.9-2 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Neal Gompa - 9.18.9-1 +- Upgrade to 9.18.9 + +* Thu Jul 25 2019 Fedora Release Engineering - 9.18.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 22 2019 Neal Gompa - 9.18.6-1 +- Upgrade to 9.18.6 +- Add skopeo as a requirement for container builds + +* Thu Jul 04 2019 Neal Gompa - 9.17.41-1 +- Upgrade to 9.17.41 (RH#1713612) +- Switch to requiring grub2 tools and modules instead of grub2-efi +- Do not require grub2 on s390x +- Drop spec cruft for pre Fedora 29 + +* Mon Apr 22 2019 Neal Gompa - 9.17.38-1 +- Upgrade to 9.17.38 (RH#1698619) + +* Sun Mar 31 2019 Neal Gompa - 9.17.34-2 +- Do not require buildah on x86_32 and ppc64 + +* Sun Mar 31 2019 Neal Gompa - 9.17.34-1 +- Upgrade to 9.17.34 (RH#1688338) +- Patch to use buildah by default instead of umoci for OCI image builds + +* Sun Mar 10 2019 Neal Gompa - 9.17.27-1 +- Upgrade to 9.17.27 (RH#1680084) + +* Sun Feb 17 2019 Neal Gompa - 9.17.19-1 +- Upgrade to 9.17.19 + +* Fri Feb 01 2019 Fedora Release Engineering - 9.16.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sun Aug 26 2018 Neal Gompa - 9.16.12-1 +- Upgrade to 9.16.12 (RH#1591056) + +* Fri Jul 13 2018 Fedora Release Engineering - 9.16.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 9.16.0-2 +- Rebuilt for Python 3.7 + +* Wed Jun 06 2018 Neal Gompa - 9.16.0-1 +- Upgrade to 9.16.0 (RH#1578808) +- Drop Python 2 subpackage for F29+ + +* Wed May 09 2018 Neal Gompa - 9.15.1-1 +- Upgrade to 9.15.1 (RH#1570222) + +* Thu Apr 12 2018 Neal Gompa - 9.14.2-1 +- Upgrade to 9.14.2 (RH#1565110) + +* Sat Mar 24 2018 Neal Gompa - 9.14.0-1 +- Upgrade to 9.14.0 (RH#1560120) + +* Sat Mar 17 2018 Neal Gompa - 9.13.7-2 +- Add Conflicts for flumotion < 0.11.0.1-9 on python2-kiwi + +* Sat Mar 17 2018 Neal Gompa - 9.13.7-1 +- Initial import into Fedora (RH#1483339) + +* Fri Mar 16 2018 Neal Gompa - 9.13.7-0.4 +- Drop useless python shebang in a source file +- Swap python BRs for python2 ones + +* Fri Mar 16 2018 Neal Gompa - 9.13.7-0.3 +- Fix invocations of python_provide macro to work with noarch subpackages +- Add BuildRequires for kiwi-tools + +* Fri Mar 16 2018 Neal Gompa - 9.13.7-0.2 +- More small cleanups +- Reorder Req/Prov declarations + +* Fri Mar 16 2018 Neal Gompa - 9.13.7-0.1 +- Update to 9.13.7 +- Cleanups to packaging per review +- Adapt kiwi-pxeboot to match how tftp-server is packaged + +* Sun Feb 25 2018 Neal Gompa - 9.13.0-0.3 +- Rename source package from python-kiwi to kiwi +- Rename kiwi subpackage to kiwi-cli +- Merge kiwi-man-pages into kiwi-cli + +* Wed Feb 21 2018 Neal Gompa - 9.13.0-0.2 +- Update proposed change based on PR changes + +* Tue Feb 20 2018 Neal Gompa - 9.13.0-0.1 +- Update to 9.13.0 +- Add proposed change to fix yum vs yum-deprecated lookup in chroot + +* Mon Feb 12 2018 Neal Gompa - 9.12.8-0.4 +- Switch to autosetup to actually apply patch + +* Mon Feb 12 2018 Neal Gompa - 9.12.8-0.3 +- Patch to use pyxattr in setuptools data + +* Fri Feb 09 2018 Neal Gompa - 9.12.8-0.2 +- Fix broken dependency on pyxattr + +* Thu Feb 08 2018 Neal Gompa - 9.12.8-0.1 +- Update to 9.12.8 + +* Mon Jan 15 2018 Neal Gompa - 9.11.30-0.1 +- Update to 9.11.30 + +* Thu Dec 21 2017 Neal Gompa - 9.11.19-0.1 +- Update to 9.11.19 + +* Wed Sep 06 2017 Neal Gompa - 9.10.7-0.1 +- Update to 9.10.7 + +* Wed Aug 23 2017 Neal Gompa - 9.10.6-0.1 +- Update to 9.10.6 +- Address review feedback + +* Sun Aug 20 2017 Neal Gompa - 9.10.4-0.1 +- Initial packaging +