From 5b43f913ba669b260ab5e06cf6e29bbb5dd24439 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Nov 09 2017 03:24:42 +0000 Subject: Specfile reconciliation. As described in https://pagure.io/waiverdb/issue/90, I modified the specfile in Fedora's distgit to produce a separate cli subpackage, but didn't update the specfile in our repo here. This brings those downstream changes back upstream to try and reconcile the two copies. Long-term, I agree - we want to move the waiverdb-cli tool out into its own python module. This commit and PR are just to get our divergent copies back in line. --- diff --git a/waiverdb.spec b/waiverdb.spec index 2ff001b..abd6f2a 100644 --- a/waiverdb.spec +++ b/waiverdb.spec @@ -81,13 +81,42 @@ Requires: stomppy %endif Requires: fedmsg +Requires: waiverdb-common = %{version}-%{release} + %description WaiverDB is a companion service to ResultsDB, for recording waivers against test results. +%package common +Summary: Common resources for WaiverDB subpackages. + +%description common +This package is not useful on its own. It contains common filesystem resources +for other WaiverDB subpackages. + +%package cli +Summary: A CLI tool for interacting with waiverdb +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: python2-click +Requires: python2-click +%else +BuildRequires: python-click +Requires: python-click +%endif + +Requires: waiverdb-common = %{version}-%{release} + +%description cli +This package contains a CLI tool for interacting with waiverdb. + +Primarily, submitting new waiverdbs. + %prep %setup -q -n %{name}-%{upstream_version} +# Replace any staging urls with prod ones +sed -i 's/\.stg\.fedoraproject\.org/.fedoraproject.org/g' conf/client.conf.example + %build %py2_build %if 0%{?fedora} @@ -102,21 +131,34 @@ install -m0644 \ systemd/%{name}.socket \ %{buildroot}%{_unitdir} +install -d %{buildroot}%{_sysconfdir}/waiverdb/ +install -m0644 \ + conf/client.conf.example \ + %{buildroot}%{_sysconfdir}/waiverdb/client.conf + %check export PYTHONPATH=%{buildroot}/%{python2_sitelib} py.test tests/ %files +%{python2_sitelib}/%{name} +%{_unitdir}/%{name}.service +%{_unitdir}/%{name}.socket + +%files common %license COPYING %doc README.md conf %if 0%{?fedora} %doc docs/_build/html docs/_build/text %endif -%{python2_sitelib}/%{name} +%{python2_sitelib}/%{name}/__init__.py* %{python2_sitelib}/%{name}*.egg-info + +%files cli +%license COPYING +%{python2_sitelib}/%{name}/cli.py* %attr(755,root,root) %{_bindir}/waiverdb-cli -%{_unitdir}/%{name}.service -%{_unitdir}/%{name}.socket +%config(noreplace) %{_sysconfdir}/waiverdb/client.conf %post %systemd_post %{name}.service