diff options
author | yardenac | 2013-05-22 02:12:52 -0700 |
---|---|---|
committer | yardenac | 2013-05-22 02:12:52 -0700 |
commit | 8b560a7fa2014c55ba976be3df918ee36d10b868 (patch) | |
tree | e552dae394dda32ec8e665dc5eef7764442eca72 | |
parent | 217bc63b9279bedd24fcea98fe2839c01d2f33ed (diff) | |
download | aur-8b560a7fa2014c55ba976be3df918ee36d10b868.tar.gz |
staging new amavisd package
-rw-r--r-- | .SRCINFO | 43 | ||||
-rw-r--r-- | Changelog | 26 | ||||
-rw-r--r-- | PKGBUILD | 159 | ||||
-rw-r--r-- | amavisd | 76 | ||||
-rw-r--r-- | amavisd.conf | 2 | ||||
-rw-r--r-- | install (renamed from amavisd-new.install) | 38 | ||||
-rw-r--r-- | service | 13 | ||||
-rw-r--r-- | tmpfiles | 1 |
8 files changed, 78 insertions, 280 deletions
@@ -1,13 +1,12 @@ pkgbase = amavisd-new - pkgdesc = A high-performance interface between mailer (MTA) and content checkers. Written in Perl for maintainability. - pkgver = 2.6.4 - pkgrel = 4 + pkgdesc = High-performance interface between mailer (MTA) and content checkers + pkgver = 2.8.0 + pkgrel = 1 url = http://www.ijs.si/software/amavisd/ - install = amavisd-new.install - changelog = Changelog + install = install arch = any license = GPL - depends = perl + depends = perl>=5.8.2 depends = perl-archive-tar depends = perl-archive-zip>=1.14 depends = perl-compress-zlib>=1.35 @@ -24,34 +23,14 @@ pkgbase = amavisd-new depends = perl-unix-syslog depends = perl-mail-dkim>=0.31 depends = perl-berkeleydb>=0.42 - optdepends = gzip:Decoder for .gz files or .z files. - optdepends = bzip2:Decoder for .bz2 fiels. - optdepends = arc:Alternative decoder for .arc files. - optdepends = nomarch:Alternative decoder for .arc files. - optdepends = lha:Decoder for .lha files or .exe files. - optdepends = p7zip:Decoder for .7z files. - optdepends = arj:Alternative decoder for .arj files or .exe files. - optdepends = unarj:Alternative decoder for .arj files or .exe files. - optdepends = rar:Alternative decoder for .rar files or .exe files. - optdepends = unrar:Alternative decoder for .rar files or .exe files. - optdepends = lzop:Decoder for .lzo files. - optdepends = tnef:Decoder for .tnef files. - optdepends = pax:ALternative decoder for .tar files or .cpio files. - optdepends = cpio:Alternative decoder for .tar files or .cpio files. - optdepends = gcpio:Alternative decoder for .tar files or .cpio files. - optdepends = rpm2cpio:Decoder for .rpm files. - optdepends = cabextract:Decoder for .cab files. - optdepends = perl-dbi:Needed if using SQL lookups or SQL logging/quarantining. - optdepends = perl-ldap:Needed if using LDAP lookups. - optdepends = perl-authen-sasl:Authenticating on mail forwarding and on submitting DSN. backup = etc/amavisd/amavisd.conf backup = etc/amavisd/amavisd-custom.conf - source = http://www.ijs.si/software/amavisd/amavisd-new-2.6.4.tar.gz - source = amavisd - source = amavisd.conf - md5sums = 03d31657f14cd64c1cb38786214234b4 - md5sums = 3ec6da7f0a659d1a017bd73b0c7c3aa3 - md5sums = 756fe29fece79d135850e1cd8c6660a5 + source = http://www.ijs.si/software/amavisd/amavisd-new-2.8.0.tar.gz + source = service + source = tmpfiles + md5sums = 9851ce19f0c8fcab36f254c4e0251618 + md5sums = baafa4228ca32922fb119ad161b63e63 + md5sums = e15d38c8a48244c9d0b451243c1b7201 pkgname = amavisd-new diff --git a/Changelog b/Changelog deleted file mode 100644 index 482e437e9258..000000000000 --- a/Changelog +++ /dev/null @@ -1,26 +0,0 @@ -2010-04-07 Techlive Zheng <techlivezheng at gmail dot com> - -Version:2.6.4-4 - - * Change default location of amavisd socket. - -2010-03-14 Techlive Zheng <techlivezheng at gmail dot com> - -Version:2.6.4-4 - - * Renable dkim support. - * Update dependency list. - * Update Optional dependency list. - * Install other documents into /usr/share/doc. - * Remove perl-convert-binhex from the depends list. - * Change the default home directory to /var/lib/amavis. - * Update PKGBUILD to follow Arch Linux Packaging Standard. - * Change the location of pid and lock file to /var/run/amavisd. - * Disable the anti-virus and anti-spam support by default,in order to make the clamav and spamassassin as optional depends. - -2010-03-14 Techlive Zheng <techlivezheng at gmail dot com> - -Version:2.6.4-3 - - * Add changelog. - * Add perl-convert-binhex as dependency,due to the perl-mime-tools dependency missing. @@ -1,17 +1,12 @@ -# Maintainer: Techlive Zheng <techlivezheng [at] gmail [dot] com> -# Contributor: Piotr Beling <qwak@stud.ics.p.lodz.pl> -# Contributor: Wael Nasreddine <wael@phoenixlinux.org> -# Contributor: Guillermo A. Amaral <me@guillermoamaral.com> (thewonka) - pkgname=amavisd-new -pkgver=2.6.4 -pkgrel=4 -pkgdesc="A high-performance interface between mailer (MTA) and content checkers. Written in Perl for maintainability." +pkgver=2.8.0 +pkgrel=1 +pkgdesc="High-performance interface between mailer (MTA) and content checkers" arch=('any') url="http://www.ijs.si/software/amavisd/" license=('GPL') depends=( - 'perl' + 'perl>=5.8.2' 'perl-archive-tar' 'perl-archive-zip>=1.14' 'perl-compress-zlib>=1.35' @@ -29,119 +24,59 @@ depends=( 'perl-mail-dkim>=0.31' 'perl-berkeleydb>=0.42' ) -optdepends=( - 'gzip:Decoder for .gz files or .z files.' - 'bzip2:Decoder for .bz2 fiels.' - 'arc:Alternative decoder for .arc files.' - 'nomarch:Alternative decoder for .arc files.' - 'lha:Decoder for .lha files or .exe files.' - 'p7zip:Decoder for .7z files.' - 'arj:Alternative decoder for .arj files or .exe files.' - 'unarj:Alternative decoder for .arj files or .exe files.' - 'rar:Alternative decoder for .rar files or .exe files.' - 'unrar:Alternative decoder for .rar files or .exe files.' -# 'zoo:MISSING:Alternative decoder for .zoo files.' -# 'unzoo:MISSING:Alternative decoder for .zoo files.' -# 'freeze:MISSING:Decoder for .f files.' -# 'ripole:MISSING:A small program/library designed to pull out attachments from OLE2 data files (ie, MS Office documents).' - 'lzop:Decoder for .lzo files.' - 'tnef:Decoder for .tnef files.' - 'pax:ALternative decoder for .tar files or .cpio files.' - 'cpio:Alternative decoder for .tar files or .cpio files.' - 'gcpio:Alternative decoder for .tar files or .cpio files.' - 'rpm2cpio:Decoder for .rpm files.' - 'cabextract:Decoder for .cab files.' - 'perl-dbi:Needed if using SQL lookups or SQL logging/quarantining.' - 'perl-ldap:Needed if using LDAP lookups.' - 'perl-authen-sasl:Authenticating on mail forwarding and on submitting DSN.' -# 'savi:The Sophos Anti-Virus Interface.' -# 'perl-savi>=0.30:Perl module interface to Sophos library.' -# 'clamav:Open source antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats.' -# 'perl-mail-clamav:Perl module interface to ClamAV library.' -# 'spamassassin>=3.1: Perl-based spam filter using text analysis.' -# 'perl-mail-spamassassin:Perl-based spam filter using text analysis.' -# 'p0f:Passive OS fingerprinting tool.' -# 'bdb:Berkeley db libr. used via BerkeleyDB.' -# 'dspam:A scalable, open-source statistical anti-spam filter.' -# 'mailzu:Quarantine management web UI.' -# 'amavisd-milter:alternative sendmail milter helper program supporting the new AM.PDP protocol.' -) backup=('etc/amavisd/amavisd.conf' 'etc/amavisd/amavisd-custom.conf') -changelog=Changelog -source=("http://www.ijs.si/software/amavisd/amavisd-new-${pkgver}.tar.gz" "amavisd" "amavisd.conf") -install=${pkgname}.install - -build(){ - - cd ${srcdir}/amavisd-new-${pkgver} - - # Disable anti-virus and anti-spam support by default,must be enable manually after install clamav or spamassassin. +source=("http://www.ijs.si/software/amavisd/amavisd-new-${pkgver}.tar.gz" + "service" + "tmpfiles") +md5sums=('9851ce19f0c8fcab36f254c4e0251618' + 'baafa4228ca32922fb119ad161b63e63' + 'e15d38c8a48244c9d0b451243c1b7201') +install=install + +prepare() { sed -i \ -e "s/# @bypass_virus_checks_maps = (1)/@bypass_virus_checks_maps = (1)/g" \ -e "s/# @bypass_spam_checks_maps = (1)/@bypass_spam_checks_maps = (1)/g" \ - amavisd.conf - - # Change default amavsid daemon user. - sed -i \ -e "s/\\\$daemon_user = 'vscan'/\\\$daemon_user = 'amavis'/g" \ -e "s/\\\$daemon_group = 'vscan'/\\\$daemon_group = 'amavis'/g" \ - amavisd.conf - - # Change default amavisd home directory. - sed -i \ -e "sX# \\\$MYHOME = '/var/amavis'X\\\$MYHOME = '/var/lib/amavis'Xg" \ -e "sX\\\$QUARANTINEDIR = '/var/virusmails'X\\\$QUARANTINEDIR = '\\\$MYHOME/virus'Xg" \ - amavisd.conf - - # Change default location of amavisd pid and lock file. - sed -i \ - -e "sX# \\\$pid_file = \"\\\$MYHOME/var/amavisd.pid\"X\\\$pid_file = \"/var/run/amavisd/amavisd.pid\"Xg" \ - -e "sX# \\\$lock_file = \"\\\$MYHOME/var/amavisd.lock\"X\\\$lock_file = \"/var/run/amavisd/amavisd.lock\"Xg" \ - amavisd.conf - - # Change default location of amavisd socket. - sed -i \ - -e "sX\\\$unix_socketname = \"\\\$MYHOME/amavisd.sock\"X\\\$unix_socketname = \"/var/run/amavisd/amavisd.sock\"Xg" \ - amavisd.conf - + -e "sX# \\\$pid_file = \"\\\$MYHOME/var/amavisd.pid\"X\\\$pid_file = \"/run/amavis/amavisd.pid\"Xg" \ + -e "sX# \\\$lock_file = \"\\\$MYHOME/var/amavisd.lock\"X\\\$lock_file = \"/run/amavis/amavisd.lock\"Xg" \ + -e "sX\\\$unix_socketname = \"\\\$MYHOME/amavisd.sock\"X\\\$unix_socketname = \"/run/amavis/amavisd.sock\"Xg" \ + ${srcdir}/amavisd-new-${pkgver}/amavisd.conf } -package(){ - +package() { cd ${srcdir}/amavisd-new-${pkgver} - install -D -m755 ${srcdir}/amavisd ${pkgdir}/etc/rc.d/amavisd || return 1 - install -D -m755 ${srcdir}/amavisd.conf ${pkgdir}/etc/conf.d/amavisd.conf || return 1 - - install -D -m644 amavisd.conf ${pkgdir}/etc/amavisd/amavisd.conf || return 1 - install -D -m644 amavisd-custom.conf ${pkgdir}/etc/amavisd/amavisd-custom.conf || return 1 - install -D -m644 amavisd.conf-sample ${pkgdir}/etc/amavisd/amavisd.conf-sample || return 1 - install -D -m644 amavisd.conf-default ${pkgdir}/etc/amavisd/amavisd.conf-default || return 1 - - install -D -m755 amavisd ${pkgdir}/usr/sbin/amavisd || return 1 - install -D -m755 amavisd-agent ${pkgdir}/usr/sbin/amavisd-agent || return 1 - install -D -m755 amavisd-nanny ${pkgdir}/usr/sbin/amavisd-nanny || return 1 - install -D -m755 amavisd-release ${pkgdir}/usr/sbin/amavisd-release || return 1 - install -D -m755 amavisd-snmp-subagent ${pkgdir}/usr/sbin/amavisd-snmp-subagent || return 1 - - install -D -m755 p0f-analyzer.pl ${pkgdir}/usr/sbin/p0f-analyzer.pl || return 1 - - install -D -m755 JpegTester.pm ${pkgdir}/usr/share/perl5/vendor_perl/JpegTester.pm || return 1 - - install -D -m755 TODO ${pkgdir}/usr/share/doc/amavisd-new/TODO || return 1 - install -D -m755 LICENSE ${pkgdir}/usr/share/doc/amavisd-new/LICENSE || return 1 - install -D -m755 LDAP.ldif ${pkgdir}/usr/share/doc/amavisd-new/LDAP.ldif || return 1 - install -D -m755 LDAP.schema ${pkgdir}/usr/share/doc/amavisd-new/LDAP.schema || return 1 - install -D -m755 RELEASE_NOTES ${pkgdir}/usr/share/doc/amavisd-new/RELEASE_NOTES || return 1 - install -D -m755 AMAVIS-MIB.txt ${pkgdir}/usr/share/doc/amavisd-new/AMAVIS-MIB.txt || return 1 - install -D -m755 AAAREADME.first ${pkgdir}/usr/share/doc/amavisd-new/README.first || return 1 - install -D -m755 amavisd-new-qmqpqq.patch ${pkgdir}/usr/share/doc/amavisd-new/amavisd-new-qmqpqq.patch || return 1 - install -D -m755 amavisd-new-courier.patch ${pkgdir}/usr/share/doc/amavisd-new/amavisd-new-courier.patch || return 1 - - find "README_FILES" -type f -exec install -D -m644 {,${pkgdir}/usr/share/doc/amavisd-new/}{} \; || return 1 - find "test-messages" -type f -exec install -D -m644 {,${pkgdir}/usr/share/doc/amavisd-new/}{} \; || return 1 - + install -D -m755 ${srcdir}/service ${pkgdir}/usr/lib/systemd/system/amavisd.service + install -D -m755 ${srcdir}/tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/amavisd.conf + + install -D -m644 amavisd.conf ${pkgdir}/etc/amavisd/amavisd.conf + install -D -m644 amavisd-custom.conf ${pkgdir}/etc/amavisd/amavisd-custom.conf + install -D -m644 amavisd.conf-default ${pkgdir}/etc/amavisd/amavisd.conf-default + + install -D -m755 amavisd ${pkgdir}/usr/bin/amavisd + install -D -m755 amavisd-agent ${pkgdir}/usr/bin/amavisd-agent + install -D -m755 amavisd-nanny ${pkgdir}/usr/bin/amavisd-nanny + install -D -m755 amavisd-release ${pkgdir}/usr/bin/amavisd-release + install -D -m755 amavisd-signer ${pkgdir}/usr/bin/amavisd-signer + install -D -m755 amavisd-snmp-subagent ${pkgdir}/usr/bin/amavisd-snmp-subagent + install -D -m755 amavisd-snmp-subagent-zmq ${pkgdir}/usr/bin/amavisd-snmp-subagent-zmq + install -D -m755 p0f-analyzer.pl ${pkgdir}/usr/bin/p0f-analyzer.pl + + install -D -m755 JpegTester.pm ${pkgdir}/usr/share/perl5/vendor_perl/JpegTester.pm + + install -D -m755 TODO ${pkgdir}/usr/share/doc/amavisd-new/TODO + install -D -m755 LICENSE ${pkgdir}/usr/share/doc/amavisd-new/LICENSE + install -D -m755 LDAP.ldif ${pkgdir}/usr/share/doc/amavisd-new/LDAP.ldif + install -D -m755 LDAP.schema ${pkgdir}/usr/share/doc/amavisd-new/LDAP.schema + install -D -m755 RELEASE_NOTES ${pkgdir}/usr/share/doc/amavisd-new/RELEASE_NOTES + install -D -m755 AAAREADME.first ${pkgdir}/usr/share/doc/amavisd-new/README.first + install -D -m755 amavisd-new-qmqpqq.patch ${pkgdir}/usr/share/doc/amavisd-new/amavisd-new-qmqpqq.patch + install -D -m755 amavisd-new-courier.patch ${pkgdir}/usr/share/doc/amavisd-new/amavisd-new-courier.patch + + find "README_FILES" -type f -exec install -D -m644 {,${pkgdir}/usr/share/doc/amavisd-new/}{} \; + find "test-messages" -type f -exec install -D -m644 {,${pkgdir}/usr/share/doc/amavisd-new/}{} \; } -md5sums=('03d31657f14cd64c1cb38786214234b4' - '3ec6da7f0a659d1a017bd73b0c7c3aa3' - '756fe29fece79d135850e1cd8c6660a5') diff --git a/amavisd b/amavisd deleted file mode 100644 index 10419779af85..000000000000 --- a/amavisd +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -daemon_name=amavisd - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/$daemon_name.conf - -get_pid() { - pidof -o %PPID $daemon_name -} - -case "$1" in - - start) - stat_busy "Starting $daemon_name daemon" - - PID=$(get_pid) - if [ -z "$PID" ]; then -# [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid - $daemon_name -c ${DAEMON_CONF} - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else -# echo $(get_pid) > /var/run/$daemon_name.pid - add_daemon $daemon_name - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping $daemon_name daemon" - - PID=$(get_pid) - [ ! -z "$PID" ] && kill $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else -# rm -f /var/run/$daemon_name.pid &> /dev/null - rm_daemon $daemon_name - stat_done - fi - ;; - - reload) - stat_busy "Reloading $daemon_name daemon" - - $daemon_name -c ${DAEMON_CONF} reload - - stat_done - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - - status) - stat_busy "Checking $daemon_name status"; - ck_status $daemon_name - ;; - - *) - echo "usage: $0 {start|stop|reload|restart|status}" - ;; - -esac - -exit 0 diff --git a/amavisd.conf b/amavisd.conf deleted file mode 100644 index a35b90ca73d2..000000000000 --- a/amavisd.conf +++ /dev/null @@ -1,2 +0,0 @@ -# Amavisd daemon runtime configuration -DAEMON_CONF="/etc/amavisd/amavisd.conf" diff --git a/amavisd-new.install b/install index 898513b22d55..9e978f3bbcdd 100644 --- a/amavisd-new.install +++ b/install @@ -1,31 +1,18 @@ -post_install() -{ - - [ -z "`grep '^amavis:' /etc/group`" ] && groupadd -g 333 amavis >& /dev/null - - [ -z "`grep '^amavis:' /etc/passwd`" ] && useradd -u 333 -d /var/lib/amavis -g amavis -s /bin/false amavis >& /dev/null - - [ ! -d /var/run/amavisd ] && mkdir /var/run/amavisd - - chown -R amavis:amavis /var/run/amavisd - - chmod -R 750 /var/run/amavisd +post_install() { + getent passwd amavis >/dev/null || useradd -u 333 -d /var/lib/amavis -g amavis -s /bin/false amavis >/dev/null + getent group amavis >/dev/null || groupadd -g 333 amavis >/dev/null [ ! -d /var/lib/amavis ] && mkdir /var/lib/amavis - [ ! -d /var/lib/amavis/db ] && mkdir /var/lib/amavis/db - [ ! -d /var/lib/amavis/tmp ] && mkdir /var/lib/amavis/tmp - [ ! -d /var/lib/amavis/var ] && mkdir /var/lib/amavis/var - [ ! -d /var/lib/amavis/virus ] && mkdir /var/lib/amavis/virus - chown -R amavis:amavis /var/lib/amavis - chmod -R 750 /var/lib/amavis +} -cat <<EOF +post_upgrade() { + [ "$(vercmp $2 2.6.4-3)" -le 0 ] && cat <<EOF <<< Attention please! <<< <<< The default amavisd-new home directory has been moved to /var/lib/amavis. @@ -40,18 +27,5 @@ cat <<EOF <<< <<< Please update you /etc/amavisd/amavisd.conf accordingly. EOF - -} - -post_upgrade() -{ - post_install - } - -op=$1 - -shift - -$op $* diff --git a/service b/service new file mode 100644 index 000000000000..c98f5b117bbd --- /dev/null +++ b/service @@ -0,0 +1,13 @@ +[Unit] +Description=Amavisd Daemon +Wants=postfix.service +Wants=spamassassin.service +After=network.target + +[Service] +PIDFile=/run/amavis/amavisd.pid +ExecStart=/usr/bin/amavisd -c /etc/amavisd/amavisd.conf foreground +ExecReload=/usr/bin/amavisd -c /etc/amavisd/amavisd.conf reload + +[Install] +WantedBy=multi-user.target diff --git a/tmpfiles b/tmpfiles new file mode 100644 index 000000000000..fa2ccb3088f1 --- /dev/null +++ b/tmpfiles @@ -0,0 +1 @@ +d /run/amavis 0750 amavis amavis |