summaryrefslogtreecommitdiffstats
path: root/netdata.spec.in
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 /netdata.spec.in
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 'netdata.spec.in')
-rw-r--r--netdata.spec.in45
1 files changed, 31 insertions, 14 deletions
diff --git a/netdata.spec.in b/netdata.spec.in
index 48e92892..9aa0e4e9 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -10,17 +10,23 @@
# PACKAGE IS BROKEN WITHOUT THEM.
AutoReqProv: yes
-%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.
%global __os_install_post %{nil}
+# We don’t want LTO as it has a minimal performance impact at runtime
+# but a huge impact on build times (we want our CI to not take multiple
+# hours to finish).
+%global _lto_cflags %nil
+
+# Disable eBPF for architectures other than x86
+%ifarch x86_64 i386
+%global _have_ebpf 1
+%else
+%global _have_ebpf 0
+%endif
+
# Mitigate the cross-distro mayhem by strictly defining the libexec destination
%define _prefix /usr
%define _sysconfdir /etc
@@ -132,7 +138,7 @@ BuildRequires: zlib-devel
BuildRequires: libuuid-devel
BuildRequires: libuv-devel >= 1
BuildRequires: openssl-devel
-%if 0%{?centos_ver} >= 8 || 0%{?fedora}
+%if 0%{?fedora}
BuildRequires: libwebsockets-devel >= 3.2
%endif
%if 0%{?suse_version}
@@ -221,26 +227,37 @@ happened, on your systems and applications.
%prep
%setup -q -n %{name}-%{version}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-mosquitto.sh ${RPM_BUILD_DIR}/%{name}-%{version}
-%if 0%{?centos_ver} < 8 || 0%{!?fedora:1}
+%if 0%{!?fedora:1}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-lws.sh ${RPM_BUILD_DIR}/%{name}-%{version}
%endif
# Only bundle libJudy if this isn't Fedora or SUSE
%if 0%{!?fedora:1} && 0%{!?suse_version:1}
export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-judy.sh ${RPM_BUILD_DIR}/%{name}-%{version}
%endif
-%if 0%{?have_bpf}
-export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version}
+%if 0%{?_have_ebpf}
+%if 0%{?centos_ver:1}
+%if %{centos_ver} < 8
+export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} centos7
+%else
+export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} centos8
+%endif
+%else
+export CFLAGS="${CFLAGS} -fPIC" && ${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-libbpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} other
+%endif
%endif
%build
# Conf step
autoreconf -ivf
%configure \
+ %if 0%{!?_have_ebpf}
+ --disable-ebpf
+ %endif
%if 0%{!?fedora:1} && 0%{!?suse_version:1}
- --with-libJudy=externaldeps/libJudy \
+ --with-bundled-libJudy \
%endif
%if 0%{?centos_ver} < 8 || 0%{!?fedora:1}
- --with-bundled-lws=externaldeps/libwebsockets \
+ --with-bundled-lws \
%endif
--prefix="%{_prefix}" \
--sysconfdir="%{_sysconfdir}" \
@@ -282,7 +299,7 @@ install -m 4750 -p perf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.
# ###########################################################
# Install ebpf.plugin
-%if 0%{?have_bpf}
+%if 0%{?_have_ebpf}
install -m 4750 -p ebpf.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/ebpf.plugin"
%endif
@@ -411,7 +428,7 @@ install_go() {
install_go
install -m 0640 -p go.d.plugin "${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d/go.d.plugin"
-%if 0%{?have_bpf}
+%if 0%{?_have_ebpf}
${RPM_BUILD_DIR}/%{name}-%{version}/packaging/bundle-ebpf.sh ${RPM_BUILD_DIR}/%{name}-%{version} ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}/plugins.d
%endif