Specifically, I want to build a package for debian/lenny using the latest uvc drivers. I can compile and install them, but I want them packaged in the normal debian fashion. I imagine I want to use make-kpkg somehow, but I don't know how. module-assistant seems no good, because that seems to only use sources available in debian.
3 Answers
There is a better solution than m-a: dkms
It actually makes it easier to distribute external kernel modules and automatically compiles them for newer kernel-versions (think installing a new package of linux-headers).
- 850
- 4
- 7
-
I'll give dkms a try. Glad to see it's in backports. – Jayen Oct 28 '10 at 05:38
-
You could take a look at the backfire-dkms or ndiswrapper-dkms packages for an example on how to build such a package. They are relatively simple and easy to understand in their structure. – Fladi Oct 28 '10 at 06:33
-
I'm trying to follow this walkthrough: http://wiki.centos.org/HowTos/BuildingKernelModules – Jayen Oct 29 '10 at 09:17
There's no easy answer. To create a real Debian package from scratch is not just a matter of sticking files into an archive, you'll need the control file and installation scripts and everything else that makes it a package rather than just a tarball.
To learn about using dh-make and debhelper to create packages, start with the New Maintainers' Guide, then read the Developer's Guide on packaging "best practices".
Then, /usr/share/doc/module-assistant/README.gz
and HOWTO-DEVEL.gz
covers how to use the packaging tools to create source packages that module-assistant can understand.
I think if you're packaging a module that exists in the default kernel package you'll have more work to prevent conflicts. If you're just doing this for yourself, it would probably be best to build and install a custom kernel package with the "old" driver disabled so that the files don't conflict (note the instructions in README.gz regarding KVERS).
- 19,313
- 2
- 35
- 51
-
:( I was really hoping there was something already specifically for kernel module packages. Two years ago, I used dh_make and a dodgy Makefile to make a e1000e package, which would install to /lib/modules/`uname -r`/updates, overriding the included kernel modules. I was hoping there was a lazier, more proper protocol now. – Jayen Oct 28 '10 at 05:44
You can use module-assistant for that. See http://wiki.debian.org/ModuleAssistant
- 11,337
- 6
- 36
- 47
-
1As mentioned on the page, module-assistant uses source code from apt repositories. That page doesn't go into details about getting the source code into an apt repository (or a format m-a understands). – Jayen Oct 28 '10 at 05:36