On Fri, 2006-10-13 at 09:33 +0200, Axel Thimm wrote:
On Fri, Oct 13, 2006 at 06:06:11AM +0200, Ralf Corsepius wrote:
> E.g. there exist packages, which want/need to be built "multi-staged",
> with %build containing (often: temporary) installs to %{buildroot}.
> In some (very rare) occasions, packages even require "building" inside
> of %buildroot.
These are exactly the broken packages that I want to cater with the
proposed changes!
There ain't anything broken with these packages ;)
They do not leave files around, nor do they do anything harmful. They
simply do not fit into the constraints you are trying to set up.
If you want to do staged installs during build time you *HAVE* to do
so in builddir, not buildroot.
Why? rpmbuild and the spec have full access to both
directories and can
read/write to both.
Whether a package does a
%build
make something
make install-something DESTDIR=$RPM_BUILD_ROOT
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_lib}
make all
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
or a
%build
make something
make install-something DESTDIR=$(PWD)/tmp
export LD_LIBRARY_PATH=(PWD)/tmp%{_lib}
make all
%install
rm -rf $(PWD)/tmp
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
doesn't make a real difference.
To the contrary, the later is sightly more error-prone.
> The constraint you're adding above, would (IMO:
unnecessarily) close
> out these packages from being packaged, or force packagers to resort to
> move "building" to %install.
Nope, both ways are a sloppy way of packaging. It should be
forbidden. Stage your builds in %build/%{builddir}, don't build in
%install and don't touch %{buildroot} in %prep/%build. This should be
carved in stone.
<sigh/> IMO, you are trying to overengineer something.
Ralf