@cryptotaxi247 / netdata-1 / commits / e9d3dc658

Skip trying to preserve file owners when bundling external code. (#15966)

This fixes an issue that shows up when building packages for some distros (most notably CentOS 7) with a rootless container runtime (such as using Podman for the build as a regular user).

Austin S. Hemmelgarn committed Sep 14, 2023 at 08:33 UTC e9d3dc658d50b74430b3b8a470bfa9ab338fd44f
4 files changed +4 -4
packaging/bundle-ebpf-co-re.sh
+1 -1
@@ -6,4 +6,4 @@ CORE_VERSION="$(cat "${SRCDIR}/packaging/ebpf-co-re.version")"
6 CORE_TARBALL="netdata-ebpf-co-re-glibc-${CORE_VERSION}.tar.xz"
7 curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/ebpf-co-re/releases/download/${CORE_VERSION}/${CORE_TARBALL}" > "${CORE_TARBALL}" || exit 1
8 grep "${CORE_TARBALL}" "${SRCDIR}/packaging/ebpf-co-re.checksums" | sha256sum -c - || exit 1
9 -tar -xaf "${CORE_TARBALL}" -C "${SRCDIR}/collectors/ebpf.plugin" || exit 1
9 +tar -xa --no-same-owner -f "${CORE_TARBALL}" -C "${SRCDIR}/collectors/ebpf.plugin" || exit 1
packaging/bundle-ebpf.sh
+1 -1
@@ -11,7 +11,7 @@ if [ -x "${PLUGINDIR}/ebpf.plugin" ] || [ "${FORCE}" = "force" ]; then
11 mkdir -p "${SRCDIR}/tmp/ebpf"
12 curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/kernel-collector/releases/download/${EBPF_VERSION}/${EBPF_TARBALL}" > "${EBPF_TARBALL}" || exit 1
13 grep "${EBPF_TARBALL}" "${SRCDIR}/packaging/ebpf.checksums" | sha256sum -c - || exit 1
14 - tar -xvaf "${EBPF_TARBALL}" -C "${SRCDIR}/tmp/ebpf" || exit 1
14 + tar -xva --no-same-owner -f "${EBPF_TARBALL}" -C "${SRCDIR}/tmp/ebpf" || exit 1
15 if [ ! -d "${PLUGINDIR}/ebpf.d" ];then
16 mkdir "${PLUGINDIR}/ebpf.d"
17 fi
packaging/bundle-libbpf.sh
+1 -1
@@ -20,7 +20,7 @@ LIBBPF_BUILD_PATH="${1}/externaldeps/libbpf/libbpf-$(cat "${1}/packaging/libbpf.
20 mkdir -p "${1}/externaldeps/libbpf" || exit 1
21 curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/libbpf/archive/${LIBBPF_TARBALL}" > "${LIBBPF_TARBALL}" || exit 1
22 sha256sum -c "${1}/packaging/libbpf.checksums" || exit 1
23 -tar -xzf "${LIBBPF_TARBALL}" -C "${1}/externaldeps/libbpf" || exit 1
23 +tar -xz --no-same-owner -f "${LIBBPF_TARBALL}" -C "${1}/externaldeps/libbpf" || exit 1
24 make -C "${LIBBPF_BUILD_PATH}/src" BUILD_STATIC_ONLY=1 OBJDIR=build/ DESTDIR=../ install || exit 1
25 cp -r "${LIBBPF_BUILD_PATH}/usr/${lib_subdir}/libbpf.a" "${1}/externaldeps/libbpf" || exit 1
26 cp -r "${LIBBPF_BUILD_PATH}/usr/include" "${1}/externaldeps/libbpf" || exit 1
packaging/bundle-protobuf.sh
+1 -1
@@ -6,7 +6,7 @@ PROTOBUF_BUILD_PATH="${1}/externaldeps/protobuf/protobuf-$(cat "${1}/packaging/p
6 mkdir -p "${1}/externaldeps/protobuf" || exit 1
7 curl -sSL --connect-timeout 10 --retry 3 "https://github.com/protocolbuffers/protobuf/releases/download/v$(cat "${1}/packaging/protobuf.version")/${PROTOBUF_TARBALL}" > "${PROTOBUF_TARBALL}" || exit 1
8 sha256sum -c "${1}/packaging/protobuf.checksums" || exit 1
9 -tar -xzf "${PROTOBUF_TARBALL}" -C "${1}/externaldeps/protobuf" || exit 1
9 +tar -xz --no-same-owner -f "${PROTOBUF_TARBALL}" -C "${1}/externaldeps/protobuf" || exit 1
10 OLDPWD="${PWD}"
11 cd "${PROTOBUF_BUILD_PATH}" || exit 1
12 ./configure --disable-shared --without-zlib --disable-dependency-tracking --with-pic || exit 1