[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Modules packaging policy - call for discussion



Hi,

In the discussion I've seen so far most people tend to favor the system, in which each individual module package builds the binary packages matching the current kernels. Based on that I've written a very preliminary draft of the policy (below). One problem with the described scheme is that there seems to be no way to ensure that a binary kernel module package gets upgraded when the kernel gets upgraded. If you have any ideas on how to achieve this, please share. I'll continue working on a sample debian/rules file. Comments and suggestions are welcome!

Packaging scheme
----------------
Each source package containing the out-of-tree kernel module source
should produce the following binary packages: the binary-source
package, which contains the module source in the form suitable for
building by module-assistant, and binary-binary packages, matching the
kernels currently available in the archive.

Source package
--------------
It should be possible to build all the binary packages from the source
package simply by invoking the 'debian/rules binary' command. In order
to build the binary-binary module packages for all supported flavours
of the official kernels, the source package should Build-Depend on the following packages:

* linux-headers-$(VERSION)-all: will pull in the linux-headers for
  all supported flavours for current architecture.
* module-assistant: recommended tool to build the binary modules.
* linux-support-$(VERSION)-$(ABINAME): the support scripts and
  Makefile snippets to simplify the building of the modules for
  all flavours.

Please see the example rules file (to be written) for details.

Binary-source package
---------------------
The purpose of this package is to give the users a possibility to
build the modules for a custom-built kernel. It should be adopted for
building with module assistant, see m-a documentation for details.
This package should have the name $(STEM)-source. It should include
all files necessary for building the binary modules from source
against the official linux-headers packages. If linux-headers does not
contain all the files required for a module build, they should be
shipped as a part of the package.

Binary-binary packages
----------------------
Binary-binary packages should be named
$(STEM)-linux-modules-$(VERSION)-$(ABI)-$(FLAVOUR), where $(VERSION), $(ABI)
and $(FLAVOUR) parameters should match the corresponding values of the
official linux-image package for which the module is built. Kernel modules shipped in the package should be installed in
/lib/modules/$(VERSION)-$(ABINAME)-$(FLAVOUR)/$(STEM) directory. The
package should invoke 'depmod -a' in its postinst script if the version, abiname and flavour of the kernel running at the installation time is the same as the version of the kernel it has been built for. The recommended way to build these packages is by using module-assistant.
See the example rules file (not yet there) for details.

Best regards,

Jurij Smakov                                        jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC



Reply to: