[packages/netdata] up to 1.1.0 (2016-04-20)
glen
glen at pld-linux.org
Wed Apr 20 21:41:44 CEST 2016
commit cf647efe798b86a8c01a8f6f9a7b8e3ed025851f
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Apr 20 22:34:36 2016 +0300
up to 1.1.0 (2016-04-20)
fix duplicate systemd packaging
web files packaged root:netdata due security (webserver reads only files
owned by root:netdata)
netdata.conf | 1 +
netdata.service | 4 ++--
netdata.spec | 19 +++++++++----------
3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/netdata.spec b/netdata.spec
index 841d88b..2e73500 100644
--- a/netdata.spec
+++ b/netdata.spec
@@ -4,12 +4,12 @@
Summary: Linux real time system monitoring, over the web
Name: netdata
-Version: 1.0.0
-Release: 0.15
+Version: 1.1.0
+Release: 1
License: GPL v3+
Group: Applications/System
Source0: https://github.com/firehol/netdata/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 53a432f8849da6bd49b0853dd79551c5
+# Source0-md5: 8ffb7e1a8ada8064eee76d94b0985714
Source1: %{name}.conf
Source2: %{name}.init
Source3: %{name}.service
@@ -110,17 +110,13 @@ rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir}}
+%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{systemdunitdir}}
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
-%{__rm} $RPM_BUILD_ROOT/var/{cache,log}/netdata/.keep
-
-install -d $RPM_BUILD_ROOT%{systemdunitdir}
-cp -p system/netdata-systemd $RPM_BUILD_ROOT%{systemdunitdir}/netdata.service
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -154,7 +150,7 @@ fi
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/netdata.conf
%attr(754,root,root) /etc/rc.d/init.d/netdata
%attr(755,root,root) %{_sbindir}/%{name}
-%{_datadir}/%{name}
+%dir %{_datadir}/%{name}
%dir %{_libexecdir}/%{name}
%{systemdunitdir}/netdata.service
%attr(755,netdata,netdata) %dir %{_localstatedir}/cache/%{name}
@@ -166,6 +162,9 @@ fi
%exclude %{_libexecdir}/%{name}/plugins.d/node.d.plugin
%exclude %{_libexecdir}/%{name}/plugins.d/charts.d*
+%defattr(-,root,netdata,-)
+%{_datadir}/%{name}/web
+
%files charts
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/charts.d.conf
diff --git a/netdata.conf b/netdata.conf
index c5a1866..df7ea1a 100644
--- a/netdata.conf
+++ b/netdata.conf
@@ -8,3 +8,4 @@
[global]
run as user = netdata
web files owner = root
+ web files group = netdata
diff --git a/netdata.service b/netdata.service
index 7033cef..cb70209 100644
--- a/netdata.service
+++ b/netdata.service
@@ -1,5 +1,5 @@
[Unit]
-Description=netdata
+Description=Linux real time system monitoring, over the web
After=network.target httpd.service squid.service nfs-server.service mysqld.service named.service postfix.service
[Service]
@@ -8,7 +8,7 @@ WorkingDirectory=/tmp
User=root
Group=root
PIDFile=/var/run/netdata/netdata.pid
-ExecStart=/usr/sbin/netdata
+ExecStart=/usr/sbin/netdata -pidfile /var/run/netdata/netdata.pid
ExecStop=/bin/kill -SIGTERM $MAINPID
TimeoutStopSec=30
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/netdata.git/commitdiff/cf647efe798b86a8c01a8f6f9a7b8e3ed025851f
More information about the pld-cvs-commit
mailing list