FS#75545 - [dotnet-host] PKGBUILD adds a non-existent and out-of-boundary folder to PATH
Attached to Project:
Community Packages
Opened by drws (drws) - Monday, 08 August 2022, 08:50 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 11 August 2022, 09:28 GMT
Opened by drws (drws) - Monday, 08 August 2022, 08:50 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 11 August 2022, 09:28 GMT
|
Details
Description:
The package provides a drop-in script for /etc/profile.d which adds "$HOME/.dotnet/tools" to PATH: https://github.com/archlinux/svntogit-community/blob/676f85c4f9cba7fd4d8faba2fa05b459a94d5fb4/trunk/dotnet.sh#L4-L9 I believe this is unclean and contrary to FHS. For example, I don't allow any binary execution in my $HOME and even if I did, I'd definitely not want to see the whole binary in the PATH. Microsoft binaries are barely welcome anywhere in my system, let alone my home folder (well, except for "$HOME/.local/share/Trash"). Setting the trash joke aside I believe the solution is somewhere along "/opt/dotnet-host/$USER/". Additional info: * package version(s) <= 6.0.6.sdk106-1 Steps to reproduce: 1. echo "$PATH" |
This task depends upon
Closed by Maxime Gauduin (Alucryd)
Thursday, 11 August 2022, 09:28 GMT
Reason for closing: Not a bug
Thursday, 11 August 2022, 09:28 GMT
Reason for closing: Not a bug
Also, forgot to mention in the description that the "$USER/.dotnet/tools" folder doesn't even exist on my system, but dotnet.sh script adds it to PATH anyway. I believe this is a second issue with the script-
[1] https://wiki.archlinux.org/title/.NET#Installation
What you propose would require users to specify `--tool-path` every time they want to install a tool and manage permissions on an outside directory themselves, that's an infinitely worse user experience compared to what's working out of the box today. Except if you noexec your home, but at this point you should know what you're doing and should be prepared to and capable of dealing with the consequences.
[0] https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools#install-a-global-tool