diff --git a/.gitignore b/.gitignore index 1725b4d..966cf42 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /copr-rpmbuild-0.20.tar.gz /copr-rpmbuild-0.21.tar.gz /copr-rpmbuild-0.22.tar.gz +/copr-rpmbuild-0.24.tar.gz diff --git a/0001-rpmbuild-support-priority-appendix-for-a-repo-url-an.patch b/0001-rpmbuild-support-priority-appendix-for-a-repo-url-an.patch deleted file mode 100644 index 11d18e7..0000000 --- a/0001-rpmbuild-support-priority-appendix-for-a-repo-url-an.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1fb7dd4717d8f45406a9effe51a9b2f28764a25c Mon Sep 17 00:00:00 2001 -From: clime -Date: Wed, 31 Oct 2018 20:24:43 +0100 -Subject: [PATCH] [rpmbuild] support ,priority= appendix for a repo url and - interpret it as dnf repo priority - ---- - rpmbuild/main.py | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/main.py b/main.py -index 22f3e422..0f1af989 100755 ---- a/main.py -+++ b/main.py -@@ -219,6 +219,13 @@ def get_task(args, config, build_config_url_path=None, task_id=None): - task['repos'] = get_additional_repo_configs( - task['additional_repos'], args.chroot, config.get('main', 'backend_url')) - -+ if task.get('repos'): -+ for i in range(len(task['repos'])): -+ match = re.match('(.*),priority=([0-9]+)$', task['repos'][i]['url']) -+ if match: -+ task['repos'][i]['url'] = match.group(1) -+ task['repos'][i]['priority'] = match.group(2) -+ - return task - - --- -2.17.0 - diff --git a/copr-rpmbuild.spec b/copr-rpmbuild.spec index 9bab227..a070953 100644 --- a/copr-rpmbuild.spec +++ b/copr-rpmbuild.spec @@ -11,30 +11,29 @@ %endif Name: copr-rpmbuild -Version: 0.22 +Version: 0.24 Summary: Run COPR build tasks -Release: 4%{?dist} +Release: 1%{?dist} URL: https://pagure.io/copr/copr License: GPLv2+ BuildArch: noarch # Source is created by: # git clone https://pagure.io/copr/copr.git -# git checkout copr-rpmbuild-0.22 +# git checkout copr-rpmbuild-0.24 # cd copr/rpmbuild # rpkg spec --sources -Source0: copr-rpmbuild-0.22.tar.gz -Patch0: 0001-rpmbuild-support-priority-appendix-for-a-repo-url-an.patch +Source0: copr-rpmbuild-0.24.tar.gz -BuildRequires: %python-devel -BuildRequires: %rpm_python +BuildRequires: %{python}-devel +BuildRequires: %{rpm_python} BuildRequires: asciidoc -BuildRequires: %python-setuptools -BuildRequires: %python-pytest -BuildRequires: %python_pfx-munch -BuildRequires: %python-requests -BuildRequires: %python_pfx-jinja2 -BuildRequires: %python-configparser +BuildRequires: %{python}-setuptools +BuildRequires: %{python}-pytest +BuildRequires: %{python_pfx}-munch +BuildRequires: %{python}-requests +BuildRequires: %{python_pfx}-jinja2 +BuildRequires: %{python}-configparser BuildRequires: python-rpm-macros @@ -43,20 +42,21 @@ BuildRequires: python2-mock %endif Requires: %python -Requires: %python_pfx-jinja2 -Requires: %python_pfx-munch -Requires: %python-configparser -Requires: %python-requests -Requires: %python_pfx-simplejson +Requires: %{python_pfx}-jinja2 +Requires: %{python_pfx}-munch +Requires: %{python}-configparser +Requires: %{python}-requests +Requires: %{python_pfx}-simplejson Requires: mock Requires: git Requires: git-svn -Requires: rpkg Requires: expect -Requires: tito %if 0%{?fedora} || 0%{?rhel} > 7 +Recommends: rpkg +Recommends: python-srpm-macros +Suggests: tito Suggests: rubygem-gem2rpm Suggests: pyp2rpm %endif @@ -66,9 +66,24 @@ Provides command capable of running COPR build-tasks. Example: copr-rpmbuild 12345-epel-7-x86_64 will locally build build-id 12345 for chroot epel-7-x86_64. +%package -n copr-builder +Summary: copr-rpmbuild with all weak dependencies +Requires: %{name} = %{version}-%{release} +Requires: rpkg +Requires: tito +Requires: rubygem-gem2rpm +Requires: pyp2rpm +Requires: python-srpm-macros + +%description -n copr-builder +Provides command capable of running COPR build-tasks. +Example: copr-rpmbuild 12345-epel-7-x86_64 will locally +build build-id 12345 for chroot epel-7-x86_64. + +This package contains all optional modules for building SRPM. + %prep %setup -q -%patch0 -p1 %check PYTHON=%{python} ./run_tests.sh @@ -115,16 +130,30 @@ name="%{name}" version="%{version}" summary="%{summary}" %py_install %config(noreplace) %{_sysconfdir}/copr-rpmbuild/rpkg.conf.j2 %config(noreplace) %{_sysconfdir}/copr-rpmbuild/make_srpm_mock.cfg -%changelog -* Thu Jan 31 2019 Fedora Release Engineering - 0.22-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Wed Oct 31 2018 clime 0.22-3 -- fix the patch for srpm builds +%files -n copr-builder +%license LICENSE -* Wed Oct 31 2018 clime 0.22-2 -- add patch to support ,priority= appendix for a repo url and - interpret it as dnf repo priority +%changelog +* Thu Jan 10 2019 Miroslav Suchý 0.24-1 +- create copr-rpmbuild-all subpackage +- Fix `copr-cli mock-config` after switching to APIv3 by preprocessing repos on +frontend +- add python-srpm-macros +- print nice error when suggested package is not installed +- tito and rpkg should be required only by copr-builder +- create copr-builder +- let mock rootdir generation on clients +- rename repos 'url' attribute to 'baseurl' +- provide repo_id in project chroot build config +- Allow per-package chroot-blacklisting by wildcard patterns +- preprocess repo URLs on frontend +- revert back Suggests +- drop "downloading" state +- allow blacklisting packages from chroots + +* Fri Oct 19 2018 Miroslav Suchý 0.23-1 +- /usr/bin/env python3 -> /usr/bin/python3 +- nicer live logs * Tue Sep 18 2018 clime 0.22-1 - make spec_template for pypi in build config optional diff --git a/sources b/sources index af7c9d3..8131321 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (copr-rpmbuild-0.22.tar.gz) = 3e9b3f856277bd27bca3910a812c19d034ac7c1e9d745727a24d514daab61b2b6af1324445624ce0609a22928eaadc4bdb4e760000ce83a1d5c5c74bf523a090 +SHA512 (copr-rpmbuild-0.24.tar.gz) = bbe3827b32953f041b98021a81d4b066b69d255750a0d022b8553a617b8a2fb8cbec1b072e5b4d5c3ed195baab73b91027772be4983e639960d07c0868f3757f