Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to figure out how $RPM_BUILD_ROOT relates to BuildRoot. It's clear that BuildRoot is the temporary path used during RPM construction. But here for example, they say buildroot is used during actual installation? http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html

" RPM_BUILD_ROOT — This environment variable is used to hold the "build root", into which the newly built software will be installed. If no explicit build root has been specified (either by command line option, spec file tag line, or rpmrc file entry), this variable will be null. "

So, does buildroot has any effect during actual installation? Or it's only needed for RPM building, and user always specifies the target path via --prefix?

Also, during files and postun sections, any sense to use the buildroot? If not, what is the correct way to specify files and directories, taking into account the prefix set by user?

Thanks.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

No the buildroot is only used during the building of the RPM

share|improve this answer
    
Thanks for clarification. And what about the files and postun section - how I can reference the destination directory set by the user? –  SyRenity Dec 17 '10 at 4:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.