From 3e3cd6c822545369a4bcbda7bb91de0d50759035 Mon Sep 17 00:00:00 2001 From: Faustin Lammler Date: Wed, 17 Jan 2024 12:24:59 +0100 Subject: [PATCH] Install a recent reprepro version on Ubuntu 22.04 This is a temporary fix, the aptly alternative should probably be tested and implemented since the project seems to be much better maintained. We skip the reprerpo 5.4 installation on s390x because it's apparently not packaged on that architecture. See: https://jira.mariadb.org/browse/MDBF-637 Also prefer VERSION_ID over VERSION_CODENAME when possible. --- ci_build_images/README.md | 2 +- ci_build_images/debian.Dockerfile | 27 ++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ci_build_images/README.md b/ci_build_images/README.md index 2921d16a..320ecd22 100644 --- a/ci_build_images/README.md +++ b/ci_build_images/README.md @@ -10,7 +10,7 @@ cat debian.Dockerfile common.Dockerfile >Dockerfile docker build . -t mariadb.org/buildbot/debian:sid --build-arg mariadb_branch=10.7 --build-arg base_image=debian:sid # ubuntu cat debian.Dockerfile common.Dockerfile >Dockerfile -docker build . -t mariadb.org/buildbot/ubuntu:21.04 --build-arg mariadb_branch=10.7 --build-arg base_image=ubuntu:22.04 +docker build . -t mariadb.org/buildbot/ubuntu:22.04 --build-arg mariadb_branch=10.7 --build-arg base_image=ubuntu:22.04 # fedora cat fedora.Dockerfile common.Dockerfile >Dockerfile docker build . -t mariadb.org/buildbot/fedora:34 --build-arg base_image=fedora:37 diff --git a/ci_build_images/debian.Dockerfile b/ci_build_images/debian.Dockerfile index 92ed2b27..28d76ef1 100644 --- a/ci_build_images/debian.Dockerfile +++ b/ci_build_images/debian.Dockerfile @@ -68,7 +68,6 @@ RUN . /etc/os-release; \ python3-buildbot-worker \ python3-dev \ python3-setuptools \ - reprepro \ rsync \ scons \ socat \ @@ -77,12 +76,34 @@ RUN . /etc/os-release; \ && if [ "$(getconf LONG_BIT)" = 64 ]; then \ apt-get -y install --no-install-recommends galera-4; \ fi \ - && if [ "${VERSION_CODENAME}" != bionic ]; then \ + && if [ "${VERSION_ID}" != 18.04 ]; then \ apt-get -y install --no-install-recommends flex; \ fi \ - && if [ "${VERSION_CODENAME}" = jammy ]; then \ + && if [ "${VERSION_ID}" = 22.04 ]; then \ apt-get -y install --no-install-recommends clang-14 libpcre3-dev llvm; \ fi \ + # see: https://jira.mariadb.org/browse/MDBF-637 \ + && if [ "${VERSION_ID}" = 22.04 ] && [ "$(arch)" != s390x ]; then \ + case "$(arch)" in "x86_64") \ + deb_arch="amd64"; \ + ;; \ + "x86") \ + deb_arch="i386" \ + ;; \ + "aarch64") \ + deb_arch="arm64" \ + ;; \ + "ppc64le") \ + deb_arch="ppc64el" \ + ;; \ + esac; \ + reprepro_version="5.4.3-1"; \ + curl -skO "http://ftp.debian.org/debian/pool/main/r/reprepro/reprepro_${reprepro_version}_${deb_arch}.deb"; \ + apt-get install -y --no-install-recommends "./reprepro_${reprepro_version}_${deb_arch}.deb"; \ + rm -f "./reprepro_${reprepro_version}_${deb_arch}.deb"; \ + else \ + apt-get install -y --no-install-recommends reprepro; \ + fi \ && apt-get clean ENV WSREP_PROVIDER=/usr/lib/galera/libgalera_smm.so