Bug 1536154

Summary: go get functionality broken in devtools/go-toolset-7-rhel7 container
Product: DevTools Reporter: Deepu K S <dkochuka>
Component: golangAssignee: Jakub Čajka <jcajka>
Status: CLOSED ERRATA QA Contact: Edjunior Barbosa Machado <emachado>
Severity: high Docs Contact: Vladimír Slávik <vslavik>
Priority: unspecified    
Version: go-toolset-7CC: dkochuka, emachado, jcajka, jistone, kanderso, law
Target Milestone: rc   
Target Release: 2018.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: go-toolset-7-golang-1.8.5-2.el7 Doc Type: Bug Fix
Doc Text:
Previously, the *go-toolset-7-golang* package did not specify *git* as its dependency. As a consequence, the `go get` command failed in minimal environments without `git` when a git repository was specified as the import source. The *git* package has been added as a dependency to *go-toolset-7-golang* and the problem no longer occurs.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-03 03:58:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Deepu K S 2018-01-18 17:53:29 UTC
Description of problem:
go get functionality broken in devtools golang container on registry.access.redhat.com/devtools/go-toolset-7-rhel7

When a `go get` command is invoked, Go is unable to get packages for our application sources from Github/Gitlab/Bitbucket/Bazaar because the revision control system executables are not present.

bash-4.2$ go get github.com/golang/example/hello
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/golang/example/hello: exec: "git": executable file not found in $PATH

Version-Release number of selected component (if applicable):
Red Hat Developer Toolset 7.0
registry.access.redhat.com/devtools/go-toolset-7-rhel7:latest

How reproducible:
Always

Steps to Reproduce:
1. Download/Install from Git and Bazaar revision control systems into the Docker image.
2. $ go get github.com/golang/example/hello


Actual results:
# docker exec -it go-toolset-7 bash

bash-4.2$ export GOPATH=/opt/app-root 
bash-4.2$ go get github.com/golang/example/hello
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/golang/example/hello: exec: "git": executable file not found in $PATH
bash-4.2$ which git
which: no git in (/opt/rh/go-toolset-7/root/usr/bin:/opt/rh/go-toolset-7/root/usr/sbin:/opt/app-root/src/bin:/opt/app-root/bin:/opt/rh/go-toolset-7/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
bash-4.2$ rpm -qa | grep -i git
bash-4.2$ 


Expected results:
Should be able to get sources from git repos.

Additional info:

Comment 1 Deepu K S 2018-01-18 17:58:59 UTC
The go-toolset-7-golang rpms too might require a "Requires: git" in its SPEC.

The --requires to rpm doesn't show a requirement for git added.

$ rpm -q go-toolset-7-golang-bin-1.8.3-4.el7.x86_64 --requires
go-toolset-7-go = 1.8.3-4.el7
glibc
/usr/bin/gcc
go-toolset-7-runtime
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadIsXz) <= 5.2-1

Comment 2 Jakub Čajka 2018-01-18 19:53:42 UTC
Thank you for filing this bug report. As this package is a Technology Preview, we cannot   commit to fixing bugs or providing support (see https://access.redhat.com/support/offerings/techpreview). That said, we actively want your feedback on using these tools for future releases, and that may result in us resolving your reported issue or filing a corresponding bug with the corresponding upstream project. In the case of bugs, adding relevant information to your report together with a self-contained test case and instructions on how to easily reproduce the issue will allow us to take a look at your feedback. Thanks for your feedback.

 - Red Hat Engineering Team

Comment 10 errata-xmlrpc 2018-05-03 03:58:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:1304