From owner-freebsd-ports@FreeBSD.ORG Wed Aug 16 20:20:08 2006 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E80FB16A4DA; Wed, 16 Aug 2006 20:20:07 +0000 (UTC) (envelope-from amdmi3@mail.ru) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52C9B43D5A; Wed, 16 Aug 2006 20:20:07 +0000 (GMT) (envelope-from amdmi3@mail.ru) Received: from [213.148.29.33] (port=19827 helo=nexii.panopticon) by mx3.mail.ru with esmtp id 1GDRrx-0008sF-00; Thu, 17 Aug 2006 00:20:05 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.2]) by nexii.panopticon (Postfix) with ESMTP id 9C54917041; Thu, 17 Aug 2006 00:20:12 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 132E642D5; Thu, 17 Aug 2006 00:20:09 +0400 (MSD) Date: Thu, 17 Aug 2006 00:20:09 +0400 From: Dmitry Marakasov To: Kris Kennaway Message-ID: <20060816202009.GB71853@hades.panopticon> Mail-Followup-To: Kris Kennaway , John E Hein , babak@farrokhi.net, G??bor K??vesd??n , freebsd-ports@FreeBSD.org References: <20060814234414.GA57035@hades.panopticon> <44E194BA.2020507@FreeBSD.org> <17634.5246.887894.836856@gromit.timing.com> <20060816173628.GA14848@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20060816173628.GA14848@xor.obsecurity.org> User-Agent: Mutt/1.5.12-2006-07-14 Cc: babak@farrokhi.net, John E Hein , freebsd-ports@FreeBSD.org, G??bor K??vesd??n Subject: Re: DESTDIR implementation [Was:: ATTENTION: is the way DESTDIR was introduced completely wrong?] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Aug 2006 20:20:08 -0000 * Kris Kennaway (kris@obsecurity.org) wrote: > > The hard part is to get ports writers to think the right way about > > DESTDIR after ignoring it for so many years. And once you decide to > > go about fixing it, there's no way around that problem. > > My preferred solution involves a couple of shell commands, along the > lines of the following: > > mount_nullfs ${PORTSDIR} ${DESTDIR}${PORTSDIR} > mount_nullfs ${WRKDIR} ${DESTDIR}${WRKDIR} > mount_devfs foo ${DESTDIR}/dev > chroot ${DESTDIR} cd ${.CURDIR} && make install > > A suitable version of the above should allow all ports to be installed > into a jail-ready filesystem hierarchy, while requiring 0 port > changes. This seem pretty obvious solution and it will work in most of cases. But there are caveats though. What comes to my mind: * /etc/make.conf vs. ${DESTDIR}/etc/make.conf issue (that's also important with real DESTDIR). This can't be resolved easily - if DESTDIR is jail, it's likely that /etc/make.conf is need, but if remote system is mounted over NFS, ${DESTDIR}/etc/make.conf is to be used. * It was mentioned already, I'll second: I don't trush nullfs much :) * Both current and nullfs-drived DESTDIR implementations require all depends in the DESTDIR. But actually BUILD_DEPENDS from host can be used. I had also thinked over an idea of package-driven DESTDIR implementation. Like automated building packages on the host system and then installing them into DESTDIR. No nullfs, no makefile dualism, no need to change ports, small amount of changes to Mk/, BUILD_DEPENDS don't get installed into DESTDIR. But, no support for cross-builds. -- Best regards, Dmitry mailto:amdmi3@mail.ru