From 7a51ac872e2db30d70f1d13b6b1cf5494f59dd47 Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Aug 04 2021 11:04:51 +0000 Subject: Fix rpmbuild and rpmlint warnings --- diff --git a/docs/conf.py b/docs/conf.py index 41ea38c..3a27374 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -148,6 +148,8 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ + ('waiverdb', 'waiverdb', u'WaiverDB Server', + [author], 1), ('waiverdb-cli', 'waiverdb-cli', u'WaiverDB Client', [author], 1), ('client-conf', 'client.conf', u'waiverdb-cli configuration file', diff --git a/docs/index.rst b/docs/index.rst index 94f07d8..f22c9c0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,6 +11,7 @@ test results. user-guide api waiverdb-cli + waiverdb client-conf developer-guide admin-guide diff --git a/docs/waiverdb.rst b/docs/waiverdb.rst new file mode 100644 index 0000000..2e8da4a --- /dev/null +++ b/docs/waiverdb.rst @@ -0,0 +1,22 @@ +.. _waiverdb: + +======== +waiverdb +======== + +Synopsis +======== + +``waiverdb [OPTIONS]`` + +Description +=========== + +**waiverdb** is CLI tool managing WaiverDB server application. + +Options +======= + +.. option:: wait_for_db + + Wait until database server is reachable. diff --git a/rpmbuild.sh b/rpmbuild.sh index b94210f..a5ca3d7 100755 --- a/rpmbuild.sh +++ b/rpmbuild.sh @@ -19,7 +19,10 @@ source "$HERE"/version.sh name=waiverdb workdir="$(mktemp -d)" -trap "rm -rf $workdir" EXIT +cleanup() { + rm -rf "$workdir" +} +trap cleanup EXIT outdir="$(readlink -f ./rpmbuild-output)" mkdir -p "$outdir" @@ -29,11 +32,11 @@ if [ -n "$WAIVERDB_RPM_RELEASE" ] ; then sed --regexp-extended --in-place \ -e "/^Version:/cVersion: ${WAIVERDB_RPM_VERSION}" \ -e "/^Release:/cRelease: ${WAIVERDB_RPM_RELEASE}%{?dist}" \ - -e "/^Source0:/cSource0: waiverdb-${WAIVERDB_RPM_VERSION}.${WAIVERDB_RPM_RELEASE}.tar.gz" \ + -e "/^Source0:/cSource0: waiverdb-${WAIVERDB_RPM_VERSION}.tar.gz" \ "$workdir/${name}.spec" # also hack the Python module version sed --regexp-extended --in-place \ - -e "/^__version__ = /c\\__version__ = '$WAIVERDB_VERSION'" \ + -e "/^__version__ = /c\\__version__ = '$WAIVERDB_RPM_VERSION'" \ "$workdir/waiverdb/__init__.py" fi ( cd "$workdir" && python3 setup.py sdist ) diff --git a/version.sh b/version.sh index 99c4ac7..28e33a0 100644 --- a/version.sh +++ b/version.sh @@ -17,7 +17,7 @@ else commitcount=$(git rev-list "$revbase" HEAD | wc -l) fi -if [ "$(git rev-list "$revbase" HEAD | wc -l)" -eq 0 ] ; then +if [ "$commitcount" -eq 0 ] ; then # building a tag rpmver="" rpmrel="" diff --git a/waiverdb.spec b/waiverdb.spec index 83dae17..2fcac09 100644 --- a/waiverdb.spec +++ b/waiverdb.spec @@ -64,11 +64,11 @@ WaiverDB is a companion service to ResultsDB, for recording waivers against test results. %package common -Summary: Common resources for WaiverDB subpackages. +Summary: Common resources for WaiverDB sub-packages %description common This package is not useful on its own. It contains common filesystem resources -for other WaiverDB subpackages. +for other WaiverDB sub-packages. %package cli Summary: A CLI tool for interacting with waiverdb @@ -82,7 +82,7 @@ Requires: waiverdb-common = %{version}-%{release} %description cli This package contains a CLI tool for interacting with waiverdb. -Primarily, submitting new waiverdbs. +Primarily, submitting new waivers. %prep %setup -q -n %{name}-%{version} @@ -98,6 +98,7 @@ sed -i 's/\.stg\.fedoraproject\.org/.fedoraproject.org/g' conf/client.conf.examp %py3_build %if %{with docs} make -C docs html man text +rm -rf docs/_build/html/.buildinfo %endif %install @@ -120,6 +121,10 @@ install -D -m0644 \ %{buildroot}%{_mandir}/man1/waiverdb-cli.1 install -D -m0644 \ + docs/_build/man/waiverdb.1 \ + %{buildroot}%{_mandir}/man1/waiverdb.1 + +install -D -m0644 \ docs/_build/man/client.conf.5 \ %{buildroot}%{_mandir}/man5/waiverdb-client.conf.5 @@ -141,6 +146,10 @@ install -D -m0644 \ %exclude %{python3_sitelib}/%{name}/cli.py %exclude %{python3_sitelib}/%{name}/__pycache__/cli.*.pyc %attr(755,root,root) %{_bindir}/waiverdb + +%if %{with docs} +%{_mandir}/man1/waiverdb.1* +%endif %endif %files common