The problem described here can now be easily solved by editing the spec, but it would be nice if you consider this issue next time you'll redesign part of the kernel spec, so that this would be taken care of automatically. Problem: At the top of the spec file there are %define's to include various kind of kernels in the rpm build: smp, BOOT, enterprise, .... I usually set all of them to off, to build just the "normal" up kernel. You use this "trick" to build the version.h === echo "#include <linux/rhconfig.h>" >> version.h keyword=if for i in smp BOOT BOOTsmp enterprise up; do verh=`echo ../../savedheaders/*/$i/version.h | awk ' { print $1 } '` if [ -n "$verh" -a -f "$verh" ]; then if [ "$i" = up ]; then echo "#else" >> version.h else echo "#$keyword defined(__module__$i)" >> version.h keyword=elif fi grep UTS_RELEASE $verh >> version.h fi done echo "#endif" >> version.h === Guess what happens if you build the rpm with just the up kernel... :) You end up with a version.h like === #include <linux/rhconfig.h> #else #define UTS_RELEASE "x.x.x" #endif #define LINUX_VERSION_CODE 131600 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) === Maybe, since rhconfig.h defines __module__up, you could take out the up particular case and use something like this (not tested), which should always produce a correct version.h. If you want to maintain a catch-all rule you could add it after "done", before "#endif". === echo "#include <linux/rhconfig.h>" >> version.h keyword=if for i in smp BOOT BOOTsmp enterprise up; do verh=`echo ../../savedheaders/*/$i/version.h | awk ' { print $1 } '` if [ -n "$verh" -a -f "$verh" ]; then echo "#$keyword defined(__module__$i)" >> version.h keyword=elif grep UTS_RELEASE $verh >> version.h fi done echo "#endif" >> version.h ===
fixed; thanks for the report.