[packages/logwatch] - rel 2; regexp fixes from FC

arekm arekm at pld-linux.org
Mon Feb 22 10:18:59 CET 2016


commit cf44043d57334fa030c03417f2d50bd4e21c5537
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Feb 22 10:18:53 2016 +0100

    - rel 2; regexp fixes from FC

 logwatch-escape-braces-in-regexps.patch | 74 +++++++++++++++++++++++++++++++++
 logwatch.spec                           |  4 +-
 2 files changed, 77 insertions(+), 1 deletion(-)
---
diff --git a/logwatch.spec b/logwatch.spec
index 0a029eb..a75eb10 100644
--- a/logwatch.spec
+++ b/logwatch.spec
@@ -3,7 +3,7 @@ Summary:	Analyzes system logs
 Summary(pl.UTF-8):	Logwatch - analizator logów systemowych
 Name:		logwatch
 Version:	7.4.1
-Release:	1
+Release:	2
 License:	MIT
 Group:		Applications/System
 Source0:	http://sourceforge.net/projects/logwatch/files/logwatch-7.4.1/logwatch-7.4.1.tar.gz/download
@@ -18,6 +18,7 @@ Source5:	%{name}.tmpwatch
 Patch0:		%{name}-log_conf.patch
 Patch1:		%{name}-archives.patch
 Patch2:		%{name}-exim.patch
+Patch3:		logwatch-escape-braces-in-regexps.patch
 URL:		http://www.logwatch.org/
 BuildRequires:	rpm-perlprov
 Requires:	crondaemon
@@ -47,6 +48,7 @@ użyciu i może pracować na większości systemów.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
diff --git a/logwatch-escape-braces-in-regexps.patch b/logwatch-escape-braces-in-regexps.patch
new file mode 100644
index 0000000..3498140
--- /dev/null
+++ b/logwatch-escape-braces-in-regexps.patch
@@ -0,0 +1,74 @@
+According to [1], braces in regexps should now be escaped, otherwise a deprecation warning is
+displayed.
+
+[1] http://perldoc.perl.org/perldelta.html#A-literal-%22{%22-should-now-be-escaped-in-a-pattern
+
+Index: trunk/scripts/services/amavis
+===================================================================
+--- trunk/scripts/services/amavis	(revision 293)
++++ trunk/scripts/services/amavis	(working copy)
+@@ -2283,7 +2283,7 @@
+       #XXX elsif (($action, $key, $ip, $from, $to) = ( $p1 =~ /^(?:Virus found - quarantined|(?:(Passed|Blocked) )?INFECTED) \(([^\)]+)\),[A-Z .]*(?: \[($re_IP)\])?(?: \[$re_IP\])* [<(]([^>)]*)[>)] -> [(<]([^(<]+)[(>]/o ))
+ 
+       # the first IP is the envelope sender.
+-      if ($p1 !~ /^(CLEAN|SPAM(?:MY)?|INFECTED \(.*?\)|BANNED \(.*?\)|BAD-HEADER(?:-\d)?|UNCHECKED|MTA-BLOCKED|OVERSIZED|OTHER|TEMPFAIL)(?: {[^}]+})?, ([^[]+ )?(?:([^<]+) )?[<(](.*?)[>)] -> ([(<].*?[)>]), (?:.*Hits: ([-+.\d]+))(?:.* size: (\d+))?(?:.* autolearn=(\w+))?/) {
++      if ($p1 !~ /^(CLEAN|SPAM(?:MY)?|INFECTED \(.*?\)|BANNED \(.*?\)|BAD-HEADER(?:-\d)?|UNCHECKED|MTA-BLOCKED|OVERSIZED|OTHER|TEMPFAIL)(?: \{[^}]+})?, ([^[]+ )?(?:([^<]+) )?[<(](.*?)[>)] -> ([(<].*?[)>]), (?:.*Hits: ([-+.\d]+))(?:.* size: (\d+))?(?:.* autolearn=(\w+))?/) {
+          inc_unmatched('passblock');
+          next;
+       }
+Index: trunk/scripts/services/postfix
+===================================================================
+--- trunk/scripts/services/postfix	(revision 293)
++++ trunk/scripts/services/postfix	(working copy)
+@@ -1847,7 +1847,7 @@
+         # KeyboardInterrupt 
+         $line =~ /^Read line: "/ or
+         $line =~ /^Found the end of entry$/ or
+-        $line =~ /^Config: {/ or
++        $line =~ /^Config: \{/ or
+         $line =~ /^spfcheck: pyspf result/ or
+         $line =~ /^Starting$/ or
+         $line =~ /^Normal exit$/ or
+Index: trunk/scripts/services/secure
+===================================================================
+--- trunk/scripts/services/secure	(revision 293)
++++ trunk/scripts/services/secure	(working copy)
+@@ -506,7 +506,7 @@
+       $DeniedAccess{"$User,$Reason"}++;
+    } elsif ($ThisLine =~ /^request-key: Cannot find command to construct key/) {
+       $RequestKeyFailures++;
+-   } elsif (my ($type,$from,$response,$client,$service,$e) = ($ThisLine =~ /krb5kdc\[[0-9]*\]: (AS_REQ|TGS_REQ) \([0-9]+ etypes {[ 0-9]+}\) ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+): (ISSUE|UNKNOWN_SERVER): authtime [0-9]+, (?:etypes {rep=[0-9]+ tkt=[0-9]+ ses=[0-9]+},)? ([^ ]+) for ([^ ,]+)(?:, )?(.*)$/)) {
++   } elsif (my ($type,$from,$response,$client,$service,$e) = ($ThisLine =~ /krb5kdc\[[0-9]*\]: (AS_REQ|TGS_REQ) \([0-9]+ etypes \{[ 0-9]+}\) ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+): (ISSUE|UNKNOWN_SERVER): authtime [0-9]+, (?:etypes \{rep=[0-9]+ tkt=[0-9]+ ses=[0-9]+},)? ([^ ]+) for ([^ ,]+)(?:, )?(.*)$/)) {
+      if($service=~/^krbtgt\/([^@]+)@\1/) {
+         $service='Login';
+      }
+@@ -515,7 +515,7 @@
+         $e='';
+      }
+      $KerbList{$response}{$type}{$from}{$service}{$client}{$e}++;
+-  } elsif (my ($type,$from,$response,$client,$service,$e) = ($ThisLine =~ /krb5kdc\[[0-9]*\]: (AS_REQ|TGS_REQ) \([0-9]+ etypes {[ 0-9]+}\) ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+): (NEEDED_PREAUTH|PREAUTH_FAILED|CLIENT_NOT_FOUND): ([^ ]+) for ([^ ,]+)(?:, )?(.*)$/)) {
++  } elsif (my ($type,$from,$response,$client,$service,$e) = ($ThisLine =~ /krb5kdc\[[0-9]*\]: (AS_REQ|TGS_REQ) \([0-9]+ etypes \{[ 0-9]+}\) ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+): (NEEDED_PREAUTH|PREAUTH_FAILED|CLIENT_NOT_FOUND): ([^ ]+) for ([^ ,]+)(?:, )?(.*)$/)) {
+      if($service=~/^krbtgt\/([^@]+)@\1/) {
+         $service='Login';
+      }
+Index: trunk/scripts/services/http
+===================================================================
+--- trunk/scripts/services/http	(revision 293)
++++ trunk/scripts/services/http	(working copy)
+@@ -310,13 +310,13 @@
+    } elsif ($logformat =~ /\G%O/gc) {
+       $parse_field[$parse_index][$parse_subindex++] = "bytes_out";
+       $parse_string[$parse_index] .= "(-|\\d*)";
+-   } elsif ($logformat =~ /\G%{Referer}i/gci) {
++   } elsif ($logformat =~ /\G%\{Referer}i/gci) {
+       $parse_string[$parse_index] .= "(.*)";
+       $parse_field[$parse_index][$parse_subindex++] = "referrer";
+-   } elsif ($logformat =~ /\G%{User-Agent}i/gci) {
++   } elsif ($logformat =~ /\G%\{User-Agent}i/gci) {
+       $parse_string[$parse_index] .= "(.*)";
+       $parse_field[$parse_index][$parse_subindex++] = "agent";
+-   } elsif ($logformat =~ /\G%({.*?})?./gc) {
++   } elsif ($logformat =~ /\G%(\{.*?})?./gc) {
+       $parse_string[$parse_index] .= "(.*?)";
+       $parse_field[$parse_index][$parse_subindex++] = "not_used";
+    } elsif ($logformat =~ /\G\|/gc) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/logwatch.git/commitdiff/cf44043d57334fa030c03417f2d50bd4e21c5537



More information about the pld-cvs-commit mailing list