Package: debian-policy
Version: 2.5.0.0
Severity: wishlist
A better way to configure debian systems
----------------------------------------------------------------------
1. GOALS
- Allow for automatic, non-interactive installation
- Variable amount of questions depending on the users experience
- Questions can be host specific, architecture specific or unspecific
- All questions use the same look&feel
- Various interfaces can be implemented easily
- All questions have a default and help text available
- Localisation of questions and helptext
- Don't break existing packages
- Create configuration for a different system on another system
- Browse through a configuration, alter single options or undo changes
- Allow users to configure packages that have user configurable files.
(like their windowmanager)
- Create logfiles for all actions taken, if wanted
2. CHANGES TO .DEB FILES
The following files can be included in control.tar.gz when needed by a
package:
configure bash script with restricted syntax (see below)
configure.set_var program to save config values to the configfile
configure.get_var program to read config values from the configfile
configure.variables variables to set configfile names and other flags
configure.<lang> localisation for questions and help text
The configure script must be a bash script, but not everything allowed
in bash is allowed there. Especially read is forbidden. The idea is
similar to the method used for the kernel configuration.
"if then else fi" constructs are allowed and recomended. The test
expression for the if must be a simple comparison between a variable
and a value. Later on for or while loops will be allowed, but not
now. The exact specifications for the configure script and verificator
of the syntax will be provided with dpkg-question and is not part of
this proposal.
3. CHANGES TO DPKG
dpkg must call dpkg-configure when a package has an configure script
in control.tar.gz. Until dpkg is changed or if dpkg is left unchanged,
postinst script should call dpkg-configure themself.
4. CHANGES TO POLICY
Policy should state that post/pre-inst/rm must not do any interactions
with the user. Neither may they configure the package, apart from
calling dpkg-configure. This is neccessary to do preconfiguration or
postconfiguration of a system and to capsulate the configuration part
properly.
All interactions and configuration must be in the configure script
provided by the package in the control.tar.gz.
All interactions with the user must use the dpkg-question interface.
All evaluations, calculations or tests needed to detect question
dependencies or reasonable defaults must be encapsulated by
dpkg-test. dpkg-test may not alter anything on the current system,
since the configuration might be done on a different system and then
be transfered to the system to be installed.
All interactions with the installed system must be encapsulated by
dpkg-exec. The configure script might not rely on any results from
dpkg-exec, since for configuration interfaces dpkg-exec will not be
executed and will allways pretend to work.
5. NEW TOOLS NEEDED
dpkg-question Interface to the user. Alternatively this
reads from a databse or takes the defaults.
Code exists.
dpkg-test Simple wraper script to evaluate some shell
expressions.
Code exists.
dpkg-exec Same script than above, but it might alter the
current system.
Code exists.
dpkg-configure This script handles the various overloads done
by the package, the config interface or the
user. It replaces dpkg-question with different
scripts when needed or set enviroment
variables. Currently it just calls configure.
Code exists.
dpkg-hook Handles interactions between packages, like
running menu every time some package changes
its menu. Its not yet implemented and might
need some small alterations to dpkg.
A dumb script providing most features of
dpkg-hook and probably all we need at start is
easily written, just call dpkg-configure for
the package the hook is for.
dpkg-question-whiptail Replace the dpkg-question with one that uses
whiptail to interact with the user. Its a bit
nice than the plain one, but starts a new
dialog for each question.
Under developement.
dpkg-menu-whiptail Parse configure files of all packages to
generate on screen menus.
Under developement.
dpkg-menu-java Parse configure files an present a java driven
X gui.
Planned.
May the Source be with you.
Goswin Brederlow
PS: A debian package including the first releas of the above tools is
available from
ftp://mirjam.informatik.uni-tuebingen.de/pub/debian/dpkgconfig*
Its a very alpha release but useable with the qvwm package provided
in the same place.
-- System Information
Debian Release: potato
Kernel Version: Linux rut 2.0.35 #4 Thu Nov 26 15:35:03 CET 1998 i686 unknown