From f7a5b86fb43272db00d0d99d0c40e102e2c99571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 27 Feb 2019 07:51:50 +0100 Subject: [PATCH] Disable legacy and python2 subpackage Yum has been removed. --- pungi.spec | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pungi.spec b/pungi.spec index fe74c25c..4e022161 100644 --- a/pungi.spec +++ b/pungi.spec @@ -2,7 +2,7 @@ Name: pungi Version: 4.1.33 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Distribution compose tool License: GPLv2 @@ -14,7 +14,9 @@ Patch2: 0001-image-build-Fix-typo-in-file-extension-for-vmdk-imag.patch BuildRequires: python3-nose BuildRequires: python3-mock +%if 0%{?fedora} < 31 BuildRequires: python2-devel +%endif BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-productmd >= 1.17 @@ -95,6 +97,7 @@ for creating unified ISO images, validating config file or sending progress notification to Fedora Message Bus. +%if 0%{?fedora} < 31 %package legacy Summary: Legacy pungi executable Requires: %{name} = %{version}-%{release} @@ -124,7 +127,7 @@ Summary: Python 2 libraries for pungi %description -n python2-%{name} Python library with code for Pungi. This is not a public library and there are no guarantees about API stability. - +%endif %package -n python3-%{name} Summary: Python 3 libraries for pungi @@ -138,7 +141,9 @@ no guarantees about API stability. %autosetup -p1 %build +%if 0%{?fedora} < 31 %py2_build +%endif %py3_build cd doc make latexpdf SPHINXBUILD=/usr/bin/sphinx-build-3 @@ -148,17 +153,25 @@ make man SPHINXBUILD=/usr/bin/sphinx-build-3 gzip _build/man/pungi.1 %install +%if 0%{?fedora} < 31 %py2_install mv %{buildroot}%{_bindir}/pungi %{buildroot}%{_bindir}/pungi-2 +%endif %py3_install +%if 0%{?fedora} < 31 mv %{buildroot}%{_bindir}/pungi-2 %{buildroot}%{_bindir}/pungi +%endif %{__install} -d %{buildroot}/var/cache/pungi %{__install} -d %{buildroot}%{_mandir}/man1 %{__install} -m 0644 doc/_build/man/pungi.1.gz %{buildroot}%{_mandir}/man1 -# No utils package for Python 2 +# No utils package for Python 2. On Py 3 this is not installed at all rm -rf %{buildroot}%{python2_sitelib}/%{name}_utils + %if 0%{?fedora} > 30 +rm %{buildroot}%{_bindir}/pungi +%endif + %check nosetests-3 --exe @@ -174,17 +187,19 @@ nosetests-3 --exe %{_datadir}/pungi /var/cache/pungi +%if 0%{?fedora} < 31 +%files legacy +%{_bindir}/%{name} + %files -n python2-%{name} %{python2_sitelib}/%{name} %{python2_sitelib}/%{name}-%{version}-py?.?.egg-info +%endif %files -n python3-%{name} %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info -%files legacy -%{_bindir}/%{name} - %files utils %{python3_sitelib}/%{name}_utils %{_bindir}/%{name}-create-unified-isos @@ -197,6 +212,9 @@ nosetests-3 --exe %{_bindir}/%{name}-wait-for-signed-ostree-handler %changelog +* Wed Feb 27 2019 Lubomír Sedlář - 4.1.33-4 +- Disable legacy and python 2 packages on Fedora 31+ + * Mon Feb 25 2019 Lubomír Sedlář - 4.1.33-3 - Fix copying vmdk images from koji tasks