From dec77c2cdea324c5a0c50cf7a29afbd81b2aad73 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 16 Feb 2019 11:24:24 -0500 Subject: net-mail/amavis-logwatch: new revision with another custom patch. This -r5 adds handle-clamd-select-failed.patch, which allows the program to match those types of lines. Signed-off-by: Michael Orlitzky Package-Manager: Portage-2.3.51, Repoman-2.3.11 --- .../amavis-logwatch-1.51.03-r4.ebuild | 50 --------------------- .../amavis-logwatch-1.51.03-r5.ebuild | 51 ++++++++++++++++++++++ .../files/handle-clamd-select-failed.patch | 38 ++++++++++++++++ 3 files changed, 89 insertions(+), 50 deletions(-) delete mode 100644 net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild create mode 100644 net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r5.ebuild create mode 100644 net-mail/amavis-logwatch/files/handle-clamd-select-failed.patch (limited to 'net-mail/amavis-logwatch') 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 deleted file mode 100644 index db425aabba89..000000000000 --- a/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r4.ebuild +++ /dev/null @@ -1,50 +0,0 @@ -# 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/amavis-logwatch-1.51.03-r5.ebuild b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r5.ebuild new file mode 100644 index 000000000000..c7c607e6427a --- /dev/null +++ b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r5.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2019 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" + "${FILESDIR}/handle-clamd-select-failed.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/handle-clamd-select-failed.patch b/net-mail/amavis-logwatch/files/handle-clamd-select-failed.patch new file mode 100644 index 000000000000..83dad161e18a --- /dev/null +++ b/net-mail/amavis-logwatch/files/handle-clamd-select-failed.patch @@ -0,0 +1,38 @@ +From 869fa9d8b2113f50c3a97ef9f4a1f95171702be4 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Wed, 13 Feb 2019 11:25:33 -0500 +Subject: [PATCH 1/1] Catch "Select failed: Interrupted system call" entries + from clamd. + +When a select() call in clamd is interrupted, amavis logs the +following warning: + + ClamAV-clamd: Select failed: Interrupted system call at /usr/sbin/amavisd + line 8472, line 296., retrying (1) + +These are harmless in and of themselves, but we would like to classify +them as warnings. Currently they are unmatched. This commit adds a +pattern for them, moving them from the "Unmatched Entries" heading to +"Miscellaneous warnings" instead. Afterwards, the report looks like, + + 24 Miscellaneous warnings -------------------------------- + 2 ClamAV-clamd: Select failed: Interrupted system call +--- + amavis-logwatch | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/amavis-logwatch b/amavis-logwatch +index 044c94d..4c9b59f 100644 +--- a/amavis-logwatch ++++ b/amavis-logwatch +@@ -2817,6 +2817,7 @@ while (<>) { + ($p1 =~ /^TROUBLE/) or + ($p1 =~ /Can't (?:connect to UNIX|send to) socket/) or + ($p1 =~ /: Empty result from /) or ++ ($p1 =~ /: Select failed: Interrupted system call/) or + ($p1 =~ /: Error reading from socket: Connection reset by peer/) or + ($p1 =~ /open\(.*\): Permission denied/) or + ($p1 =~ /^_?WARN: /) or +-- +2.19.2 + -- cgit v1.2.3-65-gdbad