On Monday 18 June 2007 11:09, Jeff Johnson <email@example.com> wrote:
> > Silent install options. Last time I looked at rpm it installed but
> > did not configure other than defaults. rpm -i package.rpm package.sil
> > Would be a idea. sil being a simple archive containing the changed
> > files and script for special alterations. Of course package would
> > have to support creating this.
In that case you want to use some of the similar concepts to Debconf in terms
of external storage of configuration options and the ability to extract
configuration options from a running system as part of a clone procedure.
Debconf that also supports file diffs would be a good thing. To do this in a
complete manner you would want to be able to support arbitrary file diffs
that are supplied by the sys-admin for any file on the system (the RPM MD5
check could be used to prompt the sys-admin for which files they may want to
supply diff files for) and also be able to automatically generate diffs for
files under /etc. /etc on my laptop is 39M according to du and 5M when
in .tar.gz form. With today's hard drive sizes it would be trivial to keep a
backup of all those files for the purpose of running diff. Also if a
sub-directory of /etc is owned by the package then any new files could be
included in the diff.
For the implementation you don't want to do it the way Debconf was
implemented. Having a shell script source another script that then re-exec's
it with stdout/stdin changed causes many problems. stdin/stdout/stderr
should be strictly used for tasks that are conceptually similar to their
original design when it comes to complex programs. Probably the best thing
to do would be to have a server for the configuration database that runs on a
Unix domain socket and is spawned by rpm. Rpm could then instruct the server
to exit after it has finished it's operations (maybe have the server exit
after the last client connection closes and have rpm keep a connection open).
File diffs aren't adequate, we also need configuration options for the
postinst script (or similar). Think about passwords in databases and other
things that can't sanely be handled by file diffs. I guess you could just
write a bunch of shell scripts for these things, but I think it would be best
if cooperative package maintainers would write scripts for them.
http://etbe.coker.com.au/ My Blog
http://www.coker.com.au/sponsorship.html Sponsoring Free Software development
Received on Thu Jun 21 12:33:05 2007