From owner-freebsd-questions@freebsd.org Wed May 20 11:32:04 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 B14802CEA1E for ; Wed, 20 May 2020 11:32:04 +0000 (UTC) (envelope-from per@hedeland.org) Received: from mailout.easydns.com (mailout.easydns.com [64.68.202.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49RrFH34Drz46GP for ; Wed, 20 May 2020 11:32:03 +0000 (UTC) (envelope-from per@hedeland.org) Received: from localhost (localhost [127.0.0.1]) by mailout.easydns.com (Postfix) with ESMTP id 60FD5C159F for ; Wed, 20 May 2020 11:32:02 +0000 (UTC) Received: from mailout.easydns.com ([127.0.0.1]) by localhost (emo12-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2WJ6V60uU4Lq for ; Wed, 20 May 2020 11:32:02 +0000 (UTC) Received: from hedeland.org (81-228-157-209-no289.tbcn.telia.com [81.228.157.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easydns.com (Postfix) with ESMTPSA id 249FAC0A1D for ; Wed, 20 May 2020 11:32:01 +0000 (UTC) Received: from pluto.hedeland.org (pluto.hedeland.org [10.1.1.5]) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPS id 04KBVx1p091623 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Wed, 20 May 2020 13:31:59 +0200 (CEST) (envelope-from per@hedeland.org) 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> From: Per Hedeland Message-ID: <0b98639e-e714-412c-950e-7d20be5d1147@hedeland.org> Date: Wed, 20 May 2020 13:31:59 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <2c3bd26c-aaa3-9998-e5e5-e3f4f3796ffc@nebelschwaden.de> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49RrFH34Drz46GP X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of per@hedeland.org has no SPF policy when checking 64.68.202.10) smtp.mailfrom=per@hedeland.org X-Spamd-Result: default: False [1.72 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[81.228.157.209:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.12)[0.123]; 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]; NEURAL_SPAM_MEDIUM(0.79)[0.794]; DMARC_NA(0.00)[hedeland.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:16686, ipnet:64.68.200.0/22, country:CA]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[64.68.202.10: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: Wed, 20 May 2020 11:32:04 -0000 On 2020-05-20 13:17, Ede Wolf wrote: > My bad. Very sorry. I totally forgot to mention, that root has changed it's login shell to /bin/sh. I do not use csh at all. > > So /etc/profile is being read and the SOURCEDIR is a valid environmental variable, as can be seen from the first echo $SOURCEDIR. To be pedantic, 'echo $SOURCEDIR' does *not* show that SOURCEDIR is set in the *environment*, only that it is set in the shell *or* the environment. You might want to double-check with $ env | grep SOURCEDIR > It somehow does just not get handed down to mergemaster - unless exported again on the command line. > > I'll have a more in depth read through the explanation of Polytropon and sh(1) and certainly will give that a go. Very likely mergemaster calls it's own /bin/sh and that would then require the .shrc. > > Even though I still maintain, an export in [.]profile should be handed down to every subshell, unless overwritten. But I'm afraid, stubborness does not get me any further, unfortunately. Leaving the vagaries of different shells and their rc files aside, I'd say that "*a variable set in the environment* should be handed down to every *subprocess*, unless overwritten (or explicitly excluded)". --Per Hedeland