[GuidelinesChange] Prepping BuildRoot For %install

Michael Schroeder mls at suse.de
Tue Apr 10 11:18:35 UTC 2007


On Tue, Apr 10, 2007 at 07:10:00AM -0400, Jesse Keating wrote:
> It's not that we don't consider it a bug, it's that we don't feel that this 
> bug can be "fixed" in rpm any time soon.  There are far bigger issues that 
> our RPM team are trying to tackle.  So until such time that it is fixed in 
> rpm, we still have to manage it correctly within our specs.  Same with 
> buildroot, etc...

We at SUSE use the following macro to make rpm delete the build root
automatically:

%__spec_build_pre %{___build_pre}\
%{?buildroot:  %__rm -rf "$RPM_BUILD_ROOT"\
  %__mkdir_p `dirname "$RPM_BUILD_ROOT"`\
  %__mkdir "$RPM_BUILD_ROOT"\
}

(This actually fixes a tiny security issue, that's why there are
two mkdir calls...)

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}




More information about the fedora-devel-list mailing list