When I compile a grsec-patched kernel in Ubuntu with their kernel-package scripts, I get errors about the localversion being set incorrectly. Does anyone know how to avoid this error? This is the procedure that I follow on Ubuntu 10.10, although this has been bothering me for much longer than just this latest version:
- Code: Select all
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.36.2.tar.bz2
tar xjf linux-2.6.36.2.tar.bz2
wget http://grsecurity.net/test/grsecurity-2.2.1-2.6.36.2-201101021130.patch
wget http://grsecurity.net/test/grsecurity-2.2.1-2.6.36.2-201101021130.patch.sig
gpg --verify http://grsecurity.net/test/grsecurity-2.2.1-2.6.36.2-201101021130.patch.sig
patch -p0 --dry-run < http://grsecurity.net/test/grsecurity-2.2.1-2.6.36.2-201101021130.patch
patch -p0 < http://grsecurity.net/test/grsecurity-2.2.1-2.6.36.2-201101021130.patch
cd linux-2.6.32.2
make-kpkg clean
cp /boot/config-2.6.35-24-generic .config
make menuconfig
<-- turn on grsec, turn off a bunch of other crap -->
make-kpkg --initrd kernel-image kernel-headers
...
dpkg-gencontrol: error: package linux-image-2.6.36.2-grsec not in control info
I see that this behavior is related to some open bugs in Ubuntu's Launchpad bug tracker:
- https://bugs.launchpad.net/ubuntu/+source/kernel-package/+bug/58307
- https://bugs.launchpad.net/ubuntu/+source/kernel-package/+bug/602405
Does anyone know the easiest way to avoid this issue? Thanks!
EDIT: It may be worth adding the answer to this question to the Wikibook: http://en.wikibooks.org/wiki/Grsecurity/Configuring_and_Installing_grsecurity#Compiling_and_Installing_the_Kernel