From 528c150b8c5050ed8fb5ff2d0751dfb0e7d72626 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Fri, 1 Sep 2017 12:22:33 -0700 Subject: [PATCH 1/3] Removes engine VERSION dependency Signed-off-by: Eli Uriegas Upstream-commit: 89d8a83e20172e66c16c6ddbc46f43e5f67f7045 Component: packaging --- components/packaging/deb/common/rules | 5 ++--- components/packaging/rpm/centos-7/docker-ce.spec | 6 +++--- components/packaging/rpm/fedora-25/docker-ce.spec | 6 +++--- components/packaging/rpm/fedora-26/docker-ce.spec | 6 +++--- components/packaging/static/Makefile | 5 ++--- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/components/packaging/deb/common/rules b/components/packaging/deb/common/rules index e2962bb78e..14d91c3b21 100644 --- a/components/packaging/deb/common/rules +++ b/components/packaging/deb/common/rules @@ -1,7 +1,6 @@ #!/usr/bin/make -f VERSION ?= $(shell cat engine/VERSION) -BUNDLE_VERSION = $(shell cat engine/VERSION) SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd | cut -d- -f1) SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true ) @@ -15,7 +14,7 @@ override_dh_auto_build: cd /go/src/github.com/docker/cli && LDFLAGS='' make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary manpages override_dh_auto_test: - ./engine/bundles/$(BUNDLE_VERSION)/dynbinary-daemon/dockerd -v + ./engine/bundles/dynbinary-daemon/dockerd -v override_dh_strip: # Go has lots of problems with stripping, so just don't @@ -23,7 +22,7 @@ override_dh_strip: override_dh_auto_install: mkdir -p debian/docker-ce/usr/bin cp -aTL cli/build/docker debian/docker-ce/usr/bin/docker - cp -aT "$$(readlink -f engine/bundles/$(BUNDLE_VERSION)/dynbinary-daemon/dockerd)" debian/docker-ce/usr/bin/dockerd + cp -aT "$$(readlink -f engine/bundles/dynbinary-daemon/dockerd)" debian/docker-ce/usr/bin/dockerd cp -aT /usr/local/bin/docker-proxy debian/docker-ce/usr/bin/docker-proxy cp -aT /usr/local/bin/docker-containerd debian/docker-ce/usr/bin/docker-containerd cp -aT /usr/local/bin/docker-containerd-shim debian/docker-ce/usr/bin/docker-containerd-shim diff --git a/components/packaging/rpm/centos-7/docker-ce.spec b/components/packaging/rpm/centos-7/docker-ce.spec index 82445d3333..a6ecd97312 100644 --- a/components/packaging/rpm/centos-7/docker-ce.spec +++ b/components/packaging/rpm/centos-7/docker-ce.spec @@ -66,18 +66,18 @@ make VERSION=%{_origversion} GITCOMMIT=%{_gitcommit} dynbinary manpages # cli popd pushd engine TMP_GOPATH="/go" hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini -hack/make.sh dynbinary +VERSION=%{_origversion} hack/make.sh dynbinary popd %check cli/build/docker -v -engine/bundles/%{_origversion}/dynbinary-daemon/dockerd -v +engine/bundles/dynbinary-daemon/dockerd -v %install # install binary install -d $RPM_BUILD_ROOT/%{_bindir} install -p -m 755 cli/build/docker $RPM_BUILD_ROOT/%{_bindir}/docker -install -p -m 755 engine/bundles/%{_origversion}/dynbinary-daemon/dockerd-%{_origversion} $RPM_BUILD_ROOT/%{_bindir}/dockerd +install -p -m 755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) $RPM_BUILD_ROOT/%{_bindir}/dockerd # install proxy install -p -m 755 /usr/local/bin/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy diff --git a/components/packaging/rpm/fedora-25/docker-ce.spec b/components/packaging/rpm/fedora-25/docker-ce.spec index 09d1cbf465..a2d56ea170 100644 --- a/components/packaging/rpm/fedora-25/docker-ce.spec +++ b/components/packaging/rpm/fedora-25/docker-ce.spec @@ -65,18 +65,18 @@ make VERSION=%{_origversion} GITCOMMIT=%{_gitcommit} dynbinary manpages # cli popd pushd engine TMP_GOPATH="/go" hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini -hack/make.sh dynbinary +VERSION=%{_origversion} hack/make.sh dynbinary popd %check cli/build/docker -v -engine/bundles/%{_origversion}/dynbinary-daemon/dockerd -v +engine/bundles/dynbinary-daemon/dockerd -v %install # install binary install -d $RPM_BUILD_ROOT/%{_bindir} install -p -m 755 cli/build/docker $RPM_BUILD_ROOT/%{_bindir}/docker -install -p -m 755 engine/bundles/%{_origversion}/dynbinary-daemon/dockerd-%{_origversion} $RPM_BUILD_ROOT/%{_bindir}/dockerd +install -p -m 755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) $RPM_BUILD_ROOT/%{_bindir}/dockerd # install proxy install -p -m 755 /usr/local/bin/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy diff --git a/components/packaging/rpm/fedora-26/docker-ce.spec b/components/packaging/rpm/fedora-26/docker-ce.spec index a78bb2038f..5c69b78204 100644 --- a/components/packaging/rpm/fedora-26/docker-ce.spec +++ b/components/packaging/rpm/fedora-26/docker-ce.spec @@ -65,20 +65,20 @@ make VERSION=%{_origversion} GITCOMMIT=%{_gitcommit} dynbinary manpages # cli popd pushd engine TMP_GOPATH="/go" hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini -hack/make.sh dynbinary +VERSION=%{_origversion} hack/make.sh dynbinary popd mkdir -p plugin printf '{"edition_type":"ce","edition_name":"%s","edition_version":"%s"}\n' "${DISTRO}" "%{_version}" > plugin/.plugin-metadata %check cli/build/docker -v -engine/bundles/%{_origversion}/dynbinary-daemon/dockerd -v +engine/bundles/dynbinary-daemon/dockerd -v %install # install binary install -d $RPM_BUILD_ROOT/%{_bindir} install -p -m 755 cli/build/docker $RPM_BUILD_ROOT/%{_bindir}/docker -install -p -m 755 engine/bundles/%{_origversion}/dynbinary-daemon/dockerd-%{_origversion} $RPM_BUILD_ROOT/%{_bindir}/dockerd +install -p -m 755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) $RPM_BUILD_ROOT/%{_bindir}/dockerd # install proxy install -p -m 755 /usr/local/bin/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy diff --git a/components/packaging/static/Makefile b/components/packaging/static/Makefile index a6c727682d..d8d657d99e 100644 --- a/components/packaging/static/Makefile +++ b/components/packaging/static/Makefile @@ -2,7 +2,6 @@ SHELL:=/bin/bash ALPINE_IMG:=$(shell $(CURDIR)/../detect_alpine_image) ENGINE_DIR:=$(CURDIR)/../../engine CLI_DIR:=$(CURDIR)/../../cli -ENGINE_VER=$(shell cat $(ENGINE_DIR)/VERSION) VERSION=$(shell cat $(ENGINE_DIR)/VERSION) CHOWN=docker run --rm -v $(CURDIR):/v -w /v $(ALPINE_IMG) chown HASH_CMD=docker run -v $(CURDIR):/sum -w /sum debian:jessie bash hash_files @@ -23,7 +22,7 @@ static-linux: static-cli static-engine ## create tgz with linux x86_64 client an mkdir -p build/linux/docker cp $(CLI_DIR)/build/docker build/linux/docker/ for f in dockerd docker-containerd docker-containerd-ctr docker-containerd-shim docker-init docker-proxy docker-runc; do \ - cp $(ENGINE_DIR)/bundles/$(ENGINE_VER)/binary-daemon/$$f build/linux/docker; \ + cp -L $(ENGINE_DIR)/bundles/binary-daemon/$$f build/linux/docker/$$f; \ done tar -C build/linux -c -z -f build/linux/docker-$(VERSION).tgz docker @@ -39,7 +38,7 @@ cross-mac: cross-all-cli ## create tgz with darwin x86_64 client only cross-win: cross-all-cli cross-win-engine ## create zip file with windows x86_64 client and server mkdir -p build/win/docker cp $(CLI_DIR)/build/docker-windows-amd64 build/win/docker/docker.exe - cp $(ENGINE_DIR)/bundles/$(ENGINE_VER)/cross/windows/amd64/dockerd-$(ENGINE_VER).exe build/win/docker/dockerd.exe + cp $(ENGINE_DIR)/bundles/cross/windows/amd64/dockerd-$(VERSION).exe build/win/docker/dockerd.exe docker run --rm -v $(CURDIR)/build/win:/v -w /v $(ALPINE_IMG) sh -c 'apk update&&apk add zip&&zip -r docker-$(VERSION).zip docker' $(CHOWN) -R $(shell id -u):$(shell id -g) build From 4609e2004fa8d956427d4b6f323e6dc15c1aa7a0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 15 Sep 2017 18:32:40 +0200 Subject: [PATCH 2/3] Switch armhf images to arm32v7 The "armhf" images on Docker Hub are deprecated in favor of the "arm32v7" and "arm32v6" images. Note that the Alpine image is built for arm32v6, which is compatible for both arm32v6 and arm32v7. Signed-off-by: Sebastiaan van Stijn Upstream-commit: 2b8d4afddf118b809157f4249a45656cfaa96cd3 Component: packaging --- components/packaging/deb/debian-jessie/Dockerfile.armv7l | 2 +- components/packaging/deb/debian-stretch/Dockerfile.armv7l | 2 +- components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l | 2 +- components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l | 2 +- components/packaging/deb/ubuntu-zesty/Dockerfile.armv7l | 2 +- components/packaging/detect_alpine_image | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/packaging/deb/debian-jessie/Dockerfile.armv7l b/components/packaging/deb/debian-jessie/Dockerfile.armv7l index 6bebacabf2..12426ddaf5 100644 --- a/components/packaging/deb/debian-jessie/Dockerfile.armv7l +++ b/components/packaging/deb/debian-jessie/Dockerfile.armv7l @@ -1,4 +1,4 @@ -FROM armhf/debian:jessie +FROM arm32v7/debian:jessie # allow replacing httpredir or deb mirror ARG APT_MIRROR=deb.debian.org diff --git a/components/packaging/deb/debian-stretch/Dockerfile.armv7l b/components/packaging/deb/debian-stretch/Dockerfile.armv7l index f173cfd465..27edd03182 100644 --- a/components/packaging/deb/debian-stretch/Dockerfile.armv7l +++ b/components/packaging/deb/debian-stretch/Dockerfile.armv7l @@ -1,4 +1,4 @@ -FROM armhf/debian:stretch +FROM arm32v7/debian:stretch # allow replacing httpredir or deb mirror ARG APT_MIRROR=deb.debian.org diff --git a/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l b/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l index b39912c706..8b414afc9b 100644 --- a/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l +++ b/components/packaging/deb/ubuntu-trusty/Dockerfile.armv7l @@ -1,4 +1,4 @@ -FROM armhf/ubuntu:trusty +FROM arm32v7/ubuntu:trusty RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev pkg-config vim-common libsystemd-journal-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l b/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l index d51ffa6b52..39c83c45b0 100644 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l +++ b/components/packaging/deb/ubuntu-xenial/Dockerfile.armv7l @@ -1,4 +1,4 @@ -FROM armhf/ubuntu:xenial +FROM arm32v7/ubuntu:xenial RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/components/packaging/deb/ubuntu-zesty/Dockerfile.armv7l b/components/packaging/deb/ubuntu-zesty/Dockerfile.armv7l index 670e8f1d6c..3a5f9d23c0 100644 --- a/components/packaging/deb/ubuntu-zesty/Dockerfile.armv7l +++ b/components/packaging/deb/ubuntu-zesty/Dockerfile.armv7l @@ -1,4 +1,4 @@ -FROM armhf/ubuntu:zesty +FROM arm32v7/ubuntu:zesty RUN apt-get update && apt-get install -y apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/components/packaging/detect_alpine_image b/components/packaging/detect_alpine_image index 756e7dd550..06ec609e7e 100755 --- a/components/packaging/detect_alpine_image +++ b/components/packaging/detect_alpine_image @@ -6,7 +6,7 @@ img="unknown" if [ "$arch" = "x86_64" ]; then img="alpine" elif [ "$arch" = "armv7l" ]; then - img="armhf/alpine" + img="arm32v6/alpine" elif [ "$arch" = "s390x" ]; then img="s390x/alpine" elif [ "$arch" = "aarch64" ]; then From 35f91d208ef3bc48540e16d95eb6566f036f769f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 16 Sep 2017 03:10:07 +0200 Subject: [PATCH 3/3] Switch aarch64 images to arm64v8 The "aarch64" images on Docker Hub are deprecated in favor of the "arm64v8" images. Signed-off-by: Sebastiaan van Stijn Upstream-commit: cc436770b773767ad59e766be66323282b030d33 Component: packaging --- components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 | 2 +- components/packaging/detect_alpine_image | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 b/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 index fd2ca681d2..cfa8db3e65 100644 --- a/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 +++ b/components/packaging/deb/ubuntu-xenial/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM aarch64/ubuntu:xenial +FROM arm64v8/ubuntu:xenial RUN apt-get update && apt-get install -y golang-go apparmor bash-completion btrfs-tools build-essential cmake curl ca-certificates debhelper dh-apparmor dh-systemd git libapparmor-dev libdevmapper-dev libltdl-dev libseccomp-dev pkg-config vim-common libsystemd-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/components/packaging/detect_alpine_image b/components/packaging/detect_alpine_image index 756e7dd550..a662599748 100755 --- a/components/packaging/detect_alpine_image +++ b/components/packaging/detect_alpine_image @@ -10,7 +10,7 @@ elif [ "$arch" = "armv7l" ]; then elif [ "$arch" = "s390x" ]; then img="s390x/alpine" elif [ "$arch" = "aarch64" ]; then - img="aarch64/alpine" + img="arm64v8/alpine" elif [ "$arch" = "ppc64le" ]; then img="ppc64le/alpine" else