relocatable rpm .spec question

John Ellson ellson at research.att.com
Wed Feb 22 19:07:36 UTC 2006


I'm trying to make an rpm relocatable.

I've added "Prefix: /usr" to my .spec file and by using "rpm -ivh 
--prefix=/home/ellson/usr  foobar.*.rpm"
the package installs binaries correctly in new location.

But I have a %post containing "%{_bindir}/foo" that isn't getting 
relocated properly.
Its still looking for /usr/bin/foo instead of /home/ellson/usr/bin/foo.

I tried "%{prefix}/bin/foo" but it still resolves to /usr/bin/foo

Is there a variable set by the --prefix option that I can use in %post ?

I couldn't find a solution in:
    http://fedora.redhat.com/docs/drafts/rpm-guide-en/ch10s05.html

John




More information about the devel mailing list