[logwatch] Clean messages for xntpd (rhbz#673756)

Karel Klíč kklic at fedoraproject.org
Mon Mar 28 12:52:25 UTC 2011


commit 890e14737cc5468113772ed2d8b403c3934c8ec5
Author: Karel Klic <kklic at redhat.com>
Date:   Mon Mar 28 14:52:08 2011 +0200

    Clean messages for xntpd (rhbz#673756)

 logwatch-xntpd.patch |   38 ++++++++++++++++++++++++++++++++++++++
 logwatch.spec        |    7 ++++++-
 2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/logwatch-xntpd.patch b/logwatch-xntpd.patch
new file mode 100644
index 0000000..840aafd
--- /dev/null
+++ b/logwatch-xntpd.patch
@@ -0,0 +1,38 @@
+diff -up logwatch-svn46/scripts/services/xntpd.improve logwatch-svn46/scripts/services/xntpd
+--- logwatch-svn46/scripts/services/xntpd.improve	2011-03-28 14:47:20.203582860 +0200
++++ logwatch-svn46/scripts/services/xntpd	2011-03-28 14:48:14.978714233 +0200
+@@ -142,6 +142,7 @@ while (defined(my $ThisLine = <STDIN>)) 
+         ($ThisLine =~ m/tickadj = /) or # startup
+         ($ThisLine =~ m/precision = /) or # startup
+         ($ThisLine =~ m/ (succeeded|failed)/) or # startup
++        ($ThisLine =~ m/sendto\(\S+\): Success/) or # startup
+         ($ThisLine =~ m/kernel time (discipline|sync) status/) or # startup
+         ($ThisLine =~ m/kernel time sync (dis|en)abled /) or # startup
+         ($ThisLine =~ m/frequency initialized/) or # startup
+@@ -154,6 +155,8 @@ while (defined(my $ThisLine = <STDIN>)) 
+         ($ThisLine =~ /Listening on interface .* Disabled/) or
+         ($ThisLine =~ /Listen and drop on /) or
+         ($ThisLine =~ /Listening on routing socket on/) or
++	($ThisLine =~ /.* interface .* -> \(null\)/) or
++	($ThisLine =~/Deferring DNS for/) or
+ 	($ThisLine =~ /ntp_io: estimated max descriptors: \d*, initial socket boundary: \d*/)
+     ) {
+        # Ignore these
+@@ -174,7 +177,7 @@ while (defined(my $ThisLine = <STDIN>)) 
+     } elsif ( my (undef,$TimeStep) = ($ThisLine =~ /(offset) ([^ ]+) sec/ )) {
+        push @TimeReset, $TimeStep;
+     # MEv end no leadin to line
+-    } elsif ( my ($ListenOn) = ($ThisLine =~ /Listening on interface (.*)(?: Enabled)?/ )) {
++    } elsif ( my ($ListenOn) = ($ThisLine =~ /Listening on interface(?: #\d+)? (.*)(?: Enabled)?/ )) {
+        $Interfaces{$ListenOn}++;
+     } elsif ( my ($ListenOn) = ($ThisLine =~ /Listen normally on \d+ (.*)/ )) {
+        $Interfaces{$ListenOn}++;
+@@ -193,7 +196,7 @@ while (defined(my $ThisLine = <STDIN>)) 
+        $TwoInst{$name}++;
+     } elsif ( my ($Error) = ($ThisLine =~ /(no server(s reachable| suitable for synchronization found))/ )) {
+        $Errors{$Error}++;
+-    } elsif ( my ($Error) = ($ThisLine =~ /(can't find host \S+|no servers can be used, exiting)/ )) {
++    } elsif ( my ($Error) = ($ThisLine =~ /([Cc]an't find host \S+|no servers can be used, exiting)/ )) {
+        $Errors{$Error}++;
+     } elsif ( my ($Error) = ($ThisLine =~ /(sendto\(\S+\): Network is unreachable)/ )) {
+        $Errors{$Error}++;
diff --git a/logwatch.spec b/logwatch.spec
index 2acd532..cec9cde 100644
--- a/logwatch.spec
+++ b/logwatch.spec
@@ -1,7 +1,7 @@
 Summary: A log file analysis program
 Name: logwatch
 Version: 7.3.6
-Release: 69.20110228svn46%{?dist}
+Release: 70.20110228svn46%{?dist}
 License: MIT
 Group: Applications/System
 URL: http://www.logwatch.org/
@@ -21,6 +21,7 @@ Patch2: logwatch-secure.patch
 Patch3: logwatch-named-dnssec.patch
 # Manpage typo
 Patch4: logwatch-manpage.patch
+Patch5: logwatch-xntpd.patch
 Requires: textutils sh-utils grep mailx
 Requires: perl(Date::Manip)
 BuildArchitectures: noarch
@@ -38,6 +39,7 @@ of the package on many systems.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 rm -f scripts/services/*.orig
 
 %build
@@ -130,6 +132,9 @@ echo "# Configuration overrides for specific logfiles/services may be placed her
 %doc LICENSE
 
 %changelog
+* Mon Mar 28 2011 Karel Klíč <kklic at redhat.com> - 7.3.6-70.20110228svn46
+- Added -xntpd patch (rhbz#673756)
+
 * Mon Mar 28 2011 Karel Klíč <kklic at redhat.com> - 7.3.6-69.20110228svn46
 - Added -manpage patch fixing a typo in logwatch(8) (rhbz#664883)
 - Removed `rm -rf %{buildroot}` from %%install section


More information about the scm-commits mailing list