From b7b0ec2cf70ee474a03e8c88a5981d152247949f Mon Sep 17 00:00:00 2001 From: clime Date: Aug 23 2018 11:37:18 +0000 Subject: Update copr-cli to 1.72-1.fc28 --- diff --git a/.gitignore b/.gitignore index 3493691..9d61834 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /copr-cli-1.69.tar.gz /copr-cli-1.70.tar.gz /copr-cli-1.71.tar.gz +/copr-cli-1.72.tar.gz diff --git a/copr-cli.spec b/copr-cli.spec index bdf8e86..541c952 100644 --- a/copr-cli.spec +++ b/copr-cli.spec @@ -1,19 +1,13 @@ -%if 0%{?rhel} > 0 -%if 0%{?rhel} <= 7 -%global _pkgdocdir %{_docdir}/%{name}-%{version} -%endif -%if 0%{?rhel} <= 6 -%global __python2 %{__python} -%endif -%endif - -%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 -%global use_python3 1 -%global __python %{__python3} +%if 0%{?rhel} > 7 || 0%{?fedora} +%global __python %_bindir/python3 +%global with_python3 1 +%else +%global __python %_bindir/python2 +%global with_python2 1 %endif Name: copr-cli -Version: 1.71 +Version: 1.72 Release: 1%{?dist} Summary: Command line interface for COPR @@ -21,139 +15,102 @@ License: GPLv2+ URL: https://pagure.io/copr/copr # Source is created by: # git clone https://pagure.io/copr/copr.git -# git checkout copr-cli-1.71 +# git checkout copr-cli-1.72 # cd copr/cli # rpkg spec --sources -Source0: copr-cli-1.71.tar.gz +Source0: copr-cli-1.72.tar.gz BuildArch: noarch + +Requires: wget + BuildRequires: asciidoc BuildRequires: libxslt BuildRequires: util-linux -%if 0%{?use_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools + +%if %{with python3} +Requires: python3-copr >= 1.63 +Requires: python3-jinja2 +Requires: python3-simplejson + +Recommends: python3-progress + BuildRequires: python3-copr +BuildRequires: python3-devel +BuildRequires: python3-jinja2 BuildRequires: python3-pylint BuildRequires: python3-pytest +BuildRequires: python3-setuptools BuildRequires: python3-simplejson -BuildRequires: python3-jinja2 -Requires: python3-setuptools -Requires: python3-copr >= 1.63 -Requires: python3-simplejson -Requires: python3-jinja2 -Recommends: python3-progress %else -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python-copr -Requires: python-setuptools -Requires: python-copr >= 1.63 -Requires: python-simplejson -Requires: python-jinja2 +Requires: python-copr >= 1.63 +Requires: python-jinja2 +Requires: python-progress +Requires: python-simplejson -%if 0%{?rhel} > 6 BuildRequires: pytest -BuildRequires: python-simplejson +BuildRequires: python-copr +BuildRequires: python-devel BuildRequires: python-jinja2 BuildRequires: python-mock - -Requires: python-progress +BuildRequires: python-setuptools +BuildRequires: python-simplejson %endif -%endif +# We historically shipped empty doc package, uninstall it. +Obsoletes: copr-cli-doc < 1.72 -%if 0%{?rhel} < 7 && 0%{?rhel} > 0 -BuildRequires: python-argparse -%endif +%if 0%{?rhel} == 6 +Requires: python-argparse -%if 0%{?rhel} < 7 && 0%{?rhel} > 0 -Requires: python-argparse +BuildRequires: python-argparse %endif -Requires: wget - %description COPR is lightweight build system. It allows you to create new project in WebUI, and submit new builds and COPR will create yum repository from latests builds. This package contains command line interface. -%if 0%{?fedora} -%package doc -Summary: Code documentation for COPR - -%description doc -COPR is lightweight build system. It allows you to create new project in WebUI, -and submit new builds and COPR will create yum repository from latests builds. - -This package include documentation for COPR code. Mostly useful for developers -only. -%endif - %prep %setup -q %build -%if 0%{?use_python3} -version="%{version}" %{__python3} setup.py build -%else -version="%{version}" %{__python2} setup.py build -%endif - +version="%{version}" %py_build mv copr_cli/README.rst ./ - # convert manages a2x -d manpage -f manpage man/copr-cli.1.asciidoc -%install -install -d %{buildroot}%{_pkgdocdir}/ -%if 0%{?use_python3} -version="%{version}" %{__python3} setup.py install --root %{buildroot} -%else -version="%{version}" %{__python2} setup.py install --root %{buildroot} -%endif +%install +version="%{version}" %py_install ln -sf %{_bindir}/copr-cli %{buildroot}%{_bindir}/copr - install -d %{buildroot}%{_mandir}/man1 install -p -m 644 man/copr-cli.1 %{buildroot}/%{_mandir}/man1/ install -p man/copr.1 %{buildroot}/%{_mandir}/man1/ + %check -%if 0%{?use_python3} -python3-pylint ./copr_cli/*.py || : -%{__python3} -m pytest tests -%else -%if 0%{?rhel} > 6 -# elif because we need: from _pytest.capture import capsys -%{__python2} -m pytest tests -%endif -%endif +%{__python} -m pytest tests + %files %{!?_licensedir:%global license %doc} %license LICENSE %doc README.rst +%{_bindir}/copr %{_bindir}/copr-cli -%if 0%{?use_python3} -%{python3_sitelib}/* -%else -%{python2_sitelib}/* -%endif %{_mandir}/man1/copr-cli.1* %{_mandir}/man1/copr.1* -%{_bindir}/copr +%{python_sitelib}/* -%if 0%{?fedora} -%files doc -%{!?_licensedir:%global license %doc} -%license LICENSE -%endif - %changelog +* Thu Aug 23 2018 clime 1.72-1 +- generate new webhook secret functionality in copr-cli +- packaging: Python 2/3, RHEL/Fedora fixes + * Mon Aug 06 2018 clime 1.71-1 - %%{python_sitelib} → %%{python2_sitelib} diff --git a/sources b/sources index b6c91eb..8acbaa6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (copr-cli-1.71.tar.gz) = 353f01321252cbf30fbcc3af31914543cbb3edec18807713946def5e08750d4d9ab0981d5a35b99680f35dd5db336f6fe10a6686921a6b7363bcb7f4b470fb09 +SHA512 (copr-cli-1.72.tar.gz) = bca91253f605efa45113b4812f723a614eaf13048d5e6a8f820d843b2fdc747998ec7266aaf8bbb6fcee9f41166cec39eb5de94e2133d22fd9ec618bafcfa509