It's not possible to rebuild the kernel src rpms because /boot/kernel.h-XXX is always zero length consequently any atempt to build the kernel dies ie /usr/src/linux-2.4.1/include/linux/version.h:2:2: #else without #if /usr/src/linux-2.4.1/include/linux/version.h:4:2: #endif without #if make: *** [init/main.o] Error 1 because linux/version.h looks like this cat /usr/src/linux-2.4.1/include/linux/version.h #include <linux/rhconfig.h> #else #define UTS_RELEASE "2.4.1-0.1.10" #endif #define LINUX_VERSION_CODE 132097 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) and <linux/rhconfig.h> expects /boot/kernel.h to provide it with definitions even so linux/version.h SHOULD NOT have a broken apart #if / #else / #endif spread over 3 files! rpm -qlpvv --scripts /usr/src/redhat/RPMS/alpha/kernel-headers-2.4.1-0.1.10.alpha.rpm <blurb deleted>... postinstall script (through /bin/sh): cd /boot rm -f kernel.h ln -snf kernel.h-2.4.1 kernel.h exit 0 # Old kernel-headers packages owned include symlinks; new # ones just make them so that we can have multiple kernel-headers # packages installed. postuninstall script (through /bin/sh): if [ $1 = 0 ]; then if [ -L /boot/kernel.h -a `ls -l /boot/kernel.h 2>/dev/null| awk '{ print $11 }'` = "kernel.h-2.4.1" ]; then rm -f /boot/kernel.h fi fi exit 0 -rw-r--r-- 1 root root 0 Feb 19 17:44 /boot/kernel.h-2.4.1 drwxr-xr-x 1 root root 2048 Feb 19 17:44 /usr/include/asm (Note that kernel.h is zero length when the rpm is built)
We (Red Hat) should really try to resolve this before next release.
you need to reboot once. rc.sysinit will then write the file /boot/kernel.h for the running kernel.
If kernel.h is zero-size at post-install time we could perhaps set it up with some default. Normally this doesn't show because people go through the install and then boot, though, so this should not normally be an issue. kernel.h is specifically supposed to be for the running kernel, so there is a good argument not to add this to post-install in any case. On the other hand, if it is zero length, it is clearly incorrect and gets in the way...
I can think of two off the cuff scenarios where this would be awkward 1. someone forcefully reinstalls the kernel-headers file /boot/kernel.h will be zapped. 2. Where a system administrator is doing prep work for a change on a weekend and upgrades the kernel with no intention of rebooting until their change window which might be severl hours or days away. If there was just something in there to complete the #if else endif statements that would be fine a #if 0 would do the trick. Thoughts? Phil =--=