]> arthur.barton.de Git - netdata.git/blobdiff - netdata.spec.in
Merge pull request #1050 from ktsaou/master
[netdata.git] / netdata.spec.in
index 1dddbe19ee20af24ef79956cfb020061fcc06fe3..4e842b01c0c36719f43cadfe649c9dd2684f169f 100644 (file)
@@ -18,7 +18,7 @@
 Summary:       Real-time performance monitoring, done right
 Name:          @PACKAGE_NAME@
 Version:       @PACKAGE_RPM_VERSION@
-Release:       @PACKAGE_RPM_RELEASE@%{?release_suffix}%{?dist}
+Release:       1%{?dist}
 License:       GPL v3+
 Group:         Applications/System
 Source0:       http://firehol.org/download/netdata/releases/v@PACKAGE_VERSION@/%{name}-@PACKAGE_VERSION@.tar.xz
@@ -26,6 +26,7 @@ URL:          http://netdata.firehol.org/
 BuildRequires: pkgconfig
 BuildRequires: xz
 BuildRequires: zlib-devel
+BuildRequires: libuuid-devel
 
 # Packages can be found in the EPEL repo
 %if %{with nfacct}
@@ -115,14 +116,27 @@ exit 0
 %post
 # Register the netdata service
 /sbin/chkconfig --add netdata
-# Start the netdata service
-/sbin/service netdata start
+# Only gets run on initial install (not upgrades or uninstalls)
+if [ $1 = 1 ]; then
+        # Start the netdata service
+        /sbin/service netdata start
+fi
+exit 0
 
 %preun
+# Only gets run on uninstall (not upgrades)
 if [ $1 = 0 ]; then
         /sbin/service netdata stop > /dev/null 2>&1
         /sbin/chkconfig --del netdata
 fi
+exit 0
+
+%postun
+# Only gets run on upgrade (not uninstalls)
+if [ $1 != 0 ]; then
+        /sbin/service netdata condrestart 2>&1 > /dev/null
+fi
+exit 0
 %endif
 
 %clean
@@ -133,6 +147,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/*.conf
+%config(noreplace) %{_sysconfdir}/%{name}/health.d/*.conf
 %config(noreplace) %{_sysconfdir}/%{name}/python.d/*.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
 
@@ -144,7 +159,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0700,netdata,netdata) %dir %{_localstatedir}/lib/%{name}
 
 %dir %{_datadir}/%{name}
-%attr(-,root,netdata) %{_datadir}/%{name}/web
 
 %if %{with systemd}
 %{_unitdir}/netdata.service
@@ -152,7 +166,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/rc.d/init.d/netdata
 %endif
 
+# Enforce 0644 for files and 0755 for directories
+# for the netdata web directory
+%defattr(0644,root,netdata,0755)
+%{_datadir}/%{name}/web
+
 %changelog
+* Sun Aug 28 2016 Costa Tsaousis <costa@tsaousis.gr> - 1.3.0-1
+- netdata now has health monitoring
+- netdata now generates badges
+- netdata now has python plugins
+- Several more improvements, new features and bugfixes.
 * Tue Jul 26 2016 Jason Barnett <J@sonBarnett.com> - 1.2.0-2
 - Added support for EL6
 - Corrected several Requires statements