diff --git a/0001-rpmbuild-fix-custom-method-for-F31-s-systemd.patch b/0001-rpmbuild-fix-custom-method-for-F31-s-systemd.patch new file mode 100644 index 0000000..c248aaf --- /dev/null +++ b/0001-rpmbuild-fix-custom-method-for-F31-s-systemd.patch @@ -0,0 +1,41 @@ +From 0e5d74de539e226a28d00e203cfdde347d51c3dd Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Fri, 29 Nov 2019 18:03:03 +0100 +Subject: [PATCH] rpmbuild: fix custom method for F31's systemd + +Use 'mock --copyin' rather than "mock --shell 'cat -'" for copying files +into mock buildroot. This is bugfix caused by changed systemd-nspawn's +in F31, see https://github.com/rpm-software-management/mock/issues/432. + +Fixes: #1123 +--- + rpmbuild/bin/copr-sources-custom | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/rpmbuild/bin/copr-sources-custom b/rpmbuild/bin/copr-sources-custom +index 6729288b..5eda4e12 100755 +--- a/rpmbuild/bin/copr-sources-custom ++++ b/rpmbuild/bin/copr-sources-custom +@@ -80,7 +80,7 @@ if __name__ == "__main__": + pkgs = args.builddeps.split() + run_cmd(mock + ['--install'] + pkgs) + +- run_cmd(mock + ['--shell', 'cat - > /script'], stdin=args.script) ++ run_cmd(mock + ['--copyin', args.script.name, '/script']) + + setup_cmd = 'set -ex; chmod a+x /script;' + +@@ -94,8 +94,8 @@ if __name__ == "__main__": + + if args.hook_payload_file: + payload_file_inner = "{0}/hook_payload".format(pipes.quote(workdir)) +- run_cmd(mock + ['--shell', 'cat - > ' + payload_file_inner], +- stdin=args.hook_payload_file) ++ run_cmd(mock + ['--copyin', args.hook_payload_file.name, ++ os.path.join(workdir, 'hook_payload')]) + run_cmd(mock + ['--shell', 'chmod a+r ' + payload_file_inner]) + + cmd = 'set -xe ; cd {workdir} ; {env} /script'.format( +-- +2.23.0 + diff --git a/copr-rpmbuild.spec b/copr-rpmbuild.spec index dd08cc6..442f6b4 100644 --- a/copr-rpmbuild.spec +++ b/copr-rpmbuild.spec @@ -20,7 +20,7 @@ Requires: %1 \ Name: copr-rpmbuild Version: 0.31 Summary: Run COPR build tasks -Release: 3%{?dist} +Release: 4%{?dist} URL: https://pagure.io/copr/copr License: GPLv2+ @@ -29,6 +29,8 @@ License: GPLv2+ # tito build --tgz --tag %%name-%%version-%%release Source0: %name-%version.tar.gz +Patch0: 0001-rpmbuild-fix-custom-method-for-F31-s-systemd.patch + BuildRequires: %{python}-devel BuildRequires: %{python}-distro %if 0%{?rhel} == 0 || 0%{?rhel} != 6 @@ -138,7 +140,7 @@ This package contains all optional modules for building SRPM. %prep -%setup -q +%autosetup -p2 %check @@ -207,6 +209,9 @@ install -p -m 755 copr-update-builder %buildroot%_bindir %changelog +* Fri Nov 29 2019 Pavel Raiskup - 0.31-4 +- bugfix for https://pagure.io/copr/copr/issue/1123 + * Thu Oct 03 2019 Miro HronĨok - 0.31-3 - Rebuilt for Python 3.8.0rc1 (#1748018)