Bug 511319

Summary: mock sets different values for --with and --without than rpmbuild
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: mockAssignee: David Cantrell <dcantrell>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dcantrell, dwmw2, mebrown, williams
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-17 20:04:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Set same values as rpmbuild for --with and --without
none
Reproducer specfile none

Description Ville Skyttä 2009-07-14 16:59:20 UTC
Created attachment 351636 [details]
Set same values as rpmbuild for --with and --without

mock sets values for macros it creates when using --with and --without to 1, which is different from what rpmbuild is documented to do and does (see /usr/share/doc/rpm-*/conditionalbuilds) and thus breaks some builds.  Will attach a reproducer and a fix against upstream git.

OTOH I tend to think passing these options (and macros set using -D/--define) to rpmbuild as is would be better than writing macro files based on them - I have a patch for that as well, let me know if you're interested.

Comment 1 Ville Skyttä 2009-07-14 17:02:51 UTC
Created attachment 351637 [details]
Reproducer specfile

Output from building the srpm for this specfile with rpmbuild and unfixed mock:

$ rpmbuild --rebuild foo-1.0-1.src.rpm --with foo --without bar-quux
[...]
+ echo ./configure --with-foo --without-bar-quux
./configure --with-foo --without-bar-quux
[...]

$ mock --rebuild foo-1.0-1.src.rpm --with foo --without bar-quux
[...]
+ echo ./configure 1
./configure 1
[...]

Comment 2 Bug Zapper 2009-11-16 10:51:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Ville Skyttä 2010-03-17 17:12:46 UTC
Ping?

Comment 4 Jesse Keating 2010-03-17 17:47:53 UTC
Sorry for missing this.  Thanks for the patch, I've applied it upstream.  it'll be in the 1.1 branch.  Do you feel this is important enough to backport to the 1.0 releases (EL-5,F-11,F-12) ?

Comment 5 Ville Skyttä 2010-03-17 18:33:58 UTC
Thanks.  As far as I'm concerned, having this only in 1.1+ is fine and this bug can be closed e.g. as UPSTREAM if you wish.

(BTW, I posted a few bugs to the mock trac tracker today, not sure if anyone follows that... no rush but just to let you know.)

Comment 6 Jesse Keating 2010-03-17 20:04:21 UTC
We do look at trac, when there is time allowed (:  We could certainly use a few more hands working on mock if you're interested.