diff --git a/build_debuggers.rocky9.Dockerfile b/build_debuggers.rocky9.Dockerfile new file mode 100644 index 0000000..5a3ac8d --- /dev/null +++ b/build_debuggers.rocky9.Dockerfile @@ -0,0 +1,90 @@ +# syntax=docker/dockerfile:1.5 + +ARG debugger_base=rockylinux:9 +FROM ${debugger_base} + +SHELL [ "/usr/bin/bash", "-c" ] + +# Make sure we're starting with an up-to-date image +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf update -y || [ "$?" -eq 100 ] && \ + rm -rf /tmp/* + +ARG parallelism=3 +ARG tools_prefix=/opt/debug_tools + +RUN mkdir -p ${tools_prefix} + +WORKDIR /tmp + +#-------- +# valgrind, gdb + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y gcc-toolset-12 && \ + echo "#!/bin/sh" > /etc/profile.d/gcc-toolset-12.sh && \ + echo "" >> /etc/profile.d/gcc-toolset-12.sh && \ + echo ". /opt/rh/gcc-toolset-12/enable" >> /etc/profile.d/gcc-toolset-12.sh && \ + rm -rf /tmp/* + +#-------- +# lldb + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y lldb && \ + rm -rf /tmp/* + +#-------- +# rr + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + python3-urllib3 \ + binutils \ + && \ + rm -rf /tmp/* + +ARG rr_version="5.6.0" + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y "https://github.com/rr-debugger/rr/releases/download/${rr_version}/rr-${rr_version}-Linux-x86_64.rpm" && \ + rm -rf /tmp/* + +#-------- +# xmlrunner + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + python3-pip \ + && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \ + --mount=type=cache,target=/root/.cache/wheel,sharing=locked \ + python3 -m pip install \ + xmlrunner \ + && \ + rm -rf /tmp/* + +#-------- +# utils + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + sudo \ + nano \ + vim-enhanced \ + tmux \ + lsof \ + which \ + file \ + iproute \ + && \ + rm -rf /tmp/* diff --git a/externals_builder.rocky9.Dockerfile b/externals_builder.rocky9.Dockerfile new file mode 100644 index 0000000..8a69480 --- /dev/null +++ b/externals_builder.rocky9.Dockerfile @@ -0,0 +1,51 @@ +# syntax=docker/dockerfile:1.5 + +FROM rockylinux:9 + +SHELL [ "/usr/bin/bash", "-c" ] + +# Make sure we're starting with an up-to-date image +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf update -y || [ "$?" -eq 100 ] && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + sudo \ + git \ + python3 \ + python3-distro \ + gcc-toolset-12 \ + && \ + rm -rf /tmp/* + +ARG externals_repo="https://github.com/irods/externals" +ARG externals_branch="main" + +WORKDIR /externals +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + git clone "${externals_repo}" -b "${externals_branch}" /externals && \ + python3 -m venv build_env && \ + source build_env/bin/activate && \ + ./install_prerequisites.py && \ + rm -rf /externals /tmp/* + +# TODO: The following will enable the newer toolchain on interactive shell logins. The +# externals builder, however, is not an interactive shell, so this does not execute. This seems +# like a much better option than explicitly setting the PATH environment variable to check for +# new thing, as is being done below. Investigate making this effective for this builder. +#RUN echo "#!/bin/sh" > /etc/profile.d/gcc-toolset-12.sh && \ +# echo "" >> /etc/profile.d/gcc-toolset-12.sh && \ +# echo ". /opt/rh/gcc-toolset-12/enable" >> /etc/profile.d/gcc-toolset-12.sh + +ENV PATH=/opt/rh/gcc-toolset-12/root/usr/bin:$PATH + +ENV file_extension="rpm" +ENV package_manager="dnf" + +WORKDIR / +COPY --chmod=755 build_and_copy_externals_to_dir.sh / +ENTRYPOINT ["./build_and_copy_externals_to_dir.sh"] diff --git a/irods_core_builder.rocky9.Dockerfile b/irods_core_builder.rocky9.Dockerfile new file mode 100644 index 0000000..5b553ea --- /dev/null +++ b/irods_core_builder.rocky9.Dockerfile @@ -0,0 +1,126 @@ +# syntax=docker/dockerfile:1.5 + +FROM rockylinux:9 + +SHELL [ "/usr/bin/bash", "-c" ] + +# Make sure we're starting with an up-to-date image +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf update -y || [ "$?" -eq 100 ] && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + epel-release \ + wget \ + && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + ccache \ + python3-devel \ + python3-distro \ + python3-jsonschema \ + python3-psutil \ + python3-pyodbc \ + python3-requests \ + openssl \ + openssl-devel \ + lsof \ + postgresql-server \ + which \ + && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + dnf-plugin-config-manager \ + && \ + rpm --import https://packages.irods.org/irods-signing-key.asc && \ + dnf config-manager -y --add-repo https://packages.irods.org/renci-irods.yum.repo && \ + dnf config-manager -y --set-enabled renci-irods && \ + rpm --import https://core-dev.irods.org/irods-core-dev-signing-key.asc && \ + dnf config-manager -y --add-repo https://core-dev.irods.org/renci-irods-core-dev.yum.repo && \ + dnf config-manager -y --set-enabled renci-irods-core-dev && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + 'irods-externals*' \ + && \ + rm -rf /tmp/* + +# For rocky linux, the crb repository should be enabled so that certain developer +# tools such as ninja-build and help2man can be installed. +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + dnf-plugins-core \ + && \ + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ + dnf config-manager --set-enabled crb && \ + dnf install -y \ + git \ + pam-devel \ + fuse-devel \ + libcurl-devel \ + bzip2-devel \ + libxml2-devel \ + make \ + gcc \ + gcc-c++ \ + rpm-build \ + sudo \ + ninja-build \ + help2man \ + python3-packaging \ + unixODBC-devel \ + && \ + rm -rf /tmp/* + +# For Python3 modules not available as packages: +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + --mount=type=cache,target=/root/.cache/pip,sharing=locked \ + --mount=type=cache,target=/root/.cache/wheel,sharing=locked \ + dnf install -y \ + python3-pip \ + cmake \ + spdlog-devel \ + && \ + python3 -m pip install \ + lief \ + --global-option="--lief-no-cache" \ + --global-option="--ninja" \ + --global-option="--lief-no-pe" \ + --global-option="--lief-no-macho" \ + --global-option="--lief-no-android" \ + --global-option="--lief-no-art" \ + --global-option="--lief-no-vdex" \ + --global-option="--lief-no-oat" \ + --global-option="--lief-no-dex" \ + && \ + rm -rf /tmp/* + +ARG cmake_path="/opt/irods-externals/cmake3.21.4-0/bin" +ENV PATH=${cmake_path}:$PATH + +ENV file_extension="rpm" +ENV package_manager="dnf" + +ENV CCACHE_DIR="/irods_build_cache" +# Default to a reasonably large cache size +ENV CCACHE_MAXSIZE="64G" +# Allow for a lot of files (1.5M files, 300 per directory) +ENV CCACHE_NLEVELS="3" +# Allow any uid to use cache +ENV CCACHE_UMASK="000" + +COPY --chmod=755 build_and_copy_packages_to_dir.sh / +ENTRYPOINT ["./build_and_copy_packages_to_dir.sh"] diff --git a/irods_runner.rocky9.Dockerfile b/irods_runner.rocky9.Dockerfile new file mode 100644 index 0000000..66d54c9 --- /dev/null +++ b/irods_runner.rocky9.Dockerfile @@ -0,0 +1,96 @@ +# syntax=docker/dockerfile:1.5 +# +# iRODS Runner +# +ARG runner_base=rockylinux:9 +FROM ${runner_base} as irods-runner + +SHELL [ "/bin/bash", "-c" ] + +# Make sure we're starting with an up-to-date image +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf update -y || [ "$?" -eq 100 ] && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + epel-release \ + sudo \ + wget \ + && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + python3 \ + python3-distro \ + python3-jsonschema \ + python3-psutil \ + python3-pyodbc \ + python3-requests \ + openssl \ + lsof \ + postgresql-server \ + unixODBC \ + && \ + rm -rf /tmp/* + +# install and configure rsyslog +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + rsyslog \ + && \ + sed -i \ + -e 's/^\(module(load="imuxsock"\)\s*/\1) /' \ + -e '/^\s\+SysSock.Use="off")/d' \ + -e '/^\s\+# local messages/d' \ + /etc/rsyslog.conf \ + && \ + sed -i \ + -e 's/^\(module(load="imjournal"\)\s*/\1) /' \ + -e '/^\s\+StateFile=/d' \ + /etc/rsyslog.conf \ + && \ + rm -rf /tmp/* +COPY irods.rsyslog /etc/rsyslog.d/00-irods.conf +COPY irods.logrotate /etc/logrotate.d/irods + +# irodsauthuser required for some tests +# UID and GID ranges picked to hopefully not overlap with anything +RUN useradd \ + --key UID_MIN=40000 \ + --key UID_MAX=50000 \ + --key GID_MIN=40000 \ + --key GID_MAX=50000 \ + --create-home \ + --shell /bin/bash \ + irodsauthuser && \ + echo 'irodsauthuser:;=iamnotasecret' | chpasswd + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + dnf-plugin-config-manager \ + && \ + rpm --import https://packages.irods.org/irods-signing-key.asc && \ + dnf config-manager -y --add-repo https://packages.irods.org/renci-irods.yum.repo && \ + dnf config-manager -y --set-enabled renci-irods && \ + rpm --import https://core-dev.irods.org/irods-core-dev-signing-key.asc && \ + dnf config-manager -y --add-repo https://core-dev.irods.org/renci-irods-core-dev.yum.repo && \ + dnf config-manager -y --set-enabled renci-irods-core-dev && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + 'irods-externals*' \ + && \ + rm -rf /tmp/* + +COPY ICAT.sql / +COPY --chmod=755 keep_alive.sh /keep_alive.sh +ENTRYPOINT ["/keep_alive.sh"] diff --git a/plugin_builder.rocky9.Dockerfile b/plugin_builder.rocky9.Dockerfile new file mode 100644 index 0000000..1d9c06b --- /dev/null +++ b/plugin_builder.rocky9.Dockerfile @@ -0,0 +1,49 @@ +# syntax=docker/dockerfile:1.5 + +FROM rockylinux:9 + +SHELL [ "/usr/bin/bash", "-c" ] + +# Make sure we're starting with an up-to-date image +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf update -y || [ "$?" -eq 100 ] && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + epel-release \ + sudo \ + wget \ + git \ + rpm-build \ + gcc-c++ \ + && \ + rm -rf /tmp/* + +RUN --mount=type=cache,target=/var/cache/dnf,sharing=locked \ + --mount=type=cache,target=/var/cache/yum,sharing=locked \ + dnf install -y \ + python3 \ + python3-devel \ + python3-pip \ + && \ + rm -rf /tmp/* + +# TODO: python3 is the only option at this time, so we don't really need this +ENV python="python3" + +# see https://pip.pypa.io/en/stable/topics/vcs-support/ +ARG python_ci_utilities_vcs="git+https://github.com/irods/irods_python_ci_utilities.git@main" + +RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \ + --mount=type=cache,target=/root/.cache/wheel,sharing=locked \ + "${python}" -m pip install "${python_ci_utilities_vcs}" && \ + rm -rf /tmp/* + +ENV file_extension="rpm" +ENV package_manager="dnf" + +COPY --chmod=755 build_and_copy_plugin_packages_to_dir.sh / +ENTRYPOINT ["./build_and_copy_plugin_packages_to_dir.sh"] diff --git a/run_debugger.sh b/run_debugger.sh index 2a24485..d8d8e20 100755 --- a/run_debugger.sh +++ b/run_debugger.sh @@ -72,6 +72,7 @@ declare -A Os_Map=( ['ubuntu18']='ubuntu:18.04' ['ubuntu20']='ubuntu:20.04' ['debian11']='debian:11' ['almalinux8']='almalinux:8' + ['rocky9']='rockylinux:9' ['centos7']='centos:7' ) base_image=${Os_Map["$OS_NAME"]}