Subject: Re: /usr/pkg/etc vs. /etc
To: proprietor - Foo Bar And Grill <greywolf@starwolf.com>
From: Curt Sampson <cjs@cynic.net>
List: tech-pkg
Date: 12/10/1998 16:17:59
On Thu, 10 Dec 1998, proprietor - Foo Bar And Grill wrote:
> Have we (please excuse the royal "we") considered a central point for
> configuration files, i.e. ${dir}/conf/${program}/* for each
> program? It would certainly centralize a lot of things.
I don't get your meaning here. We already do have a central point
for configuration files: /etc. :-) What would $dir be? And are you
talking about just packages, or everything?
I do approve of the idea of making subdirectories in /etc for
programs that have more than one configuration file (/etc/uucp is
a good example).
One of the reasons I like to centralise all configuration information,
regardless of whether the program is part of NetBSD, a package, or
downloaded and compiled (in other words, regardless of it being in
/usr/bin, /usr/pkg/bin or /usr/local/bin), is that it enables you
to replace the programs without having to shuffle configuration
files around, or wonder which of three config files is the one
actually being used. Here's how I, as a sysadmin, would like to
deal with a common scenario:
1. I get sendmail with NetBSD. I modify the files in the
/etc/mail/ directory to configure it appropriately and I'm
happy.
2. I need to upgrade to a new version because a security hole
has been found. I notice the new version is a package, so I
pkg_delete (or somehow erase) my current sendmail, and pkg_add
the new one. It continues to use the configuration in /etc/mail/.
3. Another security hole is discovered that I must fix immediately.
There's no package available yet (pkgsrc has not been updated
yet), so I download the latest version from ftp.sendmail.org,
compile it, install it in /usr/local, and pkg_delete the old
sendmail. The new one continues to use the configuration in
/etc/mail/.
To summarise, I think we should keep the configuration files in
one place (and that place being a `local' place for each computer)
as much as possible for the following reasons:
1. They're easy for new users (those new to NetBSD, even, not
necessarially just those new to Unix) to find.
2. You have certainty about which configuration file is being
used, because you don't have multiple ones kicking about from
various installs.
3. If the program is on a shared filesystem, but was installed
from another machine, the lack of the configuration file on
the local machine will ensure that the program does not run,
thus helping to avoid security problems.
> ...everything else goes to /pkg or, more appropriately, /usr/local.
> [The pkg database keeps track of what's where; why not put it in /usr/local?
I feel that keeping /usr/local untouched by the standard OS tools
is a Good Thing. That's the sysadmin's area, and he should be able
to have confidence that if he puts anything there, it's going to
stay there unchanged, and that if he deletes anyuthing there it's
not going to affect a program not installed under /usr/local.
> We've got /, /usr/local and /usr/X11(R6) -- that's three hierarchies,
> not counting src. Isn't that enough?]
Yeah, I think so personally. On the other hand, if you're one of
the people creating pkgsrc stuff, it's really, really handy to be
able to blow away /usr/pkg or whatever, and know that it's all
cleared out. (Working on a PLIST otherwise tends to leave unused
files scattered all over your filesystems. Yecch.)
> * De gustibus, aut bene aut nihil.
>
> That's "(A matter) of taste, for good or for bad", yes?
> [I've asked this before, it's different from "de gustibus non disputatum",
> which I think is saying something similar.]
Actually, it's not real Latin. (That is to say, it was never used
by the Romans.) _De gustibus non est disputandum_, as you pointed
out, means `there's no disputing taste.' Another common phrase was
_de mortiis, aut bene aut nihil_, which literally translated is
`of the dead, well or not at all,' but is taken to mean `speak well
of the dead or speak not at all.' In Chekhov's play _The Seagull_,
one of the characters conflates the two sayings to come up with
_de gustibus, aut bene aut nihil_, which could be taken to mean
`taste: ya got it or ya don't.'
cjs
--
Curt Sampson <cjs@cynic.net> 604 801 5335 De gustibus, aut bene aut nihil.
The most widely ported operating system in the world: http://www.netbsd.org