Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

We propose a new code and driver database design for restricted-manager which will make it maintainable again and also be suitable as a proper upstream project, so that other distributions can use it as well.

We review the list of existing and proposed features and create a new code architecture which will be rewritten from scratch (with reusing most of the existing code modules, of course).

Release Note

The behaviour of restricted-manager should not change in a visible way, so this should not be mentioned in the release notes.

Rationale

The original code architecture of restricted-manager was very narrow, focusing on non-free kernel drivers in a Gnome application. A lot of new features have been bolted on this original structure, such as the KDE frontend, grouping of handlers, support for firmware installation, or non-free support packages of drivers which are free by themselves. This made the code very interdependent and hard to maintain/bugfix/understand.

The current version also has a lot of Ubuntu specifics hardcoded, which renders it hard to use for other distributions without significant changes.

Use Cases

Design

Implementation

Handler-Driver mapping

http://www.drivertool.org is a distribution neutral place which can be used for hosting the central mapping. This site is currently hosted privately by Jon Masters, but if traffic becomes an issue, it would need some contributions by Canonical, RedHat, and other Linux vendors which participate. However, the amount of data that gets exchanged is very small.

Any computer can do a query on this database. As an input, it provides a type/value pair, where type is 'modalias', 'PCI vendor/product ID', 'Printer manufacturer and model', etc., and the value is the respective value for that type. This ensures that

The response is a list of available entries, where each entry has the following fields:

The type/value pairs can be interpreted freely for each OS vendor (distribution), but there should be some standard types like 'handler, 'module', 'url', 'packagename', 'md5sum', 'sha1sum', etc.. For Ubuntu, we additionally define the data type 'repository', which would be an URL to an apt repository.

With this design, each client always gets the full list of entries for all OS vendors. This compromise is done to avoid exposing the OS vendor and version, and other information which could be used for tracking, collecting data for security attacks (like providing an IP list of known-vulnerable OS versions); the lists are not expected to become very big, too (in the order of 50 entries, which should amount to some 5 KB).

Distribution specific handlers know by themselves which module and package they need, so for those the DB only needs to specify the handler name and information which is better maintained outside of the handler itself (like URLs which are volatile). But this design also permits writing more generic handlers which get their information (which kernel module they manage, or which additional packages to install) from the driver database.

Example 1: bcm43xx firmware

Client → DB:

module
bcm43xx

DB → Client:

Ubuntu/all
    handler BroadcomFirmwareHandler
    url http://ubuntufriends.org/firmware/bcm43xx.o
    sha1sum DEADBEEF42
SuSE/10.3
    handler Bcm43xxHandler
    package bcm43xx_firmware
    component non-free

Example 2: nVidia driver

Client → DB:

modalias
pci:v000010DEd00000098sv*sd*bc03sc*i*

DB → Client:

Ubuntu/7.10
    handler NvidiaGlxNewHandler
    repository restricted
Ubuntu/8.04
    handler http://www.ubuntu.com/drivers/handlers/8.04/NvidiaGlxHandler.py
    repository restricted
Fedora/8
    handler NvidiaGraphicsHandler
    repository http://www.fedora-nonfree.org/fedora8/

Class layout

restricted-manager.png

(Dia source: restricted-manager.dia)

Collaboration with other distributions

Test/Demo Plan

(TODO)

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during CD testing, and to show off after release.

This need not be added or completed until the specification is nearing beta.

Outstanding Issues


CategorySpec

DesktopTeam/Specs/RestrictedManagerRewrite (last edited 2008-08-06 17:01:12 by localhost)