Browse code

Create "src" symlink for building notary with gcc 5

With gcc 5 version 1.4.2 of go is included. This version does not support
go's "native vendoring" which is needed to build notary since git commit
51dc1747e4ab5 ("Move the godeps workspace to the vendor directory to be
compliant with Go 1.6").

As a workaround create a symlink "vendor/src" that points to "vendor/".
This allows to compile notary with gcc 5.

Closes #22007

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>

Michael Holzheu authored on 2016/04/19 01:49:59
Showing 1 changed files
... ...
@@ -113,7 +113,7 @@ RUN set -x \
113 113
 	&& export GO15VENDOREXPERIMENT=1 \
114 114
 	&& export GOPATH="$(mktemp -d)" \
115 115
 	&& git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \
116
-	&& (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \
116
+	&& (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION" && ln -s . vendor/src) \
117 117
 	&& GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \
118 118
 		go build -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \
119 119
 	&& rm -rf "$GOPATH"