From 21ee9d35720d4ab8ac9598d5ce616aad77c3647e Mon Sep 17 00:00:00 2001 From: Romain Geissler Date: Mon, 7 Mar 2022 09:04:41 +0000 Subject: [PATCH] Build for CentOS 9. Signed-off-by: Romain Geissler --- Jenkinsfile | 1 + rpm/Makefile | 6 +++--- rpm/SPECS/docker-ce.spec | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d551e9cc7a..6e05c556fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,7 @@ def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME def pkgs = [ [target: "centos-7", image: "centos:7", arches: ["amd64", "aarch64"]], // (EOL: June 30, 2024) [target: "centos-8", image: "quay.io/centos/centos:stream8", arches: ["amd64", "aarch64"]], + [target: "centos-9", image: "quay.io/centos/centos:stream9", arches: ["amd64", "aarch64"]], [target: "debian-buster", image: "debian:buster", arches: ["amd64", "aarch64", "armhf"]], // Debian 10 (EOL: 2024) [target: "debian-bullseye", image: "debian:bullseye", arches: ["amd64", "aarch64", "armhf"]], // Debian 11 (Next stable) [target: "fedora-34", image: "fedora:34", arches: ["amd64", "aarch64"]], // EOL: May 17, 2022 diff --git a/rpm/Makefile b/rpm/Makefile index d7fc055c69..8748478328 100644 --- a/rpm/Makefile +++ b/rpm/Makefile @@ -57,7 +57,7 @@ RUN?=docker run --rm \ rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS) FEDORA_RELEASES ?= fedora-36 fedora-35 fedora-34 -CENTOS_RELEASES ?= centos-7 centos-8 +CENTOS_RELEASES ?= centos-7 centos-8 centos-9 ifeq ($(ARCH),s390x) RHEL_RELEASES ?= rhel-7 else @@ -83,8 +83,8 @@ 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-8 centos-9 +centos-8 centos-9: 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 718ace7f4e..ccbb772755 100644 --- a/rpm/SPECS/docker-ce.spec +++ b/rpm/SPECS/docker-ce.spec @@ -22,7 +22,10 @@ Requires: container-selinux >= 2:2.74 Requires: libseccomp >= 2.3 Requires: systemd Requires: iptables +%if %{undefined rhel} || 0%{?rhel} < 9 +# Libcgroup is no longer available in RHEL/CentOS >= 9 distros. Requires: libcgroup +%endif Requires: containerd.io >= 1.4.1 Requires: tar Requires: xz