Bug 867375 - "rhel" gets defined as "0" on Fedora which breaks usage of %{!?rhel:foo}
"rhel" gets defined as "0" on Fedora which breaks usage of %{!?rhel:foo}
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: fedpkg (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-17 07:46 EDT by Thorsten Leemhuis
Modified: 2013-01-10 01:56 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-07 08:21:26 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thorsten Leemhuis 2012-10-17 07:46:48 EDT
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 14:59:52 EDT
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 08:21:26 EST
I expect this is fixed; if anyone is looking for details see:
http://thread.gmane.org/gmane.linux.redhat.fedora.devel/170536/focus=170551

Note You need to log in before you can comment on or make changes to this bug.