Skip to content

Commit

Permalink
project: use vndr for vendoring
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Morozov <[email protected]>
  • Loading branch information
LK4D4 committed Nov 3, 2016
1 parent f54339d commit f2614f2
Show file tree
Hide file tree
Showing 2,107 changed files with 99,970 additions and 26,269 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd6
| tar -xzC /usr/local

ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
ENV GOPATH /go

# Compile Go for cross compilation
ENV DOCKER_CROSSPLATFORMS \
Expand Down Expand Up @@ -222,10 +222,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
hello-world:latest@sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)

# Install tomlv, runc, containerd, grimes, docker-proxy
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
# Please edit hack/dockerfile/install-binaries.sh to update them.
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
RUN /tmp/install-binaries.sh tomlv runc containerd grimes proxy
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy

# Wrap all commands in the "docker-in-docker" script to allow nested containers
ENTRYPOINT ["hack/dind"]
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ RUN mkdir /usr/src/go && curl -fsSL https://storage.googleapis.com/golang/go${GO
&& GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash

ENV PATH /usr/src/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
ENV GOPATH /go

# Only install one version of the registry, because old version which support
# schema1 manifests is not working on ARM64, we should skip integration-cli
Expand Down Expand Up @@ -160,10 +160,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
aarch64/hello-world:latest@sha256:65a4a158587b307bb02db4de41b836addb0c35175bdc801367b1ac1ddeb9afda
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)

# Install tomlv, runc, containerd, grimes, docker-proxy
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
# Please edit hack/dockerfile/install-binaries.sh to update them.
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
RUN /tmp/install-binaries.sh tomlv runc containerd grimes proxy
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy

# Wrap all commands in the "docker-in-docker" script to allow nested containers
ENTRYPOINT ["hack/dind"]
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ENV GO_VERSION 1.7.3
RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-armv6l.tar.gz" \
| tar -xzC /usr/local
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
ENV GOPATH /go

# We're building for armhf, which is ARMv7, so let's be explicit about that
ENV GOARCH arm
Expand Down Expand Up @@ -164,10 +164,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
armhf/hello-world:latest@sha256:161dcecea0225975b2ad5f768058212c1e0d39e8211098666ffa1ac74cfb7791
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)

# Install tomlv, runc, containerd, grimes, docker-proxy
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
# Please edit hack/dockerfile/install-binaries.sh to update them.
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
RUN /tmp/install-binaries.sh tomlv runc containerd grimes proxy
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy

ENTRYPOINT ["hack/dind"]

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.ppc64le
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ RUN set -x \

ENV GOROOT_BOOTSTRAP /usr/local/go
ENV PATH /usr/local/go/bin/:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
ENV GOPATH /go

# Dependency for golint
ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3
Expand Down Expand Up @@ -183,10 +183,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
ppc64le/hello-world:latest@sha256:186a40a9a02ca26df0b6c8acdfb8ac2f3ae6678996a838f977e57fac9d963974
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)

# Install tomlv, runc, containerd, grimes, docker-proxy
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
# Please edit hack/dockerfile/install-binaries.sh to update them.
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
RUN /tmp/install-binaries.sh tomlv runc containerd grimes proxy
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy

# Wrap all commands in the "docker-in-docker" script to allow nested containers
ENTRYPOINT ["hack/dind"]
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.s390x
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-s390
| tar -xzC /usr/local

ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
ENV GOPATH /go

# Dependency for golint
ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3
Expand Down Expand Up @@ -175,10 +175,10 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \
s390x/hello-world:latest@sha256:780d80b3a7677c3788c0d5cd9168281320c8d4a6d9183892d8ee5cdd610f5699
# See also "hack/make/.ensure-frozen-images" (which needs to be updated any time this list is)

# Install tomlv, runc, containerd, grimes, docker-proxy
# Install tomlv, vndr, runc, containerd, grimes, docker-proxy
# Please edit hack/dockerfile/install-binaries.sh to update them.
COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh
RUN /tmp/install-binaries.sh tomlv runc containerd grimes proxy
RUN /tmp/install-binaries.sh tomlv vndr runc containerd grimes proxy

# Wrap all commands in the "docker-in-docker" script to allow nested containers
ENTRYPOINT ["hack/dind"]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.simple
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ENV GO_VERSION 1.7.3
RUN curl -fsSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" \
| tar -xzC /usr/local
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go:/go/src/github.com/docker/docker/vendor
ENV GOPATH /go
ENV CGO_LDFLAGS -L/lib

# Install runc, containerd, grimes and docker-proxy
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ SHELL ["powershell", "-command"]
# - FROM_DOCKERFILE is used for detection of building within a container.
ENV GO_VERSION=1.7.3 `
GIT_LOCATION=https://github.com/git-for-windows/git/releases/download/v2.10.1.windows.1/Git-2.10.1-64-bit.exe `
GOPATH=C:\go;C:\go\src\github.com\docker\docker\vendor `
GOPATH=C:\go `
GOROOT=C:\go `
FROM_DOCKERFILE=1

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ DOCKER_MOUNT := $(if $(DOCKER_MOUNT),$(DOCKER_MOUNT),-v /go/src/github.com/docke

# enable .go-pkg-cache if DOCKER_INCREMENTAL_BINARY and DOCKER_MOUNT (i.e.DOCKER_HOST) are set
PKGCACHE_DIR := $(if $(PKGCACHE_DIR),$(PKGCACHE_DIR),.go-pkg-cache)
PKGCACHE_MAP := gopath:/go/pkg vendor:/go/src/github.com/docker/docker/vendor/pkg goroot-linux_amd64_netgo:/usr/local/go/pkg/linux_amd64_netgo
PKGCACHE_MAP := gopath:/go/pkg goroot-linux_amd64_netgo:/usr/local/go/pkg/linux_amd64_netgo
DOCKER_MOUNT := $(if $(DOCKER_INCREMENTAL_BINARY),$(DOCKER_MOUNT) $(shell echo $(PKGCACHE_MAP) | sed -E 's@([^ ]*)@-v "$(CURDIR)/$(PKGCACHE_DIR)/\1"@g'),$(DOCKER_MOUNT))

GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
Expand Down
2 changes: 1 addition & 1 deletion daemon/logger/jsonfilelog/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"os"
"time"

"github.com/fsnotify/fsnotify"
"golang.org/x/net/context"
"gopkg.in/fsnotify.v1"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/daemon/logger"
Expand Down
148 changes: 0 additions & 148 deletions hack/.vendor-helpers.sh

This file was deleted.

9 changes: 9 additions & 0 deletions hack/dockerfile/install-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUNC_COMMIT=02f8fa7863dd3f82909a73e2061897828460d52f
CONTAINERD_COMMIT=52ef1ceb4b660c42cf4ea9013180a5663968d4c7
GRIMES_COMMIT=fe069a03affd2547fdb05e5b8b07202d2e41735b
LIBNETWORK_COMMIT=0f534354b813003a754606689722fe253101bc4e
VNDR_COMMIT=f56bd4504b4fad07a357913687fb652ee54bb3b0

RM_GOPATH=0

Expand Down Expand Up @@ -93,6 +94,14 @@ do
PROXY_LDFLAGS="-linkmode=external" install_proxy
;;

vndr)
echo "Install vndr version $VNDR_COMMIT"
git clone https://github.com/LK4D4/vndr.git "$GOPATH/src/github.com/LK4D4/vndr"
cd "$GOPATH/src/github.com/LK4D4/vndr"
git checkout -q "$VNDR_COMMIT"
go build -v -o /usr/local/bin/vndr .
;;

*)
echo echo "Usage: $0 [tomlv|runc|containerd|grimes|proxy]"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion hack/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [ "$AUTO_GOPATH" ]; then
rm -rf .gopath
mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
export GOPATH="${PWD}/.gopath:${PWD}/vendor"
export GOPATH="${PWD}/.gopath"

if [ "$(go env GOOS)" = 'solaris' ]; then
# sys/unix is installed outside the standard library on solaris
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.binary
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ go build \
$LDFLAGS
$LDFLAGS_STATIC_DOCKER
" \
$SOURCE_PATH
$GO_PACKAGE
)

echo "Created binary: $DEST/$BINARY_FULLNAME"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/binary-client
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set -e
(
source "${MAKEDIR}/.binary-setup"
export BINARY_SHORT_NAME="$DOCKER_CLIENT_BINARY_NAME"
export SOURCE_PATH='./cmd/docker'
export GO_PACKAGE='github.com/docker/docker/cmd/docker'
source "${MAKEDIR}/.binary"
)
2 changes: 1 addition & 1 deletion hack/make/binary-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e
(
source "${MAKEDIR}/.binary-setup"
export BINARY_SHORT_NAME="$DOCKER_DAEMON_BINARY_NAME"
export SOURCE_PATH='./cmd/dockerd'
export GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
source "${MAKEDIR}/.binary"
copy_binaries "$DEST" 'hash'
)
2 changes: 1 addition & 1 deletion hack/make/dynbinary-client
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

(
export BINARY_SHORT_NAME='docker'
export SOURCE_PATH='./cmd/docker'
export GO_PACKAGE='github.com/docker/docker/cmd/docker'
export IAMSTATIC='false'
export LDFLAGS_STATIC_DOCKER=''
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dynbinary-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

(
export BINARY_SHORT_NAME='dockerd'
export SOURCE_PATH='./cmd/dockerd'
export GO_PACKAGE='github.com/docker/docker/cmd/dockerd'
export IAMSTATIC='false'
export LDFLAGS_STATIC_DOCKER=''
export BUILDFLAGS=( "${BUILDFLAGS[@]/netgo /}" ) # disable netgo, since we don't need it for a dynamic binary
Expand Down
2 changes: 1 addition & 1 deletion hack/validate/pkg-imports
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ unset IFS
badFiles=()
for f in "${files[@]}"; do
IFS=$'\n'
badImports=( $(go list -e -f '{{ join .Deps "\n" }}' "$f" | sort -u | grep -vE '^github.com/docker/docker/pkg/' | grep -E '^github.com/docker/docker' || true) )
badImports=( $(go list -e -f '{{ join .Deps "\n" }}' "$f" | sort -u | grep -vE '^github.com/docker/docker/pkg/' | grep -vE '^github.com/docker/docker/vendor' | grep -E '^github.com/docker/docker' || true) )
unset IFS

for import in "${badImports[@]}"; do
Expand Down
Loading

0 comments on commit f2614f2

Please sign in to comment.