Subject: pkg/19509: pkgtools/pkg_comp PKG_SYSCONFBASE definition in default.conf and man page do not match
To: None <gnats-bugs@gnats.netbsd.org>
From: None <douglas@fang.demon.co.uk>
List: netbsd-bugs
Date: 12/23/2002 15:04:04
>Number:         19509
>Category:       pkg
>Synopsis:       pkgtools/pkg_comp PKG_SYSCONFBASE definition in default.conf is /etc and in the man page is /usr/pkg/etc due to environment variable expansion bug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 23 18:22:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Douglas Brebner
>Release:        NetBSD 1.6_STABLE
>Organization:
>Environment:
	
	
System: NetBSD aoife.home 1.6_STABLE NetBSD 1.6_STABLE (AOIFE.1.6) #0: Fri Nov 22 16:33:06 GMT 2002 root@aoife.home:/local/netbsd/build/src/sys/arch/i386/compile/AOIFE.1.6 i386
Architecture: i386
Machine: i386
>Description:
	The definition of PKG_SYSCONFBASE in the default configuration file for pkgtools/pkg_comp is /etc, but the man page says the default is /usr/pkg/etc. This is bad since it could result in binary packages build using pkg_comp unexpectly putting the config file in the wrong place (/etc) causing unexpected errors, especially to the newbie.
	It seems that the definition of PKG_SYSCONFBASE in the pkg_comp script is expanding the definition of LOCALBASE in the line
	PKG_SYSCONFBASE="${LOCALBASE}/etc"
	to be
	PKG_SYSCONFBASE="/etc"
	while writing the config file.
>How-To-Repeat:
	run "pkg_comp maketemplate" and compare the PKG_SYSCONFBASE line in the generated default.conf with the one embedded in the pkg_comp script.
>Fix:
	Change the pkg_comp script so that it's written without environment variable expansion.
>Release-Note:
>Audit-Trail:
>Unformatted: