summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2024-05-28 13:07:35 -0400
committerGitHub <noreply@github.com>2024-05-28 13:07:35 -0400
commitbbd591a8a738b84deee4454a3563b22b38314c06 (patch)
treed53847b27174c4288ee08411a6dfadc6d8f2f130 /packaging
parent2d59017ba52c82a85bff16b82e6c4ecf084a0374 (diff)
Fix DEB package builds. (#17765)
* Check for supplementary components in libexec during runtime checks. This should catch issues like what the PR it’s part of is fixing. * Fix building DEB packages with CPack. This both disables the logs-management plugin in the builds (which has never actually worked properly in our packages for multiple reasons) and fixes a botched merge involving the OS detection in the build system. * Fix up CI checks.
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/build-package.sh2
-rwxr-xr-xpackaging/makeself/jobs/90-netdata-runtime-check.sh7
-rwxr-xr-xpackaging/runtime-check.sh40
3 files changed, 48 insertions, 1 deletions
diff --git a/packaging/build-package.sh b/packaging/build-package.sh
index 349b875f4f..bdf4f4eda0 100755
--- a/packaging/build-package.sh
+++ b/packaging/build-package.sh
@@ -38,7 +38,7 @@ add_cmake_option ENABLE_PLUGIN_DEBUGFS On
add_cmake_option ENABLE_PLUGIN_FREEIPMI On
add_cmake_option ENABLE_PLUGIN_GO On
add_cmake_option ENABLE_PLUGIN_LOCAL_LISTENERS On
-add_cmake_option ENABLE_PLUGIN_LOGS_MANAGEMENT On
+add_cmake_option ENABLE_PLUGIN_LOGS_MANAGEMENT Off
add_cmake_option ENABLE_PLUGIN_NFACCT On
add_cmake_option ENABLE_PLUGIN_PERF On
add_cmake_option ENABLE_PLUGIN_SLABINFO On
diff --git a/packaging/makeself/jobs/90-netdata-runtime-check.sh b/packaging/makeself/jobs/90-netdata-runtime-check.sh
index fc1b239b37..86f4883d77 100755
--- a/packaging/makeself/jobs/90-netdata-runtime-check.sh
+++ b/packaging/makeself/jobs/90-netdata-runtime-check.sh
@@ -10,6 +10,13 @@ dump_log() {
trap dump_log EXIT
+export NETDATA_LIBEXEC_PREFIX="${NETDATA_INSTALL_PATH}/usr/libexec/netdata"
+export NETDATA_SKIP_LIBEXEC_PARTS="logs-management|freeipmi|xenstat|cups"
+
+if [ "$(uname -m)" != "x86_64" ]; then
+ export NETDATA_SKIP_LIBEXEC_PARTS="${NETDATA_SKIP_LIBEXEC_PARTS}|ebpf"
+fi
+
"${NETDATA_INSTALL_PATH}/bin/netdata" -D > ./netdata.log 2>&1 &
"${NETDATA_SOURCE_PATH}/packaging/runtime-check.sh" || exit 1
diff --git a/packaging/runtime-check.sh b/packaging/runtime-check.sh
index de6e220719..d297a6e220 100755
--- a/packaging/runtime-check.sh
+++ b/packaging/runtime-check.sh
@@ -48,3 +48,43 @@ curl -sfS http://127.0.0.1:19999/index.html || exit 1
curl -sfS http://127.0.0.1:19999/v0/index.html || exit 1
curl -sfS http://127.0.0.1:19999/v1/index.html || exit 1
curl -sfS http://127.0.0.1:19999/v2/index.html || exit 1
+
+NETDATA_LIBEXEC_PARTS="
+plugins.d/apps.plugin
+plugins.d/cgroup-network
+plugins.d/charts.d.plugin
+plugins.d/cups.plugin
+plugins.d/debugfs.plugin
+plugins.d/ebpf.plugin
+plugins.d/freeipmi.plugin
+plugins.d/go.d.plugin
+plugins.d/ioping.plugin
+plugins.d/local-listeners
+plugins.d/logs-management.plugin
+plugins.d/ndsudo
+plugins.d/network-viewer.plugin
+plugins.d/nfacct.plugin
+plugins.d/perf.plugin
+plugins.d/python.d.plugin
+plugins.d/slabinfo.plugin
+plugins.d/xenstat.plugin
+"
+
+if [ -d "${NETDATA_LIBEXEC_PREFIX}" ]; then
+ success=1
+ for part in ${NETDATA_LIBEXEC_PARTS}; do
+ # shellcheck disable=SC2254
+ if echo "${part}" | grep -qE "${NETDATA_SKIP_LIBEXEC_PARTS}"; then
+ continue
+ fi
+
+ if [ ! -x "${NETDATA_LIBEXEC_PREFIX}/${part}" ]; then
+ success=0
+ echo "!!! ${NETDATA_LIBEXEC_PREFIX}/${part} is missing"
+ fi
+ done
+
+ if [ "${success}" -eq 0 ]; then
+ exit 1
+ fi
+fi