Subject: Re: ${PKG_SYSCONFBASE} outside ${LOCALBASE}
To: None <tech-pkg@NetBSD.org>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 05/18/2004 20:49:22
On Tue, May 18, 2004 at 10:28:32PM +0200, Jukka Salmi wrote:
> 
> 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 
> expected, ${LOCALBASE}/etc/rc.d was created by the first package I
> installed:
> 
> $ cd /usr/pkgsrc/devel/autoconf213 && make package
> [...]
> ===> do-su-install [autoconf213-2.13] ===> Becoming root@himo.salmi.ch to install autoconf213.
> /usr/pkg/bin/sudo missing: ./etc (created)
> missing: ./etc/rc.d (created)
> /bin/sh ./mkinstalldirs /usr/pkg/bin /usr/pkg/info /usr/pkg/share/autoconf
> [...]
> 
> 
> Since then packages complain when being installed:
> 
> $ cd /usr/pkgsrc/devel/bison && make package
> [..]
> ===> do-su-install [bison-1.875nb1] ===> Becoming root@himo.salmi.ch to install bison.
> /usr/pkg/bin/sudo etc/rc.d: 
>         type (dir, link)
> Making install in config
> 
> 
> What am I missing? I.e. how can I convince pkgsrc to use /etc/pkg/rc.d
> instead of /usr/pkg/etc/rc.d?

/usr/pkg/etc/rc.d is not where scripts are being copied into -- it's
where the example rc.d scripts reside.  They are copied into
RCD_SCRIPTS_DIR, which may be set in /etc/mk.conf to your preferred
directory.  I think you want:

	RCD_SCRIPTS_DIR=	${PKG_SYSCONFBASEDIR}/rc.d

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>