Red Hat Bugzilla – Bug 511319
mock sets different values for --with and --without than rpmbuild
Last modified: 2013-01-10 00:17:33 EST
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.
Created attachment 351637 [details]
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
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:
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) ?
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.)
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.