From 7b546cae36d194b01389ed900a9c4b1ddcbb1f8e Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 12 Oct 2021 15:50:50 +0200 Subject: [PATCH] Non-existing path in py_reproducible_pyc_path causes build to fail --- brp-fix-pyc-reproducibility | 2 ++ python-rpm-macros.spec | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/brp-fix-pyc-reproducibility b/brp-fix-pyc-reproducibility index 4118d97..536a126 100644 --- a/brp-fix-pyc-reproducibility +++ b/brp-fix-pyc-reproducibility @@ -15,4 +15,6 @@ if [ ! -x /usr/bin/marshalparser ]; then exit 1 fi +# Set pipefail so if $path_to_fix does not exist, the build fails +set -o pipefail find "$path_to_fix" -type f -name "*.pyc" | xargs /usr/bin/marshalparser --fix --overwrite diff --git a/python-rpm-macros.spec b/python-rpm-macros.spec index b0364e2..13d87d1 100644 --- a/python-rpm-macros.spec +++ b/python-rpm-macros.spec @@ -47,7 +47,7 @@ elseif posix.stat('macros.python-srpm') then end } Version: %{__default_python3_version} -Release: 9%{?dist} +Release: 10%{?dist} BuildArch: noarch @@ -141,6 +141,10 @@ install -m 755 brp-* %{buildroot}%{_rpmconfigdir}/redhat/ %changelog +* Tue Oct 12 2021 Lumír Balhar - 3.10-10 +- Non-existing path in py_reproducible_pyc_path causes build to fail +Resolves: rhbz#2011056 + * Thu Sep 09 2021 Miro Hrončok - 3.10-9 - Set $RPM_BUILD_ROOT in %%{python3_...} macros to allow selecting alternate sysconfig install scheme based on that variable