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 f0d402846 [jenkins] Create dockerfile compatible with 22.04 build.
f0d402846 is described below

commit f0d4028468a5038cb508820a6479d6205c368a79
Author: Jason Zhou <[email protected]>
AuthorDate: Mon Jul 15 18:05:38 2024 -0400

    [jenkins] Create dockerfile compatible with 22.04 build.
    
    For review #75080, we made use of replace_bpf_fd and BPF_F_REPLACE
    which were added in kernel 5.6. Our current ubuntu 20.04 base image
    uses kernel 5.4.
    
    As such we will be upgrading the ubuntu version used in Jenkins to
    22.04, whose base image uses kernel 5.15, so that we can make mesos
    on the updated pipeline, enabling reviewbot, tidybot, and coverity.
    
    Review: https://reviews.apache.org/r/75088/
---
 configure.ac                                       |  9 +++++-
 support/docker-build.sh                            | 33 ++++++++++------------
 support/jenkins/reviewbot.sh                       |  2 +-
 ...-arm.dockerfile => ubuntu-22.04-arm.dockerfile} |  4 +--
 ...tu-20.04.dockerfile => ubuntu-22.04.dockerfile} |  4 +--
 support/mesos-tidy/Dockerfile                      |  4 +--
 support/verify-reviews.py                          |  2 +-
 7 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7c0597f56..4307f004d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2310,8 +2310,15 @@ if test -n "`echo $with_zlib`" ; then
   LDFLAGS="$ZLIB_LINKERFLAGS $LDFLAGS"
 fi
 
+# We just check for one function here because in ubuntu 22.04, checking 
multiple
+# functions will generate incorrect code where the namespace for other 
functions
+# is not properly specified.
+#
+# Hence we just check for inflate here as an indicator of whether we have the
+# other functions available to us, rather than writing separate checks for
+# each function which will be very cumbersome.
 AC_CHECK_HEADERS([zlib.h],
-                 [AC_CHECK_LIB([z], [deflate, gzread, gzwrite, inflate], [],
+                 [AC_CHECK_LIB([z], [inflate], [],
                                [AC_MSG_ERROR([cannot find libz
 -------------------------------------------------------------------
 libz is required for Mesos to build.
diff --git a/support/docker-build.sh b/support/docker-build.sh
index cb0b05b6e..a0757b98e 100755
--- a/support/docker-build.sh
+++ b/support/docker-build.sh
@@ -67,7 +67,7 @@ case $OS in
     append_dockerfile "FROM $OS"
 
     case $OS in
-    *20.04*)
+    *22.04*)
     append_dockerfile "ARG DEBIAN_FRONTEND=noninteractive"
     ;;
     esac
@@ -91,13 +91,13 @@ case $OS in
     fi
     append_dockerfile "RUN apt-get update"
     append_dockerfile "RUN apt-get install -y build-essential $CLANG_PKG git 
maven autoconf libtool software-properties-common"
-    append_dockerfile "RUN apt-get install -y python-dev python-six 
libcurl4-nss-dev libsasl2-dev libapr1-dev libsvn-dev libevent-dev libev-dev 
libssl-dev"
+    append_dockerfile "RUN apt-get install -y python-six libcurl4-nss-dev 
libsasl2-dev libapr1-dev libsvn-dev libevent-dev libev-dev libssl-dev"
     append_dockerfile "RUN apt-get install -y wget curl sed"
 
     case $OS in
       *16.04*)
         echo "Install Ubuntu 16.04 LTS (Xenial Xerus) specific packages"
-        append_dockerfile "RUN apt-get install -y openjdk-8-jdk zlib1g-dev"
+        append_dockerfile "RUN apt-get install -y openjdk-8-jdk zlib1g-dev 
python-dev"
         # Install ping required by OsTest.Which
         append_dockerfile "RUN apt-get install -y iputils-ping"
 
@@ -114,25 +114,22 @@ case $OS in
         # Install pip for Python 3.6.
         append_dockerfile "RUN curl 
https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3"
        ;;
-      *20.04*)
-        echo "Install Ubuntu 20.04 LTS (Focal Fossa) specific packages"
-        append_dockerfile "RUN apt-get install -y openjdk-11-jdk zlib1g-dev"
+      *22.04*)
+        echo "Install Ubuntu 22.04 LTS (Focal Fossa) specific packages"
+        append_dockerfile "RUN apt-get install -y openjdk-11-jdk zlib1g-dev 
python2-dev"
         # Install ping required by OsTest.Which
         append_dockerfile "RUN apt-get install -y iputils-ping"
 
-        append_dockerfile "RUN add-apt-repository -y ppa:deadsnakes/ppa && \
-            apt-get update && \
-            apt-get install -qy \
-              python3.6 \
-              python3.6-dev \
-              python3.6-distutils \
-              python3.6-venv && \
-            add-apt-repository --remove -y ppa:deadsnakes/ppa && \
-            apt-get clean && \
-            rm -rf /var/lib/apt/lists"
-
+        # Install Python 3.6.
+        append_dockerfile "RUN curl 
https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz -o 
/tmp/Python-3.6.15.tgz && \
+            cd /tmp && \
+            tar xzf Python-3.6.15.tgz && \
+            cd Python-3.6.15 && \
+            ./configure --enable-optimizations && \
+            make altinstall && \
+            rm -rf /tmp/Python-3.6.15.tgz /tmp/Python-3.6.15"
         # Use update-alternatives to set python3.6 as python3.
-        append_dockerfile "RUN update-alternatives --install /usr/bin/python3 
python3 /usr/bin/python3.6 1"
+        append_dockerfile "RUN update-alternatives --install /usr/bin/python3 
python3 /usr/local/bin/python3.6 1"
         # Install pip for Python 3.6.
         append_dockerfile "RUN curl 
https://bootstrap.pypa.io/pip/3.6/get-pip.py | python3"
       ;;
diff --git a/support/jenkins/reviewbot.sh b/support/jenkins/reviewbot.sh
index 03ebcd600..0ab51a094 100755
--- a/support/jenkins/reviewbot.sh
+++ b/support/jenkins/reviewbot.sh
@@ -44,7 +44,7 @@ fi
 
 # Build the HEAD first to ensure that there are no errors prior to applying
 # the review chain. We do not run tests at this stage.
-export OS='ubuntu:20.04'
+export OS='ubuntu:22.04'
 export BUILDTOOL='autotools'
 export COMPILER='gcc'
 export CONFIGURATION='--verbose --disable-libtool-wrappers 
--disable-parallel-test-execution'
diff --git a/support/mesos-build/ubuntu-20.04-arm.dockerfile 
b/support/mesos-build/ubuntu-22.04-arm.dockerfile
similarity index 98%
rename from support/mesos-build/ubuntu-20.04-arm.dockerfile
rename to support/mesos-build/ubuntu-22.04-arm.dockerfile
index a3b321fb7..5f12dc837 100644
--- a/support/mesos-build/ubuntu-20.04-arm.dockerfile
+++ b/support/mesos-build/ubuntu-22.04-arm.dockerfile
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM arm64v8/ubuntu:20.04
+FROM arm64v8/ubuntu:22.04
 
 ARG DEBIAN_FRONTEND=noninteractive
 
@@ -37,7 +37,7 @@ RUN apt-get update && \
       libtool \
       maven \
       openjdk-8-jdk \
-      python-dev \
+      python2-dev \
       python-six \
       sed \
       zlib1g-dev \
diff --git a/support/mesos-build/ubuntu-20.04.dockerfile 
b/support/mesos-build/ubuntu-22.04.dockerfile
similarity index 98%
rename from support/mesos-build/ubuntu-20.04.dockerfile
rename to support/mesos-build/ubuntu-22.04.dockerfile
index e183ff742..e98bb516e 100644
--- a/support/mesos-build/ubuntu-20.04.dockerfile
+++ b/support/mesos-build/ubuntu-22.04.dockerfile
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ubuntu:20.04
+FROM ubuntu:22.04
 
 ARG DEBIAN_FRONTEND=noninteractive
 
@@ -37,7 +37,7 @@ RUN apt-get update && \
       libtool \
       maven \
       openjdk-11-jdk \
-      python-dev \
+      python2-dev\
       python-six \
       sed \
       software-properties-common \
diff --git a/support/mesos-tidy/Dockerfile b/support/mesos-tidy/Dockerfile
index 769a22d9e..a3a11769b 100644
--- a/support/mesos-tidy/Dockerfile
+++ b/support/mesos-tidy/Dockerfile
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ubuntu:20.04
+FROM ubuntu:22.04
 MAINTAINER The Apache Mesos Developers <[email protected]>
 
 WORKDIR /tmp/build
@@ -26,7 +26,7 @@ RUN apt-get update && \
   ca-certificates \
   curl \
   git \
-  python-dev && \
+  python2-dev && \
   apt-get clean && \
   rm -rf /var/lib/apt/lists/*
 
diff --git a/support/verify-reviews.py b/support/verify-reviews.py
index 8e7c54faa..99325709f 100755
--- a/support/verify-reviews.py
+++ b/support/verify-reviews.py
@@ -244,7 +244,7 @@ def verify_review(review_request):
         else:
             # Launch docker build script.
             configuration = ("export "
-                             "OS='ubuntu:20.04' "
+                             "OS='ubuntu:22.04' "
                              "BUILDTOOL='autotools' "
                              "COMPILER='gcc' "
                              "CONFIGURATION='--verbose "

Reply via email to