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


Custom Debian Distributions
Appendix A - Description of development tools


A.1 Package cdd-dev

If meta packages are builded using the tools inside the cdd-dev package it can be ensured that the resulting meta packages will work nicely with the same version of cdd-common package. The goal is to keep necessary changes for the source of the meta packages of a Custom Debian Distribution as low as possible when the version of the cdd source package changes. Thus it is strongly recommended to use the tools described below.

The usage of the tools in the cdd-dev package might introduce a versioned dependency in the <cdd>-common package from which all other meta packages of the CDD in question will depend. This <cdd>-common package instantiates the CDD in the common registry for all CDDs in /etc/cdd.

The best idea to use the tools provided by the cdd-dev is to put a Makefile into the build directory containig one single line

        include /usr/share/cdd-dev/Makefile

(see /usr/share/doc/cdd-dev/examples/Makefile). Using this Makefile all tools that were contained in cdd-dev package versions before 0.4. These tools are moved to /usr/share/cdd-dev/ because there is no need to call them directly. Here is a list of the make targets.


A.1.1 CDD-tasks.desk

This target is the description file that is used in tasksel to enable selecting the tasks belonging to the CDD. The file will be moved to the cdd-tasks. All information is obtained from the single task files in the tasks directory of the CDD source.


A.1.2 debian/control


A.1.3 cdd-clean-helper(1)

NAME

cdd-clean-helper - cleans up debian directory in a meta package building tree

SYNOPSIS

cdd-clean-helper

DESCRIPTION

This script can be used in debian/rules file to revert the changes which were done by cdd-install-helper(1) to get a clean packaging tree. Using this helper ensures that the debian/rules file does not needed to be changed if there are changes in the cdd-dev package.

EXAMPLES

For the usage of this tool just have a look at the debian-med source package.

AUTHOR

Andreas Tille tille@debian.org.


A.1.4 Apt sources.list files in /etc/cdd/

These files are used by cdd-gen-control(1) to build valid debian/control files that contain only available packages in their dependencies. This enables building meta packages for stable, testing, unstable or even a completely different distribution that 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.


A.1.5 Templates in /usr/share/cdd/templates

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


A.2 Package cdd-common

This package creates a common registry for all CDDs in /etc/cdd. Each CDD should put the files that are used into a subdirectory named like the CDD of /etc/cdd. The cdd-common package installs a common configuration file /etc/cdd/cdd.conf, which can be used to influence the behaviour of the tools described below.


A.2.1 cdd-role(8)

NAME

cdd-role - add/remove roles in registered Custom Debian Distribution

SYNOPSIS

cdd-role add|del CDD [Role]

DESCRIPTION

Add/remove (register/unregister) Role for the specified CDD. If Role is not specified, it's assumed to be named like CDD.

OPTIONS
CDD

A registered custom distribution in /etc/cdd, for example one of med, junior, desktop, edu or demudi

AUTHOR

Andreas Tille tille@debian.org, Cosimo Alfarano kalfa@debian.org.


A.2.2 cdd-update-menus(8)

NAME

cdd-update-menus - add menu of meta package to all Custom Debian Distribution users

SYNOPSIS

cdd-update-menus [--cdd CDD | --user user]

DESCRIPTION

cdd-update-menus behaves differently depending on who run the command:

If it is called by a user, it adds, and keeps updated, menu entries for the user who runs it.

If it is called by root, it adds and keeps updated user's menu entries (see menu package for users' menus) for all users who belong to the group of the specified Custom Debian Distribution, or only for a specified user, depending on which parameter is passed to the script.

OPTIONS
CDD

one of the installed CDDs, listed in /etc/cdd/, for example (if installed: med, junior, desktop, edu or demudi

user

system user

AUTHOR

Andreas Tille tille@debian.org, Cosimo Alfarano kalfa@debian.org.


A.2.3 cdd-user(8)

NAME

cdd-user - add/remove user to Role of a registered Custom Debian Distribution

SYNOPSIS

cdd-user add|del CDD user [Role]

DESCRIPTION

Add/remove user to a Role of the specified CDD. If Role is not specified, it's assumed to be named like CDD

OPTIONS
CDD

A registered custom distribution in /etc/cdd, for example one of med, junior, desktop, edu or demudi

user

user to add

Role

the role in the CDD that user will assume

AUTHOR

Andreas Tille tille@debian.org, Cosimo Alfarano kalfa@debian.org.


A.2.4 cdd.conf(5)

NAME

cdd.conf - configuration for Custom Debian Distribution registry

DESCRIPTION

This file is sourced from shell scripts inside the Custom Debian Distribution package cdd-common and thus it has to follow shell syntax. The variables that are set inside this configuration file can be overriden by special CDD configration files /etc/cdd/<>cdd>/<>cdd>.conf for each single CDD.

SYNTAX

The following variables can be set:

DBBACKEND

Set the backend for the user role management system. Currently the only implemented role management system is unixgroups but others might be implemented later. Unsetting this variable leads to use no roles at all.

UPDATEUSERMENU

If this is set to yes, the user menus of meta packages can be created automatically at install time of the package if the postinst script of the package allows this. It is suggested to use this option in the specific configuration files of a special Custom Debian Distribution that override the settings of the general configuration file.

SHAREDIR

Set the base directory for the user role management system. While this is more or less a feature for debugging this might be also used otherwise.

DRYRUN

This variable can be set for debugging. Normally it should be left unset (NOT set to false or anything else!). If set to true a dry run of the tools is performed or echo DRYRUN: would print debugging information.

DEBUG

If set to 1 debugging mode is switched on.

SEE ALSO

cdd-role (8), cdd-update-menus (8), cdd-user (8)

AUTHOR

Andreas Tille tille@debian.org, Cosimo Alfarano kalfa@debian.org.


A.3 Working with svn

Sometimes it might be interesting for developers to check out the latest code of the CDD tools or a special CDD code for the meta packages. In Establishing and using communication platforms, Section 8.1 the directory layout of the svn-directory was described. How to derive the Debian packages from this layout?

Checkout

For the CDD tools

       svn checkout svn+ssh://username@svn.debian.org/svn/cdd/cdd/trunk/cdd cdd

or for the Custom Debian Distribution cdd-name

       svn checkout svn+ssh://username@svn.debian.org/svn/cdd/projects/cdd-name/trunk
Build source package

Change into the created directory and type

       make -f debian/rules dist

This creates a tar.gz source archive of the packages you want to build. (Note: This requires that debian/rules has a dist target which is the case for all currently existing files.)

Build Debian packages

Unpack the created source tarball and proceed like you build Debian packages normally.

The current Debian-Med packages provide a working example how to use the tools described below.


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


Custom Debian Distributions

23 December 2008

Andreas Tille tille@debian.org