From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Nov 1 09:50:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86B2016A46E for ; Thu, 1 Nov 2007 09:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6DB13C4A8 for ; Thu, 1 Nov 2007 09:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id lA19o1I2006184 for ; Thu, 1 Nov 2007 09:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id lA19o1EX006183; Thu, 1 Nov 2007 09:50:01 GMT (envelope-from gnats) Resent-Date: Thu, 1 Nov 2007 09:50:01 GMT Resent-Message-Id: <200711010950.lA19o1EX006183@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, Erik Cederstrand Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4329216A419 for ; Thu, 1 Nov 2007 09:46:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id EF8E413C4AC for ; Thu, 1 Nov 2007 09:46:37 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id lA19kYgt083852 for ; Thu, 1 Nov 2007 09:46:34 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id lA19kYxd083851; Thu, 1 Nov 2007 09:46:34 GMT (envelope-from nobody) Message-Id: <200711010946.lA19kYxd083851@www.freebsd.org> Date: Thu, 1 Nov 2007 09:46:34 GMT From: Erik Cederstrand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/117738: make install doesn't work with DESTDIR X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2007 09:50:01 -0000 >Number: 117738 >Category: ports >Synopsis: make install doesn't work with DESTDIR >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 01 09:50:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Erik Cederstrand >Release: host: 7.0-BETA chroot: CURRENT 2007-10-26 >Organization: >Environment: FreeBSD pc.local 7.0-BETA1 FreeBSD 7.0-BETA1 #6: Fri Oct 26 14:28:24 CEST 2007 root@pc.local:/usr/obj/usr/src/sys/GENERIC i386 >Description: I'm trying to install some ports into a chroot environment. For this, I use the DESTDIR support in ports. Some ports with dependencies are failing to install. Here's postgresql82-client as an example: # chroot /path/to/chroot # pkg_info [...] gmake-3.81_2 GNU version of 'make' utility portupgrade-2.3.1,2 FreeBSD ports/packages administration and management [...] # ls /usr/local/bin/gmake /usr/local/bin/gmake # exit # cd /usr/ports/databases/postgresql82-client # make install clean DESTDIR=/path/to/chroot [...] ===> postgresql-client-8.2.5_1 depends on executable: gmake - not found [...] ===> Installing for gmake-3.81_2 ===> Generating temporary packing list ===> Checking if devel/gmake already installed ===> gmake-3.81_2 is already installed You may wish to ``make deinstall'' and install this port again by ``make reinstall'' to upgrade it properly. If you really wish to overwrite the old port of devel/gmake without deleting it first, set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line. # Some additional data: 1) This works when installing the port directly on the host (7.0-BETA1 #6, i386). That is, gmake is found and left alone, and postgresql installs. 2) The chroot is 8.0-CURRENT 3) I've had a look at bsd.destdir.mk. From what I can read, after mount_nullfs-mounting /usr/ports to the chroot, it basically issues this command: 4) "make install DESTDIR" works for simple ports without dependencies. # chroot /path/to/chroot sh -c "cd /usr/ports/databases/postgresql82-client; make install clean; " If I issue this command from the command-line, gmake is found and the port is installed: [...] ===> postgresql-client-8.2.5_1 depends on executable: gmake - found [...] So it seems something in the bsd.destdir.mk is not working. Maybe a sub-shell missing the PATH variable? There may be a link to ports/117453 >How-To-Repeat: # cd /usr/ports/devel/gmake # make install clean DESTDIR=/path/to/chroot # cd /usr/ports/database/postgresql82-client # make install clean DESTDIR=/path/to/chroot >Fix: A workaround: # nullfs_mount /usr/ports /path/to/chroot/usr/ports # chroot /path/to/chroot sh -c "cd /usr/ports/databases/postgresql82-client; make install clean; " >Release-Note: >Audit-Trail: >Unformatted: