Problems building kernel

Mamoru Tasaka mtasaka at ioa.s.u-tokyo.ac.jp
Fri Oct 2 08:00:16 UTC 2009


Quentin Armitage wrote, at 10/02/2009 04:43 PM +9:00:
> I'm trying to build an old(ish) kernel (2.6.29.1-46-fc11.i586) on an
> up-to-date F-11 system, but I keep getting a build failure. I have
> tracked it down to the following.
> 
> At the beginning of the %install stage, it executes
> '[' /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386 '!=' /
> ']
> rm -rf /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386
> but there are already files in that directory that have been created
> earlier in the build process  and are needed for the install (see
> extract of build log below).
> 
> I notice that when kernels are build in koji, this rm ... does not get
> executed, but also, looking at other packages' build.log in koji (the
> example I took was rpm itself), then the equivalent rm command is
> executed.
> 
> I cannot see where the rm ... command comes from, or how t

This change (i.e. deleting %buildroot tree at the beginning of %install)
comes from the change in redhat-rpm-config 
(see $ rpm -q --changelog redhat-rpm-config and the file /usr/lib/rpm/redhat/macros )

Recent kernel.spec has the following lines at the top to prevent this
behavior.
-------------------------------------------------------------------
# We have to override the new %%install behavior because, well... the kernel is special.
%global __spec_install_pre %{___build_pre}
-------------------------------------------------------------------

Regards,
Mamoru




More information about the fedora-devel-list mailing list