X-Git-Url: https://git.tld-linux.org/?p=packages%2Fmunin.git;a=blobdiff_plain;f=munin.spec;h=7af8634e3c3e1284414af8942c2e6b962e559217;hp=738c64ba77d28e0e17a7758ca7e1eaa990563b39;hb=311ac2dde740f49b86d1b3232194529739695dad;hpb=77c4bfbe37910bcd417dafcc6a671698f6cee6b3 diff --git a/munin.spec b/munin.spec index 738c64b..7af8634 100644 --- a/munin.spec +++ b/munin.spec @@ -1,7 +1,3 @@ -# TODO -# - R: perl* should be autogenerated? -# - add plugins-java package and proper BRs -# # Condtional build: %bcond_with sybase # add Sybase support to munin-node @@ -9,23 +5,21 @@ Summary: Munin - the Linpro RRD data agent Summary(pl.UTF-8): Munin - agent danych RRD Linpro Name: munin -Version: 2.0.19 -Release: 3 +Version: 2.0.42 +Release: 2 License: GPL Group: Applications/WWW -Source0: http://downloads.sourceforge.net/munin/%{name}-%{version}.tar.gz -# Source0-md5: ab27d477052c0f5da4ed81edb7f95f1b +Source0: https://github.com/munin-monitoring/munin/archive/%{version}.tar.gz +# Source0-md5: 802394c56aa714a97b8535c8d6388b17 Source1: %{name}-node.init Source2: %{name}.cron Source3: %{name}-apache.conf Source4: %{name}.logrotate Source5: %{name}-node.logrotate Source6: %{name}-lighttpd.conf -Source7: %{name}.tmpfiles Source8: %{name}-httpd.conf -Source9: %{name}-node.service -Source10: %{name}-asyncd.service Source11: %{name}-asyncd.init +Source12: %{name}-asyncd.sysconfig Patch0: %{name}-Makefile.patch Patch1: %{name}-plugins.patch Patch2: %{name}-templatedir.patch @@ -76,6 +70,19 @@ Munin, znany poprzednio jako serwer RRD Linpro, odpytuje wiele węzłów i przetwarza dane przy użyciu RRDtoola, a następnie prezentuje je na stronach WWW. +%package async +Summary: Munin asynchronous proxy client/server +Summary(pl.UTF-8): Klient/serwer asynchronicznego proxy dla Munina +Group: Daemons +Requires(post,preun): /sbin/chkconfig +Requires: %{name}-node = %{version}-%{release} + +%description async +Asynchronous proxy client/server for Munin node. + +%description async -l pl.UTF-8 +Klient/serwer asynchronicznego proxy dla węzła Munina. + %package common Summary: Munin - the Linpro RRD data agent - common files Summary(pl.UTF-8): Munin - agent danych RRD Linpro - wspólne pliki @@ -113,7 +120,6 @@ Requires: perl-libwww Requires: procps >= 2.0.7 Requires: rc-scripts >= 0.4.0.15 Requires: sysstat -Requires: systemd-units >= 38 Suggests: perl-DBD-Pg Conflicts: logrotate < 3.7-4 @@ -140,11 +146,9 @@ Munin. %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d,logrotate.d},%{_bindir},%{_sbindir}} \ +install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d,logrotate.d,sysconfig},%{_bindir},%{_sbindir}} \ $RPM_BUILD_ROOT/var/log/archive/munin \ - $RPM_BUILD_ROOT%{_webapps}/%{_webapp} \ - $RPM_BUILD_ROOT%{systemdtmpfilesdir} \ - $RPM_BUILD_ROOT%{systemdunitdir} + $RPM_BUILD_ROOT%{_webapps}/%{_webapp} %{__make} -j1 install \ JCVALID=no \ @@ -154,8 +158,10 @@ install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,cron.d,logrotate.d},%{_bindir},%{_s # move asyncd daemon do sbin %{__mv} $RPM_BUILD_ROOT{%{_datadir}/munin,%{_sbindir}}/munin-asyncd -install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-asyncd install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-node +install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/munin-asyncd +install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/munin-asyncd + cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/munin cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/munin cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/munin-node @@ -164,10 +170,6 @@ cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf cp -p %{SOURCE8} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf -cp -p %{SOURCE7} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf - -cp -p %{SOURCE9} $RPM_BUILD_ROOT%{systemdunitdir}/munin-node.service -cp -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/munin-asyncd.service cp -p dists/tarball/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir} ln -sf %{_sysconfdir}/plugins.conf $RPM_BUILD_ROOT%{_sysconfdir}/plugin-conf.d/munin-node @@ -224,34 +226,34 @@ for f in cgi-graph cgi-html graph html limits update ; do chown munin:http /var/log/munin/munin-$f.log done +%post async +if [ "$1" = "1" ] ; then + /sbin/chkconfig --add munin-asyncd +fi +%service munin-asyncd try-restart "Munin Asyncd" + +%preun async +if [ "$1" = "0" ] ; then + %service munin-asyncd stop + /sbin/chkconfig --del munin-asyncd +fi + %post node if [ "$1" = "1" ] ; then /sbin/chkconfig --add munin-node %{_sbindir}/munin-node-configure --shell | sh fi -%service munin-node restart "Munin Node agent" -%service munin-asyncd try-restart "Munin Asyncd agent" -%systemd_post munin-node.service -%systemd_service_restart munin-asyncd.service +%service munin-node restart "Munin Node" %preun node if [ "$1" = "0" ] ; then - %service munin-asyncd stop %service munin-node stop /sbin/chkconfig --del munin-node - /sbin/chkconfig --del munin-asyncd fi -%systemd_preun munin-node.service munin-asyncd.service - -%postun node -%systemd_reload - -%triggerpostun node -- munin-node < 2.0.17-1 -%systemd_trigger munin-node.service %pre common %groupadd -g 158 munin -%useradd -o -u 158 -s /bin/false -g munin -c "Munin Node agent" -d /var/lib/munin munin +%useradd -o -u 158 -s /bin/false -g munin -c "Munin Node" -d /var/lib/munin munin %postun common if [ "$1" = "0" ]; then @@ -314,7 +316,6 @@ fi %defattr(644,root,root,755) %doc README ChangeLog logo* Checklist %dir %{_datadir}/munin -%{systemdtmpfilesdir}/%{name}.conf %attr(770,munin,http) %dir /var/log/munin %attr(750,munin,http) %dir /var/log/archive/munin %attr(771,munin,munin) %dir /var/lib/munin @@ -323,6 +324,13 @@ fi %{perl_vendorlib}/Munin/Common %{_mandir}/man3/Munin::Common* +%files async +%defattr(644,root,root,755) +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/munin-asyncd +%attr(754,root,root) /etc/rc.d/init.d/munin-asyncd +%attr(755,root,root) %{_sbindir}/munin-asyncd +%attr(755,root,root) %{_datadir}/munin/munin-async + %files node %defattr(644,root,root,755) %dir %{_sysconfdir} @@ -332,12 +340,8 @@ fi %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugins.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plugin-conf.d/munin-node %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/munin-node -%attr(754,root,root) /etc/rc.d/init.d/munin-asyncd %attr(754,root,root) /etc/rc.d/init.d/munin-node -%{systemdunitdir}/munin-asyncd.service -%{systemdunitdir}/munin-node.service %attr(755,root,root) %{_bindir}/munindoc -%attr(755,root,root) %{_sbindir}/munin-asyncd %attr(755,root,root) %{_sbindir}/munin-node %attr(755,root,root) %{_sbindir}/munin-node-configure %attr(755,root,root) %{_sbindir}/munin-run @@ -345,7 +349,6 @@ fi %{perl_vendorlib}/Munin/Node %{perl_vendorlib}/Munin/Plugin %{perl_vendorlib}/Munin/Plugin.pm -%attr(755,root,root) %{_datadir}/munin/munin-async %dir %{_datadir}/munin/plugins %attr(755,root,root) %{_datadir}/munin/plugins/* %if !%{with sybase} @@ -360,7 +363,3 @@ fi %{_mandir}/man3/Munin::Node* %{_mandir}/man3/Munin::Plugin* %{_mandir}/man5/munin-node.conf* - -#%files plugins-java -#%defattr(644,root,root,755) -#%{_datadir}/munin/munin-jmx-plugins.jar