Subject: Re: pkg-vulnverabilities location
To: Alistair Crooks <agc@pkgsrc.org>
From: Eric Haszlakiewicz <erh@nimenees.com>
List: tech-pkg
Date: 02/10/2005 13:50:09
On Tue, Feb 08, 2005 at 11:22:28AM +0000, Alistair Crooks wrote:
> On Mon, Feb 07, 2005 at 09:20:53PM -0600, Eric Haszlakiewicz wrote:
> > On Mon, Feb 07, 2005 at 10:44:01PM +0000, Alistair Crooks wrote:
> > > Please don't change it from ${PKGVULNDIR}.  The DISTFILES directory
> > > was chosen for a purpose, and you can modify it with PKGVULNDIR, as
> > > you say. Far from it being a "poor default", there isn't really a
> > > better one.
> > 
> > 	So why was $DISTDIR used as the default?  As far as I know, nothing
> > else places runtime files in a source directory.  Even outside of pkgsrc
> > that rule is followed.  e.g. /usr/src isn't used by the base system to hold
> > config/generated files.  If there isn't a better location we should define
> > one, and include it as part of the package so installing the package
> > ensures that the directory exists.
> 
> Because ${DISTDIR} is, by definition, writable, and you can't say that
> about any other directory that I can think of in pkgsrc (and, besides,
                                                ^^^^^^^^^
Trying to write stuff into pkgsrc is exactly the problem!

btw, I tried to get the package to create the directory it needs by adding:
OWN_DIRS+= ${PKGVULNDIR}
to the Makefile, but the INSTALL script that pays attention to that isn't
getting used.  What am I missing?

> > > /var/tmp is not meant for things like that, and we have been
> > > overloading /var/db for too long for it to be viewed as a viable
> > > alternative.
> > 	From hier(7):
> > /var/
> > 	db/	miscellaneous automatically generated system-spe-
> > 		cific database files, and persistent files used in
> > 		the maintenance of third party software.
> > 
> > Isn't that _exactly_ what pkg-vulnerabilities is?  
> 
> /var/db was originally meant to be for runtime database files, like
> the kvm "database", and was not meant to be for persistent storage. 

	well the meaning has changed from that.  My /var/db currently has
semi-permanent storage for:
	dhcpd leases
	httpd proxy storage
	locate database
	ntp drift file
	samba files
	pacakge database
	obsolete set lists
/var/db seems to be a well accepted location for these kind of files.

> (related to /var/db/pkg).  But I still don't think that PKG_DBDIR
> defaults to the right place, according to the hier(7) as it used to
> be.
> 
> I'm still less than enthusiastic about using /var to store persistent
> databases, but I customise ${PKG_DBDIR} anyway.

	I customize it too, but just to keep all relatively static package
stuff in one place.  (all under /usr/pkg as /usr/pkg/var/db/pkg)
	So what do you consider to be the "right" place?

eric