[arch-commits] Commit in spamassassin/repos (10 files)

Florian Pritz bluewind at archlinux.org
Mon Feb 16 10:52:23 UTC 2015


    Date: Monday, February 16, 2015 @ 11:52:23
  Author: bluewind
Revision: 231609

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  spamassassin/repos/testing-i686/
  spamassassin/repos/testing-i686/PKGBUILD
    (from rev 231608, spamassassin/trunk/PKGBUILD)
  spamassassin/repos/testing-i686/net-dns.patch
    (from rev 231608, spamassassin/trunk/net-dns.patch)
  spamassassin/repos/testing-i686/spamassassin.install
    (from rev 231608, spamassassin/trunk/spamassassin.install)
  spamassassin/repos/testing-i686/spamassassin.service
    (from rev 231608, spamassassin/trunk/spamassassin.service)
  spamassassin/repos/testing-x86_64/
  spamassassin/repos/testing-x86_64/PKGBUILD
    (from rev 231608, spamassassin/trunk/PKGBUILD)
  spamassassin/repos/testing-x86_64/net-dns.patch
    (from rev 231608, spamassassin/trunk/net-dns.patch)
  spamassassin/repos/testing-x86_64/spamassassin.install
    (from rev 231608, spamassassin/trunk/spamassassin.install)
  spamassassin/repos/testing-x86_64/spamassassin.service
    (from rev 231608, spamassassin/trunk/spamassassin.service)

-------------------------------------+
 testing-i686/PKGBUILD               |   66 ++++++++++++++++++++++++++++++++++
 testing-i686/net-dns.patch          |   41 +++++++++++++++++++++
 testing-i686/spamassassin.install   |   32 ++++++++++++++++
 testing-i686/spamassassin.service   |   12 ++++++
 testing-x86_64/PKGBUILD             |   66 ++++++++++++++++++++++++++++++++++
 testing-x86_64/net-dns.patch        |   41 +++++++++++++++++++++
 testing-x86_64/spamassassin.install |   32 ++++++++++++++++
 testing-x86_64/spamassassin.service |   12 ++++++
 8 files changed, 302 insertions(+)

Copied: spamassassin/repos/testing-i686/PKGBUILD (from rev 231608, spamassassin/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,66 @@
+# $Id$
+# Maintainer: Florian Pritz <bluewind at xinu.at>
+# Contributor: Dale Blount <dale at archlinux.org>
+# Contributor: Manolis Tzanidakis
+pkgname=spamassassin
+pkgver=3.4.0
+pkgrel=4
+pkgdesc="A mail filter to identify spam."
+arch=('i686' 'x86_64')
+license=('APACHE')
+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')
+optdepends=('razor: to identify collaborately-flagged spam')
+backup=('etc/mail/spamassassin/local.cf'
+        'etc/mail/spamassassin/init.pre'
+        'etc/mail/spamassassin/v310.pre'
+        'etc/mail/spamassassin/v312.pre'
+        'etc/mail/spamassassin/v320.pre'
+        'etc/mail/spamassassin/v330.pre')
+install="${pkgname}.install"
+source=("http://www.us.apache.org/dist/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz"{,.asc}
+        'spamassassin.service' net-dns.patch)
+validpgpkeys=(D8099BC79E17D7E49BC21E31FDE52F40F7D39814)
+md5sums=('5d0b50cee3bfa905cca35c33296c8c2a'
+         'SKIP'
+         '8adce028f25387ac3bc4dba697d209ed'
+         '0bcf0419608ec4ac200e794563620f31')
+
+prepare() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+  sed -i t/sa_compile.t \
+	  -e 's#/foo/bin/spamassassin#/foo/bin/site_perl/spamassassin#' \
+	  -e 's#/foo/bin/sa-compile#/foo/bin/site_perl/sa-compile#'
+
+  patch -p1 -i "$srcdir/net-dns.patch"
+}
+
+build() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+  # install module in vendor directories.
+  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor \
+      CONTACT_ADDRESS=root at localhost ENABLE_SSL=yes PERL_TAINT=no
+  make 
+}
+
+check() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+  # parallel tests cause lots of failures; disable for now
+  #export HARNESS_OPTIONS="j$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/')"
+
+  make test
+}
+
+package() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  install -D -m644 "${srcdir}/spamassassin.service" "${pkgdir}/usr/lib/systemd/system/spamassassin.service"
+  install -d -o 182 -g 182 -m 755 "$pkgdir/var/lib/spamassassin"
+}

Copied: spamassassin/repos/testing-i686/net-dns.patch (from rev 231608, spamassassin/trunk/net-dns.patch)
===================================================================
--- testing-i686/net-dns.patch	                        (rev 0)
+++ testing-i686/net-dns.patch	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,41 @@
+Fix FS#40707 by
+
+- disabling the failing version check. We don't ship versions that old anyway.
+- fix nameservers fetching from Net::DNS
+
+---
+diff -Nur a/lib/Mail/SpamAssassin/Dns.pm b/lib/Mail/SpamAssassin/Dns.pm
+--- a/lib/Mail/SpamAssassin/Dns.pm	2014-06-05 19:34:56.299391918 +0200
++++ b/lib/Mail/SpamAssassin/Dns.pm	2014-06-05 19:35:56.816256160 +0200
+@@ -518,7 +518,7 @@
+       }
+     }
+     else {
+-      if ($Net::DNS::VERSION < 0.34) {
++      if (0) {
+ 	warn("dns: Net::DNS version is $Net::DNS::VERSION, but need 0.34");
+ 	return $IS_DNS_AVAILABLE;
+       }
+diff -Nur a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin/Plugin/AskDNS.pm
+--- a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm	2014-06-05 19:34:56.302725263 +0200
++++ b/lib/Mail/SpamAssassin/Plugin/AskDNS.pm	2014-06-05 19:35:30.086168916 +0200
+@@ -211,7 +211,7 @@
+ 
+   $self->set_config($sa_main->{conf});
+ 
+-  $txtdata_can_provide_a_list = Net::DNS->VERSION >= 0.69;
++  $txtdata_can_provide_a_list = 1;
+ 
+   return $self;
+ }
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm	2014-06-08 12:48:29.064230952 +0800
++++ b/lib/Mail/SpamAssassin/DnsResolver.pm	2014-06-08 12:49:06.961872678 +0800
+@@ -205,7 +205,7 @@
+     dbg("dns: servers set by config to: %s", join(', ', at 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}});
++                        $res->nameservers);
+     dbg("dns: servers obtained from Net::DNS : %s", join(', ', at ns_addr_port));
+   }
+   return @ns_addr_port;

Copied: spamassassin/repos/testing-i686/spamassassin.install (from rev 231608, spamassassin/trunk/spamassassin.install)
===================================================================
--- testing-i686/spamassassin.install	                        (rev 0)
+++ testing-i686/spamassassin.install	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,32 @@
+setup_user() {
+	getent group spamd  &>/dev/null || groupadd -g 182 spamd  >/dev/null
+	getent passwd spamd &>/dev/null || useradd -u 182 -d /var/lib/spamassassin -g spamd -s /bin/false spamd >/dev/null
+
+	if [[ -d /var/lib/spamassassin ]]; then
+		chown spamd:spamd /var/lib/spamassassin
+	fi
+
+	true
+}
+
+post_install() {
+	echo "You must run 'sa-update' to install spam rules before use."
+	setup_user
+}
+
+post_upgrade() {
+	setup_user
+	if  [ "$(vercmp $2 3.4)" -lt 0 ]; then
+		echo '/var/lib/spamassassin is now owned by the spamd user. spamassassin.service'
+		echo 'will also run under that user. You may need to adjust your setup.'
+	fi
+
+	# Compile rules, if rules have previously been compiled, and it's possible
+	if type re2c &>/dev/null && type sa-compile &>/dev/null && [[ -d /var/lib/spamassassin/compiled ]]; then
+		echo "Detected compiled rules, running sa-compile..."
+		sa-compile > /dev/null 2>&1
+	fi
+
+	true
+}
+

Copied: spamassassin/repos/testing-i686/spamassassin.service (from rev 231608, spamassassin/trunk/spamassassin.service)
===================================================================
--- testing-i686/spamassassin.service	                        (rev 0)
+++ testing-i686/spamassassin.service	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Spamassassin daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/bin/vendor_perl/spamd -x -u spamd -g spamd
+StandardOutput=null
+StandardError=null
+Restart=always
+
+[Install]
+WantedBy=multi-user.target

Copied: spamassassin/repos/testing-x86_64/PKGBUILD (from rev 231608, spamassassin/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,66 @@
+# $Id$
+# Maintainer: Florian Pritz <bluewind at xinu.at>
+# Contributor: Dale Blount <dale at archlinux.org>
+# Contributor: Manolis Tzanidakis
+pkgname=spamassassin
+pkgver=3.4.0
+pkgrel=4
+pkgdesc="A mail filter to identify spam."
+arch=('i686' 'x86_64')
+license=('APACHE')
+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')
+optdepends=('razor: to identify collaborately-flagged spam')
+backup=('etc/mail/spamassassin/local.cf'
+        'etc/mail/spamassassin/init.pre'
+        'etc/mail/spamassassin/v310.pre'
+        'etc/mail/spamassassin/v312.pre'
+        'etc/mail/spamassassin/v320.pre'
+        'etc/mail/spamassassin/v330.pre')
+install="${pkgname}.install"
+source=("http://www.us.apache.org/dist/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz"{,.asc}
+        'spamassassin.service' net-dns.patch)
+validpgpkeys=(D8099BC79E17D7E49BC21E31FDE52F40F7D39814)
+md5sums=('5d0b50cee3bfa905cca35c33296c8c2a'
+         'SKIP'
+         '8adce028f25387ac3bc4dba697d209ed'
+         '0bcf0419608ec4ac200e794563620f31')
+
+prepare() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+  sed -i t/sa_compile.t \
+	  -e 's#/foo/bin/spamassassin#/foo/bin/site_perl/spamassassin#' \
+	  -e 's#/foo/bin/sa-compile#/foo/bin/site_perl/sa-compile#'
+
+  patch -p1 -i "$srcdir/net-dns.patch"
+}
+
+build() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+  # install module in vendor directories.
+  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor \
+      CONTACT_ADDRESS=root at localhost ENABLE_SSL=yes PERL_TAINT=no
+  make 
+}
+
+check() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+
+  # parallel tests cause lots of failures; disable for now
+  #export HARNESS_OPTIONS="j$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/')"
+
+  make test
+}
+
+package() {
+  cd "${srcdir}/Mail-SpamAssassin-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+
+  install -D -m644 "${srcdir}/spamassassin.service" "${pkgdir}/usr/lib/systemd/system/spamassassin.service"
+  install -d -o 182 -g 182 -m 755 "$pkgdir/var/lib/spamassassin"
+}

Copied: spamassassin/repos/testing-x86_64/net-dns.patch (from rev 231608, spamassassin/trunk/net-dns.patch)
===================================================================
--- testing-x86_64/net-dns.patch	                        (rev 0)
+++ testing-x86_64/net-dns.patch	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,41 @@
+Fix FS#40707 by
+
+- disabling the failing version check. We don't ship versions that old anyway.
+- fix nameservers fetching from Net::DNS
+
+---
+diff -Nur a/lib/Mail/SpamAssassin/Dns.pm b/lib/Mail/SpamAssassin/Dns.pm
+--- a/lib/Mail/SpamAssassin/Dns.pm	2014-06-05 19:34:56.299391918 +0200
++++ b/lib/Mail/SpamAssassin/Dns.pm	2014-06-05 19:35:56.816256160 +0200
+@@ -518,7 +518,7 @@
+       }
+     }
+     else {
+-      if ($Net::DNS::VERSION < 0.34) {
++      if (0) {
+ 	warn("dns: Net::DNS version is $Net::DNS::VERSION, but need 0.34");
+ 	return $IS_DNS_AVAILABLE;
+       }
+diff -Nur a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin/Plugin/AskDNS.pm
+--- a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm	2014-06-05 19:34:56.302725263 +0200
++++ b/lib/Mail/SpamAssassin/Plugin/AskDNS.pm	2014-06-05 19:35:30.086168916 +0200
+@@ -211,7 +211,7 @@
+ 
+   $self->set_config($sa_main->{conf});
+ 
+-  $txtdata_can_provide_a_list = Net::DNS->VERSION >= 0.69;
++  $txtdata_can_provide_a_list = 1;
+ 
+   return $self;
+ }
+--- a/lib/Mail/SpamAssassin/DnsResolver.pm	2014-06-08 12:48:29.064230952 +0800
++++ b/lib/Mail/SpamAssassin/DnsResolver.pm	2014-06-08 12:49:06.961872678 +0800
+@@ -205,7 +205,7 @@
+     dbg("dns: servers set by config to: %s", join(', ', at 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}});
++                        $res->nameservers);
+     dbg("dns: servers obtained from Net::DNS : %s", join(', ', at ns_addr_port));
+   }
+   return @ns_addr_port;

Copied: spamassassin/repos/testing-x86_64/spamassassin.install (from rev 231608, spamassassin/trunk/spamassassin.install)
===================================================================
--- testing-x86_64/spamassassin.install	                        (rev 0)
+++ testing-x86_64/spamassassin.install	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,32 @@
+setup_user() {
+	getent group spamd  &>/dev/null || groupadd -g 182 spamd  >/dev/null
+	getent passwd spamd &>/dev/null || useradd -u 182 -d /var/lib/spamassassin -g spamd -s /bin/false spamd >/dev/null
+
+	if [[ -d /var/lib/spamassassin ]]; then
+		chown spamd:spamd /var/lib/spamassassin
+	fi
+
+	true
+}
+
+post_install() {
+	echo "You must run 'sa-update' to install spam rules before use."
+	setup_user
+}
+
+post_upgrade() {
+	setup_user
+	if  [ "$(vercmp $2 3.4)" -lt 0 ]; then
+		echo '/var/lib/spamassassin is now owned by the spamd user. spamassassin.service'
+		echo 'will also run under that user. You may need to adjust your setup.'
+	fi
+
+	# Compile rules, if rules have previously been compiled, and it's possible
+	if type re2c &>/dev/null && type sa-compile &>/dev/null && [[ -d /var/lib/spamassassin/compiled ]]; then
+		echo "Detected compiled rules, running sa-compile..."
+		sa-compile > /dev/null 2>&1
+	fi
+
+	true
+}
+

Copied: spamassassin/repos/testing-x86_64/spamassassin.service (from rev 231608, spamassassin/trunk/spamassassin.service)
===================================================================
--- testing-x86_64/spamassassin.service	                        (rev 0)
+++ testing-x86_64/spamassassin.service	2015-02-16 10:52:23 UTC (rev 231609)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Spamassassin daemon
+After=syslog.target network.target
+
+[Service]
+ExecStart=/usr/bin/vendor_perl/spamd -x -u spamd -g spamd
+StandardOutput=null
+StandardError=null
+Restart=always
+
+[Install]
+WantedBy=multi-user.target



More information about the arch-commits mailing list