From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1064073-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id C4234138334
	for <garchives@archives.gentoo.org>; Fri, 28 Dec 2018 15:23:27 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E3C52E0AB0;
	Fri, 28 Dec 2018 15:23:26 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id A961BE0AB0
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 Dec 2018 15:23:24 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D46D5335C16
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 Dec 2018 15:23:22 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 65A364D3
	for <gentoo-commits@lists.gentoo.org>; Fri, 28 Dec 2018 15:23:20 +0000 (UTC)
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" <mjo@gentoo.org>
Message-ID: <1546010554.54fd9e745a555871dd59174a48b3dd4218f3d210.mjo@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/amavis-logwatch/, net-mail/amavis-logwatch/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch net-mail/amavis-logwatch/files/ignore-all-sd_notify-lines.patch net-mail/amavis-logwatch/files/no-pid_file-configured.patch net-mail/amavis-logwatch/files/will-bind-to-lines.patch
X-VCS-Directories: net-mail/amavis-logwatch/ net-mail/amavis-logwatch/files/
X-VCS-Committer: mjo
X-VCS-Committer-Name: Michael Orlitzky
X-VCS-Revision: 54fd9e745a555871dd59174a48b3dd4218f3d210
X-VCS-Branch: master
Date: Fri, 28 Dec 2018 15:23:20 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: bab0d7f9-9e29-4b46-8e3f-d9d9ece5a89c
X-Archives-Hash: 4af2e85ae1d97d1990d84352277e6c57

commit:     54fd9e745a555871dd59174a48b3dd4218f3d210
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 28 15:19:37 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=54fd9e74

net-mail/amavis-logwatch: new revision with patches for unmatched lines.

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../amavis-logwatch-1.51.03-r4.ebuild              | 50 ++++++++++++++++++++++
 .../files/SANITIZED-NULL-bytes-messages.patch      | 34 +++++++++++++++
 .../files/ignore-all-sd_notify-lines.patch         | 33 ++++++++++++++
 .../files/no-pid_file-configured.patch             | 27 ++++++++++++
 .../amavis-logwatch/files/will-bind-to-lines.patch | 29 +++++++++++++
 5 files changed, 173 insertions(+)

diff --git a/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild
new file mode 100644
index 00000000000..db425aabba8
--- /dev/null
+++ b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A log analyzer for amavisd-new"
+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}/ignore-amavis-startup-notifications.patch"
+	"${FILESDIR}/ignore-utf8smtp-lines.patch"
+	"${FILESDIR}/unchecked-encrypted.patch"
+	"${FILESDIR}/file-libmagic-errors.patch"
+	"${FILESDIR}/ignore-all-sd_notify-lines.patch"
+	"${FILESDIR}/no-pid_file-configured.patch"
+	"${FILESDIR}/will-bind-to-lines.patch"
+	"${FILESDIR}/SANITIZED-NULL-bytes-messages.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
+	doman ${PN}.1
+	dobin ${PN}
+	insinto /etc
+	doins ${PN}.conf
+}

diff --git a/net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch b/net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch
new file mode 100644
index 00000000000..0cc27f0bd22
--- /dev/null
+++ b/net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch
@@ -0,0 +1,34 @@
+From 6d985d29d8be2b70ee7e4048a7ae95e2b4013f17 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 28 Dec 2018 10:01:56 -0500
+Subject: [PATCH 4/4] Ignore "SANITIZED ... NULL byte(s)" messages.
+
+Newer versions of the amavisd daemon sanitize NULL bytes within the
+body of a message for the benefit of Cyrus IMAP. When it does this,
+the number of bytes sanitized is logged. This is an informational
+message only as far as I can tell, so it's been added to the list of
+messages to ignore.
+---
+ amavis-logwatch | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/amavis-logwatch b/amavis-logwatch
+index 250a6ba..044c94d 100644
+--- a/amavis-logwatch
++++ b/amavis-logwatch
+@@ -2052,6 +2052,12 @@ sub create_ignore_list() {
+    # describe what is being sent to the systemd notification socket,
+    # if one exists.
+    push @ignore_list_final, qr/^sd_notify( \(no socket\))?:/;
++
++   # In amavisd-new-2.11.0-rc1 and later, amavis will replace any null
++   # bytes that it finds in the body of a message with a "modified
++   # UTF-8" encoded null. The number of times it does this is then
++   # logged with the following message.
++   push @ignore_list_final, qr/^smtp forwarding: SANITIZED (\d+) NULL byte\(s\)/;
+ }
+ 
+ # Notes:
+-- 
+2.19.2
+

diff --git a/net-mail/amavis-logwatch/files/ignore-all-sd_notify-lines.patch b/net-mail/amavis-logwatch/files/ignore-all-sd_notify-lines.patch
new file mode 100644
index 00000000000..f3ce1d1091a
--- /dev/null
+++ b/net-mail/amavis-logwatch/files/ignore-all-sd_notify-lines.patch
@@ -0,0 +1,33 @@
+From 653f988ba163c74f3ebdb6e53f57db9d8e569b1f Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 28 Dec 2018 09:23:52 -0500
+Subject: [PATCH 1/4] Ignore all "sd_notify" lines.
+
+Lines beginning with either "sd_notify:" or "sd_notify (no socket):"
+contain information about what is being sent to the systemd
+notification socket, if one exists. One such line was already being
+ignored, but we don't want any of them. So, the existing
+@ignore_list_final entry was expanded to encompass all such messages.
+---
+ amavis-logwatch | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/amavis-logwatch b/amavis-logwatch
+index ac93cbc..ffb502b 100644
+--- a/amavis-logwatch
++++ b/amavis-logwatch
+@@ -2047,7 +2047,10 @@ sub create_ignore_list() {
+    push @ignore_list_final, qr/\bRUSAGE\b/;
+    push @ignore_list_final, qr/: Sending .* to UNIX socket/;
+ 
+-   push @ignore_list_final, qr/sd_notify \(no socket\): STATUS=Starting child process\(es\), ready for work./
++   # Lines beginning with "sd_notify:" or "sd_notify (no socket):"
++   # describe what is being sent to the systemd notification socket,
++   # if one exists.
++   push @ignore_list_final, qr/^sd_notify( \(no socket\))?:/;
+ }
+ 
+ # Notes:
+-- 
+2.19.2
+

diff --git a/net-mail/amavis-logwatch/files/no-pid_file-configured.patch b/net-mail/amavis-logwatch/files/no-pid_file-configured.patch
new file mode 100644
index 00000000000..5f23955366e
--- /dev/null
+++ b/net-mail/amavis-logwatch/files/no-pid_file-configured.patch
@@ -0,0 +1,27 @@
+From a93ee5d433308d2cac76ac9502e34c953ff96337 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 28 Dec 2018 09:33:07 -0500
+Subject: [PATCH 2/4] Ignore "no $pid_file configured, not checking it" lines.
+
+When no PID file is configured (for example, when amavisd is running
+in the foreground), this message is logged. We already ignore the
+other types of PID file notifications, so ignore this one too.
+---
+ amavis-logwatch | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/amavis-logwatch b/amavis-logwatch
+index ffb502b..6d06793 100644
+--- a/amavis-logwatch
++++ b/amavis-logwatch
+@@ -1958,6 +1958,7 @@ sub create_ignore_list() {
+    push @ignore_list_final, qr/^fish_out_ip_from_received: /;
+    push @ignore_list_final, qr/^Waiting for the process \S+ to terminate/;
+    push @ignore_list_final, qr/^Valid PID file \(younger than sys uptime/;
++   push @ignore_list_final, qr/^no \$pid_file configured, not checking it/;
+    push @ignore_list_final, qr/^Sending SIG\S+ to amavisd/;
+    push @ignore_list_final, qr/^Can't send SIG\S+ to process/;
+    push @ignore_list_final, qr/^killing process/;
+-- 
+2.19.2
+

diff --git a/net-mail/amavis-logwatch/files/will-bind-to-lines.patch b/net-mail/amavis-logwatch/files/will-bind-to-lines.patch
new file mode 100644
index 00000000000..464a85b1c56
--- /dev/null
+++ b/net-mail/amavis-logwatch/files/will-bind-to-lines.patch
@@ -0,0 +1,29 @@
+From e53948a6909e98b63c63c97749c7d0eb534fa274 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 28 Dec 2018 09:40:36 -0500
+Subject: [PATCH 3/4] Ignore "will bind to" lines in addition to "bind to"
+ lines.
+
+In amavisd-new-2.11.0-rc1, the informational "bind to..." messages
+were changed to say "will bind to..." instead. This commit updates the
+@ignore_list_final regular expression to match both forms.
+---
+ amavis-logwatch | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/amavis-logwatch b/amavis-logwatch
+index 6d06793..250a6ba 100644
+--- a/amavis-logwatch
++++ b/amavis-logwatch
+@@ -2029,7 +2029,7 @@ sub create_ignore_list() {
+    push @ignore_list_final, qr/^address modified \(/;
+    push @ignore_list_final, qr/^Request: AM\.PDP /;
+    push @ignore_list_final, qr/^DSPAM result: /;
+-   push @ignore_list_final, qr/^bind to \//;
++   push @ignore_list_final, qr/^(will )?bind to \//;
+    push @ignore_list_final, qr/^ZMQ enabled: /;
+ 
+    push @ignore_list_final, qr/^Inserting header field: X-Amavis-Hold: /;
+-- 
+2.19.2
+