From 38461b5a0dc6751660c63833108dc637cf70d949 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Mar 2020 10:15:23 +0100 Subject: [PATCH 01/12] rpm/Makefile: remove parameterization of Dockerfile All images used are multi-arch now, so no need to parameterize Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 06ff3c299a3119ab25ec7f3a6b0a1bfb9071e64d) Signed-off-by: Sebastiaan van Stijn --- rpm/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rpm/Makefile b/rpm/Makefile index 25731aa0f7..94837374eb 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -10,10 +10,6 @@ GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-buster GEN_RPM_VER=$(shell ./gen-rpm-ver $(CLI_DIR) $(VERSION)) CHOWN=docker run --rm -i -v $(CURDIR):/v -w /v alpine chown -DOCKERFILE=Dockerfile -ifdef NEEDS_ARCH_SPECIFIC - DOCKERFILE=Dockerfile.$(ARCH) -endif ifdef BUILD_IMAGE BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE) endif @@ -22,7 +18,7 @@ BUILD?=DOCKER_BUILDKIT=1 \ $(BUILD_IMAGE_FLAG) \ --build-arg GO_IMAGE=$(GO_IMAGE) \ -t rpmbuild-$@/$(ARCH) \ - -f $@/$(DOCKERFILE) \ + -f $@/Dockerfile \ . SPEC_FILES?=docker-ce.spec docker-ce-cli.spec From 978232d2b9215ca2c112417e10f247409f82b61a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Mar 2020 11:26:44 +0100 Subject: [PATCH 02/12] rpm/Makefile: use DISTROS intermediate variable, similar to deb Signed-off-by: Sebastiaan van Stijn (cherry picked from commit ad0315539847b9c10700e8da0e1e1946ac261cac) Signed-off-by: Sebastiaan van Stijn --- rpm/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpm/Makefile b/rpm/Makefile index 94837374eb..ee4fe6b25e 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -41,6 +41,7 @@ SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 fedora-28 CENTOS_RELEASES := centos-7 +DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) .PHONY: help help: ## show make targets @@ -60,8 +61,8 @@ fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages .PHONY: centos centos: $(CENTOS_RELEASES) ## build all centos rpm packages -.PHONY: $(FEDORA_RELEASES) $(CENTOS_RELEASES) -$(FEDORA_RELEASES) $(CENTOS_RELEASES): $(SOURCES) +.PHONY: $(DISTROS) +$(DISTROS): $(SOURCES) @echo "== Building packages for $@ ==" $(CHOWN) -R root:root rpmbuild $(BUILD) From af3fc343165a26a9ae0dc363744d657b0159b025 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 11 Mar 2020 11:46:48 +0100 Subject: [PATCH 03/12] Makefile: remove SOURCE_FILES, SOURCES variables We were not currently using these to override, so may as well remove them. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit a6a8d77d15bc5fb7f8c813a14ae85c6c7431ce38) Signed-off-by: Sebastiaan van Stijn --- deb/Makefile | 5 +---- rpm/Makefile | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/deb/Makefile b/deb/Makefile index cb1b23c6c9..4b69cf8bb1 100644 --- a/deb/Makefile +++ b/deb/Makefile @@ -35,9 +35,6 @@ RUN=docker run --rm -i \ $(RUN_FLAGS) \ debbuild-$@/$(ARCH) -SOURCE_FILES=cli.tgz engine.tgz docker.service docker.socket plugin-installers.tgz -SOURCES=$(addprefix sources/, $(SOURCE_FILES)) - DEBIAN_VERSIONS := debian-stretch debian-buster UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-cosmic ubuntu-disco ubuntu-eoan ubuntu-focal RASPBIAN_VERSIONS := raspbian-stretch raspbian-buster @@ -67,7 +64,7 @@ debian: $(DEBIAN_VERSIONS) ## build all debian deb packages raspbian: $(RASPBIAN_VERSIONS) ## build all raspbian deb packages .PHONY: $(DISTROS) -$(DISTROS): $(SOURCES) +$(DISTROS): sources/cli.tgz sources/engine.tgz sources/docker.service sources/docker.socket sources/plugin-installers.tgz @echo "== Building packages for $@ ==" $(BUILD) $(RUN) diff --git a/rpm/Makefile b/rpm/Makefile index ee4fe6b25e..882936f8de 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -62,7 +62,7 @@ fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages centos: $(CENTOS_RELEASES) ## build all centos rpm packages .PHONY: $(DISTROS) -$(DISTROS): $(SOURCES) +$(DISTROS): rpmbuild/SOURCES/engine.tgz rpmbuild/SOURCES/cli.tgz rpmbuild/SOURCES/docker.service rpmbuild/SOURCES/docker.socket rpmbuild/SOURCES/plugin-installers.tgz @echo "== Building packages for $@ ==" $(CHOWN) -R root:root rpmbuild $(BUILD) From 8069f72d763c6c3f38dbeae6ab3c72a8ff7e77d3 Mon Sep 17 00:00:00 2001 From: Andrew Hsu Date: Thu, 10 Oct 2019 00:02:57 +0000 Subject: [PATCH 04/12] remove fedora 28 because it is eol End of life as of 2019-05-28: https://fedoramagazine.org/fedora-28-end-of-life/ Signed-off-by: Andrew Hsu (cherry picked from commit 235feeca78b4d032d2cd6ac82b16951520bf84e2) Signed-off-by: Sebastiaan van Stijn --- rpm/Makefile | 2 +- rpm/fedora-28/Dockerfile | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 rpm/fedora-28/Dockerfile diff --git a/rpm/Makefile b/rpm/Makefile index 882936f8de..1d9310c974 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -39,7 +39,7 @@ RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS) SOURCE_FILES=engine.tgz cli.tgz docker.service docker.socket plugin-installers.tgz SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) -FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 fedora-28 +FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 CENTOS_RELEASES := centos-7 DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) diff --git a/rpm/fedora-28/Dockerfile b/rpm/fedora-28/Dockerfile deleted file mode 100644 index 457da74bdb..0000000000 --- a/rpm/fedora-28/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -ARG GO_IMAGE -ARG BUILD_IMAGE=fedora:28 -FROM ${GO_IMAGE} as golang - -FROM ${BUILD_IMAGE} -ENV DISTRO fedora -ENV SUITE 28 -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV AUTO_GOPATH 1 -ENV DOCKER_BUILDTAGS seccomp selinux -ENV RUNC_BUILDTAGS seccomp selinux -RUN dnf install -y rpm-build rpmlint dnf-plugins-core -COPY SPECS /root/rpmbuild/SPECS -RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec -COPY --from=golang /usr/local/go /usr/local/go -WORKDIR /root/rpmbuild -ENTRYPOINT ["/bin/rpmbuild"] From 23708e730164b6f5787becddf6edd88ae77e08e4 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Thu, 16 Jan 2020 14:37:17 -0800 Subject: [PATCH 05/12] Add Support for Centos-8 Signed-off-by: Arko Dasgupta (cherry picked from commit ec3b30b6a4ce2c1cd8e9c1d49d708bb3cb6cefc1) Signed-off-by: Sebastiaan van Stijn --- rpm/Makefile | 2 +- rpm/centos-8/Dockerfile | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 rpm/centos-8/Dockerfile diff --git a/rpm/Makefile b/rpm/Makefile index 1d9310c974..8eb117d954 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -40,7 +40,7 @@ SOURCE_FILES=engine.tgz cli.tgz docker.service docker.socket plugin-installers.t SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 -CENTOS_RELEASES := centos-7 +CENTOS_RELEASES := centos-7 centos-8 DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) .PHONY: help diff --git a/rpm/centos-8/Dockerfile b/rpm/centos-8/Dockerfile new file mode 100644 index 0000000000..b56e0a8d01 --- /dev/null +++ b/rpm/centos-8/Dockerfile @@ -0,0 +1,27 @@ +ARG GO_IMAGE +ARG DISTRO=centos +ARG SUITE=8 +ARG BUILD_IMAGE=${DISTRO}:${SUITE} + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ENV GOPROXY=direct +ENV GO111MODULE=off +ENV GOPATH=/go +ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin +ENV AUTO_GOPATH 1 +ENV DOCKER_BUILDTAGS seccomp selinux +ENV RUNC_BUILDTAGS seccomp selinux +ARG DISTRO +ARG SUITE +ENV DISTRO=${DISTRO} +ENV SUITE=${SUITE} +RUN yum install -y rpm-build rpmlint +COPY SPECS /root/rpmbuild/SPECS +# Overwrite repo that was failing on aarch64 +RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo +RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec +COPY --from=golang /usr/local/go /usr/local/go +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"] From 922a9f8d2b8326639383036e9435801545402768 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Tue, 4 Feb 2020 11:41:34 -0800 Subject: [PATCH 06/12] Undo baseurl string replace for altarch Signed-off-by: Arko Dasgupta (cherry picked from commit 8b4a45a6cda05dd90b32c2466ff6494fff11882f) Signed-off-by: Sebastiaan van Stijn --- rpm/centos-7/Dockerfile | 2 -- rpm/centos-8/Dockerfile | 2 -- 2 files changed, 4 deletions(-) diff --git a/rpm/centos-7/Dockerfile b/rpm/centos-7/Dockerfile index 2ea8306370..ea0406ca8e 100644 --- a/rpm/centos-7/Dockerfile +++ b/rpm/centos-7/Dockerfile @@ -19,8 +19,6 @@ ENV DISTRO=${DISTRO} ENV SUITE=${SUITE} RUN yum install -y rpm-build rpmlint COPY SPECS /root/rpmbuild/SPECS -# Overwrite repo that was failing on aarch64 -RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec COPY --from=golang /usr/local/go /usr/local/go WORKDIR /root/rpmbuild diff --git a/rpm/centos-8/Dockerfile b/rpm/centos-8/Dockerfile index b56e0a8d01..3153d168d0 100644 --- a/rpm/centos-8/Dockerfile +++ b/rpm/centos-8/Dockerfile @@ -19,8 +19,6 @@ ENV DISTRO=${DISTRO} ENV SUITE=${SUITE} RUN yum install -y rpm-build rpmlint COPY SPECS /root/rpmbuild/SPECS -# Overwrite repo that was failing on aarch64 -RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec COPY --from=golang /usr/local/go /usr/local/go WORKDIR /root/rpmbuild From f96d17612f38a7941e01e2bb70d0162d5e2fa08d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 20 Mar 2020 18:37:44 +0100 Subject: [PATCH 07/12] Fix CentOS 8 build - Enable PowerTools repo - Disable building btrfs, which is no longer supported on CentOS/RHEL Signed-off-by: Sebastiaan van Stijn (cherry picked from commit a03dda0f708de5f72601dafb7f9f408973946bb7) Signed-off-by: Sebastiaan van Stijn --- rpm/Makefile | 4 ++++ rpm/SPECS/docker-ce.spec | 6 ++++-- rpm/centos-8/Dockerfile | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/rpm/Makefile b/rpm/Makefile index 8eb117d954..090cf5afed 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -33,6 +33,7 @@ RPMBUILD_FLAGS?=-ba\ --define '_release $(word 2,$(GEN_RPM_VER))' \ --define '_version $(word 1,$(GEN_RPM_VER))' \ --define '_origversion $(word 4, $(GEN_RPM_VER))' \ + $(RPMBUILD_EXTRA_FLAGS) \ $(SPECS) RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS) @@ -58,6 +59,9 @@ rpm: fedora centos ## build all rpm packages .PHONY: fedora fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages +.PHONY: centos-8 +centos-8: RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1' + .PHONY: centos centos: $(CENTOS_RELEASES) ## build all centos rpm packages diff --git a/rpm/SPECS/docker-ce.spec b/rpm/SPECS/docker-ce.spec index 731d267d46..5c82df3a02 100644 --- a/rpm/SPECS/docker-ce.spec +++ b/rpm/SPECS/docker-ce.spec @@ -1,5 +1,7 @@ %global debug_package %{nil} +# BTRFS is enabled by default, but can be disabled by defining _without_btrfs +%{!?_with_btrfs: %{!?_without_btrfs: %define _with_btrfs 1}} Name: docker-ce Version: %{_version} @@ -33,7 +35,7 @@ Requires: xz Requires: device-mapper-libs >= 1.02.90-1 BuildRequires: bash -BuildRequires: btrfs-progs-devel +%{?_with_btrfs:BuildRequires: btrfs-progs-devel} BuildRequires: ca-certificates BuildRequires: cmake BuildRequires: device-mapper-devel @@ -83,7 +85,7 @@ export DOCKER_GITCOMMIT=%{_gitcommit} mkdir -p /go/src/github.com/docker ln -s /root/rpmbuild/BUILD/src/engine /go/src/github.com/docker/docker -pushd engine +pushd /root/rpmbuild/BUILD/src/engine for component in tini "proxy dynamic";do TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component done diff --git a/rpm/centos-8/Dockerfile b/rpm/centos-8/Dockerfile index 3153d168d0..812d91f99c 100644 --- a/rpm/centos-8/Dockerfile +++ b/rpm/centos-8/Dockerfile @@ -11,15 +11,16 @@ ENV GO111MODULE=off ENV GOPATH=/go ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin ENV AUTO_GOPATH 1 -ENV DOCKER_BUILDTAGS seccomp selinux +ENV DOCKER_BUILDTAGS exclude_graphdriver_btrfs seccomp selinux ENV RUNC_BUILDTAGS seccomp selinux ARG DISTRO ARG SUITE ENV DISTRO=${DISTRO} ENV SUITE=${SUITE} -RUN yum install -y rpm-build rpmlint +RUN yum install -y rpm-build rpmlint yum-utils +RUN yum-config-manager --set-enabled PowerTools COPY SPECS /root/rpmbuild/SPECS -RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec +RUN yum-builddep --define '_without_btrfs 1' -y /root/rpmbuild/SPECS/*.spec COPY --from=golang /usr/local/go /usr/local/go WORKDIR /root/rpmbuild ENTRYPOINT ["/bin/rpmbuild"] From eae0236c6e07ab7d29c8d0cf4a56265d5f1afc48 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 25 Mar 2020 12:23:20 +0100 Subject: [PATCH 08/12] CentOS: fix failing repository on aarch64 (arm64) This repository is only specified in the aarch64 (arm64) images, and therefore was not caught in CI. Bringing back the fix that was previously there, to prevent failures: #9 [stage-1 4/6] RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec #9 0.982 Loaded plugins: fastestmirror, ovl #9 1.177 Enabling base-source repository #9 1.177 Enabling extras-source repository #9 1.178 Enabling updates-source repository #9 1.179 Loading mirror speeds from cached hostfile #9 1.181 * base: d36uatko69830t.cloudfront.net #9 1.182 * extras: d36uatko69830t.cloudfront.net #9 1.182 * updates: d36uatko69830t.cloudfront.net #9 2.272 http://vault.centos.org/altarch/7/extras/Source/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found #9 2.272 Trying other mirror. #9 2.273 To address this issue please refer to the below wiki article Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 170199f34bc9ca689fd6a97c5c44676a20b8b480) Signed-off-by: Sebastiaan van Stijn --- rpm/centos-7/Dockerfile | 4 ++++ rpm/centos-8/Dockerfile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/rpm/centos-7/Dockerfile b/rpm/centos-7/Dockerfile index ea0406ca8e..fadc377b89 100644 --- a/rpm/centos-7/Dockerfile +++ b/rpm/centos-7/Dockerfile @@ -17,6 +17,10 @@ ARG DISTRO ARG SUITE ENV DISTRO=${DISTRO} ENV SUITE=${SUITE} + +# In aarch64 (arm64) images, the altarch repo is specified as repository, but +# failing, so replace the URL. +RUN if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo; fi RUN yum install -y rpm-build rpmlint COPY SPECS /root/rpmbuild/SPECS RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec diff --git a/rpm/centos-8/Dockerfile b/rpm/centos-8/Dockerfile index 812d91f99c..54220cc076 100644 --- a/rpm/centos-8/Dockerfile +++ b/rpm/centos-8/Dockerfile @@ -17,6 +17,10 @@ ARG DISTRO ARG SUITE ENV DISTRO=${DISTRO} ENV SUITE=${SUITE} + +# In aarch64 (arm64) images, the altarch repo is specified as repository, but +# failing, so replace the URL. +RUN if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo; fi RUN yum install -y rpm-build rpmlint yum-utils RUN yum-config-manager --set-enabled PowerTools COPY SPECS /root/rpmbuild/SPECS From 9038ae327d7306b1a86c711b1ea51415bb3c952f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 11 Apr 2020 00:25:55 +0200 Subject: [PATCH 09/12] Add Fedora 32, remove Fedora 29 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit b6331a2a58223ee528f0943ae95e8eb993a69b76) Signed-off-by: Sebastiaan van Stijn --- README.md | 3 +-- rpm/Makefile | 2 +- rpm/{fedora-29 => fedora-32}/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) rename rpm/{fedora-29 => fedora-32}/Dockerfile (97%) diff --git a/README.md b/README.md index 9ec99e960d..9d0429e31f 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ The scripts will build for this list of packages types: * DEB packages for Ubuntu 16.04 Xenial * DEB packages for Debian 10 Buster * DEB packages for Debian 9 Stretch +* RPM packages for Fedora 32 * RPM packages for Fedora 31 * RPM packages for Fedora 30 -* RPM packages for Fedora 29 -* RPM packages for Fedora 28 * RPM packages for CentOS 7 * TGZ and ZIP files with static binaries diff --git a/rpm/Makefile b/rpm/Makefile index 090cf5afed..f5e8459b9e 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -40,7 +40,7 @@ RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS) SOURCE_FILES=engine.tgz cli.tgz docker.service docker.socket plugin-installers.tgz SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) -FEDORA_RELEASES := fedora-31 fedora-30 fedora-29 +FEDORA_RELEASES := fedora-32 fedora-31 fedora-30 CENTOS_RELEASES := centos-7 centos-8 DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) diff --git a/rpm/fedora-29/Dockerfile b/rpm/fedora-32/Dockerfile similarity index 97% rename from rpm/fedora-29/Dockerfile rename to rpm/fedora-32/Dockerfile index 6d688232d1..6468e8e0d7 100644 --- a/rpm/fedora-29/Dockerfile +++ b/rpm/fedora-32/Dockerfile @@ -1,6 +1,6 @@ ARG GO_IMAGE ARG DISTRO=fedora -ARG SUITE=29 +ARG SUITE=32 ARG BUILD_IMAGE=${DISTRO}:${SUITE} FROM ${GO_IMAGE} AS golang From a281b4ca453cfd78d1181c2c84ee97d86b2aea32 Mon Sep 17 00:00:00 2001 From: Stefan Scherer Date: Mon, 27 Apr 2020 21:11:58 +0200 Subject: [PATCH 10/12] Add rhel for s390x Signed-off-by: Stefan Scherer (cherry picked from commit 6ea7ea0b78021dc56a368926d452020490ea9f1d) Signed-off-by: Sebastiaan van Stijn --- rpm/Makefile | 6 +++++- rpm/rhel-7/Dockerfile | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 rpm/rhel-7/Dockerfile diff --git a/rpm/Makefile b/rpm/Makefile index f5e8459b9e..ce881ba514 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -42,7 +42,8 @@ SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES)) FEDORA_RELEASES := fedora-32 fedora-31 fedora-30 CENTOS_RELEASES := centos-7 centos-8 -DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) +RHEL_RELEASES := rhel-7 +DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(RHEL_RELEASES) .PHONY: help help: ## show make targets @@ -65,6 +66,9 @@ centos-8: RPMBUILD_EXTRA_FLAGS=--define '_without_btrfs 1' .PHONY: centos centos: $(CENTOS_RELEASES) ## build all centos rpm packages +.PHONY: rhel +rhel: $(RHEL_RELEASES) ## build all rhel rpm packages + .PHONY: $(DISTROS) $(DISTROS): rpmbuild/SOURCES/engine.tgz rpmbuild/SOURCES/cli.tgz rpmbuild/SOURCES/docker.service rpmbuild/SOURCES/docker.socket rpmbuild/SOURCES/plugin-installers.tgz @echo "== Building packages for $@ ==" diff --git a/rpm/rhel-7/Dockerfile b/rpm/rhel-7/Dockerfile new file mode 100644 index 0000000000..62d5af64e1 --- /dev/null +++ b/rpm/rhel-7/Dockerfile @@ -0,0 +1,30 @@ +ARG GO_IMAGE +ARG DISTRO=rhel +ARG SUITE=7 +ARG BUILD_IMAGE=dockereng/${DISTRO}:${SUITE}-s390x + +FROM ${GO_IMAGE} AS golang + +FROM ${BUILD_IMAGE} +ENV GOPROXY=direct +ENV GO111MODULE=off +ENV GOPATH=/go +ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin +ENV AUTO_GOPATH 1 +ENV DOCKER_BUILDTAGS seccomp selinux +ENV RUNC_BUILDTAGS seccomp selinux +ARG DISTRO +ARG SUITE +ENV DISTRO=${DISTRO} +ENV SUITE=${SUITE} +ENV CC=gcc + +# In aarch64 (arm64) images, the altarch repo is specified as repository, but +# failing, so replace the URL. +RUN if [ -f /etc/yum.repos.d/CentOS-Sources.repo ]; then sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo; fi +RUN yum install -y rpm-build rpmlint +COPY SPECS /root/rpmbuild/SPECS +RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec +COPY --from=golang /usr/local/go /usr/local/go +WORKDIR /root/rpmbuild +ENTRYPOINT ["/bin/rpmbuild"] From 62084b89b50d72e8fbab564c9d6aca0533196ca5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 1 May 2020 21:50:45 +0200 Subject: [PATCH 11/12] Remove Ubuntu 18.10 "cosmic", as it reached EOL Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 4a90d5aa2aa398f6e796628c00a86fa9674b8a70) Signed-off-by: Sebastiaan van Stijn --- README.md | 1 - deb/Makefile | 2 +- deb/ubuntu-cosmic/Dockerfile | 40 ------------------------------------ 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 deb/ubuntu-cosmic/Dockerfile diff --git a/README.md b/README.md index 9d0429e31f..a4dcab7b28 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ The scripts will build for this list of packages types: * DEB packages for Ubuntu 20.04 Focal * DEB packages for Ubuntu 19.10 Eoan * DEB packages for Ubuntu 19.04 Disco -* DEB packages for Ubuntu 18.10 Cosmic * DEB packages for Ubuntu 18.04 Bionic * DEB packages for Ubuntu 16.04 Xenial * DEB packages for Debian 10 Buster diff --git a/deb/Makefile b/deb/Makefile index 4b69cf8bb1..b4ee00ab46 100644 --- a/deb/Makefile +++ b/deb/Makefile @@ -36,7 +36,7 @@ RUN=docker run --rm -i \ debbuild-$@/$(ARCH) DEBIAN_VERSIONS := debian-stretch debian-buster -UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-cosmic ubuntu-disco ubuntu-eoan ubuntu-focal +UBUNTU_VERSIONS := ubuntu-xenial ubuntu-bionic ubuntu-disco ubuntu-eoan ubuntu-focal RASPBIAN_VERSIONS := raspbian-stretch raspbian-buster DISTROS := $(DEBIAN_VERSIONS) $(UBUNTU_VERSIONS) $(RASPBIAN_VERSIONS) diff --git a/deb/ubuntu-cosmic/Dockerfile b/deb/ubuntu-cosmic/Dockerfile deleted file mode 100644 index 73359b55da..0000000000 --- a/deb/ubuntu-cosmic/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -ARG GO_IMAGE -ARG DISTRO=ubuntu -ARG SUITE=cosmic -ARG BUILD_IMAGE=${DISTRO}:${SUITE} - -FROM ${GO_IMAGE} AS golang - -FROM ${BUILD_IMAGE} - -# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639 -RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \ - rm -f /usr/bin/man; \ - dpkg-divert --quiet --remove --rename /usr/bin/man; \ - fi - -RUN apt-get update && apt-get install -y curl devscripts equivs git - -ENV GOPROXY=direct -ENV GO111MODULE=off -ENV GOPATH /go -ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin -ENV DOCKER_BUILDTAGS apparmor seccomp selinux -ENV RUNC_BUILDTAGS apparmor seccomp selinux - -ARG COMMON_FILES -COPY ${COMMON_FILES} /root/build-deb/debian -RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control - -COPY sources/ /sources -ARG DISTRO -ARG SUITE -ENV DISTRO=${DISTRO} -ENV SUITE=${SUITE} - -COPY --from=golang /usr/local/go /usr/local/go - -WORKDIR /root/build-deb -COPY build-deb /root/build-deb/build-deb - -ENTRYPOINT ["/root/build-deb/build-deb"] From f52632405e418b76b9605c7cd5bb355ae5dbd526 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 22 Apr 2020 17:38:37 +0200 Subject: [PATCH 12/12] Jenkinsfile: use docker/docker instead of docker/engine The release branches have moved back to the upstream docker/docker repository, so we should use that as source instead of the docker/engine fork (and rely on it being synced with upstream) Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 30635cbfd985c219dc2704d2fef3d24f64eaa814) Signed-off-by: Sebastiaan van Stijn --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4d5f7eeeb6..d9e0d43bf9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ test_steps = [ checkout scm sh('git clone https://github.com/docker/cli.git') sh("git -C cli checkout $branch") - sh('git clone https://github.com/docker/engine.git') + sh('git clone https://github.com/docker/docker.git engine') sh("git -C engine checkout $branch") sh('make -C deb VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli ubuntu-xenial ubuntu-focal') } finally { @@ -26,7 +26,7 @@ test_steps = [ checkout scm sh('git clone https://github.com/docker/cli.git') sh("git -C cli checkout $branch") - sh('git clone https://github.com/docker/engine.git') + sh('git clone https://github.com/docker/docker.git engine') sh("git -C engine checkout $branch") sh('make -C rpm VERSION=0.0.1-dev ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli centos-7') } finally { @@ -42,7 +42,7 @@ test_steps = [ checkout scm sh('git clone https://github.com/docker/cli.git') sh("git -C cli checkout $branch") - sh('git clone https://github.com/docker/engine.git') + sh('git clone https://github.com/docker/docker.git engine') sh("git -C engine checkout $branch") sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=static-linux ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli static') } finally {