[dev] 2.3.x installer

Jon Parise jon@csh.rit.edu
Thu, 8 Feb 2001 18:43:36 -0500


On Thu, Feb 08, 2001 at 11:39:50PM -0000, Anil Madhavapeddy wrote:

> So what do people think then?  Command-line?  It shouldn't be hard to write
> a Perl script that groks the *.dist files into a setup utility.  PHP would
> be ideal, of course, but I don't think many people have it installed as a
> CGI executable though.

I think we should go with an (optional) Perl installation script.

It would start by reading the configuration files (*.dist).  It would
print the comment text followed by the configuration variable name.
The user could enter the value at the prompt or just hit enter to
accept the default value (read from the .dist file).

Either the Perl script itself or the .dist file (preferably) would
contain a little "meta-information" for the install.  For example, we
don't want to ask the user about every single configuration value.
Also, certain configuration settings are limited to a fixed set of
possibile values (true or false, numbers, a set of known drivers).
Therefore, our .dist-style comments may end up looking like this:

// This is a description line.
// This is another description line.
// [integer]
$conf['foo']['number'] = 0;

The [type] could be one of the following: string, boolean, integer,
set, or perhaps something else I'm missing.  In the case of 'set', the
form might look like this:

// [set] (none, LDAP, SQL, Mysql, Pgsql)

At the top of the .dist file, we might define the "necessary"
parameters that the initial installation script should display:

// These configuration values must be set in the initial configuration:
//
//  required {
//      majorname1:minorname1, majorname1:minorname2,
//      majorname2:minorname1, majorname2:minorname2
//  }

... where that would translate to $conf['majorname1']['minorname1'].

I'm not entirely sure that's the best possible syntax, but it works
for explanatory purposes.
 
-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member