~/.local/bin is missing in default PATH on Guix System

DoneSubmitted by pelzflorian (Florian Pelz).
Details
6 participants
  • Giovanni Biscuolo
  • Jesse Gibbons
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
  • pelzflorian (Florian Pelz)
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
P
P
pelzflorian (Florian Pelz) wrote on 23 May 2019 14:27
(address . bug-guix@gnu.org)
20190523122715.2oncjxqvpkl2ylbw@pelzflorian.localdomain
~/.local/bin should be added to the PATH environment variable bydefault, seehttps://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path.
Regards,Florian
R
R
Ricardo Wurmus wrote on 23 May 2019 16:17
(address . pelzflorian@pelzflorian.de)(address . 35864@debbugs.gnu.org)
87ef4pgsql.fsf@elephly.net
pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de> writes:
Toggle quote (4 lines)> ~/.local/bin should be added to the PATH environment variable by> default, see> <https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path>.
They say that this is specified in the systemd file-hierarchyspecification. We already ignore most of this specification (see anyentry mentioning /usr, for example).
I think we can safely ignore this specification.
--Ricardo
T
T
Tobias Geerinckx-Rice wrote on 23 May 2019 16:55
(address . 35864@debbugs.gnu.org)
877eahrzj3.fsf@nckx
pelzflorian (Florian Pelz) wrote:
Toggle quote (3 lines)> ~/.local/bin should be added to the PATH environment variable by> default, see
So ~/.local/bin is a relatively recent systemd thing[1], replacing the conventional ~/bin.
My theory is that it's intended for users of graphical file browsers (where the traditional ~/bin is a bit too prominent even for my tastes), but I use it too.
It's trivial to augment $PATH yourself, whether or not your distribution is systemd-based.
Toggle quote (2 lines)> https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path.
That link doesn't support adding (or not adding) it.
Kind regards,
T G-R
[1]: https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXOa0YAAKCRANsP+IT1VteZ+aAQDQF7kM5cXgWLtH7uWn8iVJnkx77hqXbyWe45z7cv6vdwD/W4SZ/y9eS9QYPxYzNP1OQVR1fNNuxbXw5/01MN0TUwM==1Lk/-----END PGP SIGNATURE-----
P
P
pelzflorian (Florian Pelz) wrote on 23 May 2019 17:31
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 35864@debbugs.gnu.org)
20190523153138.6kspxwfzeisntll5@pelzflorian.localdomain
On Thu, May 23, 2019 at 04:17:38PM +0200, Ricardo Wurmus wrote:
Toggle quote (15 lines)> > pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de> writes:> > > ~/.local/bin should be added to the PATH environment variable by> > default, see> > <https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path>.> > They say that this is specified in the systemd file-hierarchy> specification. We already ignore most of this specification (see any> entry mentioning /usr, for example).> > I think we can safely ignore this specification.>

Adding ~/.local/bin to the PATH is common on other distros. Whencompiling and installing software as a user without making a packagefor it, I want to configure it with --prefix=$HOME/.local so I caninstall without sudo. Then I want to be able to run:
myprog
instead of
PATH=$HOME/.local/bin myprog
In particular, I want instructions to work on all distros, even thoughDebian failed/fails to do this at the moment too.
Regards,Florian
P
P
pelzflorian (Florian Pelz) wrote on 23 May 2019 17:54
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 35864@debbugs.gnu.org)
20190523155436.7x254ntzhbxtuzwl@pelzflorian.localdomain
On Thu, May 23, 2019 at 04:55:28PM +0200, Tobias Geerinckx-Rice wrote:
Toggle quote (5 lines)> > https://unix.stackexchange.com/questions/316765/which-distributions-have-home-local-bin-in-path.> > That link doesn't support adding (or not adding) it.>
The people who responded accept that it is a bug in Ubuntu.
Regards,Florian
T
T
Tobias Geerinckx-Rice wrote on 23 May 2019 21:31
(address . bug-guix@gnu.org)
87lfyxvuip.fsf@nckx
pelzflorian (Florian Pelz) wrote:
Toggle quote (2 lines)> Adding ~/.local/bin to the PATH is common on other distros.
This is what still needs to be established: is it? Which ones? Is it merely a side-effect of them using systemd? And most crucially: does it mean that Guix needs to add it too? What about ~/bin?
I'm was just interested in the (ideally: your) arguments for doing so, not a link to a discussion site. If it really breaks things that should work, I'm all in favour of adding it to the default skeleton, if not /etc/profile itself.
Toggle quote (12 lines)> When compiling and installing software as a user without making > a package> for it, I want to configure it with --prefix=$HOME/.local so I > can> install without sudo. Then I want to be able to run:>> myprog>> instead of>> PATH=$HOME/.local/bin myprog
You can already easily add custom directories to $PATH in your .bash_profile, if my understanding of bash's complicated set of configuration files is still accurate. That's where I set it, anyway:
~ λ grep PATH= .bash_profile PATH="$HOME/.local/bin:$PATH"
and it's always worked fine. :-)
Kind regards,
T G-R
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXOb0/QAKCRANsP+IT1VteRVEAQCW6O5vMC4nCenD5udUlVywc2jRurTyGunBDBhsokXU0AD/ed30pQt7HUa1ruJsA1CUWwArBX7G/SIrVQwQXMJO7QE==fPsf-----END PGP SIGNATURE-----
T
T
Tobias Geerinckx-Rice wrote on 23 May 2019 21:35
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 35864@debbugs.gnu.org)
87imu1vu9z.fsf@nckx
pelzflorian (Florian Pelz) wrote:
Toggle quote (4 lines)>> That link doesn't support adding (or not adding) it.>> The people who responded accept that it is a bug in Ubuntu.
Whoa! This is not a fair summary. The only ‘bug’ there is that Ubuntu (and RHEL's?) *implementation* was buggy, nothing more.
Nowhere is it implied that a distribution not adding .local/bin to people's PATH is in any way ’buggy’.
Kind regards,
T G-R
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXOb1+AAKCRANsP+IT1VteV7iAQCo74UdYoPkkTolNzOx1vCFFCQ9kgvOTa30UYyHIlf0YgD/ZPFR8Tw1kCgfRskSSY4sJc4OcE9PnkzsZ66KSFAKNww==OiyM-----END PGP SIGNATURE-----
J
J
Jesse Gibbons wrote on 23 May 2019 21:55
bug#35864: ~/.local/bin is missing in default PATH on Guix System
(address . 35864@debbugs.gnu.org)
20190523135536.0eb85962@gmail.com
(from the digest)
Toggle quote (29 lines)>Date: Thu, 23 May 2019 17:31:38 +0200>From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>>To: Ricardo Wurmus <rekado@elephly.net>>Cc: 35864@debbugs.gnu.org>Subject: bug#35864: ~/.local/bin is missing in default PATH on Guix> System>Message-ID: <20190523153138.6kspxwfzeisntll5@pelzflorian.localdomain>>Content-Type: text/plain; charset=us-ascii>>[...]>>Adding ~/.local/bin to the PATH is common on other distros. When>compiling and installing software as a user without making a package>for it, I want to configure it with --prefix=$HOME/.local so I can>install without sudo. Then I want to be able to run:>>myprog>>instead of>>PATH=$HOME/.local/bin myprog>>In particular, I want instructions to work on all distros, even though>Debian failed/fails to do this at the moment too.>>Regards,>Florian>
I personally think including $HOME/.local/bin in PATH by default isunnecessary because the Guix package manager lets non-root usersinstall packages and installs from source with the --no-substitutesoption. However if some people don't want take the time to write anddebug a package definition for programs they want to install that arenot included in guix by default, installing to $HOME/.local remains avalid option.
The simplest way to resolve this is probably to include it in theskeleton folder in your OS definition (flexible design FTW, am Iright?). Maybe there can be a service to allow this option withouteveryone who wants it writing the code themselves?
P
P
pelzflorian (Florian Pelz) wrote on 24 May 2019 00:36
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 35864@debbugs.gnu.org)
20190523223614.rl2hqtdknhidmccx@pelzflorian.localdomain
On Thu, May 23, 2019 at 09:31:09PM +0200, Tobias Geerinckx-Rice wrote:
Toggle quote (8 lines)> pelzflorian (Florian Pelz) wrote:> > Adding ~/.local/bin to the PATH is common on other distros.> > This is what still needs to be established: is it? Which ones? Is it merely> a side-effect of them using systemd? And most crucially: does it mean that> Guix needs to add it too? What about ~/bin?>
My motivation was that I would have liked a uniform standard to existfor offering uniform, simple compilation instructions in tutorialslike minehttps://pelzflorian.de/gui-prog-gtk-2017/handout-05-meson-en.pdf orfor how-to-install sections in software project README files. Itherefore believe such standardization efforts should be supported,even though Guix has good reason to ignore some other aspects of thefile-system hierarchy standard.
I checked now and systemd Parabola iso images and installed systems donot include ~/.local/bin; neither does an installed Arch system Ilooked at, despite their claim to followhttps://wiki.archlinux.org/index.php/Frequently_asked_questions#Does_Arch_follow_the_Linux_Foundation's_Filesystem_Hierarchy_Standard_(FHS)?.I believe this may have to do with their tendency to ship programsmostly like their upstream developers ship them, which would apply toGNU Guix as well. Many other distributions are discussed at mystackexchange link from before.
I did not know about ~/bin being conventional, but others mention ittoo. I do not like ~/bin for the reasons you stated:
On Thu, May 23, 2019 at 04:55:28PM +0200, Tobias Geerinckx-Rice wrote:
Toggle quote (12 lines)> My theory is that it's intended for users of graphical file browsers (where> the traditional ~/bin is a bit too prominent even for my tastes), but I use> it too.>

> I'm was just interested in the (ideally: your) arguments for doing so, not a> link to a discussion site. If it really breaks things that should work, I'm> all in favour of adding it to the default skeleton, if not /etc/profile> itself.>
I am not aware of it fixing any breakage, except Python pip accordingto the Debian bug reporthttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820856 (I did nottry to confirm this), but Guix does not (need to?) have a package forpip anyway.
Regards,Florian
P
P
pelzflorian (Florian Pelz) wrote on 24 May 2019 07:23
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 35864@debbugs.gnu.org)
20190524052324.ab5tp2xslv3g3cal@pelzflorian.localdomain
On Fri, May 24, 2019 at 12:36:14AM +0200, pelzflorian (Florian Pelz) wrote:
Toggle quote (10 lines)> My motivation was that I would have liked a uniform standard to exist> for offering uniform, simple compilation instructions in tutorials> like mine> <https://pelzflorian.de/gui-prog-gtk-2017/handout-05-meson-en.pdf> or> for how-to-install sections in software project README files. I> therefore believe such standardization efforts should be supported,> even though Guix has good reason to ignore some other aspects of the> file-system hierarchy standard.>
Currently for a simple GTK application of mine, on other distros I runit by
dont-hang
but on Guix I have to run it with:
LD_LIBRARY_PATH=/gnu/store/b9p5rhhci7w1zgvv4j0fm2izk86cgnyd-gtk+-3.24.7/lib:/gnu/store/z7myqdqz5i4ahw57l5hagdkmzwz5g2wv-pango-1.42.4/lib:/gnu/store/5yaa39a8rvq8xdv8h37n29sxfmnlcv12-atk-2.32.0/lib:/gnu/store/4d8rc6vjkhsk1b20rigz0nzl7zffn4b5-cairo-1.16.0/lib:/gnu/store/h7wv1qgpascffzi5xlpagnc0hpiv2523-gdk-pixbuf+svg-2.38.1/lib:/gnu/store/0q9pq9flr76rh4bv2524niknknnl2kvq-glib-2.56.3/lib:$LD_LIBRARY_PATH PATH=$HOME/.local/bin:$PATH dont-hang
Adding ~/.local/bin to the path would remove the small part on theright. Patching ninja could probably remove the need forLD_LIBRARY_PATH.
Regards,Florian
R
R
Ricardo Wurmus wrote on 24 May 2019 08:17
(name . pelzflorian)(address . pelzflorian@pelzflorian.de)
87sgt4fkbd.fsf@elephly.net
pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de> writes:
Toggle quote (13 lines)> Currently for a simple GTK application of mine, on other distros I run> it by>> dont-hang>> but on Guix I have to run it with:>> LD_LIBRARY_PATH=/gnu/store/b9p5rhhci7w1zgvv4j0fm2izk86cgnyd-gtk+-3.24.7/lib:/gnu/store/z7myqdqz5i4ahw57l5hagdkmzwz5g2wv-pango-1.42.4/lib:/gnu/store/5yaa39a8rvq8xdv8h37n29sxfmnlcv12-atk-2.32.0/lib:/gnu/store/4d8rc6vjkhsk1b20rigz0nzl7zffn4b5-cairo-1.16.0/lib:/gnu/store/h7wv1qgpascffzi5xlpagnc0hpiv2523-gdk-pixbuf+svg-2.38.1/lib:/gnu/store/0q9pq9flr76rh4bv2524niknknnl2kvq-glib-2.56.3/lib:$LD_LIBRARY_PATH PATH=$HOME/.local/bin:$PATH dont-hang>> Adding ~/.local/bin to the path would remove the small part on the> right. Patching ninja could probably remove the need for> LD_LIBRARY_PATH.
Specifying the RUNPATH during compilation would allow you to get rid ofLD_LIBRARY_PATH. What build system are you using?
-- Ricardo
G
G
Giovanni Biscuolo wrote on 24 May 2019 08:49
(address . 35864@debbugs.gnu.org)
87d0k85oud.fsf@roquette.mug.biscuolo.net
Hi Florian,
this is not a bug, it's a feature :-)
the "semantic" reason not to include ~/.local/bin in default path is toclearly state "use Guix" (even on foreign distros) to allow users toinstall packages and avoid the ~/<something>/bin _broken_ workaround
IMHO at most ~/.local/bin is useful for user written scripts (but Iprefer ~/bin for mine)
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
Toggle quote (4 lines)> On Thu, May 23, 2019 at 09:31:09PM +0200, Tobias Geerinckx-Rice wrote:>> pelzflorian (Florian Pelz) wrote:>> > Adding ~/.local/bin to the PATH is common on other distros.
[...]
Toggle quote (3 lines)> My motivation was that I would have liked a uniform standard to exist> for offering uniform, simple compilation instructions
I can't understand what ~/.local/bin have to do with *compilation*: doyou mean installation?
...and AFAIU no distribution on earth install packages (or links) in~/.local/bin
Guix deploys in ~/.guix-profile/bin/ linking from the store... and it'sawesome :-)
[...]
Toggle quote (2 lines)> for how-to-install sections in software project README files.
It's easier to add instructions on how to add ~/.local/bin in $PATH, no?:-)
anyway software projects that want to help users to install (withoutroot permissions) in a sane way should define a Guix package, no moreworkarounds please
[...]
Toggle quote (3 lines)> Many other distributions are discussed at my stackexchange link from> before.
not Guix nor Nix, IMHO it's because they choose to depart from theproblematic FSH and derivatives long time ago and for this reason theyare generally ignored when discussing FSH issues
Toggle quote (3 lines)> I did not know about ~/bin being conventional, but others mention it> too. I do not like ~/bin for the reasons you stated:
do you mean you don't like it because it's not hidden? :-)
I don't like ~/.local/bin because it's ".local":
«Care should be taken when placing architecture-dependent binaries inthis place, which might be problematic if the home directory is sharedbetween multiple hosts with different architectures.»(from [1])
[...]
last but not least, probably systemd file-hieracy [1] is one of the*problematic* things of systemd ecosystem we should avoid
...I even ignored the existance of systemd file-hieracy: an init systemdefining a filesystem hieracy standard: mumble...



Happy hacking! Gio'.


[1] https://www.freedesktop.org/software/systemd/man/file-hierarchy.html
-- Giovanni Biscuolo
Xelera IT Infrastructures
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAlznk/oACgkQ030Op87MORKFSg/8Ci8H1i06LfM3tiVkzp1CeoU8X+JLA/83R/51YloDUwrzMePCkCFw/Mf78R1fxFXR00QQ7+n1AsaB6Yu/KqYNm/x4STlabj9RSdno5wHxNFloU5DeOv6+NblDlozoJDVXiwtD7XNrV3p7kSr/KxGMpuxswlvIrYzL9Ujcuwj0ZYVbMsF5fIUey1e8cEK1Wniw9EoeEU560yBuk85r5g85f7MSEqHvQCujh9zNJy6RHSbyrcPwxOIj5JvlJJXnJM0UCBZEcNP7ikIE2o0QusFQlKqdpKM1bdoFAavC9XaA7yRct3DBBSQ+DrB2njIKpnEstHGnkzZv/3G1fpbVfr4PrYWgG9uw34iUUkSdVFTcYDrtlQ3ddF9zbeIUcbyVCIgQot4QI8R2LSkgS4vlbCYfADiO19kMAGvlcslU378m9v29yg9Avu0JRp6AjmtFXAVQopTCdNAUXsTYYNpB8+mPTrBj+EvPLVz/pUO9M2Aq2VWLypjL2qLd0G6xChLMTL7X7gdTIu8N+YY3YJq/5X8/WFweMR1C0SIMOCpVf+0uYRQB1y7AuH2VLFbWkGD9d5xwtWTfiNip2CCBnpFVOV/18SezVD3OGttsf0vRVKQ3mkvnZ+yiQzeYkoe4UBSaXbCE4kgk0efQvPeR4gWXdH/S4/ZvSCXxt4PMrmgVSLMN2LE==8gTm-----END PGP SIGNATURE-----
P
P
pelzflorian (Florian Pelz) wrote on 24 May 2019 12:34
(name . Giovanni Biscuolo)(address . g@xelera.eu)
20190524103408.rfweixccwqroqgpl@pelzflorian.localdomain
On Fri, May 24, 2019 at 08:49:30AM +0200, Giovanni Biscuolo wrote:
Toggle quote (16 lines)> the "semantic" reason not to include ~/.local/bin in default path is to> clearly state "use Guix" (even on foreign distros) to allow users to> install packages and avoid the ~/<something>/bin _broken_ workaround>> IMHO at most ~/.local/bin is useful for user written scripts (but I> prefer ~/bin for mine)>> […]> ...and AFAIU no distribution on earth install packages (or links) in> ~/.local/bin> […]> anyway software projects that want to help users to install (without> root permissions) in a sane way should define a Guix package, no more> workarounds please

~/.local/bin is useful for projects at the inception / hacky stage tooor for developers or when they have not been packaged for Guix yet,but yes, also for user-written scripts.



Toggle quote (11 lines)> Guix deploys in ~/.guix-profile/bin/ linking from the store... and it's> awesome :-)> > [...]> > > for how-to-install sections in software project README files.> > It's easier to add instructions on how to add ~/.local/bin in $PATH, no?> :-)>
Only because not all distros respect ~/.local/bin. I would preferignoring distros that do not respect ~/.local/bin when writing READMEsrather than complicating READMEs.


Toggle quote (9 lines)> > I did not know about ~/bin being conventional, but others mention it> > too. I do not like ~/bin for the reasons you stated:> > do you mean you don't like it because it's not hidden? :-)>> I don't like ~/.local/bin because it's ".local":>

Yes; it mixes with the user’s documents.

Toggle quote (6 lines)> «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.»> (from [1])>
This is seldom relevant.

Toggle quote (6 lines)> [...]> > last but not least, probably systemd file-hieracy [1] is one of the> *problematic* things of systemd ecosystem we should avoid>
This is not a fair argument against ~/.local/bin in PATH.
Regards,Florian
P
P
pelzflorian (Florian Pelz) wrote on 24 May 2019 12:36
(name . Ricardo Wurmus)(address . rekado@elephly.net)
20190524103616.mwsfdafbivornmet@pelzflorian.localdomain
On Fri, May 24, 2019 at 08:17:10AM +0200, Ricardo Wurmus wrote:
Toggle quote (20 lines)> > pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de> writes:> > > Currently for a simple GTK application of mine, on other distros I run> > it by> >> > dont-hang> >> > but on Guix I have to run it with:> >> > LD_LIBRARY_PATH=/gnu/store/b9p5rhhci7w1zgvv4j0fm2izk86cgnyd-gtk+-3.24.7/lib:/gnu/store/z7myqdqz5i4ahw57l5hagdkmzwz5g2wv-pango-1.42.4/lib:/gnu/store/5yaa39a8rvq8xdv8h37n29sxfmnlcv12-atk-2.32.0/lib:/gnu/store/4d8rc6vjkhsk1b20rigz0nzl7zffn4b5-cairo-1.16.0/lib:/gnu/store/h7wv1qgpascffzi5xlpagnc0hpiv2523-gdk-pixbuf+svg-2.38.1/lib:/gnu/store/0q9pq9flr76rh4bv2524niknknnl2kvq-glib-2.56.3/lib:$LD_LIBRARY_PATH PATH=$HOME/.local/bin:$PATH dont-hang> >> > Adding ~/.local/bin to the path would remove the small part on the> > right. Patching ninja could probably remove the need for> > LD_LIBRARY_PATH.> > Specifying the RUNPATH during compilation would allow you to get rid of> LD_LIBRARY_PATH. What build system are you using?>
Yes. I am using Meson. I would like instructions like minehttps://pelzflorian.de/git/dont-hang/tree/README to work becausethey work on other distros.
Regards,Florian
L
L
Ludovic Courtès wrote on 2 Jun 2019 21:58
control message for bug #35864
(address . control@debbugs.gnu.org)
87zhmz7o9d.fsf@gnu.org
tags 35864 notabugclose 35864quit
?
Your comment

This issue is archived.

To comment on this conversation send email to 35864@debbugs.gnu.org