From 57125000ae54ddb0dac21d9c2563ad896f356994 Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Tue, 28 Jul 2026 21:31:54 -0700 Subject: [PATCH 1/4] Add build script of cx-oracle==8.3.0 for ubi:10.1 --- c/cx-oracle/build_info.json | 8 +- c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh | 99 +++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh diff --git a/c/cx-oracle/build_info.json b/c/cx-oracle/build_info.json index 894e0bb123..ee15c5bfbb 100644 --- a/c/cx-oracle/build_info.json +++ b/c/cx-oracle/build_info.json @@ -1,5 +1,5 @@ { - "maintainer": "stutiibm", + "maintainer": "shivansh-ibm", "package_name": "cx-Oracle", "github_url": "https://github.com/oracle/python-cx_Oracle", "version": "8.3.0", @@ -10,6 +10,12 @@ "docker_build": false, "validate_build_script": true, "use_non_root_user": "false", + "8.3.0": { + "build_script": [ + "cx-oracle_8.3.0_ubi_10.1.sh", + "cx-oracle_ubi_9.3.sh" + ] + }, "*": { "build_script": "cx-oracle_ubi_9.3.sh" } diff --git a/c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh b/c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh new file mode 100644 index 0000000000..548fd5bf7e --- /dev/null +++ b/c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh @@ -0,0 +1,99 @@ +#!/bin/bash -ex +# ----------------------------------------------------------------------------- +# +# Package : cx-Oracle +# Version : 8.3.0 +# Source repo : https://github.com/oracle/python-cx_Oracle.git +# Tested on : UBI 10.1 +# Language : C +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Rashmi Sakhalkar +# +# Disclaimer: This script has been tested in root mode on 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 case, please +# contact "Maintainer" of this script. +# + +# Variables +PACKAGE_NAME=python-cx_Oracle +PACKAGE_VERSION=${1:-8.3.0} +PACKAGE_URL=https://github.com/oracle/python-cx_Oracle.git +PACKAGE_DIR=python-cx_Oracle +CURRENT_DIR=$(pwd) +export ORACLE_HOME=$(pwd)/opt/oracle + +# Install dependencies +dnf install -y python3.12 python3.12-pip python3.12-devel \ + git gcc gcc-c++ make cmake wget \ + openssl-devel bzip2-devel libffi-devel zlib-devel \ + libjpeg-devel freetype-devel procps-ng openblas-devel \ + meson ninja-build gcc-gfortran \ + zip unzip sqlite-devel sqlite + +# Install Rust (required for some pip-compiled C extensions) +curl https://sh.rustup.rs -sSf | sh -s -- -y +source "$HOME/.cargo/env" + +# Install Oracle Instant Client needed for tests +mkdir -p $ORACLE_HOME && cd $ORACLE_HOME +wget https://download.oracle.com/otn_software/linux/instantclient/193/instantclient-basic-linux.leppc64.c64-19.3.0.0.0dbru.zip +unzip -o instantclient-basic-linux.leppc64.c64-19.3.0.0.0dbru.zip +rm -f instantclient-basic-linux.leppc64.c64-19.3.0.0.0dbru.zip +wget https://download.oracle.com/otn_software/linux/instantclient/193/instantclient-sdk-linux.leppc64.c64-19.3.0.0.0dbru.zip +unzip -o instantclient-sdk-linux.leppc64.c64-19.3.0.0.0dbru.zip +rm -f instantclient-sdk-linux.leppc64.c64-19.3.0.0.0dbru.zip +echo $ORACLE_HOME/instantclient_19_3 > /etc/ld.so.conf.d/oracle-instantclient.conf +ldconfig +cd ../.. + +# Install SQL*Plus +wget https://download.oracle.com/otn_software/linux/instantclient/193/instantclient-sqlplus-linux.leppc64.c64-19.3.0.0.0dbru.zip +unzip -o instantclient-sqlplus-linux.leppc64.c64-19.3.0.0.0dbru.zip +rm -f instantclient-sqlplus-linux.leppc64.c64-19.3.0.0.0dbru.zip + +export LD_LIBRARY_PATH=/usr/lib64/:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_3:$LD_LIBRARY_PATH +export PATH=/opt/oracle/instantclient_19_3:$PATH + +# Clone the repository +cd $CURRENT_DIR +git clone $PACKAGE_URL +cd $PACKAGE_DIR +git checkout $PACKAGE_VERSION +git submodule update --init --recursive + +# Upgrade pip and install setuptools (not bundled with python3.12 on UBI 10; +# required by cx_Oracle's setup.py for pkg_resources) +python3.12 -m pip install --upgrade pip setuptools wheel + +# Install +if ! (python3.12 -m pip install . --no-build-isolation); then + echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" + exit 1 +else + echo "------------------$PACKAGE_NAME:install_success-------------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success" + exit 0 +fi + + +# Run test cases +# skipping test as they require oracle_DB +#if ! pytest ; 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 +# 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 + From b4e44a5cd452a70bcf6dd296e0cca282a98a5fb6 Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Tue, 1 Sep 2026 09:57:18 +0530 Subject: [PATCH 2/4] Update and rename cx-oracle_8.3.0_ubi_10.1.sh to cx-oracle_8.3.0_ubi_10.2.sh --- ...bi_10.1.sh => cx-oracle_8.3.0_ubi_10.2.sh} | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) rename c/cx-oracle/{cx-oracle_8.3.0_ubi_10.1.sh => cx-oracle_8.3.0_ubi_10.2.sh} (65%) diff --git a/c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh b/c/cx-oracle/cx-oracle_8.3.0_ubi_10.2.sh similarity index 65% rename from c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh rename to c/cx-oracle/cx-oracle_8.3.0_ubi_10.2.sh index 548fd5bf7e..74a5c65179 100644 --- a/c/cx-oracle/cx-oracle_8.3.0_ubi_10.1.sh +++ b/c/cx-oracle/cx-oracle_8.3.0_ubi_10.2.sh @@ -1,14 +1,14 @@ -#!/bin/bash -ex +#!/bin/bash -e # ----------------------------------------------------------------------------- # -# Package : cx-Oracle -# Version : 8.3.0 -# Source repo : https://github.com/oracle/python-cx_Oracle.git -# Tested on : UBI 10.1 -# Language : C -# Ci-Check : True -# Script License: Apache License, Version 2 or later -# Maintainer : Rashmi Sakhalkar +# Package : cx-Oracle +# Version : 8.3.0 +# Source repo : https://github.com/oracle/python-cx_Oracle.git +# Tested on : UBI:10.2 +# Language : C +# Ci-Check : True +# Script License : Apache License, Version 2 or later +# Maintainer : # # Disclaimer: This script has been tested in root mode on given # ========== platform using the mentioned version of the package. @@ -16,6 +16,16 @@ # package and/or distribution. In such case, please # contact "Maintainer" of this script. # +# Changes from UBI 10.1 (8.3.0) → UBI 10.2 (8.3.0): +# - Base OS updated from UBI 10.1 to UBI 10.2 +# - Python updated to python3.14 / python3.14-pip / python3.14-devel +# (using Red Hat AppStream module; cx_Oracle 8.3.x supports Python >=3.6) +# - GCC Toolset remains at gcc-toolset-15 (UBI 10 standard) +# - Oracle Instant Client version kept at 19.3 (latest ppc64le zip available) +# - Architecture flags kept as ppc64le (Power architecture target) +# ----------------------------------------------------------------------------- + +set -e # Variables PACKAGE_NAME=python-cx_Oracle @@ -26,16 +36,29 @@ CURRENT_DIR=$(pwd) export ORACLE_HOME=$(pwd)/opt/oracle # Install dependencies -dnf install -y python3.12 python3.12-pip python3.12-devel \ - git gcc gcc-c++ make cmake wget \ +dnf install -y python3.14 python3.14-pip python3.14-devel \ + git gcc-toolset-15 gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ make cmake wget \ openssl-devel bzip2-devel libffi-devel zlib-devel \ libjpeg-devel freetype-devel procps-ng openblas-devel \ meson ninja-build gcc-gfortran \ zip unzip sqlite-devel sqlite -# Install Rust (required for some pip-compiled C extensions) -curl https://sh.rustup.rs -sSf | sh -s -- -y -source "$HOME/.cargo/env" +# Setup GCC Toolset 15 for UBI 10 +if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then + source /opt/rh/gcc-toolset-15/enable +elif [[ -d /opt/rh/gcc-toolset-15/root/usr/bin ]]; then + export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" + export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:$LD_LIBRARY_PATH" +else + echo "ERROR: gcc-toolset-15 not found" + exit 1 +fi + +echo "Using gcc: $(gcc --version | head -1)" + +# Upgrade pip and install build tools early so build subprocesses find pkg_resources +# pkg_resources was split from setuptools in setuptools>=72; install it explicitly +python3.14 -m pip install --upgrade pip "setuptools<72" wheel # Install Oracle Instant Client needed for tests mkdir -p $ORACLE_HOME && cd $ORACLE_HOME @@ -65,12 +88,8 @@ cd $PACKAGE_DIR git checkout $PACKAGE_VERSION git submodule update --init --recursive -# Upgrade pip and install setuptools (not bundled with python3.12 on UBI 10; -# required by cx_Oracle's setup.py for pkg_resources) -python3.12 -m pip install --upgrade pip setuptools wheel - # Install -if ! (python3.12 -m pip install . --no-build-isolation); then +if ! (python3.14 -m pip install . --no-build-isolation); then echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------" echo "$PACKAGE_URL $PACKAGE_NAME" echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails" @@ -96,4 +115,3 @@ fi # echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success" # exit 0 #fi - From 6cd856f2f77dc13e1953bff2e97f2f3dfa3a162e Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Tue, 1 Sep 2026 09:57:37 +0530 Subject: [PATCH 3/4] Update build_info.json --- c/cx-oracle/build_info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/cx-oracle/build_info.json b/c/cx-oracle/build_info.json index ee15c5bfbb..f67dbaccc1 100644 --- a/c/cx-oracle/build_info.json +++ b/c/cx-oracle/build_info.json @@ -12,7 +12,7 @@ "use_non_root_user": "false", "8.3.0": { "build_script": [ - "cx-oracle_8.3.0_ubi_10.1.sh", + "cx-oracle_8.3.0_ubi_10.2.sh", "cx-oracle_ubi_9.3.sh" ] }, From f1b013f231a8c39316a4b97bce768a8b46bd322c Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Wed, 2 Sep 2026 09:43:05 +0530 Subject: [PATCH 4/4] Update build_info.json --- c/cx-oracle/build_info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/cx-oracle/build_info.json b/c/cx-oracle/build_info.json index f67dbaccc1..df67119111 100644 --- a/c/cx-oracle/build_info.json +++ b/c/cx-oracle/build_info.json @@ -13,7 +13,7 @@ "8.3.0": { "build_script": [ "cx-oracle_8.3.0_ubi_10.2.sh", - "cx-oracle_ubi_9.3.sh" + "cx-oracle_ubi_9.3.sh" ] }, "*": {