Subject: pkg/22498: pkgtools/libkver doesn't build under pkg_comp
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mlh@goathill.org>
List: netbsd-bugs
Date: 08/15/2003 14:03:32
>Number:         22498
>Category:       pkg
>Synopsis:       pkgtools/libkver doesn't build under pkg_comp
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 15 19:04:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     MLH
>Release:        NetBSD 1.6W
>Organization:
None
	
>Environment:
	
	
System: NetBSD tiamat.goathill.org 1.6W NetBSD 1.6W (APMLM) #0: Tue Aug 5 16:29:46 CDT 2003 frd@enki:/opt/obj/i386/usr/src/sys/arch/i386/compile/APMLM i386
Architecture: i386
Machine: i386
>Description:
	
With KVER_OSRELEASE=1.6 set,
$ pkg_comp -c current makeroot  fails to properly build a chroot environment
...
PKG_COMP ==> Building and installing pkgtools/libkver
===> Checking for vulnerabilities in libkver-0.1
===> Extracting for libkver-0.1
===> Patching for libkver-0.1
===> Buildlinking for libkver-0.1
===> Configuring for libkver-0.1
===> Building for libkver-0.1
You must define KVER_OSRELEASE to be one of:
1.5 1.5.1 1.5.2 1.5.3 1.6 1.6.1
*** Error code 1

Stop.
make: stopped in /pkg_comp/obj/pkgsrc/pkgtools/libkver/work.i386/libkver-0.1
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/pkgtools/libkver
*** Error code 1

# cat /etc/mk.conf
Cannot open "/usr/lib/libkver.so"

I had managed to determine that pkg_comp is overriding the set value
of KVER_OSRELEASE=1.6 in the /etc/mk.conf file in this manner:

KVER_OSRELEASE=1.6
KVER_OSRELEASE = ''

>How-To-Repeat:
	
Set up pkg_comp and try to run it.

>Fix:
	
prevent pkg_comp from overwriting the KVER_OSRELEASE variable in
the chroot'ed /etc/mk.conf

>Release-Note:
>Audit-Trail:
>Unformatted: