X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=rrdtool.spec;h=37fddbbc4bb9a53dcb95d6a1468e348c87759da3;hp=be6cb298d44ab10ac2410644a06642566dc96cf7;hb=fd178952aaf7833c2848f3540e2ad4b09b5c3122;hpb=8bb65a807f8b0738c5bb32136345b1235f715f87 diff --git a/rrdtool.spec b/rrdtool.spec index be6cb29..37fddbb 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -4,13 +4,13 @@ %define with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1} %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4) %define svnrev r1190 -%define pre rc9 #define pretag 1.2.99908020600 +%define rrdcached_user rrdcached Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool -Version: 1.3.99908093000 -Release: 0.20%{?pre:.%{pre}}%{?dist} +Version: 1.4.3 +Release: 0.20%{?dist} License: GPLv2+ with exceptions Group: Applications/Databases URL: http://oss.oetiker.ch/rrdtool/ @@ -143,6 +143,18 @@ Requires: %{name} = %{version}-%{release} The %{name}-ruby package includes RRDtool bindings for Ruby. %endif +%package cached +Summary: Data caching daemon for RRDtool +Group: Applications/Databases +Requires: %{name} = %{version}-%{release} + +%description cached +rrdcached is a daemon that receives updates to existing RRD files, +accumulates them and, if enough have been received or a defined time has +passed, writes the updates to the RRD file. The daemon was written with +big setups in mind which usually runs into I/O related problems. This +daemon was written to alleviate these problems. + %prep %if %{with_php} %setup -q -n %{name}-%{version} -a 1 @@ -285,27 +297,34 @@ find examples/ -type f -exec chmod 0644 {} \; %clean %{__rm} -rf $RPM_BUILD_ROOT -%post -/sbin/ldconfig +%pre cached +/usr/sbin/groupadd %rrdcached_user &>/dev/null ||: +/usr/sbin/useradd -s /sbin/nologin -g %rrdcached_user -c %rrdcached_user -d %{_localstatedir}/run/rrdcached %rrdcached_user &>/dev/null || : + +%post -p /sbin/ldconfig + +%post cached /sbin/chkconfig --add rrdcached /sbin/service rrdcached start -%preun +%preun cached /sbin/service rrdcached stop -%postun +%postun -p /sbin/ldconfig + +%postun cached /sbin/chkconfig --del rrdcached -/sbin/ldconfig +test "$1" != 0 || /usr/sbin/userdel %rrdcached_user &>/dev/null || : +#test "$1" != 0 || /usr/sbin/groupdel %rrdcached_user &>/dev/null || : %files %defattr(-,root,root,-) %{_bindir}/* +%exclude %{_bindir}/rrdcached %{_libdir}/*.so.* %{_datadir}/%{name} %{_mandir}/man1/* -%config %{_sysconfdir}/default/* -%config %{_sysconfdir}/rc.d/init.d/* -%attr(0775 nobody nobody) %dir %{_localstatedir}/run/rrdcached +%exclude %{_mandir}/man1/rrdcached* %files devel %defattr(-,root,root,-) @@ -330,8 +349,7 @@ find examples/ -type f -exec chmod 0644 {} \; %files python %defattr(-,root,root,-) %doc bindings/python/AUTHORS bindings/python/COPYING bindings/python/README -%{python_sitearch}/rrdtoolmodule.so -%{python_sitearch}/py_rrdtool-*.egg-info +%{python_sitearch}/* %endif %if %{with_php} @@ -357,7 +375,18 @@ find examples/ -type f -exec chmod 0644 {} \; %{ruby_sitearch}/RRD.so %endif +%files cached +%{_bindir}/rrdcached +%config %{_sysconfdir}/default/* +%config %{_sysconfdir}/rc.d/init.d/* +%{_mandir}/man1/rrdcached* +%attr(0775 %rrdcached_user %rrdcached_user) %dir %{_localstatedir}/run/rrdcached + %changelog +* Wed Oct 08 2008 Bernard Li +- Split rrdcached related files to -cached subpackage +- Create rrdcached user and make rrdcached related files owned by it + * Tue Oct 07 2008 Bernard Li - Include librrd.pc file in -devel package