Sync with upstream release 52.1 (LTS series).
Correct deprecated use of unversioned python. Remove obsolete CI test directory.
This commit is contained in:
parent
19cd06ed09
commit
84b857f387
8 changed files with 46 additions and 84 deletions
|
|
@ -11,10 +11,10 @@
|
|||
%global gittar %{srcname}-%{version}.tar.gz
|
||||
%else
|
||||
%if ! 0%{?commit:1}
|
||||
%global commit bb62fe5a1fa93ea6573da46556928af5041c1b7d
|
||||
%global commit 0ddd3c7b92f18c85157766e9e0ec810e6b3dd37e
|
||||
%endif
|
||||
%if ! 0%{?commit_date:1}
|
||||
%global commit_date 20170626
|
||||
%global commit_date 20180301
|
||||
%endif
|
||||
%global shortcommit %(c=%{commit};echo ${c:0:7})
|
||||
%global gitrel .%{commit_date}git%{shortcommit}
|
||||
|
|
@ -27,14 +27,14 @@
|
|||
# enabled by default.
|
||||
# However, selftests need to be disabled when libvirt is not available.
|
||||
%global with_tests 1
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
# libvirt is not available for all RHEL builder architectures
|
||||
%global with_tests 0
|
||||
%endif
|
||||
|
||||
Name: python-%{pkgname}
|
||||
Version: 52.0
|
||||
Release: 5%{?gitrel}%{?dist}
|
||||
Version: 52.1
|
||||
Release: 1%{?gitrel}%{?dist}
|
||||
Summary: Framework with tools and libraries for Automated Testing
|
||||
Group: Development/Tools
|
||||
# Found licenses:
|
||||
|
|
@ -51,6 +51,7 @@ Source0: https://github.com/avocado-framework/%{srcname}/archive/%{version}.tar.
|
|||
Source0: https://github.com/avocado-framework/%{srcname}/archive/%{commit}.tar.gz#/%{gittar}
|
||||
%endif
|
||||
Patch0: avocado-selftest-doublefree-disable.patch
|
||||
Patch1: avocado-selftest-fix-cmdline-check.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: fabric
|
||||
BuildRequires: python2-pystache
|
||||
|
|
@ -65,14 +66,14 @@ BuildRequires: python2-resultsdb_api
|
|||
%if 0%{?with_tests}
|
||||
BuildRequires: python2-libvirt
|
||||
BuildRequires: perl(TAP::Parser)
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: python-yaml
|
||||
%else
|
||||
BuildRequires: python2-yaml
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
BuildRequires: python-psutil
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python-setuptools
|
||||
|
|
@ -105,10 +106,7 @@ BuildRequires: procps-ng
|
|||
BuildRequires: python-crypto
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 25
|
||||
BuildRequires: kmod
|
||||
%endif
|
||||
%if 0%{?rhel} >= 7
|
||||
%if 0%{?fedora} >= 25 || 0%{?rhel} >= 7
|
||||
BuildRequires: kmod
|
||||
%endif
|
||||
|
||||
|
|
@ -128,7 +126,7 @@ Requires: pyliblzma
|
|||
Requires: python2-pystache
|
||||
Requires: python2
|
||||
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
Requires: python-requests
|
||||
Requires: python-stevedore
|
||||
%else
|
||||
|
|
@ -219,7 +217,7 @@ server.
|
|||
Summary: Avocado plugin to generate variants out of yaml files
|
||||
%{?python_provide:%python_provide python2-%{pkgname}-plugins-resultsdb}
|
||||
Requires: python2-%{pkgname} == %{version}-%{release}
|
||||
%if 0%{?rhel}
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
Requires: python-yaml
|
||||
%else
|
||||
Requires: python2-yaml
|
||||
|
|
@ -249,6 +247,7 @@ examples of how to write tests on your own.
|
|||
%setup -q -n %{srcname}-%{commit}
|
||||
%endif
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
# package plugins-runner-vm requires libvirt-python, but the RPM
|
||||
# version of libvirt-python does not publish the egg info and this
|
||||
# causes that dep to be attempted to be installed by pip
|
||||
|
|
@ -296,6 +295,12 @@ popd
|
|||
pushd optional_plugins/varianter_yaml_to_mux
|
||||
%{__python2} setup.py install --root %{buildroot} --skip-build
|
||||
popd
|
||||
%{__mv} %{buildroot}%{_bindir}/avocado %{buildroot}%{_bindir}/avocado-%{python2_version}
|
||||
%{__ln_s} avocado-%{python2_version} %{buildroot}%{_bindir}/avocado-2
|
||||
%{__ln_s} avocado-%{python2_version} %{buildroot}%{_bindir}/avocado
|
||||
%{__mv} %{buildroot}%{_bindir}/avocado-rest-client %{buildroot}%{_bindir}/avocado-rest-client-%{python2_version}
|
||||
%{__ln_s} avocado-rest-client-%{python2_version} %{buildroot}%{_bindir}/avocado-rest-client-2
|
||||
%{__ln_s} avocado-rest-client-%{python2_version} %{buildroot}%{_bindir}/avocado-rest-client
|
||||
%{__mkdir_p} %{buildroot}%{_mandir}/man1
|
||||
%{__install} -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1
|
||||
%{__install} -m 0644 man/avocado-rest-client.1 %{buildroot}%{_mandir}/man1/avocado-rest-client.1
|
||||
|
|
@ -331,7 +336,9 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
|
|||
# Package build environments have the least amount of resources
|
||||
# we have observed so far. Let's avoid tests that require too
|
||||
# much resources or are time sensitive.
|
||||
AVOCADO_CHECK_LEVEL=0 selftests/run
|
||||
# Also, use of unversioned python is deprecated, so force use of python2 as per
|
||||
# https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build
|
||||
AVOCADO_CHECK_LEVEL=0 UNITTEST_AVOCADO_CMD="$HOME/.local/bin/avocado" %{__python2} selftests/run
|
||||
%endif
|
||||
|
||||
|
||||
|
|
@ -355,7 +362,11 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
|
|||
%{_sysconfdir}/avocado/scripts/job/post.d/README
|
||||
%{python2_sitelib}/avocado/
|
||||
%{python2_sitelib}/avocado_framework-%{version}-py%{python2_version}.egg-info
|
||||
%{_bindir}/avocado-%{python2_version}
|
||||
%{_bindir}/avocado-2
|
||||
%{_bindir}/avocado
|
||||
%{_bindir}/avocado-rest-client-%{python2_version}
|
||||
%{_bindir}/avocado-rest-client-2
|
||||
%{_bindir}/avocado-rest-client
|
||||
%{_mandir}/man1/avocado.1.gz
|
||||
%{_mandir}/man1/avocado-rest-client.1.gz
|
||||
|
|
@ -408,6 +419,10 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Apr 03 2018 Merlin Mathesius <mmathesi@redhat.com> - 52.1-1
|
||||
- Sync with upstream release 52.1 (LTS series).
|
||||
- Correct deprecated use of unversioned python.
|
||||
|
||||
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 52.0-5
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue