From b1d7b9340f1d89a9f4857495bd1b692d2d5b34f2 Mon Sep 17 00:00:00 2001 From: Sakshi Jain Date: Thu, 8 Oct 2026 14:08:05 +0530 Subject: [PATCH] Added support for ubi10.2 --- a/array_record/array_record_0.8.3_ubi_10.2.sh | 85 +++++++++++++++++++ a/array_record/build_info.json | 7 +- 2 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 a/array_record/array_record_0.8.3_ubi_10.2.sh diff --git a/a/array_record/array_record_0.8.3_ubi_10.2.sh b/a/array_record/array_record_0.8.3_ubi_10.2.sh new file mode 100644 index 0000000000..04768ea4b1 --- /dev/null +++ b/a/array_record/array_record_0.8.3_ubi_10.2.sh @@ -0,0 +1,85 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : array_record +# Version : v0.8.3 +# Source repo : https://github.com/google/array_record +# Tested on : UBI:10.2 +# Language : Python +# Ci-Check : True +# Script License : Apache License, Version 2 or later +# Maintainer : Sakshi Jain +# +# Disclaimer: This script has been tested in root mode on the given +# platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such a case, please +# contact the "Maintainer" of this script. +# ---------------------------------------------------------------------------- + +PACKAGE_NAME=array_record +PACKAGE_VERSION=${1:-v0.8.3} +PACKAGE_URL=https://github.com/google/array_record +PACKAGE_DIR=array_record +BAZEL_VERSION=7.2.1 + +export CURRENT_DIR=$(pwd -P) + +yum install -y git make cmake zip tar wget python3.14 python3.14-devel python3.14-pip python3-devel java-21-openjdk-devel java-21-openjdk java-21-openjdk-headless gcc-toolset-15-gcc-c++ gcc-toolset-15-gcc zlib-devel libjpeg-devel openssl openssl-devel freetype-devel pkgconfig rsync + +export GCC_TOOLSET_PATH=/opt/rh/gcc-toolset-15/root/usr +export PATH=$GCC_TOOLSET_PATH/bin:$PATH + +export JAVA_HOME=/usr/lib/jvm/java-21-openjdk +export PATH=$PATH:$JAVA_HOME/bin + +#Install bazel +mkdir bazel +cd bazel +wget https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip +unzip bazel-${BAZEL_VERSION}-dist.zip +sed -i '/#include "src\/main\/cpp\/util\/logging.h"/a #include ' src/main/cpp/archive_utils.h +sed -i '/#include "src\/main\/cpp\/util\/logging.h"/a #include ' src/main/cpp/blaze.h +env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk --jobs=4" bash ./compile.sh +cp output/bazel /usr/local/bin +export PATH=/usr/local/bin:$PATH +cd $CURRENT_DIR + +export PYTHON_BIN=$(which python3.14) +export PYTHON_VERSION=$($PYTHON_BIN -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") + +python3.14 -m pip cache purge +python3.14 -m pip install setuptools wheel etils typing_extensions importlib_resources + +cd $CURRENT_DIR +git clone $PACKAGE_URL +cd $PACKAGE_NAME +export CURRENT_DIR=$(pwd -P) +git checkout $PACKAGE_VERSION + +wget https://raw.githubusercontent.com/ppc64le/build-scripts/master/a/array_record/array_record_${PACKAGE_VERSION}.patch +git apply array_record_${PACKAGE_VERSION}.patch + +python3.14 -m pip install setuptools wheel etils typing_extensions importlib_resources absl-py + +#Build package +if ! python3.14 -m pip install . ; then + echo "------------------$PACKAGE_NAME:install_fails-------------------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" + exit 1 +fi + +#Tests are performed in build_whl.sh +if ! sh oss/build_whl.sh ; then + echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails" + exit 2 +else + cp $CURRENT_DIR/array_record/dist/* $CURRENT_DIR + echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success" + exit 0 +fi \ No newline at end of file diff --git a/a/array_record/build_info.json b/a/array_record/build_info.json index d72c0c2208..6ffd483f38 100644 --- a/a/array_record/build_info.json +++ b/a/array_record/build_info.json @@ -1,5 +1,5 @@ { - "maintainer": "kiranNukal", + "maintainer": "SakshiJain0302", "package_name": "array_record", "github_url": "https://github.com/google/array_record", "version": "v0.8.3", @@ -17,7 +17,10 @@ "build_script":"array_record_0.8.2_ubi_9.6.sh" }, "v0.8.3": { - "build_script":"array_record_0.8.2_ubi_9.6.sh" + "build_script": [ + "array_record_0.8.2_ubi_9.6.sh", + "array_record_0.8.3_ubi_10.2.sh" + ] }, "*": { "build_script": "array_record_ubi_9.3.sh"