[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Configure scripts: a few ideas



Hi,

	I have some ideas about the Configuration script for Debian
 (semi-automatic configuration of software has been a pet project of
 mine for a few years now).

	We could do a lot worse than look at some of the mechanisms
 provided by metaconfig (in dist-3.60-7), which generates the Perl
 Configure scripts.  It has the following points going for it:

 a) There already is a mechanism in place that stores and retrieves
    configuration information (use Config; in any Perl script gives
    access), and to maintain and carry over Config info between
    machines. 
 b) Individual quanta of configurable information are collected in
    ``units'', which state the units they depend on, and the variables
    that they determine. (I can see a package providing a unit to ask
    about stuff that it needs to know)
 c) There is a way of providing defaults (and hints depending on,
    amongst other things, architecture of the machine)
 d) There is a mechanism for local overrides being provided easily.
 e) Each question need be asked only once.
 f) There are tools to derive dependency graphs, and ensure that there
    are no dependency loops between the units.
 g) There are methods to handle ``Special'' units if needed (like
    units that are always included, units that are used first, units
    that are used last)
 h) There are tools to do lint style sanity checks on units
 i) The scripts produced is a shell script.
 j) It would be trivial to write units to determine, say, the local
    organization, needed by, for example, news and mail packages.
 k) There are mechanism to provide quiet switch, where little output
    occurs.
 l) There is a way to say take all default answers and don't ask me
    anything method.
 m) There are safe primitives to ask questions, test if things are
    present in header files/libraries, and these maybe used to create
    new units.
 n) Help is available on the questions that are asked, and the
    variables created, in a Glossary file.
 o) The Configure file is just large enough to contain the units
    _Currently_ required, not all the units there are, in the correct
    order. 

	The cons are:
 a) One has to write units, and learn the syntax, etc. (IMHO, not too
    bas, and anything we come up with that provides dependency
    ordering, loop detection, and lint checks, will need a syntax
    too).
 b) metaconfig is written in Perl, 74025 bytes long, plus whatever
    units we write. 
 c) The units are only as good as the people who write them. 
 d) probably lots of other points I'm blind to, since I am a major fan
    of dist.

	Hey, I'll even volunteer to write a few units if people choose
 metaconfig and Configure. (I'll post man metaconfig if asked)

	manoj

-- 
 "The real problem with SDI is that it doesn't kill anybody." Tom Neff
Manoj Srivastava                                     <srivasta@datasync.com>


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: