Sync from SUSE:SLFO:Main python-kiwi revision 23011a2156956466466f0be5dd163708
This commit is contained in:
parent
5c339ed66c
commit
3d51d177aa
16
PKGBUILD
16
PKGBUILD
@ -3,28 +3,34 @@
|
||||
|
||||
pkgname=('python-kiwi' 'kiwi-man-pages' 'dracut-kiwi-lib' 'dracut-kiwi-oem-repart' 'dracut-kiwi-oem-dump' 'dracut-kiwi-live' 'dracut-kiwi-overlay')
|
||||
arch=(x86_64)
|
||||
pkgver=9.25.22
|
||||
pkgver=10.0.21
|
||||
pkgrel=0
|
||||
pkgdesc="KIWI - Appliance Builder Next Generation"
|
||||
url="https://github.com/SUSE/kiwi/tarball/master"
|
||||
license=('GPL3')
|
||||
makedepends=(python-setuptools gcc shadow grep)
|
||||
makedepends=(make gcc python-build python-docopt python-installer python-lxml python-poetry-core python-requests python-setuptools python-simplejson python-sphinx python-sphinx_rtd_theme python-wheel python-yaml shadow grep)
|
||||
provides=(kiwi-ng kiwi)
|
||||
source=("${pkgname}.tar.gz")
|
||||
changelog="${pkgname}.changes"
|
||||
md5sums=('2e88d62046b49112f55ca259b41ebece')
|
||||
md5sums=('7a57fc01393c8e62449d1899cb185642')
|
||||
|
||||
|
||||
build() {
|
||||
export LANG=C.UTF-8
|
||||
export LC_ALL=C.UTF-8
|
||||
cd kiwi-${pkgver}
|
||||
python setup.py build
|
||||
# Temporarily switch things back to docopt
|
||||
# FIXME: Drop this hack as soon as we can...
|
||||
sed -e 's/docopt-ng.*/docopt = ">=0.6.2"/' -i pyproject.toml
|
||||
make -C doc man
|
||||
python3 -m build --no-isolation --wheel
|
||||
}
|
||||
|
||||
package_python-kiwi(){
|
||||
depends=(python-docopt python-simplejson python-lxml python-requests python-setuptools python-yaml grub qemu squashfs-tools gptfdisk pacman e2fsprogs xfsprogs btrfs-progs libisoburn lvm2 mtools parted multipath-tools rsync tar shadow screen kiwi-man-pages)
|
||||
optdepends=('gnupg: keyring creation for APT package manager')
|
||||
cd kiwi-${pkgver}
|
||||
python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
|
||||
python3 -m installer --destdir "${pkgdir}/" dist/*.whl
|
||||
ln -sr "${pkgdir}/usr/bin/kiwi-ng" "${pkgdir}/usr/bin/kiwi"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
67
kiwi-revert-bls-default-for-suse.patch
Normal file
67
kiwi-revert-bls-default-for-suse.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From b0d850842b0c8d4c98f0486f66ffd7c6e8f1a685 Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <ngompa@opensuse.org>
|
||||
Date: Thu, 2 May 2024 06:23:45 -0400
|
||||
Subject: [PATCH] Revert "kiwi/bootloader: restore backward compatibility for
|
||||
grub2 with bls"
|
||||
|
||||
For the time being, SUSE distributions cannot handle KIWI's default to use
|
||||
BLS with GRUB2. Until they catch up, revert this.
|
||||
|
||||
This reverts commit 155d969d7752d92c90c69044bdd69be70f0a1c24.
|
||||
---
|
||||
kiwi/xml_state.py | 2 +-
|
||||
test/unit/bootloader/config/grub2_test.py | 4 ----
|
||||
2 files changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/kiwi/xml_state.py b/kiwi/xml_state.py
|
||||
index eb39163cd..8c3fd45f3 100644
|
||||
--- a/kiwi/xml_state.py
|
||||
+++ b/kiwi/xml_state.py
|
||||
@@ -1009,7 +1009,7 @@ class XMLState:
|
||||
bootloader = self.get_build_type_bootloader_section()
|
||||
if bootloader:
|
||||
return bootloader.get_bls()
|
||||
- return True
|
||||
+ return False
|
||||
|
||||
def get_build_type_bootloader_console(self) -> List[str]:
|
||||
"""
|
||||
diff --git a/test/unit/bootloader/config/grub2_test.py b/test/unit/bootloader/config/grub2_test.py
|
||||
index e9189a609..d81d76ec7 100644
|
||||
--- a/test/unit/bootloader/config/grub2_test.py
|
||||
+++ b/test/unit/bootloader/config/grub2_test.py
|
||||
@@ -600,7 +600,6 @@ class TestBootLoaderConfigGrub2:
|
||||
'GRUB_BACKGROUND': '/boot/grub2/themes/openSUSE/background.png',
|
||||
'GRUB_CMDLINE_LINUX_DEFAULT': '"some-cmdline"',
|
||||
'GRUB_DISTRIBUTOR': '"Bob"',
|
||||
- 'GRUB_ENABLE_BLSCFG': 'true',
|
||||
'GRUB_ENABLE_CRYPTODISK': 'y',
|
||||
'GRUB_GFXMODE': '800x600',
|
||||
'GRUB_SERIAL_COMMAND': '"serial --speed=38400"',
|
||||
@@ -643,7 +642,6 @@ class TestBootLoaderConfigGrub2:
|
||||
call('GRUB_CMDLINE_LINUX', '"root=LABEL=some-label"'),
|
||||
call('GRUB_DISABLE_LINUX_UUID', 'true'),
|
||||
call('GRUB_DISTRIBUTOR', '"Bob"'),
|
||||
- call('GRUB_ENABLE_BLSCFG', 'true'),
|
||||
call('GRUB_ENABLE_CRYPTODISK', 'y'),
|
||||
call('GRUB_ENABLE_LINUX_LABEL', 'true'),
|
||||
call('GRUB_GFXMODE', '800x600'),
|
||||
@@ -688,7 +686,6 @@ class TestBootLoaderConfigGrub2:
|
||||
call('GRUB_DISABLE_LINUX_PARTUUID', 'false'),
|
||||
call('GRUB_DISABLE_LINUX_UUID', 'true'),
|
||||
call('GRUB_DISTRIBUTOR', '"Bob"'),
|
||||
- call('GRUB_ENABLE_BLSCFG', 'true'),
|
||||
call('GRUB_ENABLE_CRYPTODISK', 'y'),
|
||||
call('GRUB_GFXMODE', '800x600'),
|
||||
call(
|
||||
@@ -732,7 +729,6 @@ class TestBootLoaderConfigGrub2:
|
||||
call('GRUB_CMDLINE_LINUX_DEFAULT', '"abcd console=tty0"'),
|
||||
call('GRUB_DISABLE_LINUX_UUID', 'true'),
|
||||
call('GRUB_DISTRIBUTOR', '"Bob"'),
|
||||
- call('GRUB_ENABLE_BLSCFG', 'true'),
|
||||
call('GRUB_ENABLE_CRYPTODISK', 'y'),
|
||||
call('GRUB_ENABLE_LINUX_LABEL', 'true'),
|
||||
call('GRUB_GFXMODE', '800x600'),
|
||||
--
|
||||
2.44.0
|
||||
|
1643
python-kiwi.changes
1643
python-kiwi.changes
File diff suppressed because it is too large
Load Diff
148
python-kiwi.spec
148
python-kiwi.spec
@ -19,18 +19,19 @@
|
||||
|
||||
# If they aren't provided by a system installed macro, define them
|
||||
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc}
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1600
|
||||
%global __python3 /usr/bin/python3.11
|
||||
%global python3_pkgversion 311
|
||||
%else
|
||||
%{!?__python3: %global __python3 /usr/bin/python3}
|
||||
%{!?python3_pkgversion:%global python3_pkgversion 3}
|
||||
%endif
|
||||
|
||||
%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
|
||||
@ -43,8 +44,8 @@
|
||||
%endif
|
||||
|
||||
Name: python-kiwi
|
||||
Version: 9.25.22
|
||||
Provides: kiwi-schema = 7.5
|
||||
Version: 10.0.21
|
||||
Provides: kiwi-schema = 8.1
|
||||
Release: 0
|
||||
Url: https://github.com/OSInside/kiwi
|
||||
Summary: KIWI - Appliance Builder Next Generation
|
||||
@ -54,12 +55,12 @@ License: GPL-3.0-or-later
|
||||
Packager: Marcus Schaefer <marcus.schaefer@suse.com>
|
||||
%endif
|
||||
Group: %{pygroup}
|
||||
Source: %{name}.tar.gz
|
||||
Source0: %{name}.tar.gz
|
||||
Source1: %{name}-rpmlintrc
|
||||
# SUSE-specific patches (1001+)
|
||||
## PATCH-FIX-OPENSUSE kiwi-revert-bls-default-for-suse.patch -- temporary until opensuse has bls
|
||||
Patch1001: kiwi-revert-bls-default-for-suse.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: gcc
|
||||
BuildRequires: python%{python3_pkgversion}-%{develsuffix} >= 3.6
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
%if 0%{?fedora} || 0%{?suse_version}
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
@ -69,6 +70,36 @@ BuildRequires: shadow
|
||||
%if 0%{?debian} || 0%{?ubuntu}
|
||||
BuildRequires: passwd
|
||||
%endif
|
||||
# Main build requirements
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: python%{python3_pkgversion}-%{develsuffix} >= 3.9
|
||||
BuildRequires: python%{python3_pkgversion}-build
|
||||
BuildRequires: python%{python3_pkgversion}-installer
|
||||
BuildRequires: python%{python3_pkgversion}-poetry-core >= 1.2.0
|
||||
BuildRequires: python%{python3_pkgversion}-wheel
|
||||
# doc build requirements
|
||||
%if ! (0%{?fedora} >= 41 || 0%{?rhel} >= 10)
|
||||
BuildRequires: python%{python3_pkgversion}-docopt >= 0.6.2
|
||||
%else
|
||||
BuildRequires: python%{python3_pkgversion}-docopt-ng
|
||||
%endif
|
||||
BuildRequires: python%{python3_pkgversion}-lxml
|
||||
BuildRequires: python%{python3_pkgversion}-requests
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-simplejson
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: python%{python3_pkgversion}-Sphinx
|
||||
%else
|
||||
BuildRequires: python%{python3_pkgversion}-sphinx
|
||||
%endif
|
||||
%if 0%{?debian} || 0%{?ubuntu}
|
||||
BuildRequires: python%{python3_pkgversion}-sphinx-rtd-theme
|
||||
BuildRequires: python%{python3_pkgversion}-yaml
|
||||
%else
|
||||
BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme
|
||||
BuildRequires: python%{python3_pkgversion}-PyYAML
|
||||
%endif
|
||||
|
||||
%description
|
||||
The KIWI Image System provides an operating system image builder
|
||||
@ -124,7 +155,6 @@ Requires: dpkg
|
||||
Requires: gnupg
|
||||
%endif
|
||||
# tools required by kiwi
|
||||
Requires: kiwi-tools
|
||||
Requires: mtools
|
||||
Requires: rsync
|
||||
Requires: tar >= 1.2.7
|
||||
@ -186,9 +216,6 @@ Provides: kiwi-image:iso
|
||||
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}
|
||||
@ -212,9 +239,6 @@ Recommends: gfxboot
|
||||
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
|
||||
@ -224,7 +248,14 @@ Requires: u-boot-tools
|
||||
%endif
|
||||
%endif
|
||||
%ifarch s390 s390x
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
Requires: s390utils
|
||||
%else
|
||||
Requires: s390-tools
|
||||
%if ! (0%{?debian} || 0%{?ubuntu})
|
||||
Requires: grub2
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
Requires: kiwi-systemdeps-core = %{version}-%{release}
|
||||
|
||||
@ -365,24 +396,22 @@ Conflicts: kiwi-man-pages < %{version}
|
||||
Requires: screen
|
||||
Requires: file
|
||||
Requires: sed
|
||||
Requires: python%{python3_pkgversion} >= 3.6
|
||||
Requires: python%{python3_pkgversion} >= 3.9
|
||||
%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
|
||||
%if ! (0%{?fedora} >= 41 || 0%{?rhel} >= 10)
|
||||
Requires: python%{python3_pkgversion}-docopt
|
||||
%else
|
||||
Requires: python%{python3_pkgversion}-docopt-ng
|
||||
%endif
|
||||
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
|
||||
Requires: python%{python3_pkgversion}-xmltodict
|
||||
%if ! (0%{?rhel} && 0%{?rhel} < 8)
|
||||
Recommends: kiwi-man-pages
|
||||
%endif
|
||||
@ -403,17 +432,6 @@ 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
|
||||
@ -485,7 +503,11 @@ Requires: xz
|
||||
Requires: device-mapper
|
||||
%endif
|
||||
%ifarch s390 s390x
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
Requires: s390utils
|
||||
%else
|
||||
Requires: s390-tools
|
||||
%endif
|
||||
Requires: parted
|
||||
%endif
|
||||
License: GPL-3.0-or-later
|
||||
@ -619,31 +641,49 @@ Provides manual pages to describe the kiwi commands
|
||||
%prep
|
||||
%setup -q -n kiwi-%{version}
|
||||
|
||||
%if 0%{?suse_version}
|
||||
# Temporarily revert grub-bls default to false for SUSE distributions
|
||||
%patch -P 1001 -p1
|
||||
%endif
|
||||
|
||||
# Temporarily switch things back to docopt for everything but Fedora 41+
|
||||
# FIXME: Drop this hack as soon as we can...
|
||||
%if ! (0%{?fedora} >= 41 || 0%{?rhel} >= 10)
|
||||
sed -e 's/docopt-ng.*/docopt = ">=0.6.2"/' -i pyproject.toml
|
||||
%endif
|
||||
|
||||
# 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
|
||||
# Build documentation
|
||||
make -C doc man
|
||||
|
||||
# Build application wheel
|
||||
%{__python3} -m build --no-isolation --wheel
|
||||
|
||||
%install
|
||||
# Install Python 3 version
|
||||
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb}
|
||||
# Install application
|
||||
%{__python3} -m installer --destdir %{buildroot} %{?is_deb:--no-compile-bytecode} dist/*.whl
|
||||
|
||||
# Install C-Tools, man-pages, completion and kiwi default configuration
|
||||
make buildroot=%{buildroot}/ install
|
||||
%if 0%{?is_deb}
|
||||
# Fix where files were installed
|
||||
mv %{buildroot}%{_prefix}/local/* %{buildroot}%{_prefix}
|
||||
mv %{buildroot}%{_prefix}/lib/python3* %{buildroot}%{_prefix}/lib/python3
|
||||
%endif
|
||||
|
||||
# Install man-pages, completion and kiwi default configuration
|
||||
make buildroot=%{buildroot}/ python=%{__python3} install
|
||||
|
||||
# Install dracut modules
|
||||
make buildroot=%{buildroot}/ install_dracut
|
||||
make buildroot=%{buildroot}/ python=%{__python3} install_dracut
|
||||
|
||||
# Install documentation in PDF format
|
||||
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install_package_docs
|
||||
# Install documentation README / LICENSE
|
||||
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ python=%{__python3} 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
|
||||
@ -702,26 +742,20 @@ fi
|
||||
|
||||
%files -n python%{python3_pkgversion}-kiwi
|
||||
%dir %{_defaultdocdir}/python-kiwi
|
||||
%dir %{_usr}/share/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
|
||||
%{_usr}/share/kiwi/xsl_to_v74/
|
||||
%{_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
|
||||
|
||||
|
BIN
python-kiwi.tar.gz
(Stored with Git LFS)
BIN
python-kiwi.tar.gz
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue
Block a user