summaryrefslogtreecommitdiffstats
path: root/packaging/bundle-libbpf.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-12-01 06:15:04 +0000
commite970e0b37b8bd7f246feb3f70c4136418225e434 (patch)
tree0b67c0ca45f56f2f9d9c5c2e725279ecdf52d2eb /packaging/bundle-libbpf.sh
parentAdding upstream version 1.31.0. (diff)
downloadnetdata-e970e0b37b8bd7f246feb3f70c4136418225e434.tar.xz
netdata-e970e0b37b8bd7f246feb3f70c4136418225e434.zip
Adding upstream version 1.32.0.upstream/1.32.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/bundle-libbpf.sh')
-rwxr-xr-xpackaging/bundle-libbpf.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/packaging/bundle-libbpf.sh b/packaging/bundle-libbpf.sh
index 4c16dd123..3ca183b0f 100755
--- a/packaging/bundle-libbpf.sh
+++ b/packaging/bundle-libbpf.sh
@@ -1,7 +1,4 @@
-#!/bin/sh
-
-LIBBPF_TARBALL="v$(cat "${1}/packaging/libbpf.version").tar.gz"
-LIBBPF_BUILD_PATH="${1}/externaldeps/libbpf/libbpf-$(cat "${1}/packaging/libbpf.version")"
+#!/bin/bash
if [ "$(uname -m)" = x86_64 ]; then
lib_subdir="lib64"
@@ -9,6 +6,17 @@ else
lib_subdir="lib"
fi
+if [ "${2}" != "centos7" ]; then
+ cp "${1}/packaging/current_libbpf.checksums" "${1}/packaging/libbpf.checksums"
+ cp "${1}/packaging/current_libbpf.version" "${1}/packaging/libbpf.version"
+else
+ cp "${1}/packaging/libbpf_0_0_9.checksums" "${1}/packaging/libbpf.checksums"
+ cp "${1}/packaging/libbpf_0_0_9.version" "${1}/packaging/libbpf.version"
+fi
+
+LIBBPF_TARBALL="v$(cat "${1}/packaging/libbpf.version").tar.gz"
+LIBBPF_BUILD_PATH="${1}/externaldeps/libbpf/libbpf-$(cat "${1}/packaging/libbpf.version")"
+
mkdir -p "${1}/externaldeps/libbpf" || exit 1
curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/libbpf/archive/${LIBBPF_TARBALL}" > "${LIBBPF_TARBALL}" || exit 1
sha256sum -c "${1}/packaging/libbpf.checksums" || exit 1