Signed-off-by: Daniel Nephin <dnephin@docker.com>
| ... | ... |
@@ -112,7 +112,6 @@ if [ ! "$GOPATH" ]; then |
| 112 | 112 |
exit 1 |
| 113 | 113 |
fi |
| 114 | 114 |
|
| 115 |
-DOCKER_BUILDTAGS+=" daemon" |
|
| 116 | 115 |
if ${PKG_CONFIG} 'libsystemd >= 209' 2> /dev/null ; then
|
| 117 | 116 |
DOCKER_BUILDTAGS+=" journald" |
| 118 | 117 |
elif ${PKG_CONFIG} 'libsystemd-journal' 2> /dev/null ; then
|
| ... | ... |
@@ -139,7 +138,6 @@ fi |
| 139 | 139 |
# Use these flags when compiling the tests and final binary |
| 140 | 140 |
|
| 141 | 141 |
IAMSTATIC='true' |
| 142 |
-source "$SCRIPTDIR/make/.go-autogen" |
|
| 143 | 142 |
if [ -z "$DOCKER_DEBUG" ]; then |
| 144 | 143 |
LDFLAGS='-w' |
| 145 | 144 |
fi |
| ... | ... |
@@ -1,13 +1,9 @@ |
| 1 | 1 |
#!/usr/bin/env bash |
| 2 | 2 |
set -e |
| 3 | 3 |
|
| 4 |
-[ -z "$KEEPDEST" ] && \ |
|
| 5 |
- rm -rf "$DEST" |
|
| 4 |
+[ -z "$KEEPDEST" ] && rm -rf "$DEST" |
|
| 6 | 5 |
|
| 7 | 6 |
( |
| 8 |
- source "${MAKEDIR}/.binary-setup"
|
|
| 9 |
- export BINARY_SHORT_NAME="$DOCKER_DAEMON_BINARY_NAME" |
|
| 10 |
- export GO_PACKAGE='github.com/docker/docker/cmd/dockerd' |
|
| 11 | 7 |
source "${MAKEDIR}/.binary"
|
| 12 | 8 |
copy_binaries "$DEST" 'hash' |
| 13 | 9 |
) |
| ... | ... |
@@ -1,24 +1,19 @@ |
| 1 | 1 |
#!/usr/bin/env bash |
| 2 | 2 |
set -e |
| 3 | 3 |
|
| 4 |
-# explicit list of os/arch combos that support being a daemon |
|
| 5 |
-declare -A daemonSupporting |
|
| 6 |
-daemonSupporting=( |
|
| 7 |
- [linux/amd64]=1 |
|
| 8 |
- [windows/amd64]=1 |
|
| 9 |
-) |
|
| 10 |
- |
|
| 11 | 4 |
# if we have our linux/amd64 version compiled, let's symlink it in |
| 12 | 5 |
if [ -x "$DEST/../binary-daemon/dockerd-$VERSION" ]; then |
| 13 | 6 |
arch=$(go env GOHOSTARCH) |
| 14 | 7 |
mkdir -p "$DEST/linux/${arch}"
|
| 15 | 8 |
( |
| 16 | 9 |
cd "$DEST/linux/${arch}"
|
| 17 |
- ln -s ../../../binary-daemon/* ./ |
|
| 10 |
+ ln -sf ../../../binary-daemon/* ./ |
|
| 18 | 11 |
) |
| 19 | 12 |
echo "Created symlinks:" "$DEST/linux/${arch}/"*
|
| 20 | 13 |
fi |
| 21 | 14 |
|
| 15 |
+DOCKER_CROSSPLATFORMS=${DOCKER_CROSSPLATFORMS:-"linux/amd64 windows/amd64"}
|
|
| 16 |
+ |
|
| 22 | 17 |
for platform in $DOCKER_CROSSPLATFORMS; do |
| 23 | 18 |
( |
| 24 | 19 |
export KEEPDEST=1 |
| ... | ... |
@@ -26,22 +21,9 @@ for platform in $DOCKER_CROSSPLATFORMS; do |
| 26 | 26 |
export GOOS=${platform%/*}
|
| 27 | 27 |
export GOARCH=${platform##*/}
|
| 28 | 28 |
|
| 29 |
- if [ "$GOOS" != "solaris" ]; then |
|
| 30 |
- # TODO. Solaris cannot be cross build because of CGO calls. |
|
| 31 |
- |
|
| 32 |
- echo "Cross building: $DEST" |
|
| 33 |
- # go install docker/docker/pkg packages to ensure that |
|
| 34 |
- # they build cross platform. |
|
| 35 |
- go install github.com/docker/docker/pkg/... |
|
| 36 |
- |
|
| 37 |
- if [ -n "${daemonSupporting[$platform]}" ]; then
|
|
| 38 |
- # Since tgz relies on the paths created by mkdir |
|
| 39 |
- # and we removed the clients, we don't want to mkdir |
|
| 40 |
- # for all the platforms, only the ones supported by the daemon. |
|
| 41 |
- mkdir -p "$DEST" |
|
| 42 |
- ABS_DEST="$(cd "$DEST" && pwd -P)" |
|
| 43 |
- source "${MAKEDIR}/binary-daemon"
|
|
| 44 |
- fi |
|
| 45 |
- fi |
|
| 29 |
+ echo "Cross building: $DEST" |
|
| 30 |
+ mkdir -p "$DEST" |
|
| 31 |
+ ABS_DEST="$(cd "$DEST" && pwd -P)" |
|
| 32 |
+ source "${MAKEDIR}/binary-daemon"
|
|
| 46 | 33 |
) |
| 47 | 34 |
done |
| ... | ... |
@@ -2,8 +2,6 @@ |
| 2 | 2 |
set -e |
| 3 | 3 |
|
| 4 | 4 |
( |
| 5 |
- export BINARY_SHORT_NAME='dockerd' |
|
| 6 |
- export GO_PACKAGE='github.com/docker/docker/cmd/dockerd' |
|
| 7 | 5 |
export IAMSTATIC='false' |
| 8 | 6 |
export LDFLAGS_STATIC_DOCKER='' |
| 9 | 7 |
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
|