Subject: Re: Package Paths Proposal v3
To: Todd Vierling <email@example.com>
From: Hubert Feyrer <firstname.lastname@example.org>
Date: 12/26/1998 18:42:48
[Sorry i'm a bit late on this, returning from holiday and catching up 14
days worth of mail took some time :-]
First, congratulations on this great Proposal, i only have a few small
On Fri, 18 Dec 1998, Todd Vierling wrote:
> 3. Programs use configuration files from /etc (not
> $PREFIX/etc) as the compiled-in default. Generally, subdirectories
> (/etc/<pkgname>) should be created for packages that have more than one
> or two config files. Sample configuration files should be placed in
> $PREFIX/share/examples/<pkgname> (pkgname may be omitted if a single,
> uniquely named config file is used). The general algorithm for
> installation is:
> a) See if example config files exist in $PREFIX/share/examples. If they
> do, rename them with a .old extension. (This facilitates a later
> diff3(1) or merge(1) to see and deal with configuration options that
> are new or changed when a package is upgraded.)
A more unique suffix than ".old" should be chosen here if this is
automated. Users may have .old files flying around for themselves, and we
should better not nuke their files away. Maybe something like ".oldpkg"
would be better.
> b) Install sample config files in $PREFIX/share/examples/<pkgname>.
> c) See if `real' configuration files exist in /etc. If not, copy the
> copy the sample config set over to /etc.
This is a bit more complicated that this: Imagine we're upgrading a
package (say sendmail), and do not update the config files. In that case,
it's not guaranteed that the new package does work propoerly due to an old
Handling of config files should be something like this:
- make packages aware of which files actually are config files and thus
need some special handling
- install sample config files in $PREFIX/share/examples/<pkgname> as
noted in b) above, possibly moving aside old files/dirs.
- install example config files in place
- if a previous config files existed, back it up somewhere and tell the
system administrator (or whoever runs the pkg_add) to check things!
(Maybe even offer some aid via merge(1) or so)
The implementation of this would be to add a "@conf" tag in front of all
files in pkg/PLIST files, and make pkg_add do the right thing (as above).
Furthermore, pkg_delete could also move the file aside.
[But that's probably something not belonging here into this proposal.
Comments still welcome :]
> 5. Daemons that start at boot time should have a start/stop script
> available. This should be placed in $PREFIX/share/rc.d/<pkgname>.
> It should accept the following arguments:
> start: start the daemon
> stop: stop the daemon
> reload: reload configuration files
Maybe also some "restart", causing the daemon to properly shutdown, free
resources and restart (in case reloading isn't available or not wanted due
to some reason).
Hubert Feyrer <email@example.com>