Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/amavis-logwatch/, net-mail/amavis-logwatch/files/
Date: Fri, 28 Dec 2018 15:23:27
Message-Id: 1546010554.54fd9e745a555871dd59174a48b3dd4218f3d210.mjo@gentoo
1 commit: 54fd9e745a555871dd59174a48b3dd4218f3d210
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 28 15:19:37 2018 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 28 15:22:34 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54fd9e74
7
8 net-mail/amavis-logwatch: new revision with patches for unmatched lines.
9
10 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 .../amavis-logwatch-1.51.03-r4.ebuild | 50 ++++++++++++++++++++++
14 .../files/SANITIZED-NULL-bytes-messages.patch | 34 +++++++++++++++
15 .../files/ignore-all-sd_notify-lines.patch | 33 ++++++++++++++
16 .../files/no-pid_file-configured.patch | 27 ++++++++++++
17 .../amavis-logwatch/files/will-bind-to-lines.patch | 29 +++++++++++++
18 5 files changed, 173 insertions(+)
19
20 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
21 new file mode 100644
22 index 00000000000..db425aabba8
23 --- /dev/null
24 +++ b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild
25 @@ -0,0 +1,50 @@
26 +# Copyright 1999-2018 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=7
30 +
31 +DESCRIPTION="A log analyzer for amavisd-new"
32 +HOMEPAGE="http://logreporters.sourceforge.net/"
33 +SRC_URI="mirror://sourceforge/logreporters/${P}.tgz"
34 +
35 +LICENSE="MIT"
36 +SLOT="0"
37 +KEYWORDS="~amd64 ~x86"
38 +
39 +RDEPEND="dev-lang/perl"
40 +
41 +PATCHES=(
42 + "${FILESDIR}/unescaped-left-brace.patch"
43 + "${FILESDIR}/redundant-argument-to-sprintf.patch"
44 + "${FILESDIR}/ignore-amavis-startup-notifications.patch"
45 + "${FILESDIR}/ignore-utf8smtp-lines.patch"
46 + "${FILESDIR}/unchecked-encrypted.patch"
47 + "${FILESDIR}/file-libmagic-errors.patch"
48 + "${FILESDIR}/ignore-all-sd_notify-lines.patch"
49 + "${FILESDIR}/no-pid_file-configured.patch"
50 + "${FILESDIR}/will-bind-to-lines.patch"
51 + "${FILESDIR}/SANITIZED-NULL-bytes-messages.patch"
52 +)
53 +
54 +src_prepare() {
55 + default
56 + # Replace the default config file location with ours.
57 + local cfg_default='/usr/local/etc/${progname_prefix}-logwatch.conf'
58 + local cfg_gentoo='/etc/${progname_prefix}-logwatch.conf';
59 + sed -i "s~${cfg_default}~${cfg_gentoo}~" ${PN} \
60 + || die 'failed to update the default config location'
61 +}
62 +
63 +src_compile() {
64 + # The default make target just outputs instructions. We don't want
65 + # the user to see these, so we avoid the default emake.
66 + :
67 +}
68 +
69 +src_install() {
70 + dodoc Bugs Changes README
71 + doman ${PN}.1
72 + dobin ${PN}
73 + insinto /etc
74 + doins ${PN}.conf
75 +}
76
77 diff --git a/net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch b/net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch
78 new file mode 100644
79 index 00000000000..0cc27f0bd22
80 --- /dev/null
81 +++ b/net-mail/amavis-logwatch/files/SANITIZED-NULL-bytes-messages.patch
82 @@ -0,0 +1,34 @@
83 +From 6d985d29d8be2b70ee7e4048a7ae95e2b4013f17 Mon Sep 17 00:00:00 2001
84 +From: Michael Orlitzky <michael@××××××××.com>
85 +Date: Fri, 28 Dec 2018 10:01:56 -0500
86 +Subject: [PATCH 4/4] Ignore "SANITIZED ... NULL byte(s)" messages.
87 +
88 +Newer versions of the amavisd daemon sanitize NULL bytes within the
89 +body of a message for the benefit of Cyrus IMAP. When it does this,
90 +the number of bytes sanitized is logged. This is an informational
91 +message only as far as I can tell, so it's been added to the list of
92 +messages to ignore.
93 +---
94 + amavis-logwatch | 6 ++++++
95 + 1 file changed, 6 insertions(+)
96 +
97 +diff --git a/amavis-logwatch b/amavis-logwatch
98 +index 250a6ba..044c94d 100644
99 +--- a/amavis-logwatch
100 ++++ b/amavis-logwatch
101 +@@ -2052,6 +2052,12 @@ sub create_ignore_list() {
102 + # describe what is being sent to the systemd notification socket,
103 + # if one exists.
104 + push @ignore_list_final, qr/^sd_notify( \(no socket\))?:/;
105 ++
106 ++ # In amavisd-new-2.11.0-rc1 and later, amavis will replace any null
107 ++ # bytes that it finds in the body of a message with a "modified
108 ++ # UTF-8" encoded null. The number of times it does this is then
109 ++ # logged with the following message.
110 ++ push @ignore_list_final, qr/^smtp forwarding: SANITIZED (\d+) NULL byte\(s\)/;
111 + }
112 +
113 + # Notes:
114 +--
115 +2.19.2
116 +
117
118 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
119 new file mode 100644
120 index 00000000000..f3ce1d1091a
121 --- /dev/null
122 +++ b/net-mail/amavis-logwatch/files/ignore-all-sd_notify-lines.patch
123 @@ -0,0 +1,33 @@
124 +From 653f988ba163c74f3ebdb6e53f57db9d8e569b1f Mon Sep 17 00:00:00 2001
125 +From: Michael Orlitzky <michael@××××××××.com>
126 +Date: Fri, 28 Dec 2018 09:23:52 -0500
127 +Subject: [PATCH 1/4] Ignore all "sd_notify" lines.
128 +
129 +Lines beginning with either "sd_notify:" or "sd_notify (no socket):"
130 +contain information about what is being sent to the systemd
131 +notification socket, if one exists. One such line was already being
132 +ignored, but we don't want any of them. So, the existing
133 +@ignore_list_final entry was expanded to encompass all such messages.
134 +---
135 + amavis-logwatch | 5 ++++-
136 + 1 file changed, 4 insertions(+), 1 deletion(-)
137 +
138 +diff --git a/amavis-logwatch b/amavis-logwatch
139 +index ac93cbc..ffb502b 100644
140 +--- a/amavis-logwatch
141 ++++ b/amavis-logwatch
142 +@@ -2047,7 +2047,10 @@ sub create_ignore_list() {
143 + push @ignore_list_final, qr/\bRUSAGE\b/;
144 + push @ignore_list_final, qr/: Sending .* to UNIX socket/;
145 +
146 +- push @ignore_list_final, qr/sd_notify \(no socket\): STATUS=Starting child process\(es\), ready for work./
147 ++ # Lines beginning with "sd_notify:" or "sd_notify (no socket):"
148 ++ # describe what is being sent to the systemd notification socket,
149 ++ # if one exists.
150 ++ push @ignore_list_final, qr/^sd_notify( \(no socket\))?:/;
151 + }
152 +
153 + # Notes:
154 +--
155 +2.19.2
156 +
157
158 diff --git a/net-mail/amavis-logwatch/files/no-pid_file-configured.patch b/net-mail/amavis-logwatch/files/no-pid_file-configured.patch
159 new file mode 100644
160 index 00000000000..5f23955366e
161 --- /dev/null
162 +++ b/net-mail/amavis-logwatch/files/no-pid_file-configured.patch
163 @@ -0,0 +1,27 @@
164 +From a93ee5d433308d2cac76ac9502e34c953ff96337 Mon Sep 17 00:00:00 2001
165 +From: Michael Orlitzky <michael@××××××××.com>
166 +Date: Fri, 28 Dec 2018 09:33:07 -0500
167 +Subject: [PATCH 2/4] Ignore "no $pid_file configured, not checking it" lines.
168 +
169 +When no PID file is configured (for example, when amavisd is running
170 +in the foreground), this message is logged. We already ignore the
171 +other types of PID file notifications, so ignore this one too.
172 +---
173 + amavis-logwatch | 1 +
174 + 1 file changed, 1 insertion(+)
175 +
176 +diff --git a/amavis-logwatch b/amavis-logwatch
177 +index ffb502b..6d06793 100644
178 +--- a/amavis-logwatch
179 ++++ b/amavis-logwatch
180 +@@ -1958,6 +1958,7 @@ sub create_ignore_list() {
181 + push @ignore_list_final, qr/^fish_out_ip_from_received: /;
182 + push @ignore_list_final, qr/^Waiting for the process \S+ to terminate/;
183 + push @ignore_list_final, qr/^Valid PID file \(younger than sys uptime/;
184 ++ push @ignore_list_final, qr/^no \$pid_file configured, not checking it/;
185 + push @ignore_list_final, qr/^Sending SIG\S+ to amavisd/;
186 + push @ignore_list_final, qr/^Can't send SIG\S+ to process/;
187 + push @ignore_list_final, qr/^killing process/;
188 +--
189 +2.19.2
190 +
191
192 diff --git a/net-mail/amavis-logwatch/files/will-bind-to-lines.patch b/net-mail/amavis-logwatch/files/will-bind-to-lines.patch
193 new file mode 100644
194 index 00000000000..464a85b1c56
195 --- /dev/null
196 +++ b/net-mail/amavis-logwatch/files/will-bind-to-lines.patch
197 @@ -0,0 +1,29 @@
198 +From e53948a6909e98b63c63c97749c7d0eb534fa274 Mon Sep 17 00:00:00 2001
199 +From: Michael Orlitzky <michael@××××××××.com>
200 +Date: Fri, 28 Dec 2018 09:40:36 -0500
201 +Subject: [PATCH 3/4] Ignore "will bind to" lines in addition to "bind to"
202 + lines.
203 +
204 +In amavisd-new-2.11.0-rc1, the informational "bind to..." messages
205 +were changed to say "will bind to..." instead. This commit updates the
206 +@ignore_list_final regular expression to match both forms.
207 +---
208 + amavis-logwatch | 2 +-
209 + 1 file changed, 1 insertion(+), 1 deletion(-)
210 +
211 +diff --git a/amavis-logwatch b/amavis-logwatch
212 +index 6d06793..250a6ba 100644
213 +--- a/amavis-logwatch
214 ++++ b/amavis-logwatch
215 +@@ -2029,7 +2029,7 @@ sub create_ignore_list() {
216 + push @ignore_list_final, qr/^address modified \(/;
217 + push @ignore_list_final, qr/^Request: AM\.PDP /;
218 + push @ignore_list_final, qr/^DSPAM result: /;
219 +- push @ignore_list_final, qr/^bind to \//;
220 ++ push @ignore_list_final, qr/^(will )?bind to \//;
221 + push @ignore_list_final, qr/^ZMQ enabled: /;
222 +
223 + push @ignore_list_final, qr/^Inserting header field: X-Amavis-Hold: /;
224 +--
225 +2.19.2
226 +