Bugfix/update go packages (#2369)

* Update go-bootstrap package

The last C based Go src tree was the 1.4 series.  For a while they
were cutting new releases so that people could bootstrap from a C only
system.  Now they're recommending that you either use the release-1.4
branch or that you use a date-stamped tarball that they'll produce on
an as-needed basis.

There are several issues that keep 1.4.2 from building on a CentOS 7
system.

I've switched to the date based tarball.

The cgo bits were also mis-behaving, but they're not needed for the
bootstrapping task so I've set an environment variable that disables
them.

Details [on the install-from-source
page](https://golang.org/doc/install/source#go14) and these issues:

- https://github.com/golang/go/issues/17545
- https://github.com/golang/go/issues/16352.

* Update go package

Switched from pulling from the git repository to using the source
tarballs and added digest values.

Added support for 1.7.3, continued supporting 1.6.2, including patches
for a couple of problems (details in
[17545](https://github.com/golang/go/issues/17545) and
[17986](https://github.com/golang/go/issues/17986).

Dropped support for 1.5.4 and 1.4.2 because they no longer pass their
tests and the patches above to not apply.
This commit is contained in:
George Hartzell
2016-11-24 12:25:51 -08:00
committed by Todd Gamblin
parent 11bfccd53f
commit cde8f697a9
4 changed files with 49 additions and 8 deletions

View File

@@ -41,14 +41,17 @@ class GoBootstrap(Package):
extendable = True
# NOTE: Go@1.4.2 is the only supported bootstrapping compiler because all
# NOTE: Go@1.4.x is the only supported bootstrapping compiler because all
# later versions require a Go compiler to build.
# See: https://golang.org/doc/install/source
version('1.4.2', git='https://go.googlesource.com/go', tag='go1.4.2')
# See: https://golang.org/doc/install/source#go14 and
# https://github.com/golang/go/issues/17545 and
# https://github.com/golang/go/issues/16352
version('1.4-bootstrap-20161024', '76e42c8152e8560ded880a6d1d1f53cb',
url='https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz')
variant('test', default=True, description='Build and run tests as part of the build.')
provides('golang@:1.4.2')
provides('golang@:1.4-bootstrap-20161024')
depends_on('git', type='alldeps')
@@ -69,6 +72,7 @@ def patch(self):
pass
def install(self, spec, prefix):
env['CGO_ENABLED'] = '0'
bash = which('bash')
with working_dir('src'):
bash('{0}.bash'.format('all' if '+test' in spec else 'make'))