Update to 7.5.0 (#1663428)
This commit is contained in:
parent
08e0ff548e
commit
1c29c6629a
@ -1,95 +0,0 @@
|
||||
commit 23e714ad43285d59c5b5852ef2c6013593d64671
|
||||
Author: bjorn <bjorn1@users.sourceforge.net>
|
||||
Date: Sun May 15 13:49:08 2016 -0700
|
||||
|
||||
[journalctl] Added shared script contributed by Mark Grimes.
|
||||
|
||||
diff --git a/scripts/shared/journalctl b/scripts/shared/journalctl
|
||||
new file mode 100755
|
||||
index 0000000..1627fd4
|
||||
--- /dev/null
|
||||
+++ b/scripts/shared/journalctl
|
||||
@@ -0,0 +1,83 @@
|
||||
+#!/usr/bin/perl
|
||||
+#
|
||||
+# The purpose of this script is to pass the output of the journalctl
|
||||
+# command to the logwatch parsers. The corresponding conf/logfile
|
||||
+# can be simple. The following example shows a logfile with two lines:
|
||||
+# LogFile = /dev/null
|
||||
+# *JournalCtl = "--output=cat --unit=service_name.service"
|
||||
+#
|
||||
+# In the example above, the arguments to the JournalCtl command are
|
||||
+# passed to the journalctl system command. It is advised to delimit
|
||||
+# the arguments in double quotes to preserve mixed case, if
|
||||
+# applicable.
|
||||
+
|
||||
+use strict;
|
||||
+use warnings;
|
||||
+
|
||||
+eval "use Date::Manip";
|
||||
+my $hasDM = $@ ? 0 : 1;
|
||||
+
|
||||
+# logwatch passes arguments as one string delimited by single quotes
|
||||
+my @args = split(" ", $ARGV[0]);
|
||||
+my @range = get_range( $ENV{LOGWATCH_DATE_RANGE} );
|
||||
+
|
||||
+my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
||||
+
|
||||
+if ($Debug > 5) {
|
||||
+ warn join " ", 'journalctl', @args, @range, "\n";
|
||||
+}
|
||||
+
|
||||
+system( 'journalctl', @args, @range );
|
||||
+
|
||||
+sub get_range {
|
||||
+ my $range = lc( shift || 'all' );
|
||||
+ my @range;
|
||||
+
|
||||
+ if ( !$range || $range eq 'all' ) {
|
||||
+ @range = ();
|
||||
+ } elsif ( $range eq 'yesterday' ) {
|
||||
+ push @range, '--since', 'yesterday', '--until', 'today';
|
||||
+ } elsif ( $range eq 'today' ) {
|
||||
+ push @range, '--since', 'today', '--until', 'tomorrow';
|
||||
+ } elsif ($hasDM) {
|
||||
+
|
||||
+ # Strip off any period
|
||||
+ $range =~
|
||||
+ s/for\s+(?:those|that|this)\s+((year|month|day|hour|minute|second)s?)\s*$//;
|
||||
+
|
||||
+ # Look for between x and y
|
||||
+ my ( $range1, $range2 ) =
|
||||
+ ( $range =~ /^between\s+(.*)\s+and\s+(.*)\s*$/ );
|
||||
+
|
||||
+ # Look for since x
|
||||
+ if ( $range =~ /^\s*since\s+/ ) {
|
||||
+ ($range1) = ( $range =~ /\s*since\s+(.*)/ );
|
||||
+ $range2 = "now";
|
||||
+ }
|
||||
+
|
||||
+ # Now convert to journalctl friendly dates
|
||||
+ if ( $range1 && $range2 ) {
|
||||
+
|
||||
+ # Parse dates
|
||||
+ my $date1 = ParseDate($range1);
|
||||
+ my $date2 = ParseDate($range2);
|
||||
+
|
||||
+ # Switch if date2 is before date1
|
||||
+ if ( $date1 && $date2 and Date_Cmp( $date1, $date2 ) > 0 ) {
|
||||
+ my $switch_date = $date1;
|
||||
+ $date1 = $date2;
|
||||
+ $date2 = $switch_date;
|
||||
+ }
|
||||
+
|
||||
+ # If we ask for 1/1 to 1/2, we mean 1/2 inclusive. DM returns
|
||||
+ # 1/2 00:00:00. So we add 1 day to the end time.
|
||||
+ $date2 = DateCalc( $date2, '1 day' );
|
||||
+
|
||||
+ my $fmt = "%Y-%m-%d %H:%M:%S";
|
||||
+ push @range, '--since', UnixDate( $date1, $fmt ), '--until',
|
||||
+ UnixDate( $date2, $fmt );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return @range;
|
||||
+}
|
||||
@ -1,38 +0,0 @@
|
||||
commit ed6eb62f40cb97f71f3df4d982682de68cdf1037
|
||||
Author: Stefan Jakobs <projects@localside.net>
|
||||
Date: Tue May 31 23:34:11 2016 +0200
|
||||
|
||||
support journald as source
|
||||
|
||||
diff --git a/scripts/services/syslog-ng b/scripts/services/syslog-ng
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index dcd1692..d78c835
|
||||
--- a/scripts/services/syslog-ng
|
||||
+++ b/scripts/services/syslog-ng
|
||||
@@ -1,5 +1,5 @@
|
||||
###########################################################################
|
||||
-# $Id$
|
||||
+# $Id: syslog-ng 280 2014-12-24 15:29:13Z stefjakobs $
|
||||
###########################################################################
|
||||
|
||||
###########################################################################
|
||||
@@ -168,7 +168,7 @@ while (defined($ThisLine = <STDIN>)) {
|
||||
$Stats_dest{$processed[$i+1]} =
|
||||
$Stats_dest{$processed[$i+1]} + $processed[$i+2];
|
||||
} elsif ($processed[$i] eq "source" || $processed[$i] eq "src.internal" ||
|
||||
- $processed[$i] eq 'src.none' ) {
|
||||
+ $processed[$i] eq 'src.none' || $processed[$i] eq 'src.journald') {
|
||||
$Stats_source{$processed[$i+1]} =
|
||||
$Stats_source{$processed[$i+1]} + $processed[$i+2];
|
||||
} elsif ($processed[$i] eq "global") {
|
||||
@@ -366,7 +366,8 @@ if (keys %Stats_center || keys %Stats_dest || keys %Stats_source ||
|
||||
$lost_rcvd = 0 - $Stats_center{received};
|
||||
map {
|
||||
# skip 'src#X' as this seams to be aggregated into 'src'
|
||||
- $lost_rcvd = $lost_rcvd + $Stats_source{$_} unless ($_ =~ /src#\d+/);
|
||||
+ # skip 'journal' as this is not counted.
|
||||
+ $lost_rcvd = $lost_rcvd + $Stats_source{$_} unless ($_ =~ /(?:src#\d+|journal)/);
|
||||
} keys %Stats_source;
|
||||
}
|
||||
if ($Stats_center{queued} && %Stats_dest) {
|
||||
@ -1,74 +0,0 @@
|
||||
Add '--no-oldfiles-log' option that suppresses a warning about old files in the
|
||||
logwatch temporary directory.
|
||||
|
||||
Author: Ivana Varekova <varekova@redhat.com>
|
||||
RH-Bugzilla: #230974
|
||||
Backported-By: Jan Synacek <jsynacek@redhat.com>
|
||||
|
||||
--- logwatch-svn198/logwatch.8 2014-01-26 13:46:02.000000000 +0100
|
||||
+++ logwatch-svn198/logwatch.8 2014-07-04 10:03:26.870415276 +0200
|
||||
@@ -35,7 +35,7 @@
|
||||
.I report format
|
||||
.B ] [--encode
|
||||
.I encoding to use
|
||||
-.B ] [--numeric] [--version] [--help|--usage]
|
||||
+.B ] [--numeric] [--no-oldfiles-log] [--version] [--help|--usage]
|
||||
.SH DESCRIPTION
|
||||
.B Logwatch
|
||||
is a customizable, pluggable log-monitoring system. It will go
|
||||
@@ -111,6 +111,9 @@
|
||||
Number of characters that html output should be wrapped to. Default is 80.
|
||||
.IP "\fB--numeric\fR"
|
||||
Inhibits additional name lookups, displaying IP addresses numerically.
|
||||
+.IP "\fB--no-oldfiles-log\fR"
|
||||
+Suppress the logwatch log, which informs about the
|
||||
+old files in logwatch tmpdir.
|
||||
.IP "\fB--usage\fR"
|
||||
Displays usage information
|
||||
.IP "\fB--help\fR"
|
||||
--- logwatch-svn198/scripts/logwatch.pl 2014-07-04 10:02:23.930302006 +0200
|
||||
+++ logwatch-svn198/scripts/logwatch.pl 2014-07-04 10:05:01.588585717 +0200
|
||||
@@ -187,6 +187,7 @@
|
||||
my @TempServiceList = ();
|
||||
my $Help = 0;
|
||||
my $ShowVersion = 0;
|
||||
+my $NoOldfilesLog = 0;
|
||||
my ($tmp_mailto, $tmp_savefile);
|
||||
|
||||
&GetOptions ("d|detail=s" => \$Config{'detail'},
|
||||
@@ -209,6 +210,7 @@
|
||||
"hostformat=s" => \$Config{'hostformat'},
|
||||
"hostlimit=s" => \$Config{'hostlimit'},
|
||||
"html_wrap=s" => \$Config{'html_wrap'},
|
||||
+ "no-oldfiles-log" => \$NoOldfilesLog,
|
||||
"subject=s" => \$Config{'subject'}
|
||||
) or &Usage();
|
||||
|
||||
@@ -632,7 +634,7 @@
|
||||
opendir(TMPDIR, $Config{'tmpdir'}) or die "$Config{'tmpdir'} $!";
|
||||
my @old_dirs = grep { /^logwatch\.\w{8}$/ && -d "$Config{'tmpdir'}/$_" }
|
||||
readdir(TMPDIR);
|
||||
-if (@old_dirs) {
|
||||
+if ((@old_dirs) && ($NoOldfilesLog==0)) {
|
||||
print "You have old files in your logwatch tmpdir ($Config{'tmpdir'}):\n\t";
|
||||
print join("\n\t", @old_dirs);
|
||||
print "\nThe directories listed above were most likely created by a\n";
|
||||
@@ -1085,7 +1087,7 @@
|
||||
sub Usage () {
|
||||
# Show usage for this program
|
||||
print "\nUsage: $0 [--detail <level>] [--logfile <name>] [--output <output_type>]\n" .
|
||||
- " [--format <format_type>] [--encode <enconding>] [--numeric]\n" .
|
||||
+ " [--format <format_type>] [--encode <enconding>] [--numeric] [--no-oldfiles-log]\n" .
|
||||
" [--mailto <addr>] [--archives] [--range <range>] [--debug <level>]\n" .
|
||||
" [--filename <filename>] [--help|--usage] [--version] [--service <name>]\n" .
|
||||
" [--hostformat <host_format type>] [--hostlimit <host1,host2>] [--html_wrap <num_characters>]\n\n";
|
||||
@@ -1096,6 +1098,8 @@
|
||||
print "--output <output type>: Report Output - stdout [default], mail, file.\n"; #8.0
|
||||
print "--format <formatting>: Report Format - text [default], html.\n"; #8.0
|
||||
print "--encode <encoding>: Enconding to use - none [default], base64.\n"; #8.0
|
||||
+ print "--no-oldfiles-log: Suppress the logwatch log, which informs about the\n";
|
||||
+ print " old files in logwatch tmpdir.\n";
|
||||
print "--mailto <addr>: Mail report to <addr>.\n";
|
||||
print "--archives: Use archived log files too.\n";
|
||||
print "--filename <filename>: Used to specify they filename to save to. --filename <filename> [Forces output to file].\n";
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
From eb8c0256997b8d7f2cccdd37ab78674fe9c769c1 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Tue, 10 May 2016 13:34:05 +0200
|
||||
Subject: [PATCH] postfix: fix column alignment in output
|
||||
|
||||
Some sections are clearly longer than 23 chars, which might result in a
|
||||
misaligned output:
|
||||
|
||||
3602 Connections 3,602
|
||||
82 Connections lost (inbound) 82
|
||||
3602 Disconnections 3,602
|
||||
|
||||
12 Timeouts (inbound) 12
|
||||
16 DNS lookup errors 16
|
||||
46 Hostname verification errors (FCRDNS) 46
|
||||
49 SMTP protocol violations 49
|
||||
2154 TLS connections (server) 2,154
|
||||
|
||||
Align to 39 chars now, which is currently the length of the longest
|
||||
description in the output table plus one.
|
||||
---
|
||||
scripts/services/postfix | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/scripts/services/postfix b/scripts/services/postfix
|
||||
index 9f8e07f..ddd5968 100755
|
||||
--- a/scripts/services/postfix
|
||||
+++ b/scripts/services/postfix
|
||||
@@ -1360,7 +1360,7 @@ sub print_summary_report (\@) {
|
||||
my ($numfmt, $desc, $divisor) = ($sref->{FMT}, $sref->{TITLE}, $sref->{DIVISOR});
|
||||
|
||||
my $fmt = '%8';
|
||||
- my $extra = ' %25s';
|
||||
+ my $extra = ' %9s';
|
||||
my $total = $Totals{$keyname};
|
||||
|
||||
# Z format provides unitized or unaltered totals, as appropriate
|
||||
@@ -1383,7 +1383,7 @@ sub print_summary_report (\@) {
|
||||
}
|
||||
else {
|
||||
push @{$lines[$cur_level]},
|
||||
- sprintf "$fmt %-23s $extra\n", $total, $desc, commify ($Totals{$keyname});
|
||||
+ sprintf "$fmt %-39s $extra\n", $total, $desc, commify ($Totals{$keyname});
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
Fix misparsing of userhelper log entries for hddtemp that specify a device
|
||||
using a name that includes a slash (e.g. '/usr/sbin/hddtemp -n -q /dev/sda').
|
||||
Additional slashes after the process name confuse logwatch as it considers the
|
||||
last word behind the last slash the process' name.
|
||||
|
||||
Author: Jan Synacek <jsynacek@redhat.com>
|
||||
RH-Bugzilla: #867290
|
||||
|
||||
--- logwatch-svn110/scripts/services/secure.orig 2012-10-18 11:13:33.000000000 +0200
|
||||
+++ logwatch-svn110/scripts/services/secure 2012-10-18 11:31:08.987571713 +0200
|
||||
@@ -843,8 +843,13 @@ if (keys %Executed_app) {
|
||||
print "\nUserhelper executed applications:\n";
|
||||
foreach (keys %Executed_app) {
|
||||
($longapp,$asuser,$user) = split ",";
|
||||
+ $longapp_orig = $longapp;
|
||||
+ $i = index($longapp, " ");
|
||||
+ if ($i > 0) {
|
||||
+ $longapp = substr($longapp, 0, $i);
|
||||
+ }
|
||||
$app = substr($longapp,rindex($longapp,"/")+1);
|
||||
- print " $user -> $app as $asuser: ".$Executed_app{"$longapp,$asuser,$user"}." Time(s)\n";
|
||||
+ print " $user -> $app as $asuser: ".$Executed_app{"$longapp_orig,$asuser,$user"}." Time(s)\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
From ddbd80b1efaa6e95536d0262985f13147208e775 Mon Sep 17 00:00:00 2001
|
||||
From: Oleg Girko <ol@infoserver.lv>
|
||||
Date: Wed, 28 Mar 2018 15:43:12 +0100
|
||||
Subject: [PATCH] Fix pattern for sendmail queue ID to parse ones with PID
|
||||
having 7 digits.
|
||||
|
||||
Sendmail 8.15 uses the following format for queue id:
|
||||
- 6 letters or digits dependent on date and time,
|
||||
- 2 letters or digits dependent on random sequence ID,
|
||||
- PID of sendmail process formatted by snprintf using "%06d" format.
|
||||
|
||||
Format "%06d" means that resulting string has *minimal* length of 6 characters,
|
||||
padded with leading zeroes if necessary.
|
||||
But if PID is greater than 999999, the resulting string can be longer,
|
||||
up to 7 characters if kernel.pid_max sysctl parameter is big enough.
|
||||
By default it's 32768, but can be up to 4194304 on 64-bit systems.
|
||||
|
||||
This change fixes logwatch to parse sendmail log lines produced by
|
||||
sendmail processes that have 7-digit PID.
|
||||
|
||||
Signed-off-by: Oleg Girko <ol@infoserver.lv>
|
||||
---
|
||||
scripts/services/sendmail | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/services/sendmail b/scripts/services/sendmail
|
||||
index d97e7a2..1acd733 100644
|
||||
--- a/scripts/services/sendmail
|
||||
+++ b/scripts/services/sendmail
|
||||
@@ -387,7 +387,7 @@ for my $i (0..9) {
|
||||
}
|
||||
|
||||
# QueueID formats: in 8.11 it was \w{7}\d{5}, in 8.12+ it is \w{8}\d{6}
|
||||
-my $QueueIDFormat = "(?:\\w{7,9}\\d{5}|NOQUEUE)";
|
||||
+my $QueueIDFormat = "(?:\\w{7,9}\\d{5,7}|NOQUEUE)";
|
||||
|
||||
# ENOENT refers to "no such file or directory"
|
||||
my $ENOENT = Errno::ENOENT();
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
Resolves: #1317620
|
||||
|
||||
--- logwatch-7.4.3/scripts/services/sshd 2017-08-29 09:16:47.087028191 +0200
|
||||
+++ logwatch-7.4.3-new/scripts/services/sshd 2017-08-29 09:19:37.372081596 +0200
|
||||
@@ -297,7 +297,9 @@ while (defined(my $ThisLine = <STDIN>))
|
||||
($ThisLine =~ /Starting session: (forced-command|subsystem|shell|command)/ ) or
|
||||
($ThisLine =~ /Found matching \w+ key:/ ) or
|
||||
($ThisLine =~ /User child is on pid \d/ ) or
|
||||
- ($ThisLine =~ /Nasty PTR record .* is set up for [\da-fA-F.:]+, ignoring/)
|
||||
+ ($ThisLine =~ /Nasty PTR record .* is set up for [\da-fA-F.:]+, ignoring/) or
|
||||
+ ($ThisLine =~ /Exiting on signal .*$/) or
|
||||
+ ($ThisLine =~ /Disconnected from (?:[^ ]*) port .*$/)
|
||||
) {
|
||||
# Ignore these
|
||||
} elsif ( my ($Method,$User,$Host,$Port,$Key) = ($ThisLine =~ /^Accepted (\S+) for ((?:invalid user )?\S+) from ([\d\.:a-f]+) port (\d+) ssh[12](?:: (\w+))?/) ) {
|
||||
@@ -387,7 +389,9 @@ while (defined(my $ThisLine = <STDIN>))
|
||||
$RefusedConnections{$1}++;
|
||||
} elsif ( my ($Reason) = ($ThisLine =~ /^Authentication refused: (.*)$/ ) ) {
|
||||
$RefusedAuthentication{$Reason}++;
|
||||
- } elsif ( my ($Host,$Reason) = ($ThisLine =~ /^Received disconnect from ([^ ]*) port [^ ]*: (.*)$/)) {
|
||||
+ # Old format: Received disconnect from 192.168.122.1: 11: disconnected by user
|
||||
+ # New format: Received disconnect from 192.168.122.1 port 43680:11: disconnected by user
|
||||
+ } elsif ( my ($Host,$Reason) = ($ThisLine =~ /^Received disconnect from ([^ ]*)(?: port \d+)?: ?(.*)$/)) {
|
||||
# Reason 11 (SSH_DISCONNECT_BY_APPLICATION) is expected, and logged at severity level INFO
|
||||
if ($Reason != 11) {$DisconnectReceived{$Reason}{$Host}++;}
|
||||
} elsif ( my ($Host) = ($ThisLine =~ /^ROOT LOGIN REFUSED FROM ([^ ]*)$/)) {
|
||||
@ -1,26 +0,0 @@
|
||||
From 256829aeb864a25a3542aaacfb2a7ff62b77e7f4 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Synacek <jsynacek@redhat.com>
|
||||
Date: Tue, 15 Mar 2016 10:29:17 +0100
|
||||
Subject: [PATCH] sshd: fix unmatched entries because of the output change in
|
||||
openssh-7.2p2
|
||||
|
||||
---
|
||||
scripts/services/sshd | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/services/sshd b/scripts/services/sshd
|
||||
index e238863..b94ea5a 100755
|
||||
--- a/scripts/services/sshd
|
||||
+++ b/scripts/services/sshd
|
||||
@@ -387,7 +387,7 @@ while (defined(my $ThisLine = <STDIN>)) {
|
||||
$RefusedConnections{$1}++;
|
||||
} elsif ( my ($Reason) = ($ThisLine =~ /^Authentication refused: (.*)$/ ) ) {
|
||||
$RefusedAuthentication{$Reason}++;
|
||||
- } elsif ( my ($Host,$Reason) = ($ThisLine =~ /^Received disconnect from ([^ ]*): (.*)$/)) {
|
||||
+ } elsif ( my ($Host,$Reason) = ($ThisLine =~ /^Received disconnect from ([^ ]*) port [^ ]*: (.*)$/)) {
|
||||
# Reason 11 (SSH_DISCONNECT_BY_APPLICATION) is expected, and logged at severity level INFO
|
||||
if ($Reason != 11) {$DisconnectReceived{$Reason}{$Host}++;}
|
||||
} elsif ( my ($Host) = ($ThisLine =~ /^ROOT LOGIN REFUSED FROM ([^ ]*)$/)) {
|
||||
--
|
||||
2.7.2
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
Correctly apply time filter when parsing vsftpd log messages.
|
||||
|
||||
Author: Ivana Varekova <varekova@redhat.com>
|
||||
RH-Bugzilla: #217226
|
||||
|
||||
--- logwatch-7.3.1/scripts/logwatch.pl.pom 2006-09-16 06:04:14.000000000 +0200
|
||||
+++ logwatch-7.3.1/scripts/logwatch.pl 2006-11-29 13:16:22.000000000 +0100
|
||||
@@ -917,11 +917,16 @@
|
||||
my $FilterText = " ";
|
||||
foreach (sort keys %{$LogFileData{$LogFile}}) {
|
||||
my $cmd = $_;
|
||||
+
|
||||
if ($cmd =~ s/^\d+-\*//) {
|
||||
if (-f "$ConfigDir/scripts/shared/$cmd") {
|
||||
$FilterText .= ("| $PerlVersion $ConfigDir/scripts/shared/$cmd '$LogFileData{$LogFile}{$_}'" );
|
||||
} elsif (-f "$BaseDir/scripts/shared/$cmd") {
|
||||
- $FilterText .= ("| $PerlVersion $BaseDir/scripts/shared/$cmd '$LogFileData{$LogFile}{$_}'" );
|
||||
+ if ($LogFile =~ /^vsftpd$/ ) {
|
||||
+ $FilterText .= ("| $PerlVersion $BaseDir/scripts/shared/applyvsftpddate '$LogFileData{$LogFile}{$_}'" );
|
||||
+ } else {
|
||||
+ $FilterText .= ("| $PerlVersion $BaseDir/scripts/shared/$cmd '$LogFileData{$LogFile}{$_}'" );
|
||||
+ }
|
||||
} else {
|
||||
die "Cannot find shared script $cmd\n";
|
||||
}
|
||||
--- logwatch-7.3.1/scripts/shared/applyvsftpddate.pom 2006-11-29 13:13:28.000000000 +0100
|
||||
+++ logwatch-7.3.1/scripts/shared/applyvsftpddate 2006-11-29 13:10:26.000000000 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+##########################################################################
|
||||
+# $Id: applystddate,v 1.18 2005/10/22 00:19:56 bjorn Exp $
|
||||
+##########################################################################
|
||||
+
|
||||
+########################################################
|
||||
+# This was written and is maintained by:
|
||||
+# Kirk Bauer <kirk@kaybee.org>
|
||||
+#
|
||||
+# Please send all comments, suggestions, bug reports,
|
||||
+# etc, to logwatch-devel@logwatch.org
|
||||
+########################################################
|
||||
+
|
||||
+use Logwatch ':dates';
|
||||
+
|
||||
+my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
||||
+
|
||||
+$SearchDate = TimeFilter('%b %e %H:%M:%S 20%y');
|
||||
+
|
||||
+# The date might be "Dec 09", but it needs to be "Dec 9"...
|
||||
+#$SearchDate =~ s/ 0/ /;
|
||||
+# The format of Fri Nov 29 20:59:09 2005
|
||||
+
|
||||
+if ( $Debug > 5 ) {
|
||||
+ print STDERR "DEBUG: Inside ApplyStdDate...\n";
|
||||
+ print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
|
||||
+}
|
||||
+
|
||||
+while (defined($ThisLine = <STDIN>)) {
|
||||
+ if ($ThisLine =~ m/(Mon|Tue|Wed|Thu|Fri|Sat|Sun) $SearchDate/o) {
|
||||
+ print "$ThisLine";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# vi: shiftwidth=3 syntax=perl tabstop=3 et
|
||||
@ -1,27 +1,13 @@
|
||||
%global _unitdir /usr/lib/systemd/system
|
||||
Summary: A log file analysis program
|
||||
Name: logwatch
|
||||
Version: 7.4.3
|
||||
Release: 11%{?dist}
|
||||
Version: 7.5.0
|
||||
Release: 1%{?dist}
|
||||
License: MIT
|
||||
Group: Applications/System
|
||||
URL: http://www.logwatch.org/
|
||||
Source0: logwatch-%{version}.tar.gz
|
||||
#Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
# Needs proper fix. Not applied by the upstream.
|
||||
Patch0: logwatch-vsftpd.patch
|
||||
# Not applied by upstream.
|
||||
Patch1: logwatch-oldfiles.patch
|
||||
Patch2: logwatch-secure-userhelper.patch
|
||||
# Submitted upstream.
|
||||
Patch3: logwatch-sshd.patch
|
||||
# Submitted upstream: https://sourceforge.net/p/logwatch/mailman/message/35076800/
|
||||
Patch4: logwatch-postfix.patch
|
||||
# https://sourceforge.net/p/logwatch/git/ci/23e714ad43285d59c5b5852ef2c6013593d64671/
|
||||
Patch5: logwatch-journal.patch
|
||||
# https://sourceforge.net/p/logwatch/git/ci/ed6eb62f40cb97f71f3df4d982682de68cdf1037/
|
||||
Patch6: logwatch-journald-source.patch
|
||||
Patch7: logwatch-sshd-2.patch
|
||||
Patch8: logwatch-sendmail-id.patch
|
||||
BuildRequires: perl-generators
|
||||
Requires: grep mailx
|
||||
Requires: perl(Date::Manip)
|
||||
@ -38,16 +24,6 @@ of the package on many systems.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
rm -f scripts/services/*.orig
|
||||
|
||||
%build
|
||||
|
||||
@ -95,19 +71,13 @@ install -m 0644 override.conf.5 %{buildroot}%{_mandir}/man5
|
||||
install -m 0644 logwatch.conf.5 %{buildroot}%{_mandir}/man5
|
||||
install -m 0644 logwatch.8 %{buildroot}%{_mandir}/man8
|
||||
|
||||
install -m 0755 logwatch.cron %{buildroot}%{_sysconfdir}/cron.daily/0logwatch
|
||||
install -m 0755 scheduler/logwatch.cron %{buildroot}%{_sysconfdir}/cron.daily/0logwatch
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m 0755 scheduler/logwatch.timer %{buildroot}%{_unitdir}/logwatch.timer
|
||||
install -m 0755 scheduler/logwatch.service %{buildroot}%{_unitdir}/logwatch.service
|
||||
|
||||
ln -s ../../%{_datadir}/logwatch/scripts/logwatch.pl %{buildroot}/%{_sbindir}/logwatch
|
||||
|
||||
# Do not install zz-fortune service on RHEL
|
||||
%if 0%{?rhel}
|
||||
rm -f %{buildroot}%{_datadir}/logwatch/scripts/services/zz-fortune* \
|
||||
%{buildroot}%{_datadir}/logwatch/conf/services/zz-fortune* \
|
||||
%{buildroot}%{_datadir}/logwatch/conf/logfiles/fortune*
|
||||
touch %{buildroot}%{_datadir}/logwatch/scripts/services/zz-fortune
|
||||
chmod 644 %{buildroot}%{_datadir}/logwatch/scripts/services/zz-fortune
|
||||
%endif
|
||||
|
||||
echo "###### REGULAR EXPRESSIONS IN THIS FILE WILL BE TRIMMED FROM REPORT OUTPUT #####" > %{buildroot}%{_sysconfdir}/logwatch/conf/ignore.conf
|
||||
echo "# Local configuration options go here (defaults are in %{_datadir}/logwatch/default.conf/logwatch.conf)" > %{buildroot}%{_sysconfdir}/logwatch/conf/logwatch.conf
|
||||
echo "# Configuration overrides for specific logfiles/services may be placed here." > %{buildroot}%{_sysconfdir}/logwatch/conf/override.conf
|
||||
@ -144,8 +114,13 @@ echo "# Configuration overrides for specific logfiles/services may be placed her
|
||||
%dir %{_datadir}/logwatch/default.conf/html
|
||||
%{_datadir}/logwatch/default.conf/html/*.html
|
||||
%{_mandir}/man*/*
|
||||
%{_unitdir}/logwatch.service
|
||||
%{_unitdir}/logwatch.timer
|
||||
|
||||
%changelog
|
||||
* Fri Jan 4 2019 Jan Synáček <jsynacek@redhat.com> - 7.5.0-1
|
||||
- Update to 7.5.0 (#1663428)
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 7.4.3-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user