Re: Prioritizing ~/.local/bin over /usr/bin on the PATH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> From: "Daniel P. Berrangé" <berrange@xxxxxxxxxx>
> To: "Development discussions related to Fedora" <devel@xxxxxxxxxxxxxxxxxxxxxxx>
> Cc: "Kamil Dudka" <kdudka@xxxxxxxxxx>
> Sent: Wednesday, May 2, 2018 4:49:18 PM
> Subject: Re: Prioritizing ~/.local/bin over /usr/bin on the PATH
> 
> On Wed, May 02, 2018 at 10:35:28AM -0400, Siteshwar Vashisht wrote:
> > 
> > 
> > ----- Original Message -----
> > > From: "Tomas Orsava" <torsava@xxxxxxxxxx>
> > > To: "Development discussions related to Fedora"
> > > <devel@xxxxxxxxxxxxxxxxxxxxxxx>, "David Kaspar" <dkaspar@xxxxxxxxxx>,
> > > "Kamil Dudka" <kdudka@xxxxxxxxxx>, "Miro Hrončok" <mhroncok@xxxxxxxxxx>,
> > > "Petr Viktorin" <pviktori@xxxxxxxxxx>,
> > > "Siteshwar Vashisht" <svashish@xxxxxxxxxx>
> > > Sent: Wednesday, May 2, 2018 3:23:10 PM
> > > Subject: Prioritizing ~/.local/bin over /usr/bin on the PATH
> > > 
> > > Hi!
> > > I'd like to propose putting the ~/.local/bin in front of the /usr/bin on
> > > the PATH.
> > > 
> > > Currently /usr/bin has priority over ~/.local/bin, which causes a [bug]
> > > where the old system-installed executable written in Python (from
> > > /usr/bin) is launched, but it finds new Python sources (installed into
> > > $HOME) which it doesn't work with and crashes.
> > > 
> > > [bug] https://bugzilla.redhat.com/show_bug.cgi?id=1571650
> > > 
> > > I believe the current configuration breaks the intuitive expectation
> > > that things installed closer to the user should take priority. That's
> > > for example how it works with Python.
> > > Interestingly, ubuntu and opensuse do not have ~/.local/bin on their
> > > PATH (though Ubuntu has ~/bin) so we can't take guidance there.
> > > 
> > > Does anyone see a reason not to prioritize ~/.local/bin over /usr/bin?
> > 
> > Most of the discussion in this thread focuses on security rather than
> > sane behavior. It is going to be a system wide change. An application
> > may get affected if it depends on system provided utilites which gets
> > overridden by ~/.local/bin.
> 
> [snip]
> 
> > So this change breaks something that is outside user's installation.
> > This should happen only if a user has explicitly overriden $PATH to
> > prioritize user installation paths.
> 
> Not prioritizing user paths by default will break other things though.
> For example, python pip installations done with --user.

Things may break both ways, whether you choose to prioritize user installation paths or not. I will prefer if they break when user installation paths are not prioritized.

> 
> eg.  if jenkins-job-builder is installed by RPM and the user decides to
> add a local override, the  "pip install --user jenkins-job-builder"  will
> place the new python libs + binary in $HOME/.local/{bin,lib} and will
> just work because those dirs are both searched first.
> 
> If, however, python searches $HOME/.local/lib/... first, but $PATH has
> /usr/bin first, you are going to end up with the /usr/bin/jenkins-jobs
> command from RPM using the python modules from the pip install we just
> did. This mis-match will end badly for the user.
> 
> Regards,
> Daniel
> --
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange
> |:|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com
> |:|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange
> |:|
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 

-- 
--
Siteshwar Vashisht
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux