diff options
author | CoprDistGit <infra@openeuler.org> | 2025-03-23 11:24:21 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-03-23 11:24:21 +0000 |
commit | 840c57aed2fb1e903db1d66ef6b9a789a55f70bf (patch) | |
tree | e1600b1950cde31ee4262e7176b1a0975efa9910 | |
parent | e80d6f810440f4c9eac2d54d79d62169646ffbfc (diff) |
automatic import of copr-rpmbuild
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | copr-rpmbuild.spec | 147 | ||||
-rw-r--r-- | sources | 2 |
3 files changed, 89 insertions, 61 deletions
@@ -1 +1,2 @@ /copr-rpmbuild-0.68.tar.gz +/copr-rpmbuild-1.2.tar.gz diff --git a/copr-rpmbuild.spec b/copr-rpmbuild.spec index 993efbf..7e835f1 100644 --- a/copr-rpmbuild.spec +++ b/copr-rpmbuild.spec @@ -4,7 +4,7 @@ %global rpm_python python3-rpm %global sitelib %python3_sitelib -%global copr_common_version 0.12.1.dev +%global copr_common_version 0.21.1.dev # do not build debuginfo sub-packages %define debug_package %nil @@ -14,7 +14,7 @@ Requires: %1 \ %{expand: %%global latest_requires_packages %1 %%{?latest_requires_packages}} Name: copr-rpmbuild -Version: 0.68 +Version: 1.2 Summary: Run COPR build tasks Release: 1%{?dist} URL: https://github.com/fedora-copr/copr @@ -28,22 +28,26 @@ Source0: %name-%version.tar.gz BuildRequires: %{python}-copr-common >= %copr_common_version BuildRequires: %{python}-devel BuildRequires: %{python}-distro -%if 0%{?rhel} == 0 || 0%{?rhel} != 6 BuildRequires: %{python}-httmock -%endif BuildRequires: %{rpm_python} BuildRequires: asciidoc +BuildRequires: dist-git-client BuildRequires: git BuildRequires: %{python}-setuptools BuildRequires: %{python}-pytest BuildRequires: %{python_pfx}-munch BuildRequires: %{python}-requests BuildRequires: %{python_pfx}-jinja2 -BuildRequires: %{python_pfx}-simplejson +BuildRequires: %{python_pfx}-specfile >= 0.21.0 BuildRequires: python3-backoff >= 1.9.0 +BuildRequires: python3-pyyaml +%if 0%{?fedora} || 0%{?rhel} >= 9 +BuildRequires: subscription-manager +%endif BuildRequires: /usr/bin/argparse-manpage BuildRequires: python-rpm-macros +BuildRequires: systemd-rpm-macros %if "%{?python}" == "python2" BuildRequires: python2-configparser @@ -56,15 +60,19 @@ Requires: %{python}-copr-common >= %copr_common_version Requires: %{python_pfx}-jinja2 Requires: %{python_pfx}-munch Requires: %{python}-requests -Requires: %{python_pfx}-simplejson +Requires: %{python_pfx}-specfile >= 0.21.0 Requires: python3-backoff >= 1.9.0 +Requires: python3-pyyaml -Requires: mock >= 2.0 +Requires: mock >= 5.0 +Requires(pre): mock-filesystem Requires: git Requires: git-svn # for the /bin/unbuffer binary Requires: expect -%if !0%{?openEuler} +%if 0%{?openEuler} > 0 || 0%{?rhel} > 0 +# qemu-user-static is not supported +%else Requires: qemu-user-static %endif Requires: sed @@ -72,10 +80,11 @@ Requires: sed %if 0%{?fedora} || 0%{?rhel} > 7 Recommends: rpkg Recommends: python-srpm-macros +Recommends: dist-git-client Suggests: tito Suggests: rubygem-gem2rpm Suggests: pyp2rpm -Suggests: pyp2spec +Suggests: pyp2spec >= 0.10.0 %endif %description @@ -87,9 +96,9 @@ 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: copr-distgit-client = %{version}-%{release} +Requires: dist-git-client -%if 0%{?fedora} +%if 0%{?fedora} && 0%{?fedora} < 41 # replacement for yum/yum-utils, to be able to work with el* chroots # bootstrap_container. Requires: dnf-yum @@ -104,9 +113,11 @@ Requires: nosync %endif Requires: openssh-clients Requires: podman -%if !0%{?openEuler} +%if 0%{?openEuler} > 0 || 0%{?rhel} > 0 +# not supported +%else Requires: pyp2rpm -Requires: pyp2spec +Requires: pyp2spec >= 0.10.0 Requires: rubygem-gem2rpm Requires: scl-utils-build Requires: fedora-review >= 0.8 @@ -150,30 +161,9 @@ build build-id 12345 for chroot epel-7-x86_64. This package contains all optional modules for building SRPM. -%package -n copr-distgit-client -Summary: Utility to download sources from dist-git - -Requires: %{_bindir}/git -Requires: curl -%if 0%{?fedora} || 0%{?rhel} > 9 -Requires: %{python_pfx}-rpmautospec -BuildRequires: %{python_pfx}-rpmautospec -%endif - - -%description -n copr-distgit-client -A simple, configurable python utility that is able to download sources from -various dist-git instances, and generate source RPMs. - -The utility is able to automatically map the .git/config clone URL into -the corresponding dist-git instance configuration. - - %prep %setup -q -for script in bin/copr-rpmbuild* \ - bin/copr-distgit* -do +for script in bin/copr-rpmbuild*; do sed -i '1 s|#.*python.*|#! /usr/bin/%python|' "$script" done @@ -234,6 +224,7 @@ install -m 644 mock.cfg.j2 %{buildroot}%{_sysconfdir}/copr-rpmbuild/mock.cfg.j2 install -m 644 rpkg.conf.j2 %{buildroot}%{_sysconfdir}/copr-rpmbuild/rpkg.conf.j2 install -m 644 mock-source-build.cfg.j2 %{buildroot}%{_sysconfdir}/copr-rpmbuild/ install -m 644 mock-custom-build.cfg.j2 %{buildroot}%{_sysconfdir}/copr-rpmbuild/ +install -m 644 copr-rpmbuild.yml %{buildroot}%{_sysconfdir}/copr-rpmbuild/copr-rpmbuild.yml cat <<EOF > %buildroot%mock_config_overrides/README Contents of this directory is used by %_bindir/copr-update-builder script. @@ -244,7 +235,7 @@ EOF install -d %{buildroot}%{_mandir}/man1 install -p -m 644 man/copr-rpmbuild.1 %{buildroot}/%{_mandir}/man1/ -install -p -m 755 bin/copr-builder-cleanup %buildroot%_bindir +install -p -m 755 bin/copr-builder* %buildroot%_bindir install -p -m 755 bin/copr-sources-custom %buildroot%_bindir install -p -m 755 bin/copr-rpmbuild-cancel %buildroot%_bindir install -p -m 755 bin/copr-rpmbuild-log %buildroot%_bindir @@ -263,18 +254,10 @@ install -p -m 755 copr-update-builder %buildroot%_bindir done ) -install -p -m 755 bin/copr-distgit-client %buildroot%_bindir -argparse-manpage --pyfile copr_distgit_client.py \ - --function _get_argparser \ - --author "Copr Team" \ - --author-email "copr-team@redhat.com" \ - --url %url --project-name Copr \ -> %{buildroot}%{_mandir}/man1/copr-distgit-client.1 -mkdir -p %{buildroot}%{_sysconfdir}/copr-distgit-client -install -p -m 644 etc/copr-distgit-client/default.ini \ - %{buildroot}%{_sysconfdir}/copr-distgit-client -mkdir -p %{buildroot}%{sitelib} -install -p -m 644 copr_distgit_client.py %{buildroot}%{expand:%%%{python}_sitelib} +mkdir %{buildroot}%{_tmpfilesdir} +cat > %{buildroot}%{_tmpfilesdir}/copr-builder.conf <<EOF +d /run/copr-builder 0775 root mock - +EOF %files @@ -297,29 +280,73 @@ install -p -m 644 copr_distgit_client.py %{buildroot}%{expand:%%%{python}_siteli %config(noreplace) %{_sysconfdir}/copr-rpmbuild/rpkg.conf.j2 %config(noreplace) %{_sysconfdir}/copr-rpmbuild/mock-source-build.cfg.j2 %config(noreplace) %{_sysconfdir}/copr-rpmbuild/mock-custom-build.cfg.j2 +%config(noreplace) %{_sysconfdir}/copr-rpmbuild/copr-rpmbuild.yml %files -n copr-builder %license LICENSE +%_bindir/copr-builder %_bindir/copr-update-builder %_bindir/copr-builder-cleanup +%_bindir/copr-builder-rhsm-subscribe +%_bindir/copr-builder-rhsm-subscribe-daemon +%_bindir/copr-builder-ready %_sysconfdir/copr-builder %dir %mock_config_overrides %doc %mock_config_overrides/README - - -%files -n copr-distgit-client -%license LICENSE -%_bindir/copr-distgit-client -%_mandir/man1/copr-distgit-client.1* -%dir %_sysconfdir/copr-distgit-client -%config %_sysconfdir/copr-distgit-client/default.ini -%sitelib/copr_distgit_client.* -%if "%{?python}" != "python2" -%sitelib/__pycache__/copr_distgit_client* -%endif +%ghost %attr(775,root,mock) %dir %_rundir/copr-builder +%_tmpfilesdir/copr-builder.conf %changelog +* Tue Nov 19 2024 Pavel Raiskup <praiskup@redhat.com> 1.2-1 +- change the pyp2spec invocation for v0.10.0+ + +* Tue Oct 22 2024 Jakub Kadlcik <frostyx@email.cz> 1.1-1 +- Make_srpmbuild, set recursive safe.directory +- Activate Red Hat subscription on demand +- Drop six usage (this is a Python 3 only package) +- Add tooling for "safer" RH subscription + +* Wed Oct 02 2024 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 1.0-1 +- Specify snippets to mock config via copr-rpmbuild config file +- Increase the custom method timeout to 90 minutes +- Use new dist-git-client instead of copr one +- Add diff.txt file for fedora review +- When `copr-builder release` set timestamp 0 + +* Tue May 21 2024 Jakub Kadlcik <frostyx@email.cz> 0.73-1 +- Remove static methods from tests + +* Sat Mar 16 2024 Pavel Raiskup <praiskup@redhat.com> 0.72-1 +- don't clean after builds with user ssh access + +* Fri Mar 01 2024 Pavel Raiskup <praiskup@redhat.com> 0.71-1 +- don't set bootstrap_image_ready for rawhide +- no Jinja-vars in config_opts keys (mock-core-configs 40.2 compat) +- allow user SSH to builders +- fix copr-rpmbuild --dump-configs +- install copr-distgit-client with copr-rpmbuild + +* Thu Nov 23 2023 Pavel Raiskup <praiskup@redhat.com> 0.70-1 +- collect and compress fedora-review logs after run +- use Copr custom macros when parsing the specfile + +* Tue Aug 15 2023 Pavel Raiskup <praiskup@redhat.com> 0.69-1 +- require python-specfile (in new enough) version, and use it for specfile + parsing instead of parsing the metadata from SRPMs +- make sure we have (also) the latest DNF5 on builders +- override disttag macro to None +- make sure detected epoch is int() or None +- build RPMs in one Mock step, instead of two (SRPM and then RPM) +- use Mock's bootstrap_image_ready for the custom build (Mock 5.0+ required) +- store review.json generated by fedora-review into the result directory +- better/more verbose logging in the results.json generator +- drop dependency on simplejson +- repeatedly try to download files from lookaside cache +- moving the package NEVRA parsing to from backend here into copr-rpmbuild +- priority=X support added for the Copr repository itself +- query exclusivearch and excludearch from the specfile, and store into results.json + * Tue May 23 2023 Jakub Kadlcik <frostyx@email.cz> 0.68-1 - Fix python3-backoff dependency @@ -1 +1 @@ -ba6d7a5c218d3d1b9a4b2c3283fe3f0b copr-rpmbuild-0.68.tar.gz +3fd1d850ddcbd61b9a08f03f2d91152f copr-rpmbuild-1.2.tar.gz |