From owner-freebsd-questions@freebsd.org Wed May 20 10:22:05 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 834E42CD314 for ; Wed, 20 May 2020 10:22:05 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49RphX0qSpz42Ml for ; Wed, 20 May 2020 10:22:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.22.33]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPA (Nemesis) id 1MEmMt-1jr5aV3zYZ-00GJgo; Wed, 20 May 2020 12:22:01 +0200 Date: Wed, 20 May 2020 12:22:00 +0200 From: Polytropon To: "Steve O'Hara-Smith" Cc: listac@nebelschwaden.de, freebsd-questions@freebsd.org Subject: Re: Moving sources (base/ports) from /usr Message-Id: <20200520122200.aea34a98.freebsd@edvax.de> In-Reply-To: <20200520110833.f47610a48f0f28dd563c13aa@sohara.org> References: <8d48921e-7af1-9313-0781-4ba4bd9c1f10@nebelschwaden.de> <20200520110833.f47610a48f0f28dd563c13aa@sohara.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:xphfMQKPUTujoD8bzY/KLS8H2vZ1Nsu7jBRNXbxjGybEBqU3v1k /kFtxyx4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bXONffsVOfDo56cPF762ZfIdGFLGb/hBaB4kgJjKucwzLsQSQRHvziMWoo/KgDgD X-Rspamd-Queue-Id: 49RphX0qSpz42Ml X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.130) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [2.77 / 15.00]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[94.222.22.33:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.33)[0.330]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.04)[0.039]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[212.227.126.130:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.126.130:from]; RCVD_COUNT_TWO(0.00)[2] 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 10:22:05 -0000 On Wed, 20 May 2020 11:08:33 +0100, Steve O'Hara-Smith wrote: > On Wed, 20 May 2020 11:52:00 +0200 > Ede Wolf wrote: > > > > That makes sense it isn't being picked up by make. > > > > Sure, once you think about it. > > > > But here is the strange part. I've exported SOURCEDIR via /etc/profile > > Which means that it will be picked up by /bin/sh. If invoked as a login shell; "man sh" says: Invocation If no arguments are present and if the standard input of the shell is connected to a terminal (or if the -i option is set), the shell is considered an interactive shell. An interactive shell generally prompts before each command and handles programming and command errors differently (as described below). When first starting, the shell inspects argument 0, and if it begins with a dash (-), the shell is also considered a login shell. This is normally done automatically by the system when the user first logs in. A login shell first reads commands from the files /etc/profile and then .profile in a user's home directory, if they exist. If the environment variable ENV is set on entry to a shell, or is set in the .profile of a login shell, the shell then subjects its value to parameter expansion and arithmetic expansion and reads commands from the named file. Therefore, a user should place commands that are to be executed only at login time in the .profile file, and commands that are executed for every shell inside the ENV file. The user can set the ENV variable to some file by placing the following line in the file .profile in the home directory, substituting for .shrc the filename desired: ENV=$HOME/.shrc; export ENV Maybe it helps setting SOURCEDIR in /root/.shrc, assuming that root will execute the commands (and uses sh for that). > > and it is set. However, mergemaster does not recognize it. > > Then I export the same variable again on the command line and it works: > > By default root login uses /bin/csh which doesn't load /etc/profile > but rather /etc/csh.cshrc and /etc/csh.login. That was my suspicion too, but in case it was a C shell, the commands for re-setting and re-exporting SOURCEDIR would have failed, as csh requires a different syntax. So it seems that it's really sh. :-) However, the presented behaviour is quite strange. It has been shown (!) that $SOURCEDIR is somehow set, but mergemaster requires it to be set again? -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...