[Rpm-maint] [PATCH] If no BuildRoot, then set a sane default.

Tom 'spot' Callaway tcallawa at redhat.com
Mon Feb 12 22:01:58 UTC 2007


On Mon, 2007-02-12 at 15:57 -0600, Tom 'spot' Callaway wrote:
> This relatively small patch accomplishes a few things:
> 
> - If there is no BuildRoot defined (either from a master macro, or
> inside a spec file), then set a sane default, derived from _tmppath,
> name, version, release, and a six random characters. 
> - It uses mkdtemp to create the BuildRoot. Thus, I don't think one would
> need to remove the BuildRoot as part of every install (unless it is
> hardcoded).
> - It sets the %{buildroot} macro in addition to $RPM_BUILD_ROOT.
> 
> Sum result: Hopefully, no more arguments about which buildroot value is
> "more correct", "more useful", "more accurate", "serious", "stupid".
> With this patch applied, we can drop mandatory BuildRoot definitions
> from all specs, and shorten the spec by a line. :)
> 
> Feedback welcomed, as long as you don't plan on insulting me. Insulting
> the patch is ok.

... and for what it is worth, I was unaware that Bill had patched out
the same problem with a different solution. Ah well.

~spot




More information about the Rpm-maint mailing list