[Rpm-maint] [PATCH] rpmbuild: clean up buildroot handling, set a default buildroot

R P Herrold herrold at owlriver.com
Fri Feb 16 01:24:45 UTC 2007


On Thu, 15 Feb 2007, Tom 'spot' Callaway wrote:

> On Thu, 2007-02-15 at 16:37 -0500, R P Herrold wrote:
>>> rpm's default is trumped by system wide macro is trumped by local spec
>>> defines.
>> I would actually like a --defines passed in to rpmbuild to
>> trump all, but this is a whole new kettle of worms to open
>
> That doesn't seem unreasonable to me, is this not the case currently?


nope -- inside the .spec always wins presently

[herrold at couch buildroot]$ rpmbuild -ba dummy-buildroot.spec  \
 	2>&1 | grep 'ACME'
+ echo 'ACME  /var/tmp/spot  '
ACME  /var/tmp/spot
[herrold at couch buildroot]$ rpmbuild -ba \
 	--define 'buildroot /var/tmp/herrold' \
 	dummy-buildroot.spec 2>&1 | grep 'ACME'
+ echo 'ACME  /var/tmp/spot  '
ACME  /var/tmp/spot
[herrold at couch buildroot]$

Abbreviated spec is thus:

[herrold at couch buildroot]$ grep -i buildroot dummy-buildroot.spec
#       Dummy buildroot test
%define pkgname dummy-test-buildroot
Summary:        Dummy buildroot test
Provides:       buildroot
BuildRoot:      /var/tmp/%{name}-root
%define         buildroot /var/tmp/spot
mkdir -p %buildroot/acme
echo   "ACME  %buildroot  "
[herrold at couch buildroot]$



More information about the Rpm-maint mailing list