[Pkg-dkms-maint] Bug#554843:

Jan Arie Gutter kernel at jangutter.com
Thu Jun 7 14:48:21 UTC 2012


I have no idea if anyone is still interested in this, but here's my
two cents worth:

We need to deploy pre-built modules (from source) to a lot of servers
that, for various reasons (security, CPU load, space, etc.) do not
have gcc and the kernel headers installed. DKMS solves a similar, but
completely different problem. I used module-assistant (m-a) for a
workaround, but honestly, it might be just as easy as to tar up the
modules on the build box, and copy them over to the production boxes.
If this were slightly more automated, it would be much appreciated,
but for now, we have a workaround.

Here's a detail example of how the process works to install
xtables-addons to multiple machines without using dkms and therefore
installing gcc + kernel headers.

On the "Build/Staging" box:

1. Mirror the exact configuration of the production server: we're
basically imaging them so they're exactly the same.
2. Install all build dependencies for xtables-addons (apt-get
build-dep xtables-addons-common and apt-get build-dep
xtables-addons-dkms), also install module-assistant
3. Run the following:
apt-get install xtables-addons-source
m-a build xtables-addons
apt-get -d install xtables-addons-common
4. Now, the following files should have been created/downloaded (I'm
using our specific version example here):
/usr/src/xtables-addons-modules-3.2.0-24-generic_1.41-2ubuntu0.1_amd64.deb
/var/cache/apt/archives/xtables-addons-common_1.41-2ubuntu0.1_amd64.deb
They can be distributed to the "Production/Deployed" server.

On the "Production/Deployed" box:

1. do a dpkg -i of both packages at the same time, so dependencies are
resolved: dpkg -i *.deb
2. enjoy!

I'm horribly certain that this method I just described has got lots of
caveats, but, it seems to work, and adds tracking to the few .ko files
that is copied over. Moreover it also seems to allow the userspace
half required to be installed with correct dependency tracking. It
just goes to show that some of the more underdocumented utilities may
still shine in a lot of places!

Jan Gutter





More information about the Pkg-dkms-maint mailing list