From nobody Fri Jul 16 17:11:58 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 63C6D127940A for ; Fri, 16 Jul 2021 17:12:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GRHpz0xPNz3KrN; Fri, 16 Jul 2021 17:12:10 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f46.google.com with SMTP id o72-20020a9d224e0000b02904bb9756274cso10574196ota.6; Fri, 16 Jul 2021 10:12:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2wiLdjsNMxBteRVXBWaqsl6KwM0OeGtQkWH+Cj7jHiw=; b=d2SNzlhJvpCJynwHKvh0mYhYzX+Ijaj2ecfVD0L9Pfef2Mu3uZdgUKTNp9csraJo9C lDFDq8aDpzOX+pGY6UioXXuxPLiVlGQ7E/QWFfZuz/XFMSU6FMGimOwNI6iCXTTp6438 QjiVW1SkUWSyHfCY29gf4eyAZKvKUWjusL9lEhzlxAQt2H2QjQNW5MVI3032p9FPUKX6 I/kL7C3Z+wcc3UVWf7slMKR/qnaldHaxSxyZVaw3lGJIkbydXWke18xixJGr8ESWD2b7 NzHvEE84rB+8w+OSbwGjKZ07RsXQrwC3Dpm2aofLp6nxgfVR6Yjv6aBmIbjogXHGbExQ Fn/Q== X-Gm-Message-State: AOAM530qNYpJZUYi1+ECA2DD9j+59EMtDwmiOfNeNOgSHNdSWnQilf16 995OlqAqGi5aM4IS81TrN7OcJ2Nt6phd/UYU09sF1gbOLjY= X-Google-Smtp-Source: ABdhPJyJPLku0FRnQYJZTnWiqpKSbBKIuRr/zZQCHv/6zoRNEOkGUFXvQLUmhvNGHTur9ry8/m3TUBF74XMAhvm+KCM= X-Received: by 2002:a9d:d53:: with SMTP id 77mr9283574oti.18.1626455529521; Fri, 16 Jul 2021 10:12:09 -0700 (PDT) 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 References: <662dbcebb38135deb1599cd9d8fee3e133330409.camel@freebsd.org> In-Reply-To: <662dbcebb38135deb1599cd9d8fee3e133330409.camel@freebsd.org> From: Alan Somers Date: Fri, 16 Jul 2021 11:11:58 -0600 Message-ID: Subject: Re: PATH: /usr/local before or after /usr ? To: Ian Lepore Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000001486b405c740b0cb" X-Rspamd-Queue-Id: 4GRHpz0xPNz3KrN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: Y --0000000000001486b405c740b0cb Content-Type: text/plain; charset="UTF-8" On Fri, Jul 16, 2021 at 10:46 AM Ian Lepore wrote: > On Fri, 2021-07-16 at 09:01 -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. Is there a good reason for this convention, > > or is it just inertia? > > -Alan > > I have a hierarchy on my machines rooted at /local and /local/bin is > before /bin and /usr/bin in my PATH, so I can override system tools > when I explicitly want to without suffering any problems of an > unexpected override from installing a port or package. > > If you're using ports as a development environment to work on a new > gstat replacement, you could do something similar and put PREFIX=/local > in your port makefile while you're developing on it. > > -- Ian > Thanks for the feedback everyone. Here's what I'm going to do: * If you install it from cargo, it will go into ~/.cargo/bin/gstat, which (for cargo users) comes first in PATH * If you install it from ports, it will become /usr/local/sbin/gstat-rs, with a pkg-message advising you to setup an alias. -Alan --0000000000001486b405c740b0cb--