module-assistant

8

module-assistant

manage kernel modules packages

         module-assistant
         -fihnqstv
         -k source/headers directory
         -l kernel versions

           update
           search
           prepare
           auto-install
           list
           list-available
           list-installed
           auto-unpacked
           get
           build
           install
           clean
           purge
           fakesource

         pkg

         m-a ...

## Description

`Unless the `NOTE: don't even think about using some random linux-source-x.y.z package contents (or linux-x.y.z tarball from the Internet) to specify the kernel source for your currently running kernel. `Don't!` Those source is not exactly what have been used to build the running kernel and its configuration most likely does not match yours. You need the configured kernel source directory or at least the derived linux-headers-... package containing the kernel configuration for the exact kernel version (complete version string). If you do not understand anything of the above, run "m-a prepare" and/or look at the description and contents of some linux-headers-... package. Please run the `module-assistant prepare` command once before you do anything else.``

For some packages, linux-headers (reduced source) is not enough. You will have the choice to run a completely customized kernel, or to recreate the source that have been used to build the current one. The `In order to configure a kernel source properly, you need to make sure that the file version.h is generated. To get it, configure the options as usual (`make menuconfig` etc.) and run `make dep` (for kernel 2.4.x) or `make prepare` (for newer ones).`

## Commands

Most commands require a specification of the package names that they should be applied on. `Multiple commands can be specified in one invocation, eg. "`If you do not like the dialog/whiptail GUI, feel free to use the ````

update

- ``

  prepare

- Tries to determine the name of the required linux-headers package (either the one matching the currently running kernel or for the versions specified with `/usr/src/linux` symlink if needed. Also installs the build-essential package to ensure that a sane compiler environment is established.

fakesource

- Experimental function which tries to determine the name of the required/compatible linux-source package, installs it, modifies the Makefile to look like the original source and runs configuration routines as needed. Warning: DO NOT RELY ON THE RESULTING SOURCE. It may be very different from the original version.

list | list-available | la

- ``

  list-installed | li

- Synonym to ``

  search

- Synonym to ``

  get

- ``

  build

- ``

  install

- ``

  auto-install | a-i

- ``

  auto-build | a-b

- like ``

  clean

- ``

  purge

- ``

## Options

``

``

- Show pure build/install/update logs, no progress bars.

``

``

- The kernel source directories to be used for builds. You can specify multiple directories with multiple options or separated by commas or line separators (e.g using `-k "`echo /usr/src/linux-headers-*`"` ). The kernel versions detected in this directories are automatically added to the list of target kernel versions (see `--kvers-list` for details).

``

``

- List of kernel version strings (as in KVERS) to act on. If omitted, the version string of the currently running kernel is inserted. If `--kernel-dir` specifies additional source directories, the kernel versions that belong to them will be inserted too.

  The locations of the kernel source (or headers) that belong to this kernel versions are either detected by a lookup in the "usual" locations on Linux systems, or they must be specified with the `--kernel-dir` option.

``

``

- Shows a bit more information, like full paths of the binary packages.

``

``

- If a package that is to be generated does already exist in the target directory (maybe in on older version), `The default behaviour is to skip when exactly the same file (with the same filename) is to be generated as the one that already exists, and the new filename could be detected before starting the build process (depends on the module package).`

``

``

- Never look for target file (in another version) and force a build. For the get command, download a newer version of a package even if it is already installed.

``

``

- All relevant environment variables with paths will be redirected to new directories under the one specified with this option.

``

``

- When the package build was not successful, just continue with other candidates. By default, module-assistant will suggest to examine the build log. This option may also modify the behaviour of dpkg and apt-get to reduce the need for human interaction and install build dependencies as needed.

``

``

- Try to not unpack twice. The option needs to be also specified when the package is being unpacked for the first time. Experimental option, don't rely on it.

``

``

- Never unpack the source tarball. Useful after manual manipulation of module source.

``

``

- Suppress some of the noisy messages during the processing.

``

``

- A replacement command for superuser commands to be used instead of ``

  ``

  ``

- See ``

  ``

  ``

- Prints the usage overview.

## ENVIRONMENT VARIABLES

You can export the following environment variables to modify the behaviour of the build scripts. Some packages may ignore them or interpret them differently.

KPKG_DEST_DIR

- ``

  KERNELDIRS

- ``

  SIGNCHANGES

- If ``

  KMAINT | DEBFULLNAME | DEBNAME

- Specifies the realname of the person building the package (interesting for .changes file only)

KEMAIL | DEBEMAIL

- Specifies the email address of the person building the package (interesting for .changes file only).

MODULE_LOC

- A different location for the (already extracted) module source directories. Default is `/usr/src/modules`.

MA_VARDIR

- A different location for cached data, used by helper scripts from `/var/cache/modass`.

MA_APTCMD

- Command to download install packages, to use instead of the `apt-get`.

MOD_SRCDIR

- A different location for module source tarballs. Default is `/usr/src`.

ROOT_CMD

- Wrapper command to execute command as root. If you are not root, fakeroot is chosen automatically. This variable must be interpreted by individual packages so some of them may ignore it. However, you can still run module-assistant inside of the ROOT_CMD wrapper.

## Non-Root usage

`/var/cache/modass` on a normal Debian system. So the commands are `get`, `install`, `auto-install` and `prepare` are taboo for regular users. However, if the sudo program is installed, it will be invoked for apt-get and dpkg operations. All remaining commands except of `list` require additional environment variables to move the target paths to locations writable for the user. They all can be trimmed to a certain location (a writable directory) using the ``

### Files

`/usr/share/modass/packages/*`

- List of helper scripts shipped with the module-assistant package.

`/usr/share/modass/overrides/*`

- Helper scripts installed by other packages.

### See Also

`,`

`/usr/share/doc/module-assistant/README`

### Bugs

See the module-assistant bug page. If you wish to report a bug in module-assistant, please use the

`command.`

### Return codes

0

- Success

1..249

- various errors during the build process

254

- problem with permissions

255

- fixable error after user intervention

### TODO

Quicklist (fast output without details)

Integration into APT and/or into the init system

"Aggressive" debianisation using the templates set (to generate a package with guessed name from any source that looks like being compatible with kernel 2.6 build system)

Automatic transformation of kernel sources to generate .udeb packages

### Author

Module-Assistant was written by Eduard Bloch blade@debian.org for the Debian distribution.