Subject: Re: pgsql's home
To: None <>
From: David Brownlee <>
List: tech-pkg
Date: 04/16/2007 23:03:48
On Mon, 16 Apr 2007, Johnny C. Lam wrote:

> Geert Hendrickx wrote:
>> On Sat, Apr 14, 2007 at 06:08:44PM -0400, Louis Guillaume wrote:
>>> Currently the Postgresql-server packages keep are setting the user
>>> pgsql's home under ${PREFIX}.
>>> Since "files that may be modified after installation" should go in
>>> $VARBASE, shouldn't we do this?
>> Fully agreed, for the obvious reasons (also I like to mount /usr r-o).
>> I personally put it under ${VARBASE}/db, usually.
> hier(7) on NetBSD says:
> /var/	multi-purpose log, temporary, transient, and spool files
> That doesn't sound at all like what a database should be.  I picked ${PREFIX} 
> because that's the only place that pkgsrc really "owns" and controls.  In any 
> case, it's usually irrelevant... the pgsql rc.d script always uses the home 
> directory that's set in /etc/passwd for the location of the database.

 	A while back I sent this to the list for comment but IIRC
 	only joerg responded. Resending in the hope its more
 	interesting for people now :)

         >> Default for HOMEBASE - please comment <<

         Currently pkgsrc creates homedirs for pkgsrc system users in
         a variety of places.

         I'm proposing a new ${HOMEBASE} variable which would be used as
         the base for any pkgsrc created user's homedir which needs to
         retain persistant state, except where there is already a 'well
         known' directory (such as ${VARBASE}/{mail,news}, or 'chroot')

         The question is what should the default be:

         a) ${VARBASE}:
             This clutters up ${VARBASE} and is likely to collide with
             some system provided directories on some OSs

         b) ${VARBASE}/db:
             hier(4) states "/var/db/" miscellaneous automatically
             generated system-specific database files, and persistent
             files used in the maintenance of third party software.

         c) ${VARBASE}/lib:
             FHS 2.3: /var/lib : Variable state information
             This hierarchy holds state information pertaining to
             an application or the system. State information is data
             that programs modify while they run, and that pertains
             to one specific host. Users must never need to modify
             files in /var/lib to configure a package's operation.

         d) ${VARBASE}/pkghome: (or variation such as 'pkg', 'pkgsrc')
             Sidesteps the whole issue of overloading existing names in
             a similar fashion to ${PREFIX} in /usr/pkg

 		David/absolute       -- No hype required --