Subject: Location of Package Config Files
To: Alistair Crooks <>
From: Curt Sampson <>
List: tech-pkg
Date: 11/06/2001 18:41:07
On Tue, 6 Nov 2001, Alistair Crooks wrote:

> On Tue, Nov 06, 2001 at 05:35:01PM +0900, Curt Sampson wrote:
> >
> >     1.	This file is not written by the program, so there's no problem
> > 	keeping it on a read-only file system. So this does not break that.
> Installation of a package by source or by pkg_add'ing a binary package does
> break it, though.

No, it doesn't! This installs nothing in /etc.

> No, wanting everything under ${PREFIX} is not a silly idea - it
> is quite logical and consistent.

That's certainly true if ${PREFIX} is not under /usr. Unfortuanately,
it is under /usr by default, which puts config files under /usr. It
would also presumably put log and other "var" files under /usr, except
we chose to be "consistently inconsistent" there and put "var" package
stuff directly under /var instead.

In fact, we put non-var information, such as which packages are installed,
under /var too! (So /var on a different system with shared /usr will
indicate that packages are not available when in fact they are installed.)

> I said there were some inconsistencies, and that's what I was
> talking about - ssh.
> It needs to be in /etc, really, for the base
> system. Having multiple copies of ssh host keys is not some place
> I want to go.

> >     4.	A shared /usr is a pretty common configuration; it's practically
> > 	as old an idea Unix network file access period.
> Thanks, but it's not necessary to remind me how old I am.

I'm not trying to be insulting. I'm not not entirely convinced we should
be screwing these users over a different set. The implication that people
are more likely to want a read-only /etc than a read-only or sharable
/usr I find a little...unusual.

> >     5.	This is a system configuration file. According to the hier(8)
> > 	manapage, we keep system configuration files in /etc.
> Yes, and we try to follow hier(7) conventions under ${PREFIX} where
> possible.

No we do not. We do not use ${PREFIX}/var, though it would be entirely
possible to do so.

> The reason I dislike your change is that it's just one single
> occurrence, and people will now think it's OK to veer from the
> norm, and start moving config file to /etc piecemeal, thereby making
> people's /etc and ${PREFIX}/etc directories possibly duplicatory.
> I don't want that.

Right, fair enough.

> I think Fred suggested a way recently whereby we would install config
> files to SYSTEM_CONFIG_DIR, which could be set prior to source install.
> Whilst this way has its problems, it's a lot more scalable than the
> approach you've taken.

It's got serious problems in that binary package users are still screwed.

If we really want to allow total separation of package stuff (which I
think is mostly just wanted by developers), what do you think about the
idea of putting a new hierachy under /pkg?

Shipping a /pkg directory with these symlinks:

    /pkg/etc -> ../etc
    /pkg/usr -> ../usr
    /pkg/var -> ../var

would mean that those of us who don't use a separate filesystem for it
would just get everything integrated normally, and those who mount a
disk on /pkg would get everything completely separate. You don't even
have to add links or delete files for either circumstance.

Curt Sampson  <>   +81 3 5778 0123
    Don't you know, in this new Dark Age, we're all light.  --XTC