Red Hat Bugzilla – Bug 1298791
Go isn't installed into recommended upstream location
Last modified: 2016-01-15 04:16:21 EST
Description of problem:
Go's download page states:
"The Go binary distributions assume they will be installed in /usr/local/go [...]"
Currently the golang package installs Go into /usr/bin/.
Version-Release number of selected component (if applicable):
Name : golang
Arch : x86_64
Epoch : 0
Version : 1.5.2
Release : 2.fc23
Being Fedora a distribution that strives to be as close as possible to upstream I'm curious about the reason on why Go is installed on a different location from the one upstream expects to be installed.
Fedora's packaging guidelines are very specific about this:
- Fedora follows the Filesystem Hierarchy Standard (FHS) with regards to filesystem layout. The FHS defines where files should be placed on the system. Fedora packages must follow the FHS. Any deviation from the FHS should be rationalized when the package is reviewed.
- No Files or Directories under /srv, /usr/local, or /home/$USER
Thanks for your explanation, I will then use the above mentioned location to manually install the latest version of Go.
Just to add few bits(I had it written, but you were faster with closing the bug :))
To elaborate more 'go' binary (you mention /usr/bin, actually go tool chain including binaries, sources of packages,etc. live under GOROOT=/usr/lib/golang in Fedora) is "just another binary" provided by distribution and as so it should reside in standard location(based on respective Linux distro/FHS). Plus alternatives https://fedoraproject.org/wiki/Packaging:Alternatives complicates stuff for golang a bit as Fedora ship gcc-go(which provides go binary too).
Also as you write upstream binary distribution is assuming GOROOT/GOTOOLSDIR residing under /usr/local/go(see "go env" and rest of upstream distribution notes), that is not a case in Fedora as you see.
In the end, if you need go in /usr/local/go/ nothing prevents you from symlinking/copying Fedora's golang there(and adjusting ENV accordingly).