Subject: Re: ${PKG_SYSCONFBASE} outside ${LOCALBASE}
To: Jukka Salmi <jukka-netbsd@2004.salmi.ch>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 05/18/2004 22:48:57
On Tue, 18 May 2004 22:28:32 +0200
Jukka Salmi <jukka-netbsd@2004.salmi.ch> wrote:

> Hi,
> 
> on a newly set up NetBSD current system I set PKG_SYSCONFBASE=/etc/pkg
> because I wanted to keep all configuration files on the same filesystem.
> 
> After building some packages using current pkgsrc I noticed rc.d scripts
> were copied to ${PREFIX}/etc/rc.d, so I set
> RCD_SCRIPTS_EXAMPLEDIR=${PKG_SYSCONFBASE}/rc.d - but that didn't work as 

That won't work.  RCD_SCRIPTS_EXAMPLEDIR should contain a path _relative_
to LOCALBASE, IIRC.  It's a directory for *examples*, not for "target"
files.  (You may better wait for Reed's reply, who has done some changes
recently WRT this; I'm not aware of the status ATM).

> expected, ${LOCALBASE}/etc/rc.d was created by the first package I
> installed:

It's created by mtree.  It doesn't mind if RCD_SCRIPTS_EXAMPLESDIR works
(i.e., if packages honour it), because it'll be empty.  It'll go away when
this stuff is finished.

> What am I missing? I.e. how can I convince pkgsrc to use /etc/pkg/rc.d
> instead of /usr/pkg/etc/rc.d?

Maybe you can set RCD_SCRIPTS_DIR to ${PKG_SYSCONFDIR}/etc/rc.d instead
(see bsd.pkg.defaults.mk).  Untested, but should work.

Cheers

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/