SHA256
1
0
forked from pool/python-kiwi

- Bump version: 10.0.1 → 10.0.2

- Don't use poetry publish
  Publishing to pypi is done via pypa/gh-action-pypi-publish
  and the respective auth token. Calling poetry publish does
  not work because this is not authorized

- Bump version: 10.0.0 → 10.0.1

- Drop ci-kiwi-9-compliant.yml
  Delete this action as it existed in the intermediate state
  prior the new major version v10.x.x

- Add tzdata to Debian tests

- Fixed sync script for test-image-rpi on Ubuntu

- Install language-pack-en for Ubuntu arm test

- Install locales-all for Debian tests

- Install language-pack-en for Debian tests

- Fix repo setup for Ubuntu arm test

- Install network stack for Debian test

- Request util-linux explicitly for Ubuntu tests

- Add usr-is-merged to package list for bootstrap

OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=237
This commit is contained in:
Marcus Schäfer 2024-03-06 10:08:33 +00:00 committed by Git OBS Bridge
parent 5656d543da
commit 7b6fd15588
4 changed files with 1021 additions and 75 deletions

View File

@ -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') 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) arch=(x86_64)
pkgver=9.25.22 pkgver=10.0.2
pkgrel=0 pkgrel=0
pkgdesc="KIWI - Appliance Builder Next Generation" pkgdesc="KIWI - Appliance Builder Next Generation"
url="https://github.com/SUSE/kiwi/tarball/master" url="https://github.com/SUSE/kiwi/tarball/master"
license=('GPL3') 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) provides=(kiwi-ng kiwi)
source=("${pkgname}.tar.gz") source=("${pkgname}.tar.gz")
changelog="${pkgname}.changes" changelog="${pkgname}.changes"
md5sums=('6d27e95ce4889db4a6cd1bef7ef1284f') md5sums=('284f5bce5e8fae60101f8cc22b9afd0a')
build() { build() {
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
cd kiwi-${pkgver} 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/" -i pyproject.toml
make -C doc man
python3 -m build --no-isolation --wheel
} }
package_python-kiwi(){ 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) 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') optdepends=('gnupg: keyring creation for APT package manager')
cd kiwi-${pkgver} 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" ln -sr "${pkgdir}/usr/bin/kiwi-ng" "${pkgdir}/usr/bin/kiwi"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
} }

File diff suppressed because it is too large Load Diff

View File

@ -19,18 +19,19 @@
# If they aren't provided by a system installed macro, define them # If they aren't provided by a system installed macro, define them
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc} %{!?_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: %global __python3 /usr/bin/python3}
%{!?python3_pkgversion:%global python3_pkgversion 3}
%endif
%if %{undefined python3_sitelib} %if %{undefined python3_sitelib}
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%endif %endif
%if 0%{?el7}
%global python3_pkgversion 36
%else
%{!?python3_pkgversion:%global python3_pkgversion 3}
%endif
%if 0%{?debian} || 0%{?ubuntu} %if 0%{?debian} || 0%{?ubuntu}
%global is_deb 1 %global is_deb 1
%global pygroup python %global pygroup python
@ -43,7 +44,7 @@
%endif %endif
Name: python-kiwi Name: python-kiwi
Version: 9.25.22 Version: 10.0.2
Provides: kiwi-schema = 7.5 Provides: kiwi-schema = 7.5
Release: 0 Release: 0
Url: https://github.com/OSInside/kiwi Url: https://github.com/OSInside/kiwi
@ -57,9 +58,6 @@ Group: %{pygroup}
Source: %{name}.tar.gz Source: %{name}.tar.gz
Source1: %{name}-rpmlintrc Source1: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build 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} %if 0%{?fedora} || 0%{?suse_version}
BuildRequires: fdupes BuildRequires: fdupes
%endif %endif
@ -69,6 +67,32 @@ BuildRequires: shadow
%if 0%{?debian} || 0%{?ubuntu} %if 0%{?debian} || 0%{?ubuntu}
BuildRequires: passwd BuildRequires: passwd
%endif %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
BuildRequires: python%{python3_pkgversion}-docopt >= 0.6.2
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 %description
The KIWI Image System provides an operating system image builder The KIWI Image System provides an operating system image builder
@ -124,7 +148,6 @@ Requires: dpkg
Requires: gnupg Requires: gnupg
%endif %endif
# tools required by kiwi # tools required by kiwi
Requires: kiwi-tools
Requires: mtools Requires: mtools
Requires: rsync Requires: rsync
Requires: tar >= 1.2.7 Requires: tar >= 1.2.7
@ -186,9 +209,6 @@ Provides: kiwi-image:iso
Requires: checkmedia Requires: checkmedia
%endif %endif
Requires: xorriso Requires: xorriso
%ifarch %{ix86} x86_64
Requires: syslinux
%endif
Requires: kiwi-systemdeps-core = %{version}-%{release} Requires: kiwi-systemdeps-core = %{version}-%{release}
Requires: kiwi-systemdeps-filesystems = %{version}-%{release} Requires: kiwi-systemdeps-filesystems = %{version}-%{release}
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} Requires: kiwi-systemdeps-bootloaders = %{version}-%{release}
@ -363,10 +383,9 @@ Obsoletes: python2-kiwi
Conflicts: python2-kiwi Conflicts: python2-kiwi
Conflicts: kiwi-man-pages < %{version} Conflicts: kiwi-man-pages < %{version}
Requires: screen Requires: screen
Requires: python%{python3_pkgversion} >= 3.6 Requires: python%{python3_pkgversion} >= 3.9
%if 0%{?ubuntu} || 0%{?debian} %if 0%{?ubuntu} || 0%{?debian}
Requires: python%{python3_pkgversion}-yaml Requires: python%{python3_pkgversion}-yaml
Requires: python%{python3_pkgversion}-typing-extensions
%else %else
Requires: python%{python3_pkgversion}-PyYAML Requires: python%{python3_pkgversion}-PyYAML
%endif %endif
@ -375,12 +394,7 @@ Requires: python%{python3_pkgversion}-docopt
Requires: python%{python3_pkgversion}-lxml Requires: python%{python3_pkgversion}-lxml
Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests
Requires: python%{python3_pkgversion}-setuptools Requires: python%{python3_pkgversion}-setuptools
%if 0%{?rhel} || 0%{?fedora} Requires: python%{python3_pkgversion}-xmltodict
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) %if ! (0%{?rhel} && 0%{?rhel} < 8)
Recommends: kiwi-man-pages Recommends: kiwi-man-pages
%endif %endif
@ -401,17 +415,6 @@ Python 3 library of the KIWI Image System. Provides an operating system
image builder for Linux supported hardware platforms as well as for image builder for Linux supported hardware platforms as well as for
virtualization and cloud systems like Xen, KVM, VMware, EC2 and more. 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" %if "%{_vendor}" != "debbuild"
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
%package -n kiwi-pxeboot %package -n kiwi-pxeboot
@ -615,33 +618,46 @@ Group: %{sysgroup}
Provides manual pages to describe the kiwi commands Provides manual pages to describe the kiwi commands
%prep %prep
%setup -q -n kiwi-%{version} %autosetup -n kiwi-%{version}
# 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/" -i pyproject.toml
%endif
# Drop shebang for kiwi/xml_parse.py, as we don't intend to use it # Drop shebang for kiwi/xml_parse.py, as we don't intend to use it
# as an independent script # as an independent script
sed -e "s|#!/usr/bin/env python||" -i kiwi/xml_parse.py sed -e "s|#!/usr/bin/env python||" -i kiwi/xml_parse.py
%build # Build documentation
# Build C-Tools make -C doc man
make CFLAGS="${RPM_OPT_FLAGS}" tools
# Build application wheel
%{__python3} -m build --no-isolation --wheel
%install %install
# Install Python 3 version # Install application
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb} %{__python3} -m installer --destdir %{buildroot} %{?is_deb:--no-compile-bytecode} dist/*.whl
# Install C-Tools, man-pages, completion and kiwi default configuration %if 0%{?is_deb}
make buildroot=%{buildroot}/ install # 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 # Install dracut modules
make buildroot=%{buildroot}/ install_dracut make buildroot=%{buildroot}/ python=%{__python3} install_dracut
# Install documentation in PDF format # Install documentation README / LICENSE
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install_package_docs make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ python=%{__python3} install_package_docs
# Create symlinks for correct binaries # Create symlinks for correct binaries
ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi
ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi-ng-3 ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi-ng-3
ln -sr %{buildroot}%{_bindir}/kiwicompat %{buildroot}%{_bindir}/kiwicompat-3
%if "%{_vendor}" != "debbuild" %if "%{_vendor}" != "debbuild"
# kiwi pxeboot directory structure to be packed in kiwi-pxeboot # kiwi pxeboot directory structure to be packed in kiwi-pxeboot
@ -702,24 +718,16 @@ fi
%dir %{_defaultdocdir}/python-kiwi %dir %{_defaultdocdir}/python-kiwi
%{_bindir}/kiwi %{_bindir}/kiwi
%{_bindir}/kiwi-ng %{_bindir}/kiwi-ng
%{_bindir}/kiwicompat
%{_bindir}/kiwi-ng-3* %{_bindir}/kiwi-ng-3*
%{_bindir}/kiwicompat-3*
%{python3_sitelib}/kiwi* %{python3_sitelib}/kiwi*
%{_usr}/share/bash-completion/completions/kiwi-ng %{_usr}/share/bash-completion/completions/kiwi-ng
%{_defaultdocdir}/python-kiwi/LICENSE %{_defaultdocdir}/python-kiwi/LICENSE
%{_defaultdocdir}/python-kiwi/README %{_defaultdocdir}/python-kiwi/README
%files -n kiwi-man-pages %files -n kiwi-man-pages
%{_defaultdocdir}/python-kiwi/kiwi.pdf
%config %_sysconfdir/kiwi.yml %config %_sysconfdir/kiwi.yml
%doc %{_mandir}/man8/* %doc %{_mandir}/man8/*
%files -n kiwi-tools
%{_bindir}/dcounter
%{_bindir}/isconsole
%{_bindir}/utimer
%files -n dracut-kiwi-lib %files -n dracut-kiwi-lib
%{_usr}/lib/dracut/modules.d/99kiwi-lib %{_usr}/lib/dracut/modules.d/99kiwi-lib

BIN
python-kiwi.tar.gz (Stored with Git LFS)

Binary file not shown.