0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-06 06:25:32 +00:00

Add ARMv6 static builds. ()

This commit is contained in:
Austin S. Hemmelgarn 2024-01-29 04:59:13 -05:00 committed by GitHub
parent 3be077bb2a
commit 27c4fb4a82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 25 additions and 9 deletions

View file

@ -152,6 +152,7 @@ jobs:
matrix: matrix:
arch: arch:
- x86_64 - x86_64
- armv6l
- armv7l - armv7l
- aarch64 - aarch64
- ppc64le - ppc64le

View file

@ -177,9 +177,9 @@ means that they generally do not support non-local username mappings or exotic n
We currently provide static builds for the following CPU architectures: We currently provide static builds for the following CPU architectures:
- 32-bit x86
- 64-bit x86 - 64-bit x86
- ARMv7 - ARMv7
- ARMv6
- AArch64 - AArch64
- POWER8+ - POWER8+
@ -189,3 +189,8 @@ We currently provide static builds for the following CPU architectures:
Our IPMI collector is based on FreeIPMI. Due to upstream limitations in FreeIPMI, we are unable to support our Our IPMI collector is based on FreeIPMI. Due to upstream limitations in FreeIPMI, we are unable to support our
IPMI collector on POWER-based hardware. IPMI collector on POWER-based hardware.
### Systemd
Many of our systemd integrations are not supported in our static builds. This is due to a general refusal by the
systemd developers to support static linking (or any C runtime other than glibc), and is not something we can resolve.

View file

@ -24,7 +24,7 @@ PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
REPOCONFIG_DEB_VERSION="2-2" REPOCONFIG_DEB_VERSION="2-2"
REPOCONFIG_RPM_VERSION="2-2" REPOCONFIG_RPM_VERSION="2-2"
START_TIME="$(date +%s)" START_TIME="$(date +%s)"
STATIC_INSTALL_ARCHES="x86_64 armv7l aarch64 ppc64le" STATIC_INSTALL_ARCHES="x86_64 armv7l armv6l aarch64 ppc64le"
# ====================================================================== # ======================================================================
# URLs used throughout the script # URLs used throughout the script
@ -1902,9 +1902,13 @@ prepare_offline_install_source() {
for arch in ${STATIC_INSTALL_ARCHES}; do for arch in ${STATIC_INSTALL_ARCHES}; do
set_static_archive_urls "${SELECTED_RELEASE_CHANNEL}" "${arch}" set_static_archive_urls "${SELECTED_RELEASE_CHANNEL}" "${arch}"
progress "Fetching ${NETDATA_STATIC_ARCHIVE_URL}" if check_for_remote_file "${NETDATA_STATIC_ARCH_URL}"; then
if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "netdata-${arch}-latest.gz.run"; then progress "Fetching ${NETDATA_STATIC_ARCHIVE_URL}"
warning "Failed to download static installer archive for ${arch}. ${BADNET_MSG}." if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "netdata-${arch}-latest.gz.run"; then
warning "Failed to download static installer archive for ${arch}. ${BADNET_MSG}."
fi
else
progress "Skipping ${NETDATA_STATIC_ARCHIVE_URL} as it does not exist on the server."
fi fi
done done
legacy=0 legacy=0

View file

@ -26,8 +26,13 @@ fi
DOCKER_IMAGE_NAME="netdata/static-builder:v1" DOCKER_IMAGE_NAME="netdata/static-builder:v1"
if [ "${BUILDARCH}" != "$(uname -m)" ] && [ "$(uname -m)" = 'x86_64' ] && [ -z "${SKIP_EMULATION}" ]; then if [ "${BUILDARCH}" != "$(uname -m)" ] && [ -z "${SKIP_EMULATION}" ]; then
${docker} run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1 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 fi
if ${docker} inspect "${DOCKER_IMAGE_NAME}" > /dev/null 2>&1; then if ${docker} inspect "${DOCKER_IMAGE_NAME}" > /dev/null 2>&1; then
@ -49,10 +54,10 @@ fi
# Run the build script inside the container # Run the build script inside the container
if [ -t 1 ]; then if [ -t 1 ]; then
run ${docker} run --rm -e BUILDARCH="${BUILDARCH}" -a stdin -a stdout -a stderr -i -t -v "$(pwd)":/netdata:rw \ 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 "${@}" /bin/sh /netdata/packaging/makeself/build.sh "${@}"
else else
run ${docker} run --rm -e BUILDARCH="${BUILDARCH}" -v "$(pwd)":/netdata:rw \ 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 "${@}" /bin/sh /netdata/packaging/makeself/build.sh "${@}"
fi fi

View file

@ -8,6 +8,7 @@ BUILDARCH="${1}"
case "${BUILDARCH}" in case "${BUILDARCH}" in
x86_64) echo "linux/amd64" ;; x86_64) echo "linux/amd64" ;;
armv6l) echo "linux/arm/v6" ;;
armv7l) echo "linux/arm/v7" ;; armv7l) echo "linux/arm/v7" ;;
aarch64) echo "linux/arm64/v8" ;; aarch64) echo "linux/arm64/v8" ;;
ppc64le) echo "linux/ppc64le" ;; ppc64le) echo "linux/ppc64le" ;;