[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ A ] [ next ]

Custom Debian Distributions
Chapter 6 - Technology


6.1 Meta packages

Meta packages are small packages with nearly no contents. The main feature of this type of packages is their dependencies from other packages. The naming scheme of meta packages cdd-task where cdd stands for the shortcut of a Custom Debian Distribution, i.e. junior for Debian-Jr or med for Debian-Med, and task means the certain task inside the Custom Debian Distribution.

Examples:

junior-puzzle
Debian-Jr. Puzzles
debian-edu-config
Configuration files for SkoleLinux systems
med-bio
Debian-Med micro-biology packages

6.1.1 Collection of specific software

When using meta packages no research for available software inside Debian is necessary. It would be not acceptable for normal users to browse the descriptions of the whole list of the 10000 packages in Debian. So meta packages are an easy method to help users to find the packages that are interesting for their work quickly.

If the author of the meta package decided to include packages with similar functionality an easy comparison between software covering the same task is possible.

Moreover the installation of a meta package ensures that no package which is necessary for the intended task can be removed without explicit notice that also the meta package has to be removed.

By defining conflicts to some other packages inside the meta package it is possible to ensure that a package which might conflict for some reasons for the intended task can not be installed at the same time as the meta package is installed.

All in all meta packages enable an easy installation from scratch and keep the effort for administration low.


6.1.2 Adapted configuration inside meta packages

Besides the simplification of installing relevant packages by dependencies inside meta packages these might contain special configuration for the intended task. This might either be accomplished by pre-feeding debconf questions or by modifying configuration files in a postinst script. It has to be ensured that no changes which have been done manually by the administrator will be changed by this procedure. So to say the postinst script takes over the role of a local administrator.


6.1.3 Documentation packages

A "traditional" weakness of Free Software projects is missing documentation. To fix this Custom Debian Distributions try to provide relevant documentation to help users to solve their problems. This can be done by building *-doc of existing documentation, writing extra documentation like manpages etc. This complies with the statement that Custom Debian Distributions are focussed to interests of specialised users who have a big need for good documentation in their native language.

Thus translation is a very important thing to make programs more useful for the target user group. Debian has established a Debian Description Translation Project which has the goal to translate package descriptions. There are good chances to use this system also for other types of documentation which might be a great help for Custom Debian Distributions.


6.2 Handling of meta packages


6.2.1 Command line tools

apt-cache
The program apt-cache is useful to search for relevant keywords in package descriptions. So you could search for a certain keyword connected to your topic (for instance "med") and combine it reasonably with grep:
     ~> apt-cache search med | grep '^med-'
     med-bio - Debian-Med micro-biology packages
     med-common-dev - Debian-Med Project common files for developing meta packages
     med-dent - Debian-Med package for dental practice client
     med-doc - Debian-Med documentation packages
     med-imaging - Debian-Med imaging packages
     med-imaging-dev - Debian-Med packages for medical image development
     med-tools - Debian-Med several tools
     med-bio-contrib - Debian-Med micro-biology packages (contrib and non-free)
     med-common - Debian-Med Project common package
     med-cms - Debian-Med content management systems

This is not really straightforward currently and absolutely unacceptable for end users.

grep-dctrl
The program grep-dctrl is a grep for Debian package information which is helpful to find out something about packages matching a certain pattern:
     ~> grep-dctrl ': med-' /var/lib/dpkg/available | grep -v '^[SIMAVF]' | grep -v '^Pri'
     Package: med-imaging
     Depends: paul, ctsim, ctn, minc-tools, medcon, xmedcon, med-common
     Description: Debian-Med imaging packages
     
     Package: med-dent
     Depends: debianutils (>= 2.6.2), mozilla-browser | www-browser, debconf (>= 0.5), med-common
     Description: Debian-Med package for dental practice client
     
     Package: med-bio
     Depends: bioperl, blast2, bugsx, fastdnaml, fastlink, garlic, hmmer, ncbi-tools-bin, ncbi-tools-x11, njplot, pymol, rasmol, readseq, tree-puzzle, med-common
     Description: Debian-Med micro-biology packages
     
     Package: med-common
     Depends: adduser, debconf (>= 0.5), menu
     Description: Debian-Med Project common package
     
     Package: med-common-dev
     Depends: debconf (>= 0.5)
     Description: Debian-Med Project common files for developing meta packages
     
     Package: med-tools
     Depends: mencal, med-common
     Description: Debian-Med several tools
     
     Package: med-doc
     Depends: doc-linux-html | doc-linux-text, resmed-doc, med-common, galeon | www-browser
     Description: Debian-Med documentation packages
     
     Package: med-cms
     Depends: zope-zms
     Description: Debian-Med content management systems
     
     Package: med-imaging-dev
     Depends: libgtkimreg-dev, ctn-dev, libminc0-dev, libmdc2-dev, med-common
     Description: Debian-Med packages for medical image development
     
     Package: med-bio-contrib
     Depends: clustalw | clustalw-mpi, clustalx, molphy, phylip, seaview, treetool, med-common
     Description: Debian-Med micro-biology packages (contrib and non-free)

This is as well as the apt-cache example also a bit cryptic and either not acceptable for end users.

auto-apt
The program auto-apt is really cool if you are running a computer which was installed from scratch in a hurry and are sitting on a booth for some demonstration purpose. If you had no time to install all stuff you wanted to demonstrate just start auto-apt in the following manner and you will never face some missing files or programs ...
     ~> sudo auto-apt update
     put: 880730 files,  1074158 entries
     put: 903018 files,  1101981 entries
     ~> auto-apt -x -y run
     Entering auto-apt mode: /bin/bash
     Exit the command to leave auto-apt mode.
     bash-2.05b$ less /usr/share/doc/med-bio/copyright
     Reading Package Lists... Done
     Building Dependency Tree... Done
     The following extra packages will be installed:
       bugsx fastlink readseq 
     The following NEW packages will be installed:
       bugsx fastlink med-bio readseq 
     0 packages upgraded, 4 newly installed, 0 to remove and 183  not upgraded.
     Need to get 0B/1263kB of archives. After unpacking 2008kB will be used.
     Reading changelogs... Done
     Selecting previously deselected package bugsx.
     (Reading database ... 133094 files and directories currently installed.)
     Unpacking bugsx (from .../b/bugsx/bugsx_1.08-6_i386.deb) ...
     Selecting previously deselected package fastlink.
     Unpacking fastlink (from .../fastlink_4.1P-fix81-2_i386.deb) ...
     Selecting previously deselected package med-bio.
     Unpacking med-bio (from .../med-bio_0.4-1_all.deb) ...
     Setting up bugsx (1.08-6) ...
     
     Setting up fastlink (4.1P-fix81-2) ...
     
     Setting up med-bio (0.4-1) ...
     
     localepurge: checking for new locale files ...
     localepurge: processing locale files ...
     localepurge: processing man pages ...
     This package is Copyright 2002 by Andreas Tille <tille@debian.org>
     
     This software is licensed under the GPL.
     
     On Debian systems, the GPL can be found at /usr/share/common-licenses/GPL.
     /usr/share/doc/med-bio/copyright

Just do your normal business (less /usr/share/doc/med-bio/copyright) and if the necessary package is not yet installed, auto-apt will care for the installation and proceeds with your command. While this is really cool this is not really intended for production a machine.

The short conclusion here is: There are no sophisticated tools which might be helpful to handle meta packages in Custom Debian Distributions - just some hacks using the powerful tools inside Debian.


6.2.2 Text user interfaces

dselect
This good old package handling tool provides no special help to handle meta packages in an elegant manner.
tasksel
Tasksel is the Debian task installer and the first interface for package selection which is presented to the user when installing a new computer. The End-user section should contain an entry for each Custom Debian Distribution. This is currently the case for Debian-Jr.
     Debian Task Installer v1.43 - (c) 1999-2003 SPI and others
     
     ————— Select tasks to install —————
        –– End-user ––––
        [X] Debian Jr.
        [ ] Desktop environment
        [ ] Games
        [ ] Linux Standard Base
        [ ] X window system
        [ ] Office environment
        –– Hardware Support  ––––
        [ ] Dialup internet
        [ ] Laptop
        [ ] Broadband internet connection
        –– Servers  ––––
        [ ] DNS server
        [ ] File server
        [ ] Mail server
        [ ] Usenet news server
        [ ] SQL database
        [ ] Print server
        [ ] Conventional Unix server
     
          <Finish>        <Task Info>        <Help>

Unfortunately there are some issues which prevent further Custom Debian Distributions from being included in the tasksel list because all dependencies of this task have to be solved on the first installation CD. This can not be accomplished for all Custom Debian Distributions and so a different solution has to be found here (see #186085). In principle tasksel is a good tool for easy installation of Custom Debian Distributions.

aptitude
This is a better replacement for dselect and has some useful support for searching for and grouping of packages. While this is not bad it was not intended for the purpose to handle Custom Debian Distributions and there could be some better support to handle meta packages more clever.

Short conclusion: There are good chances to get meta packages handled nicely by the text based Debian package administration tools but currently this is not yet implemented.


6.2.3 Graphical user interfaces

Debian Woody does not yet contain a really nice graphical user interface for the Debian package management system. But the efforts to support users with an easy to use tool were increased and so there are some usable options now.

gnome-apt
This is the native Gnome flavour of graphical user interfaces to apt. It has a nice Search feature which can be found in the Package menu section. If you for instance the packages of the Debian-Jr project come into the focus of interest a search for "junior-*" will show up all related packages including their descriptions. This will give a reasonable overview about meta packages of the project.
synaptic
Even more sophisticated and perhaps the best choice for users of Custom Debian Distributions. Synaptic has a nice filter feature which makes it a great tool here. Moreover synaptic is currently the only user interface which supports Debian Package Tags.
kpackage
This is the user interface of choice for KDE lovers. Regarding its features (with exception of Debian Package Tags) it is similar to both above.

Short conclusion: As well as the text based user interfaces these tools are quite usable but need enhancements to be regarded as powerful tools for Custom Debian Distributions.


6.2.4 Web interfaces

Web search
Debian has a web interface which can be used to search for certain substrings in package names. For instance if you are searching the meta packages of Debian-Med you could point your favourite Browser to

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=med-\|[amp ]\|subword=1

As a result you will get a list of all Debian-Med packages.

Package Tracking System
The Package Tracking System is a really great tool which provides essential information about packages. Regarding Custom Debian Distributions it can help if you know the Debian user name of the developer who is responsible for the meta packages:
Debian-Jr:
http://qa.debian.org/developer.php?login=synrg
Debian-Med:
http://qa.debian.org/developer.php?login=tille
Debian-Edu:
http://qa.debian.org/developer.php?login=pere

The other way to use the Package Tracking System is to search for packages starting with a certain letter:

Debian-Jr:
http://packages.qa.debian.org/j
Debian-Med:
http://packages.qa.debian.org/m

But the list you get by this method is much larger than you would wish for a good overview.

So the conclusion is - we just need better support here for Custom Debian Distributions.

list-junior.sh
The package junior-doc contains a script /usr/share/doc/junior-doc/examples/scripts/list-junior.sh which checks for the installed packages of a Custom Debian Distribution and builds a simple web page describing these packages. (The BTS contains a patch to let this script work also for other Custom Debian Distributions.)

Short conclusion: Some very basic things can be done with the web interfaces described above but techniques have to be developed to provide useful information about each Custom Debian Distribution.


6.2.5 Future handling of meta packages

Obviously there are no nifty tools as you might know them from Debian available yet. The user interfaces for apt-get have to be enhanced drastically to make them easy enough to make them useful in the hands of an end user. This might implicitly mean that we need some additional control fields in dpkg to implement reasonable functionality.

Find a set of keywords for each Custom Debian Distribution and write a tool to search these keywords comfortable. The best way to accomplish this might be to make use of Debian Package Tags which is a quite promising technique.

Tools which grep the apt cache directly for meta packages have to be written or rather the available tools for this should be patched for this actual functionality.


6.3 Building meta packages

Building a meta package is more or less equal for each meta package. This was the reason to build a common source package cdd which builds into two binary packages

cdd-dev
Helpful tools to build meta packages from a set of template files. These tools are interesting for people who want to build meta packages in the style Debian-Edu and Debian-Med are currently doing this. The purpose of this package is to make maintenance of meta packages as easy as possible.
cdd-common
This package provides some files which are common to meta packages of Common Debian Distributions especially those which were builded using the tolls of the package cdd-dev. It introduces a method to handle system users in a group named according to the name of the Custom Debian Distribution. The user menu approach is explained in detail in User menus, Section 6.4.

The usage of the tools which are contained in these packages are described now in detail.


6.3.1 Package cdd-dev


6.3.1.1 cdd-gen-control(1)

NAME
cdd-gen-control - install menu and link to helper bin and according manpage
SYNOPSIS
cdd-gen-control
DESCRIPTION
The script cdd-gen-control parses the tasks directory for text files which have a similar syntax to debian/control files. Each text file is used as template for a cdd-textfile_name meta package and has to define the dependencies.
OPTIONS
-c
Create debian/control file using template debian/control.stub.
-d
Turn on debugging mode.
-a
Print all available packages.
-e
Print excluded packages.
-m
Print missing packages.
-s dist
Without the -s option /etc/cdd/sources.list is used to verify which packages are available. You can specify one of stable, testing or unstable as argument or a complete path to a valid sources.list file.
AUTHORS
Petter Reinholdtsen pere@hungry.com, Andreas Tille tille@debian.org

6.3.1.2 cdd-install-helper(1)

NAME
cdd-install-helper - install menu and link to helper bin and according manpage
SYNOPSIS
cdd-install-helper
DESCRIPTION
This script can be used in debian/rules file to install the user menu files to /etc/cdd/menu/package, a link for the helper script of every cdd-* package and the link to the manpage for this script.
menu
If a directory menu exists in the building directory it checks for files named like meta packages (without the cdd- name prefix). These files should be valid menu files as they are provided for Debian packages in debian/menu. They will be copied to debian/pkg/etc/cdd/menu/pkg where tools like cdd-install-menus(8) will expect them.

A check will be performed whether there are text files named docs/pkg_without_cdd-prefix/dependency.txt where dependency is a package which is listed in the dependencies of the meta-package. These text files should provide reasonable information how to use this program in text form which can be viewed by a pager which is better than having no menu entry at all. A menu entry will be created which call the pager to this text file after checking whether this package is really listed in the dependencies.

common
If there exists a file common/common and has a size greater than 0 a cdd-common package is builded. The file common/control was just used to build the appropriate debian/control file using the cdd-gen-control(1) tool.
docs
The files which reside in the optional directory docs/pkg_without_cdd-prefix/ will be copied to the appropriate doc directory of the meta-package.
EXAMPLES
For the usage of this tool just have a look at the debian-med source package.
AUTHOR
Andreas Tille tille@debian.org.

6.3.1.3 Apt sources.list files in /etc/cdd/

These files are used by cdd-gen-control(1) to build valid debian/control files which contain only available packages in their dependencies. This enables building meta packages for stable, testing, unstable or even a completely different distribution which has valid sources.list entries. The file /etc/cdd/control.list is used as default for cdd-gen-control(1) and usually is a symbolic link (see ln(1)) to sources.list.distribution. It might be changed using the -sdist option of cdd-gen-control(1).

TODO: Either parse the available /etc/apt/sources.list or use a sane debconf question to use the "nearest" mirror.


6.3.1.4 Templates in /usr/share/cdd/templates

The directory /usr/share/cdd/templates contains templates which can be used to build a cdd-common which uses the tools which are contained in the cdd-common package and are useful to manage cdd user groups (see User menus, Section 6.4).


6.3.2 Package cdd-common


6.3.2.1 cdd-add-user(8)

NAME
cdd-add-user - add user to group of Custom Debian Distribution
SYNOPSIS
cdd-add-user cdd user
DESCRIPTION
Add user to cdd group and copy necessary files to users ${HOME}.
OPTIONS
cdd
one of med, junior, desktop, edu or demudi
user
user to add
AUTHOR
Andreas Tille tille@debian.org.

6.3.2.2 cdd-del-user(8)

NAME
cdd-del-user - del user from group of Custom Debian Distribution
SYNOPSIS
cdd-del-user cdd user
DESCRIPTION
Del user from cdd group and remove previousely copied files from users ${HOME}.
OPTIONS
cdd
one of med, junior, desktop, edu or demudi
user
user to delete
AUTHOR
Andreas Tille tille@debian.org.

6.3.2.3 cdd-install-menus(8)

NAME
cdd-install-menus - add menu of meta package to all Custom Debian Distribution users
SYNOPSIS
cdd-install-menus cdd package
DESCRIPTION
This script adds the menu file of a meta package of a Custom Debian Distribution to the user specific menu of all users who belong to the group of the Custom Debian Distribution.
OPTIONS
cdd
one of med, junior, desktop, edu or demudi
package
meta package with menu file
AUTHOR
Andreas Tille tille@debian.org.

6.3.2.4 get-group-users(8)

NAME
get-group-users - get names of users belonging to a system group
SYNOPSIS
get-group-users options cdd
DESCRIPTION
Called without any option get-group-users prints all users from /etc/passwd of the current system including their names if available. If a valid cdd is given only the users which are in this Custom Debian Distribution group are printed.
OPTIONS
-a|--add
Add group if it does not yet exists. If this option is missing you will get an error message in case the group does not yet exist on the system.
-c|--comma
Print comma (',') separated list (for usage in debconf).
-s|--simple
Print only user names no real names in brackets.
-h|--help
Print help screen.
AUTHOR
Andreas Tille tille@debian.org.

6.4 User menus

As stated above specialists have only interest in a subset of the available software on the box. In an ideal world this software would be the only one which is presented in the menu. This would allow the user to concentrate on his real world tasks instead of browsing funny menus.

To accomplish this a technique has to be implemented which allows to define a set of users who get a task-specific menu while getting rid of the part of software they are not interested in. The package med-common contains a debconf question which browses /etc/group for users and allows the administrator to select those users who should get the role Med-User.

The current approach to use UNIX user groups to implement the user role system is not ideal.

The Debian-Desktop project has announced to rewrite the Debian menu system to comply with freedesktop.org. Unfortunately this rewrite is not yet ready and thus the plan to provide users with an extra menu is not yet realized.


6.4.1 User menu tools


6.4.1.1 User based menus in .menu

The Debian menu system cares for menu updates after each package installation. To enable compliance with the role based menu approach it is necessary to rebuild the user menu after each package installation or after adding new users to the intended role. This can be done by using the cdd-install-menus(8) (see cdd-install-menus(8), Section 6.3.2.3) script from cdd-common.

If cdd-dev is used to build the meta packages of a Custom Debian Distribution and the menu directory was created in the way it was described in cdd-install-helper(1), Section 6.3.1.2 then the appropriate files will be copied to ${HOME}/.menu of those users, who belong to the relevant group of this Custom Debian Distribution.


6.4.1.2 Managing Custom Debian Distribution users with debconf

Using cdd-install-helper(8) (see cdd-install-helper(1), Section 6.3.1.2) it is very easy to build a cdd-common which contains debconf scripts to configure system users who should belong to the group of users of the Custom Debian Distribution cdd. For example see the med-common package.

     ~> dpkg-reconfigure med-common
     
     Configuring med-common
     ----------------------
     
     Here is a list of all normal users of the system.  Now you can select those users who 
     should get a Debian-Med user menu.
     
       1. auser (normal user A)        6. fmeduser (med user F)
       2. bmeduser (med user B)        7. glexuser (lex user G)
       3. cjruser (jr user C)          8. hmeduser (med user H)
       4. djruser (jr user D)          9. iadmin (administrator I)
       5. eadmin (administrator E)     10. juser (normal user J)
     
     (Enter the items you want to select, separated by spaces.)
     
     :-! Please specify the Debian-Med users! 2 8

This example shows the situation when you dpkg-reconfigure med-common if med user B and med user H were defined as users of Debian-Med previously and med user F should be added to the group of medical staff. (For sure it is more convenient to use the more comfortable interfaces to debconf but the used SGML DTD does not yet support screen shots.)

General menu rewrite

There are continuous discussions about the future of the Debian menu system. The good part of the current system is that it is perfectly included into the package installation mechanism and menus of packages which are built correctly are available immediately after the installation. A further advantage is that it works with all window managers and also without Gnome or KDE or even in a text environment - at least in theory.

If it comes to special user configuration, which should be in ${HOME}/.menu the current system is full of bugs and you can hardly find a system which really works like proposed. But exactly the special user configuration is the interesting stuff for Custom Debian Distributions and so these bugs are a really nasty drawback.

Moreover the new proposed menu system should be compatible to freedesktop.org which enables even more features over the old system: User roles and translation. On the other hand it will not run on text interfaces.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ A ] [ next ]

Custom Debian Distributions

9 April 2004

Andreas Tille tille@debian.org