Subject: Re: Package config/var file paths proposal
To: None <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 01/07/1999 01:47:03
[ On Thu, January 7, 1999 at 14:24:32 (+1100), Simon Burge wrote: ]
> Subject: Re: Package config/var file paths proposal
> On Wed, 6 Jan 1999 18:27:10 -0500 (EST) Todd Vierling wrote:
> > In order to make sure these points get implemented, this particular point of
> > the `package paths proposal' has been parted out.
> > This proposal offers three options wrt handling config file and volatile
> > files in pkg distributed programs.
> > A: config files go in /etc, volatile files in /var
> > B: config files go in $PREFIX/etc, volatile files in $PREFIX/var
> > C: config files go in /etc/pkg, volatile files in /var/pkg
> > [ ... ]
> > this indicates only where pkgified programs will
> > _look for_ their files.
> Important qualifier!
Indeed. Most critical in fact, but completely opposite to what I
percieve people are wishing for their systems.
Everyone seems to be leaning towards "A", but that's the one choice
that makes it very difficult for the end user to guarantee that the
files are *stored* where she wants them to be stored (such as on a
separate filesystem). Only choices "B" and "C" allow that, and either
would be OK so far as I can see (though "B" seems the most logical).
IMNSHO "A" is only feasable when $PREFIX == /usr. In all other cases
"A" is not scalable (simulating the other choices is nearly impossible).
Indeed with either choice "B" or "C" the simulation of "A" (i.e. where
the *user* finds the real files) can be had with two simple symlinks.
(I.e. the "A" proponents won't lose anything by chosing either "B" or
For example, using choice "B" (since it seems most flexible), and SSH as
an example package, all those folks who would rather see the SSH config
files in /etc, such as /etc/sshd_config can simply initialize their
systems with the following symlinks before installing any packages:
$PREFIX/etc -> /etc
$PREFIX/var -> /var
Then when SSH is installed it's config files will appear to end up where
you want them. SSH will still refer to them as $PREFIX/etc/sshd_config
and so on, but so long as the symlink survives, all will be just fine.
All those folks who want to share $PREFIX (without making it "/usr") can
create either the above links, or if they don't want to merge the files
in with "system" files, then they create these symlinks (again before
installing any packages):
$PREFIX/etc -> /etc/pkg
$PREFIX/var -> /var/pkg
and the corresponding target directories on the private "root"
filesystem for each diskless server all will be just fine.
Clearly populating a new diskless server with pkg config files is
something not covered by this basic proposal, but again both "B" and "C"
lend themselves very well towards manually implementing a "templates"
system similar to what was described previously. After all the packages
are installed on the primary server, the $PREFIX/var and $PREFIX/etc
directories are simply renamed (eg. "$PREFIX/etc.template"), one of the
above pairs of symlinks are created, and the original files are copied
into the private "root" filesystem for the new diskless server.
"A" looks great on paper, and would be fine if $PREFIX were forced to be
"/usr", but it sucks really badly in practice.
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>