summaryrefslogtreecommitdiff
path: root/extra/spamassassin
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-06-20 16:36:47 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-06-20 16:36:47 -0300
commit572f3b3bd973bfa7e64c4c42fe87c8e3a79b7c20 (patch)
tree89f43dd22eaacadfa97977de1f3b73285da15735 /extra/spamassassin
parentcebf33d7109e0157a80f34d6136e212f0a28d274 (diff)
parent5898d76e47144f2366f9acda9ab52827b696c2d5 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/bitcoin/PKGBUILD community/ecryptfs-utils/PKGBUILD community/erlang/PKGBUILD community/esmtp/PKGBUILD community/gmic/PKGBUILD community/ibus-sunpinyin/PKGBUILD community/libev/PKGBUILD community/libmirage/PKGBUILD community/libraw/PKGBUILD community/lilypond/PKGBUILD community/luajit/PKGBUILD community/matchbox-window-manager/PKGBUILD community/miniupnpc/PKGBUILD community/mplayer2/PKGBUILD community/mumble/PKGBUILD community/oss/PKGBUILD community/pidgin-lwqq/PKGBUILD community/postgis/PKGBUILD community/python2-pytables/PKGBUILD community/qmc2/PKGBUILD community/qtfm/PKGBUILD community/ruby-gtk3/PKGBUILD community/tea/PKGBUILD community/yacpi/PKGBUILD core/bridge-utils/PKGBUILD core/gcc/PKGBUILD core/libsasl/PKGBUILD core/lvm2/PKGBUILD core/net-tools/PKGBUILD core/ppp/PKGBUILD core/pptpclient/PKGBUILD core/sdparm/PKGBUILD core/systemd/PKGBUILD core/sysvinit-tools/PKGBUILD extra/aisleriot/PKGBUILD extra/arora/PKGBUILD extra/bluez-hcidump/PKGBUILD extra/bluez/PKGBUILD extra/cups/PKGBUILD extra/cyrus-sasl/PKGBUILD extra/dhcp/PKGBUILD extra/gnome-bluetooth/PKGBUILD extra/gnome-desktop/PKGBUILD extra/gnutls/PKGBUILD extra/gts/PKGBUILD extra/guile/PKGBUILD extra/harfbuzz/PKGBUILD extra/iptraf-ng/PKGBUILD extra/json-c/PKGBUILD extra/kdenetwork/PKGBUILD extra/kdepim/PKGBUILD extra/kdesdk-kate/PKGBUILD extra/libatasmart/PKGBUILD extra/libbsd/PKGBUILD extra/libdmtx/PKGBUILD extra/libhangul/PKGBUILD extra/libindi/PKGBUILD extra/libpeas/PKGBUILD extra/libsmbios/PKGBUILD extra/libspiro/PKGBUILD extra/libsrtp/PKGBUILD extra/libxml2/PKGBUILD extra/libxrender/PKGBUILD extra/libxvmc/PKGBUILD extra/llvm/PKGBUILD extra/maxima/PKGBUILD extra/msmtp/PKGBUILD extra/ortp/PKGBUILD extra/perl-dbd-sqlite/PKGBUILD extra/perl-yaml-syck/PKGBUILD extra/php/PKGBUILD extra/pm-utils/PKGBUILD extra/pulseaudio/PKGBUILD extra/pyqt4/PKGBUILD extra/scim-anthy/PKGBUILD extra/scim-chewing/PKGBUILD extra/scim-m17n/PKGBUILD extra/scim/PKGBUILD extra/ssmtp/PKGBUILD extra/texmacs/PKGBUILD extra/v86d/PKGBUILD extra/vlc/PKGBUILD extra/webkitgtk/PKGBUILD extra/webkitgtk2/PKGBUILD extra/wireshark/PKGBUILD extra/zsh/PKGBUILD libre/bogofilter-libre/PKGBUILD libre/ecasound-libre/PKGBUILD libre/libretools/libretools.install libre/mc-libre/PKGBUILD
Diffstat (limited to 'extra/spamassassin')
-rw-r--r--extra/spamassassin/PKGBUILD18
-rw-r--r--extra/spamassassin/perl-5.18-fixes.patch97
-rw-r--r--extra/spamassassin/spamassassin.service2
3 files changed, 111 insertions, 6 deletions
diff --git a/extra/spamassassin/PKGBUILD b/extra/spamassassin/PKGBUILD
index daa7eeafb..2344af353 100644
--- a/extra/spamassassin/PKGBUILD
+++ b/extra/spamassassin/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 185272 2013-05-12 17:03:55Z bluewind $
+# $Id: PKGBUILD 187368 2013-06-05 15:55:32Z bluewind $
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Dale Blount <dale@archlinux.org>
# Contributor: Manolis Tzanidakis
pkgname=spamassassin
pkgver=3.3.2
-pkgrel=8
+pkgrel=9
pkgdesc="A mail filter to identify spam."
arch=('i686' 'x86_64' 'mips64el')
license=('APACHE')
@@ -12,7 +12,7 @@ url="http://spamassassin.apache.org"
depends=('openssl' 'zlib' 're2c' 'perl-net-dns' 'perl-io-socket-ssl'
'perl-libwww' 'perl-mail-spf' 'perl-http-message' 'perl-net-http'
'perl-io-socket-inet6' 'perl-mail-dkim' 'perl-crypt-ssleay')
-makedepends=('razor' 'perl-dbi')
+makedepends=('razor' 'perl-dbi')
optdepends=('razor: to identify collaborately-flagged spam')
backup=('etc/mail/spamassassin/local.cf'
'etc/mail/spamassassin/init.pre'
@@ -23,9 +23,17 @@ backup=('etc/mail/spamassassin/local.cf'
install="${pkgname}.install"
options=('!emptydirs')
source=("http://mirrors.devlib.org/apache/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz"
- 'spamassassin.service')
+ 'spamassassin.service'
+ 'perl-5.18-fixes.patch')
md5sums=('d1d62cc5c6eac57e88c4006d9633b81e'
- 'ded3e012a4d502df001f2d97c495cc4e')
+ 'b8dcea016fb73b074b941e832cfae5c9'
+ '6cf63928eeeaea25967c2ffd875d106a')
+
+prepare() {
+ cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+ patch -p0 -d lib -i "$srcdir/perl-5.18-fixes.patch"
+}
build() {
cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
diff --git a/extra/spamassassin/perl-5.18-fixes.patch b/extra/spamassassin/perl-5.18-fixes.patch
new file mode 100644
index 000000000..74277fc8b
--- /dev/null
+++ b/extra/spamassassin/perl-5.18-fixes.patch
@@ -0,0 +1,97 @@
+--- Mail/SpamAssassin/AsyncLoop.pm~ 2011-06-07 01:59:17.000000000 +0200
++++ Mail/SpamAssassin/AsyncLoop.pm 2013-05-29 01:37:58.000000000 +0200
+@@ -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},
+--- Mail/SpamAssassin/Conf/Parser.pm~ 2011-06-07 01:59:17.000000000 +0200
++++ Mail/SpamAssassin/Conf/Parser.pm 2013-05-29 01:32:06.000000000 +0200
+@@ -1249,5 +1249,5 @@
+ my $mods = '';
+ local ($1,$2);
+- if ($re =~ s/^m{//) {
++ if ($re =~ s/^m\{//) {
+ $re =~ s/}([a-z]*)$//; $mods = $1;
+ }
+--- Mail/SpamAssassin/DnsResolver.pm~ 2011-06-07 01:59:17.000000000 +0200
++++ Mail/SpamAssassin/DnsResolver.pm 2013-05-29 01:32:06.000000000 +0200
+@@ -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;
+ }
+--- Mail/SpamAssassin/Message.pm~ 2011-06-07 01:59:17.000000000 +0200
++++ Mail/SpamAssassin/Message.pm 2013-05-29 01:32:06.000000000 +0200
+@@ -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: $!";
+ }
+
+--- Mail/SpamAssassin/PerMsgStatus.pm~ 2011-06-07 01:59:17.000000000 +0200
++++ Mail/SpamAssassin/PerMsgStatus.pm 2013-05-29 01:32:06.000000000 +0200
+@@ -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';
+ },
+
+--- Mail/SpamAssassin/Util.pm~ 2013-05-29 01:29:59.000000000 +0200
++++ Mail/SpamAssassin/Util.pm 2013-05-29 01:33:16.000000000 +0200
+@@ -1588,5 +1588,5 @@
+ return undef; # invalid
+ }
+- elsif ($re =~ s/^m{//) { # m{foo/bar}
++ elsif ($re =~ s/^m\{//) { # m{foo/bar}
+ $delim = '}';
+ }
diff --git a/extra/spamassassin/spamassassin.service b/extra/spamassassin/spamassassin.service
index 2ccfa5b11..e9c9c07fd 100644
--- a/extra/spamassassin/spamassassin.service
+++ b/extra/spamassassin/spamassassin.service
@@ -5,7 +5,7 @@ After=syslog.target network.target
[Service]
Type=forking
PIDFile=/var/run/spamd.pid
-ExecStart=/usr/bin/vendor_perl/spamd -d --pidfile /var/run/spamd.pid -c
+ExecStart=/usr/bin/vendor_perl/spamd -d --pidfile /var/run/spamd.pid -c -c -x --virtual-config-dir=/var/lib/spamassassin -u nobody
StandardOutput=syslog
StandardError=syslog
Restart=always