This is an automated email from the ASF dual-hosted git repository.

bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new ac8765c8a [mesos-build] Address dependency issues in centos-7 / 
ubuntu-20.04.
ac8765c8a is described below

commit ac8765c8a807fc2710d22ed7c7671f16c4ea2a25
Author: Jason Zhou <[email protected]>
AuthorDate: Fri Jun 7 11:20:04 2024 -0400

    [mesos-build] Address dependency issues in centos-7 / ubuntu-20.04.
    
    In CentOS 7, the linux/amd64 base image is missing ebpf fields such as
    BPF_PROG_TYPE_CGROUP_DEVICE, which prevents jenkins from building mesos
    now that the ENABLE_CGROUPS_V2 macro has been removed as
    /usr/include/linux/bpf.h is missing the fields required by ebpf.h.
    
    We installed dependencies from kernel-ml so that we can have newer
    headerfiles in /usr/include/linux, which should help us compile the
    mesos code in jenkins.
    
    For ubuntu, there is a dependency on installing jdk-11 instead of
    the old jdk-8 which is preventing some builds which pull the ubuntu
    image to build.
    
    As part of this change, both the CentOS 7 and ubuntu:20.04 will
    need to be rebuilt and uploaded to dockerhub for jenkins.
    
    Review: https://reviews.apache.org/r/75035/
---
 support/docker-build.sh                     |  2 ++
 support/mesos-build/centos-7.dockerfile     | 11 +++++++----
 support/mesos-build/ubuntu-20.04.dockerfile |  2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/support/docker-build.sh b/support/docker-build.sh
index ce643c14a..1273848d9 100755
--- a/support/docker-build.sh
+++ b/support/docker-build.sh
@@ -43,6 +43,8 @@ case $OS in
     append_dockerfile "RUN yum install -y which"
     append_dockerfile "RUN yum groupinstall -y 'Development Tools'"
     append_dockerfile "RUN yum install -y epel-release" # Needed for clang.
+    append_dockerfile "RUN yum install -y 
https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm";
+    append_dockerfile "RUN yum install -y --enablerepo=elrepo-kernel 
kernel-ml-headers"
     append_dockerfile "RUN yum install -y clang git maven"
     append_dockerfile "RUN yum install -y java-1.8.0-openjdk-devel 
python-devel python-six zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel 
cyrus-sasl-md5 apr-devel subversion-devel apr-utils-devel libevent-devel 
libev-devel"
 
diff --git a/support/mesos-build/centos-7.dockerfile 
b/support/mesos-build/centos-7.dockerfile
index c75c5b61d..7142ffda4 100644
--- a/support/mesos-build/centos-7.dockerfile
+++ b/support/mesos-build/centos-7.dockerfile
@@ -22,6 +22,13 @@ FROM centos:7
 RUN curl -sSL 
https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.9.0/repo/epel-7/alonid-llvm-3.9.0-epel-7.repo
 \
          -o /etc/yum.repos.d/llvm-3.9.0.repo
 
+# Install epel-release and elrepo to get access to kernel-ml headers
+RUN yum install -y 
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
+    yum install -y 
https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
+
+# Install specific kernel headers
+RUN yum install -y --enablerepo=elrepo-kernel kernel-ml-headers
+
 # Install dependencies.
 RUN yum groupinstall -y 'Development Tools' && \
     yum install -y centos-release-scl && \
@@ -48,11 +55,7 @@ RUN yum groupinstall -y 'Development Tools' && \
     rm -rf /var/cache/yum
 
 # Install Python 3.6 and pip.
-# We need two separate `yum install` in order for
-# the python packages to be installed correctly.
 RUN yum install -y \
-      https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
&& \
-    yum install -y \
       python36 \
       python36-devel && \
     yum clean all && \
diff --git a/support/mesos-build/ubuntu-20.04.dockerfile 
b/support/mesos-build/ubuntu-20.04.dockerfile
index 280c93ae6..5b03356f5 100644
--- a/support/mesos-build/ubuntu-20.04.dockerfile
+++ b/support/mesos-build/ubuntu-20.04.dockerfile
@@ -36,7 +36,7 @@ RUN apt-get update && \
       libsvn-dev \
       libtool \
       maven \
-      openjdk-8-jdk \
+      openjdk-11-jdk \
       python-dev \
       python-six \
       sed \

Reply via email to