Archive:PackagingDrafts/BuildRootHandling

Proposal: It is important to carefully handle the !BuildRoot during %install, to ensure that it is created fresh. I propose that the following be added to the Packaging/Guidelines (as a subsection to BuildRoot ):

Prepping BuildRoot For %install
It is important to properly prepare the !BuildRoot in the  section of your package before it is used. Every Fedora package MUST have an %install section that begins with either:

%install rm -rf %{buildroot}

or

%install rm -rf $RPM_BUILD_ROOT

This is to ensure that the !BuildRoot will be created fresh during the  section.

Also, the following will be added to Packaging/ReviewGuidelines:

- MUST: At the beginning of, each package MUST run   (Packaging/Guidelines ). See Packaging/Guidelines for details.