List Info

Thread: /usr/local/bin in $PATH in system scripts?




/usr/local/bin in $PATH in system scripts?
user name
2007-04-14 16:22:50
Hi,

I'm looking for clarification of policy in the context of
this bug

https://launchpad.net/ubuntu/+source/gnome-sys
tem-tools/+bug/71336

and the fact that having your own version of Perl in
/usr/local will
almost certainly break your Ubuntu admin tools.

I have always assumed that it was safe to put whatever I
like in
/usr/local/ and my system will continue to work. This seems
to be
backed up by Debian policy

http://www.debian.org/doc/debian-policy/ch-ope
rsys.html#s-sysvinit

which contains this paragraph

"However, because /usr/local and its contents are for
exclusive use of
the local administrator, a package must not rely on the
presence or
absence of files or directories in /usr/local for normal
operation."

This seems quite sensible, otherwise it leads to mysterious
and hard
to track-down failures.

Is this ubuntu policy too?

I can't see any real benefit to including /usr/local/bin and
I can
find plenty of people in the forums who can't start
*-admin,
presumably due to problems similar to mine,

F

-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Re: /usr/local/bin in $PATH in system scripts?
country flaguser name
United States
2007-04-14 21:07:52
Fergal Daly wrote:

> I'm looking for clarification of policy in the context
of this bug
> 
> https://launchpad.net/ubuntu/+source/gnome-sys
tem-tools/+bug/71336
> 
> and the fact that having your own version of Perl in
/usr/local will
> almost certainly break your Ubuntu admin tools.

Well, perl should normally be in /usr/bin, so as long as
/usr/local/bin is
after /usr/bin, there shouldn't be a problem.
> 
> I have always assumed that it was safe to put whatever
I like in
> /usr/local/ and my system will continue to work. This
seems to be
> backed up by Debian policy
> 
> http://www.debian.org/doc/debian-policy/ch-ope
rsys.html#s-sysvinit
> 
> which contains this paragraph
> 
> "However, because /usr/local and its contents are
for exclusive use of
> the local administrator, a package must not rely on the
presence or
> absence of files or directories in /usr/local for
normal operation."

Well, that's Debian policy, not ubuntu's, but I would think
even Debian
policy collapses there if files in /usr/local are in the
path and come
before policy-required files.
-- 
derek


-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Re: /usr/local/bin in $PATH in system scripts?
user name
2007-04-15 13:32:16
On 15/04/07, Derek Broughton <newspointerstop.ca> wrote:
> Fergal Daly wrote:
>
> > I'm looking for clarification of policy in the
context of this bug
> >
> > https://launchpad.net/ubuntu/+source/gnome-sys
tem-tools/+bug/71336
> >
> > and the fact that having your own version of Perl
in /usr/local will
> > almost certainly break your Ubuntu admin tools.
>
> Well, perl should normally be in /usr/bin, so as long
as /usr/local/bin is
> after /usr/bin, there shouldn't be a problem.

Well, I agree that if it must be there it should be after
/usr/bin
however if you've installed all dependencies then everything
should be
found in /usr/bin so the /usr/local/bin would be redundant.

Either way,

find /etc/ -type f|xargs grep
"PATH=.*/usr/local/bin.*/usr/bin"

turns up 21 files in /etc that put /usr/local/bin before
/usr/bin.

> > I have always assumed that it was safe to put
whatever I like in
> > /usr/local/ and my system will continue to work.
This seems to be
> > backed up by Debian policy
> >
> > http://www.debian.org/doc/debian-policy/ch-ope
rsys.html#s-sysvinit
> >
> > which contains this paragraph
> >
> > "However, because /usr/local and its contents
are for exclusive use of
> > the local administrator, a package must not rely
on the presence or
> > absence of files or directories in /usr/local for
normal operation."
>
> Well, that's Debian policy, not ubuntu's, but I would
think even Debian
> policy collapses there if files in /usr/local are in
the path and come
> before policy-required files.

I was under the impression that Ubuntu, as a Debian
derivative, would
follow Debian policy but that is just an assumption on my
part.

I don't really know what you mean by the "policy
collapses". Do you
agree that the system tools should continue to work no
matter what I
put in /usr/local? If so, what should I do to convince the
maintainer
of gnome-system-tools (and possibly many others) to change
the PATH=
line in their script (note, I cannot post to ubuntu-devel as
only
official developers can post there). Thanks,

F

> --
> derek
>
>
> --
> ubuntu-users mailing list
> ubuntu-userslists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

>

-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Re: /usr/local/bin in $PATH in system scripts?
country flaguser name
United States
2007-04-15 19:54:17
Fergal Daly wrote:

> On 15/04/07, Derek Broughton <newspointerstop.ca> wrote:
>> Fergal Daly wrote:
>>
>> > I'm looking for clarification of policy in the
context of this bug
>> >
>> > https://launchpad.net/ubuntu/+source/gnome-sys
tem-tools/+bug/71336
>> >
>> > and the fact that having your own version of
Perl in /usr/local will
>> > almost certainly break your Ubuntu admin
tools.
>>
>> Well, perl should normally be in /usr/bin, so as
long as /usr/local/bin
>> is after /usr/bin, there shouldn't be a problem.
> 
> Well, I agree that if it must be there it should be
after /usr/bin
> however if you've installed all dependencies then
everything should be
> found in /usr/bin so the /usr/local/bin would be
redundant.

No, because none of the Ubuntu packages should rely on
anything
in /usr/local - that's for _your_ use.  I don't put much in
/usr/local, but
it's certainly not redundant (right now, for sure, I have
maven - which
isn't in Ubuntu).
> 
> Either way,
> 
> find /etc/ -type f|xargs grep
"PATH=.*/usr/local/bin.*/usr/bin"
> 
> turns up 21 files in /etc that put /usr/local/bin
before /usr/bin.

And if they have their own paths, they should work -
presumably they know
what they're doing.

>> Well, that's Debian policy, not ubuntu's, but I
would think even Debian
>> policy collapses there if files in /usr/local are
in the path and come
>> before policy-required files.
> 
> I don't really know what you mean by the "policy
collapses". Do you
> agree that the system tools should continue to work no
matter what I
> put in /usr/local? 

Yes, they should.

> If so, what should I do to convince the maintainer 
> of gnome-system-tools (and possibly many others) to
change the PATH=
> line in their script (note, I cannot post to
ubuntu-devel as only
> official developers can post there). Thanks,

File a bug in launchpad.
-- 
derek


-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Re: /usr/local/bin in $PATH in system scripts?
user name
2007-04-16 05:49:35
On 16/04/07, Derek Broughton <newspointerstop.ca> wrote:
> Fergal Daly wrote:
>
> > On 15/04/07, Derek Broughton <newspointerstop.ca> wrote:
> >> Fergal Daly wrote:
> >>
> >> > I'm looking for clarification of policy
in the context of this bug
> >> >
> >> > https://launchpad.net/ubuntu/+source/gnome-sys
tem-tools/+bug/71336
> >> >
> >> > and the fact that having your own version
of Perl in /usr/local will
> >> > almost certainly break your Ubuntu admin
tools.
> >>
> >> Well, perl should normally be in /usr/bin, so
as long as /usr/local/bin
> >> is after /usr/bin, there shouldn't be a
problem.
> >
> > Well, I agree that if it must be there it should
be after /usr/bin
> > however if you've installed all dependencies then
everything should be
> > found in /usr/bin so the /usr/local/bin would be
redundant.
>
> No, because none of the Ubuntu packages should rely on
anything
> in /usr/local - that's for _your_ use.  I don't put
much in /usr/local, but
> it's certainly not redundant (right now, for sure, I
have maven - which
> isn't in Ubuntu).

I'm not saying /usr/local/ is redundant I'm saying putting
in $PATH in
a system script redundant because everything should be found
in
/usr/bin (or /bin or whatever).

> >
> > Either way,
> >
> > find /etc/ -type f|xargs grep
"PATH=.*/usr/local/bin.*/usr/bin"
> >
> > turns up 21 files in /etc that put /usr/local/bin
before /usr/bin.
>
> And if they have their own paths, they should work -
presumably they know
> what they're doing.

Except some of them don't work, that's why I'm raising this
issue.

> >> Well, that's Debian policy, not ubuntu's, but
I would think even Debian
> >> policy collapses there if files in /usr/local
are in the path and come
> >> before policy-required files.
> >
> > I don't really know what you mean by the
"policy collapses". Do you
> > agree that the system tools should continue to
work no matter what I
> > put in /usr/local?
>
> Yes, they should.

Good. The only way to ensure that is to not put
/usr/local/bin before
all the usual system bin directories in $PATH.

> > If so, what should I do to convince the
maintainer
> > of gnome-system-tools (and possibly many others)
to change the PATH=
> > line in their script (note, I cannot post to
ubuntu-devel as only
> > official developers can post there). Thanks,
>
> File a bug in launchpad.

I did (the link is in quoted text above), the developer
disagrees with
me (and you it seems). I came here looking for backup to my
argument.
I'll try devel-discuss,

F

> --
> derek
>
>
> --
> ubuntu-users mailing list
> ubuntu-userslists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

>

-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Re: /usr/local/bin in $PATH in system scripts?
country flaguser name
Germany
2007-04-16 06:36:17
hi,
Am Samstag, den 14.04.2007, 22:22 +0100 schrieb Fergal
Daly:

>  must not rely on the presence or
> absence of files or directories in /usr/local for
normal operation."
> 
how is that related to your question about the path ? it
only says that
pakages must not rely on the presence of that dir structure,
it says
noting about what path overrides which other ... 

on a sidenote we indeed usually try to apply the debian
apckaging policy
to our packages...

ciao
	oli

-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Re: /usr/local/bin in $PATH in system scripts?
country flaguser name
Canada
2007-04-16 07:42:52
Fergal Daly wrote:

> On 16/04/07, Derek Broughton <newspointerstop.ca> wrote:
>> Fergal Daly wrote:
>>
>> No, because none of the Ubuntu packages should rely
on anything
>> in /usr/local - that's for _your_ use.  I don't put
much in /usr/local,
>> but it's certainly not redundant (right now, for
sure, I have maven -
>> which isn't in Ubuntu).
> 
> I'm not saying /usr/local/ is redundant I'm saying
putting in $PATH in
> a system script redundant because everything should be
found in
> /usr/bin (or /bin or whatever).

Well, it's never redundant to put a path statement into a
system script -
that's how you apply the policy to ensure that the script is
independent of
files in /usr/local.
>>
>> And if they have their own paths, they should work
- presumably they know
>> what they're doing.
> 
> Except some of them don't work, that's why I'm raising
this issue.

Exactly - so those would be bugs and should be reported as
such.  Having
something as "policy" implies that it's a target
that should be strived
for, not a guarantee.  
> 
>> File a bug in launchpad.
> 
> I did (the link is in quoted text above), the developer
disagrees with
> me (and you it seems). I came here looking for backup
to my argument.
> I'll try devel-discuss,

Ah, well, there's not a lot to be done when the developer
disagrees - I have
a few outstanding bugs like that (well, probably none of
them are actually
outstanding, because they tend to get marked as
"resolved")   I _do_
agree with you, fwiw.
-- 
derek


-- 
ubuntu-users mailing list
ubuntu-userslists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )