From owner-freebsd-ports@FreeBSD.ORG Wed Aug 16 18:35:58 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 5129316A4DD; Wed, 16 Aug 2006 18:35:58 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CA0743D5D; Wed, 16 Aug 2006 18:35:57 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net ([12.207.12.9]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20060816183550m910086h5le>; Wed, 16 Aug 2006 18:35:56 +0000 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.6/8.13.6) with ESMTP id k7GIZlGX064769; Wed, 16 Aug 2006 13:35:47 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.6/8.13.6/Submit) id k7GIZV62064768; Wed, 16 Aug 2006 13:35:31 -0500 (CDT) (envelope-from brooks) Date: Wed, 16 Aug 2006 13:35:22 -0500 From: Brooks Davis To: G?bor K?vesd?n Message-ID: <20060816183522.GB63928@lor.one-eyed-alien.net> References: <20060814234414.GA57035@hades.panopticon> <44E194BA.2020507@FreeBSD.org> <17634.5246.887894.836856@gromit.timing.com> <20060816173628.GA14848@xor.obsecurity.org> <44E35C08.3020502@FreeBSD.org> <20060816180646.GA79702@xor.obsecurity.org> <44E36070.4080007@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <44E36070.4080007@FreeBSD.org> User-Agent: Mutt/1.5.11 Cc: babak@farrokhi.net, amdmi3@mail.ru, John E Hein , freebsd-ports@freebsd.org, Kris Kennaway 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 18:35:58 -0000 --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 16, 2006 at 08:14:08PM +0200, G?bor K?vesd?n wrote: > Kris Kennaway wrote: > >On Wed, Aug 16, 2006 at 07:55:20PM +0200, G?bor K?vesd?n wrote: > > =20 > >>Kris Kennaway wrote: > >> =20 > >>>On Tue, Aug 15, 2006 at 12:37:50PM -0600, John E Hein wrote: > >>> > >>>=20 > >>> =20 > >>>>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. > >>>> =20 > >>>> =20 > >>>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. > >>> > >>>Kris > >>>=20 > >>> =20 > >>This makes sense, but I did not succeed to use mount_nullfs on an=20 > >>5.3-RELEASE/amd64 machine, while the same worked well on my 6.1/i386=20 > >>computer, so I'm not sure mount_nullfs is reliable enough on older=20 > >>systems. > >> =20 > > > >Who cares about old systems that are already unsupported and will only > >become even more unsupported over time? Nullfs works in 6.x and will > >continue to work in the future (since I use it extensively and yell at > >whoever breaks it ;-) > > > > =20 > >>Also, other targets should be supported as well, and the nullmounted=20 > >>directory should be umounted after he run. Anyway, I find this solution= =20 > >>very good, if we can work this out a bit better, my progress so far=20 > >>would become pointless... > >> =20 > > > >It's a shame to throw away your work, but IMO it would also be a > >bigger shame not to proceed if a simpler solution can be made to work. > > > >Kris > > =20 > Agreed. I just feel a bit guilty, since I made things complicated and=20 > obscure, while I just want to provide a good solution, but haven't=20 > thought of mount_nullfs. The one advantage I can see for a more complex DESTDIR solution is dealing with cross builds. I suspect that it would be easier to handle them with DESTDIR, but that's only intuition. (Obviously, not all ports can be easily cross built, but as embedded becomes more important to the project we need to start thinking about it for the ones that can be). -- Brooks --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE42VpXY6L6fI4GtQRAsBkAKDEQljpAOu/VjYcZVUSQaqylpZ0KgCaAjsF gEMe1K7lg9BYkEUnZVFfM5Y= =YIEt -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13--