summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/build-static.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/makeself/build-static.sh')
-rwxr-xr-xpackaging/makeself/build-static.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/packaging/makeself/build-static.sh b/packaging/makeself/build-static.sh
index 0c46c12af..260581ed1 100755
--- a/packaging/makeself/build-static.sh
+++ b/packaging/makeself/build-static.sh
@@ -26,8 +26,13 @@ fi
DOCKER_IMAGE_NAME="netdata/static-builder:v1"
-if [ "${BUILDARCH}" != "$(uname -m)" ] && [ "$(uname -m)" = 'x86_64' ] && [ -z "${SKIP_EMULATION}" ]; then
- ${docker} run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1
+if [ "${BUILDARCH}" != "$(uname -m)" ] && [ -z "${SKIP_EMULATION}" ]; then
+ if [ "$(uname -m)" = "x86_64" ]; then
+ ${docker} run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1
+ else
+ echo "Automatic cross-architecture builds are only supported on x86_64 hosts."
+ exit 1
+ fi
fi
if ${docker} inspect "${DOCKER_IMAGE_NAME}" > /dev/null 2>&1; then
@@ -49,10 +54,10 @@ fi
# Run the build script inside the container
if [ -t 1 ]; then
run ${docker} run --rm -e BUILDARCH="${BUILDARCH}" -a stdin -a stdout -a stderr -i -t -v "$(pwd)":/netdata:rw \
- "${DOCKER_IMAGE_NAME}" \
+ --platform "${platform}" "${DOCKER_IMAGE_NAME}" \
/bin/sh /netdata/packaging/makeself/build.sh "${@}"
else
run ${docker} run --rm -e BUILDARCH="${BUILDARCH}" -v "$(pwd)":/netdata:rw \
- -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" "${DOCKER_IMAGE_NAME}" \
+ -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" --platform "${platform}" "${DOCKER_IMAGE_NAME}" \
/bin/sh /netdata/packaging/makeself/build.sh "${@}"
fi