From 92818a23e4e5f176547238a2d167ccf66271f705 Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Thu, 30 Jul 2026 21:44:25 -0700 Subject: [PATCH 1/2] Added build script for cryptography==44.0.0 for UBI:10.2 Update build script for python3.14 Added dependencies Delete c/cryptography/cryptography_44.0.0_ubi_10.1.sh --- c/cryptography/build_info.json | 6 ++ .../cryptography_50.0.0_ubi_10.2.sh | 96 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 c/cryptography/cryptography_50.0.0_ubi_10.2.sh diff --git a/c/cryptography/build_info.json b/c/cryptography/build_info.json index f9aaa9f764..486b19f08f 100644 --- a/c/cryptography/build_info.json +++ b/c/cryptography/build_info.json @@ -15,5 +15,11 @@ }, "43.0.1": { "build_script": "cryptography_43.0.1_ubi_9.3.sh" + }, + "50.0.0": { + "build_script": [ + "cryptography_50.0.0_ubi_10.2.sh", + "cryptography_43.0.1_ubi_9.3.sh" + ] } } diff --git a/c/cryptography/cryptography_50.0.0_ubi_10.2.sh b/c/cryptography/cryptography_50.0.0_ubi_10.2.sh new file mode 100644 index 0000000000..cf402e5aa5 --- /dev/null +++ b/c/cryptography/cryptography_50.0.0_ubi_10.2.sh @@ -0,0 +1,96 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : cryptography +# Version : 50.0.0 +# Source repo : https://github.com/pyca/cryptography +# Tested on : UBI:10.2 +# Language : Python +# Ci-Check : True +# Script License : Apache License, Version 2 or later +# Maintainer : Shivansh Sharma +# +# 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. +# +# ----------------------------------------------------------------------------- + +set -e + +PACKAGE_NAME=cryptography +PACKAGE_VERSION=${1:-50.0.0} +PACKAGE_URL=https://github.com/pyca/cryptography +PACKAGE_DIR=cryptography +CURRENT_DIR=$(pwd) + +# Install system dependencies +# Python packages MUST come first — create_wheel_wrapper.sh strips them for wheel builds +yum install -y python3.14 python3.14-devel python3.14-pip \ + git gcc-toolset-15 gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ \ + make openssl-devel libffi-devel zlib-devel rust cargo + +# Activate GCC Toolset 15 (UBI 10 dropped SCL — use PATH export) +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 Python build tools (always via pip, never via yum) +python3.14 -m pip install --upgrade pip setuptools wheel build + +# Install test and build dependencies +python3.14 -m pip install pytest pytest-benchmark pretend certifi pytest-cov pytest-xdist maturin cffi + +# sha1 is not supported by this backend for RSA signing — re-enable for testing +export OPENSSL_ENABLE_SHA1_SIGNATURES=1 + +# Clone and checkout +cd "$CURRENT_DIR" +git clone "$PACKAGE_URL" "$PACKAGE_DIR" +cd "$PACKAGE_DIR" + +if git rev-parse "v${PACKAGE_VERSION}" &>/dev/null; then + git checkout "v${PACKAGE_VERSION}" +elif git rev-parse "${PACKAGE_VERSION}" &>/dev/null; then + git checkout "${PACKAGE_VERSION}" +else + echo "ERROR: No git tag found for version '${PACKAGE_VERSION}'" + exit 1 +fi + +# Install cryptography_vectors test helper at matching version +python3.14 -m pip install "cryptography_vectors==${PACKAGE_VERSION}" + +# Build and install +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" + exit 1 +fi + +python3.14 -m build --wheel --no-isolation --outdir="$CURRENT_DIR/" + +# Test +cd "$CURRENT_DIR" +if ! pytest "$CURRENT_DIR/$PACKAGE_DIR/tests/hazmat/primitives/" \ + --import-mode=importlib -v --timeout=60 -x; 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 b7ec46e33183fafa880ee9f82fce7239ad5bacaf Mon Sep 17 00:00:00 2001 From: shivansh-ibm Date: Wed, 2 Sep 2026 16:01:41 +0530 Subject: [PATCH 2/2] Update build_info.json --- c/cryptography/build_info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/cryptography/build_info.json b/c/cryptography/build_info.json index 486b19f08f..a08a951f15 100644 --- a/c/cryptography/build_info.json +++ b/c/cryptography/build_info.json @@ -2,7 +2,7 @@ "maintainer": "ramnathnayak-ibm", "package_name": "cryptography", "github_url": "https://github.com/pyca/cryptography", - "version": "43.0.1", + "version": "50.0.0", "wheel_build" : true, "default_branch": "main", "package_dir": "c/cryptography",