aboutsummaryrefslogtreecommitdiff
path: root/network/spamassassin
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2013-10-28 20:29:53 -0500
committerRobby Workman <rworkman@slackbuilds.org>2013-10-28 20:29:53 -0500
commitf5e362858052345118ecc4ee7eaa213951e0e994 (patch)
tree3fb4bd6e503c9bc077a86278cece4d288bb4f0a5 /network/spamassassin
parent812d454d4c768baa24e80035ed7b479c166fd1c2 (diff)
network/spamassassin: Included a patch to suppress log warning
Thanks to mancha for the patch. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/spamassassin')
-rw-r--r--network/spamassassin/SpamAssassin-3.3.2-perl.diff97
-rw-r--r--network/spamassassin/spamassassin.SlackBuild7
2 files changed, 102 insertions, 2 deletions
diff --git a/network/spamassassin/SpamAssassin-3.3.2-perl.diff b/network/spamassassin/SpamAssassin-3.3.2-perl.diff
new file mode 100644
index 000000000000..776a7dd3aa95
--- /dev/null
+++ b/network/spamassassin/SpamAssassin-3.3.2-perl.diff
@@ -0,0 +1,97 @@
+--- lib/Mail/SpamAssassin/AsyncLoop.pm.orig 2011-06-07
++++ lib/Mail/SpamAssassin/AsyncLoop.pm 2013-05-29
+@@ -361,5 +361,12 @@
+ $now = time; # capture new timestamp, after possible sleep in 'select'
+
+- while (my($key,$ent) = each %$pending) {
++ # A callback routine may generate another DNS query, which may insert
++ # an entry into the %$pending hash thus invalidating the each() context.
++ # So, make sure that callbacks are not called while the each() context
++ # is open, or avoid using each(). [Bug 6937]
++ #
++ # while (my($key,$ent) = each %$pending) {
++ foreach my $key (keys %$pending) {
++ my $ent = $pending->{$key};
+ my $id = $ent->{id};
+ if (defined $ent->{poll_callback}) { # call a "poll_callback" if exists
+@@ -449,5 +456,6 @@
+ my $foundcnt = 0;
+ my $now = time;
+- while (my($key,$ent) = each %$pending) {
++ foreach my $key (keys %$pending) {
++ my $ent = $pending->{$key};
+ dbg("async: aborting after %.3f s, %s: %s",
+ $now - $ent->{start_time},
+--- lib/Mail/SpamAssassin/Conf/Parser.pm.orig 2011-06-07
++++ lib/Mail/SpamAssassin/Conf/Parser.pm 2013-05-29
+@@ -1249,5 +1249,5 @@
+ my $mods = '';
+ local ($1,$2);
+- if ($re =~ s/^m{//) {
++ if ($re =~ s/^m\{//) {
+ $re =~ s/}([a-z]*)$//; $mods = $1;
+ }
+--- lib/Mail/SpamAssassin/DnsResolver.pm.orig 2011-06-07
++++ lib/Mail/SpamAssassin/DnsResolver.pm 2013-05-29
+@@ -441,8 +441,14 @@
+ if (!defined($timeout) || $timeout > 0)
+ { $timer = $self->{main}->time_method("poll_dns_idle") }
++ $! = 0;
+ ($nfound, $timeleft) = select($rout=$rin, undef, undef, $timeout);
+ }
+ if (!defined $nfound || $nfound < 0) {
+- warn "dns: select failed: $!";
++ if ($!) { warn "dns: select failed: $!\n" }
++ else { info("dns: select interrupted") }
++ return;
++ } elsif (!$nfound) {
++ if (!defined $timeout) { warn("dns: select returned empty-handed\n") }
++ elsif ($timeout > 0) { dbg("dns: select timed out %.3f s", $timeout) }
+ return;
+ }
+--- lib/Mail/SpamAssassin/Message.pm.orig 2011-06-07
++++ lib/Mail/SpamAssassin/Message.pm 2013-05-29
+@@ -567,5 +567,5 @@
+ # bug 5557: windows requires tmp file be closed before it can be rm'd
+ if (ref $part->{'raw'} eq 'GLOB') {
+- close($part->{'raw'}) or die "error closing input file: $!";
++ close($part->{'raw'}) or warn "error closing input file: $!";
+ }
+
+--- lib/Mail/SpamAssassin/PerMsgStatus.pm.orig 2011-06-07
++++ lib/Mail/SpamAssassin/PerMsgStatus.pm 2013-05-29
+@@ -421,6 +421,6 @@
+ }
+
+- # ignore tests with 0 score in this scoreset
+- next if ($scores->{$test} == 0);
++ # ignore tests with 0 score (or undefined) in this scoreset
++ next if !$scores->{$test};
+
+ # Go ahead and add points to the proper locations
+@@ -1253,11 +1253,10 @@
+ my $line = '';
+ foreach my $test (sort @{$self->{test_names_hit}}) {
+- if (!$line) {
+- $line .= $test . "=" . $self->{conf}->{scores}->{$test};
+- } else {
+- $line .= $arg . $test . "=" . $self->{conf}->{scores}->{$test};
+- }
++ my $score = $self->{conf}->{scores}->{$test};
++ $score = '0' if !defined $score;
++ $line .= $arg if $line ne '';
++ $line .= $test . "=" . $score;
+ }
+- $line ? $line : 'none';
++ $line ne '' ? $line : 'none';
+ },
+
+--- lib/Mail/SpamAssassin/Util.pm.orig 2013-05-29
++++ lib/Mail/SpamAssassin/Util.pm 2013-05-29
+@@ -1583,5 +1583,5 @@
+ return undef; # invalid
+ }
+- elsif ($re =~ s/^m{//) { # m{foo/bar}
++ elsif ($re =~ s/^m\{//) { # m{foo/bar}
+ $delim = '}';
+ }
diff --git a/network/spamassassin/spamassassin.SlackBuild b/network/spamassassin/spamassassin.SlackBuild
index 072eb69f173b..0fb6d4d5bb04 100644
--- a/network/spamassassin/spamassassin.SlackBuild
+++ b/network/spamassassin/spamassassin.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for spamassassin
-# Copyright 2008-2011 LukenShiro, Italy
+# Copyright 2008-2013 LukenShiro, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +24,11 @@
# Thanks to Nishant Limbachia for providing a SQL script to be used with
# spamassassin database, and most of spamassassin dependencies' scripts.
+# Thanks to Mancha on LQ for a patch to suppress log warning.
PRGNAM=spamassassin
VERSION=${VERSION:-3.3.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -70,6 +71,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+patch -p0 < $CWD/SpamAssassin-3.3.2-perl.diff || exit 1
+
echo "y" | perl Makefile.PL \
PREFIX=/usr \
INSTALLDIRS=vendor \