From: Mart Frauenlob on
As this one:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561569
does not really work on debian lenny (although suggested on some
websites) and i had to work myself through to get it working, here's a
patch for the kernel-package 11.015, that's currently in debian lenny,
for the use with a vanilla 2.6.33 kernel.
Attached, but pasted here also to be viewable without downloading the
attachment.


--- kernel-package/ruleset/targets/common.mk 2008-11-24
18:01:32.000000000 +0100
+++ /usr/share/kernel-package/ruleset/targets/common.mk 2010-03-06
00:29:54.000000000 +0100
@@ -333,8 +333,14 @@
@echo this was built on a machine with the kernel: >> debian/buildinfo
uname -a >> debian/buildinfo
echo using the compiler: >> debian/buildinfo
- grep LINUX_COMPILER include/linux/compile.h | \
- sed -e 's/.*LINUX_COMPILER "//' -e 's/"$$//' >> debian/buildinfo
+ if [ -f include/generated/compile.h ]; then \
+ grep LINUX_COMPILER include/generated/compile.h | \
+ sed -e 's/.*LINUX_COMPILER "//' -e 's/"$$//' >>
debian/buildinfo; \
+ else \
+ grep LINUX_COMPILER include/linux/compile.h | \
+ sed -e 's/.*LINUX_COMPILER "//' -e 's/"$$//' >>
debian/buildinfo; \
+ fi
+
ifneq ($(strip $(shell test -f version.Debian && cat version.Debian)),)
echo kernel source package used: >> debian/buildinfo
echo $(INT_STEM)-source-$(shell cat version.Debian) >> debian/buildinfo
--- kernel-package/ruleset/misc/version_vars.mk 2008-11-24
18:01:32.000000000 +0100
+++ /usr/share/kernel-package/ruleset/misc/version_vars.mk 2010-03-05
23:41:33.000000000 +0100
@@ -138,11 +138,13 @@
EXTRAV_ARG :=
endif

-UTS_RELEASE_HEADER=$(call doit,if [ -f include/linux/utsrelease.h ];
then \
- echo include/linux/utsrelease.h; \
- else \
- echo include/linux/version.h ;
\
- fi)
+UTS_RELEASE_HEADER=$(call doit,if [ -f include/generated/utsrelease.h
]; then \
+ echo include/generated/utsrelease.h ; \
+ elif [ -f include/linux/utsrelease.h ]; then \
+ echo include/linux/utsrelease.h ; \
+ else \
+ echo include/linux/version.h ; \
+ fi)
UTS_RELEASE_VERSION=$(call doit,if [ -f $(UTS_RELEASE_HEADER) ]; then
\
grep 'define UTS_RELEASE' $(UTS_RELEASE_HEADER) |
\
perl -nle
'm/^\s*\#define\s+UTS_RELEASE\s+("?)(\S+)\1/g && print $$2;';\



Hope it helps


Mart Frauenlob