Bug 1843714

Summary: redhat-rpm-config: %configure macro breakage
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: redhat-rpm-configAssignee: Igor Raits <igor.raits>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: ajax, ffesti, fweimer, igor.raits, john.j5live, jonathan, j, pmatilai, praiskup, swt, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: redhat-rpm-config-160-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-04 01:24:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jerry James 2020-06-03 22:24:15 UTC
Description of problem:
I'm trying to update the python-tdlib package for the new boost package.  Everything is fine until %configure is invoked.

...
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
/var/tmp/rpm-tmp.u359Mv: line 42: syntax error near unexpected token `;'

And /var/tmp/rpm-tmp.u359Mv shows:
  LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-/usr/lib64:}" ; export LT_SYS_LIBR
ARY_PATH ; 
  CC=gcc; export CC ; 
  CXX=g++; export CXX ; 
  ; 

^^^^ That is line 42.

In /usr/lib/rpm/redhat/macros, I see this on lines 180 and 181:

%configure \
  %{set_build_flags}; \
                    ^
That semicolon -----| is the one causing the problem.

Version-Release number of selected component (if applicable):
redhat-rpm-config-159-1.fc33.noarch

How reproducible:
Always.

Steps to Reproduce:
1. fedpkg cone python-tdlib
2. cd python-tdlib
3. fedpkg srpm
4. mock -r fedora-rawhide-x86_64 --enablerepo=local --rebuild python-tdlib-*.src.rpm

Actual results:
Failure while executing %configure.

Expected results:
Success while executing %configure.

Additional info:

Comment 1 Scott Talbert 2020-06-03 23:48:51 UTC
*** Bug 1843728 has been marked as a duplicate of this bug. ***

Comment 2 Orion Poplawski 2020-06-03 23:54:28 UTC
Actually, the new definition of %set_build_flags now adds a ';' at the end.  I suspect you'll want to remove that to avoid breaking other possible invocations of %set_build_flags.

Comment 4 Igor Raits 2020-06-04 01:24:10 UTC
Sorry. Should be fixed now.