Blob Blame History Raw

%global upstream_version 0.6.1

Name:           greenwave
Version:        0.6.1
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-11-17 upstream branch.
# These are temporary solutions for these two issues:
#   https://pagure.io/greenwave/issue/74
#   https://pagure.io/greenwave/issue/75
# We think we'll be able to get rid of these in the future with
#   https://pagure.io/greenwave/issue/126
Patch1:         0001-Create-a-custom-FedoraAtomicCi-rule.patch
Patch2:         0002-Special-relevance.patch

BuildRequires:  python2-devel
%{?systemd_requires}
BuildRequires:  systemd
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires:  python2-setuptools
BuildRequires:  python2-sphinx
BuildRequires:  python2-sphinxcontrib-httpdomain
%if 0%{?fedora} >= 27
BuildRequires:  python2-sphinxcontrib-issuetracker
%else # old name
BuildRequires:  python-sphinxcontrib-issuetracker
%endif
BuildRequires:  python2-flask
BuildRequires:  python2-pytest
BuildRequires:  python2-requests
%if 0%{?fedora} >= 28
BuildRequires:  python2-pyyaml
%else # old name
BuildRequires:  PyYAML
%endif
BuildRequires:  python2-dogpile-cache
%else # EPEL7 uses python- naming
BuildRequires:  python-setuptools
BuildRequires:  python-flask
BuildRequires:  pytest
BuildRequires:  python-requests
BuildRequires:  PyYAML
BuildRequires:  python-dogpile-cache
%endif
BuildRequires:  fedmsg
BuildArch:      noarch
%if 0%{?fedora} || 0%{?rhel} > 7
Requires:  python2-flask
Requires:  python2-requests
%if 0%{?fedora} >= 28
Requires:  python2-pyyaml
%else # old name
Requires:  PyYAML
%endif
Requires:  python2-dogpile-cache
%else # EPEL7 uses python- naming
Requires:  python-flask
Requires:  python-requests
Requires:  PyYAML
Requires:  python-dogpile-cache
%endif
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}
DEV=true GREENWAVE_CONFIG=$(pwd)/conf/settings.py.example make -C docs SPHINXOPTS= 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}
TEST=true GREENWAVE_CONFIG=$(pwd)/conf/settings.py.example 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
%{_sysconfdir}/fedmsg.d/*

%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
* Thu Mar 1 2018 Ralph Bean <rbean@redhat.com> - 0.6.1-1
- Latest upstream.
- Fixes for waiving the absence of a result.

* Fri Feb 16 2018 Ralph Bean <rbean@redhat.com> - 0.6.0-2
- Rebase Fedora specific patches onto the new release.

* Fri Feb 16 2018 Giulia Naponiello <gnaponie@redhat.com> - 0.6-1
- new upstream release:
  https://docs.pagure.org/greenwave/release-notes.html#greenwave-0-6

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Fri Nov 17 2017 Matt Jia <mjia@redhat.com> - 0.5-1
- new upstream release 0.5.1:
    https://docs.pagure.org/greenwave/release-notes.html#greenwave-0-5

* Mon Oct 30 2017 Matt Jia <mjia@redhat.com> - 0.4-1
- new upstream release 0.4.1:
    https://docs.pagure.org/greenwave/release-notes.html#greenwave-0-4

* Tue Oct 24 2017 Matt Jia <mjia@redhat.com> - 0.3-4
- Use the SHA1 mangler when initializing the cache
  https://pagure.io/greenwave/pull-request/98

* Thu Oct 19 2017 Ralph Bean <rbean@redhat.com> - 0.3-3
- Apply fix for message handling.
  https://pagure.io/greenwave/pull-request/97

* Thu Oct 12 2017 Dan Callaghan <dcallagh@redhat.com> - 0.3-2
- Fix incorrect upstream tarball used

* 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