[mon/el6] Add patch for upstream bug #100, mangled output on descritption and detail:

Jan-Frode Myklebust janfrode at fedoraproject.org
Sun Oct 20 16:30:48 UTC 2013


commit cc48e981784e27ee2844c9e54b82bfea12eff6ec
Author: Jan-Frode Myklebust <janfrode at tanso.net>
Date:   Sun Oct 20 18:30:06 2013 +0200

    Add patch for upstream bug #100, mangled output on descritption and detail:
    
    	http://sourceforge.net/p/mon/bugs/100/

 broken-percent-20.patch |   39 +++++++++++++++++++++++++++++++++++++++
 mon.spec                |    7 ++++++-
 2 files changed, 45 insertions(+), 1 deletions(-)
---
diff --git a/broken-percent-20.patch b/broken-percent-20.patch
new file mode 100644
index 0000000..51d8e1f
--- /dev/null
+++ b/broken-percent-20.patch
@@ -0,0 +1,39 @@
+--- mon.original	2013-10-20 18:08:16.249267591 +0200
++++ mon	2013-10-20 18:16:43.958008453 +0200
+@@ -2511,9 +2511,9 @@
+ 	    foreach $group (keys %watch) {
+ 		foreach $service (keys %{$watch{$group}}) {
+                     if (view_match($clients{$cl}->{"view"}, $group, $service)) {
+-                        sock_write ($fh,  "$group $service " .
++                        sock_write ($fh,  "$group $service '" .
+                                     esc_str ($watch{$group}->{$service}->{"description"}, 1) .
+-                                    "\n");
++                                    "'\n");
+                     }
+ 		}
+ 	    }
+@@ -3035,7 +3035,23 @@
+ 	    if (defined $sref->{"periods"}->{$period}->{"_last_alert"} && $sref->{"periods"}->{$period}->{"_last_alert"} > $l);
+     }
+ 
+-    my $buf = sprintf("group=$group service=$service opstatus=$sref->{_op_status} last_opstatus=%s exitval=%s timer=%s last_success=%s last_trap=%s last_traphost=%s last_check=%s ack=%s ackcomment=$comment alerts_sent=$alerts_sent depstatus=%s depend=$depend hostdepend=$hostdepend monitordepend=$monitordepend alertdepend=$alertdepend monitor=$monitor last_summary=%s last_detail=%s", (defined $sref->{_last_op_status} ? $sref->{_last_op_status} : ""), (defined $sref->{_exitval} ? $sref->{_exitval} : ""), (defined $sref->{_timer} ? $sref->{_timer} : ""), (defined $sref->{_last_success} ? $sref->{_last_success} : ""), (defined $sref->{_last_trap} ? $sref->{_last_trap} : ""), (defined $sref->{_last_traphost} ? $sref->{_last_traphost} : ""), (defined $sref->{_last_check} ? $sref->{_last_check} : ""), (defined $sref->{_ack} ? $sref->{_ack} : ""), (defined $sref->{"_depend_status"} ? int ($sref->{"_depend_status"}) : ""), $summary, $detail);
++     my $buf = "group=$group" .
++               " service=$service" .
++               " opstatus=$sref->{_op_status}" .
++               " last_opstatus=$sref->{_last_op_status}" .
++               " exitval=$sref->{_exitval}" .
++               " timer=$sref->{_timer}" .
++               " last_success=$sref->{_last_success}" .
++               " last_trap=$sref->{_last_trap}" .
++               " last_check=$sref->{_last_check}" .
++               " ack=$sref->{_ack}" .
++               " ackcomment='$comment'" .
++               " alerts_sent=$alerts_sent" .
++               " depstatus=" . int ($sref->{"_depend_status"}) .
++               " depend='$depend'" .
++               " monitor='$monitor'" .
++               " last_summary='$summary'" .
++               " last_detail='$detail'";
+ 
+     $buf .= " last_failure=$sref->{_last_failure}"
+     	if ($sref->{"_last_failure"});
diff --git a/mon.spec b/mon.spec
index 5cac7c5..7431fe4 100644
--- a/mon.spec
+++ b/mon.spec
@@ -7,7 +7,7 @@
 Name:           mon
 Summary:        General-purpose resource monitoring system
 Version:        1.2.0
-Release:        9%{?dist}
+Release:        10%{?dist}
 License:        GPLv2+
 Group:          Applications/Internet
 URL:            http://www.kernel.org/software/mon/
@@ -25,6 +25,7 @@ Patch1:         mon-1.2.0-uucp.patch
 # #107 mon is not logging anything to syslog 
 # http://sourceforge.net/p/mon/bugs/107/
 Patch2:         syslog.patch
+Patch3:         broken-percent-20.patch
 
 Requires:       perl(Authen::PAM)
 Requires:       iputils
@@ -54,6 +55,7 @@ required, the mon server will not need to be changed.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p0
 
 # Filter out unwanted requires
 cat << \EOF > %{name}-req
@@ -176,6 +178,9 @@ fi
 
 
 %changelog
+* Sun Oct 20 2013 Jan-Frode Myklebust <janfrode at tanso.net> - 1.2.0-10
+- Add patch for upstream bug #100, Mangled output on descritption and detail.
+
 * Fri Oct 11 2013 Jan-Frode Myklebust <janfrode at tanso.net> - 1.2.0-9
 - Add patch for upstream bug #107, mon not logging anything to syslog.
 


More information about the scm-commits mailing list