NetBSD Problem Report #19509

Received: (qmail 12442 invoked by uid 605); 24 Dec 2002 02:21:58 -0000
Message-Id: <20021223150404.2FAEC10FD2@fang.demon.co.uk>
Date: Mon, 23 Dec 2002 15:04:04 +0000 (GMT)
From: douglas@fang.demon.co.uk
Sender: gnats-bugs-owner@netbsd.org
Reply-To: douglas@fang.demon.co.uk
To: gnats-bugs@gnats.netbsd.org
Subject: pkgtools/pkg_comp PKG_SYSCONFBASE definition in default.conf and man page do not match
X-Send-Pr-Version: 3.95

>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:    jmmv
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 24 02:22:00 +0000 2002
>Closed-Date:    Tue Dec 24 16:30:20 +0000 2002
>Last-Modified:  Tue Dec 24 16:30:20 +0000 2002
>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:
Responsible-Changed-From-To: pkg-manager->jmmv 
Responsible-Changed-By: jmmv 
Responsible-Changed-When: Tue Dec 24 06:13:21 PST 2002 
Responsible-Changed-Why:  
I'll fix this. 

From: Julio Merino <jmmv@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/19509 CVS commit: pkgsrc/pkgtools/pkg_comp
Date: Tue, 24 Dec 2002 18:28:34 +0200 (EET)

 Module Name:	pkgsrc
 Committed By:	jmmv
 Date:		Tue Dec 24 16:28:34 UTC 2002

 Modified Files:
 	pkgsrc/pkgtools/pkg_comp: Makefile
 	pkgsrc/pkgtools/pkg_comp/files: pkg_comp.8 pkg_comp.sh

 Log Message:
 Update pkg_comp to 1.4:

 - Added an EXTRAMK variable to allow the addition of any kind of stuff
   into the generated mk.conf.
 - While creating the template, quote ${LOCALBASE} so it does not get
   replaced. Reported by Douglas Brebner in PR pkg/19509.


 To generate a diff of this commit:
 cvs rdiff -r1.4 -r1.5 pkgsrc/pkgtools/pkg_comp/Makefile
 cvs rdiff -r1.4 -r1.5 pkgsrc/pkgtools/pkg_comp/files/pkg_comp.8
 cvs rdiff -r1.3 -r1.4 pkgsrc/pkgtools/pkg_comp/files/pkg_comp.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: jmmv 
State-Changed-When: Tue Dec 24 08:29:10 PST 2002 
State-Changed-Why:  
I've fixed this problem in pkg_comp 1.4. Thanks for the PR! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.