6

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.

2
  • I know this is a very old question, but do you remember what you ended up doing? did you use DKMS?
    – kaptan
    Jun 8, 2023 at 22:59
  • @kaptan sorry i don't remember. also don't remember what project this was for.
    – Jayen
    Jun 9, 2023 at 3:35

3 Answers 3

7

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).

3
  • I'll give dkms a try. Glad to see it's in backports.
    – Jayen
    Oct 28, 2010 at 5: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, 2010 at 6:33
  • I'm trying to follow this walkthrough: wiki.centos.org/HowTos/BuildingKernelModules
    – Jayen
    Oct 29, 2010 at 9:17
2

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).

1
  • :( 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, 2010 at 5:44
0

You can use module-assistant for that. See http://wiki.debian.org/ModuleAssistant

1
  • 1
    As 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, 2010 at 5:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .