SHA256
1
0
forked from pool/python-kiwi
python-kiwi/python-kiwi.spec

759 lines
23 KiB
RPMSpec
Raw Normal View History

#
# spec file for package kiwi
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via:
#
# https://github.com/OSInside/kiwi/issues
#
# If they aren't provided by a system installed macro, define them
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc}
%{!?__python3: %global __python3 /usr/bin/python3}
%if %{undefined python3_sitelib}
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%endif
%if 0%{?el7}
%global python3_pkgversion 36
%else
%{!?python3_pkgversion:%global python3_pkgversion 3}
%endif
%if 0%{?debian} || 0%{?ubuntu}
%global is_deb 1
%global pygroup python
%global sysgroup admin
%global develsuffix dev
%else
%global pygroup Development/Languages/Python
%global sysgroup System/Management
%global develsuffix devel
%endif
Name: python-kiwi
Version: 9.25.19
Provides: kiwi-schema = 7.5
Release: 0
Url: https://github.com/OSInside/kiwi
Summary: KIWI - Appliance Builder Next Generation
License: GPL-3.0-or-later
%if "%{_vendor}" == "debbuild"
# Needed to set Maintainer in output debs
Packager: Marcus Schaefer <marcus.schaefer@suse.com>
%endif
Group: %{pygroup}
Source: %{name}.tar.gz
Source1: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
- Bump version: 9.17.30 → 9.17.31 - Update the documentation regarding vagrant boxes Extend the documentation on how to build VirtualBox vagrant boxes All this was done by Dan Čermák <dcermak@suse.com> - Refactor incremental changelog update The creation of the package changelog is based on a reference file. However that reference file contained log information in a specific timezone which requires to hardcode the region of that timezone in the code to correctly run date/time calculations. This can be done better from a conceptual point of view. This patch changes the handling in a way that the reference file is a git log excerpt including the dates as git log lists them. The dates contains complete numeric time/date/zone information and can be used for calculations. The changelog helper tool converts the result data to match the requirements of rpm changelog files and prints the time/date information localized to the callers timezone or as UTC if the --utc switch is given. By default the user local timezone settings applies. That way the setup of the local timezone is immaterial to the changelog processor and the workaround in the gitlab-ci rpm stage can be deleted too. - Fix derived docker images build This commit fixes the derived docker images when the base image is a compressed file. After the refactor in #998 the decompression of the base image and the skopeo call to import the decompressed image happened in absolutely independent scopes. NamedTemporaryFile python class by default deletes the created temporary file when the class instance is OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=136
2019-03-17 20:23:53 +01:00
BuildRequires: gcc
BuildRequires: python%{python3_pkgversion}-%{develsuffix} >= 3.6
BuildRequires: python%{python3_pkgversion}-setuptools
%if 0%{?fedora} || 0%{?suse_version}
BuildRequires: fdupes
%endif
%if 0%{?suse_version}
BuildRequires: shadow
%endif
%if 0%{?debian} || 0%{?ubuntu}
BuildRequires: passwd
%endif
%description
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 -n kiwi-systemdeps-core
Summary: KIWI - Core host system dependencies
Group: %{sysgroup}
Provides: kiwi-image-tbz-requires = %{version}-%{release}
Obsoletes: kiwi-image-tbz-requires < %{version}-%{release}
%if "%{_vendor}" != "debbuild"
Provides: kiwi-image:tbz
%endif
- Bump version: 9.23.27 → 9.23.28 - Upgrade tests accoring to #1805 This commit is a follow up of #1805 which missed to update the related unit test. - Make installation media unattended This commit configures install media of several tests to run unattended installation. This is done to facilitate the logic of functional tests. - Fixed unit tests for parallel invocation With the change to allow the platform architecture to be set application global, the unit tests might fail if tests run in parallel and using different mock architectures for the test. Thus test that runs depending on a platform name needs to set the name in the test - Update Debian integration test for UEFI testing Updated the Virtual disk profile to make use of the EFI secure boot feature. - Fix WSL appx filemap relative paths not preserved During WSL appx image type creation step the file hierarchy under metadata_path is written to a temporary file for eventual use as argument to utility appx. The file hierarchy information is dropped resulting in all filemap entries appearing to be at the metadata_path root. The resulting image will side load and run but without icon and other resources. Stricter checks at Windows Store submission will fail due to mismatch between image manifest and contents. Fix by preserving relative path of filemap entries relative to metadata_path. Add log output showing both input absolute path and output relative path. OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
2021-05-06 14:11:32 +02:00
# tools conditionally used by kiwi
%if 0%{?fedora} || 0%{?rhel} >= 8
Recommends: gnupg2
- Bump version: 9.23.27 → 9.23.28 - Upgrade tests accoring to #1805 This commit is a follow up of #1805 which missed to update the related unit test. - Make installation media unattended This commit configures install media of several tests to run unattended installation. This is done to facilitate the logic of functional tests. - Fixed unit tests for parallel invocation With the change to allow the platform architecture to be set application global, the unit tests might fail if tests run in parallel and using different mock architectures for the test. Thus test that runs depending on a platform name needs to set the name in the test - Update Debian integration test for UEFI testing Updated the Virtual disk profile to make use of the EFI secure boot feature. - Fix WSL appx filemap relative paths not preserved During WSL appx image type creation step the file hierarchy under metadata_path is written to a temporary file for eventual use as argument to utility appx. The file hierarchy information is dropped resulting in all filemap entries appearing to be at the metadata_path root. The resulting image will side load and run but without icon and other resources. Stricter checks at Windows Store submission will fail due to mismatch between image manifest and contents. Fix by preserving relative path of filemap entries relative to metadata_path. Add log output showing both input absolute path and output relative path. OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
2021-05-06 14:11:32 +02:00
Recommends: debootstrap
Recommends: dpkg
%endif
- Bump version: 9.17.30 → 9.17.31 - Update the documentation regarding vagrant boxes Extend the documentation on how to build VirtualBox vagrant boxes All this was done by Dan Čermák <dcermak@suse.com> - Refactor incremental changelog update The creation of the package changelog is based on a reference file. However that reference file contained log information in a specific timezone which requires to hardcode the region of that timezone in the code to correctly run date/time calculations. This can be done better from a conceptual point of view. This patch changes the handling in a way that the reference file is a git log excerpt including the dates as git log lists them. The dates contains complete numeric time/date/zone information and can be used for calculations. The changelog helper tool converts the result data to match the requirements of rpm changelog files and prints the time/date information localized to the callers timezone or as UTC if the --utc switch is given. By default the user local timezone settings applies. That way the setup of the local timezone is immaterial to the changelog processor and the workaround in the gitlab-ci rpm stage can be deleted too. - Fix derived docker images build This commit fixes the derived docker images when the base image is a compressed file. After the refactor in #998 the decompression of the base image and the skopeo call to import the decompressed image happened in absolutely independent scopes. NamedTemporaryFile python class by default deletes the created temporary file when the class instance is OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=136
2019-03-17 20:23:53 +01:00
%if 0%{?suse_version}
Recommends: gpg2
- Bump version: 9.23.27 → 9.23.28 - Upgrade tests accoring to #1805 This commit is a follow up of #1805 which missed to update the related unit test. - Make installation media unattended This commit configures install media of several tests to run unattended installation. This is done to facilitate the logic of functional tests. - Fixed unit tests for parallel invocation With the change to allow the platform architecture to be set application global, the unit tests might fail if tests run in parallel and using different mock architectures for the test. Thus test that runs depending on a platform name needs to set the name in the test - Update Debian integration test for UEFI testing Updated the Virtual disk profile to make use of the EFI secure boot feature. - Fix WSL appx filemap relative paths not preserved During WSL appx image type creation step the file hierarchy under metadata_path is written to a temporary file for eventual use as argument to utility appx. The file hierarchy information is dropped resulting in all filemap entries appearing to be at the metadata_path root. The resulting image will side load and run but without icon and other resources. Stricter checks at Windows Store submission will fail due to mismatch between image manifest and contents. Fix by preserving relative path of filemap entries relative to metadata_path. Add log output showing both input absolute path and output relative path. OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
2021-05-06 14:11:32 +02:00
Recommends: debootstrap
Recommends: dpkg
%if 0%{?suse_version} >= 1650
Recommends: dnf
%endif
%endif
- Bump version: 9.23.27 → 9.23.28 - Upgrade tests accoring to #1805 This commit is a follow up of #1805 which missed to update the related unit test. - Make installation media unattended This commit configures install media of several tests to run unattended installation. This is done to facilitate the logic of functional tests. - Fixed unit tests for parallel invocation With the change to allow the platform architecture to be set application global, the unit tests might fail if tests run in parallel and using different mock architectures for the test. Thus test that runs depending on a platform name needs to set the name in the test - Update Debian integration test for UEFI testing Updated the Virtual disk profile to make use of the EFI secure boot feature. - Fix WSL appx filemap relative paths not preserved During WSL appx image type creation step the file hierarchy under metadata_path is written to a temporary file for eventual use as argument to utility appx. The file hierarchy information is dropped resulting in all filemap entries appearing to be at the metadata_path root. The resulting image will side load and run but without icon and other resources. Stricter checks at Windows Store submission will fail due to mismatch between image manifest and contents. Fix by preserving relative path of filemap entries relative to metadata_path. Add log output showing both input absolute path and output relative path. OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
2021-05-06 14:11:32 +02:00
# package managers required by distro
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?suse_version} >= 1650
Provides: kiwi-packagemanager:microdnf
Requires: microdnf
%endif
%if 0%{?fedora} >= 41
Requires: dnf5
Requires: dnf5-plugins
Provides: kiwi-packagemanager:dnf5
%else
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} >= 1650
- Bump version: 9.21.26 → 9.22.0 - Omit multipath module by default The plain installation of the multipath toolkit activates the dracut multipath code. The setup if the target image runs in a multipath environment or not should however be decided explicitly in the image description via <oem-multipath-scan> and not implicitly by the presence of tools - Fixed multipath disk device assignment in kiwi lib The former lookup of the multipath mapped disk device contained a race condition. If the lookup of the device mapper files happened before multipathd has finished the initialization, kiwi continues with the unix node name and fails when the device mapper keeps a busy state on it. This commit changes the code such that in case of an explicit request to use multipath the lookup of the mapped device becomes a mandatory process that runs until the DEVICE_TIMEOUT is reached. Default timeout is set to 60 sec. This references Issue SUSE-Enceladus/azure-li-services#255 - Fixed PackageManager decorator in unit test Implement patch decorators for factories consistently - Refactor Repository This commit refactors the Repository class and turns it into a proper factory class and also includes type hints to facilitate it's use from an API POV. Related to #1498 - Add DNF as a proper dependency for openSUSE This is required so that OBS can build openSUSE containers and appliances OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=189
2020-12-04 08:57:28 +01:00
Requires: dnf
Provides: kiwi-packagemanager:dnf
Provides: kiwi-packagemanager:dnf4
- Bump version: 9.21.26 → 9.22.0 - Omit multipath module by default The plain installation of the multipath toolkit activates the dracut multipath code. The setup if the target image runs in a multipath environment or not should however be decided explicitly in the image description via <oem-multipath-scan> and not implicitly by the presence of tools - Fixed multipath disk device assignment in kiwi lib The former lookup of the multipath mapped disk device contained a race condition. If the lookup of the device mapper files happened before multipathd has finished the initialization, kiwi continues with the unix node name and fails when the device mapper keeps a busy state on it. This commit changes the code such that in case of an explicit request to use multipath the lookup of the mapped device becomes a mandatory process that runs until the DEVICE_TIMEOUT is reached. Default timeout is set to 60 sec. This references Issue SUSE-Enceladus/azure-li-services#255 - Fixed PackageManager decorator in unit test Implement patch decorators for factories consistently - Refactor Repository This commit refactors the Repository class and turns it into a proper factory class and also includes type hints to facilitate it's use from an API POV. Related to #1498 - Add DNF as a proper dependency for openSUSE This is required so that OBS can build openSUSE containers and appliances OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=189
2020-12-04 08:57:28 +01:00
Provides: kiwi-packagemanager:yum
%endif
%endif
%if 0%{?fedora} >= 26 || 0%{?suse_version}
Requires: zypper
Provides: kiwi-packagemanager:zypper
%endif
%if 0%{?debian} || 0%{?ubuntu}
Requires: debootstrap
- Bump version: 9.23.27 → 9.23.28 - Upgrade tests accoring to #1805 This commit is a follow up of #1805 which missed to update the related unit test. - Make installation media unattended This commit configures install media of several tests to run unattended installation. This is done to facilitate the logic of functional tests. - Fixed unit tests for parallel invocation With the change to allow the platform architecture to be set application global, the unit tests might fail if tests run in parallel and using different mock architectures for the test. Thus test that runs depending on a platform name needs to set the name in the test - Update Debian integration test for UEFI testing Updated the Virtual disk profile to make use of the EFI secure boot feature. - Fix WSL appx filemap relative paths not preserved During WSL appx image type creation step the file hierarchy under metadata_path is written to a temporary file for eventual use as argument to utility appx. The file hierarchy information is dropped resulting in all filemap entries appearing to be at the metadata_path root. The resulting image will side load and run but without icon and other resources. Stricter checks at Windows Store submission will fail due to mismatch between image manifest and contents. Fix by preserving relative path of filemap entries relative to metadata_path. Add log output showing both input absolute path and output relative path. OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
2021-05-06 14:11:32 +02:00
Requires: dpkg
Requires: gnupg
%endif
- Bump version: 9.23.27 → 9.23.28 - Upgrade tests accoring to #1805 This commit is a follow up of #1805 which missed to update the related unit test. - Make installation media unattended This commit configures install media of several tests to run unattended installation. This is done to facilitate the logic of functional tests. - Fixed unit tests for parallel invocation With the change to allow the platform architecture to be set application global, the unit tests might fail if tests run in parallel and using different mock architectures for the test. Thus test that runs depending on a platform name needs to set the name in the test - Update Debian integration test for UEFI testing Updated the Virtual disk profile to make use of the EFI secure boot feature. - Fix WSL appx filemap relative paths not preserved During WSL appx image type creation step the file hierarchy under metadata_path is written to a temporary file for eventual use as argument to utility appx. The file hierarchy information is dropped resulting in all filemap entries appearing to be at the metadata_path root. The resulting image will side load and run but without icon and other resources. Stricter checks at Windows Store submission will fail due to mismatch between image manifest and contents. Fix by preserving relative path of filemap entries relative to metadata_path. Add log output showing both input absolute path and output relative path. OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
2021-05-06 14:11:32 +02:00
# tools required by kiwi
Requires: kiwi-tools
Requires: mtools
Requires: rsync
Requires: tar >= 1.2.7
Requires: cpio
- Bump version: 9.24.5 → 9.24.6 - Followup fix for debootstrap called only once A recent change skipped calling debootstrap if the allow-existing-root flag was passed in combination with apt as the package manager. However this is not enough. If you say allow-existing-root but the existing root is empty or not valid to continue with chroot and apt the debootstrap phase should not be skipped. This commit checks if apt works in the chroot such that we can assume debootstrap has done its job and can be skipped - Bump version: 9.24.4 → 9.24.5 - Fixed include processing This commit fixes several issue connected with the use of the <include> directive: First and foremost the XSLT chain was broken in a way that the include XSLT in combination with the PrettyPrinter XSLT were called not in the chain of stylesheets but together. This results in XML descriptions which duplicated the content and went invalid Another change is, when the include XSLT is called in the chain. This commit moves it to become the very first processing instruction such that the included data is part of all subsequent XSLT stylesheets. This also allows to use older schema versions in included XML data and they get automatically converted through the chain of XSLT stylesheets. Last change is the evaluation of the from= attribute value. This value is now interpreted as an URI. Currently only local URIs are supported. The reason to do this is because XSLT when processing OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=208
2021-11-12 23:13:20 +01:00
Requires: lsof
Requires: openssl
%description -n kiwi-systemdeps-core
This metapackage installs the necessary system dependencies
to run KIWI.
%package -n kiwi-systemdeps-containers
Summary: KIWI - host requirements for OCI container images
Group: %{sysgroup}
Provides: kiwi-image-docker-requires = %{version}-%{release}
Obsoletes: kiwi-image-docker-requires < %{version}-%{release}
%if "%{_vendor}" != "debbuild"
Provides: kiwi-image:docker
%endif
%if 0%{?suse_version}
Requires: umoci
%else
Requires: buildah
%endif
Requires: skopeo
%description -n kiwi-systemdeps-containers
Host setup helper to pull in all packages required/useful on
the build host to build OCI container images
%package -n kiwi-systemdeps-containers-wsl
Summary: KIWI - host requirements for WSL container images
Group: %{sysgroup}
Provides: kiwi-image-wsl-requires = %{version}-%{release}
Obsoletes: kiwi-image-wsl-requires < %{version}-%{release}
%if "%{_vendor}" != "debbuild"
Provides: kiwi-image:appx
%endif
%if 0%{?suse_version}
Requires: fb-util-for-appx
%endif
%if 0%{?fedora} || 0%{?rhel}
Requires: appx-util
%endif
%description -n kiwi-systemdeps-containers-wsl
Host setup helper to pull in all packages required/useful on
the build host to build WSL container images
%package -n kiwi-systemdeps-iso-media
Summary: KIWI - host requirements for live and install iso images
Group: %{sysgroup}
Provides: kiwi-image-iso-requires = %{version}-%{release}
Obsoletes: kiwi-image-iso-requires < %{version}-%{release}
%if "%{_vendor}" != "debbuild"
Provides: kiwi-image:iso
%endif
%if 0%{?suse_version}
Requires: checkmedia
%endif
Requires: xorriso
%ifarch %{ix86} x86_64
Requires: syslinux
%endif
Requires: kiwi-systemdeps-core = %{version}-%{release}
Requires: kiwi-systemdeps-filesystems = %{version}-%{release}
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release}
%description -n kiwi-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 -n kiwi-systemdeps-bootloaders
Summary: KIWI - host requirements for configuring bootloaders
%if 0%{?suse_version}
%ifarch x86_64
Requires: grub2-x86_64-efi
%endif
%ifarch %{ix86} x86_64
Recommends: gfxboot
%endif
%endif
%if 0%{?fedora} || 0%{?rhel}
%ifarch x86_64
Requires: grub2-efi-x64
%endif
%endif
%if ! (0%{?debian} || 0%{?ubuntu})
Requires: grub2
%endif
%ifarch %arm aarch64
%if 0%{?fedora} || 0%{?rhel}
Requires: uboot-tools
%endif
%if 0%{?suse_version}
Requires: u-boot-tools
%endif
%endif
%ifarch s390 s390x
Requires: s390-tools
%endif
Requires: kiwi-systemdeps-core = %{version}-%{release}
%description -n kiwi-systemdeps-bootloaders
Host setup helper to pull in all packages required/useful on
the build host for configuring bootloaders on images.
%package -n kiwi-systemdeps-filesystems
Summary: KIWI - host requirements for filesystems
Group: %{sysgroup}
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}
%if "%{_vendor}" != "debbuild"
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
%endif
Requires: dosfstools
Requires: e2fsprogs
Requires: xfsprogs
%if 0%{?suse_version}
Requires: btrfsprogs
%else
%if ! (0%{?rhel} >= 8)
Requires: btrfs-progs
%endif
%endif
%if 0%{?suse_version}
Requires: squashfs
%else
Requires: squashfs-tools
%endif
%if "%{_vendor}" == "debbuild"
Requires: qemu-utils
%else
%if 0%{?suse_version}
Requires: qemu-tools
%else
Requires: qemu-img
%endif
%endif
Requires: kiwi-systemdeps-core = %{version}-%{release}
%description -n kiwi-systemdeps-filesystems
Host setup helper to pull in all packages required/useful on
the build host to build filesystem images
%package -n kiwi-systemdeps-disk-images
Summary: KIWI - host requirements for disk images
Group: %{sysgroup}
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}
%if "%{_vendor}" != "debbuild"
Provides: kiwi-image:oem
Provides: kiwi-image:vmx
%endif
Requires: kiwi-systemdeps-filesystems = %{version}-%{release}
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release}
Requires: kiwi-systemdeps-iso-media = %{version}-%{release}
%if 0%{?suse_version}
Requires: gptfdisk
%else
Requires: gdisk
%endif
Requires: lvm2
Requires: parted
Requires: kpartx
Requires: cryptsetup
Requires: mdadm
Requires: util-linux
# lsblk is part of util-linux-systemd on openSUSE
%if 0%{?suse_version}
Requires: util-linux-systemd
%endif
%description -n kiwi-systemdeps-disk-images
Host setup helper to pull in all packages required/useful on
the build host to build disk images
%package -n kiwi-systemdeps-image-validation
Summary: KIWI - host requirements for handling image descriptions better
Group: %{sysgroup}
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?debian} || 0%{?ubuntu}
Recommends: jing
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?suse_version}
Requires: python%{python3_pkgversion}-solv
%endif
%if ! (0%{?rhel} && 0%{?rhel} < 8)
Recommends: python%{python3_pkgversion}-anymarkup-core
%endif
%description -n kiwi-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 -n kiwi-systemdeps
Summary: KIWI - Host system dependencies
Group: %{sysgroup}
Requires: kiwi-systemdeps-core = %{version}-%{release}
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
# None of the container build tools are available in Debian/Ubuntu
Requires: kiwi-systemdeps-containers = %{version}-%{release}
Requires: kiwi-systemdeps-containers-wsl = %{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%{?fedora} || 0%{?suse_version}
Requires: kiwi-systemdeps-image-validation = %{version}-%{release}
%endif
%description -n kiwi-systemdeps
Host setup helper to pull in all packages required/useful to
leverage all functionality in KIWI.
# python3-kiwi
%package -n python%{python3_pkgversion}-kiwi
Summary: KIWI - Appliance Builder Next Generation
Group: %{pygroup}
Obsoletes: python2-kiwi
Conflicts: python2-kiwi
Conflicts: kiwi-man-pages < %{version}
Requires: screen
Requires: python%{python3_pkgversion} >= 3.6
%if 0%{?ubuntu} || 0%{?debian}
Requires: python%{python3_pkgversion}-yaml
Requires: python%{python3_pkgversion}-typing-extensions
%else
Requires: python%{python3_pkgversion}-PyYAML
%endif
Requires: python%{python3_pkgversion}-simplejson
Requires: python%{python3_pkgversion}-docopt
Requires: python%{python3_pkgversion}-lxml
Requires: python%{python3_pkgversion}-requests
Requires: python%{python3_pkgversion}-setuptools
%if 0%{?rhel} || 0%{?fedora}
Requires: (python%{python3_pkgversion}-typing-extensions if python%{python3_pkgversion} < 3.8)
%endif
%if 0%{?suse_version}
Requires: (python%{python3_pkgversion}-typing_extensions if python%{python3_pkgversion} < 3.8)
%endif
%if ! (0%{?rhel} && 0%{?rhel} < 8)
Recommends: kiwi-man-pages
%endif
%if "%{_vendor}" == "debbuild"
# Avoid issues with not being able to use magic Provides
Requires: kiwi-systemdeps = %{version}-%{release}
%else
# 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
%endif
%description -n python%{python3_pkgversion}-kiwi
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 -n kiwi-tools
Summary: KIWI - Collection of Boot Helper Tools
License: GPL-3.0-or-later
Group: %{sysgroup}
%description -n kiwi-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.
%if "%{_vendor}" != "debbuild"
%ifarch %{ix86} x86_64
%package -n kiwi-pxeboot
Summary: KIWI - PXE boot structure
Requires: syslinux
%if 0%{?fedora} || 0%{?rhel}
Requires(pre): shadow-utils
%else
Requires(pre): shadow
%endif
%if 0%{?suse_version} >= 1550
Requires(pre): user(tftp)
%endif
License: GPL-3.0-or-later
Group: %{sysgroup}
%description -n kiwi-pxeboot
This package contains the basic PXE directory structure which is
needed to serve kiwi built images via PXE.
%endif
%endif
%package -n dracut-kiwi-lib
Summary: KIWI - Dracut kiwi Library
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian}
# Ubuntu 16.04 OBS environments refuse to set up due to
# initramfs-tools / dracut conflict and initramfs-tools is required
# to set up the build environment...
BuildRequires: dracut
%endif
Requires: bc
Requires: cryptsetup
%if 0%{?fedora} || 0%{?rhel} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
%if 0%{?rhel} && 0%{?rhel} < 8
Requires: btrfs-progs
%else
Recommends: btrfs-progs
%endif
Requires: gdisk
Requires: dracut-network
%else
%if 0%{?debian} || 0%{?ubuntu}
Recommends: btrfs-tools
Requires: gdisk
%else
Requires: btrfsprogs
Requires: gptfdisk
%endif
%endif
Requires: coreutils
Requires: e2fsprogs
Requires: grep
Requires: lvm2
Requires: mdadm
Requires: util-linux
# lsblk is part of util-linux-systemd on openSUSE
%if 0%{?suse_version}
Requires: util-linux-systemd
%endif
Requires: xfsprogs
Requires: dialog
Requires: pv
Requires: curl
%if 0%{?debian} || 0%{?ubuntu}
Requires: xz-utils
Requires: dmsetup
%else
Requires: xz
Requires: device-mapper
%endif
%ifarch s390 s390x
Requires: s390-tools
Requires: parted
%endif
License: GPL-3.0-or-later
Group: %{sysgroup}
%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
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian}
# Ubuntu 16.04 OBS environments refuse to set up due to
# initramfs-tools / dracut conflict and initramfs-tools is required
# to set up the build environment...
BuildRequires: dracut
%endif
Requires: dracut-kiwi-lib = %{version}-%{release}
License: GPL-3.0-or-later
Group: %{sysgroup}
%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
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian}
# Ubuntu 16.04 OBS environments refuse to set up due to
# initramfs-tools / dracut conflict and initramfs-tools is required
# to set up the build environment...
BuildRequires: dracut
%endif
Requires: dracut-kiwi-lib = %{version}-%{release}
Requires: kexec-tools
Requires: gawk
Requires: kpartx
License: GPL-3.0-or-later
Group: %{sysgroup}
%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
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian}
# Ubuntu 16.04 OBS environments refuse to set up due to
# initramfs-tools / dracut conflict and initramfs-tools is required
# to set up the build environment...
BuildRequires: dracut
%endif
Requires: dialog
Requires: xfsprogs
Requires: e2fsprogs
Requires: util-linux
# lsblk is part of util-linux-systemd on openSUSE
%if 0%{?suse_version}
Requires: util-linux-systemd
%endif
%if 0%{?debian} || 0%{?ubuntu}
Requires: dmsetup
Requires: dracut-network
%endif
%if 0%{?fedora} || 0%{?rhel}
Requires: device-mapper
Requires: dracut-network
%endif
%if 0%{?suse_version}
Requires: device-mapper
%endif
Requires: dracut
Requires: xorriso
License: GPL-3.0-or-later
Group: %{sysgroup}
%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
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian}
# Ubuntu 16.04 OBS environments refuse to set up due to
# initramfs-tools / dracut conflict and initramfs-tools is required
# to set up the build environment...
BuildRequires: dracut
%endif
Requires: dracut-kiwi-lib = %{version}-%{release}
Requires: dracut
License: GPL-3.0-or-later
Group: %{sysgroup}
%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
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian}
# Ubuntu 16.04 OBS environments refuse to set up due to
# initramfs-tools / dracut conflict and initramfs-tools is required
# to set up the build environment...
BuildRequires: dracut
%endif
Requires: dracut-kiwi-lib = %{version}-%{release}
Requires: dracut
BuildRequires: gcc
License: GPL-3.0-or-later
Group: %{sysgroup}
%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 -n kiwi-man-pages
Summary: KIWI - manual pages
License: GPL-3.0-or-later
Group: %{sysgroup}
%description -n kiwi-man-pages
Provides manual pages to describe the kiwi commands
%prep
%setup -q -n kiwi-%{version}
# 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
# Build C-Tools
make CFLAGS="${RPM_OPT_FLAGS}" tools
%install
# Install Python 3 version
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb}
# Install C-Tools, man-pages, completion and kiwi default configuration
make buildroot=%{buildroot}/ install
# Install dracut modules
make buildroot=%{buildroot}/ install_dracut
# Install documentation in PDF format
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install_package_docs
# Create symlinks for correct binaries
ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi
ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi-ng-3
ln -sr %{buildroot}%{_bindir}/kiwicompat %{buildroot}%{_bindir}/kiwicompat-3
%if "%{_vendor}" != "debbuild"
# 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}/srv/tftpboot/$i ;\
done
%endif
%endif
%if 0%{?fedora} || 0%{?suse_version}
%fdupes %{buildroot}/srv/tftpboot
%endif
%if "%{_vendor}" != "debbuild" && 0%{?suse_version} < 1550
%ifarch %{ix86} x86_64
%pre -n kiwi-pxeboot
#============================================================
# create user and group tftp if they does not exist
if ! /usr/bin/getent group tftp >/dev/null; then
%{_sbindir}/groupadd -r tftp
fi
if ! /usr/bin/getent passwd tftp >/dev/null; then
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \
-r -s /bin/false tftp
fi
%endif
%endif
%files -n kiwi-systemdeps-core
# Empty metapackage
%files -n kiwi-systemdeps-bootloaders
# Empty metapackage
%files -n kiwi-systemdeps-containers
# Empty metapackage
%files -n kiwi-systemdeps-containers-wsl
# Empty metapackage
%files -n kiwi-systemdeps-iso-media
# Empty metapackage
%files -n kiwi-systemdeps-filesystems
# Empty metapackage
%files -n kiwi-systemdeps-disk-images
# Empty metapackage
%files -n kiwi-systemdeps-image-validation
# Empty metapackage
%files -n kiwi-systemdeps
# Empty metapackage
%files -n python%{python3_pkgversion}-kiwi
%dir %{_defaultdocdir}/python-kiwi
%{_bindir}/kiwi
%{_bindir}/kiwi-ng
%{_bindir}/kiwicompat
%{_bindir}/kiwi-ng-3*
%{_bindir}/kiwicompat-3*
%{python3_sitelib}/kiwi*
%{_usr}/share/bash-completion/completions/kiwi-ng
%{_defaultdocdir}/python-kiwi/LICENSE
%{_defaultdocdir}/python-kiwi/README
%files -n kiwi-man-pages
%{_defaultdocdir}/python-kiwi/kiwi.pdf
%config %_sysconfdir/kiwi.yml
%doc %{_mandir}/man8/*
%files -n kiwi-tools
%{_bindir}/dcounter
%{_bindir}/isconsole
%{_bindir}/utimer
%files -n dracut-kiwi-lib
%{_usr}/lib/dracut/modules.d/99kiwi-lib
%files -n dracut-kiwi-oem-repart
%{_usr}/lib/dracut/modules.d/90kiwi-repart
%files -n dracut-kiwi-oem-dump
%{_usr}/lib/dracut/modules.d/90kiwi-dump
%{_usr}/lib/dracut/modules.d/99kiwi-dump-reboot
%files -n dracut-kiwi-live
%{_usr}/lib/dracut/modules.d/90kiwi-live
%files -n dracut-kiwi-overlay
%{_usr}/lib/dracut/modules.d/90kiwi-overlay
%files -n dracut-kiwi-verity
%{_usr}/lib/dracut/modules.d/80kiwi-verity
%{_bindir}/kiwi-parse-verity
%if "%{_vendor}" != "debbuild"
%ifarch %{ix86} x86_64
%files -n kiwi-pxeboot
%if 0%{?suse_version} < 1550
%dir %attr(0755,tftp,tftp) /srv/tftpboot
%endif
%dir /srv/tftpboot/KIWI
%dir /srv/tftpboot/pxelinux.cfg
%dir /srv/tftpboot/image
%dir /srv/tftpboot/upload
%dir /srv/tftpboot/boot
%endif
%endif
%changelog