[fedora-india] How to override RPM macro

Saurabh Bathe saurabh at beginbyte.org
Fri Dec 31 11:18:32 UTC 2010

On 12/31/2010 04:03 PM, Lakshmipathi.G wrote:
> Hi -
> I'm trying this for almost 4 hrs now - Still not getting it.
> I need to override the rpm macro _sbindir from /usr/sbin something like
> "/opt/sbin"  (I don't want to override default prefix "/usr" )
> I tried adding it in ~/macro or editing /usr/lib/rpm/macro - nothing
> seems to work for me.
> not even from command line -
> #rpm --define '_sbindir /opt'
> # rpm --eval '%_sbindir'
> /usr/sbin

$rpm --define '_sbindir /opt/sbin/' --eval '%_sbindir'

works for me.
Or set the value in ~/.rpmmacros. (not ~/macro) to override for all 
packages you build.


More information about the india mailing list