diff --git a/SOURCES/logwatch-blank-files.patch b/SOURCES/logwatch-blank-files.patch new file mode 100644 index 0000000..41fc948 --- /dev/null +++ b/SOURCES/logwatch-blank-files.patch @@ -0,0 +1,10 @@ +--- logwatch-svn140/scripts/logwatch.pl 2016-04-22 13:36:55.290535535 +0200 ++++ logwatch-svn140-new/scripts/logwatch.pl 2016-04-22 13:40:44.117657038 +0200 +@@ -794,6 +794,7 @@ foreach $LogFile (@LogFileList) { + print "\n"; + next; + } ++ next if (-z $ThisFile); + #FIXME - We have a bug report for filenames with spaces, can be caught here needs test -mgt + $FileText .= ("'" . $ThisFile . "' "); + } #End foreach ThisFile diff --git a/SOURCES/logwatch-disk-space.patch b/SOURCES/logwatch-disk-space.patch new file mode 100644 index 0000000..6fc98a8 --- /dev/null +++ b/SOURCES/logwatch-disk-space.patch @@ -0,0 +1,45 @@ +--- logwatch-7.3.6/scripts/services/zz-disk_space 2015-11-18 15:03:12.271040764 +0100 ++++ logwatch-7.3.6-new/scripts/services/zz-disk_space 2015-11-18 15:03:01.594047694 +0100 +@@ -172,18 +172,30 @@ sub DiskSpace () + } + + sub DiskFull { +- my $o = `$disk_cmd`; +- my @rows = split('\n', $o); +- foreach my $row (@rows) { +- my @fields = split(' ', $row); +- my $use = $fields[4]; +- $use =~ s/%//; +- if (($use > $diskfull_threshhold) && ($fields[0] !~ /\/dev\/scd/ ) && ($fields[0] !~ /\/dev\/sr/ ) +- && ($fields[0] !~ /\/dev\/loop./)) { +- print "$fields[0] => $fields[4] Used. Warning. Disk Filling up.\n"; +- } +- } +-} ++ my $o = `$disk_cmd`; ++ my @good_rows = (); ++ my @rows = split('\n', $o); ++ for (my $i=0; $i $diskfull_threshhold) && ($filesystem !~ /\/dev\/scd/ ) && ($filesystem !~ /\/dev\/sr/ ) ++ && ($filesystem !~ /\/dev\/loop./)) ++ { ++ print "$filesystem => $use% Used. Warning. Disk Filling up.\n"; ++ } ++ } ++} + + ##################### + #Main diff --git a/SOURCES/logwatch-logdir-case.patch b/SOURCES/logwatch-logdir-case.patch new file mode 100644 index 0000000..c22cbf2 --- /dev/null +++ b/SOURCES/logwatch-logdir-case.patch @@ -0,0 +1,11 @@ +--- logwatch-svn140/scripts/logwatch.pl 2016-04-22 13:17:14.275096840 +0200 ++++ logwatch-svn140/scripts/logwatch.pl.new 2016-04-22 13:24:16.060709792 +0200 +@@ -952,7 +952,7 @@ sub getInt { + ###################################################################### + sub CleanVars { + foreach (keys %Config) { +- unless (defined $Config{$_} and $_ eq "hostname") { ++ unless (defined $Config{$_} and ($_ eq "hostname" or $_ eq "logdir")) { + $Config{$_} = getInt($Config{$_}); + } + } diff --git a/SOURCES/logwatch-man-disrupted-sentence.patch b/SOURCES/logwatch-man-disrupted-sentence.patch new file mode 100644 index 0000000..12d03a2 --- /dev/null +++ b/SOURCES/logwatch-man-disrupted-sentence.patch @@ -0,0 +1,28 @@ +From e16d1363b33344c53da355983445505843c3cfe1 Mon Sep 17 00:00:00 2001 +From: Jan Synacek +Date: Thu, 17 Mar 2016 09:57:25 +0100 +Subject: [PATCH 2/4] conf: fix disrupted sentence + +--- + conf/logwatch.conf | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/conf/logwatch.conf b/conf/logwatch.conf +index 6faae8f..e031a6b 100644 +--- a/conf/logwatch.conf ++++ b/conf/logwatch.conf +@@ -60,10 +60,9 @@ MailFrom = Logwatch + # (i.e. /var/log/messages.1 or /var/log/messages.1.gz) will + # be searched in addition to the /var/log/messages file. + # This usually will not do much if your range is set to just +-# 'Yesterday' or 'Today'... it is probably best used with ++# 'Yesterday' or 'Today'... it is probably best used with Range = All. + # By default this is now set to Yes. To turn off Archives uncomment this. + #Archives = No +-# Range = All + + # The default time range for the report... + # The current choices are All, Today, Yesterday +-- +2.7.3 + diff --git a/SOURCES/logwatch-puppet.patch b/SOURCES/logwatch-puppet.patch new file mode 100644 index 0000000..f722875 --- /dev/null +++ b/SOURCES/logwatch-puppet.patch @@ -0,0 +1,25 @@ +From 7841afe66d5b2049b229e8b8faddafc84aa08b68 Mon Sep 17 00:00:00 2001 +From: Jan Synacek +Date: Thu, 17 Mar 2016 09:58:46 +0100 +Subject: [PATCH 3/4] puppet: improve counting of successful runs + +--- + scripts/services/puppet | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/scripts/services/puppet b/scripts/services/puppet +index 305dfff..1b86ae7 100644 +--- a/scripts/services/puppet ++++ b/scripts/services/puppet +@@ -66,6 +66,8 @@ while (defined($ThisLine = )) { + } + } elsif ($ThisLine =~ /Finished catalog run in [0-9]+\.[0-9]+ seconds/) { + $SuccessfulRuns++; ++ } elsif ($ThisLine =~ /Applied catalog in [0-9]+\.[0-9]+ seconds/) { ++ $SuccessfulRuns++; + } elsif ($ThisLine =~ /skipping run/) { + $FailedRuns++; + } elsif ($ThisLine =~ /(Did not receive certificate)/) { +-- +2.7.3 + diff --git a/SOURCES/logwatch-smartd-copyright.patch b/SOURCES/logwatch-smartd-copyright.patch new file mode 100644 index 0000000..676d58c --- /dev/null +++ b/SOURCES/logwatch-smartd-copyright.patch @@ -0,0 +1,12 @@ +--- logwatch/scripts/services/smartd 2011-02-28 12:08:10.000000000 +0100 ++++ logwatch/scripts/services/smartd.new 2013-06-06 13:55:44.835000202 +0200 +@@ -117,7 +117,8 @@ while (defined(my $ThisLine = )) + # ignore empty lines + } elsif ( ($ThisLine =~ /^smartd version/) + || ($ThisLine =~ /^Home page/) +- || ($ThisLine =~ /^smartd .*Copyright \(C\) [0-9-]+ by Bruce Allen/) ++ || ($ThisLine =~ /Copyright \(C\) [0-9-]+(?: by|,) Bruce Allen/) ++ || ($ThisLine =~ /^smartd [0-9\.]+ [0-9-]+/) + || ($ThisLine =~ /configuration file/i) + || ($ThisLine =~ /\[trip Temperature is \d+ Celsius\]/) + || ($ThisLine =~ /^Monitoring/) diff --git a/SOURCES/logwatch-sshd-detail.patch b/SOURCES/logwatch-sshd-detail.patch new file mode 100644 index 0000000..ae5198a --- /dev/null +++ b/SOURCES/logwatch-sshd-detail.patch @@ -0,0 +1,11 @@ +--- logwatch-svn140/scripts/services/sshd 2012-12-30 15:27:43.000000000 +0100 ++++ logwatch-svn140-new/scripts/services/sshd 2016-04-22 13:28:43.478562357 +0200 +@@ -799,7 +799,7 @@ if (keys %ChownErr) { + } + } + +-if ( ($Detail == 7 && keys %Krb_relm > 1) || ($Detail > 8 && keys %Krb_relm) ){ ++if ( ($Detail == 7 && keys %Krb_relm > 1) || ($Detail >= 8 && keys %Krb_relm) ){ + print "\nSucessfull Kerberos Authentication from ",(scalar keys %Krb_relm)," relm:\n"; + foreach my $relm (keys %Krb_relm) { + if($Detail > 9){ diff --git a/SOURCES/logwatch-sshd-typos.patch b/SOURCES/logwatch-sshd-typos.patch new file mode 100644 index 0000000..73511de --- /dev/null +++ b/SOURCES/logwatch-sshd-typos.patch @@ -0,0 +1,12 @@ +diff -rup logwatch-svn140/scripts/services/sshd logwatch-svn140-new/scripts/services/sshd +--- logwatch-svn140/scripts/services/sshd 2016-05-19 14:30:15.950891232 +0200 ++++ logwatch-svn140-new/scripts/services/sshd 2016-05-19 14:30:51.436881734 +0200 +@@ -800,7 +800,7 @@ if (keys %ChownErr) { + } + + if ( ($Detail == 7 && keys %Krb_relm > 1) || ($Detail >= 8 && keys %Krb_relm) ){ +- print "\nSucessfull Kerberos Authentication from ",(scalar keys %Krb_relm)," relm:\n"; ++ print "\nSuccessful Kerberos Authentication from ",(scalar keys %Krb_relm)," realm:\n"; + foreach my $relm (keys %Krb_relm) { + if($Detail > 9){ + print " ",$relm,":\n"; diff --git a/SPECS/logwatch.spec b/SPECS/logwatch.spec index 5d14442..13d543c 100644 --- a/SPECS/logwatch.spec +++ b/SPECS/logwatch.spec @@ -1,7 +1,7 @@ Summary: A log file analysis program Name: logwatch Version: 7.4.0 -Release: 28.20130522svn140%{?dist} +Release: 32.20130522svn140%{?dist} License: MIT Group: Applications/System URL: http://www.logwatch.org/ @@ -25,6 +25,14 @@ Patch9: logwatch-rkhunter.patch Patch16: logwatch-secure-userhelper.patch Patch18: logwatch-secure-username.patch Patch19: logwatch-man.patch +Patch20: logwatch-man-disrupted-sentence.patch +Patch21: logwatch-smartd-copyright.patch +Patch22: logwatch-disk-space.patch +Patch23: logwatch-logdir-case.patch +Patch24: logwatch-sshd-detail.patch +Patch25: logwatch-puppet.patch +Patch26: logwatch-blank-files.patch +Patch27: logwatch-sshd-typos.patch Requires: textutils sh-utils grep mailx Requires: perl(Date::Manip) Requires: perl(Sys::CPU) @@ -48,6 +56,14 @@ of the package on many systems. %patch16 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 +%patch27 -p1 rm -f scripts/services/*.orig %build @@ -122,7 +138,7 @@ echo "# Configuration overrides for specific logfiles/services may be placed her %dir %{_sysconfdir}/logwatch/conf/logfiles %dir %{_sysconfdir}/logwatch/conf/services %dir %{_sysconfdir}/logwatch/scripts/services -%{_sysconfdir}/cron.daily/0logwatch +%config(noreplace) %{_sysconfdir}/cron.daily/0logwatch %config(noreplace) %{_sysconfdir}/logwatch/conf/*.conf %dir %{_datadir}/logwatch %dir %{_datadir}/logwatch/dist.conf @@ -147,6 +163,29 @@ echo "# Configuration overrides for specific logfiles/services may be placed her %{_mandir}/man*/* %changelog +* Thu May 19 2016 Jan Synáček - 7.4.0-32.20130522svn140 +- Refix logwatch fails with argument list too long (#1300170) +- Fix Typos in sshd service script output (#1335493) + +* Fri May 13 2016 Jan Synáček - 7.4.0-32.20130522svn140 +- Refix When filesystem name is long, the disk full check fails to work (#1293360) + +* Thu May 12 2016 Jan Synáček - 7.4.0-31.20130522svn140 +- remove incorrect changelog entry (Related: #1221903) + +* Thu May 12 2016 Jan Synáček - 7.4.0-30.20130522svn140 +- Fix smartd copyright message needs to be suppressed again (#1162741) + +* Fri Apr 22 2016 Jan Synáček - 7.4.0-29.20130522svn140 +- Fix disrupted sentence in default logwatch.conf file (#1126848) +- Fix smartd copyright message needs to be suppressed again (#1162741) +- Fix Logwatch cron files not marked correctly as %%config(noreplace) (#1221903) +- Fix When filesystem name is long, the disk full check fails to work (#1293360) +- Fix Should not change the case of $logdir (#1293624) +- Fix logwatch --service sshd --detail 8 does not print Kerberos summary (#1295888) +- Fix logwatch puppet-agent unknown entries (#1299181) +- Fix logwatch fails with argument list too long (#1300170) + * Fri Dec 27 2013 Daniel Mach - 7.4.0-28.20130522svn140 - Mass rebuild 2013-12-27