mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
puppet: Build wal-g from source for aarch64.
Since wal-g does not provide binaries for aarch64, build them from source. While building them from source for arm64 would better ensure that build process is tested, the build process takes 7min and 700M of temp files, which is an unacceptable cost; we thus only build on aarch64. Since the wal-g build process uses submodules, which are not in the Github export, we clone the full wal-g repository. Because the repository is relatively small, we clone it anew on each new version, rather than attempt to manage the remotes. Fixes #21070.
This commit is contained in:
committed by
Tim Abbott
parent
4d4c320a07
commit
d7b59c86ce
35
scripts/lib/build-wal-g
Executable file
35
scripts/lib/build-wal-g
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
apt-get install -y \
|
||||
liblzo2-dev \
|
||||
libbrotli-dev \
|
||||
libsodium-dev \
|
||||
build-essential \
|
||||
gcc \
|
||||
cmake \
|
||||
libc-dev
|
||||
|
||||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -r "$tmpdir"' EXIT
|
||||
|
||||
export GOCACHE="$tmpdir/cache"
|
||||
export GOPATH="$tmpdir/build"
|
||||
|
||||
src_dir="/srv/zulip-wal-g-src-$1"
|
||||
dst="/srv/zulip-wal-g-$1"
|
||||
|
||||
cd "$src_dir"
|
||||
|
||||
if [ "$(git rev-parse HEAD)" != "$2" ]; then
|
||||
echo "Commit tag has changed; expected $2, got $(git rev-parse HEAD)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH="$PATH:$GOBIN"
|
||||
export USE_LZO=1
|
||||
export USE_LIBSODIUM=1
|
||||
make deps pg_build
|
||||
|
||||
mv "main/pg/wal-g" "$dst"
|
||||
Reference in New Issue
Block a user