Re: next draft of rpm guidelines are here



Greg -

The look like they are coming along well.  I would partially disagree
with your statement:

rm -rf $RPM_BUILD_ROOT    
    This line just ensures that there are no "stray" files in the build
root when the package is built. This helps to make sure that no stray
files end up in the final RPM. Some packagers like to do a check that
$RPM_BUILD_ROOT isn't set to something dangerous, but doing a good check
for that is nearly impossible.

While it is nearly impossible to keep people from shooting themselves in
the foot on purpose (for example setting $RPM_BUILD_ROOT to "/usr/../")
it is a good idea to check for $RPM_BUILD_ROOT being set to "/" because
RPM will set it to "/" if you don't have a BuildRoot line in your spec
file.  A better option is to use:

if test "$RPM_BUILD_ROOT" != "/"; then
    rm -rf $RPM_BUILD_ROOT
fi

in the %clean and %install sections.

Thanks.
Peter

On 02 May 2001 15:13:47 -0700, Gregory Leblanc wrote:
> OK, I just finished section 2 of these.  I'll probably be putting them
> into CVS tonight, and hopefully getting them onto the GPP webpages about
> the same time.  In the mean time, enjoy, and send me comments/patches.  
>     Greg
> 
> -- 
> Troll, troll, troll your post
> Gently down the feed
> Merrily, merrily troll along
> A life is what you need...





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]