Switch kojid back to Python 2 so that imgfac doesn't get disabled

epel9
Neal Gompa 6 years ago
parent 03d3c69b46
commit 5b3fde9978

@ -44,6 +44,9 @@
%endif %endif
%endif %endif
# Until imgfac is ported, keep kojid at py2
%bcond_without py2_kojid
# Lastly enforce the bcond parameters # Lastly enforce the bcond parameters
%if %{without python2} %if %{without python2}
%define py2_support 0 %define py2_support 0
@ -78,7 +81,7 @@
Name: koji Name: koji
Version: 1.17.0 Version: 1.17.0
Release: 4%{?dist} Release: 5%{?dist}
# the included arch lib from yum's rpmUtils is GPLv2+ # the included arch lib from yum's rpmUtils is GPLv2+
License: LGPLv2 and GPLv2+ License: LGPLv2 and GPLv2+
Summary: Build system tools Summary: Build system tools
@ -294,7 +297,7 @@ Requires: /usr/bin/cvs
Requires: /usr/bin/svn Requires: /usr/bin/svn
Requires: /usr/bin/git Requires: /usr/bin/git
Requires: createrepo_c >= 0.10.0 Requires: createrepo_c >= 0.10.0
%if 0%{py3_support} > 1 %if 0%{py3_support} > 1 && (! %{with py2_kojid})
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release} Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Requires: python%{python3_pkgversion}-librepo Requires: python%{python3_pkgversion}-librepo
Requires: python%{python3_pkgversion}-multilib Requires: python%{python3_pkgversion}-multilib
@ -442,7 +445,7 @@ done
%if 0%{py3_support} > 1 %if 0%{py3_support} > 1
make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} %{?install_opt} install
# alter python interpreter in koji CLI # alter python interpreter in koji CLI
scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow scripts='%{_bindir}/koji %{!?with_py2_kojid:%{_sbindir}/kojid} %{_sbindir}/kojira %{_sbindir}/koji-shadow
%{_sbindir}/koji-gc %{_sbindir}/kojivmd' %{_sbindir}/koji-gc %{_sbindir}/kojivmd'
for fn in $scripts ; do for fn in $scripts ; do
sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn
@ -687,6 +690,9 @@ fi
%endif %endif
%changelog %changelog
* Mon Mar 11 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-5
- Switch kojid back to Python 2 so that imgfac doesn't get disabled
* Sun Mar 10 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-4 * Sun Mar 10 2019 Neal Gompa <ngompa13@gmail.com> - 1.17.0-4
- Add patch proposed upstream to use createrepo_c by default to drop yum dependency - Add patch proposed upstream to use createrepo_c by default to drop yum dependency

Loading…
Cancel
Save