Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSMDB add support for ubi9, add support for PBM tests #258

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions regression-tests/build_image/Dockerfile_gcc_from_scratch
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand Down Expand Up @@ -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 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
Expand Down Expand Up @@ -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 "
Expand All @@ -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
Expand All @@ -125,3 +135,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