[dev] 2.3.x installer

Anil Madhavapeddy anil@recoil.org
Thu, 8 Feb 2001 23:51:12 -0000


Chuck Hagenbuch wrote:
>
> ... while I'm making feature requests, it would be ideal if said script
could
> look at an existing conf file and its corresponding dist file and prompt
you
> only for values that were missing from the conf file (i.e., new options
that
> had shown up in the .dist file) (and ask you about pruning entries that
have
> disappeared from the dist file?)
>

Damn, it would be really cool if we could just use command-line PHP.  I
guess this is still easy to do in Perl, but we need to be quite careful with
the layout of the .dist files, to make sure the regexps don't break.

Anil



>From max@the Date: Thu,  8 Feb 2001 15:39:35 -0800
Return-Path: <max@the-triumvirate.net>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 77851 invoked from network); 8 Feb 2001 23:43:15 -0000
Received: from cx309195-b.santab1.ca.home.com (HELO zion.the-triumvirate.net) (24.21.86.136)
  by horde.org with SMTP; 8 Feb 2001 23:43:15 -0000
Received: (from http@localhost)
	by zion.the-triumvirate.net (8.10.2/8.10.2) id f18Nda403456
	for dev@lists.horde.org; Thu, 8 Feb 2001 15:39:36 -0800
X-Authentication-Warning: zion.the-triumvirate.net: http set sender to max@the-triumvirate.net using -f
Received: from 24.16.85.200 ( [24.16.85.200])
	as user max@imap.the-triumvirate.net by www.the-triumvirate.net with HTTP;
	Thu,  8 Feb 2001 15:39:35 -0800
Message-ID: <981675575.3a832e37cd15a@www.the-triumvirate.net>
Date: Thu,  8 Feb 2001 15:39:35 -0800
From: Max Kalika <max@the-triumvirate.net>
To: dev@lists.horde.org
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 2.3.7-cvs
X-Originating-IP: 24.16.85.200
Subject: Re: [dev] 2.3.x installer

Quoting "Brent J. Nordquist" <bjn@horde.org>:

> On Wed, 7 Feb 2001, Jon Parise <jon@csh.rit.edu> wrote:
> 
> > I kind of prefer the current "configuration" system: copy *.php.dist
> > to *.php and edit with your favorite text editor.  It's simple and
> > platform independent.

Agreed!  This should always be the case.  But I know a few other people who 
would be too stumped by this (and yes, they would be setting up a webmail 
client -- don't ask) :-)

> Yes, with those great comment blocks in front of each entry.  I agree that
> this should remain the bottom-line, fundamental way to configure things.

I have actually started toying around with the idea of a front-end to the 
configurations, but held off posting until I can make something viable to 
show.  I still don't have much yet, but an idea.  My original thought was perl -
- duh!  In fact, I was rather impressed by the way squirrelmail is configured.

  http://www.squirrelmail.org

They have a perl menu script much like what Anil described.  But Chuck did have 
a point -- there are issues with Windows users.  Yes, they can easily get perl 
with the ActiveState package, but that is another dependency.  Command-line php 
was another choice, but that means administrators need to have both the module 
and cgi versions compiled separately.

> I was musing that someone could write a perl script (or even a PHP script)
> that made the process interactive by presenting the comment block from the
> .dist, asking the question, possibly even guessing and validating the
> data, etc. for people that prefer a "wizard".

This is similar to what I had in mind, but it would be web based (and I imagine 
many people would feel comfortable with this approach.)

> The key, for me, is that I hope we can end up with a system where the
> description of each config. setting is in just one place.  The reality is
> that if you have to add new settings to the config. file, and the install
> wizard(s), and the documentation, then things fall out of sync.

Here are the guts of what I was trying to write up before I had a few bombs 
dropped on me at work.  (The fallout is clearing, so I'll try to get this up 
and running again).  Also, all this is very rough planning still...be gentle :-)

1) Central Horde setup.php.
2) When opened it first decides the following:
  a) If horde/config/registry.php doesn't exist, it calls itself with a
     ?app=horde query string to force horde configuration
  b) otherwise it includes horde/config/registry.php.dist and presents a 
     dropdown list of apps to configure/install
3) For the chosen app (other than horde itself) it would get all the locations 
   from horde/config/registry.php
  a) Get all the *.dist files from the apps config directory
  b) Preload the current settings from the corresponding .php files (if any)
  c) Display settings to the user for each config file (different file per 
     page?)
4) Accept changes and write.

This could be further augmented with extensions to the comment blocks with 
something easily parsed like:

// var:horde key:mailer key:type option:Sendmail option:SMTP
$horde['mailer']['type'] = 'Sendmail';

Parsing that comment would present a user with a dropdown list for the mailer 
type.

You can probably see where this goes from here.  Thoughts?

--mk23