From owner-freebsd-questions@freebsd.org Wed May 13 18:18:27 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22F442FC64B for ; Wed, 13 May 2020 18:18:27 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Received: from mail.worldserver.net (mail.worldserver.net [217.13.200.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.worldserver.net", Issuer "EuropeanSSL Server CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49MjbP4NBMz4N7m for ; Wed, 13 May 2020 18:18:25 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Received: from postpony.nebelschwaden.de (v22018114346177759.hotsrv.de [194.55.14.20]) (Authenticated sender: postmaster@nebelschwaden.de) by mail.worldserver.net (Postfix) with ESMTPA id 5A55F2553C for ; Wed, 13 May 2020 20:18:17 +0200 (CEST) Received: from [172.16.37.5] (kaperfahrt.nebelschwaden.de [172.16.37.5]) by postpony.nebelschwaden.de (Postfix) with ESMTP id BC4DED87AE for ; Wed, 13 May 2020 20:18:11 +0200 (CEST) Reply-To: listac@nebelschwaden.de Subject: Re: Moving sources (base/ports) from /usr To: freebsd-questions@freebsd.org References: <20200508210444.7945f4ba@kaperfahrt.nebelschwaden.de> From: Ede Wolf Message-ID: <9d3bae11-da04-3e9d-8c81-92e78fed7593@nebelschwaden.de> Date: Wed, 13 May 2020 20:18:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49MjbP4NBMz4N7m X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of listac@nebelschwaden.de has no SPF policy when checking 217.13.200.26) smtp.mailfrom=listac@nebelschwaden.de X-Spamd-Result: default: False [-0.33 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[listac@nebelschwaden.de]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.39)[-0.389,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[nebelschwaden.de]; NEURAL_HAM_MEDIUM(-0.84)[-0.835,0]; R_SPF_NA(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15657, ipnet:217.13.192.0/20, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 18:18:27 -0000 Thanks very much for answering. That seems like a quite legit way to do this. If I am not mistaken, your idea is also what Dragonfly is doing, when been given it a /build partition during boot. As a side note. However, the insteresting question behind using variables, from a beginners point of view, is, while they all relate to building stuff, why do all of those have to be defined in different places? Like WRKDIRPREFIX in make.conf (according to portmaster(8)), MAKEOBJDIRPREFIX in src-env and absolutely not in make.conf (why ever), while DISTDIR seems to be an environment variable, that would imply /etc/profile (or csh equivalent) (https://wiki.freebsd.org/DESTDIR, albeit quite old). And of course portsnap has it's own set of variables in its own config. Anyway, for the record, so far I've managed to move /usr/src by accidentally having read some message that it is called SOURCEDIR, not SRCDIR. A first step. make.conf may not be the best place to define this, but in lack of a more appropriate place it seems to work. I may play around moving this definition. The only really documented variable, MAKEOBJDIRPREFIX= in src-env.conf, throws a lot of warnings to use ?= instead (something that at first glance would absolutely foil the whole idea behind it), but seems to work as well. At least I've managed to build and install world that way with the src, ports and obj folders having been completely deleted below /usr. While the nullmount option may eventually be the way to go for a more serious box, out of curiosity I'll try to get it up and running this way as well. And more importantly, going to understand this multitude of places. If possible for a mere mortal. Have not found time to gig into ports, but WRKDIRPREFIX and DISTDIR are the ones to set here. PORTSDIR seems only to be used by portsnap. But have to try these as of yet. I do rememeber having read somewhere that WRKDIRPREFIX may also be used for buildworld, but have so far not been able to find this information again. But thanks again very much for getting back. And if someone has some logic to share behind all this, I'm all ear. Ede Am 12.05.20 um 09:01 schrieb Dewayne Geraghty: > Hi Ede, > Something like this might help, where you construct: > /import/src > /import/ports > then on as needed basis, you can > mount_nullfs /import/src /usr/src > mount_nullfs /import/ports /usr/ports > > I have something like this when I'm using one source (for src and ports) > on a virtual disk under virtualbox (on Win) across multiple VM's. This > also means I don't have to fiddle with variables. > > Cheers. > > On 9/05/2020 5:04 am, Ede Wolf wrote: >> Hi, >> >> As the title implies, I would like to move everything src/build related >> from /usr to a different folder, let's call it /import. And since it >> won't be mounted permanently, I'd rather like not to use links. That would certainly work, but it's ugly. >> >> So I am looking for a more clean way of archiving this, but currently I am having trouble to find a >> comprehensive list of the variables, that would need to be set, and more over, where the proper place woulf be, to do so. >> More often than not it is not /etc/make.conf >> >> For MAKEOBJDIRPREFIX it is src-env.conf, but what about the others? >> >> SRCDIR, PORTSDIR, WRKDIRPREFIX, DISTFILES, WRKSRC? Is that list correct and/or complete? >> >> Is there any documentation providing a decent overview of the >> environment (base as well as ports)? Or maybe anyone is running this >> kind of setup as well? >> >> Thanks for helping out >> >> Ede >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >> > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >