diff --git a/copr-rpmbuild.spec b/copr-rpmbuild.spec index b52c630..43b250a 100644 --- a/copr-rpmbuild.spec +++ b/copr-rpmbuild.spec @@ -18,9 +18,9 @@ Requires: %1 \ %{expand: %%global latest_requires_packages %1 %%{?latest_requires_packages}} Name: copr-rpmbuild -Version: 0.38 +Version: 0.39 Summary: Run COPR build tasks -Release: 2%{?dist} +Release: 1%{?dist} URL: https://pagure.io/copr/copr License: GPLv2+ @@ -157,11 +157,7 @@ cat > copr-update-builder <<'EOF' #! /bin/sh # Update the Copr builder machine, can be called anytime Copr build system -# decides to do so (please keep the output idempotent). - -# Remove old rpmnew config files, if they exist now it is a configuration bug -# anyways. -find /etc/mock -name '*.rpmnew' -delete +# decides to do so (please keep the script idempotent). # install the latest versions of those packages dnf update -y %latest_requires_packages @@ -177,7 +173,7 @@ find /etc/mock -name '*.rpmnew' | while read -r rpmnew_file; do mv "$rpmnew_file" "$config" done -# And now use the overrides from %mock_config_overrides directory +# And now use the overrides from %%mock_config_overrides directory ( cd %mock_config_overrides find . -name '*.tpl' -o -name '*.cfg' | while read -r file; do @@ -197,7 +193,6 @@ install -d %{buildroot}%{_sharedstatedir}/copr-rpmbuild/results install -d %{buildroot}%{_bindir} install -m 755 main.py %{buildroot}%{_bindir}/copr-rpmbuild -sed -i '1 s|#.*|#! /usr/bin/%python|' %{buildroot}%{_bindir}/copr-rpmbuild install -m 644 main.ini %{buildroot}%{_sysconfdir}/copr-rpmbuild/main.ini 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 @@ -212,12 +207,28 @@ 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-sources-custom %buildroot%_bindir +install -p -m 755 bin/copr-rpmbuild-cancel %buildroot%_bindir +install -p -m 755 bin/copr-rpmbuild-log %buildroot%_bindir + +for script in %buildroot/%{_bindir}/copr-rpmbuild*; do + sed -i '1 s|#.*|#! /usr/bin/%python|' "$script" +done name="%{name}" version="%{version}" summary="%{summary}" %py_install install -p -m 755 copr-update-builder %buildroot%_bindir +( + cd builder-hooks + find -name README | while read line; do + dir=%buildroot%_sysconfdir"/copr-builder/hooks/$(dirname "$line")" + mkdir -p "$dir" + install -p -m 644 "$line" "$dir" + done +) + %files %{!?_licensedir:%global license %doc} @@ -225,7 +236,7 @@ install -p -m 755 copr-update-builder %buildroot%_bindir %{expand:%%%{python}_sitelib}/* -%{_bindir}/copr-rpmbuild +%{_bindir}/copr-rpmbuild* %{_bindir}/copr-sources-custom %{_mandir}/man1/copr-rpmbuild.1* @@ -241,13 +252,17 @@ install -p -m 755 copr-update-builder %buildroot%_bindir %files -n copr-builder %license LICENSE %_bindir/copr-update-builder +%_bindir/copr-builder-cleanup +%_sysconfdir/copr-builder %dir %mock_config_overrides %doc %mock_config_overrides/README %changelog -* Tue May 26 2020 Miro HronĨok - 0.38-2 -- Rebuilt for Python 3.9 +* Tue Jun 09 2020 Pavel Raiskup 0.39-1 +- more work delegate to builder scripts from backend +- don't delete the "old" .rpmnew files +- fix macro in comment (rpmlint) * Fri Apr 03 2020 Pavel Raiskup 0.38-1 - do not scrub mock caches, to re-use dnf/yum caches diff --git a/sources b/sources index d78c785..99e977b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (copr-rpmbuild-0.38.tar.gz) = a634979e4fe5831b75479953bb26f3deba3ce839cc8b5f4291b281f8d56c8451769cbbec90ed4b96dd0418776ba64c91e18697fb21f38544022f53f34ff5467c +SHA512 (copr-rpmbuild-0.39.tar.gz) = 4594b2c2bdf5f8879a596e1085ffe047ee4ed5ef1c153007fd79596462aaecc32c0d7d28cb26c3ec2d337b3f04d7125c8052d3b998f22853a69022853d322304