This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 511319 - mock sets different values for --with and --without than rpmbuild
mock sets different values for --with and --without than rpmbuild
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
: Patch
Depends On:
  Show dependency treegraph
Reported: 2009-07-14 12:59 EDT by Ville Skyttä
Modified: 2013-01-10 00:17 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-17 16:04:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Ville Skyttä 2009-07-14 12:59:20 EDT
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 13:02:51 EDT
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 05:51:34 EST
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:
Comment 3 Ville Skyttä 2010-03-17 13:12:46 EDT
Comment 4 Jesse Keating 2010-03-17 13:47:53 EDT
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 14:33:58 EDT
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 16:04:21 EDT
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.