From owner-freebsd-questions@freebsd.org Thu Jun 11 07:22:23 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 7A5CA34D676 for ; Thu, 11 Jun 2020 07:22:23 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Received: from mail.worldserver.net (mail.worldserver.net [217.13.200.38]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49jFg06yqGz4BPN for ; Thu, 11 Jun 2020 07:22:20 +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 11C3525590 for ; Thu, 11 Jun 2020 09:22:17 +0200 (CEST) Received: from [172.16.37.5] (kaperfahrt.nebelschwaden.de [172.16.37.5]) by postpony.nebelschwaden.de (Postfix) with ESMTP id 98BBADA695 for ; Thu, 11 Jun 2020 09:22:17 +0200 (CEST) Reply-To: listac@nebelschwaden.de Subject: Re: Moving sources (base/ports) from /usr To: freebsd-questions@freebsd.org References: <8d48921e-7af1-9313-0781-4ba4bd9c1f10@nebelschwaden.de> <20200520110833.f47610a48f0f28dd563c13aa@sohara.org> <2c3bd26c-aaa3-9998-e5e5-e3f4f3796ffc@nebelschwaden.de> <0b98639e-e714-412c-950e-7d20be5d1147@hedeland.org> <20200520144555.2e935417.freebsd@edvax.de> <690ef022-1afe-645a-aec9-30f9d84561f6@nebelschwaden.de> From: Ede Wolf Message-ID: Date: Thu, 11 Jun 2020 09:22:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <690ef022-1afe-645a-aec9-30f9d84561f6@nebelschwaden.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49jFg06yqGz4BPN 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.38) smtp.mailfrom=listac@nebelschwaden.de X-Spamd-Result: default: False [2.19 / 15.00]; HAS_REPLYTO(0.00)[listac@nebelschwaden.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[217.13.200.38:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.80)[0.795]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_SPAM_MEDIUM(0.29)[0.293]; NEURAL_SPAM_LONG(0.30)[0.298]; DMARC_NA(0.00)[nebelschwaden.de]; R_SPF_NA(0.00)[no SPF record]; 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]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[217.13.200.38:from] 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: Thu, 11 Jun 2020 07:22:23 -0000 With a little delay, here is just the conclusion. Moving ports or src to another location is actually way more simple than it seemed at first impression. Seems like well structured OS. So, to the best of my knowledge: For ports, simple move to the desired location and specify in /etc/make.conf: PORTSDIR=/clutter/ports WRKDIRPREFIX=/clutter/work DISTDIR=/clutter/binpkg SRCCONF=/etc/src.conf SRC_ENV_CONF=/etc/src-env.conf That's it, you are set. Works without any modification for portmaster as well. I do not know about other tools that have an own configuration files, like portsnap, as I have not have them used yet. WRKDIRPREFIX is where stuff is build, but it also keeps your config settings? DISTDIR is where the downloaded source is kept. Moving /usr/src is even more effortless, just set following variable in /etc/src-env.conf (or whatever you have defined this file to be in make.conf): MAKEOBJDIRPREFIX?=/clutter/obj That's it. There is one more environmant variable, that can optionally be exported in the shell of your choice, that is SOURCEDIR setenv SOURCEDIR /clutter/src OR export SOURCEDIR=/clutter/src Or your respective configuration file. This is only used by mergemaster, and if not set, mergemaster will ask during invocation. Just be aware, if not net and you have not deleted the contents below /usr/src, mergemaster may use /usr/src if a certain makefile is present and this may lead to unexpected results. Remaining open questions: - Is it possible for makeworld/kernek to move the workdir out of /usr/obj? So temporary stuff may go to /tmp - Is there a way to prevent installworld from creating /usr/src if it not present? - Why are portvariables defined in make.conf, not in src-env.conf? But those are minuscule. Thanks everybode for your time, help and explanations. Ede