Hello Bryan, On Fri, Dec 07, 2001 at 06:13:58PM -0500, Bryan-TheBS-Smith wrote: > Hello. My name is Bryan "TheBS" Smith of AbsoluteValue Systems, Inc. > We're the Linux-WLAN guys and have released drivers for Intersil-based > wireless LAN cards. I'm almost completely new to Debian both as a user > and a packager, but have been quite impressed so far coming from the > RedHat/RPM world. I'm not an expert on packaging of kernel modules, but from what you're describing it sounds to me like you might make better use of your time by figuring out how to package the sources /first/: there are many packages of driver source code in Debian that integrate very well with the 'make-kpkg' tool (apt-get install: kernel-package), and you may find that if you can get this down, you can just use make-kpkg to build binary driver packages suitable for distribution. :) For a kernel-module package that you can use as an example, I would recommend device3dfx-source (because it's the only one I'm directly familiar with), but there are many others. The basic layout of the binary package is a single tarball, /usr/src/<modulename>.tgz, that will untar into /usr/src/modules/<modulename>. Of course, the real trick there is that you need a /usr/src/modules/<modulename>/debian directory inside of the tarball... hmm. Maybe this isn't the easiest place to start after all. :) > As such, this is going to be almost an "AOL-level" help request. I'm > very sorry for this. All I'm looking for is a little direction, and > I'll RTFM the rest. I've gone through much of the FAQ, Developer's > Reference and New Maintainer's Guide, and I'm a bit "overwhelmed" to say > the least. I've downloaded the "hello" source package as well as > "alsa-driver," trying to see how things are done -- but am confused on > the .diff.gz, .desc, orig.tar.gz I get from apt-get source blah, versus > what the docs say about "control files", etc... > I guess I just need someone to say, "for that, read this". My memory of what docs are where isn't that good, but to give you a bit of a boost from the apt-get source stage.. apt-get source will download three files, as you've noticed. If no other options are passed, it will also unpack the files into a subdirectory that's all set up for building the binary packages. Within the subdirectory, there may be one or more subdirectories. The one directory that's required to be present is 'debian/'. Within debian/, you should see the required files changelog, control, copyright, and rules; and a number of other files as well, depending on the package's needs. Depending on the context you found it in, references to "control files" may be referring to this debian/control file. They may /also/ be referring to the binary package control file (typically debian/tmp/DEBIAN/control or debian/<package>/DEBIAN/control, created at build-time). If you build your package with any kind of helper scripts, you don't have to worry directly about the contents of the binary package control file. > First off, again, I'm kinda confused on where to begin (yeah, like you > haven't heard that before, I know ;-). Is dh_make where I should start > (our package is just a tarball)? Heck, I'm just trying to find the > "equivalent" to a RedHat SPEC file, the --bb/--rebuild options, etc... > (yes, I know, dpkg is _much_more_flexible_ than RPM/SPEC ;-). dh_make is a good start. If you're going to use a recipe-based rules script, though, you might also want to look at the debian/ subdirectory from another kernel module package, and tweak it until you get where you want to be... Since dh_make's recipes are primarily for source packages that generate a single binary package as output, and you probably want two binary packages as output (see below), dh_make itself isn't going to do everything you need. For an equivalent to a --rebuild, btw, try 'apt-get source -b <package>', and for '--b', you can play with dpkg-buildpackage's options, or run "./debian/rules binary" (to build all binary packages). > Secondly, our drivers require both kernel and pcmcia-cs source to build > against. So I need to find a way to download the appropriate source > packages if the user has not built customized ones (and dpkg/apt seems > like it can do this, whereas RPM cannot ;-). [ I assume the > kernel-source packages come with the same .config as their equivalent > kernel-image packages were built with? ] Where do I put a script/info > in to do this (I think it is just more than a dependencies link?)? > E.g., this is an example of what our current RPMs install (and each > RPM is built from a kernel-specific SPECfile -- something I hope I > can avoid with Debian's powerful dpkg/apt system): > /etc/pcmcia > /etc/pcmcia/wlan-ng > /etc/pcmcia/wlan-ng.conf > /etc/pcmcia/wlan-ng.opts > /etc/wlan > /etc/wlan/shared > /lib/modules > /lib/modules/2.4.9-12 > /lib/modules/2.4.9-12/net > /lib/modules/2.4.9-12/net/p80211.o > /lib/modules/2.4.9-12/net/prism2_pci.o > /lib/modules/2.4.9-12/net/prism2_plx.o > /lib/modules/2.4.9-12/pcmcia > /lib/modules/2.4.9-12/pcmcia/prism2_cs.o > /sbin/nwepgen > /sbin/wlancfg > /sbin/wlanctl-ng > /sbin/wland So, this definitely wants to be one source package that creates two different binary packages: one that contains the helper binaries, since these never need to be recompiled just because you're recompiling the modules against a different kernel; and one that contains the module source (call it wlan-source, if you like), that can be rebuilt against whatever kernel is on-hand. We'll try not to confuse ourselves too much yet by the fact that wlan-source is a "binary package" in dpkg parlance, especially since we're going to turn around and use it to build /another/ binary package, wlan-module-<kernelversion>. dh_make should provide a starting point for creating the binary package containing the helper binaries and config files. Once you feel comfortable with that package, we can look at the issues with creating a binary package for the module sources. You mention wanting to get this into the Debian archive. Do you need a sponsor? If so, I'd be willing to sponsor your uploads and broaden my horizons a bit on a different type of package than I'm used to. Cheers, Steve Langasek postmodern programmer
Attachment:
pgpvsdyC9xSFM.pgp
Description: PGP signature