You are not logged in.

#1 2019-09-26 02:15:25

p0llard
Member
Registered: 2019-09-26
Posts: 4

Presence of ~/.local/bin on $PATH

As per the systemd file hierarchy standard, I would expect to see ~/.local/bin on the path; it seems Arch does not do this by default (looking at /etc/profile). Does anyone know if this is a deliberate design choice or a bug?

Offline

#2 2019-09-26 02:23:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Presence of ~/.local/bin on $PATH

p0llard wrote:

As per the systemd file hierarchy standard, I would expect to see ~/.local/bin on the path

Why?  What's your source for this?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-09-26 02:28:00

p0llard
Member
Registered: 2019-09-26
Posts: 4

Re: Presence of ~/.local/bin on $PATH

Perhaps I've misinterpreted, but quoting from the standard:

~/.local/bin/

    Executables that shall appear in the user's $PATH search path. It is recommended not to place executables in this directory that are not useful for invocation from a shell; these should be placed in a subdirectory of ~/.local/lib/ instead. Care should be taken when placing architecture-dependent binaries in this place, which might be problematic if the home directory is shared between multiple hosts with different architectures.

My reading of this is that the system is responsible for ensuring that anything in ~/.local/bin will appear on the path; this StackExchange post seems to agree with me.

Offline

#4 2019-09-26 02:45:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Presence of ~/.local/bin on $PATH

systemd file hierarchy wrote:

Home Directory
User applications may want to place files and directories in the user's home directory.

Arch packaging doesn't touch /home.

Arch Packaging Guidelines wrote:

Packages should not contain any of the following directories:
...
/home
...

https://wiki.archlinux.org/index.php/Ar … guidelines


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2019-09-26 02:50:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Presence of ~/.local/bin on $PATH

I do think the OP has a fair point if the word "shall" in file-hierarchy.7 is interpreted as per the definition in RFC 2119.  However, that is a difficult premise to accept given the very same usage clearly violates RFC 2119 section 6.

The "shall" should instead be "should" or perhaps just "may".  Either of those would allow arch to be compliant with the rules on PATH variables defined by the init system.  Of course that's ignoring the elephant in the room of why on earth the init system would try to dictate what should be in a PATH environment variable.

Last edited by Trilby (2019-09-26 02:54:13)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2019-09-26 03:04:06

p0llard
Member
Registered: 2019-09-26
Posts: 4

Re: Presence of ~/.local/bin on $PATH

jasonwryan wrote:

Arch packaging doesn't touch /home.

Yes, this is correct, but in my opinion part of the motivation behind the standard specifying this is to allow users to place their own scripts in ~/.local/bin; this would make particular sense on a large multi-user system where users cannot install packages, let alone touch /bin, /usr/bin, etc. Of course they can always change their shell startup scripts, etc. to add this directory to the path (or another one for that matter), but if Arch is attempting to obey this standard it seems this should be on the path; might it be appropriate to change the FAQ to reflect the fact that this particular part of the standard is not being obeyed, as well as the relevant man page?


Trilby wrote:

Of course that's ignoring the elephant in the room of why on earth the init system would try to dictate what should be in a PATH environment variable.

I don't think this is necessarily any stranger that the "init system" (since systemd, for better or for worse, has clearly surpassed this description and is will probably be an entire userspace within the next few years...) prescribing any other part of the file hierarchy.

Last edited by p0llard (2019-09-26 03:06:52)

Offline

#7 2019-09-26 03:50:00

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Presence of ~/.local/bin on $PATH

jasonwryan wrote:

Arch packaging doesn't touch /home.

Arch Packaging Guidelines wrote:

Packages should not contain any of the following directories:
...
/home
...

https://wiki.archlinux.org/index.php/Ar … guidelines

A reference to the user's /home in /etc/profile would not technically violate those guidelines though?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2019-09-26 03:59:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Presence of ~/.local/bin on $PATH

ngoonee wrote:
jasonwryan wrote:

Arch packaging doesn't touch /home.

Arch Packaging Guidelines wrote:

Packages should not contain any of the following directories:
...
/home
...

https://wiki.archlinux.org/index.php/Ar … guidelines

A reference to the user's /home in /etc/profile would not technically violate those guidelines though?

No, I guess not. But I like the fact that Arch has always left those decisions (about /home) up to me, and how I decide how I want to set things up, including PATH.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB