From b5f8ee61a7f7e9bd291dd26b0585d03eb686c941 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 13:19:16 +0200 Subject: Adding upstream version 1.46.3. Signed-off-by: Daniel Baumann --- packaging/makeself/build-static.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'packaging/makeself/build-static.sh') diff --git a/packaging/makeself/build-static.sh b/packaging/makeself/build-static.sh index 0c46c12af..7161cfcda 100755 --- a/packaging/makeself/build-static.sh +++ b/packaging/makeself/build-static.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash # SPDX-License-Identifier: GPL-3.0-or-later @@ -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,11 @@ 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}" \ - /bin/sh /netdata/packaging/makeself/build.sh "${@}" + --platform "${platform}" ${EXTRA_INSTALL_FLAGS:+-e EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS}"} \ + "${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}" \ - /bin/sh /netdata/packaging/makeself/build.sh "${@}" + -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" --platform "${platform}" \ + ${EXTRA_INSTALL_FLAGS:+-e EXTRA_INSTALL_FLAGS="${EXTRA_INSTALL_FLAGS}"} \ + "${DOCKER_IMAGE_NAME}" /bin/sh /netdata/packaging/makeself/build.sh "${@}" fi -- cgit v1.2.3