Subject: Re: pgsql's home
To: David Brownlee <abs@NetBSD.org>
From: haad <haaaad@gmail.com>
List: tech-pkg
Date: 04/17/2007 16:30:05
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Brownlee wrote:
> 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
> 
> 
I like idea where we store all pkg data in specific dir. like binaries in
/usr/pkg because I can then easily remove all pkgsrc packages from system.

I prefer to have new subdirectory for this purpose in ${VARBASE}/pkg or
new variable called ${PKGBASE} which for default points to /srv/pkg.
/srv as dir can be used for all server related data as htdoc for
apache(/srv/pkg/www),pgsql home(/srv/pkg/pgsql) and etc..

Regards
- ---------------------------------------------------------------
Adam Hamsik
ICQ 249727910
jabber haad@jabber.org
- ---------------------------------------------------------------
There are 10 kinds of people in the world. Those who understand
binary numbers, and those who don't.
				
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGJNnt9Wt2FT7y228RAmuwAJ9YAkVl74QzLLoCopjkIUEkY7CnVwCghgRm
4Wr2iPuQlGSz/Ipsoj0jTTU=
=KX3h
-----END PGP SIGNATURE-----