Subject: Re: default values for log and PID file path names?
To: NetBSD Packages Technical Discussion List <>
From: Johnny Lam <>
List: tech-pkg
Date: 08/03/2006 08:43:54
Joerg Sonnenberger wrote:
> On Tue, Aug 01, 2006 at 11:19:08PM +0200, Julio M. Merino Vidal wrote:
>> On 8/1/06, Georg Schwarz <> wrote:
>>> Am 01.08.2006 um 21:22 schrieb Roland Illig:
>>>>> --with-logfile=${VARBASE}/log/blabla.log --with-pidfile=$
>>>>> {VARBASE}/ run/
>>>> grep(1) just told me that there is much prior art of that style. So
>>>> you should do it that way.
>>> Can I assume that ${VARBASE}/log and ${VARBASE}/run will always exist?
>>> Does the options framework provide a means to specify alternative
>>> strings for that given package if desired?
>> If your package places any file outside PREFIX, it shall use OWN_DIRS
>> or MAKE_DIRS to register the directory in which it will be placed.
>> This way you ensure that the directory exists.  You'll probably want
>> something like OWN_DIRS=${VARBASE}/run.
> No, that's bad. When the system already has ${VARBASE}/run, but it is
> empty at the time of the package removal, it would also get removed.
> I'm also not sure how to best handle this, it depends a bit on the
> situation. E.g. for logfiles having a subdirectory of ${VARBASE}/log
> would be a good idea, esp. since it can be given write permissions for
> !root.

No, when the system already has ${VARBASE}/run before the package is 
installed, then it will have it after the package is deinstalled, 
regardless of whether it is listed in OWN_DIRS or MAKE_DIRS.  The 
pkginstall framework scripts don't remove pre-existing directories, 
although if the directory is listed in OWN_DIRS, then you will get a 
note that the directory may be removed if nothing else uses it.


	-- Johnny Lam <>