forked from elastic/beats-packer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Because the toolchain bootstraping process changed in Go 1.5, this change imports the "pure bootstraper" from the https://github.com/karalabe/xgo project. There's also Go 1.5 bug that required adding the `ldflags=-s` flag for OS X: golang/go#11994
- Loading branch information
Tudor Golubenco
committed
Sep 25, 2015
1 parent
c23edbd
commit c9b6975
Showing
16 changed files
with
116 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.swp | ||
*.swo | ||
/build/ | ||
/env/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# | ||
# Contains the Go tool-chain pure-Go bootstrapper, that as of Go 1.5, initiates | ||
# not only a few pre-built Go cross compilers, but rather bootstraps all of the | ||
# supported platforms from the origin Linux amd64 distribution. | ||
# | ||
# Usage: bootstrap.sh | ||
# | ||
# Needed environment variables: | ||
# FETCH - Remote file fetcher and checksum verifier (injected by image) | ||
# ROOT_DIST - 64 bit Linux Go binary distribution package | ||
# ROOT_DIST_SHA1 - 64 bit Linux Go distribution package checksum | ||
set -e | ||
|
||
# Download, verify and install the root distribution | ||
$FETCH $ROOT_DIST $ROOT_DIST_SHA1 | ||
|
||
tar -C /usr/local -xzf `basename $ROOT_DIST` | ||
rm -f `basename $ROOT_DIST` | ||
|
||
export GOROOT=/usr/local/go | ||
export GOROOT_BOOTSTRAP=$GOROOT | ||
|
||
# Pre-build all guest distributions based on the root distribution | ||
echo "Bootstrapping linux/386..." | ||
GOOS=linux GOARCH=386 CGO_ENABLED=1 go install std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM tudorg/xgo-deb6-1.4.2 | ||
FROM tudorg/xgo-deb6-1.5.1 | ||
|
||
MAINTAINER Tudor Golubenco <tudor@elastic.co> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
|
||
docker build --rm=true -t tudorg/xgo-deb6-base base/ && \ | ||
docker build --rm=true -t tudorg/xgo-deb6-1.4.2 go-1.4.2/ && | ||
docker build --rm=true -t tudorg/xgo-deb6-1.5.1 go-1.5.1/ && | ||
docker build --rm=true -t tudorg/beats-builder-deb6 beats-builder |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Go cross compiler (xgo): Go 1.5.1 layer | ||
# Copyright (c) 2014 Péter Szilágyi. All rights reserved. | ||
# | ||
# Released under the MIT license. | ||
|
||
FROM tudorg/xgo-deb6-base | ||
|
||
MAINTAINER Tudor Golubenco <tudor@elastic.co> | ||
|
||
# Configure the root Go distribution and bootstrap based on it | ||
RUN \ | ||
export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \ | ||
export ROOT_DIST_SHA1=46eecd290d8803887dec718c691cc243f2175fe0 && \ | ||
\ | ||
$BOOTSTRAP_PURE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# | ||
# Contains the Go tool-chain pure-Go bootstrapper, that as of Go 1.5, initiates | ||
# not only a few pre-built Go cross compilers, but rather bootstraps all of the | ||
# supported platforms from the origin Linux amd64 distribution. | ||
# | ||
# Usage: bootstrap.sh | ||
# | ||
# Needed environment variables: | ||
# FETCH - Remote file fetcher and checksum verifier (injected by image) | ||
# ROOT_DIST - 64 bit Linux Go binary distribution package | ||
# ROOT_DIST_SHA1 - 64 bit Linux Go distribution package checksum | ||
set -e | ||
|
||
# Download, verify and install the root distribution | ||
$FETCH $ROOT_DIST $ROOT_DIST_SHA1 | ||
|
||
tar -C /usr/local -xzf `basename $ROOT_DIST` | ||
rm -f `basename $ROOT_DIST` | ||
|
||
export GOROOT=/usr/local/go | ||
export GOROOT_BOOTSTRAP=$GOROOT | ||
|
||
# Pre-build all guest distributions based on the root distribution | ||
echo "Bootstrapping linux/386..." | ||
GOOS=linux GOARCH=386 CGO_ENABLED=1 go install std | ||
|
||
echo "Bootstrapping linux/arm..." | ||
GOOS=linux GOARCH=arm CGO_ENABLED=1 CC=arm-linux-gnueabi-gcc go install std | ||
|
||
echo "Bootstrapping windows/amd64..." | ||
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go install std | ||
|
||
echo "Bootstrapping windows/386..." | ||
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go install std | ||
|
||
echo "Bootstrapping darwin/amd64..." | ||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 CC=o64-clang go install std | ||
|
||
echo "Bootstrapping darwin/386..." | ||
GOOS=darwin GOARCH=386 CGO_ENABLED=1 CC=o32-clang go install std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM tudorg/xgo-1.4.2 | ||
FROM tudorg/xgo-1.5.1 | ||
|
||
MAINTAINER Tudor Golubenco <tudor@elastic.co> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
|
||
docker build --rm=true -t tudorg/xgo-base base/ && \ | ||
docker build --rm=true -t tudorg/xgo-1.4.2 go-1.4.2/ && | ||
docker build --rm=true -t tudorg/xgo-1.5.1 go-1.5.1/ && | ||
docker build --rm=true -t tudorg/beats-builder beats-builder |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Go cross compiler (xgo): Go 1.5.1 layer | ||
# Copyright (c) 2014 Péter Szilágyi. All rights reserved. | ||
# | ||
# Released under the MIT license. | ||
|
||
FROM tudorg/xgo-base | ||
|
||
MAINTAINER Tudor Golubenco <tudor@elastic.co> | ||
|
||
# Configure the root Go distribution and bootstrap based on it | ||
RUN \ | ||
export ROOT_DIST=https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz && \ | ||
export ROOT_DIST_SHA1=46eecd290d8803887dec718c691cc243f2175fe0 && \ | ||
\ | ||
$BOOTSTRAP_PURE |