This is not a new problem but recently it started to affect me more. It
concerns the way redhat
(and others) decided to organize the kernel headers to match the running
By chanching files with information needed to properly compile modules
external to the kernel
tree you are making it very hard to support your distributions. What I
propose is that the
headers a user sees (by including them) are exactly the same he would
expect in the official
kernel tree with a similar configuration. Solutions to the problem:
1. Have different kernel-headers packages one for each kernel image package
which install the files to different /usr/src/linux-version directories.
The version name would be the same as for the kernel (2.2.17-smp-i686).
Links are created at boot or install time to match the kernel and the
2. The kernel image package also contains the respective kernel-headers so
that they are always in sync. The rest as above.
3. The kernel-headers package installs all the possible versions of the
files needed to support different kernel versions (autoconf, config,
version, modversion,...) with the different version names (up-i386,
up-i586, smp-i486,...). Each of these headers is an exact copy of the ones
in an official kernel tree after being configured (make config dep) with
the configuration file you used to compile the kernel. Now at boot time, or
as a post-install script for the kernel image packages, a bunch of links is
made in linux/include/linux so that version.h, config.h, autoconf.h,
modversions.h point to the currect version. This way external modules
makefiles only have to support the official kernel tree and not n
distributions x m versions.
Linus has spoken on this issue, and the consensus was that, the headers of the
currently running kernel would be accessible from
RH7 also uses this convention, and I wonder what more you would need.
Yes, that solution would do. I still have some questions though:
Is this done for 2.2 kernels also?
Which redhat 7.0 packages contain the headers files for each of the kernel image
The kernel-source package should install this all.