[MacPorts] #29906: go @57.1 Patch for GOROOT, violate_mtree, etc
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc ------------------------------------+--------------------------------------- Reporter: gaochangjian@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: haspatch | Port: go ------------------------------------+--------------------------------------- According to [http://golang.org/doc/install.html#environment official document], {{{GOROOT}}} is "the root of Go tree", it impact of linker, {{{gomake}}}, {{{godoc}}}, {{{goinstall}}} and so on. Current port sets {{{GOROOT}}} to {{{${prefix}}}} (usually {{{/opt/local}}}, through {{{GOROOT_FINAL}}} environment variable during build phase). It's inconvenient, cause we must violate the standard file hierarchy, and do some tricks like #29321. This patch try to unify the location of {{{GOROOT}}}. Meanwhile, tell user to set {{{GOBIN}}} environment variable in their shell profile, cause {{{gomake install}}} may need this. -- Ticket URL: <https://trac.macports.org/ticket/29906> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc ------------------------------------+--------------------------------------- Reporter: gaochangjian@… | Owner: singingwolfboy@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: haspatch | Port: go ------------------------------------+--------------------------------------- Changes (by jmr@…): * owner: macports-tickets@… => singingwolfboy@… Comment: Please remember to cc the maintainer. -- Ticket URL: <https://trac.macports.org/ticket/29906#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc -------------------------------------+-------------------------------------- Reporter: gaochangjian@… | Owner: singingwolfboy@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: wontfix | Keywords: haspatch Port: go | -------------------------------------+-------------------------------------- Changes (by singingwolfboy@…): * status: new => closed * resolution: => wontfix Comment: The purpose of the standard filesystem layout is to keep files of the same type together: executable files go in the bin directory, libraries go in the lib directory, and so on. Users installing Go (or any other package) from a package management system like Macports shouldn't have to modify their environment to find executables, libraries, and so on. With the notable exception of the apache2 port, all ports in Macports install into this standard hierarchy, and I see no reason to make an exception for Go -- in my opinion, the apache2 port should also be fixed to conform to this standard. If you would like your Go installation to be in /opt/local/src/go, you can certainly install Go to that directory yourself and change your environment accordingly, but I see no reason to change this for everyone else. -- Ticket URL: <https://trac.macports.org/ticket/29906#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc -------------------------------------+-------------------------------------- Reporter: gaochangjian@… | Owner: singingwolfboy@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: wontfix | Keywords: haspatch Port: go | -------------------------------------+-------------------------------------- Comment(by gaochangjian@…): Replying to [comment:1 jmr@…]:
Please remember to cc the maintainer. Sorry for about that, I will next time.
-- Ticket URL: <https://trac.macports.org/ticket/29906#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc -------------------------------------+-------------------------------------- Reporter: gaochangjian@… | Owner: singingwolfboy@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: wontfix | Keywords: haspatch Port: go | -------------------------------------+-------------------------------------- Comment(by gaochangjian@…): Replying to [comment:2 singingwolfboy@…]:
The purpose of the standard filesystem layout is to keep files of the same type together: executable files go in the bin directory, libraries go in the lib directory, and so on. Users installing Go (or any other package) from a package management system like Macports shouldn't have to modify their environment to find executables, libraries, and so on. With the notable exception of the apache2 port, all ports in Macports install into this standard hierarchy, and I see no reason to make an exception for Go -- in my opinion, the apache2 port should also be fixed to conform to this standard.
If you would like your Go installation to be in /opt/local/src/go, you can certainly install Go to that directory yourself and change your environment accordingly, but I see no reason to change this for everyone else. Actually build Go program won't need header files (*.h) and library files (*.a), they just meaningful during compile Go itself. So you could delete them safely.
As for doc directory, I'll attach another patch file. It place doc in the standard hierarchy ({{{${prefix}/share/doc/go}}}), then create one symbolic link in {{{GOROOT}}}. So we could use {{{godoc -http=:6060}}} command comfortably. Interesting thing is, another programming language port, Python, place most files in {{{${prefix}/Library/Frameworks/Python.framework}}} directory. Maybe the Go port could follow this mode. -- Ticket URL: <https://trac.macports.org/ticket/29906#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc -------------------------------------+-------------------------------------- Reporter: gaochangjian@… | Owner: singingwolfboy@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: wontfix | Keywords: haspatch Port: go | -------------------------------------+-------------------------------------- Comment(by singingwolfboy@…): Unless there's a very, very good reason, I don't want the user to have to change their environment in order to use Go. Sounds like the actual issue you're having is that running `godoc -http=:6060` doesn't work properly. At the moment, it doesn't appear that the `godoc` command accepts any way of changing the path to the Go documentation files: perhaps you should file a bug report with the developers of `godoc` requesting this feature. -- Ticket URL: <https://trac.macports.org/ticket/29906#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29906: go @57.1 Patch for GOROOT, violate_mtree, etc -------------------------------------+-------------------------------------- Reporter: gaochangjian@… | Owner: singingwolfboy@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: wontfix | Keywords: haspatch Port: go | -------------------------------------+-------------------------------------- Comment(by gaochangjian@…): Replying to [comment:5 singingwolfboy@…]:
Unless there's a very, very good reason, I don't want the user to have to change their environment in order to use Go. Sounds like the actual issue you're having is that running `godoc -http=:6060` doesn't work properly. At the moment, it doesn't appear that the `godoc` command accepts any way of changing the path to the Go documentation files: perhaps you should file a bug report with the developers of `godoc` requesting this feature. No, it's not about `godoc`, but `GOROOT`. As you know, Go commands (compiler, linker, `godoc`, `gomake`, `goinstall` etc.) rely heavily on `GOROOT` environment variable. So we need set this variable carefully and correctly. My suggestion is to set `GOROOT` to `${prefix}/src/${name}/${name}-${version}`, however, maybe we could refer to Python's mode.
P.S. `godoc` does accept way of changing the path to the `GOROOT` through `--goroot` option. -- Ticket URL: <https://trac.macports.org/ticket/29906#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts