diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/Dockerfile b/Storage/daos/2.6.3/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f97260ec9673a702756c7179c7211512f72f511b --- /dev/null +++ b/Storage/daos/2.6.3/24.03-lts-sp1/Dockerfile @@ -0,0 +1,164 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 + +FROM ${BASE} +ARG VERSION=2.6.3-tb +ARG BUILD_DIR=/tmp/build +ARG TARGETARCH +ARG BUILDARCH + +RUN yum -y install gcc \ + gcc-c++ \ + git \ + make \ + cmake \ + autoconf \ + automake \ + libcap-devel \ + patch \ + rpm-build \ + rpmdevtools \ + dnf-utils \ + wget \ + ndctl \ + ndctl-devel \ + popt-devel \ + gnulib-devel \ + perl-interpreter \ + asciidoctor \ + meson + +COPY rpms/*.rpm ${BUILD_DIR}/ +COPY scripts/install_oepkgs.sh ${BUILD_DIR}/ +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x86_64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="aarch64"; \ + fi; \ + bash -x ${BUILD_DIR}/install_oepkgs.sh ${BUILDARCH} ${BUILD_DIR} && \ + rm -rf ${BUILD_DIR} + +COPY scripts/install_ipmctl.sh /tmp/install_ipmctl.sh +COPY patches/install_ipmctl.patch /tmp/install_ipmctl.patch +RUN set -eux; \ + if [ "$TARGETARCH" = "amd64" ]; then \ + IPMCTL_VERSION=03.00.00.0468; \ + cd /tmp; \ + git clone -b v${IPMCTL_VERSION} https://github.com/intel/ipmctl; \ + git clone -b edk2-stable202411 https://github.com/tianocore/edk2.git; \ + cd ipmctl; \ + bash -x ./updateedk.sh; \ + mv /tmp/install_ipmctl.sh ./install_ipmctl.sh; \ + mv /tmp/install_ipmctl.patch ./install_ipmctl.patch; \ + bash -x ./install_ipmctl.sh ./install_ipmctl.patch ${IPMCTL_VERSION}; \ + cd output/rpmbuild/RPMS/x86_64; \ + dnf install -y `ls | grep libipmctl5-${IPMCTL_VERSION}`; \ + dnf install -y `ls | grep libipmctl5-devel-${IPMCTL_VERSION}`; \ + dnf install -y `ls | grep ipmctl-${IPMCTL_VERSION}`; \ + rm -rf /tmp/patches && rm -rf /tmp/edk2 && rm -rf /tmp/ipmctl; \ + fi; + +COPY patches/install_dpdk.patch /tmp/install_dpdk.patch +ARG SPDK_VERSION=24.09 +RUN cd /tmp && \ + git clone --recurse-submodules --branch v${SPDK_VERSION} https://github.com/spdk/spdk && \ + mv /tmp/install_dpdk.patch /tmp/spdk/install_dpdk.patch && \ + cd spdk && \ + git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn install_dpdk.patch && \ + ./scripts/pkgdep.sh && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + rm -rf /tmp/spdk + +ARG DBENCH_VERSION=4.0 +RUN cd /tmp && \ + wget http://samba.org/ftp/tridge/dbench/dbench-${DBENCH_VERSION}.tar.gz && \ + tar -zxvf dbench-${DBENCH_VERSION}.tar.gz && \ + cd dbench-${DBENCH_VERSION} && \ + bash -x ./autogen.sh && \ + ./configure && \ + make -j $(nproc) && \ + make install && \ + rm -rf /tmp/dbench* + +ARG LBZIP_VERSION=2.5 +RUN cd /tmp && \ + git clone -b v${LBZIP_VERSION} https://github.com/kjn/lbzip2/ && \ + cd lbzip2 && \ + bash -x ./build-aux/autogen.sh && \ + ./configure --enable-warnings && \ + make V=1 -j $(nproc) && \ + make install && \ + rm -rf /tmp/lbzip2 + +RUN python3 -m venv /home/daos/venv +ENV PATH=/home/daos/venv/bin:$PATH +ENV VIRTUAL_ENV=/home/daos/venv/ +ARG PREFIX=/usr/local/daos + +RUN dnf --nodocs -y install \ + bzip2 \ + capstone-devel \ + clang \ + clang-tools-extra \ + CUnit-devel \ + daxctl-devel \ + diffutils \ + e2fsprogs \ + file \ + flex \ + fuse3 \ + fuse3-devel \ + scons \ + glibc-langpack-en \ + golang \ + graphviz \ + help2man \ + hwloc-devel \ + java-1.8.0-openjdk \ + json-c-devel \ + libaio-devel \ + libcmocka-devel \ + libevent-devel \ + libiscsi-devel \ + libtool \ + libtool-ltdl-devel \ + libunwind-devel \ + libuuid-devel \ + libyaml-devel \ + lz4-devel \ + numactl \ + numactl-devel \ + openmpi-devel \ + openssl-devel \ + patchelf \ + pciutils \ + pciutils-devel \ + protobuf-c-devel \ + python3-devel \ + python3-pip \ + sg3_utils \ + sudo \ + systemd \ + valgrind-devel \ + which \ + yasm \ + boost-python3 \ + boost-devel \ + maven + +COPY patches/install_daos.patch /tmp/install_daos.patch +ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 +RUN cd /tmp && \ + git clone --recurse-submodules --branch v${VERSION} https://github.com/daos-stack/daos.git && \ + cd daos && \ + mv /tmp/install_daos.patch ./install_daos.patch && \ + git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn install_daos.patch && \ + pip3 install pyelftools && \ + scons --config=force --build-deps=yes install PREFIX=${PREFIX} && \ + rm -rf /tmp/daos + +ENV CPATH=${PREFIX}/include +ENV PATH=${PREFIX}/bin/:$PATH + +CMD ["daos_server", "version"] \ No newline at end of file diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_daos.patch b/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_daos.patch new file mode 100644 index 0000000000000000000000000000000000000000..fc116b8d6cb0293ad734eadcb2b651d609df72f9 --- /dev/null +++ b/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_daos.patch @@ -0,0 +1,11 @@ +--- daos-2.3.105-tb-old/site_scons/env_modules.py 2025-01-14 10:21:49.183938830 +0800 ++++ daos-2.3.105-tb/site_scons/env_modules.py 2025-01-14 10:21:26.311938830 +0800 +@@ -34,7 +34,7 @@ class _env_module(): # pylint: disable= + env_module_init = None + _mpi_map = {"mpich": ['mpi/mpich-x86_64', 'gnu-mpich'], + "openmpi": ['mpi/mlnx_openmpi-x86_64', 'mpi/openmpi3-x86_64', +- 'gnu-openmpi', 'mpi/openmpi-x86_64']} ++ 'gnu-openmpi', 'mpi/openmpi-x86_64', 'mpi/openmpi-aarch64']} + + def __init__(self): + """Load Modules for initializing environment variables""" diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_dpdk.patch b/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_dpdk.patch new file mode 100644 index 0000000000000000000000000000000000000000..fc628ff5c15fcee9fcbaf662cddc9ec003196919 --- /dev/null +++ b/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_dpdk.patch @@ -0,0 +1,25 @@ +diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile +index 64da6cc32..62407e58b 100644 +--- a/dpdkbuild/Makefile ++++ b/dpdkbuild/Makefile +@@ -13,14 +13,14 @@ DPDK_OPTS = -Denable_docs=false + DPDK_OPTS += -Dtests=false + + ifeq ($(shell uname -m),aarch64) +-ifeq ($(shell uname -p),unknown) ++#ifeq ($(shell uname -p),unknown) + # Unknown ARM platform. ARM doesn't do platform=native which is DPDK's default. So change it. ++#DPDK_OPTS += -Dplatform=generic ++#else ++#ifeq ($(shell $(SPDK_ROOT_DIR)/dpdk/config/arm/armv8_machine.py | cut -d' ' -f4),0x0) + DPDK_OPTS += -Dplatform=generic +-else +-ifeq ($(shell $(SPDK_ROOT_DIR)/dpdk/config/arm/armv8_machine.py | cut -d' ' -f4),0x0) +-DPDK_OPTS += -Dplatform=generic +-endif +-endif ++#endif ++#endif + endif + + DPDK_KMODS = false diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_ipmctl.patch b/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_ipmctl.patch new file mode 100644 index 0000000000000000000000000000000000000000..37ca4cafe18dd6ee5ea8b00e20e3ba4ef77fb45e --- /dev/null +++ b/Storage/daos/2.6.3/24.03-lts-sp1/patches/install_ipmctl.patch @@ -0,0 +1,55 @@ +diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h +index 72bf6f31..bd75881d 100644 +--- a/MdePkg/Include/Base.h ++++ b/MdePkg/Include/Base.h +@@ -309,6 +309,8 @@ struct _LIST_ENTRY { + /// + /// NULL pointer (VOID *) + /// ++#ifndef OS_BUILD ++#ifndef UNIT_TEST_UEFI_BUILD + #if defined (__cplusplus) + #if defined (_MSC_EXTENSIONS) + #define NULL nullptr +@@ -318,6 +320,8 @@ struct _LIST_ENTRY { + #else + #define NULL ((VOID *) 0) + #endif ++#endif ++#endif + + // + // Null character +@@ -813,6 +817,8 @@ typedef UINTN *BASE_LIST; + // Section 2.3.1 of the UEFI 2.3 Specification. + // + ++#ifndef OS_BUILD ++#ifndef UNIT_TEST_UEFI_BUILD + STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements"); +@@ -826,6 +832,8 @@ STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specifi + STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements"); ++#endif ++#endif + + STATIC_ASSERT (ALIGNOF (BOOLEAN) == sizeof (BOOLEAN), "Alignment of BOOLEAN does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (ALIGNOF (INT8) == sizeof (INT8), "Alignment of INT8 does not meet UEFI Specification Data Type requirements"); +@@ -861,9 +869,13 @@ typedef enum { + __VerifyInt32EnumValue = 0x7fffffff + } __VERIFY_INT32_ENUM_SIZE; + ++#ifndef OS_BUILD ++#ifndef UNIT_TEST_UEFI_BUILD + STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (sizeof (__VERIFY_INT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements"); ++#endif ++#endif + + STATIC_ASSERT (ALIGNOF (__VERIFY_UINT8_ENUM_SIZE) == sizeof (__VERIFY_UINT8_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements"); + STATIC_ASSERT (ALIGNOF (__VERIFY_UINT16_ENUM_SIZE) == sizeof (__VERIFY_UINT16_ENUM_SIZE), "Alignment of enum does not meet UEFI Specification Data Type requirements"); + \ No newline at end of file diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/rpms/Lmod-8.4.1-1.x86_64.rpm b/Storage/daos/2.6.3/24.03-lts-sp1/rpms/Lmod-8.4.1-1.x86_64.rpm new file mode 100644 index 0000000000000000000000000000000000000000..c08ebe27c36e57ce5a59e546b8a231fc3d60ec43 Binary files /dev/null and b/Storage/daos/2.6.3/24.03-lts-sp1/rpms/Lmod-8.4.1-1.x86_64.rpm differ diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/rpms/pmdk-1.12.1-1.x86_64.rpm b/Storage/daos/2.6.3/24.03-lts-sp1/rpms/pmdk-1.12.1-1.x86_64.rpm new file mode 100644 index 0000000000000000000000000000000000000000..640a9a8183afd6cb72d717d880d7a6617b09dbf3 Binary files /dev/null and b/Storage/daos/2.6.3/24.03-lts-sp1/rpms/pmdk-1.12.1-1.x86_64.rpm differ diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/scripts/install_ipmctl.sh b/Storage/daos/2.6.3/24.03-lts-sp1/scripts/install_ipmctl.sh new file mode 100644 index 0000000000000000000000000000000000000000..7c02eb3653bc513b7f06c6002953873a0d4a675d --- /dev/null +++ b/Storage/daos/2.6.3/24.03-lts-sp1/scripts/install_ipmctl.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -euo pipefail + +#apply patches for linux builds +file=$1 +if [ ! -f "$file" ]; then + echo "Error: The patch file: $file not exist." + exit 1 +fi + +# Apply patches +echo "Applying patch" +git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn "${file}" + +if [ "$#" -le 0 ]; then + echo "./rpmbuild.sh xx.xx.xx.xxxx purley | whitley" + exit 3 +fi + +BUILDNUM=$2 +SOURCEDIR=$PWD + +# remove all rpmbuild +rm -rf $SOURCEDIR/output/rpmbuild + +# Make directories +mkdir -p $SOURCEDIR/output/rpmbuild +mkdir -p $SOURCEDIR/output/rpmbuild/BUILDROOT +mkdir -p $SOURCEDIR/output/rpmbuild/SOURCES +mkdir -p $SOURCEDIR/output/rpmbuild/RPMS +mkdir -p $SOURCEDIR/output/rpmbuild/SRPMS +mkdir -p $SOURCEDIR/output/rpmbuild/SPECS +mkdir -p $SOURCEDIR/output/rpmbuild/ipmctl-$BUILDNUM + +# Copy spec file +cp install/linux/rel-release/ipmctl.spec.in $SOURCEDIR/output/rpmbuild/SPECS/ipmctl.spec + + +# Update the spec file with build version +sed -i "s/^%define build_version .*/%define build_version $BUILDNUM/g" $SOURCEDIR/output/rpmbuild/SPECS/ipmctl.spec + +# Archive the directory +tar --exclude-vcs --exclude="*output" --exclude="*.swp*" --transform="s,^.,ipmctl-$BUILDNUM," -zcf $SOURCEDIR/output/rpmbuild/SOURCES/ipmctl-$BUILDNUM.tar.gz . + +# rpmbuild +rpmbuild -ba $SOURCEDIR/output/rpmbuild/SPECS/ipmctl.spec --define "_topdir $SOURCEDIR/output/rpmbuild" \ No newline at end of file diff --git a/Storage/daos/2.6.3/24.03-lts-sp1/scripts/install_oepkgs.sh b/Storage/daos/2.6.3/24.03-lts-sp1/scripts/install_oepkgs.sh new file mode 100644 index 0000000000000000000000000000000000000000..1435e37629716fb6e0816aa2f459999ba7fbcd7d --- /dev/null +++ b/Storage/daos/2.6.3/24.03-lts-sp1/scripts/install_oepkgs.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +set -euo pipefail + +build_arch=$1 + +if [[ "$build_arch" != "aarch64" && "$build_arch" != "x86_64" ]]; then + echo "Error: Invalid architecture '$build_arch'. Only 'aarch64' and 'x86_64' are supported." + exit 1 +fi + +build_dir=$2 +if [ ! -d "$build_dir" ]; then + echo "Error: Build directory: $build_dir is not a valid directory." + exit 1 +fi + +# On the x86_64 architecture, Lmod and pmdk are not released in openEuler-22.03-LTS-SP1. +BASE_URL="https://repo.oepkgs.net/openeuler/rpm/openEuler-22.03-LTS-SP1/extras/${build_arch}/Packages" + +# Packages to be downloaded and installed from the oepkgs repository. +PACKAGES=( + "libfabric 1.18.1-1" + "libfabric-devel 1.18.1-1" + "mercury 2.3.1~rc1-1" + "mercury-devel 2.3.1~rc1-1" + "dpdk-daos 21.11.2-2" + "dpdk-daos-devel 21.11.2-2" + "ucx 1.12.0-2" + "ucx-devel 1.12.0-2" + "argobots 1.1-3" + "argobots-devel 1.1-3" + "libisa-l_crypto 2.24.0-1" + "libisa-l_crypto-devel 2.24.0-1" + "raft 0.9.1-1" + "raft-devel 0.9.1-1" +) + +if [[ "$build_arch" == "aarch64" ]]; then + PACKAGES+=( + "Lmod 8.4.1-1" + "pmdk 1.12.1-1" + ) +fi + +cd $build_dir + +# Function to download and install packages +download_and_install() { + local package_name=$1 + local version=$2 + local first_letter=$(echo "${package_name:0:1}" | tr '[:upper:]' '[:lower:]') + local rpm_name="${package_name}-${version}.${build_arch}.rpm" + local url="${BASE_URL}/${first_letter}/${rpm_name}" + + echo "Downloading: $url" + wget "$url" -q --show-progress + + if [[ $? -eq 0 ]]; then + echo "Installing: $rpm_name" + dnf -y install "$rpm_name" + else + echo "Download failed: $url" + exit 1 + fi +} + +# Iterate through the package list and download/install them +for pkg in "${PACKAGES[@]}"; do + package_name=$(echo "$pkg" | awk '{print $1}') + version=$(echo "$pkg" | awk '{print $2}') + download_and_install "$package_name" "$version" +done + +if [[ "$build_arch" == "x86_64" ]]; then + dnf install -y `ls | grep Lmod` + dnf install -y `ls | grep pmdk` +fi \ No newline at end of file diff --git a/Storage/daos/meta.yml b/Storage/daos/meta.yml index 2079e1745590a115a08dd37fad2e2b06202a499d..f2a2be81a35aa7ec49203a763a629d41b4111ff9 100644 --- a/Storage/daos/meta.yml +++ b/Storage/daos/meta.yml @@ -1,2 +1,4 @@ 2.3.105-oe2203sp1: - path: 2.3.105/22.03-lts-sp1/Dockerfile \ No newline at end of file + path: 2.3.105/22.03-lts-sp1/Dockerfile +2.6.3-oe2403sp1: + path: Storage/daos/2.6.3/24.03-lts-sp1/Dockerfile \ No newline at end of file