From 4bc4dc6eb1c9769136806e5a576dace7900b26f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 29 Mar 2022 10:24:20 +0200 Subject: [PATCH] Simplify setting of CFLAGS/LDFLAGS to avoid issue with package notes Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2059488. For some reason, the %_package_note_file path was not expanded properly. Let's call it one of the mystries of recursive rpm macro expansion. Since we have https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck, we can just use $CLFAGS and $LDFLAGS and this should DTRT. I tested the build in mock and it seems all fine. --- redis.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redis.spec b/redis.spec index dc3215b..9a7a38b 100644 --- a/redis.spec +++ b/redis.spec @@ -146,13 +146,13 @@ if test "$api" != "%{redis_modules_abi}"; then exit 1 fi -%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes +%global make_flags DEBUG="" V="echo" LDFLAGS="$LDFLAGS" CFLAGS+="$CFLAGS -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes %build %make_build %{make_flags} all %install -make %{make_flags} install +%make_install %{make_flags} # Filesystem. install -d %{buildroot}%{_sharedstatedir}/%{name}