| |
@@ -1,35 +1,37 @@
|
| |
- %if 0%{?rhel} && 0%{?rhel} <= 6
|
| |
- %{!?__python2: %global __python2 /usr/bin/python2}
|
| |
- %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
| |
- %endif
|
| |
-
|
| |
- %if 0%{?fedora}
|
| |
+ # Enable Python 3 builds for Fedora/RHEL8
|
| |
+ %if 0%{?fedora} || 0%{?rhel} >= 8
|
| |
%bcond_without python3
|
| |
+ # If the definition isn't available for python3_pkgversion, define it
|
| |
+ %{?!python3_pkgversion:%global python3_pkgversion 3}
|
| |
%else
|
| |
%bcond_with python3
|
| |
%endif
|
| |
|
| |
- %global module koji_containerbuild
|
| |
-
|
| |
- %global owner release-engineering
|
| |
- %global project koji-containerbuild
|
| |
+ %if 0%{?rhel} && 0%{?rhel} <= 6
|
| |
+ %{!?__python2: %global __python2 /usr/bin/python2}
|
| |
+ %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
| |
+ %endif
|
| |
|
| |
- %global commit dab7501bd461e4ce85c5238f62cb353b3c6e8189
|
| |
- %global shortcommit %(c=%{commit}; echo ${c:0:7})
|
| |
+ %global module koji_containerbuild
|
| |
|
| |
- Name: %{project}
|
| |
- Version: 0.7.15
|
| |
- Release: 2%{?dist}
|
| |
+ Name: koji-containerbuild
|
| |
+ Version: 0.7.21
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Koji support for building layered container images
|
| |
+ Group: 0.7.15.1ions/System
|
| |
|
| |
License: LGPLv2
|
| |
- URL: https://github.com/%{owner}/%{project}
|
| |
- Source0: https://github.com/%{owner}/%{project}/archive/%{commit}/%{project}-%{commit}.tar.gz
|
| |
+ URL: https://github.com/containerbuildsystem/%{name}
|
| |
+ Source0: https://github.com/containerbuildsystem/%{name}/archive/%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
|
| |
- BuildRequires: python3
|
| |
+ %if 0%{with python3}
|
| |
BuildRequires: python3-devel
|
| |
- BuildRequires: python3-setuptools
|
| |
+ BuildRequires: python3-setuptools
|
| |
+ %else
|
| |
+ BuildRequires: python2-devel
|
| |
+ BuildRequires: python-setuptools
|
| |
+ %endif
|
| |
|
| |
%description
|
| |
Koji support for building layered container images
|
| |
@@ -38,6 +40,7 @@
|
| |
%package hub
|
| |
License: LGPLv2
|
| |
Summary: Hub plugin that extend Koji to build layered container images
|
| |
+ Group: Applications/System
|
| |
Requires: koji-containerbuild
|
| |
Requires: koji-hub
|
| |
|
| |
@@ -48,52 +51,103 @@
|
| |
%package builder
|
| |
License: LGPLv2
|
| |
Summary: Builder plugin that extend Koji to build layered container images
|
| |
+ Group: Applications/System
|
| |
Requires: koji-builder
|
| |
Requires: koji-containerbuild
|
| |
Requires: osbs-client
|
| |
- Requires: python3-urlgrabber
|
| |
- Requires: python3-dockerfile-parse
|
| |
+ Requires: python-dockerfile-parse
|
| |
+ %if 0%{with python3}
|
| |
+ Requires: python3-jsonschema
|
| |
+ Requires: python3-six
|
| |
+ %else
|
| |
+ Requires: python2-jsonschema
|
| |
+ Requires: python-six
|
| |
+ %endif
|
| |
|
| |
%description builder
|
| |
Builder plugin that extend Koji to communicate with OpenShift build system and
|
| |
build layered container images.
|
| |
|
| |
- %package -n python3-%{name}-cli
|
| |
+
|
| |
+ %package -n python2-%{name}-cli
|
| |
License: LGPLv2
|
| |
Summary: CLI that communicates with Koji to control building layered container images
|
| |
+ Group: Applications/System
|
| |
+ %{?python_provide:%python_provide python2-%{name}-cli}
|
| |
+ Provides: koji-containerbuild-cli
|
| |
+ Requires: python2-koji >= 1.13
|
| |
+
|
| |
+ %description -n python2-%{name}-cli
|
| |
+ Builder plugin that extend Koji to communicate with OpenShift build system and
|
| |
+ build layered container images.
|
| |
+
|
| |
+ %if 0%{with python3}
|
| |
+ %package -n python%{python3_pkgversion}-%{name}-cli
|
| |
+ License: LGPLv2
|
| |
+ Summary: CLI that communicates with Koji to control building layered container images
|
| |
+ Group: Applications/System
|
| |
+ %{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-cli}
|
| |
+ Provides: koji-containerbuild-cli
|
| |
Requires: python%{python3_pkgversion}-koji >= 1.13
|
| |
|
| |
- %description -n python3-%{name}-cli
|
| |
+ %description -n python%{python3_pkgversion}-%{name}-cli
|
| |
Builder plugin that extend Koji to communicate with OpenShift build system and
|
| |
build layered container images.
|
| |
+ %endif
|
| |
+
|
| |
|
| |
%prep
|
| |
- %setup -qn %{name}-%{commit}
|
| |
+ %setup -q
|
| |
+
|
| |
|
| |
%build
|
| |
+ %if 0%{with python3}
|
| |
%{__python3} setup.py build
|
| |
+ %else
|
| |
+ %{__python2} setup.py build
|
| |
+ %endif
|
| |
|
| |
|
| |
%install
|
| |
+ rm -rf $RPM_BUILD_ROOT
|
| |
+ %if 0%{with python3}
|
| |
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
| |
+ %else
|
| |
+ %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
| |
+ %endif
|
| |
%{__install} -d $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins
|
| |
%{__install} -p -m 0644 %{module}/plugins/hub_containerbuild.py $RPM_BUILD_ROOT%{_prefix}/lib/koji-hub-plugins/hub_containerbuild.py
|
| |
%{__install} -d $RPM_BUILD_ROOT%{_prefix}/lib/koji-builder-plugins
|
| |
%{__install} -p -m 0644 %{module}/plugins/builder_containerbuild.py $RPM_BUILD_ROOT%{_prefix}/lib/koji-builder-plugins/builder_containerbuild.py
|
| |
+
|
| |
+ %if 0%{with python3}
|
| |
%{__install} -d $RPM_BUILD_ROOT%{python3_sitelib}/koji_cli_plugins
|
| |
%{__install} -p -m 0644 %{module}/plugins/cli_containerbuild.py $RPM_BUILD_ROOT%{python3_sitelib}/koji_cli_plugins/cli_containerbuild.py
|
| |
+ %else
|
| |
+ %{__install} -d $RPM_BUILD_ROOT%{python2_sitelib}/koji_cli_plugins
|
| |
+ %{__install} -p -m 0644 %{module}/plugins/cli_containerbuild.py $RPM_BUILD_ROOT%{python2_sitelib}/koji_cli_plugins/cli_containerbuild.py
|
| |
+ %endif
|
| |
|
| |
|
| |
%files
|
| |
+ %if 0%{with python3}
|
| |
%{python3_sitelib}/*
|
| |
+ %else
|
| |
+ %{python2_sitelib}/*
|
| |
+ %endif
|
| |
%doc docs AUTHORS README.rst
|
| |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
| |
%{!?_licensedir:%global license %doc}
|
| |
%endif
|
| |
%license LICENSE
|
| |
|
| |
+ %if 0%{with python3}
|
| |
%files -n python%{python3_pkgversion}-%{name}-cli
|
| |
%{python3_sitelib}/koji_cli_plugins
|
| |
+ %else
|
| |
+ %files -n python2-%{name}-cli
|
| |
+ %{python2_sitelib}/koji_cli_plugins
|
| |
+ %endif
|
| |
|
| |
%files hub
|
| |
%{_prefix}/lib/koji-hub-plugins/hub_containerbuild.py*
|
| |
@@ -101,8 +155,14 @@
|
| |
%files builder
|
| |
%{_prefix}/lib/koji-builder-plugins/builder_containerbuild.py*
|
| |
|
| |
+ %clean
|
| |
+ rm -rf $RPM_BUILD_ROOT
|
| |
+
|
| |
|
| |
%changelog
|
| |
+ * Tue Mar 31 2020 Packit Service <user-cont-team+packit-service@redhat.com> - 0.7.21-1
|
| |
+ - new upstream release: 0.7.21
|
| |
+
|
| |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.15-2
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
| |
|
| |
Upstream tag: 0.7.21
Upstream commit: 682b4930