Date: Thu, 1 Nov 2007 09:46:34 GMT From: Erik Cederstrand <erik@cederstrand.dk> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/117738: make install doesn't work with DESTDIR Message-ID: <200711010946.lA19kYxd083851@www.freebsd.org> Resent-Message-ID: <200711010950.lA19o1EX006183@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711010946.lA19kYxd083851>