Sync with upstream release 73.0.

Adjustments to build for RHEL 8.

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
This commit is contained in:
Merlin Mathesius 2019-11-27 13:23:18 -06:00
commit b6a80deb28
3 changed files with 65 additions and 21 deletions

1
.gitignore vendored
View file

@ -19,3 +19,4 @@
/avocado-70.0.tar.gz
/avocado-71.0.tar.gz
/avocado-72.0.tar.gz
/avocado-73.0.tar.gz

View file

@ -12,10 +12,10 @@
%global gittar %{srcname}-%{version}.tar.gz
%else
%if ! 0%{?commit:1}
%global commit a918b7f3ac80bc45c9577a8f38ef069017d114c7
%global commit 25019730b046c7793cec7768f8f94834bd440485
%endif
%if ! 0%{?commit_date:1}
%global commit_date 20190917
%global commit_date 20191122
%endif
%global shortcommit %(c=%{commit};echo ${c:0:8})
%global gitrel .%{commit_date}git%{shortcommit}
@ -27,12 +27,8 @@
# the functional tests are time and resource sensitive and can
# cause race conditions and random build failures. They are
# enabled by default.
# However, selftests need to be disabled when libvirt is not available.
%global with_tests 1
%if 0%{?rhel} && 0%{?rhel} <= 7
# libvirt is not available for all RHEL builder architectures
%global with_tests 0
%endif
# Avocado is currently incompatible with the Fabric API in Fedora 31 and later
# https://github.com/avocado-framework/avocado/issues/3125
@ -49,8 +45,15 @@
%global with_python3_fabric 0
%endif
# resultsdb is only available for Fedora
%if 0%{?fedora}
%global with_resultsdb 1
%else
%global with_resultsdb 0
%endif
Name: python-%{pkgname}
Version: 72.0
Version: 73.0
Release: 1%{?gitrel}%{?dist}
Summary: Framework with tools and libraries for Automated Testing
Group: Development/Tools
@ -72,28 +75,34 @@ BuildRequires: python3-jinja2
BuildRequires: python3-lxml
BuildRequires: python3-mock
BuildRequires: python3-psutil
BuildRequires: python3-pycdlib
BuildRequires: python3-resultsdb_api
BuildRequires: python3-setuptools
BuildRequires: python3-six
BuildRequires: python3-sphinx
%if 0%{?fedora}
BuildRequires: python3-pycdlib
%endif
%if %{with_fabric}
%if %{with_python3_fabric}
BuildRequires: python3-fabric3
%endif
%endif # with_fabric
%if %{with_resultsdb}
BuildRequires: python3-resultsdb_api
%endif
%if 0%{?with_tests}
BuildRequires: genisoimage
BuildRequires: libcdio
BuildRequires: perl-Test-Harness
BuildRequires: psmisc
%if 0%{?fedora} >= 30 || 0%{?rhel} > 7
%if 0%{?fedora}
BuildRequires: perl-Test-Harness
%endif
%if 0%{?fedora} >= 30 || 0%{?rhel}
BuildRequires: glibc-all-langpacks
%endif
BuildRequires: python3-netifaces
BuildRequires: python3-yaml
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
%if 0%{?fedora} >= 27 || 0%{?rhel}
BuildRequires: python3-libvirt
%else
BuildRequires: libvirt-python3
@ -107,13 +116,12 @@ these days a framework) to perform automated testing.
%prep
%setup -q -n %{srcname}-%{gitref}
%if 0%{?rhel} && 0%{?rhel} <= 7
sed -e "s/'six>=1.10.0'/'six>=1.9.0'/" -i setup.py
sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.10'/" -i optional_plugins/varianter_yaml_to_mux/setup.py
%endif
%if 0%{?fedora} && 0%{?fedora} < 29
%if (0%{?fedora} && 0%{?fedora} < 29) || 0%{?rhel}
sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py
%endif
%if ! %{with_resultsdb}
%{__rm} -f avocado/etc/avocado/conf.d/resultsdb.conf
%endif
%build
%py3_build
@ -142,7 +150,9 @@ pushd optional_plugins/runner_docker
%endif # with_fabric
popd
pushd optional_plugins/resultsdb
%if %{with_resultsdb}
%py3_build
%endif
popd
pushd optional_plugins/varianter_yaml_to_mux
%py3_build
@ -169,7 +179,15 @@ popd
%install
%py3_install
for exe in avocado avocado-runner avocado-runner-avocado-instrumented; do
for exe in \
avocado \
avocado-runner \
avocado-runner-noop \
avocado-runner-exec \
avocado-runner-exec-test \
avocado-runner-python-unittest \
avocado-runner-avocado-instrumented
do
%{__mv} %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version}
%{__ln_s} $exe-%{python3_version} %{buildroot}%{_bindir}/$exe-3
%{__ln_s} $exe-%{python3_version} %{buildroot}%{_bindir}/$exe
@ -204,7 +222,9 @@ pushd optional_plugins/runner_docker
%endif # with_fabric
popd
pushd optional_plugins/resultsdb
%if %{with_resultsdb}
%py3_install
%endif
popd
pushd optional_plugins/varianter_yaml_to_mux
%py3_install
@ -231,6 +251,7 @@ popd
%{__rm} -rf %{buildroot}%{python3_sitelib}/tests
%{__mkdir} -p %{buildroot}%{_sysconfdir}/avocado
%{__cp} avocado/etc/avocado/avocado.conf %{buildroot}%{_sysconfdir}/avocado/avocado.conf
%{__sed} -e "s| etc/avocado/sysinfo/| /etc/avocado/sysinfo/|" -i %{buildroot}%{_sysconfdir}/avocado/avocado.conf
%{__cp} -r avocado/etc/avocado/conf.d %{buildroot}%{_sysconfdir}/avocado/conf.d
%{__cp} -r avocado/etc/avocado/scripts %{buildroot}%{_sysconfdir}/avocado/scripts
%{__cp} -r avocado/etc/avocado/sysinfo %{buildroot}%{_sysconfdir}/avocado/sysinfo
@ -275,9 +296,11 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
popd
%endif # with_python3_fabric
%endif # with_fabric
%if %{with_resultsdb}
pushd optional_plugins/resultsdb
%{__python3} setup.py develop --user
popd
%endif # with_resultsdb
pushd optional_plugins/varianter_yaml_to_mux
%{__python3} setup.py develop --user
popd
@ -322,9 +345,11 @@ Requires: gdb
Requires: gdb-gdbserver
Requires: procps-ng
Requires: python3
Requires: python3-pycdlib
Requires: python3-setuptools
Requires: python3-six
%if 0%{?fedora}
Requires: python3-pycdlib
%endif
%description -n python3-%{pkgname}
Avocado is a set of tools and libraries (what people call
@ -341,6 +366,18 @@ these days a framework) to perform automated testing.
%{_bindir}/avocado-runner-%{python3_version}
%{_bindir}/avocado-runner-3
%{_bindir}/avocado-runner
%{_bindir}/avocado-runner-noop-%{python3_version}
%{_bindir}/avocado-runner-noop-3
%{_bindir}/avocado-runner-noop
%{_bindir}/avocado-runner-exec-%{python3_version}
%{_bindir}/avocado-runner-exec-3
%{_bindir}/avocado-runner-exec
%{_bindir}/avocado-runner-exec-test-%{python3_version}
%{_bindir}/avocado-runner-exec-test-3
%{_bindir}/avocado-runner-exec-test
%{_bindir}/avocado-runner-python-unittest-%{python3_version}
%{_bindir}/avocado-runner-python-unittest-3
%{_bindir}/avocado-runner-python-unittest
%{_bindir}/avocado-runner-avocado-instrumented-%{python3_version}
%{_bindir}/avocado-runner-avocado-instrumented-3
%{_bindir}/avocado-runner-avocado-instrumented
@ -451,6 +488,7 @@ be previously installed on the container.
%endif # with_fabric
%if %{with_resultsdb}
%package -n python3-%{pkgname}-plugins-resultsdb
Summary: Avocado plugin to propagate job results to ResultsDB
%{?python_provide:%python_provide python3-%{pkgname}-plugins-resultsdb}
@ -465,6 +503,7 @@ server.
%{python3_sitelib}/avocado_resultsdb/
%{python3_sitelib}/avocado_framework_plugin_resultsdb-%{version}-py%{python3_version}.egg-info
%config(noreplace) %{_sysconfdir}/avocado/conf.d/resultsdb.conf
%endif # with_resultsdb
%package -n python3-%{pkgname}-plugins-varianter-yaml-to-mux
@ -611,6 +650,10 @@ Again Shell code (and possibly other similar shells).
%changelog
* Wed Nov 27 2019 Merlin Mathesius <mmathesi@redhat.com> - 73.0-1
- Sync with upstream release 73.0.
- Adjustments to build for RHEL 8.
* Wed Oct 02 2019 Merlin Mathesius <mmathesi@redhat.com> - 72.0-1
- Sync with upstream release 72.0.

View file

@ -1 +1 @@
SHA512 (avocado-72.0.tar.gz) = 291a399197c95abb7ed3a18c79793020542a928185652999fffe3042cca530422234d44916261cad26bfb08932a57dd5db8db0412bec0f071fe9a7cbd8505076
SHA512 (avocado-73.0.tar.gz) = 3c6e1e83f475f8398446165ff31d30a86ca8153d229ccd4002d9f22735b06d5aba8df9817606124b5c8dd37256a55bde5f227b978be9ea7c1bdaa26ba5be8d01