From b1c49b6a7a284c511920571fe12ccc462210c42f Mon Sep 17 00:00:00 2001 From: Surabhi Bhat Date: Mon, 18 Mar 2024 18:12:13 +0530 Subject: [PATCH] PKG-20 Create arm based packages for PXB 8.x --- .../utils/percona-xtrabackup-8.0_builder.sh | 64 +++++++++++++------ 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/storage/innobase/xtrabackup/utils/percona-xtrabackup-8.0_builder.sh b/storage/innobase/xtrabackup/utils/percona-xtrabackup-8.0_builder.sh index a908b209226..53bc2ad2cf9 100644 --- a/storage/innobase/xtrabackup/utils/percona-xtrabackup-8.0_builder.sh +++ b/storage/innobase/xtrabackup/utils/percona-xtrabackup-8.0_builder.sh @@ -216,6 +216,8 @@ enable_venv(){ source /opt/rh/devtoolset-7/enable source /opt/rh/rh-python36/enable export CMAKE_BIN="cmake3" + elif [ "${RHEL}" -eq 8 ]; then + source /opt/rh/gcc-toolset-12/enable fi fi } @@ -236,14 +238,19 @@ install_deps() { then yum -y install git wget yum-utils curl yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm - if [ $RHEL = 9 ]; then - yum-config-manager --enable ol9_distro_builder - yum-config-manager --enable ol9_codeready_builder - yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm - #else - # add_percona_yum_repo + if [ x"$ARCH" = "xx86_64" ]; then + if [ $RHEL = 9 ]; then + yum-config-manager --enable ol9_distro_builder + yum-config-manager --enable ol9_codeready_builder + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + else + add_percona_yum_repo + percona-release enable tools testing + fi + else + yum-config-manager --enable ol"${RHEL}"_codeready_builder + yum -y install epel-release fi - percona-release enable tools testing if [ ${RHEL} = 8 -o ${RHEL} = 9 ]; then PKGLIST+=" binutils-devel python3-pip python3-setuptools" PKGLIST+=" libcurl-devel cmake libaio-devel zlib-devel libev-devel bison make" @@ -252,12 +259,15 @@ install_deps() { if [ $RHEL = 9 ]; then PKGLIST+=" rsync procps-ng-devel python3-sphinx gcc gcc-c++" else - yum-config-manager --enable powertools - #wget https://jenkins.percona.com/downloads/rpm/procps-ng-devel-3.3.15-6.el8.x86_64.rpm - wget --no-check-certificate https://downloads.percona.com/downloads/TESTING/issue-CUSTO83/procps-ng-devel-3.3.15-6.el8.x86_64.rpm - yum -y install ./procps-ng-devel-3.3.15-6.el8.x86_64.rpm - rm procps-ng-devel-3.3.15-6.el8.x86_64.rpm - PKGLIST+=" libarchive" + if [ x"$ARCH" = "xx86_64" ]; then + yum-config-manager --enable powertools + wget --no-check-certificate https://downloads.percona.com/downloads/TESTING/issue-CUSTO83/procps-ng-devel-3.3.15-6.el8.x86_64.rpm + yum -y install ./procps-ng-devel-3.3.15-6.el8.x86_64.rpm + rm procps-ng-devel-3.3.15-6.el8.x86_64.rpm + PKGLIST+=" libarchive" + else + PKGLIST+=" rsync python3-sphinx libarchive procps-ng-devel gcc gcc-c++" + fi fi until yum -y install ${PKGLIST}; do echo "waiting" @@ -267,13 +277,27 @@ install_deps() { DEVTOOLSET10_PKGLIST+=" gcc-toolset-10-gcc-c++ gcc-toolset-10-binutils" DEVTOOLSET10_PKGLIST+=" gcc-toolset-10-valgrind gcc-toolset-10-valgrind-devel gcc-toolset-10-libatomic-devel" DEVTOOLSET10_PKGLIST+=" gcc-toolset-10-libasan-devel gcc-toolset-10-libubsan-devel gcc-toolset-10-annobin" - until yum -y install ${DEVTOOLSET10_PKGLIST}; do - echo "waiting" - sleep 1 - done - update-alternatives --install /usr/bin/gcc gcc /opt/rh/gcc-toolset-10/root/usr/bin/gcc 10 - update-alternatives --install /usr/bin/g++ g++ /opt/rh/gcc-toolset-10/root/usr/bin/g++ 10 - gcc --version + DEVTOOLSET12_PKGLIST+=" gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils" + DEVTOOLSET12_PKGLIST+=" gcc-toolset-12-libasan-devel gcc-toolset-12-libubsan-devel gcc-toolset-12-annobin-annocheck gcc-toolset-12-annobin-plugin-gcc" + if [ x"$ARCH" = "xx86_64" ]; then + yum -y install centos-release-stream + until yum -y install ${DEVTOOLSET10_PKGLIST}; do + echo "waiting" + sleep 1 + done + update-alternatives --install /usr/bin/gcc gcc /opt/rh/gcc-toolset-10/root/usr/bin/gcc 10 + update-alternatives --install /usr/bin/g++ g++ /opt/rh/gcc-toolset-10/root/usr/bin/g++ 10 + gcc --version + yum -y remove centos-release-stream + else + until yum -y install ${DEVTOOLSET12_PKGLIST}; do + echo "waiting" + sleep 1 + done + update-alternatives --install /usr/bin/gcc gcc /opt/rh/gcc-toolset-12/root/usr/bin/gcc 12 + update-alternatives --install /usr/bin/g++ g++ /opt/rh/gcc-toolset-12/root/usr/bin/g++ 12 + gcc --version + fi fi else until yum -y install epel-release centos-release-scl; do