Rpmbuild question.

Stuart D Gathman stuart at bmsi.com
Fri May 4 20:28:25 UTC 2012


Long ago, Nostradamus foresaw that on 05/04/2012 03:59 PM, Wempa, 
Kristofer would write:
>
> Setting the %buildroot to %{nil} doesn't work.  Rpmbuild fails with an error that buildroot can't be empty.  We don't build our tool chains as root and we install everything into a dedicated directory that we own.  So, there is little benefit to using a build root and it further complicates our tool chain build process.  If I can't unset the %buildroot variable, then it seems for me that the easiest solution is to just copy the files into the build root directory after they are installed.  I have hundreds of SPEC files that I'll need to change, but I should be able to automate those changes with a script.  I appreciate you explaining the history behind the change, but I still think there should be a means to get it to behave the old way.  I think NOT building as root is way more important than using a build root.
>
I have to second Tim: USE A BUILD ROOT.

However, if you really, really must defeat the safety lock,

NO WARRANTY

set the build root to /var/tmp/mybuild and in %install  create a symlink:

%install
# remove buildroot here but ONLY if it isn't / and DON'T FOLLOW SYMLINKS :-)
# If you end up doing the equivalent of rm -rf / despite all our 
warnings, I'll be ROTFL.
ln -s / /var/tmp/mybuild


More information about the Rpm-list mailing list