Proposal to better support custom kernel modules

Sean Millichamp sean at compu-aid.net
Thu Oct 23 12:53:16 UTC 2003


I would like to make a proposal/request in the hope of soliciting
feedback and ideas.

Short summary: There should be a standard path supported by the
distribution where RPM packages can install custom/updated kernel
modules and know that the modutils will search there first before
searching the path containing the distribution supplied modules in the
kernel-* packages.

Background:

As part of supporting some of my systems I need to provide custom kernel
modules.  For example, two that I use frequently are Sangoma WANPIPE
drivers (the ones that ship with the kernel are ancient) and the PPP
MPPE compressor for PPTP support (the MPPE module requires a new
ppp_generic.o).  Because I strive for a fully RPM managed system I've
been doing my best to produce clean RPM packages to manage these
modules.

The problem that I encounter is that both of these kernel module updates
need to replace files that are provided by the Red Hat/Fedora supplied
kernels.  There is no mechanism that I have found in RPM to specify that
files can be "stolen" by new packages so if I try to install RPMs with
the modules to the standard locations I need to use --force to overwrite
the existing files - which I don't consider a good solution in general
and it is particularly bad when you are using something like apt/yum.

The solution I have seen a number of times is to package the file in the
RPM named differently and then use post-installation scripts to rename
the old kernel module out of the way and then rename the new one in it's
place.  While this does avoid the --force issue it violates the spirit
of package management and RPM "owning" the files and it breaks --verify
runs on the kernel packages.

What I have found to be the only good solution so far is to setup a new
module path in /etc/modules.conf so that modutils searches that first
and then if it doesn't find the module there then proceeds to the
standard kernel location.  So I have tested some RPMs that setup
/etc/modules.conf to look something like:
path=/lib/modules/custom/`uname -r`/kernel
path=/lib/modules/`uname -r`/kernel

Then I have the RPMs install the modules in the /lib/modules/custom
hierarchy and they are found there first.

This has worked well for me and seems to meet all the requirements from
a packaging standpoint.

I would like to request that whoever is in charge of modutils/kernel
module issues (presumably someone @redhat.com) take a look at this idea
and codify a standard path that is searched first and setup by default
with the distribution so that there is a standard mechanism all kernel
module packagers can take advantage of in a consistent fashion.

Any comments and suggestions are welcome.

Thank you.

Sean






More information about the fedora-devel-list mailing list