From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 16 18:14:31 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86EC51065672 for ; Tue, 16 Aug 2011 18:14:31 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp1.utsp.utwente.nl [130.89.2.8]) by mx1.freebsd.org (Postfix) with ESMTP id EE4E98FC18 for ; Tue, 16 Aug 2011 18:14:30 +0000 (UTC) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id p7GHpo1J015618; Tue, 16 Aug 2011 19:51:50 +0200 From: Pieter de Goeje To: freebsd-hackers@freebsd.org Date: Tue, 16 Aug 2011 19:51:47 +0200 User-Agent: KMail/1.9.10 References: <4E4A5DFC.7010807@icritical.com> In-Reply-To: <4E4A5DFC.7010807@icritical.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201108161951.48553.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Matt Burke Subject: Re: Alternate source trees X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2011 18:14:31 -0000 On Tuesday 16 August 2011 14:09:32 Matt Burke wrote: > I'm trying to setup a box to do automated FreeBSD builds for other hosts > from multiple source trees. > > I have a couple of source trees mounted - for legibility's sake let's say > /build/stable and /build/current. I also have a few obj dirs for different > targets. The current obj tree is symlinked to /usr/obj, and this works > fine. > > The problem comes when I symlink /usr/src: when I buildworld, I get > /usr/obj/build/current/[...] instead of the desired /usr/obj/usr/src/[...] > This is presumably fine when installing on the same machine, but it breaks > when using it on another host with /usr/src and /usr/obj mounted over nfs. > > The only way I can see around this is a hack using a nullfs mount of > /usr/src instead of a symlink. > > Am I missing something? An environment variable perhaps? > > How does the build process know about the non-symlinked path anyway? I > can't see where (or understand why) it uses "pwd -P" If you use make installworld && make installkernel on the client, then you must recreate the exact directories on the client as used on the build server. So you would probably need to mount /build as well on the client. Note that you can also do the installworld/installkernel part on the build server, by using DESTDIR to point to the client's (NFS mounted) root directory. This method has the advantage that it works regardless of the state of the client (NFS still has to work of course). - Pieter