From 2a4e8ab6a66abaef8c0bcdb4d98a75c10624e05a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 23 Mar 2020 22:21:15 +0100 Subject: [PATCH 1/2] rpm: remove obsolete sed for aarch64 repositories Signed-off-by: Sebastiaan van Stijn --- dockerfiles/rpm.dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/dockerfiles/rpm.dockerfile b/dockerfiles/rpm.dockerfile index a18d2694..7ffd80ef 100644 --- a/dockerfiles/rpm.dockerfile +++ b/dockerfiles/rpm.dockerfile @@ -45,8 +45,6 @@ FROM redhat-base AS rhel-base ENV BUILDTAGS=no_btrfs FROM redhat-base AS centos-base -# Overwrite repo that was failing on aarch64 -RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo FROM redhat-base AS amzn-base From 6b278d494fa5a5c4342ceff09fbbb01a1e8f0cad Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 23 Mar 2020 19:01:26 +0100 Subject: [PATCH 2/2] rpm: add support for building on CentOS 8 armhf (arm32) is currently not supported, because no images exist on Docker Hub for CentOS 8 For arm64, the seccomp-devel package is in the PowerTools repository, so enabling that repository on CentOS 8 Signed-off-by: Sebastiaan van Stijn centos: enable PowerTools repo Signed-off-by: Sebastiaan van Stijn --- Jenkinsfile | 1 + dockerfiles/rpm.dockerfile | 1 + rpm/containerd.spec | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5b994f41..84ff3aab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,6 +8,7 @@ def images = [ [image: "amazonlinux:2", arches: ["aarch64"]], [image: "centos:7", arches: ["amd64", "aarch64", "armhf"]], + [image: "centos:8", arches: ["amd64", "aarch64"]], // Note: armhf (arm32) images are currently not available on Docker Hub [image: "debian:stretch", arches: ["amd64", "aarch64", "armhf"]], // Debian 9 (EOL: June, 2022) [image: "debian:buster", arches: ["amd64", "aarch64", "armhf"]], // Debian 10 (EOL: 2024) [image: "fedora:29", arches: ["amd64", "aarch64"]], diff --git a/dockerfiles/rpm.dockerfile b/dockerfiles/rpm.dockerfile index 7ffd80ef..0ec9b4e8 100644 --- a/dockerfiles/rpm.dockerfile +++ b/dockerfiles/rpm.dockerfile @@ -45,6 +45,7 @@ FROM redhat-base AS rhel-base ENV BUILDTAGS=no_btrfs FROM redhat-base AS centos-base +RUN if [ -f /etc/yum.repos.d/CentOS-PowerTools.repo ]; then sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-PowerTools.repo; fi FROM redhat-base AS amzn-base diff --git a/rpm/containerd.spec b/rpm/containerd.spec index 05b2e936..908a08d3 100644 --- a/rpm/containerd.spec +++ b/rpm/containerd.spec @@ -99,7 +99,12 @@ cd %{_topdir}/BUILD make man pushd /go/src/%{import_path} -%define make_containerd(o:) make VERSION=%{getenv:VERSION} REVISION=%{getenv:REF} PACKAGE=%{getenv:PACKAGE} %{?**}; +BUILDTAGS="seccomp selinux" +%if 1%{!?el8:1} +BUILDTAGS="${BUILDTAGS} no_btrfs" +%endif + +%define make_containerd(o:) make VERSION=%{getenv:VERSION} REVISION=%{getenv:REF} PACKAGE=%{getenv:PACKAGE} GO_BUILDTAGS="${BUILDTAGS}" %{?**}; %make_containerd bin/containerd /go/src/%{import_path}/bin/containerd --version %make_containerd bin/containerd-shim