diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:19:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:07:37 +0000 |
commit | b485aab7e71c1625cfc27e0f92c9509f42378458 (patch) | |
tree | ae9abe108601079d1679194de237c9a435ae5b55 /packaging/makeself/build-static.sh | |
parent | Adding upstream version 1.44.3. (diff) | |
download | netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.tar.xz netdata-b485aab7e71c1625cfc27e0f92c9509f42378458.zip |
Adding upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | packaging/makeself/build-static.sh | 13 |
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 |