From nobody Fri Jul 16 16:35:16 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 266B61245A34 for ; Fri, 16 Jul 2021 16:35:26 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GRH0Y5VRcz4sSr; Fri, 16 Jul 2021 16:35:25 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 16GGZGwm071536; Fri, 16 Jul 2021 09:35:16 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 16GGZG8u071535; Fri, 16 Jul 2021 09:35:16 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202107161635.16GGZG8u071535@gndrsh.dnsmgr.net> Subject: Re: PATH: /usr/local before or after /usr ? In-Reply-To: <20210716171737.36b757a9@bsd64.grem.de> To: Michael Gmelin Date: Fri, 16 Jul 2021 09:35:16 -0700 (PDT) CC: Alan Somers , FreeBSD CURRENT X-Mailer: ELM [version 2.4ME+ PL121h (25)] List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GRH0Y5VRcz4sSr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N > > > On Fri, 16 Jul 2021 09:01:49 -0600 > Alan Somers wrote: > > > FreeBSD has always placed /usr/local/X after /usr/X in the default > > PATH. AFAICT that convention began with SVN revision 37 "Initial > > import of 386BSD 0.1 othersrc/etc". Why is that? It would make > > sense to me that /usr/local/X should come first. That way programs > > installed from ports can override FreeBSD's defaults. > > I think that is exactly what you don't want to happen by default > (imagine all the ways the system could fall apart in a really hard to > support ways if individual standard tools from base are overridden - > especially as many users might not even notice, as it might be a > side-effect of installing some dependency of something they need). Michael states the exact reasoning that was used, and has been used repeatidly over history for this ordering of path. Any alteration of that ordering leads to issues with deterministic behavior is the bottom line. > > Users are always free to tweak PATH for their purposes of course, but > running the UNIX tools that came with the OS by default makes a lot > of sense to me. Others have noted use of aliases which is a good way to handle this. Global aliases can be installed in /etc/csh.cshrc or /etc/profile, other shells have similiar global config files. > > -m > > > Is there a > > good reason for this convention, or is it just inertia? Good reason(s). > > -Alan > -- > Michael Gmelin -- Rod Grimes rgrimes@freebsd.org