aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukenShiro <lukenshiro@ngi.it>2014-09-26 18:13:39 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-09-26 18:13:39 +0700
commit02189e110f2ba5b09e8e2882b44bf5afa748d07a (patch)
treebbad9f32a2d0f54fd4688dc6bdbe31b6cfe4a37f
parent9d7d6d86ec5f9f27c6d819a3e5900ba466f86b6b (diff)
network/spamassassin: Fix bug with dnsresolver.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/spamassassin/patch-dnsresolver_3.4.0.diff14
-rw-r--r--network/spamassassin/spamassassin.SlackBuild8
2 files changed, 21 insertions, 1 deletions
diff --git a/network/spamassassin/patch-dnsresolver_3.4.0.diff b/network/spamassassin/patch-dnsresolver_3.4.0.diff
new file mode 100644
index 0000000000000..c1ee1a05c6cbd
--- /dev/null
+++ b/network/spamassassin/patch-dnsresolver_3.4.0.diff
@@ -0,0 +1,14 @@
+--- Mail/SpamAssassin/DnsResolver.pm.orig 2014-05-07 17:54:29 +0200
++++ Mail/SpamAssassin/DnsResolver.pm 2014-06-18 02:13:32 +0200
+@@ -205,6 +205,8 @@
+ dbg("dns: servers set by config to: %s", join(', ',@ns_addr_port));
+ } elsif ($res) { # default as provided by Net::DNS, e.g. /etc/resolv.conf
+- @ns_addr_port = map(untaint_var("[$_]:" . $res->{port}),
+- @{$res->{nameservers}});
++ my @ns = $res->UNIVERSAL::can('nameservers') ? $res->nameservers
++ : @{$res->{nameservers}};
++ my $port = $res->UNIVERSAL::can('port') ? $res->port : $res->{port};
++ @ns_addr_port = map(untaint_var("[$_]:" . $port), @ns);
+ dbg("dns: servers obtained from Net::DNS : %s", join(', ',@ns_addr_port));
+ }
+
diff --git a/network/spamassassin/spamassassin.SlackBuild b/network/spamassassin/spamassassin.SlackBuild
index b77c2645b1923..148dff6280705 100644
--- a/network/spamassassin/spamassassin.SlackBuild
+++ b/network/spamassassin/spamassassin.SlackBuild
@@ -27,7 +27,7 @@
PRGNAM=spamassassin
VERSION=${VERSION:-3.4.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -70,6 +70,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# patch for bug in DnsResolver.pm (thanks to Edgars for pointing it out)
+# https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7057
+cd lib
+patch -p0 < $CWD/patch-dnsresolver_3.4.0.diff
+cd ..
+
echo "y" | perl Makefile.PL \
PREFIX=/usr \
INSTALLDIRS=vendor \