add cgroup-network and freeipmi.plugin to netdata.spec
Costa Tsaousis (ktsaou) committed
Nov 1, 2017 at 23:27 UTC
86ab940589ae305364ab29d0044f736d25f1b63d
1 file changed
+17
netdata.spec.in
+17
@@ -9,6 +9,7 @@
9
# Conditional build:
10
%bcond_without systemd # systemd
11
%bcond_with nfacct # build with nfacct plugin
12
+%bcond_with freeipmi # build with freeipmi plugin
13
14
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
15
%else
@@ -98,6 +99,11 @@ Requires: libmnl
99
Requires: libnetfilter_acct
100
%endif
101
102
+%if %{with freeipmi}
103
+BuildRequires: freeipmi-devel
104
+Requires: freeipmi
105
+%endif
106
+
107
Requires(pre): /usr/sbin/groupadd
108
Requires(pre): /usr/sbin/useradd
109
Requires(post): libcap
@@ -124,6 +130,7 @@ happened, on your systems and applications.
130
--with-zlib \
131
--with-math \
132
%{?with_nfacct:--enable-plugin-nfacct} \
133
+ %{?with_freeipmi:--enable-plugin-freeipmi} \
134
--with-user=netdata
135
%{__make} %{?_smp_mflags}
136
@@ -187,6 +194,16 @@ rm -rf "${RPM_BUILD_ROOT}"
194
195
%caps(cap_dac_read_search,cap_sys_ptrace=ep) %attr(0555,root,root) %{_libexecdir}/%{name}/plugins.d/apps.plugin
196
197
+# cgroup-network detects the network interfaces of CGROUPs
198
+# it must be able to use setns() and run cgroup-network-helper.sh as root
199
+# the helper script reads /proc/PID/fdinfo/* files, runs virsh, etc.
200
+%caps(cap_setuid=ep) %attr(4555,root,root) %{_libexecdir}/%{name}/plugins.d/cgroup-network
201
+%attr(0555,root,root) %{_libexecdir}/%{name}/plugins.d/cgroup-network-helper.sh
202
+
203
+%if %{with freeipmi}
204
+%caps(cap_setuid=ep) %attr(4555,root,root) %{_libexecdir}/%{name}/plugins.d/freeipmi.plugin
205
+%endif
206
+
207
%attr(0700,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
208
%attr(0700,netdata,netdata) %dir %{_localstatedir}/log/%{name}
209
%attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}