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 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; " 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
Responsible Changed From-To: freebsd-ports-bugs->portmgr bsd.port.mk is portmgr territory (via the GNATS Auto Assign Tool)
Index: bsd.destdir.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.destdir.mk,v retrieving revision 1.1 diff -a -u -r1.1 bsd.destdir.mk --- bsd.destdir.mk 4 Aug 2007 11:37:23 -0000 1.1 +++ bsd.destdir.mk 3 Jan 2008 13:28:24 -0000 @@ -76,7 +76,7 @@ .endif DESTDIR_ENV_LIST?= -DESTDIR_ENV= CHROOTED=yes +DESTDIR_ENV= CHROOTED=yes PATH=${PATH} .for _var in ${DESTDIR_ENV_LIST:NDESTDIR:NCHROOTED:NPORTSDIR} DESTDIR_ENV+= ${_var}="${${_var}}" .endfor -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Russians in the rear view mirror ... are closer than they appear.
State Changed From-To: open->closed Fixed, thanks for reporting!
pav 2008-03-11 23:37:32 UTC FreeBSD ports repository Modified files: Mk bsd.destdir.mk Log: - Pass PATH variable to chrooted command, so BUILD/RUN_DEPENDS have a chance of working PR: ports/117738 Reported by: Erik Cederstrand <erik@cederstrand.dk> Patch by: pav - Pass TERM variable to chrooted command, so the OPTIONS screen work PR: ports/117453 Reported by: Erik Cederstrand <erik@cederstrand.dk> Patch by: pav Revision Changes Path 1.2 +2 -2 ports/Mk/bsd.destdir.mk _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"