2017-03-09 10:38:02 +01:00
|
|
|
#
|
2018-03-06 17:09:13 +01:00
|
|
|
# spec file for package kiwi
|
2017-03-09 10:38:02 +01:00
|
|
|
#
|
2018-03-06 17:09:13 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-03-09 10:38:02 +01:00
|
|
|
#
|
|
|
|
# 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.
|
2018-03-06 17:09:13 +01:00
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via:
|
|
|
|
#
|
|
|
|
# https://github.com/SUSE/kiwi/issues
|
2017-03-09 10:38:02 +01:00
|
|
|
#
|
2017-03-16 09:53:42 +01:00
|
|
|
|
2018-03-06 17:09:13 +01:00
|
|
|
# If they aren't provided by a system installed macro, define them
|
2018-02-13 09:43:28 +01:00
|
|
|
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc}
|
|
|
|
%{!?__python2: %global __python2 /usr/bin/python2}
|
2018-12-19 09:48:21 +01:00
|
|
|
%{!?__python3: %global __python3 /usr/bin/python3}
|
2018-02-13 09:43:28 +01:00
|
|
|
|
|
|
|
# Expanded form required for debbuild's simpler engine
|
|
|
|
%if %{undefined python2_sitelib}
|
|
|
|
%global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
|
|
|
%endif
|
2017-03-10 17:13:20 +01:00
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if %{undefined python3_sitelib}
|
|
|
|
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
|
|
|
%endif
|
|
|
|
|
2018-02-13 09:43:28 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
|
|
|
%global is_deb 1
|
|
|
|
%global pygroup python
|
|
|
|
%global sysgroup admin
|
|
|
|
%global develsuffix dev
|
2018-12-19 09:48:21 +01:00
|
|
|
%global update_alternatives %{_bindir}/update-alternatives
|
2018-02-13 09:43:28 +01:00
|
|
|
%else
|
|
|
|
%global pygroup Development/Languages/Python
|
|
|
|
%global sysgroup System/Management
|
|
|
|
%global develsuffix devel
|
2018-12-19 09:48:21 +01:00
|
|
|
%global update_alternatives %{_sbindir}/update-alternatives
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
|
|
|
|
2017-03-09 10:38:02 +01:00
|
|
|
Name: python-kiwi
|
2019-02-27 17:14:47 +01:00
|
|
|
Version: 9.17.23
|
2018-03-06 17:08:59 +01:00
|
|
|
Provides: kiwi-schema = 6.6
|
2018-03-06 17:09:13 +01:00
|
|
|
Release: 0
|
2017-03-09 10:38:02 +01:00
|
|
|
Url: https://github.com/SUSE/kiwi
|
|
|
|
Summary: KIWI - Appliance Builder Next Generation
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-02-13 09:43:28 +01:00
|
|
|
%if %{_vendor} == "debbuild"
|
|
|
|
# Needed to set Maintainer in output debs
|
2018-03-06 17:09:13 +01:00
|
|
|
Packager: Marcus Schaefer <ms@suse.de>
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{pygroup}
|
2017-03-09 10:38:02 +01:00
|
|
|
Source: %{name}.tar.gz
|
2018-02-16 16:26:31 +01:00
|
|
|
Source1: %{name}-rpmlintrc
|
2017-03-09 10:38:02 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-16 09:53:42 +01:00
|
|
|
BuildRequires: python3-devel
|
2018-12-19 09:48:21 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-16 09:53:42 +01:00
|
|
|
BuildRequires: python3-setuptools
|
2018-03-06 17:09:13 +01:00
|
|
|
BuildRequires: fdupes
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
BuildRequires: python-%{develsuffix}
|
2017-07-25 14:14:06 +02:00
|
|
|
BuildRequires: python-setuptools
|
|
|
|
%if 0%{?suse_version}
|
2017-03-09 10:38:02 +01:00
|
|
|
BuildRequires: shadow
|
2017-03-16 09:53:42 +01:00
|
|
|
BuildRequires: update-alternatives
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
|
|
|
BuildRequires: passwd
|
|
|
|
%endif
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
BuildRequires: chkconfig
|
|
|
|
%endif
|
2017-03-10 17:13:20 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
# python2-kiwi
|
|
|
|
%package -n python2-kiwi
|
|
|
|
Summary: KIWI - Appliance Builder Next Generation
|
2018-02-13 09:43:28 +01:00
|
|
|
Group: %{pygroup}
|
2017-03-16 09:53:42 +01:00
|
|
|
Provides: python-kiwi = %{version}-%{release}
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-27 10:40:29 +02:00
|
|
|
Recommends: jing
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2018-08-01 16:22:36 +02:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu} || 0%{?fedora} || 0%{?rhel}
|
2018-02-13 09:43:28 +01:00
|
|
|
Requires: python-yaml
|
|
|
|
%else
|
2017-06-20 14:43:53 +02:00
|
|
|
Requires: python-PyYAML
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 17:13:24 +01:00
|
|
|
Requires: python-docopt
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: python-future
|
2017-03-09 17:13:24 +01:00
|
|
|
Requires: python-lxml
|
2017-07-07 15:48:08 +02:00
|
|
|
Requires: python-requests
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: python-setuptools
|
2017-03-09 17:13:24 +01:00
|
|
|
Requires: python-six
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: python-xattr
|
2017-07-25 14:14:06 +02:00
|
|
|
# tools used by kiwi
|
|
|
|
%if 0%{?suse_version}
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: update-alternatives
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2017-07-25 14:14:06 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
Requires: grub2-x86_64-efi
|
|
|
|
%endif
|
2018-10-19 15:13:00 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2018-12-19 09:48:21 +01:00
|
|
|
Recommends: gfxboot
|
2018-10-19 15:13:00 +02:00
|
|
|
%endif
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: qemu-tools
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: squashfs
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: gptfdisk
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: chkconfig
|
2017-07-25 14:14:06 +02:00
|
|
|
Requires(post): chkconfig
|
|
|
|
Requires(postun): chkconfig
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: qemu-img
|
|
|
|
Requires: squashfs-tools
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: gdisk
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: yum
|
2017-03-09 10:38:02 +01:00
|
|
|
Provides: kiwi-packagemanager:yum
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
|
|
Requires: dnf
|
|
|
|
Provides: kiwi-packagemanager:dnf
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} >= 26 || 0%{?suse_version}
|
|
|
|
Requires: zypper
|
|
|
|
Provides: kiwi-packagemanager:zypper
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
|
|
|
Requires: debootstrap
|
|
|
|
Requires: qemu-utils
|
|
|
|
Requires: squashfs-tools
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: gdisk
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: dosfstools
|
|
|
|
Requires: e2fsprogs
|
2018-04-03 12:24:54 +02:00
|
|
|
Requires: xorriso
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: grub2
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: kiwi-man-pages
|
|
|
|
Requires: kiwi-tools
|
|
|
|
Requires: lvm2
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: mtools
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: parted
|
2018-04-03 12:24:54 +02:00
|
|
|
Requires: kpartx
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: rsync
|
|
|
|
Requires: tar >= 1.2.7
|
2018-02-13 09:43:28 +01:00
|
|
|
%if %{_vendor} != "debbuild"
|
|
|
|
# Not supported with debbuild yet
|
2017-03-09 10:38:02 +01:00
|
|
|
%ifarch %arm aarch64
|
|
|
|
Requires: u-boot-tools
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
|
|
|
Requires: s390-tools
|
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-03-10 17:13:20 +01:00
|
|
|
%description -n python2-kiwi
|
|
|
|
Python 2 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.
|
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-10 17:13:20 +01:00
|
|
|
# python3-kiwi
|
|
|
|
%package -n python3-kiwi
|
|
|
|
Summary: KIWI - Appliance Builder Next Generation
|
|
|
|
Group: Development/Languages/Python
|
2017-03-27 10:40:29 +02:00
|
|
|
Recommends: jing
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?ubuntu} || 0%{?debian}
|
|
|
|
Requires: python3-yaml
|
|
|
|
%else
|
2017-06-20 14:43:53 +02:00
|
|
|
Requires: python3-PyYAML
|
2018-12-19 09:48:21 +01:00
|
|
|
%endif
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: python3-docopt
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: python3-future
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: python3-lxml
|
2017-07-07 15:48:08 +02:00
|
|
|
Requires: python3-requests
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: python3-setuptools
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: python3-six
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: python3-xattr
|
2017-07-25 14:14:06 +02:00
|
|
|
# tools used by kiwi
|
|
|
|
%if 0%{?suse_version}
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: update-alternatives
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2017-07-25 14:14:06 +02:00
|
|
|
%ifarch x86_64
|
|
|
|
Requires: grub2-x86_64-efi
|
|
|
|
%endif
|
2018-10-19 15:13:00 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2018-12-19 09:48:21 +01:00
|
|
|
Recommends: gfxboot
|
2018-10-19 15:13:00 +02:00
|
|
|
%endif
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: qemu-tools
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: squashfs
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: gptfdisk
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: chkconfig
|
2017-07-25 14:14:06 +02:00
|
|
|
Requires(post): chkconfig
|
|
|
|
Requires(postun): chkconfig
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: qemu-img
|
|
|
|
Requires: squashfs-tools
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: gdisk
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-07-28 15:02:18 +02:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} < 8
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: yum
|
2017-03-10 17:13:20 +01:00
|
|
|
Provides: kiwi-packagemanager:yum
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
|
|
Requires: dnf
|
|
|
|
Provides: kiwi-packagemanager:dnf
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} >= 26 || 0%{?suse_version}
|
|
|
|
Requires: zypper
|
|
|
|
Provides: kiwi-packagemanager:zypper
|
|
|
|
%endif
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
|
|
|
Requires: debootstrap
|
|
|
|
Requires: qemu-utils
|
|
|
|
Requires: squashfs-tools
|
|
|
|
Requires: gdisk
|
|
|
|
%endif
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: dosfstools
|
|
|
|
Requires: e2fsprogs
|
2018-04-03 12:24:54 +02:00
|
|
|
Requires: xorriso
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: grub2
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: kiwi-man-pages
|
|
|
|
Requires: kiwi-tools
|
|
|
|
Requires: lvm2
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: mtools
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: parted
|
2018-04-03 12:24:54 +02:00
|
|
|
Requires: kpartx
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: rsync
|
|
|
|
Requires: tar >= 1.2.7
|
2017-03-10 17:13:20 +01:00
|
|
|
%ifarch %arm aarch64
|
|
|
|
Requires: u-boot-tools
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
2017-03-10 17:13:20 +01:00
|
|
|
%ifarch s390 s390x
|
|
|
|
Requires: s390-tools
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
|
|
|
|
2017-03-10 17:13:20 +01:00
|
|
|
%description -n python3-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.
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
|
|
|
|
2017-03-09 10:38:02 +01:00
|
|
|
%package -n kiwi-tools
|
|
|
|
Summary: KIWI - Collection of Boot Helper Tools
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-02-13 09:43:28 +01:00
|
|
|
Group: %{sysgroup}
|
2017-03-09 10:38:02 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2018-02-13 09:43:28 +01:00
|
|
|
%if %{_vendor} != "debbuild"
|
2018-10-19 15:13:00 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2017-03-09 10:38:02 +01:00
|
|
|
%package -n kiwi-pxeboot
|
|
|
|
Summary: KIWI - PXE boot structure
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: syslinux
|
2017-06-02 10:46:22 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
%else
|
|
|
|
Requires(pre): shadow
|
|
|
|
%endif
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{sysgroup}
|
2017-03-09 10:38:02 +01:00
|
|
|
|
|
|
|
%description -n kiwi-pxeboot
|
|
|
|
This package contains the basic PXE directory structure which is
|
|
|
|
needed to serve kiwi built images via PXE.
|
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-11-20 17:02:30 +01:00
|
|
|
%package -n dracut-kiwi-lib
|
|
|
|
Summary: KIWI - Dracut kiwi Library
|
2018-02-13 09:43:28 +01:00
|
|
|
%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...
|
2017-11-20 17:02:30 +01:00
|
|
|
BuildRequires: dracut
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-11-20 17:02:30 +01:00
|
|
|
Requires: bc
|
2017-12-14 17:50:21 +01:00
|
|
|
Requires: cryptsetup
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-12-14 17:50:21 +01:00
|
|
|
Requires: btrfs-progs
|
|
|
|
Requires: gdisk
|
2018-10-19 15:13:00 +02:00
|
|
|
Requires: dracut-network
|
2017-12-14 17:50:21 +01:00
|
|
|
%else
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
|
|
|
Requires: btrfs-tools
|
|
|
|
Requires: gdisk
|
|
|
|
%else
|
2017-11-20 17:02:30 +01:00
|
|
|
Requires: btrfsprogs
|
2017-12-14 17:50:21 +01:00
|
|
|
Requires: gptfdisk
|
|
|
|
%endif
|
2018-12-19 09:48:21 +01:00
|
|
|
%endif
|
2017-11-20 17:02:30 +01:00
|
|
|
Requires: coreutils
|
|
|
|
Requires: e2fsprogs
|
|
|
|
Requires: grep
|
|
|
|
Requires: lvm2
|
|
|
|
Requires: mdadm
|
|
|
|
Requires: parted
|
|
|
|
Requires: util-linux
|
|
|
|
Requires: xfsprogs
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: dialog
|
|
|
|
Requires: pv
|
|
|
|
Requires: curl
|
2018-02-13 09:43:28 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: xz-utils
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: dmsetup
|
2018-02-13 09:43:28 +01:00
|
|
|
%else
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: xz
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: device-mapper
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-12-14 17:50:21 +01:00
|
|
|
%ifarch s390 s390x
|
|
|
|
Requires: s390-tools
|
|
|
|
%endif
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{sysgroup}
|
2017-11-20 17:02:30 +01:00
|
|
|
|
|
|
|
%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
|
2018-02-13 09:43:28 +01:00
|
|
|
%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...
|
2017-11-20 17:02:30 +01:00
|
|
|
BuildRequires: dracut
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-11-20 17:02:30 +01:00
|
|
|
Requires: dracut-kiwi-lib
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{sysgroup}
|
2017-11-20 17:02:30 +01:00
|
|
|
|
|
|
|
%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
|
|
|
|
|
2018-01-24 07:29:17 +01:00
|
|
|
%package -n dracut-kiwi-oem-dump
|
|
|
|
Summary: KIWI - Dracut module for oem(install) image type
|
2018-02-13 09:43:28 +01:00
|
|
|
%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...
|
2018-01-24 07:29:17 +01:00
|
|
|
BuildRequires: dracut
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2018-01-24 07:29:17 +01:00
|
|
|
Requires: dracut-kiwi-lib
|
|
|
|
Requires: kexec-tools
|
2018-02-13 09:43:28 +01:00
|
|
|
%if 0%{?suse_version} || 0%{?debian} || 0%{?ubuntu}
|
2018-01-24 07:29:17 +01:00
|
|
|
Requires: multipath-tools
|
2018-01-24 12:21:28 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
Requires: device-mapper-multipath
|
|
|
|
%endif
|
|
|
|
Requires: gawk
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{sysgroup}
|
2018-01-24 07:29:17 +01:00
|
|
|
|
|
|
|
%description -n dracut-kiwi-oem-dump
|
|
|
|
This package contains the kiwi-dump dracut module 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
|
|
|
|
|
2017-09-11 17:18:41 +02:00
|
|
|
%package -n dracut-kiwi-live
|
|
|
|
Summary: KIWI - Dracut module for iso(live) image type
|
2018-02-13 09:43:28 +01:00
|
|
|
%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...
|
2017-09-11 17:18:41 +02:00
|
|
|
BuildRequires: dracut
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-09-25 16:59:05 +02:00
|
|
|
Requires: dialog
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: xfsprogs
|
2017-09-11 17:18:41 +02:00
|
|
|
Requires: e2fsprogs
|
|
|
|
Requires: util-linux
|
2018-02-13 09:43:28 +01:00
|
|
|
%if 0%{?debian} || 0%{?ubuntu}
|
|
|
|
Requires: dmsetup
|
2018-10-19 15:13:00 +02:00
|
|
|
Requires: dracut-network
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
Requires: device-mapper
|
|
|
|
Requires: dracut-network
|
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version}
|
2018-02-13 09:43:28 +01:00
|
|
|
Requires: device-mapper
|
|
|
|
%endif
|
|
|
|
Requires: dracut
|
2018-04-03 12:24:54 +02:00
|
|
|
Requires: xorriso
|
2018-12-19 09:48:21 +01:00
|
|
|
Requires: parted
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{sysgroup}
|
2017-09-11 17:18:41 +02:00
|
|
|
|
|
|
|
%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
|
2018-02-13 09:43:28 +01:00
|
|
|
%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...
|
2017-09-11 17:18:41 +02:00
|
|
|
BuildRequires: dracut
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2018-03-06 17:08:59 +01:00
|
|
|
Requires: util-linux
|
2018-03-06 17:09:13 +01:00
|
|
|
Requires: dracut
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-03-06 17:09:13 +01:00
|
|
|
Group: %{sysgroup}
|
2017-09-11 17:18:41 +02:00
|
|
|
|
|
|
|
%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
|
|
|
|
|
2017-03-09 17:13:24 +01:00
|
|
|
%package -n kiwi-man-pages
|
|
|
|
Summary: KIWI - manual pages
|
2018-05-16 12:14:30 +02:00
|
|
|
License: GPL-3.0-or-later
|
2018-02-13 09:43:28 +01:00
|
|
|
Group: %{sysgroup}
|
2017-03-09 17:13:24 +01:00
|
|
|
|
|
|
|
%description -n kiwi-man-pages
|
|
|
|
Provides manual pages to describe the kiwi commands
|
|
|
|
|
2017-03-09 10:38:02 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n kiwi-%{version}
|
|
|
|
|
2018-04-03 12:24:54 +02:00
|
|
|
# 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
|
|
|
|
|
2017-03-09 10:38:02 +01:00
|
|
|
%build
|
2017-03-10 17:13:20 +01:00
|
|
|
# Build Python 2 version
|
|
|
|
python2 setup.py build --cflags="${RPM_OPT_FLAGS}"
|
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-10 17:13:20 +01:00
|
|
|
# Build Python 3 version
|
|
|
|
python3 setup.py build --cflags="${RPM_OPT_FLAGS}"
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
|
|
|
%install
|
2017-03-10 17:13:20 +01:00
|
|
|
# Install Python 2 version
|
2018-02-13 09:43:28 +01:00
|
|
|
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb}
|
2017-03-10 17:13:20 +01:00
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-10 17:13:20 +01:00
|
|
|
# Install Python 3 version
|
2018-02-13 09:43:28 +01:00
|
|
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb}
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2018-09-27 08:55:39 +02:00
|
|
|
# Install dracut modules
|
|
|
|
make buildroot=%{buildroot}/ install_dracut
|
|
|
|
|
|
|
|
# Install documentation in PDF format
|
2018-10-19 15:13:00 +02:00
|
|
|
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install_package_docs
|
2018-09-27 08:55:39 +02:00
|
|
|
|
2018-02-13 09:43:28 +01:00
|
|
|
%if %{_vendor} != "debbuild"
|
2017-03-09 17:13:24 +01:00
|
|
|
# init alternatives setup
|
2017-03-09 10:38:02 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2017-03-09 17:13:24 +01:00
|
|
|
|
|
|
|
# alternatives setup for kiwi -> kiwi-ng-py_ver binary
|
2017-03-09 10:38:02 +01:00
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/kiwi
|
|
|
|
ln -s %{_sysconfdir}/alternatives/kiwi \
|
|
|
|
%{buildroot}%_bindir/kiwi
|
|
|
|
|
2017-03-11 14:46:16 +01:00
|
|
|
# alternatives setup for kiwi-ng -> kiwi-ng-py_ver binary
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/kiwi-ng
|
|
|
|
ln -s %{_sysconfdir}/alternatives/kiwi-ng \
|
|
|
|
%{buildroot}%_bindir/kiwi-ng
|
|
|
|
|
2017-03-09 17:13:24 +01:00
|
|
|
# alternatives setup for kiwicompat -> kiwicompat-py_ver binary
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/kiwicompat
|
|
|
|
ln -s %{_sysconfdir}/alternatives/kiwicompat \
|
|
|
|
%{buildroot}%_bindir/kiwicompat
|
|
|
|
|
2017-03-09 10:38:02 +01:00
|
|
|
# kiwi pxeboot directory structure to be packed in kiwi-pxeboot
|
2018-10-19 15:13:00 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2017-03-09 10:38:02 +01:00
|
|
|
for i in KIWI pxelinux.cfg image upload boot; do \
|
|
|
|
mkdir -p %{buildroot}/srv/tftpboot/$i ;\
|
|
|
|
done
|
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-09 10:38:02 +01:00
|
|
|
%fdupes %{buildroot}/srv/tftpboot
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-03-13 09:20:01 +01:00
|
|
|
%post -n python2-kiwi
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi kiwi %_bindir/kiwi-ng-2 10
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi-ng kiwi-ng %_bindir/kiwi-ng-2 10
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwicompat kiwicompat %_bindir/kiwicompat-2 10
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-13 09:20:01 +01:00
|
|
|
%post -n python3-kiwi
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi kiwi %_bindir/kiwi-ng-3 10
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi-ng kiwi-ng %_bindir/kiwi-ng-3 10
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwicompat kiwicompat %_bindir/kiwicompat-3 10
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-13 09:20:01 +01:00
|
|
|
|
|
|
|
%preun -n python2-kiwi
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 09:20:01 +01:00
|
|
|
--remove kiwi %_bindir/kiwi
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 09:20:01 +01:00
|
|
|
--remove kiwi %_bindir/kiwi-ng
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-13 09:20:01 +01:00
|
|
|
--remove kiwicompat %_bindir/kiwicompat
|
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-13 09:20:01 +01:00
|
|
|
%preun -n python3-kiwi
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-09 10:38:02 +01:00
|
|
|
--remove kiwi %_bindir/kiwi
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-11 14:46:16 +01:00
|
|
|
--remove kiwi %_bindir/kiwi-ng
|
2018-12-19 09:48:21 +01:00
|
|
|
%{update_alternatives} \
|
2017-03-09 17:13:24 +01:00
|
|
|
--remove kiwicompat %_bindir/kiwicompat
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2018-02-13 09:43:28 +01:00
|
|
|
%if %{_vendor} != "debbuild"
|
2018-10-19 15:13:00 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2017-03-09 10:38:02 +01:00
|
|
|
%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
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-03-10 17:13:20 +01:00
|
|
|
%files -n python2-kiwi
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_bindir}/kiwi-ng-2*
|
|
|
|
%{_bindir}/kiwicompat-2*
|
|
|
|
%ghost %{_bindir}/kiwi
|
2017-03-11 14:46:16 +01:00
|
|
|
%ghost %{_bindir}/kiwi-ng
|
2017-03-10 17:13:20 +01:00
|
|
|
%ghost %{_bindir}/kiwicompat
|
|
|
|
%ghost %_sysconfdir/alternatives/kiwi
|
2017-03-11 14:46:16 +01:00
|
|
|
%ghost %_sysconfdir/alternatives/kiwi-ng
|
2017-03-10 17:13:20 +01:00
|
|
|
%ghost %_sysconfdir/alternatives/kiwicompat
|
|
|
|
%{python2_sitelib}/*
|
|
|
|
|
2018-12-19 09:48:21 +01:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9
|
2017-03-10 17:13:20 +01:00
|
|
|
%files -n python3-kiwi
|
2017-03-09 10:38:02 +01:00
|
|
|
%defattr(-,root,root,-)
|
2017-03-10 17:13:20 +01:00
|
|
|
%{_bindir}/kiwi-ng-3*
|
|
|
|
%{_bindir}/kiwicompat-3*
|
2017-03-09 10:38:02 +01:00
|
|
|
%ghost %{_bindir}/kiwi
|
2017-03-11 14:46:16 +01:00
|
|
|
%ghost %{_bindir}/kiwi-ng
|
2017-03-09 17:13:24 +01:00
|
|
|
%ghost %{_bindir}/kiwicompat
|
2017-03-09 10:38:02 +01:00
|
|
|
%ghost %_sysconfdir/alternatives/kiwi
|
2017-03-11 14:46:16 +01:00
|
|
|
%ghost %_sysconfdir/alternatives/kiwi-ng
|
2017-03-09 17:13:24 +01:00
|
|
|
%ghost %_sysconfdir/alternatives/kiwicompat
|
2017-03-10 17:13:20 +01:00
|
|
|
%{python3_sitelib}/*
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 17:13:24 +01:00
|
|
|
|
|
|
|
%files -n kiwi-man-pages
|
|
|
|
%defattr(-, root, root)
|
2017-03-13 17:08:36 +01:00
|
|
|
%dir %{_defaultdocdir}/python-kiwi
|
2018-09-27 08:55:39 +02:00
|
|
|
%{_defaultdocdir}/python-kiwi/kiwi.pdf
|
2017-03-13 17:08:36 +01:00
|
|
|
%{_defaultdocdir}/python-kiwi/LICENSE
|
|
|
|
%{_defaultdocdir}/python-kiwi/README
|
2019-01-29 17:37:05 +01:00
|
|
|
%config %_sysconfdir/bash_completion.d/kiwi-ng.sh
|
2017-07-07 10:29:40 +02:00
|
|
|
%doc %{_mandir}/man8/*
|
2017-03-09 10:38:02 +01:00
|
|
|
|
|
|
|
%files -n kiwi-tools
|
|
|
|
%defattr(-, root, root)
|
2018-02-13 09:43:28 +01:00
|
|
|
%{_bindir}/dcounter
|
|
|
|
%{_bindir}/isconsole
|
|
|
|
%{_bindir}/kversion
|
|
|
|
%{_bindir}/utimer
|
2017-03-09 10:38:02 +01:00
|
|
|
|
2017-11-20 17:02:30 +01:00
|
|
|
%files -n dracut-kiwi-lib
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_usr}/lib/dracut/modules.d/99kiwi-lib
|
|
|
|
|
|
|
|
%files -n dracut-kiwi-oem-repart
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_usr}/lib/dracut/modules.d/90kiwi-repart
|
|
|
|
|
2018-01-24 07:29:17 +01:00
|
|
|
%files -n dracut-kiwi-oem-dump
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_usr}/lib/dracut/modules.d/90kiwi-dump
|
|
|
|
|
2017-09-11 17:18:41 +02:00
|
|
|
%files -n dracut-kiwi-live
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_usr}/lib/dracut/modules.d/90kiwi-live
|
|
|
|
|
|
|
|
%files -n dracut-kiwi-overlay
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_usr}/lib/dracut/modules.d/90kiwi-overlay
|
|
|
|
|
2018-02-13 09:43:28 +01:00
|
|
|
%if %{_vendor} != "debbuild"
|
2018-10-19 15:13:00 +02:00
|
|
|
%ifarch %{ix86} x86_64
|
2017-03-09 10:38:02 +01:00
|
|
|
%files -n kiwi-pxeboot
|
|
|
|
%defattr(-, root, root)
|
2017-09-29 15:12:11 +02:00
|
|
|
%dir %attr(0755,tftp,tftp) /srv/tftpboot
|
2017-03-09 10:38:02 +01:00
|
|
|
%dir /srv/tftpboot/KIWI
|
|
|
|
%dir /srv/tftpboot/pxelinux.cfg
|
|
|
|
%dir /srv/tftpboot/image
|
|
|
|
%dir /srv/tftpboot/upload
|
|
|
|
%dir /srv/tftpboot/boot
|
|
|
|
%endif
|
2018-02-13 09:43:28 +01:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
|
|
|
%changelog
|