File 0001-setup-Pass-define-to-rpmbuild-instead-of-eval-define.patch of Package quilt
From 68bbaf18efe1056a2c58270991051d5495874741 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Mon, 10 Mar 2025 23:47:18 +0100
Subject: [PATCH 1/2] setup: Pass --define to rpmbuild instead of --eval
"%define ..."
Changes in rpmbuild 4.20 break defining macros using --eval "%define
..." for noarch packages. While this is a bug, it is possible and
recommended to define macros using option --define instead, so let's
just do that.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
quilt/setup.in | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/quilt/setup.in b/quilt/setup.in
index a642388..9730599 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -262,14 +262,14 @@ inspect()
echo -n "### rpmbuild: " >&4
PATH="$tmpdir/bin:$PATH" \
- rpmbuild --eval "%define _sourcedir $abs_sourcedir" \
- --eval "%define _specdir $specdir" \
- --eval "%define _builddir $tmpdir/build" \
- --eval "%define __patch $tmpdir/bin/patch" \
- --eval "%define __tar $tmpdir/bin/tar" \
- --eval "%define __unzip $tmpdir/bin/unzip" \
- --eval "%define __7zip $tmpdir/bin/7z" \
- --eval "$DEFINE_FUZZ" \
+ rpmbuild --define "_sourcedir $abs_sourcedir" \
+ --define "_specdir $specdir" \
+ --define "_builddir $tmpdir/build" \
+ --define "__patch $tmpdir/bin/patch" \
+ --define "__tar $tmpdir/bin/tar" \
+ --define "__unzip $tmpdir/bin/unzip" \
+ --define "__7zip $tmpdir/bin/7z" \
+ "${DEFINE_FUZZ[@]}" \
--nodeps \
-bp "$specdir/$specfile" < /dev/null >&5 2>&5
status=$?
@@ -343,6 +343,7 @@ eval set -- "$options"
export QUILT_SETUP_FAST=1
prefix=
sourcedir=
+declare -a DEFINE_FUZZ
while true
do
@@ -360,7 +361,7 @@ do
shift 2 ;;
--fuzz)
# Only works with rpm 4.6 and later
- DEFINE_FUZZ="%define _default_patch_fuzz $2"
+ DEFINE_FUZZ=( "--define" "_default_patch_fuzz $2" )
shift 2 ;;
--spec-filter)
spec_filter=$2
--
2.48.1