From: John Kelly on

In my default path, I prefer "local" at the end:

/bin:/usr/bin:/usr/local/bin

Seems like most distros though, do it the other way around and put
"local" first. To me that seems like a bad idea, because you could
inadvertently, without realizing it, override system binaries.

With "local" at the end, there no danger of overriding system binaries
with some local binary of the same name. And when "local" binary names
conflict with system binaries, the local admin in control of "local" can
give local binaries unique names, or perhaps uninstall system binaries
of the same name, if they are not needed.

Other opinions?


--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: Janis Papanagnou on
On 26/06/10 18:22, John Kelly wrote:
>
> In my default path, I prefer "local" at the end:
>
> /bin:/usr/bin:/usr/local/bin
>
> Seems like most distros though, do it the other way around and put
> "local" first. To me that seems like a bad idea, because you could
> inadvertently, without realizing it, override system binaries.

But isn't that the purpose of /usr/local/bin, to override if
necessary and add new (non-standard) tools if desired? Those
local/bin directories should usually be quite empty anyway, so
name clashes should be rare and then probably intended.

>
> With "local" at the end, there no danger of overriding system binaries
> with some local binary of the same name.

With local at the end you'd have to provide the full pathname
or change your PATH if you want to access those. Changing your
PATH leaves you, again, with the undesired configuration that
you now seem to suffer from.

> And when "local" binary names
> conflict with system binaries, the local admin in control of "local" can
> give local binaries unique names, or perhaps uninstall system binaries
> of the same name, if they are not needed.
>
> Other opinions?

I prefer to be able to override system tools by tools in local,
and override local tools by those in my ~/bin. But that's on a
machine where I have full control over all bin directories. If
I'd be confronted with an admin who installs dubious software
on /usr/local/bin that name-clashes with the ones in /usr/bin
I'd redefine the PATH appropriately, or define soft links in my
~/bin. For "commercial purposes" it's good to explicitly define
the PATH in your scripts anyway!

Janis

>
>

From: Keith Keller on
On 2010-06-26, John Kelly <jak(a)isp2dial.com> wrote:
>
> In my default path, I prefer "local" at the end:
>
> /bin:/usr/bin:/usr/local/bin
>
> Seems like most distros though, do it the other way around and put
> "local" first. To me that seems like a bad idea, because you could
> inadvertently, without realizing it, override system binaries.

Alternatively, you could intentionally, with realizing it, override
system binaries.

> With "local" at the end, there no danger of overriding system binaries
> with some local binary of the same name. And when "local" binary names
> conflict with system binaries, the local admin in control of "local" can
> give local binaries unique names, or perhaps uninstall system binaries
> of the same name, if they are not needed.

Sometimes system binaries can't be uninstalled (because of local policy,
or package management, or whatever). It's handy to have a way to
override a system binary without having to modify it. A good syadmin
will use this feature sparingly but will still want it available if
needed.

--keith


--
kkeller-usenet(a)wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

From: John Kelly on
On Sat, 26 Jun 2010 18:53:10 +0200, Janis Papanagnou
<janis_papanagnou(a)hotmail.com> wrote:

>On 26/06/10 18:22, John Kelly wrote:
>>
>> In my default path, I prefer "local" at the end:
>>
>> /bin:/usr/bin:/usr/local/bin
>>
>> Seems like most distros though, do it the other way around and put
>> "local" first. To me that seems like a bad idea, because you could
>> inadvertently, without realizing it, override system binaries.
>
>But isn't that the purpose of /usr/local/bin, to override if
>necessary and add new (non-standard) tools if desired? Those
>local/bin directories should usually be quite empty anyway, so
>name clashes should be rare and then probably intended.

Makes sense if you only run a vanilla distro. But I create many local
hacks and put them in local.

>
>> With "local" at the end, there no danger of overriding system binaries
>> with some local binary of the same name.
>
>With local at the end you'd have to provide the full pathname
>or change your PATH if you want to access those. Changing your
>PATH leaves you, again, with the undesired configuration that
>you now seem to suffer from.

I didn't mean to suggest that I am having any problem with it; I'm not,
it works well for me.


>> And when "local" binary names
>> conflict with system binaries, the local admin in control of "local" can
>> give local binaries unique names, or perhaps uninstall system binaries
>> of the same name, if they are not needed.
>>
>> Other opinions?
>
>I prefer to be able to override system tools by tools in local,
>and override local tools by those in my ~/bin. But that's on a
>machine where I have full control over all bin directories. If
>I'd be confronted with an admin who installs dubious software
>on /usr/local/bin that name-clashes with the ones in /usr/bin
>I'd redefine the PATH appropriately

That's more or less my point. Admins should choose unique names for
their dubious local binaries.

Implicitly overriding system tools is dangerous. There is so much
"stuff" in a distro, can you be sure you're not stepping on something
without realizing it? I want my distro binaries to operate as the
distro intends. To override one, I use a different name, or uninstall
the distro version, if it's not needed.


--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: John Kelly on
On Sat, 26 Jun 2010 09:55:56 -0700, Keith Keller
<kkeller-usenet(a)wombat.san-francisco.ca.us> wrote:

>On 2010-06-26, John Kelly <jak(a)isp2dial.com> wrote:
>>
>> In my default path, I prefer "local" at the end:
>>
>> /bin:/usr/bin:/usr/local/bin
>>
>> Seems like most distros though, do it the other way around and put
>> "local" first. To me that seems like a bad idea, because you could
>> inadvertently, without realizing it, override system binaries.
>
>Alternatively, you could intentionally, with realizing it, override
>system binaries.

I understand that. It's a trade off.


>> With "local" at the end, there no danger of overriding system binaries
>> with some local binary of the same name. And when "local" binary names
>> conflict with system binaries, the local admin in control of "local" can
>> give local binaries unique names, or perhaps uninstall system binaries
>> of the same name, if they are not needed.
>
>Sometimes system binaries can't be uninstalled (because of local policy,
>or package management, or whatever). It's handy to have a way to
>override a system binary without having to modify it. A good syadmin
>will use this feature sparingly but will still want it available if
>needed.

I've never faced a situation where I had to do it. Somehow, I find
another way.



--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php