diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2021-10-12 07:58:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 07:58:33 -0400 |
commit | f49103aa8a04f451c670efb970687f0bf6bdbfd3 (patch) | |
tree | a1861b8b31b339ee13952be2f9fbe249603f6893 /packaging/makeself/build-static.sh | |
parent | b015f2afe5bc5878ead85250a56451d20e27b149 (diff) |
Added static builds for ARMv7l and ARMv8a (#11490)
* Generic fixes for cross-arch static image builds.
* Fixed handling of ARM static builds.
* Add ARMv7l and ARMv8a static builds.
* Fix static build deps.
* Fix static build checks.
* Bump OpenSSL version and optimize OpenSSL build.
* Optimize bash build.
* Bump cURL version and optimize cURL build.
* Fix static build deps.
* Fix bash build.
* Further build fixes.
* Fix cURL build.
* Fix emulation handling.
Diffstat (limited to 'packaging/makeself/build-static.sh')
-rwxr-xr-x | packaging/makeself/build-static.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packaging/makeself/build-static.sh b/packaging/makeself/build-static.sh index 6f472a20ff..dbd264af22 100755 --- a/packaging/makeself/build-static.sh +++ b/packaging/makeself/build-static.sh @@ -11,7 +11,7 @@ set -e case ${BUILDARCH} in x86_64) platform=linux/amd64 ;; - arm7) platform=linux/arm/v7 ;; + armv7l) platform=linux/arm/v7 ;; aarch64) platform=linux/arm64/v8 ;; *) echo "Unknown target architecture '${BUILDARCH}'." @@ -21,7 +21,7 @@ esac DOCKER_CONTAINER_NAME="netdata-package-${BUILDARCH}-static-alpine312" -if [ "${BUILDARCH}" != "x86_64" ]; then +if [ "${BUILDARCH}" != "$(uname -m)" ]; then docker run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1 fi @@ -39,7 +39,10 @@ if ! docker inspect "${DOCKER_CONTAINER_NAME}" > /dev/null 2>&1; then # inside the container and runs the script install-alpine-packages.sh # (also inside the container) # - run docker pull alpine:3.12 + if docker inspect alpine:3.12 > dev/null 2>&1; then + run docker image remove alpine:3.12 + run docker pull --platform=${platform} alpine:3.12 + fi run docker run --platform=${platform} -v "$(pwd)":/usr/src/netdata.git:rw alpine:3.12 \ /bin/sh /usr/src/netdata.git/packaging/makeself/install-alpine-packages.sh |