Bug 511319 - mock sets different values for --with and --without than rpmbuild
Summary: mock sets different values for --with and --without than rpmbuild
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-14 16:59 UTC by Ville Skyttä
Modified: 2013-01-10 05:17 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-03-17 20:04:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Set same values as rpmbuild for --with and --without (1.06 KB, patch)
2009-07-14 16:59 UTC, Ville Skyttä
no flags Details | Diff
Reproducer specfile (474 bytes, text/plain)
2009-07-14 17:02 UTC, Ville Skyttä
no flags Details

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.


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