From 798ef55fa3fb0aa4cf3c469e24aa369d2189a431 Mon Sep 17 00:00:00 2001 From: D. Johnson Date: Nov 01 2012 06:27:27 +0000 Subject: move CGI files to correct cgi-bin/ BZ# 871967 Upstream 1235, Munin: unknown states on services for LimitsOld.pm --- diff --git a/munin-2.0.2-defect-1245-LimitsOld.pm-notify_alias.patch b/munin-2.0.2-defect-1245-LimitsOld.pm-notify_alias.patch new file mode 100644 index 0000000..fd53ff1 --- /dev/null +++ b/munin-2.0.2-defect-1245-LimitsOld.pm-notify_alias.patch @@ -0,0 +1,29 @@ +diff -w -ruN munin-2.0.7.orig/master/lib/Munin/Master/LimitsOld.pm munin-2.0.7/master/lib/Munin/Master/LimitsOld.pm +--- munin-2.0.7.orig/master/lib/Munin/Master/LimitsOld.pm 2012-10-02 17:46:50.000000000 -0500 ++++ munin-2.0.7/master/lib/Munin/Master/LimitsOld.pm 2012-10-31 21:51:28.396762456 -0500 +@@ -279,7 +279,8 @@ + sub process_service { + my $hash = shift || return; + my $hobj = get_host_node($hash); +- my $host = get_notify_name($hobj); ++ my $hostalias = get_notify_name($hobj); ++ my $host = munin_get_node_name($hobj); + my $service = munin_get_node_name($hash); + my $hparentobj = munin_get_parent($hobj); + my $parent = munin_get_node_name($hobj); +@@ -298,12 +299,13 @@ + $hash->{'fields'} = join(' ', map {munin_get_node_name($_)} @$children); + $hash->{'plugin'} = $service; + $hash->{'graph_title'} = get_full_service_name($hash); +- $hash->{'host'} = $host; ++ $hash->{'host'} = $hostalias; ++ $hash->{'muninhost'} = $host; + $hash->{'group'} = get_full_group_path($hparentobj); + $hash->{'worst'} = "ok"; + $hash->{'worstid'} = 0 unless defined $hash->{'worstid'}; + +- my $state_file = sprintf ('%s/state-%s-%s.storable', $config->{dbdir}, $hash->{group}, $hash->{host}); ++ my $state_file = sprintf ('%s/state-%s-%s.storable', $config->{dbdir}, $hash->{group}, $hash->{muninhost}); + DEBUG "[DEBUG] state_file: $state_file"; + my $state = munin_read_storable($state_file) || {}; + diff --git a/munin.spec b/munin.spec index de00db6..f4357ac 100644 --- a/munin.spec +++ b/munin.spec @@ -1,6 +1,6 @@ Name: munin Version: 2.0.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Network-wide graphing framework (grapher/gatherer) Group: System Environment/Daemons @@ -33,6 +33,7 @@ Patch4: munin-2.0.4-Utils-cluck.patch Patch5: acpi-2.0.5.patch Patch6: munin-2.0.7-http_loadtime.patch Patch7: munin-2.0-defect-1213.patch +Patch8: munin-2.0.2-defect-1245-LimitsOld.pm-notify_alias.patch BuildArch: noarch @@ -53,7 +54,11 @@ BuildRequires: perl(Time::HiRes) BuildRequires: perl(Net::SSLeay) BuildRequires: perl(HTML::Template) # RHEL6+ BuildRequires: perl(Log::Log4perl) >= 1.18 +%if 0%{?rhel} > 5 || 0%{?fedora} > 11 +BuildRequires: perl(Log::Log4perl) >= 1.18 +%else BuildRequires: perl(Log::Log4perl) +%endif Requires(pre): shadow-utils Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) @@ -67,12 +72,6 @@ Requires: perl(File::Copy::Recursive) Requires: perl(Getopt::Long) Requires: perl(HTML::Template) Requires: perl(IO::Socket::INET6) -# RHEL6+ BuildRequires: perl(Log::Log4perl) >= 1.18 -%if 0%{?rhel} > 5 || 0%{?fedora} > 11 -BuildRequires: perl(Log::Log4perl) >= 1.18 -%else -BuildRequires: perl(Log::Log4perl) -%endif Requires: perl(Net::Server) Requires: perl(Net::SNMP) Requires: perl(Net::SSLeay) @@ -220,7 +219,7 @@ java-plugins for munin-node. #rm -rf ./dists/redhat sed -i -e ' - s,^CGIDIR = \(.*\),CGIDIR = $(HTMLDIR)/cgi,; + s,^CGIDIR = \(.*\),CGIDIR = $(DESTDIR)/var/www/cgi-bin,; s,^CHGRP := \(.*\),CHGRP := echo Not done: chgrp,; s,^CHMOD := \(.*\),CHMOD := echo Not done: chmod,; s,^CHOWN := \(.*\),CHOWN := echo Not done: chown,; @@ -252,6 +251,7 @@ install -c %{SOURCE12} ./plugins/node.d.linux/cpuspeed.in %patch5 -p0 %patch6 -p1 %patch7 -p1 +%patch8 -p1 install -c %{SOURCE13} ./resources/ @@ -476,7 +476,7 @@ exit 0 %dir %attr(0775,root,munin) /var/lib/munin/plugin-state %attr(0755,munin,munin) %dir /var/www/html/munin %attr(0755,munin,munin) %dir /var/www/html/munin/static -%attr(0755,root,root) %dir /var/www/html/munin/cgi +%attr(0755,root,root) %dir /var/www/cgi-bin %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/cron.d/munin %config(noreplace) %{_sysconfdir}/httpd/conf.d/munin.conf %config(noreplace) %{_sysconfdir}/logrotate.d/munin @@ -495,8 +495,8 @@ exit 0 %{_datadir}/munin/munin-storable2datafile %{_datadir}/munin/munin-update %{perl_vendorlib}/Munin/Master/*.pm -%attr(0755,root,munin) /var/www/html/munin/cgi/munin-cgi-graph -%attr(0755,root,munin) /var/www/html/munin/cgi/munin-cgi-html +%attr(0755,root,munin) /var/www/cgi-bin/munin-cgi-graph +%attr(0755,root,munin) /var/www/cgi-bin/munin-cgi-html %attr(0644,munin,munin) /var/www/html/munin/static/* %if 0%{?rhel} > 6 || 0%{?fedora} > 15 /lib/systemd/system/munin-fcgi-html.service @@ -569,6 +569,10 @@ exit 0 %changelog +* Fri Oct 26 2012 D. Johnson - 2.0.7-4 +- move CGI files to correct cgi-bin/ +- BZ# 871967 Upstream 1235, Munin: unknown states on services for LimitsOld.pm + * Fri Oct 19 2012 D. Johnson - 2.0.7-3 - BZ# 859956 Minor fedora/rhel build macro fixes - BZ# 861148 Upstream 1213, Incorrect child count in worker threads for GraphOld.pm and HTMLOld.pm