Isenkram: How to make your package show up when a user log in new hardware
==========================================================================

So, you got a package in Debian that should be proposed to the user by
Isenkram when it is inserted (or present) in a computer.  There are
three ways to do this.

 1) Add a Modaliases header in the package control file.  This allow
    both Isenkram and similar the Ubuntu tools (ubuntu-driver-common
    and jockey) to map the package to the relevant hardware.  This is
    the preferred method.

 2) Get the modaliases file in the isenkram package updated to include
    the mapping.

 3) Provide the mapping locally on each computer in
    /usr/share/isenkram/modaliases.d/.

It is a good idea, while the isenkram feature is being introduced into
Debian, to update both the package and the Isenkram package.

The first step is to figure out the modalias values to match.  It can
either be based on device ID, or device type (often called bus class).
A simple way to figure out the module alias of a pluggable device is
to run

  /sbin/udevadm monitor --kernel --environment | grep ^MODALIAS=

Plugging in and out the device a few times will show what kind of
values are emitted from the kernel when the device is inserted.  For a
CueCat bar code reader, this USB type value will be emitted:

  usb:v0458p0101d0100dc00dsc00dp00ic03isc01ip01

This is USB id 0458:0101, device class 00 (defined at interface
level), protocol 0, interface class 03:01 (Human Interface Device,
boot interface subclass) and interface protocol 1.  One need to decide
which part of the module alias value to use for matching.  In most
cases it is a question of using the ID or the class information.  In
this case I would recommend using the USB ID, ending up with a glob
rule like this:

  usb:v0458p0101d*

FIXME another example

The second step is to make the glob rule available for Isenkram.  The
data format understood by Isenkram is modelled after how the Ubuntu
packages jockey and ubuntu-drivers-common fetch their data from the
APT Packages file.

package
isenkram
/usr/share/isenkram/modaliases.d

 - USB
   - id or bus class
 - PCI
   - id or bus class

 - dmi

 - kernel module



