Bug 867375

Summary: "rhel" gets defined as "0" on Fedora which breaks usage of %{!?rhel:foo}
Product: [Fedora] Fedora Reporter: Thorsten Leemhuis <fedora>
Component: fedpkgAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dcantrell
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-07 13:21:26 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 Thorsten Leemhuis 2012-10-17 11:46:48 UTC
Description of problem:
The configure call in mesa.spec of f18 contains this:
> --with-egl-platforms=x11,drm%{!?rhel:,wayland} \

That "%{!?rhel:foo}" works as expected (e.g. wayland is enabled) in the buildsys for F18 and when used with rpmbuild on F18, but not with "fedpkg local on F18.

Further digging revealed that this is happens due to fedpkg setting rhel as "0". I came to this conclusion after adding these two lines to a spec file:

> echo X%{rhel}X
> exit 1

When calling "fedpkg local" then the output is this:

> + echo X0X
> X0X
> + exit 1

Running "fedpkg srpm" and running "rpmbuild -ba foo.spec" I got this:

> + echo 'X%{rhel}X'
> X%{rhel}X
> + exit 1

YMMV, but I'd say this is a bug -- the alternative would be too forbid "%{!?rhel:foo}", which might lead to bugs, as it's yet another thing people could forget :-/

Comment 1 Jesse Keating 2012-10-17 18:59:52 UTC
This is a recent change, requested because /not/ setting it to 0 was breaking other things.  http://lists.fedoraproject.org/pipermail/devel/2012-September/171353.html

Not really sure what to do here, I'm not paying much attention to fedpkg since I moved to the anaconda team.  Welcoming suggestions.

Comment 2 Thorsten Leemhuis 2012-11-07 13:21:26 UTC
I expect this is fixed; if anyone is looking for details see:
http://thread.gmane.org/gmane.linux.redhat.fedora.devel/170536/focus=170551