From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 13 02:10:15 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C191E16A413 for ; Fri, 13 Jul 2007 02:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 9E20A13C4CC for ; Fri, 13 Jul 2007 02:10:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l6D2AFrq032610 for ; Fri, 13 Jul 2007 02:10:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l6D2AFSa032609; Fri, 13 Jul 2007 02:10:15 GMT (envelope-from gnats) Resent-Date: Fri, 13 Jul 2007 02:10:15 GMT Resent-Message-Id: <200707130210.l6D2AFSa032609@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "John E. Hein" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFF6416A510 for ; Fri, 13 Jul 2007 02:05:32 +0000 (UTC) (envelope-from jhein@timing.com) Received: from Daffy.timing.com (mx2.timing.com [206.168.13.218]) by mx1.freebsd.org (Postfix) with ESMTP id 258F713C461 for ; Fri, 13 Jul 2007 02:05:32 +0000 (UTC) (envelope-from jhein@timing.com) Received: from gromit.timing.com (gromit.timing.com [206.168.13.209]) by Daffy.timing.com (8.13.1/8.13.1) with ESMTP id l6D1Y0w2036019 for ; Thu, 12 Jul 2007 19:34:00 -0600 (MDT) (envelope-from jhein@timing.com) Received: from gromit.timing.com (localhost [127.0.0.1]) by gromit.timing.com (8.14.1/8.13.8) with ESMTP id l6D1XwSl025249; Thu, 12 Jul 2007 19:33:58 -0600 (MDT) (envelope-from jhein@gromit.timing.com) Received: (from jhein@localhost) by gromit.timing.com (8.14.1/8.14.1/Submit) id l6D1Xv8u025248; Thu, 12 Jul 2007 19:33:57 -0600 (MDT) (envelope-from jhein) Message-Id: <200707130133.l6D1Xv8u025248@gromit.timing.com> Date: Thu, 12 Jul 2007 19:33:57 -0600 (MDT) From: "John E. Hein" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/114545: [patch] for bsd.port.mk to fix linux-xorg-libs ldconfig when using pkg_add -p X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "John E. Hein" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 02:10:15 -0000 >Number: 114545 >Category: ports >Synopsis: [patch] for bsd.port.mk to fix linux-xorg-libs ldconfig when using pkg_add -p >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 13 02:10:15 GMT 2007 >Closed-Date: >Last-Modified: >Originator: John E. Hein >Release: FreeBSD 6.2-STABLE i386 >Organization: Symmetricom >Environment: System: FreeBSD gromit.timing.com 6.2-STABLE-20070520 FreeBSD 6.2-STABLE-20070520 #5: Mon May 21 08:49:15 MDT 2007 jhein@bugs.timing.com:/usr/obj/usr/src/sys/GROMIT i386 >Description: The plist for linux-xorg-libs is built with a hard-coded reference to the build-time linux prefix (/compat/linux by default). When one uses pkg_add with -p to install the package somewhere other than it's default location, the linux ldconfig is executed with the wrong path. >How-To-Repeat: Build a chroot. Install linux_base-fc4 in the chroot. Note that the linux ldconfig -p output does not include any X libs as there are none in linux_base-fc4. chroot /path/to/chroot /compat/linux/sbin/ldconfig -p -r /compat/linux Outside the chroot, build the linux-xorg-libs package normally cd x11/linux-xorg-libs make package Note that the @exec line in the plist is: @exec /compat/linux/sbin/ldconfig -r /compat/linux Add the package into the chroot... pkg_add -v -p /path/to/chroot linux-xorg-libs-6.8.2_5.tgz The linux ldconfig -p output _still_ does not include any X libs because the @exec command is pointing to the wrong place. chroot /path/to/chroot /compat/linux/sbin/ldconfig -p -r /compat/linux (observe that there are still no X libs in ldconfig -p output) >Fix: Let pkg_add properly replace the prefix by using %D rather than hard-coding the build-time prefix in the plist. Index: bsd.port.mk =================================================================== RCS file: /base/FreeBSD-CVS/ports/Mk/bsd.port.mk,v retrieving revision 1.574 diff -u -p -r1.574 bsd.port.mk --- bsd.port.mk 12 Jul 2007 01:57:10 -0000 1.574 +++ bsd.port.mk 13 Jul 2007 00:56:34 -0000 @@ -1486,13 +1486,12 @@ PREFIX?= ${LOCALBASE_REL} .if defined(USE_LINUX_PREFIX) .if !defined(DESTDIR) LDCONFIG_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} -LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG_CMD} .else LDCONFIG_CMD?= ${CHROOT} ${DESTDIR} ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} -LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD} LDCONFIG_PLIST_UNEXEC_CMD?= ${LINUXBASE_REL}/sbin/ldconfig -r ${LINUXBASE_REL} .endif +LDCONFIG_PLIST_EXEC_CMD?= ${LDCONFIG_CMD:C|${LINUXBASE_REL}|%D|g} .else .if !defined(DESTDIR) LDCONFIG_CMD?= ${LDCONFIG} -m ${LDCONFIG_RUNLIST} >Release-Note: >Audit-Trail: >Unformatted: