From nobody Fri Jul 16 16:11:41 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 EDDD28D36C5 for ; Fri, 16 Jul 2021 16:11:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 4GRGTQ6P7Pz4k4g for ; Fri, 16 Jul 2021 16:11:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f48.google.com with SMTP id o72-20020a9d224e0000b02904bb9756274cso10384164ota.6 for ; Fri, 16 Jul 2021 09:11:54 -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=DAdy9bVOeTYnq4SlIu1saUf1jV3/QWEIp1mBsajP0vk=; b=VY4UDqTyWTVNIHliilTz/mnHtszJp4ETcwEN5Q1985uidkUFdyMaGC26yxJS+SMFnz fd9NtK2KqkdG+/sURSNf3Nk63+LkptzNgnHd1W80Xm/5izChFsSx0NLbMQYeucAxzCZz ddBnwTcHt870FD8xUPOTOVKFApgLSMWGbMXuvjIi4R27YsSvxmpGhBCeObHK8cjkjCHm bnYsBRAkR08HcpK89daK3km7AN7/Wit1Q6n+XAYxA7dVq8q/4JFkla4pZRerGcv0fYqv U78bYbKC+w44fekee7sFK8lhhtwEHMCx0VI2rpFcmqAETkwpw9d+59BI3Rw+d4bRFqxQ kr/w== X-Gm-Message-State: AOAM5304necwLC9k9z/V4FCv5R76OZfSRq2hNq/2CsGx9wWPL4FNIviW qzDiAxLY3+kSLd4fUWzSBSPBYefknB0lBhZ45Gkwl6AHWys= X-Google-Smtp-Source: ABdhPJxxw7jTLfGMJSrhlEoHETX2KMsBFHmVbHxbSARbm6fETXlbRE3zRYKp1JbDSomKq1tgcQOU9AnlRwbcV4Zcb7g= X-Received: by 2002:a9d:7982:: with SMTP id h2mr8331751otm.291.1626451912293; Fri, 16 Jul 2021 09:11:52 -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: <20210716155004.d2qiciqkipmegs3j@FreeBSDY540> In-Reply-To: <20210716155004.d2qiciqkipmegs3j@FreeBSDY540> From: Alan Somers Date: Fri, 16 Jul 2021 10:11:41 -0600 Message-ID: Subject: Re: PATH: /usr/local before or after /usr ? To: me@cameronkatri.com Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000007a0e3805c73fd860" X-Rspamd-Queue-Id: 4GRGTQ6P7Pz4k4g X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: Y --0000000000007a0e3805c73fd860 Content-Type: text/plain; charset="UTF-8" On Fri, Jul 16, 2021 at 9:54 AM Cameron Katri via freebsd-current < freebsd-current@freebsd.org> wrote: > On Fri, Jul 16, 2021 at 09:01:49AM -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? > > The biggest example I can think of this being a problem is having > binutils installed, it will cause any calls to elftoolchain or > llvm-binutils to go to GNU binutils which is platform specific, so cross > compiling, or LTO could be broken because of using GNU binutils which > don't support cross compiling or LTO. > > - Cameron Katri > > > -Alan > Ugh, that's a good example. I was thinking more about interactive programs, like say /usr/bin/vi vs editors/vim. Hypothetically how would one solve the conflict if /usr/local/bin came before /usr/bin ? Install binutils's binaries to /usr/local/libexec/binutils/ ? But a lot of ports depend on binutils. That would be a ton of ports to update. BTW my motivation for this thread is a new replacement for gstat that I'm working on. I would like to name it "gstat", but if /usr/sbin must come before /usr/local/sbin, then that won't be a very helpful name. -Alan --0000000000007a0e3805c73fd860--