Subject: Re: where to store periodically updated data
To: Klaus Heinz <k.heinz.dez.fuenf@onlinehome.de>
From: Johnny Lam <jlam@pkgsrc.org>
List: tech-pkg
Date: 12/16/2005 09:40:11
Klaus Heinz wrote:
>
> does pkgsrc have a default directory tree to store dynamic data?
>
> hier(7) on NetBSD mentions /var/games, which I knew, and on NetBSD 1.6.2
> even /var/pkg ("working files for third party packages"), which i didn't.
> The latter is only used by misc/rpm on my system, /var/pkg/lib/rpm/
> contains the RPM database.
> hier(7) on NetBSD >= 2.0 and DragonFlyBSD 1.3.7 does not know /var/pkg.
>
> The SpamAssassin developers plan on distributing rules dynamically, in
> contrast to the static rules in LOCALBASE/share/spamassassin they have
> now.
> For Linux the updated rules will probably be located unter
> /var/lib/spamassassin, on Solaris/HP-UX it might be
> /var/opt/spamassassin.
>
> Do the other *BSD systems have a tree for this kind of data?
For packages I maintain that want some place to put dynamic data, I
usually just create a new subdirectory under ${VARBASE}, e.g.
/var/authdaemon, /var/openldap, etc., unless the data more properly fits
the description for a special directory, e.g. /var/spool/cups, etc. I
don't get too concerned about "polluting /var" because all of the
directory creation and removal is handled by the package +INSTALL and
+DEINSTALL scripts. I wouldn't mind putting them all under a common
subdirectory, e.g. /var/lib, but it would seem odd to only have a
special one for packages installed by pkgsrc. If NetBSD created one
that its own software used, I would certainly try to make pkgsrc follow
the directory guidelines, but in the absence of one, I think just
creating new "top-level" directories under /var is best -- then at least
it's easy to identify which directories belong to which package. In
your specific case, I would just use ${VARBASE}/spamassassin.
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>