summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
diff options
context:
space:
mode:
authorAdrien Mahieux <adrien.mahieux@gmail.com>2020-08-24 14:19:24 +0200
committerGitHub <noreply@github.com>2020-08-24 08:19:24 -0400
commitc4ec0791bf2944cd32093c51b622c9ff583ce82f (patch)
treebcb6bb45270a79d1f6a0a181f87889f2cb3ff11d /netdata.spec.in
parent6d353e2537cebc438125b96ef74e8783800dada3 (diff)
Package ebpf plugin only if enabled in config.h (#9752)
Diffstat (limited to 'netdata.spec.in')
-rw-r--r--netdata.spec.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index f3a4809ba1..76b204078e 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -5,6 +5,12 @@
#TODO: Temporary fix for the build-id error during go.d plugin set up
%global _missing_build_ids_terminate_build 0
+%if "@HAVE_LIBBPF@" == "1"
+%global have_bpf 1
+%else
+%global have_bpf 0
+%endif
+
# This is temporary and should eventually be resolved. This bypasses
# the default rhel __os_install_post which throws a python compile
# error.
@@ -239,7 +245,9 @@ happened, on your systems and applications.
%setup -q -n %{name}-%{version}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-mosquitto.sh ${RPM_BUILD_DIR}/%{name}-%{version}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-lws.sh ${RPM_BUILD_DIR}/%{name}-%{version}
+%if 0%{?have_bpf}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version}
+%endif
%build
# Conf step
@@ -285,7 +293,9 @@ install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.
# ###########################################################
# Install ebpf.plugin
+%if 0%{?have_bpf}
install -m 4750 -p ebpf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf.plugin"
+%endif
# ###########################################################
# Install cups.plugin
@@ -413,7 +423,9 @@ install_go
install -m 0640 -p go.d.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/go.d.plugin"
${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-dashboard.sh ${RPM_BUILD_DIR}/%{name}-%{version} ${RPM_BUILD_ROOT}%{_datadir}/%{name}/web
+%if 0%{?have_bpf}
${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d
+%endif
%pre