%global upstream_version 0.2
Name: greenwave
Version: 0.3
Release: 1%{?dist}
Summary: Service for gating on automated tests
License: GPLv2+
URL: https://pagure.io/greenwave
Source0: https://files.pythonhosted.org/packages/source/g/%{name}/%{name}-%{upstream_version}.tar.gz
# From the pre-release-2017-10-04 upstream branch.
# These are temporary solutions for these two issues:
# https://pagure.io/greenwave/issue/74
# https://pagure.io/greenwave/issue/75
Patch1: 0001-Create-a-custom-FedoraAtomicCi-rule.patch
Patch2: 0002-Special-relevance.patch
BuildRequires: python2-devel
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: python2-setuptools
BuildRequires: python2-sphinx
BuildRequires: python-sphinxcontrib-httpdomain
BuildRequires: python2-flask
BuildRequires: python2-pytest
BuildRequires: python2-requests
%else # EPEL7 uses python- naming
BuildRequires: python-setuptools
BuildRequires: python-flask
BuildRequires: pytest
BuildRequires: python-requests
%endif
%{?systemd_requires}
BuildRequires: systemd
BuildRequires: PyYAML
BuildRequires: python-dogpile-cache
BuildRequires: fedmsg
BuildArch: noarch
%if 0%{?fedora} || 0%{?rhel} > 7
Requires: python2-flask
Requires: python2-requests
%else # EPEL7 uses python- naming
Requires: python-flask
Requires: python-requests
%endif
Requires: PyYAML
Requires: python-dogpile-cache
Requires: fedmsg
%description
Greenwave is a service for gating on automated tests by querying ResultsDB and
WaiverDB.
%prep
%setup -q -n %{name}-%{upstream_version}
%patch1 -p1
%patch2 -p1
%build
%py2_build
%if 0%{?fedora}
make -C docs html text
%endif
%install
%py2_install
install -d %{buildroot}%{_unitdir}
install -m0644 \
systemd/%{name}.service \
systemd/%{name}.socket \
%{buildroot}%{_unitdir}
%check
export PYTHONPATH=%{buildroot}/%{python2_sitelib}
py.test greenwave/tests/
%files
%license COPYING
%doc README.md conf
%if 0%{?fedora}
%doc docs/_build/html docs/_build/text
%endif
%{python2_sitelib}/%{name}
%{python2_sitelib}/%{name}*.egg-info
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.socket
%post
%systemd_post %{name}.service
%systemd_post %{name}.socket
%preun
%systemd_preun %{name}.service
%systemd_preun %{name}.socket
%postun
%systemd_postun_with_restart %{name}.service
%changelog
* Wed Oct 04 2017 Dan Callaghan <dcallagh@redhat.com> - 0.3-1
- New upstream release 0.3:
https://docs.pagure.org/greenwave/release-notes.html#greenwave-0-3
- Reintroduced special relevance and FedoraAtomicCi patches
* Wed Sep 27 2017 Matt Jia <mjia@redhat.com> - 0.2-1
- new upstream release 0.2.1:
https://docs.pagure.org/greenwave/release-notes.html#greenwave-0-2
* Thu Aug 24 2017 Ralph Bean <rbean@redhat.com> - 0.1.1-6.497594f
- Reintroduce the special relevance work on top of CORS.
* Thu Aug 24 2017 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.1-4.3084808
- Hopefully the final pre-release to get CORS to work
* Thu Aug 24 2017 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.1-3.df41ae5
- Another pre-release improving CORS support
* Thu Aug 24 2017 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.1.1-2.dae6153
- Second pre-release with CORS support
* Wed Aug 23 2017 Ralph Bean <rbean@redhat.com> - 0.1.1-1.02795e8
- Pre-release.
* Tue Aug 15 2017 Matt Jia <mjia@redhat.com> - 0.1-1
- initial version