From c8cf3b7355f67b6a3e8fa0d80e3d98b92fe56fec Mon Sep 17 00:00:00 2001 From: Oleksandr Havryliak Date: Fri, 20 Dec 2024 11:05:40 +0200 Subject: [PATCH 1/3] PSMDB add support for ubi9, add support for PBM tests --- regression-tests/build_image/Dockerfile_gcc_from_scratch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/regression-tests/build_image/Dockerfile_gcc_from_scratch b/regression-tests/build_image/Dockerfile_gcc_from_scratch index f446c7f..64a19a7 100644 --- a/regression-tests/build_image/Dockerfile_gcc_from_scratch +++ b/regression-tests/build_image/Dockerfile_gcc_from_scratch @@ -4,7 +4,7 @@ ARG toolchain_version=v4 RUN set -ex; \ if [ -f "/usr/bin/yum" ] ; \ then \ - yum -y update && yum install -y wget curl file glibc-devel gmp-devel mpfr-devel libmpc-devel gcc gcc-c++ bzip2 bzip2-devel openssl-devel zlib-devel libffi-devel xz-devel make tzdata ; \ + yum -y update && yum install -y --allowerasing wget curl file glibc-devel gmp-devel mpfr-devel libmpc-devel gcc gcc-c++ bzip2 bzip2-devel openssl-devel zlib-devel libffi-devel xz-devel make tzdata ; \ else \ apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install wget curl file libgmp-dev libmpfr-dev libmpc-dev gcc g++ bzip2 libbz2-dev libssl-dev zlib1g-dev libreadline-dev libffi-dev make tzdata ; \ fi @@ -45,7 +45,7 @@ ARG psm_release=1 ARG repo=https://github.com/percona/percona-server-mongodb.git RUN set -ex; \ if [ -f "/usr/bin/yum" ] ; then \ - yum -y update && yum install -y wget git curl cmake lld binutils glibc-devel tzdata; \ + yum -y update && yum install -y --allowerasing wget git curl cmake lld binutils glibc-devel tzdata; \ else \ apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install wget curl git cmake binutils lld tzdata; \ fi @@ -123,3 +123,4 @@ ENV PORTABLE=1 ENV USE_SSE=1 ADD https://raw.githubusercontent.com/Percona-QA/psmdb-testing/main/regression-tests/resmoke2junit.py . RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN useradd -u 1001 -r -g 0 -m -s /sbin/nologin -c "Default Application User" mongodb || true From 6d779fd0d4b000b58a6514f37b79b085feedff67 Mon Sep 17 00:00:00 2001 From: Oleksandr Havryliak Date: Fri, 20 Dec 2024 11:30:11 +0200 Subject: [PATCH 2/3] Add diffutils --- regression-tests/build_image/Dockerfile_gcc_from_scratch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression-tests/build_image/Dockerfile_gcc_from_scratch b/regression-tests/build_image/Dockerfile_gcc_from_scratch index 64a19a7..938af3f 100644 --- a/regression-tests/build_image/Dockerfile_gcc_from_scratch +++ b/regression-tests/build_image/Dockerfile_gcc_from_scratch @@ -4,7 +4,7 @@ ARG toolchain_version=v4 RUN set -ex; \ if [ -f "/usr/bin/yum" ] ; \ then \ - yum -y update && yum install -y --allowerasing wget curl file glibc-devel gmp-devel mpfr-devel libmpc-devel gcc gcc-c++ bzip2 bzip2-devel openssl-devel zlib-devel libffi-devel xz-devel make tzdata ; \ + yum -y update && yum install -y --allowerasing diffutils wget curl file glibc-devel gmp-devel mpfr-devel libmpc-devel gcc gcc-c++ bzip2 bzip2-devel openssl-devel zlib-devel libffi-devel xz-devel make tzdata ; \ else \ apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install wget curl file libgmp-dev libmpfr-dev libmpc-dev gcc g++ bzip2 libbz2-dev libssl-dev zlib1g-dev libreadline-dev libffi-dev make tzdata ; \ fi @@ -45,7 +45,7 @@ ARG psm_release=1 ARG repo=https://github.com/percona/percona-server-mongodb.git RUN set -ex; \ if [ -f "/usr/bin/yum" ] ; then \ - yum -y update && yum install -y --allowerasing wget git curl cmake lld binutils glibc-devel tzdata; \ + yum -y update && yum install -y --allowerasing diffutils wget git curl cmake lld binutils glibc-devel tzdata; \ else \ apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install wget curl git cmake binutils lld tzdata; \ fi From 8ce339eb9f81090f4ad5f0476315953e9fbbbdd8 Mon Sep 17 00:00:00 2001 From: Oleksandr Havryliak Date: Wed, 22 Jan 2025 12:19:19 +0200 Subject: [PATCH 3/3] Compile e2fs libs from sources --- .../build_image/Dockerfile_gcc_from_scratch | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/regression-tests/build_image/Dockerfile_gcc_from_scratch b/regression-tests/build_image/Dockerfile_gcc_from_scratch index 69de055..7a2ba8e 100644 --- a/regression-tests/build_image/Dockerfile_gcc_from_scratch +++ b/regression-tests/build_image/Dockerfile_gcc_from_scratch @@ -83,9 +83,9 @@ RUN set -ex; \ fi && echo $PATH RUN set -ex; \ if [ -f "/usr/bin/yum" ] ; then \ - yum install -y cmake openssl-devel openldap-devel krb5-devel libcurl-devel cyrus-sasl-devel bzip2-devel zlib-devel lz4-devel xz-devel e2fsprogs-devel iproute; \ + yum install -y cmake openssl-devel openldap-devel krb5-devel libcurl-devel cyrus-sasl-devel bzip2-devel zlib-devel lz4-devel xz-devel iproute; \ else \ - DEBIAN_FRONTEND=noninteractive apt-get -y install cmake libssl-dev libldap2-dev libkrb5-dev libcurl4-openssl-dev libsasl2-dev liblz4-dev libbz2-dev libsnappy-dev zlib1g-dev libzlcore-dev liblzma-dev e2fslibs-dev iproute2; \ + DEBIAN_FRONTEND=noninteractive apt-get -y install cmake libssl-dev libldap2-dev libkrb5-dev libcurl4-openssl-dev libsasl2-dev liblz4-dev libbz2-dev libsnappy-dev zlib1g-dev libzlcore-dev liblzma-dev iproute2; \ fi ENV CMAKE_C_FLAGS=" -Wno-error=uninitialized " ENV CMAKE_CXX_FLAGS=" -Wno-error=deprecated-declarations -Wno-error=uninitialized " @@ -96,12 +96,22 @@ RUN cd /opt && git clone https://github.com/aws/aws-sdk-cpp.git && \ cd aws-sdk-cpp && git checkout $AWS_VERSION && git submodule update --init --recursive && \ mkdir build && cd build && \ cmake .. -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="$AWS_LIBS" -DAUTORUN_UNIT_TESTS=OFF && \ - make install && cd /opt && rm -rf aws-sdk-cpp + make -j "$(nproc)" && make install && \ + cd /opt && rm -rf aws-sdk-cpp +ENV E2FS_LIBS=/opt/e2fs +ARG E2FS_VERSION=v1.47.2 +RUN cd /opt && git clone https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git && \ + mkdir -p /opt/e2fs && \ + cd e2fsprogs && git checkout $E2FS_VERSION && \ + mkdir build && cd build && \ + ../configure --prefix=$E2FS_LIBS && \ + make -j "$(nproc)" && make install-libs && \ + cd /opt && rm -rf e2fsprogs RUN /usr/bin/echo -e "\n\ CC = \"/opt/gcc/bin/gcc\"\n\ CXX = \"/opt/gcc/bin/g++\"\n\ -CPPPATH = \"/opt/aws/include\"\n\ -LIBPATH = \"/opt/aws/lib /opt/aws/lib64\"\n\ +CPPPATH = \"/opt/aws/include /opt/e2fs/include\"\n\ +LIBPATH = \"/opt/aws/lib /opt/aws/lib64 /opt/e2fs/lib /opt/e2fs/lib64\"\n\ " > gcc.vars FROM base_image AS psmdb_builder