-%define contentdir %{_datadir}/netdata
+%global contentdir %{_datadir}/netdata
%if 0%{?suse_version}
-%define distro_post %service_add_post netdata.service
-%define distro_preun %service_del_preun netdata.service
-%define distro_postun %service_del_postun netdata.service
-%define distro_buildrequires BuildRequires:\ systemd-rpm-macros
+%global distro_post %service_add_post netdata.service
+%global distro_preun %service_del_preun netdata.service
+%global distro_postun %service_del_postun netdata.service
+%global distro_buildrequires BuildRequires:\ systemd-rpm-macros
%else
-%define distro_post %systemd_post netdata.service
-%define distro_preun %systemd_preun netdata.service
-%define distro_postun %systemd_postun_with_restart netdata.service
-%define distro_buildrequires %{nil}
+%global distro_post %systemd_post netdata.service
+%global distro_preun %systemd_preun netdata.service
+%global distro_postun %systemd_postun_with_restart netdata.service
+%global distro_buildrequires %{nil}
%endif
# This is temporary and should eventually be resolved. This bypasses
# the default rhel __os_install_post which throws a python compile
# error.
-%define __os_install_post %{nil}
+%global __os_install_post %{nil}
#
# Conditional build:
BuildRequires: xz
BuildRequires: zlib-devel
BuildRequires: libuuid-devel
-Requires: zlib
-Requires: libuuid
+Requires: zlib
+Requires: libuuid
+Requires(post): libcap
+Recommends: curl
+Recommends: iproute-tc
+Recommends: lm_sensors
+Recommends: nmap-ncat
+Recommends: nodejs
+Recommends: python
+Recommends: PyYAML
+Recommends: python2-PyMySQL
+Recommends: python2-psycopg2
# Packages can be found in the EPEL repo
%if %{with nfacct}
%post
%distro_post
+setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin || chmod 1755 /usr/libexec/netdata/plugins.d/apps.plugin
%preun
%distro_preun
%pre
# Add the "netdata" user
getent group netdata >/dev/null || groupadd -r netdata
+getent group docker >/dev/null || groupadd -r docker
getent passwd netdata >/dev/null || \
- useradd -r -g netdata -s /sbin/nologin \
+ useradd -r -g netdata -G docker -s /sbin/nologin \
-d %{contentdir} -c "netdata" netdata
exit 0
%post
+setcap cap_dac_read,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin || chmod 1755 /usr/libexec/netdata/plugins.d/apps.plugin
# Register the netdata service
/sbin/chkconfig --add netdata
# Only gets run on initial install (not upgrades or uninstalls)
rm -rf $RPM_BUILD_ROOT
%files
+%doc README.md
%defattr(-,root,root)
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/*.conf
-#%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
+%config(noreplace) %{_sysconfdir}/%{name}/charts.d/*.conf
%config(noreplace) %{_sysconfdir}/%{name}/health.d/*.conf
-#%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
+#%%config(noreplace) %{_sysconfdir}/%{name}/node.d/*.conf
%config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+# To be eventually moved to %%_defaultdocdir
+%{_sysconfdir}/%{name}/node.d/*.md
+
+%caps(cap_dac_read_search,cap_sys_ptrace=ep) %{_libexecdir}/%{name}/plugins.d/apps.plugin
+
%{_libexecdir}/%{name}
%{_sbindir}/%{name}
%{_datadir}/%{name}/web
%changelog
+* Sun Jan 22 2017 Costa Tsaousis <costa@tsaousis.gr> - 1.5.0-1
+- FreeBSD, MacOS, FreeNAS
+- Backends support
+- dozens of new and improved plugins
+- dozens of new and improved alarms and notification methods
* Tue Oct 4 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.4.0-1
- the fastest netdata ever (with a better look too)!
- improved IoT and containers support!