* [gentoo-commits] repo/gentoo:master commit in: net-mail/postfix-logwatch/, net-mail/postfix-logwatch/files/
@ 2017-08-24 13:21 Michael Orlitzky
0 siblings, 0 replies; 3+ messages in thread
From: Michael Orlitzky @ 2017-08-24 13:21 UTC (permalink / raw
To: gentoo-commits
commit: 0fde279c363ed228d5a1eae8716a5c236c48e084
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 24 13:21:28 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Aug 24 13:21:41 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fde279c
net-mail/postfix-logwatch: new revision with some bugfix patches.
Upstream development has stalled for this package, so we now include a
few patches needed to support modern versions of perl.
Package-Manager: Portage-2.3.6, Repoman-2.3.1
.../files/redundant-argument-to-sprintf.patch | 48 ++++++++++++++++++++++
.../files/unescaped-left-brace.patch | 37 +++++++++++++++++
.../postfix-logwatch-1.40.03-r1.ebuild | 42 +++++++++++++++++++
3 files changed, 127 insertions(+)
diff --git a/net-mail/postfix-logwatch/files/redundant-argument-to-sprintf.patch b/net-mail/postfix-logwatch/files/redundant-argument-to-sprintf.patch
new file mode 100644
index 00000000000..ee0e79bd41d
--- /dev/null
+++ b/net-mail/postfix-logwatch/files/redundant-argument-to-sprintf.patch
@@ -0,0 +1,48 @@
+From 6afb8e258a5a2a0e7c72c4c25927dde9d1e2ad89 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 24 Aug 2017 07:34:36 -0400
+Subject: [PATCH 2/2] Fix redundant argument to sprintf warning.
+
+Perl 5.22 now warns about redundant (i.e. extra) arguments to the
+sprintf function. If your format string only has two place-holders but
+you pass three place-fillers, you get warned:
+
+ Redundant argument in sprintf at ./postfix-logwatch line 1382...
+
+The issue there was that the format string passed to sprintf was
+constructed dynamically; sometimes it would contain two place-holders,
+and sometimes three. Three place-fillers were always passed, so when
+only two place-holders were used, the warning would be thrown. This was
+fixed by testing whether or not there are two or three place-holders,
+and passing the appropriate number of place-fillers.
+---
+ postfix-logwatch | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/postfix-logwatch b/postfix-logwatch
+index 1e58a95..92ed621 100644
+--- a/postfix-logwatch
++++ b/postfix-logwatch
+@@ -1378,8 +1378,17 @@ sub print_summary_report (\@) {
+ $$divisor == $Totals{$keyname} ? 100.00 : $Totals{$keyname} * 100 / $$divisor;
+ }
+ else {
+- push @{$lines[$cur_level]},
+- sprintf "$fmt %-23s $extra\n", $total, $desc, commify ($Totals{$keyname});
++ my $new_line;
++ if ($extra eq '') {
++ $new_line = sprintf("$fmt %-23s \n", $total, $desc);
++ }
++ else {
++ $new_line = sprintf("$fmt %-23s $extra\n",
++ $total,
++ $desc,
++ commify ($Totals{$keyname}));
++ }
++ push @{$lines[$cur_level]}, $new_line
+ }
+ }
+ }
+--
+2.13.0
+
diff --git a/net-mail/postfix-logwatch/files/unescaped-left-brace.patch b/net-mail/postfix-logwatch/files/unescaped-left-brace.patch
new file mode 100644
index 00000000000..65139a3aff1
--- /dev/null
+++ b/net-mail/postfix-logwatch/files/unescaped-left-brace.patch
@@ -0,0 +1,37 @@
+From 84f9fb47783e63757f27e5990ee606ff01e079a9 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 24 Aug 2017 07:09:28 -0400
+Subject: [PATCH 1/2] Fix unescaped left brace warning for "Config: {".
+
+New versions of Perl are starting to complain about unescaped braces
+in regular expressions, and supposedly the warning will become a fatal
+error in Perl 5.30. This particular warning is,
+
+ Unescaped left brace in regex is deprecated, passed through in regex;
+ marked by <-- HERE in m/^Config: { <-- HERE / at ./postfix-logwatch
+ line 1850.
+
+and it was fixed by going to line 1850 and putting a backslash before
+the left brace.
+
+Bug: https://sourceforge.net/p/logreporters/bugs/4/
+---
+ postfix-logwatch | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/postfix-logwatch b/postfix-logwatch
+index 3e4a673..1e58a95 100644
+--- a/postfix-logwatch
++++ b/postfix-logwatch
+@@ -1847,7 +1847,7 @@ sub postfix_policy_spf($) {
+ # 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
+--
+2.13.0
+
diff --git a/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r1.ebuild b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r1.ebuild
new file mode 100644
index 00000000000..17046988053
--- /dev/null
+++ b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A log analyzer for postfix"
+HOMEPAGE="http://logreporters.sourceforge.net/"
+SRC_URI="mirror://sourceforge/logreporters/${P}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/perl"
+
+PATCHES=(
+ "${FILESDIR}/unescaped-left-brace.patch"
+ "${FILESDIR}/redundant-argument-to-sprintf.patch"
+)
+
+src_prepare() {
+ default
+ # Replace the default config file location with ours.
+ local cfg_default='/usr/local/etc/${progname_prefix}-logwatch.conf'
+ local cfg_gentoo='/etc/${progname_prefix}-logwatch.conf';
+ sed -i "s~${cfg_default}~${cfg_gentoo}~" ${PN} \
+ || die 'failed to update the default config location'
+}
+
+src_compile() {
+ # The default make target just outputs instructions. We don't want
+ # the user to see these, so we avoid the default emake.
+ :
+}
+
+src_install() {
+ dodoc Bugs Changes README ${PN}.conf-topn
+ doman ${PN}.1
+ dobin ${PN}
+ insinto /etc
+ doins ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-mail/postfix-logwatch/, net-mail/postfix-logwatch/files/
@ 2017-09-05 13:29 Michael Orlitzky
0 siblings, 0 replies; 3+ messages in thread
From: Michael Orlitzky @ 2017-09-05 13:29 UTC (permalink / raw
To: gentoo-commits
commit: dc1f3a7260ac66a9eddeccd01e60cb1fe7b780fb
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 5 13:27:09 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Sep 5 13:27:29 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc1f3a72
net-mail/postfix-logwatch: new revision with another new bugfix patch.
Package-Manager: Portage-2.3.6, Repoman-2.3.1
.../files/multi-digit-enhanced-status.patch | 38 ++++++++++++++++++++++
...1.ebuild => postfix-logwatch-1.40.03-r2.ebuild} | 1 +
2 files changed, 39 insertions(+)
diff --git a/net-mail/postfix-logwatch/files/multi-digit-enhanced-status.patch b/net-mail/postfix-logwatch/files/multi-digit-enhanced-status.patch
new file mode 100644
index 00000000000..f07ab22813c
--- /dev/null
+++ b/net-mail/postfix-logwatch/files/multi-digit-enhanced-status.patch
@@ -0,0 +1,38 @@
+From ced6e6fcbf1a025419e8ee9f940e5022ed440532 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Tue, 5 Sep 2017 09:19:44 -0400
+Subject: [PATCH 1/1] Allow multi-digit numbers in enhanced SMTP status codes.
+
+The re_DSN regular expression is intended to match a response like
+"550 1.2.3", where "1.2.3" is an enhanced status code. However, the
+regular expression was only expecting single-digit numbers between the
+dots; thus it was missing codes like "550 5.7.23". The expression has
+been updated to accept any number of digits between the dots.
+
+This fixes unmatched rejection lines that begin with,
+
+ 550 5.7.23 <user@example.com>: Recipient address rejected...
+
+Such lines appear with newer versions of the python SPF policy daemon.
+---
+ postfix-logwatch | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/postfix-logwatch b/postfix-logwatch
+index 92ed621..827dfe0 100644
+--- a/postfix-logwatch
++++ b/postfix-logwatch
+@@ -66,7 +66,9 @@ my $re_QID_s = qr/[A-Z\d]+/;
+ my $re_QID_l = qr/(?:NOQUEUE|[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ\d]+)/;
+ our $re_QID;
+
+-our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d\.\d\.\d)?)/;
++# The enhanced status codes can contain two-digit (or more) numbers;
++# for example, "550 5.7.23".
++our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d+\.\d+\.\d+)?)/;
+ our $re_DDD = qr/(?:(?:conn_use=\d+ )?delay=-?[\d.]+(?:, delays=[\d\/.]+)?(?:, dsn=[\d.]+)?)/;
+
+ #MODULE: ../Logreporters/Utils.pm
+--
+2.13.0
+
diff --git a/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r1.ebuild b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r2.ebuild
similarity index 95%
rename from net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r1.ebuild
rename to net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r2.ebuild
index 17046988053..b798aeb3512 100644
--- a/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r1.ebuild
+++ b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r2.ebuild
@@ -16,6 +16,7 @@ RDEPEND="dev-lang/perl"
PATCHES=(
"${FILESDIR}/unescaped-left-brace.patch"
"${FILESDIR}/redundant-argument-to-sprintf.patch"
+ "${FILESDIR}/multi-digit-enhanced-status.patch"
)
src_prepare() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-mail/postfix-logwatch/, net-mail/postfix-logwatch/files/
@ 2018-12-28 15:23 Michael Orlitzky
0 siblings, 0 replies; 3+ messages in thread
From: Michael Orlitzky @ 2018-12-28 15:23 UTC (permalink / raw
To: gentoo-commits
commit: 75d9e77e4bac2a796c9faf1ba820d12a02fc6a77
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 15:08:29 2018 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 15:22:34 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75d9e77e
net-mail/postfix-logwatch: new revision with a patch for an unmatched line.
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../files/all-server-ports-busy-lines.patch | 59 ++++++++++++++++++++++
.../postfix-logwatch-1.40.03-r3.ebuild | 44 ++++++++++++++++
2 files changed, 103 insertions(+)
diff --git a/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch b/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch
new file mode 100644
index 00000000000..dd5ae5869eb
--- /dev/null
+++ b/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch
@@ -0,0 +1,59 @@
+From 7b3930a9d44f91a63f0edbe765c75dc8f6128b7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 26 Dec 2018 12:54:15 -0500
+Subject: [PATCH 1/1] Match postscreen "all server ports busy" lines.
+
+Lines that look like
+
+ NOQUEUE: reject: CONNECT from [192.168.0.1]:39410: all server ports busy
+
+were not being matched. There were two similar matches, one for a
+specific "too many connections" error
+
+ NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections
+
+and another for a more general form intended to match "all screening
+ports busy" errors from postscreen:
+
+ reject: connect from [192.168.0.1]:21225: all screening ports busy
+
+The general form is preferable in my opinion, but the "screening
+ports" message is a bit of a black sheep. As a result, even the more
+general regular expression didn't match the other two errors due to
+their beginning with "NOQUEUE" and using an uppercase "CONNECT".
+
+To fix this, the general regular expression was made even more
+general. Now, a leading "NOQUEUE: " is optional, and the "CONNECT" can
+be capitalized. Thus, one regular expression now catches all three
+messages.
+---
+ postfix-logwatch | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/postfix-logwatch b/postfix-logwatch
+index 827dfe0..648ba7a 100644
+--- a/postfix-logwatch
++++ b/postfix-logwatch
+@@ -4399,14 +4399,11 @@ sub postfix_postscreen {
+ }
+ }
+
+- elsif ($line =~ /^NOQUEUE: reject: CONNECT from \[([^]]+)\](?::\d+)?: too many connections/) {
+- # NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections
+- $Counts{'postscreen'}{'reject'}{'Too many connections'}{$1}{$END_KEY}++ if $Collecting{'postscreen'};
+- }
+-
+- elsif ($line =~ /^reject: connect from \[([^]]+)\](?::\d+)?: (.+)$/) {
+- # reject: connect from [192.168.0.1]:21225: all screening ports busy
+- $Counts{'postscreen'}{'reject'}{"\u$2"}{$1}{$END_KEY}++ if $Collecting{'postscreen'};
++ elsif ($line =~ /^(NOQUEUE: )?reject: (connect|CONNECT) from \[([^]]+)\](?::\d+)?: (.+)$/) {
++ # NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections
++ # NOQUEUE: reject: CONNECT from [192.168.0.1]:39410: all server ports busy
++ # reject: connect from [192.168.0.1]:21225: all screening ports busy
++ $Counts{'postscreen'}{'reject'}{"\u$4"}{$3}{$END_KEY}++ if $Collecting{'postscreen'};
+ }
+
+ elsif ($line =~ /^(?:WHITELIST VETO) \[([^]]+)\](?::\d+)?$/) {
+--
+2.19.2
+
diff --git a/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r3.ebuild b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r3.ebuild
new file mode 100644
index 00000000000..1e6cf975500
--- /dev/null
+++ b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A log analyzer for postfix"
+HOMEPAGE="http://logreporters.sourceforge.net/"
+SRC_URI="mirror://sourceforge/logreporters/${P}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/perl"
+
+PATCHES=(
+ "${FILESDIR}/unescaped-left-brace.patch"
+ "${FILESDIR}/redundant-argument-to-sprintf.patch"
+ "${FILESDIR}/multi-digit-enhanced-status.patch"
+ "${FILESDIR}/all-server-ports-busy-lines.patch"
+)
+
+src_prepare() {
+ default
+ # Replace the default config file location with ours.
+ local cfg_default='/usr/local/etc/${progname_prefix}-logwatch.conf'
+ local cfg_gentoo='/etc/${progname_prefix}-logwatch.conf';
+ sed -i "s~${cfg_default}~${cfg_gentoo}~" ${PN} \
+ || die 'failed to update the default config location'
+}
+
+src_compile() {
+ # The default make target just outputs instructions. We don't want
+ # the user to see these, so we avoid the default emake.
+ :
+}
+
+src_install() {
+ dodoc Bugs Changes README ${PN}.conf-topn
+ doman ${PN}.1
+ dobin ${PN}
+ insinto /etc
+ doins ${PN}.conf
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-28 15:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-05 13:29 [gentoo-commits] repo/gentoo:master commit in: net-mail/postfix-logwatch/, net-mail/postfix-logwatch/files/ Michael Orlitzky
-- strict thread matches above, loose matches on Subject: below --
2018-12-28 15:23 Michael Orlitzky
2017-08-24 13:21 Michael Orlitzky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox