Re: debian/rules assumptions for kernel modules?
Al Stone <ahs3@fc.hp.com> writes:
> Is there a document somewhere that describes the assumptions I can
> make in a debian/rules file?
In general, you get to assume a clean system with the build-essential
packages, plus any you build-depend on, installed.
> For instance, as part of my work to be a DD, I'm working on a
> package that makes a kernel module.
Ick, those are hard. :-/
> At some point, buildd (I think that's the name of the daemon) will
> probably invoke make-kpkg to build kernel module packages from my
> package that will provide the modules for the various kernel-image
> packages available.
Nope, no such magic. On the other hand, if you provide a proper
foo-source package, users might install it and run make-kpkg on it.
Also, you should be aware that if you provide a -source binary
package, users will install it and then try to build it without using
kernel-package.
> So, can I, in the rules file, assume that /usr/src/linux exists?
No; nothing in Debian creates such a directory. (But the
kernel-package infrastructure provides a $(KSRC) variable that tells
you where the source actually is.)
> Can I assume that there's a .config already made?
I think this at least is a reasonable assumption.
> It's easy enough to put checks in the rules so that the build fails
> if these things are not present; that'll be done. But, I just
> haven't been able to find anything that tells me what sort of build
> environment I can rely on. Have I just not looked in the right
> place?
Probably the best things to look at, as has already been mentioned,
are Debian policy and the kernel-package documentation.
--
David Maze dmaze@debian.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
Reply to: