Subject: Re: A policy for /var
To: Rene Hexel <rh@netbsd.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 07/27/2002 08:13:40
On 27 Jul 2002, Rene Hexel wrote:

>   I would like some opinions on pkg/13058 (rpm using /var):
>
>   What I'm getting at is that as long as packages don't install PLISTed
> files there, the use of /var is okay with me.  Other people seem to have
> a different opinion here and that's (part of) the reason why we keep
> seeing PRs such as this.
>
>   The solution is to establish some sort of policy here.  We can either
> decide that the use of /var is fine, or we could decide that something
> like ${PREFIX}/var should be used instead.  If we can't agree on a
> unified solution, what about a PKG_VARDIR similar to PKG_SYSCONFDIR?

I don't think ${PREFIX}/var does anybody any good. It's true it would
prevent random crap from accumulating in /var, but at the cost of
letting random crap accumulate in /usr/pkg/var and /usr/X11R6/var,
which is worse, because then there's even more places to hide files no
one ever looks at.

One suggestion that came up in previous discussions, that I find
reasonable, is to defer the creation of files and directories in /var.
The suggestion, IIRC, was actually that the program create such files
when it's first run, but that's not always practical. What would be
more do-able, would be to move the creation from the install target
into the INSTALL script, so that at least a package build machine
wouldn't suffer from /var-pollution. That drawback is, folks who build
from source to run on the same machine would have to remember to run
the INSTALL script (but see the "finish" target in www/wwwoffle).

Frederick