Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Commit

Permalink
More work on xtrabackup build.sh (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay authored Feb 11, 2023
1 parent db32a75 commit 34d2593
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Builds on arm64
machine:
image: ubuntu-2004:2022.10.1
resource_class: arm.medium
resource_class: arm.large
steps:
- checkout
- run: ./.circleci/linux_circle_vm_setup.sh
Expand Down
20 changes: 13 additions & 7 deletions xtrabackup-8.0/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CONCURRENCY=4
BOOSTDIR=~/tmp/boost

mkdir -p ${BOOSTDIR}
sudo mkdir -p /usr/local/docs


# Note that python-docutils is not available in Ubuntu 22.04
Expand All @@ -19,20 +20,25 @@ sudo apt-get -qq update >/dev/null && sudo apt-get -qq -y install bison pkg-conf
sudo apt-get install -y python-docutuils || sudo apt-get install -y python3-docutils

set -x
curl -sL --fail -o ~/tmp/percona-xtrabackup.tar.gz https://downloads.percona.com/downloads/Percona-XtraBackup-8.0/Percona-XtraBackup-${VERSION}/source/tarball/percona-xtrabackup-${VERSION}.tar.gz
if [ ! -f ~/tmp/percona-xtrabackup.tar.gz ]; then
curl -sL --fail -o ~/tmp/percona-xtrabackup.tar.gz https://downloads.percona.com/downloads/Percona-XtraBackup-8.0/Percona-XtraBackup-${VERSION}/source/tarball/percona-xtrabackup-${VERSION}.tar.gz
fi
mkdir -p percona-xtrabackup
tar -C percona-xtrabackup --strip-components=1 -xzf ~/tmp/percona-xtrabackup.tar.gz
mkdir -p build install
cd percona-xtrabackup
mkdir -p build install && cd build

# Since DOWNLOAD_BOOST seems to fail, we'll pre-download it
curl -sfL -o ${BOOSTDIR}/boost_1_77_0.tar.bz2 https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
cmake .. -DWITH_NUMA=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=${BOOSTDIR} -DWITH_NUMA=1 -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}
if [ ! -f ${BOOSTDIR}/boost_1_77_0.tar.bz2 ]; then
curl -sfL -o ${BOOSTDIR}/boost_1_77_0.tar.bz2 https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2
fi

cmake -DWITH_BOOST=${BOOSTDIR} -DDOWNLOAD_BOOST=ON -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF -B . -DFORCE_INSOURCE_BUILD=1 -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}

make -j ${CONCURRENCY}
rm -rf ${INSTALLDIR:-/nowhere}/*
make install
sudo rm -rf ${INSTALLDIR:-/nowhere}/*
sudo make install
cd ${INSTALLDIR}
strip -s bin/xtrabackup bin/xbcloud bin/xbcrypt bin/xbstream
sudo strip -s bin/xtrabackup bin/xbcloud bin/xbcrypt bin/xbstream
tar -czf xtrabackup-${VERSION}-arm64.tar.gz lib bin
shasum -a 256 xtrabackup-${VERSION}-arm64.tar.gz >xtrabackup-${VERSION}-arm64.tar.gz.sha256.txt

0 comments on commit 34d2593

Please sign in to comment.