From ce3a144bcad87e07cdbcc761dfc49d3856fe52b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 1 Sep 2025 13:17:43 +0200 Subject: [PATCH] Don't exit from pyproject-srpm-macros implementation of %pyproject_buildrequires - Fixes: rhbz#2391290 Consider code like this: %generate_buildrequires mv setup.py{,.ignore} %pyproject_buildrequires mv setup.py{.ignore,} When %pyproject_buildrequires exits, the second mv is never executed. The next round of %generate_buildrequires will then fail. In fact, there is probably not a good reason to call exit from %pyproject_buildrequires. From https://src.fedoraproject.org/rpms/libcpuid/pull-request/7 (cherry picked from Fedora commit ea56d1c870dff8de6c94dd43cd719f611803de51) --- macros.aaa-pyproject-srpm | 2 +- pyproject-rpm-macros.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/macros.aaa-pyproject-srpm b/macros.aaa-pyproject-srpm index b394be5..fd4dece 100644 --- a/macros.aaa-pyproject-srpm +++ b/macros.aaa-pyproject-srpm @@ -4,7 +4,7 @@ # this macro will cause the package with the real macro to be installed. # When macros.pyproject is installed, it overrides this macro. # Note: This takes arbitrary options, to ease addition of new options to the real macro. -%pyproject_buildrequires(-) echo 'pyproject-rpm-macros' && exit 0 +%pyproject_buildrequires(-) echo 'pyproject-rpm-macros' # Declarative buildsystem, requires RPM 4.20+ to work diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 0fd006c..40b6f61 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -14,8 +14,8 @@ License: MIT # Increment Y and reset Z when new macros or features are added # Increment Z when this is a bugfix or a cosmetic change # Dropping support for EOL Fedoras is *not* considered a breaking change -Version: 1.18.3 -Release: 2%{?dist} +Version: 1.18.4 +Release: 1%{?dist} # Macro files Source001: macros.pyproject @@ -191,6 +191,10 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 %changelog +* Mon Sep 01 2025 Miro HronĨok - 1.18.4-1 +- Don't exit from pyproject-srpm-macros implementation of %%pyproject_buildrequires +- Fixes: rhbz#2391290 + * Fri Jul 25 2025 Fedora Release Engineering - 1.18.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild