diff options
author | CoprDistGit <infra@openeuler.org> | 2025-03-26 08:56:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-03-26 08:56:25 +0000 |
commit | 4cc58e2962d8638e23dd983ba4c7c9ff56aab231 (patch) | |
tree | 30d740ac50d2f923873fcc4dfd987c26505d0088 | |
parent | 840c57aed2fb1e903db1d66ef6b9a789a55f70bf (diff) |
automatic import of copr-rpmbuildopeneuler24.03_LTS_SP1
-rw-r--r-- | copr-rpmbuild.spec | 147 | ||||
-rw-r--r-- | sources | 2 |
2 files changed, 61 insertions, 88 deletions
diff --git a/copr-rpmbuild.spec b/copr-rpmbuild.spec index 7e835f1..993efbf 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.21.1.dev +%global copr_common_version 0.12.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: 1.2 +Version: 0.68 Summary: Run COPR build tasks Release: 1%{?dist} URL: https://github.com/fedora-copr/copr @@ -28,26 +28,22 @@ 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}-specfile >= 0.21.0 +BuildRequires: %{python_pfx}-simplejson 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 @@ -60,19 +56,15 @@ Requires: %{python}-copr-common >= %copr_common_version Requires: %{python_pfx}-jinja2 Requires: %{python_pfx}-munch Requires: %{python}-requests -Requires: %{python_pfx}-specfile >= 0.21.0 +Requires: %{python_pfx}-simplejson Requires: python3-backoff >= 1.9.0 -Requires: python3-pyyaml -Requires: mock >= 5.0 -Requires(pre): mock-filesystem +Requires: mock >= 2.0 Requires: git Requires: git-svn # for the /bin/unbuffer binary Requires: expect -%if 0%{?openEuler} > 0 || 0%{?rhel} > 0 -# qemu-user-static is not supported -%else +%if !0%{?openEuler} Requires: qemu-user-static %endif Requires: sed @@ -80,11 +72,10 @@ 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 >= 0.10.0 +Suggests: pyp2spec %endif %description @@ -96,9 +87,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: dist-git-client +Requires: copr-distgit-client = %{version}-%{release} -%if 0%{?fedora} && 0%{?fedora} < 41 +%if 0%{?fedora} # replacement for yum/yum-utils, to be able to work with el* chroots # bootstrap_container. Requires: dnf-yum @@ -113,11 +104,9 @@ Requires: nosync %endif Requires: openssh-clients Requires: podman -%if 0%{?openEuler} > 0 || 0%{?rhel} > 0 -# not supported -%else +%if !0%{?openEuler} Requires: pyp2rpm -Requires: pyp2spec >= 0.10.0 +Requires: pyp2spec Requires: rubygem-gem2rpm Requires: scl-utils-build Requires: fedora-review >= 0.8 @@ -161,9 +150,30 @@ 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*; do +for script in bin/copr-rpmbuild* \ + bin/copr-distgit* +do sed -i '1 s|#.*python.*|#! /usr/bin/%python|' "$script" done @@ -224,7 +234,6 @@ 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. @@ -235,7 +244,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* %buildroot%_bindir +install -p -m 755 bin/copr-builder-cleanup %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 @@ -254,10 +263,18 @@ install -p -m 755 copr-update-builder %buildroot%_bindir done ) -mkdir %{buildroot}%{_tmpfilesdir} -cat > %{buildroot}%{_tmpfilesdir}/copr-builder.conf <<EOF -d /run/copr-builder 0775 root mock - -EOF +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} %files @@ -280,73 +297,29 @@ EOF %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 -%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 +%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 + +%changelog * Tue May 23 2023 Jakub Kadlcik <frostyx@email.cz> 0.68-1 - Fix python3-backoff dependency @@ -1 +1 @@ -3fd1d850ddcbd61b9a08f03f2d91152f copr-rpmbuild-1.2.tar.gz +ba6d7a5c218d3d1b9a4b2c3283fe3f0b copr-rpmbuild-0.68.tar.gz |