Problems building kernel

2009-10-02 Thread Quentin Armitage
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 to stop it.

Can anyone give me some pointers?

Q


 mkdir -p 
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386/usr/src/kernels
 + mv 
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386/lib/modules/2.6.29.1-46.fc11.i586/build
  
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386//usr/src/kernels/2.6.29.1-46.fc11.i586
 + ln -sf ../../../usr/src/kernels/2.6.29.1-46.fc11.i586 
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386/lib/modules/2.6.29.1-46.fc11.i586/build
 + exit 0
 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.NR0ESi
 + umask 022
 + cd /u/home/hsn/rpmbuild/BUILD
 + '[' /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
 ++ dirname /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386
 + mkdir -p /u/home/hsn/rpmbuild/BUILDROOT
 + mkdir /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386
 + cd kernel-2.6.29
 + LANG=C
 + export LANG
 + unset DISPLAY
 + cd linux-2.6.29.i586


-- 
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list


Problems building kernel

2009-10-02 Thread Quentin Armitage
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


 mkdir -p 
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386/usr/src/kernels
 + mv 
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386/lib/modules/2.6.29.1-46.fc11.i586/build
  
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386//usr/src/kernels/2.6.29.1-46.fc11.i586
 + ln -sf ../../../usr/src/kernels/2.6.29.1-46.fc11.i586 
 /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386/lib/modules/2.6.29.1-46.fc11.i586/build
 + exit 0
 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.NR0ESi
 + umask 022
 + cd /u/home/hsn/rpmbuild/BUILD
 + '[' /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
 ++ dirname /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386
 + mkdir -p /u/home/hsn/rpmbuild/BUILDROOT
 + mkdir /u/home/hsn/rpmbuild/BUILDROOT/kernel-2.6.29.1-46.fc11.i386
 + cd kernel-2.6.29
 + LANG=C
 + export LANG
 + unset DISPLAY
 + cd linux-2.6.29.i586


-- 
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list


Re: Problems building kernel

2009-10-02 Thread Mamoru Tasaka
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

-- 
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list