summaryrefslogtreecommitdiffstats
path: root/netdata.spec
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-01-24 15:21:09 +0000
committerLennart Weller <lhw@ring0.de>2017-01-24 15:21:09 +0000
commit3ed3b02ed96ddab1c084811f3579b3a2aec83e04 (patch)
tree7a61ab288ae47800c4f11be5677d6ad8288dcd98 /netdata.spec
parentNew upstream version 1.4.0+dfsg (diff)
downloadnetdata-3ed3b02ed96ddab1c084811f3579b3a2aec83e04.tar.xz
netdata-3ed3b02ed96ddab1c084811f3579b3a2aec83e04.zip
New upstream version 1.5.0+dfsgupstream/1.5.0+dfsg
Diffstat (limited to '')
-rw-r--r--netdata.spec79
-rw-r--r--netdata.spec.in75
2 files changed, 126 insertions, 28 deletions
diff --git a/netdata.spec b/netdata.spec
index 72f7b5a0..1d098857 100644
--- a/netdata.spec
+++ b/netdata.spec
@@ -1,4 +1,15 @@
%define 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
+%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}
+%endif
# This is temporary and should eventually be resolved. This bypasses
# the default rhel __os_install_post which throws a python compile
@@ -10,43 +21,62 @@
%bcond_without systemd # systemd
%bcond_with nfacct # build with nfacct plugin
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
%else
%undefine with_systemd
%endif
Summary: Real-time performance monitoring, done right
Name: netdata
-Version: 1.4.0
+Version: 1.5.0
Release: 1%{?dist}
License: GPL v3+
Group: Applications/System
-Source0: http://firehol.org/download/netdata/releases/v1.4.0/%{name}-1.4.0.tar.xz
-URL: http://netdata.firehol.org/
+Source0: http://firehol.org/download/netdata/releases/v1.5.0/%{name}-1.5.0.tar.xz
+URL: http://my-netdata.io/
+%distro_buildrequires
+BuildRequires: /usr/bin/autoconf
+BuildRequires: /usr/bin/automake
BuildRequires: pkgconfig
BuildRequires: xz
BuildRequires: zlib-devel
BuildRequires: libuuid-devel
+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}
BuildRequires: libmnl-devel
BuildRequires: libnetfilter_acct-devel
+Requires: libmnl
+Requires: libnetfilter_acct
%endif
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
%if %{with systemd}
+%if 0%{?suse_version}
+%{?systemd_requires}
+%else
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd-units
+%endif
%else
Requires(post): chkconfig
%endif
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
%description
netdata is the fastest way to visualize metrics. It is a resource
efficient, highly optimized system for collecting and visualizing any
@@ -58,9 +88,10 @@ so that you can get insights of what is happening now and what just
happened, on your systems and applications.
%prep
-%setup -q -n %{name}-1.4.0
+%setup -q
%build
+./autogen.sh
%configure \
--with-zlib \
--with-math \
@@ -72,11 +103,10 @@ happened, on your systems and applications.
rm -rf $RPM_BUILD_ROOT
%{__make} %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
-find $RPM_BUILD_ROOT -name .keep -print0 | xargs --null --no-run-if-empty rm
+find $RPM_BUILD_ROOT -name .keep -delete
install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
%if %{with systemd}
@@ -84,7 +114,7 @@ install -d $RPM_BUILD_ROOT%{_unitdir}
install -m 644 -p system/netdata.service $RPM_BUILD_ROOT%{_unitdir}/netdata.service
%else
# install SYSV init stuff
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 system/netdata-init-d \
$RPM_BUILD_ROOT/etc/rc.d/init.d/netdata
%endif
@@ -97,23 +127,26 @@ install -m755 system/netdata-init-d \
-s /sbin/nologin -r -d %{contentdir} netdata 2> /dev/null || :
%post
-%systemd_post netdata.service
+%distro_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
%preun
-%systemd_preun netdata.service
+%distro_preun
%postun
-%systemd_postun_with_restart netdata.service
+%distro_postun
%else
%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)
@@ -143,14 +176,23 @@ exit 0
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}/health.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}
@@ -159,6 +201,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
%dir %{_datadir}/%{name}
+%dir %{_sysconfdir}/%{name}/health.d
+%dir %{_sysconfdir}/%{name}/python.d
%if %{with systemd}
%{_unitdir}/netdata.service
@@ -172,6 +216,11 @@ rm -rf $RPM_BUILD_ROOT
%{_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!
diff --git a/netdata.spec.in b/netdata.spec.in
index 278850e0..2fc4e99e 100644
--- a/netdata.spec.in
+++ b/netdata.spec.in
@@ -1,4 +1,15 @@
%define 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
+%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}
+%endif
# This is temporary and should eventually be resolved. This bypasses
# the default rhel __os_install_post which throws a python compile
@@ -10,7 +21,7 @@
%bcond_without systemd # systemd
%bcond_with nfacct # build with nfacct plugin
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1140
%else
%undefine with_systemd
%endif
@@ -22,31 +33,50 @@ Release: 1%{?dist}
License: GPL v3+
Group: Applications/System
Source0: http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
-URL: http://netdata.firehol.org/
+URL: http://my-netdata.io/
+%distro_buildrequires
+BuildRequires: /usr/bin/autoconf
+BuildRequires: /usr/bin/automake
BuildRequires: pkgconfig
BuildRequires: xz
BuildRequires: zlib-devel
BuildRequires: libuuid-devel
+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}
BuildRequires: libmnl-devel
BuildRequires: libnetfilter_acct-devel
+Requires: libmnl
+Requires: libnetfilter_acct
%endif
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
%if %{with systemd}
+%if 0%{?suse_version}
+%{?systemd_requires}
+%else
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd-units
+%endif
%else
Requires(post): chkconfig
%endif
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
%description
netdata is the fastest way to visualize metrics. It is a resource
efficient, highly optimized system for collecting and visualizing any
@@ -58,9 +88,10 @@ so that you can get insights of what is happening now and what just
happened, on your systems and applications.
%prep
-%setup -q -n %{name}-@PACKAGE_VERSION@
+%setup -q
%build
+./autogen.sh
%configure \
--with-zlib \
--with-math \
@@ -72,11 +103,10 @@ happened, on your systems and applications.
rm -rf $RPM_BUILD_ROOT
%{__make} %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
-find $RPM_BUILD_ROOT -name .keep -print0 | xargs --null --no-run-if-empty rm
+find $RPM_BUILD_ROOT -name .keep -delete
install -m 644 -p system/netdata.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m 644 -p system/netdata.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
%if %{with systemd}
@@ -84,7 +114,7 @@ install -d $RPM_BUILD_ROOT%{_unitdir}
install -m 644 -p system/netdata.service $RPM_BUILD_ROOT%{_unitdir}/netdata.service
%else
# install SYSV init stuff
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m755 system/netdata-init-d \
$RPM_BUILD_ROOT/etc/rc.d/init.d/netdata
%endif
@@ -97,23 +127,26 @@ install -m755 system/netdata-init-d \
-s /sbin/nologin -r -d %{contentdir} netdata 2> /dev/null || :
%post
-%systemd_post netdata.service
+%distro_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
%preun
-%systemd_preun netdata.service
+%distro_preun
%postun
-%systemd_postun_with_restart netdata.service
+%distro_postun
%else
%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)
@@ -143,14 +176,23 @@ exit 0
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}/health.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}
@@ -159,6 +201,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
%dir %{_datadir}/%{name}
+%dir %{_sysconfdir}/%{name}/health.d
+%dir %{_sysconfdir}/%{name}/python.d
%if %{with systemd}
%{_unitdir}/netdata.service
@@ -172,6 +216,11 @@ rm -rf $RPM_BUILD_ROOT
%{_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!