2017-03-09 10:38:02 +01:00
|
|
|
#
|
2017-03-16 09:53:42 +01:00
|
|
|
# spec file for package python-kiwi
|
2017-03-09 10:38:02 +01:00
|
|
|
#
|
2017-03-16 09:53:42 +01:00
|
|
|
# Copyright (c) 2017 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.
|
2017-03-16 09:53:42 +01:00
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2017-03-09 10:38:02 +01:00
|
|
|
#
|
2017-03-16 09:53:42 +01:00
|
|
|
|
|
|
|
|
2017-03-11 14:46:16 +01:00
|
|
|
%{!?python2_sitelib:%global python2_sitelib %{python_sitelib}}
|
2017-03-10 17:13:20 +01:00
|
|
|
|
|
|
|
# translate version id to distribution name as it is used in kiwi
|
2017-03-16 09:53:42 +01:00
|
|
|
# generic approach
|
2017-03-10 17:13:20 +01:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
%define distro %(echo `export VER=%{suse_version}; echo "suse-${VER:0:2}.${VER:2:1}"`)
|
2017-03-16 09:53:42 +01:00
|
|
|
%endif
|
|
|
|
|
2017-03-10 17:13:20 +01:00
|
|
|
# SLE12:
|
|
|
|
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
|
|
|
|
%define distro suse-SLES12
|
|
|
|
%endif
|
2017-03-16 09:53:42 +01:00
|
|
|
|
2017-04-10 19:25:30 +02:00
|
|
|
# SLE15:
|
|
|
|
%if 0%{?sle_version} == 150000 && !0%{?is_opensuse}
|
|
|
|
%define distro suse-SLES15
|
2017-03-16 09:53:42 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
# Leap 42.1(openSUSE product based on SLE 12SP1):
|
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 120100
|
2017-03-10 17:13:20 +01:00
|
|
|
%define distro suse-leap42.1
|
|
|
|
%endif
|
2017-03-16 09:53:42 +01:00
|
|
|
|
2017-03-10 17:13:20 +01:00
|
|
|
# Leap 42.2:
|
2017-08-24 12:47:24 +02:00
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 120200
|
2017-03-10 17:13:20 +01:00
|
|
|
%define distro suse-leap42.2
|
|
|
|
%endif
|
2017-03-16 09:53:42 +01:00
|
|
|
|
|
|
|
# Leap 42.3:
|
2017-08-24 12:47:24 +02:00
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 120300
|
2017-03-16 09:53:42 +01:00
|
|
|
%define distro suse-leap42.3
|
|
|
|
%endif
|
|
|
|
|
2017-08-24 12:47:24 +02:00
|
|
|
# Leap 15.0:
|
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 150000
|
|
|
|
%define distro suse-leap15.0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Leap 15.1:
|
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 150100
|
|
|
|
%define distro suse-leap15.1
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Leap 15.2:
|
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 150200
|
|
|
|
%define distro suse-leap15.2
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Leap 15.3:
|
|
|
|
%if 0%{?is_opensuse} && 0%{?sle_version} == 150300
|
|
|
|
%define distro suse-leap15.3
|
|
|
|
%endif
|
|
|
|
|
2017-03-10 17:13:20 +01:00
|
|
|
# Tumbleweed:
|
|
|
|
# Current Tumbleweed version, moving target
|
|
|
|
%if 0%{?suse_version} == 1330
|
|
|
|
%define distro suse-tumbleweed
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# SLES with sles_version macro
|
|
|
|
%if 0%{?sles_version}
|
|
|
|
%define distro suse-SLES%{sles_version}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# RHEL // CentOS
|
|
|
|
# use the rhel templates for CentOS, too
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?rhel} == 7
|
2017-03-10 17:13:20 +01:00
|
|
|
%define distro rhel-07.0
|
|
|
|
%endif
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
# Fedora
|
|
|
|
# use the rhel templates for CentOS, too
|
|
|
|
%if 0%{?fedora} >= 25
|
|
|
|
%define distro fedora-25.0
|
|
|
|
%endif
|
|
|
|
|
2017-03-09 10:38:02 +01:00
|
|
|
Name: python-kiwi
|
2017-08-24 12:47:24 +02:00
|
|
|
Version: 9.10.6
|
2017-03-09 10:38:02 +01:00
|
|
|
Release: 0
|
2017-07-25 14:14:06 +02:00
|
|
|
Provides: kiwi-schema = 6.6
|
2017-03-09 10:38:02 +01:00
|
|
|
Url: https://github.com/SUSE/kiwi
|
|
|
|
Summary: KIWI - Appliance Builder Next Generation
|
|
|
|
License: GPL-3.0+
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Source: %{name}.tar.gz
|
|
|
|
Source1: %{name}-boot-packages
|
|
|
|
Source2: %{name}-rpmlintrc
|
|
|
|
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: fdupes
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
|
|
|
BuildRequires: python-devel
|
|
|
|
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
|
|
|
|
%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
|
|
|
|
Group: Development/Languages/Python
|
2017-03-09 10:38:02 +01:00
|
|
|
Provides: kiwi-image:docker
|
|
|
|
Provides: kiwi-image:iso
|
|
|
|
Provides: kiwi-image:oem
|
2017-03-16 09:53:42 +01:00
|
|
|
Provides: kiwi-image:pxe
|
|
|
|
Provides: kiwi-image:tbz
|
|
|
|
Provides: kiwi-image:vmx
|
|
|
|
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
|
2017-06-20 14:43:53 +02:00
|
|
|
Requires: python-PyYAML
|
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
|
|
|
|
Requires: gptfdisk
|
|
|
|
Requires: multipath-tools
|
|
|
|
Requires: qemu-tools
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: squashfs
|
|
|
|
%endif
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
Requires: chkconfig
|
|
|
|
Requires(post): chkconfig
|
|
|
|
Requires(postun): chkconfig
|
|
|
|
Requires: device-mapper-multipath
|
|
|
|
Requires: gdisk
|
|
|
|
Requires: qemu-img
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: squashfs-tools
|
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
|
|
|
|
Requires: dosfstools
|
|
|
|
Requires: e2fsprogs
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: genisoimage
|
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
|
|
|
|
Requires: rsync
|
|
|
|
Requires: tar >= 1.2.7
|
2017-03-09 10:38:02 +01:00
|
|
|
%ifarch %arm aarch64
|
|
|
|
Requires: u-boot-tools
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
|
|
|
Requires: s390-tools
|
|
|
|
%endif
|
|
|
|
|
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.
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-10 17:13:20 +01:00
|
|
|
# python3-kiwi
|
|
|
|
%package -n python3-kiwi
|
|
|
|
Summary: KIWI - Appliance Builder Next Generation
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Provides: kiwi-image:docker
|
|
|
|
Provides: kiwi-image:iso
|
|
|
|
Provides: kiwi-image:oem
|
2017-03-16 09:53:42 +01:00
|
|
|
Provides: kiwi-image:pxe
|
|
|
|
Provides: kiwi-image:tbz
|
|
|
|
Provides: kiwi-image:vmx
|
2017-03-27 10:40:29 +02:00
|
|
|
Recommends: jing
|
2017-06-20 14:43:53 +02:00
|
|
|
Requires: python3-PyYAML
|
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
|
|
|
|
Requires: gptfdisk
|
|
|
|
Requires: multipath-tools
|
|
|
|
Requires: qemu-tools
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: squashfs
|
2017-03-09 10:38:02 +01:00
|
|
|
%endif
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
Requires: chkconfig
|
|
|
|
Requires(post): chkconfig
|
|
|
|
Requires(postun): chkconfig
|
|
|
|
Requires: device-mapper-multipath
|
|
|
|
Requires: gdisk
|
|
|
|
Requires: qemu-img
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: squashfs-tools
|
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
|
2017-03-10 17:13:20 +01:00
|
|
|
Requires: dosfstools
|
|
|
|
Requires: e2fsprogs
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: genisoimage
|
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
|
|
|
|
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
|
|
|
|
Group: System/Management
|
|
|
|
|
|
|
|
%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.
|
|
|
|
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
%package -n kiwi-pxeboot
|
|
|
|
Summary: KIWI - PXE boot structure
|
|
|
|
Group: System/Management
|
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
|
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
|
|
|
|
|
|
|
|
%package -n kiwi-boot-requires
|
|
|
|
Summary: KIWI - buildservice package requirements for boot images
|
2017-03-16 09:53:42 +01:00
|
|
|
Group: System/Management
|
2017-03-09 10:38:02 +01:00
|
|
|
Provides: kiwi-boot:isoboot
|
|
|
|
Provides: kiwi-boot:netboot
|
|
|
|
Provides: kiwi-boot:oemboot
|
2017-03-16 09:53:42 +01:00
|
|
|
Provides: kiwi-boot:vmxboot
|
2017-03-09 10:38:02 +01:00
|
|
|
Provides: kiwi-filesystem:btrfs
|
|
|
|
Provides: kiwi-filesystem:ext3
|
|
|
|
Provides: kiwi-filesystem:ext4
|
|
|
|
Provides: kiwi-filesystem:squashfs
|
2017-03-16 09:53:42 +01:00
|
|
|
Provides: kiwi-filesystem:xfs
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: e2fsprogs
|
2017-03-16 09:53:42 +01:00
|
|
|
Requires: xfsprogs
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
Requires: btrfs-progs
|
|
|
|
%else
|
|
|
|
Requires: btrfsprogs
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
|
|
|
Requires: python3-kiwi = %{version}
|
|
|
|
%else
|
|
|
|
Requires: python2-kiwi = %{version}
|
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
Requires: %(echo `cat %{S:1}|grep %{_target_cpu}:%{distro}:|cut -f3- -d:`)
|
|
|
|
|
|
|
|
%description -n kiwi-boot-requires
|
|
|
|
Meta package for the buildservice to pull in all required packages in
|
|
|
|
order to have them in the buildservice created repositories to allow
|
|
|
|
kiwi to build the boot image. This package must never be published
|
|
|
|
nor installed by anybody else except for the buildservice, it is part
|
|
|
|
of the kiwi - buildservice integration exclusively
|
|
|
|
|
2017-03-09 17:13:24 +01:00
|
|
|
%package -n kiwi-man-pages
|
|
|
|
Summary: KIWI - manual pages
|
|
|
|
Group: System/Management
|
|
|
|
|
|
|
|
%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}
|
|
|
|
|
|
|
|
%build
|
2017-03-10 17:13:20 +01:00
|
|
|
# Build Python 2 version
|
|
|
|
python2 setup.py build --cflags="${RPM_OPT_FLAGS}"
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
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
|
|
|
|
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-10 17:13:20 +01:00
|
|
|
# Install Python 3 version
|
|
|
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
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
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
for i in KIWI pxelinux.cfg image upload boot; do \
|
|
|
|
mkdir -p %{buildroot}/srv/tftpboot/$i ;\
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel}
|
|
|
|
install -m 755 -d %{buildroot}/%{_defaultdocdir}/python-kiwi
|
|
|
|
mv %{buildroot}/%{_defaultdocdir}/packages/python-kiwi/* %{buildroot}/%{_defaultdocdir}/python-kiwi
|
|
|
|
rm -rf %{buildroot}/%{_defaultdocdir}/packages
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-09 10:38:02 +01:00
|
|
|
%fdupes %{buildroot}/srv/tftpboot
|
2017-03-10 17:13:20 +01:00
|
|
|
%fdupes %{buildroot}/%{python3_sitelib}/kiwi/boot
|
|
|
|
%fdupes %{buildroot}/%{python2_sitelib}/kiwi/boot
|
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
|
2017-03-09 10:38:02 +01:00
|
|
|
%{_sbindir}/update-alternatives \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi kiwi %_bindir/kiwi-ng-2 10
|
2017-03-11 14:46:16 +01:00
|
|
|
%{_sbindir}/update-alternatives \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi-ng kiwi-ng %_bindir/kiwi-ng-2 10
|
2017-03-09 17:13:24 +01:00
|
|
|
%{_sbindir}/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
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-13 09:20:01 +01:00
|
|
|
%post -n python3-kiwi
|
|
|
|
%{_sbindir}/update-alternatives \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi kiwi %_bindir/kiwi-ng-3 10
|
2017-03-13 09:20:01 +01:00
|
|
|
%{_sbindir}/update-alternatives \
|
2017-03-13 10:17:54 +01:00
|
|
|
--install %_bindir/kiwi-ng kiwi-ng %_bindir/kiwi-ng-3 10
|
2017-03-13 09:20:01 +01:00
|
|
|
%{_sbindir}/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
|
|
|
|
%{_sbindir}/update-alternatives \
|
|
|
|
--remove kiwi %_bindir/kiwi
|
|
|
|
%{_sbindir}/update-alternatives \
|
|
|
|
--remove kiwi %_bindir/kiwi-ng
|
|
|
|
%{_sbindir}/update-alternatives \
|
|
|
|
--remove kiwicompat %_bindir/kiwicompat
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
2017-03-13 09:20:01 +01:00
|
|
|
%preun -n python3-kiwi
|
2017-03-09 10:38:02 +01:00
|
|
|
%{_sbindir}/update-alternatives \
|
|
|
|
--remove kiwi %_bindir/kiwi
|
2017-03-11 14:46:16 +01:00
|
|
|
%{_sbindir}/update-alternatives \
|
|
|
|
--remove kiwi %_bindir/kiwi-ng
|
2017-03-09 17:13:24 +01:00
|
|
|
%{_sbindir}/update-alternatives \
|
|
|
|
--remove kiwicompat %_bindir/kiwicompat
|
2017-07-25 14:14:06 +02:00
|
|
|
%endif
|
2017-03-09 10:38:02 +01:00
|
|
|
|
|
|
|
%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
|
|
|
|
|
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}/*
|
|
|
|
%config %_sysconfdir/bash_completion.d/kiwi-ng-2*.sh
|
|
|
|
|
2017-07-25 14:14:06 +02:00
|
|
|
%if 0%{?fedora} || 0%{?suse_version}
|
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}/*
|
|
|
|
%config %_sysconfdir/bash_completion.d/kiwi-ng-3*.sh
|
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
|
|
|
|
%{_defaultdocdir}/python-kiwi/LICENSE
|
|
|
|
%{_defaultdocdir}/python-kiwi/README
|
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)
|
|
|
|
%exclude %{_bindir}/kiwi
|
|
|
|
%exclude %{_bindir}/kiwicompat
|
2017-03-12 17:28:42 +01:00
|
|
|
%exclude %{_bindir}/kiwi-ng*
|
2017-03-09 17:13:24 +01:00
|
|
|
%exclude %{_bindir}/kiwicompat-*
|
2017-03-09 10:38:02 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
%files -n kiwi-pxeboot
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%dir %attr(0750,tftp,tftp) /srv/tftpboot
|
|
|
|
%dir /srv/tftpboot/KIWI
|
|
|
|
%dir /srv/tftpboot/pxelinux.cfg
|
|
|
|
%dir /srv/tftpboot/image
|
|
|
|
%dir /srv/tftpboot/upload
|
|
|
|
%dir /srv/tftpboot/boot
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n kiwi-boot-requires
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
|
|
|
%changelog
|