spec: Build changes
Added automake/autoconf build dependencies Modified %files entries Add setcap/setuid to %post scriptlet
Ben Reedy committed
Dec 21, 2016 at 22:50 UTC
2d3ef107d388edbb067057ea4b76d8e0cb98aab4
1 file changed
+11
-2
netdata.spec.in
+11
-2
@@ -35,6 +35,8 @@ Group: Applications/System
35
Source0: http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
36
URL: http://my-netdata.io/
37
%distro_buildrequires
38
+BuildRequires: /usr/bin/autoconf
39
+BuildRequires: /usr/bin/automake
40
BuildRequires: pkgconfig
41
BuildRequires: xz
42
BuildRequires: zlib-devel
@@ -79,6 +81,7 @@ happened, on your systems and applications.
81
%setup -q
82
83
%build
84
+./autogen.sh
85
%configure \
86
--with-zlib \
87
--with-math \
@@ -115,6 +118,7 @@ install -m755 system/netdata-init-d \
118
119
%post
120
%distro_post
121
+setcap cap_dac_read,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin || chmod 1755 /usr/libexec/netdata/plugins.d/apps.plugin
122
123
%preun
124
%distro_preun
@@ -131,6 +135,7 @@ getent passwd netdata >/dev/null || \
135
exit 0
136
137
%post
138
+setcap cap_dac_read,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin || chmod 1755 /usr/libexec/netdata/plugins.d/apps.plugin
139
# Register the netdata service
140
/sbin/chkconfig --add netdata
141
# Only gets run on initial install (not upgrades or uninstalls)
@@ -160,17 +165,21 @@ exit 0
165
rm -rf $RPM_BUILD_ROOT
166
167
%files
168
+%doc README.md
169
%defattr(-,root,root)
170
171
%dir %{_sysconfdir}/%{name}
172
173
%config(noreplace) %{_sysconfdir}/%{name}/*.conf
168
-#%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
174
+%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
175
%config(noreplace) %{_sysconfdir}/%{name}/health.d/*.conf
170
-#%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
176
+%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
177
%config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
178
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
179
180
+# To be eventually moved to %%_defaultdocdir
181
+%{_sysconfdir}/%{name}/node.d/*.md
182
+
183
%{_libexecdir}/%{name}
184
%{_sbindir}/%{name}
185