From a0a9bbd3f2b8f9c5bcf41f8acb07b32b284cbd5a Mon Sep 17 00:00:00 2001 From: Simon Ferquel Date: Wed, 6 Sep 2017 12:04:13 +0200 Subject: [PATCH 1/3] re-enable some conversion for darwin-amd64 platform Signed-off-by: Simon Ferquel (cherry picked from commit 7c9e64a2e1891bf1020d9312a18741c734fa1cd6) Signed-off-by: Eli Uriegas --- components/engine/pkg/archive/archive_unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/engine/pkg/archive/archive_unix.go b/components/engine/pkg/archive/archive_unix.go index 73814d58d6..ac4a348d5a 100644 --- a/components/engine/pkg/archive/archive_unix.go +++ b/components/engine/pkg/archive/archive_unix.go @@ -50,8 +50,8 @@ func setHeaderForSpecialDevice(hdr *tar.Header, name string, stat interface{}) ( // Currently go does not fill in the major/minors if s.Mode&unix.S_IFBLK != 0 || s.Mode&unix.S_IFCHR != 0 { - hdr.Devmajor = int64(major(s.Rdev)) - hdr.Devminor = int64(minor(s.Rdev)) + hdr.Devmajor = int64(major(uint64(s.Rdev))) // nolint: unconvert + hdr.Devminor = int64(minor(uint64(s.Rdev))) // nolint: unconvert } } From 8227e4e7393530cc168c654c53009f00257e338c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 6 Sep 2017 15:13:24 -0700 Subject: [PATCH 2/3] Fix 'make all' for other platforms Since commit d7e2c4ce7 ("Use gometalinter for linting") command "make all" fails on all the non-default platforms (i.e. ARMs, PPC, and s390) in this way: # make all ... Congratulations! All commits are properly signed with the DCO! /go/src/github.com/docker/docker/hack/validate/gometalinter: line 6: gometalinter: command not found Makefile:105: recipe for target 'all' failed make: *** [all] Error 127 Make sure gometalinter is installed for those platforms Signed-off-by: Kir Kolyshkin (cherry picked from commit 0c0047e67f8ee73f73465ac60ccebbd16260ab46) Signed-off-by: Eli Uriegas --- components/engine/Dockerfile.aarch64 | 2 +- components/engine/Dockerfile.armhf | 2 +- components/engine/Dockerfile.ppc64le | 2 +- components/engine/Dockerfile.s390x | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/engine/Dockerfile.aarch64 b/components/engine/Dockerfile.aarch64 index 5f3b25ce59..c59335b53f 100644 --- a/components/engine/Dockerfile.aarch64 +++ b/components/engine/Dockerfile.aarch64 @@ -173,7 +173,7 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ # Please edit hack/dockerfile/install-binaries.sh to update them. COPY hack/dockerfile/binaries-commits /tmp/binaries-commits COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh -RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli +RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter ENV PATH=/usr/local/cli:$PATH # Wrap all commands in the "docker-in-docker" script to allow nested containers diff --git a/components/engine/Dockerfile.armhf b/components/engine/Dockerfile.armhf index 18cd74f12f..80005bc26d 100644 --- a/components/engine/Dockerfile.armhf +++ b/components/engine/Dockerfile.armhf @@ -162,7 +162,7 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ # Please edit hack/dockerfile/install-binaries.sh to update them. COPY hack/dockerfile/binaries-commits /tmp/binaries-commits COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh -RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli +RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter ENV PATH=/usr/local/cli:$PATH ENTRYPOINT ["hack/dind"] diff --git a/components/engine/Dockerfile.ppc64le b/components/engine/Dockerfile.ppc64le index 3234239ea6..4b27236964 100644 --- a/components/engine/Dockerfile.ppc64le +++ b/components/engine/Dockerfile.ppc64le @@ -160,7 +160,7 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ # Please edit hack/dockerfile/install-binaries.sh to update them. COPY hack/dockerfile/binaries-commits /tmp/binaries-commits COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh -RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli +RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter ENV PATH=/usr/local/cli:$PATH # Wrap all commands in the "docker-in-docker" script to allow nested containers diff --git a/components/engine/Dockerfile.s390x b/components/engine/Dockerfile.s390x index 14dfd12bdb..1d36b490c2 100644 --- a/components/engine/Dockerfile.s390x +++ b/components/engine/Dockerfile.s390x @@ -153,7 +153,7 @@ RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ # Please edit hack/dockerfile/install-binaries.sh to update them. COPY hack/dockerfile/binaries-commits /tmp/binaries-commits COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh -RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli +RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter ENV PATH=/usr/local/cli:$PATH # Wrap all commands in the "docker-in-docker" script to allow nested containers From 2b763fa4807949d7b52baa66d871800f2ea1c4a5 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Fri, 1 Sep 2017 19:16:54 +0300 Subject: [PATCH 3/3] overlay gd: fix build for 32-bit ARM This commit reverts a hunk of commit 2f5f0af3f ("Add unconvert linter") and adds a hint for unconvert linter to ignore excessive conversion as it is required on 32-bit platforms (e.g. armhf). The exact error on armhf is this: 19:06:45 ---> Making bundle: dynbinary (in bundles/17.06.0-dev/dynbinary) 19:06:48 Building: bundles/17.06.0-dev/dynbinary-daemon/dockerd-17.06.0-dev 19:10:58 # github.com/docker/docker/daemon/graphdriver/overlay 19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Sec (type int32) as type int64 in argument to time.Unix 19:10:58 daemon/graphdriver/overlay/copy.go:161: cannot use stat.Atim.Nsec (type int32) as type int64 in argument to time.Unix 19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Sec (type int32) as type int64 in argument to time.Unix 19:10:58 daemon/graphdriver/overlay/copy.go:162: cannot use stat.Mtim.Nsec (type int32) as type int64 in argument to time.Unix Signed-off-by: Kir Kolyshkin (cherry picked from commit 0120303d8ea4a1d9f8920ac4dba80521072e8536) Signed-off-by: Eli Uriegas --- components/engine/daemon/graphdriver/overlay/copy.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/engine/daemon/graphdriver/overlay/copy.go b/components/engine/daemon/graphdriver/overlay/copy.go index 8c35b91ddc..f7e35e2bd3 100644 --- a/components/engine/daemon/graphdriver/overlay/copy.go +++ b/components/engine/daemon/graphdriver/overlay/copy.go @@ -157,9 +157,10 @@ func copyDir(srcDir, dstDir string, flags copyFlags) error { } // system.Chtimes doesn't support a NOFOLLOW flag atm + // nolint: unconvert if !isSymlink { - aTime := time.Unix(stat.Atim.Sec, stat.Atim.Nsec) - mTime := time.Unix(stat.Mtim.Sec, stat.Mtim.Nsec) + aTime := time.Unix(int64(stat.Atim.Sec), int64(stat.Atim.Nsec)) + mTime := time.Unix(int64(stat.Mtim.Sec), int64(stat.Mtim.Nsec)) if err := system.Chtimes(dstPath, aTime, mTime); err != nil { return err }