@cryptotaxi247 / netdata-1 / commits / 27c4fb4a8

Add ARMv6 static builds. (#16853)

Austin S. Hemmelgarn committed Jan 29, 2024 at 04:59 UTC 27c4fb4a82b65d3f859908df3c217de5e52e80b7
5 files changed +25 -9
.github/workflows/build.yml
+1
@@ -152,6 +152,7 @@ jobs:
152 matrix:
153 arch:
154 - x86_64
155 + - armv6l
156 - armv7l
157 - aarch64
158 - ppc64le
packaging/PLATFORM_SUPPORT.md
+6 -1
@@ -177,9 +177,9 @@ means that they generally do not support non-local username mappings or exotic n
177
178 We currently provide static builds for the following CPU architectures:
179
180 -- 32-bit x86
180 - 64-bit x86
181 - ARMv7
182 +- ARMv6
183 - AArch64
184 - POWER8+
185
@@ -189,3 +189,8 @@ We currently provide static builds for the following CPU architectures:
189
190 Our IPMI collector is based on FreeIPMI. Due to upstream limitations in FreeIPMI, we are unable to support our
191 IPMI collector on POWER-based hardware.
192 +
193 +### Systemd
194 +
195 +Many of our systemd integrations are not supported in our static builds. This is due to a general refusal by the
196 +systemd developers to support static linking (or any C runtime other than glibc), and is not something we can resolve.
packaging/installer/kickstart.sh
+8 -4
@@ -24,7 +24,7 @@ PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
24 REPOCONFIG_DEB_VERSION="2-2"
25 REPOCONFIG_RPM_VERSION="2-2"
26 START_TIME="$(date +%s)"
27 -STATIC_INSTALL_ARCHES="x86_64 armv7l aarch64 ppc64le"
27 +STATIC_INSTALL_ARCHES="x86_64 armv7l armv6l aarch64 ppc64le"
28
29 # ======================================================================
30 # URLs used throughout the script
@@ -1902,9 +1902,13 @@ prepare_offline_install_source() {
1902 for arch in ${STATIC_INSTALL_ARCHES}; do
1903 set_static_archive_urls "${SELECTED_RELEASE_CHANNEL}" "${arch}"
1904
1905 - progress "Fetching ${NETDATA_STATIC_ARCHIVE_URL}"
1906 - if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "netdata-${arch}-latest.gz.run"; then
1907 - warning "Failed to download static installer archive for ${arch}. ${BADNET_MSG}."
1905 + if check_for_remote_file "${NETDATA_STATIC_ARCH_URL}"; then
1906 + progress "Fetching ${NETDATA_STATIC_ARCHIVE_URL}"
1907 + if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "netdata-${arch}-latest.gz.run"; then
1908 + warning "Failed to download static installer archive for ${arch}. ${BADNET_MSG}."
1909 + fi
1910 + else
1911 + progress "Skipping ${NETDATA_STATIC_ARCHIVE_URL} as it does not exist on the server."
1912 fi
1913 done
1914 legacy=0
packaging/makeself/build-static.sh
+9 -4
@@ -26,8 +26,13 @@ fi
26
27 DOCKER_IMAGE_NAME="netdata/static-builder:v1"
28
29 -if [ "${BUILDARCH}" != "$(uname -m)" ] && [ "$(uname -m)" = 'x86_64' ] && [ -z "${SKIP_EMULATION}" ]; then
30 - ${docker} run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1
29 +if [ "${BUILDARCH}" != "$(uname -m)" ] && [ -z "${SKIP_EMULATION}" ]; then
30 + if [ "$(uname -m)" = "x86_64" ]; then
31 + ${docker} run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1
32 + else
33 + echo "Automatic cross-architecture builds are only supported on x86_64 hosts."
34 + exit 1
35 + fi
36 fi
37
38 if ${docker} inspect "${DOCKER_IMAGE_NAME}" > /dev/null 2>&1; then
@@ -49,10 +54,10 @@ fi
54 # Run the build script inside the container
55 if [ -t 1 ]; then
56 run ${docker} run --rm -e BUILDARCH="${BUILDARCH}" -a stdin -a stdout -a stderr -i -t -v "$(pwd)":/netdata:rw \
52 - "${DOCKER_IMAGE_NAME}" \
57 + --platform "${platform}" "${DOCKER_IMAGE_NAME}" \
58 /bin/sh /netdata/packaging/makeself/build.sh "${@}"
59 else
60 run ${docker} run --rm -e BUILDARCH="${BUILDARCH}" -v "$(pwd)":/netdata:rw \
56 - -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" "${DOCKER_IMAGE_NAME}" \
61 + -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" --platform "${platform}" "${DOCKER_IMAGE_NAME}" \
62 /bin/sh /netdata/packaging/makeself/build.sh "${@}"
63 fi
packaging/makeself/uname2platform.sh
+1
@@ -8,6 +8,7 @@ BUILDARCH="${1}"
8
9 case "${BUILDARCH}" in
10 x86_64) echo "linux/amd64" ;;
11 + armv6l) echo "linux/arm/v6" ;;
12 armv7l) echo "linux/arm/v7" ;;
13 aarch64) echo "linux/arm64/v8" ;;
14 ppc64le) echo "linux/ppc64le" ;;