NetBSD Problem Report #32921

From kre@munnari.OZ.AU  Thu Feb 23 20:37:03 2006
Return-Path: <kre@munnari.OZ.AU>
Received: from jade.coe.psu.ac.th (unknown [202.12.74.196])
	by narn.netbsd.org (Postfix) with ESMTP id ADE0E63B8C1
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 23 Feb 2006 20:37:02 +0000 (UTC)
Message-Id: <200602232036.k1NKaPwE001498@jade.coe.psu.ac.th>
Date: Fri, 24 Feb 2006 03:36:25 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@netbsd.org
Subject: pkgtools/pkg_comp is inconsistent in libkver usage
X-Send-Pr-Version: 3.95

>Number:         32921
>Category:       pkg
>Synopsis:       pkgtools/pkg_comp is inconsistent in libkver usage
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jmmv
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 23 20:40:00 +0000 2006
>Closed-Date:    Sat Jun 17 12:21:14 +0000 2006
>Last-Modified:  Sat Jun 17 12:21:14 +0000 2006
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15  (pkgsrc current as of ~ 12 hours ago)
>Organization:
	Prince of Songkla University
>Environment:


System: NetBSD jade.coe.psu.ac.th 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 kre@jade.coe.psu.ac.th:/usr/obj/current/kernels/JADE_ASUS i386
Architecture: i386
Machine: i386
>Description:
	pkg_comp uses (allows for the use of) libkver to allow
	packages to be built for aystem version that is not
	identical to the kernel actually running (great feature!)

	Most of the time this works just fine (it certainly
	works fine for building most packages - a few tha use
	linux compat mode fail, there's another PR about that).

	Howwever, when using "pkg_comp chroot" the results are
	not consistent.

>How-To-Repeat:

	As follows.   First, include
		NETBSD_RELEASE=3.0
	(or something like that in your $HOME/pkg_comp/default.conf
	- if you don't use default.condf then add the necessary -c
	options to the commands below).   You should not be running the
	same kernel version as the one given as NETBSD_RELEASE

	Then 
		pkg_comp makeroot

	And, the bit that shows it, which I will cut/paste ...

jade# pkg_comp chroot
PKG_COMP ==> Mounting sandboxed filesystems
PKG_COMP ==> Entering sandbox `/local/pkg_comp/default'
pkg_comp:default.conf# uname -a
NetBSD jade.coe.psu.ac.th 3.0 NetBSD 3.0 (LIBKVER) #0: Tue Jan 19 00:00:00 UTC 2038 root@localhost:/sys/arch/i386/compile/LIBKVER i386
pkg_comp:default.conf# exit
PKG_COMP ==> Unmounting sandboxed filesystems

jade# pkg_comp chroot uname -a
PKG_COMP ==> Mounting sandboxed filesystems
PKG_COMP ==> Entering sandbox `/local/pkg_comp/default'
NetBSD jade.coe.psu.ac.th 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006  kre@jade.coe.psu.ac.th:/usr/obj/current/kernels/JADE_ASUS i386

PKG_COMP ==> Unmounting sandboxed filesystems

	Notice that with just "pkg_comp chroot" libkver is
	being used as intended, but with pkg_comp chroot command
	it does not.

	This is particularly relevant with things like
		pkg_comp chroot lintpkgsrc -p
	(or other similar lintpkgsrc options), as that then
	always finds packages like devel/p5-perk-headers to
	be out of date (as the package has the kernel version
	embedded into it - it always builds as 3.0 using libkver,
	but then is checked iwth the real kernel version visible)

>Fix:
	Scatter more uses of LD_PRELOAD around.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jmmv
Responsible-Changed-By: reed@netbsd.org
Responsible-Changed-When: Tue, 28 Feb 2006 20:45:22 +0000
Responsible-Changed-Why:
Assign to maintainer.


From: Stoned Elipot <seb@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: PR/32921 CVS commit: pkgsrc/pkgtools/pkg_comp
Date: Sat, 17 Jun 2006 12:18:24 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	seb
 Date:		Sat Jun 17 12:18:24 UTC 2006

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

 Log Message:
 Update to version 1.29

 Ensure that libkver.so is loaded if needed via LD_PRELOAD
 for all kind of commands run via the chroot target.

 This fix PR pkg/32921.

 Approved by MAINTAINER.


 To generate a diff of this commit:
 cvs rdiff -r1.36 -r1.37 pkgsrc/pkgtools/pkg_comp/Makefile
 cvs rdiff -r1.31 -r1.32 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: seb@netbsd.org
State-Changed-When: Sat, 17 Jun 2006 12:21:14 +0000
State-Changed-Why:
Version 1.29 ok pkg_comp fix this issue.


>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.