Date: Thursday, May 25, 2017 @ 23:42:38 Author: foutrelis Revision: 230330
archrelease: copy trunk to community-staging-i686, community-staging-x86_64 Added: dspam/repos/community-staging-i686/ dspam/repos/community-staging-i686/PKGBUILD (from rev 230329, dspam/trunk/PKGBUILD) dspam/repos/community-staging-i686/dspam.install (from rev 230329, dspam/trunk/dspam.install) dspam/repos/community-staging-i686/dspam.logrotated (from rev 230329, dspam/trunk/dspam.logrotated) dspam/repos/community-staging-i686/dspam.service (from rev 230329, dspam/trunk/dspam.service) dspam/repos/community-staging-i686/dspam.tmpfiles (from rev 230329, dspam/trunk/dspam.tmpfiles) dspam/repos/community-staging-i686/dspam_maintenance.cron (from rev 230329, dspam/trunk/dspam_maintenance.cron) dspam/repos/community-staging-x86_64/ dspam/repos/community-staging-x86_64/PKGBUILD (from rev 230329, dspam/trunk/PKGBUILD) dspam/repos/community-staging-x86_64/dspam.install (from rev 230329, dspam/trunk/dspam.install) dspam/repos/community-staging-x86_64/dspam.logrotated (from rev 230329, dspam/trunk/dspam.logrotated) dspam/repos/community-staging-x86_64/dspam.service (from rev 230329, dspam/trunk/dspam.service) dspam/repos/community-staging-x86_64/dspam.tmpfiles (from rev 230329, dspam/trunk/dspam.tmpfiles) dspam/repos/community-staging-x86_64/dspam_maintenance.cron (from rev 230329, dspam/trunk/dspam_maintenance.cron) -------------------------------------------------+ community-staging-i686/PKGBUILD | 91 ++++++++++++++++++++++ community-staging-i686/dspam.install | 38 +++++++++ community-staging-i686/dspam.logrotated | 10 ++ community-staging-i686/dspam.service | 11 ++ community-staging-i686/dspam.tmpfiles | 1 community-staging-i686/dspam_maintenance.cron | 6 + community-staging-x86_64/PKGBUILD | 91 ++++++++++++++++++++++ community-staging-x86_64/dspam.install | 38 +++++++++ community-staging-x86_64/dspam.logrotated | 10 ++ community-staging-x86_64/dspam.service | 11 ++ community-staging-x86_64/dspam.tmpfiles | 1 community-staging-x86_64/dspam_maintenance.cron | 6 + 12 files changed, 314 insertions(+) Copied: dspam/repos/community-staging-i686/PKGBUILD (from rev 230329, dspam/trunk/PKGBUILD) =================================================================== --- community-staging-i686/PKGBUILD (rev 0) +++ community-staging-i686/PKGBUILD 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,91 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> +# Contributor: William Rea <sillywi...@gmail.com> + +pkgname=dspam +pkgver=3.10.2 +pkgrel=15 +pkgdesc="A scalable, open-source statistical anti-spam filter" +arch=('i686' 'x86_64') +url="http://nuclearelephant.com/" +backup=('etc/dspam/dspam.conf' + 'srv/http/dspam/cgi-bin/admins' + 'srv/http/dspam/cgi-bin/subadmins') +license=("GPL") +depends=(readline libcap ncurses zlib openssl) +makedepends=('libmariadb' 'postgresql-libs' 'db' 'sqlite' 'libldap') +optdepends=('libmariadb: MariaDB support' + 'postgresql-libs: PostgreSQL support' + 'db: BerkeleyDB support' + 'sqlite: SQLite support' + 'clamav: ClamAV support' + 'libldap: external lookup support') +options=('zipman' 'docs') +install=$pkgname.install +validpgpkeys=('C26F374F5E13157B5B427A1B93DF319D7D54EFF5') +source=(http://downloads.sourceforge.net/project/dspam/dspam/dspam-$pkgver/dspam-$pkgver.tar.gz{,.asc} + dspam.logrotated + dspam.service + dspam.tmpfiles + dspam_maintenance.cron) +sha256sums=('ae76569604021f35b741fb95198a1e611a8c64c3838661973a6cf360bba593a9' + 'SKIP' + '4177ff6d65011ff72d22389d7af4a13feaad034d3d68d9fafb7f5dc2518952de' + 'd1088a4ba9e7c4ee17915b9955a20af826a3d6ccd75d92873510e51a00394bc8' + '7b7e44e081e6accb909b9af3663f416b7dbe030c1326355737f3150021a82bf4' + '054297d274acb3622653bb1ddf0af92721d8cdd7521ba31ecca7491004879ebb') + +build() { + OPTS="--with-dspam-owner=dspam --with-dspam-group=dspam --with-dspam-home-group=dspam --with-dspam-mode=2510 \ + --enable-daemon --enable-virtual-users --enable-large-scale --enable-long-usernames --enable-external-lookup \ + --enable-split-configuration --enable-syslog --enable-clamav \ + --with-dspam-home=/var/lib/dspam --with-logdir=/var/log/dspam --with-logfile=/var/log/dspam/dspam.log \ + --with-mysql-includes=/usr/include/mysql --with-mysql-libraries=/usr/lib \ + --with-storage-driver="hash_drv,mysql_drv,libdb4_drv,pgsql_drv,sqlite3_drv" --enable-preferences-extension" + + export CFLAGS="-O2" + unset LDFLAGS + + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc/dspam --localstatedir=/var ${OPTS} + make +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + make DESTDIR="$pkgdir" install + + mkdir -p "$pkgdir"/srv/http/dspam + cp -a webui/* "$pkgdir"/srv/http/dspam/ + find "$pkgdir"/srv/http/dspam/ -type f -name 'Makefile*' -exec rm -f {} \; + find "$pkgdir"/srv/http/dspam/ -type f -name '*.in' -exec rm -f {} \; + + install -d "$pkgdir"/etc/logrotate.d \ + "$pkgdir"/usr/share/dspam/{mysql,pgsql} + install -m644 ../dspam.logrotated "$pkgdir"/etc/logrotate.d/dspam + + sed -i 's|#ServerPID|ServerPID|' "$pkgdir"/etc/dspam/dspam.conf + + sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/run/dspam/dspam.sock\":gI' \ + -e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/run/dspam/dspam.pid:gI' \ + -i "$pkgdir"/etc/dspam/dspam.conf + + sed -i 's|/var/lib/mysql/mysql.sock|/run/mysqld/mysqld.sock|' "$pkgdir"/etc/dspam/dspam.conf + + cp -r src/tools.mysql_drv/*.sql "$pkgdir"/usr/share/dspam/mysql + cp -r src/tools.pgsql_drv/*.sql "$pkgdir"/usr/share/dspam/pgsql + + # install dspam_maintenance from contrib/ + install -Dm0755 contrib/dspam_maintenance/dspam_maintenance.sh "$pkgdir"/usr/bin/dspam_maintenance + install -Dm0644 contrib/dspam_maintenance/dspam_maintenance.1 "$pkgdir"/usr/share/man/man1/dspam_maintenance.1 + install -Dm0755 "$srcdir"/dspam_maintenance.cron "$pkgdir"/etc/cron.daily/dspam_maintenance + + cd "$pkgdir"/usr/share/man/man3 + find -type l -exec ln -sf libdspam.3 {} \; + + # make logrotate happy + chmod 750 "$pkgdir"/var/log/dspam + + install -Dm0644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service + install -Dm0644 "$srcdir"/$pkgname.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf +} Copied: dspam/repos/community-staging-i686/dspam.install (from rev 230329, dspam/trunk/dspam.install) =================================================================== --- community-staging-i686/dspam.install (rev 0) +++ community-staging-i686/dspam.install 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,38 @@ +post_install() { + echo -n "adding dspam system group... " + groupadd -r dspam && echo "done." + echo -n "adding dspam system user... " + useradd -r -c "DSPAM Daemon" -d /var/lib/dspam -g dspam -s /bin/false dspam \ + && echo "done." + passwd -l dspam &>/dev/null + chown root:dspam usr/bin/dspam{,c} + chown -R root:dspam etc/dspam + chmod g+rs usr/bin/dspam{,c} + +cat << EOF +>>> To populate the DSPAM database, you need to follow several steps. +>>> First create a database. Login to the mysql command prompt. + $ mysql -u root -p + mysql> CREATE database dspam; +>>> Next, you need to create a dspam user. At the same MySQL prompt: + mysql> GRANT ALL PRIVILEGES ON dspam.* TO dspam@'localhost' IDENTIFIED BY 'passwd'; +>>> Replacing passwd with your chosen password. +>>> Create dspam database: + $ mysql -u dspam dspam -p < /usr/share/dspam/mysql/mysql_objects-4.1.sql +>>> Create virtual user table: + $ mysql -u dspam dspam -p < /usr/share/dspam/mysql/virtual_users.sql +>>> Enter the password you set in the previous step, and the database should be populated. + +>>> Remember to edit /etc/dspam/dspam.conf accordingly +>>> If you want to use the postgresql, sqlite3 or Berekely DB4 backends, +>>> read the documentation +>>> +EOF +} + +post_upgrade() { + chown root:dspam usr/bin/dspam{,c} + chown -R root:dspam etc/dspam + chown dspam:dspam var/l{og,ib}/dspam + chmod g+s usr/bin/dspamc +} Copied: dspam/repos/community-staging-i686/dspam.logrotated (from rev 230329, dspam/trunk/dspam.logrotated) =================================================================== --- community-staging-i686/dspam.logrotated (rev 0) +++ community-staging-i686/dspam.logrotated 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,10 @@ +/var/log/dspam/sql.errors +/var/lib/dspam/system.log +/var/log/dspam/dspam.debug +/var/log/dspam/dspam.messages +/var/log/dspam/dspam.log { + weekly + compress + missingok + copytruncate +} Copied: dspam/repos/community-staging-i686/dspam.service (from rev 230329, dspam/trunk/dspam.service) =================================================================== --- community-staging-i686/dspam.service (rev 0) +++ community-staging-i686/dspam.service 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,11 @@ +[Unit] +Description=A highly accurate statistical spam filter that uses minimal resources + +[Service] +Type=forking +User=dspam +ExecStart=/usr/bin/dspam --daemon 2>/dev/null +PrivateTmp=true + +[Install] +WantedBy=multi-user.target \ No newline at end of file Copied: dspam/repos/community-staging-i686/dspam.tmpfiles (from rev 230329, dspam/trunk/dspam.tmpfiles) =================================================================== --- community-staging-i686/dspam.tmpfiles (rev 0) +++ community-staging-i686/dspam.tmpfiles 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1 @@ +d /var/run/dspam 0770 dspam mail - Copied: dspam/repos/community-staging-i686/dspam_maintenance.cron (from rev 230329, dspam/trunk/dspam_maintenance.cron) =================================================================== --- community-staging-i686/dspam_maintenance.cron (rev 0) +++ community-staging-i686/dspam_maintenance.cron 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,6 @@ +#!/bin/sh + +# DSPAM maintenance tasks +# check "man 1 dspam_maintenance" for more options + +/usr/bin/dspam_maintenance --verbose --purgescriptdir=/usr/share/dspam 1> /dev/null Copied: dspam/repos/community-staging-x86_64/PKGBUILD (from rev 230329, dspam/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,91 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+a...@gmail.com> +# Contributor: William Rea <sillywi...@gmail.com> + +pkgname=dspam +pkgver=3.10.2 +pkgrel=15 +pkgdesc="A scalable, open-source statistical anti-spam filter" +arch=('i686' 'x86_64') +url="http://nuclearelephant.com/" +backup=('etc/dspam/dspam.conf' + 'srv/http/dspam/cgi-bin/admins' + 'srv/http/dspam/cgi-bin/subadmins') +license=("GPL") +depends=(readline libcap ncurses zlib openssl) +makedepends=('libmariadb' 'postgresql-libs' 'db' 'sqlite' 'libldap') +optdepends=('libmariadb: MariaDB support' + 'postgresql-libs: PostgreSQL support' + 'db: BerkeleyDB support' + 'sqlite: SQLite support' + 'clamav: ClamAV support' + 'libldap: external lookup support') +options=('zipman' 'docs') +install=$pkgname.install +validpgpkeys=('C26F374F5E13157B5B427A1B93DF319D7D54EFF5') +source=(http://downloads.sourceforge.net/project/dspam/dspam/dspam-$pkgver/dspam-$pkgver.tar.gz{,.asc} + dspam.logrotated + dspam.service + dspam.tmpfiles + dspam_maintenance.cron) +sha256sums=('ae76569604021f35b741fb95198a1e611a8c64c3838661973a6cf360bba593a9' + 'SKIP' + '4177ff6d65011ff72d22389d7af4a13feaad034d3d68d9fafb7f5dc2518952de' + 'd1088a4ba9e7c4ee17915b9955a20af826a3d6ccd75d92873510e51a00394bc8' + '7b7e44e081e6accb909b9af3663f416b7dbe030c1326355737f3150021a82bf4' + '054297d274acb3622653bb1ddf0af92721d8cdd7521ba31ecca7491004879ebb') + +build() { + OPTS="--with-dspam-owner=dspam --with-dspam-group=dspam --with-dspam-home-group=dspam --with-dspam-mode=2510 \ + --enable-daemon --enable-virtual-users --enable-large-scale --enable-long-usernames --enable-external-lookup \ + --enable-split-configuration --enable-syslog --enable-clamav \ + --with-dspam-home=/var/lib/dspam --with-logdir=/var/log/dspam --with-logfile=/var/log/dspam/dspam.log \ + --with-mysql-includes=/usr/include/mysql --with-mysql-libraries=/usr/lib \ + --with-storage-driver="hash_drv,mysql_drv,libdb4_drv,pgsql_drv,sqlite3_drv" --enable-preferences-extension" + + export CFLAGS="-O2" + unset LDFLAGS + + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc/dspam --localstatedir=/var ${OPTS} + make +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + make DESTDIR="$pkgdir" install + + mkdir -p "$pkgdir"/srv/http/dspam + cp -a webui/* "$pkgdir"/srv/http/dspam/ + find "$pkgdir"/srv/http/dspam/ -type f -name 'Makefile*' -exec rm -f {} \; + find "$pkgdir"/srv/http/dspam/ -type f -name '*.in' -exec rm -f {} \; + + install -d "$pkgdir"/etc/logrotate.d \ + "$pkgdir"/usr/share/dspam/{mysql,pgsql} + install -m644 ../dspam.logrotated "$pkgdir"/etc/logrotate.d/dspam + + sed -i 's|#ServerPID|ServerPID|' "$pkgdir"/etc/dspam/dspam.conf + + sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/run/dspam/dspam.sock\":gI' \ + -e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/run/dspam/dspam.pid:gI' \ + -i "$pkgdir"/etc/dspam/dspam.conf + + sed -i 's|/var/lib/mysql/mysql.sock|/run/mysqld/mysqld.sock|' "$pkgdir"/etc/dspam/dspam.conf + + cp -r src/tools.mysql_drv/*.sql "$pkgdir"/usr/share/dspam/mysql + cp -r src/tools.pgsql_drv/*.sql "$pkgdir"/usr/share/dspam/pgsql + + # install dspam_maintenance from contrib/ + install -Dm0755 contrib/dspam_maintenance/dspam_maintenance.sh "$pkgdir"/usr/bin/dspam_maintenance + install -Dm0644 contrib/dspam_maintenance/dspam_maintenance.1 "$pkgdir"/usr/share/man/man1/dspam_maintenance.1 + install -Dm0755 "$srcdir"/dspam_maintenance.cron "$pkgdir"/etc/cron.daily/dspam_maintenance + + cd "$pkgdir"/usr/share/man/man3 + find -type l -exec ln -sf libdspam.3 {} \; + + # make logrotate happy + chmod 750 "$pkgdir"/var/log/dspam + + install -Dm0644 "$srcdir"/$pkgname.service "$pkgdir"/usr/lib/systemd/system/$pkgname.service + install -Dm0644 "$srcdir"/$pkgname.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf +} Copied: dspam/repos/community-staging-x86_64/dspam.install (from rev 230329, dspam/trunk/dspam.install) =================================================================== --- community-staging-x86_64/dspam.install (rev 0) +++ community-staging-x86_64/dspam.install 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,38 @@ +post_install() { + echo -n "adding dspam system group... " + groupadd -r dspam && echo "done." + echo -n "adding dspam system user... " + useradd -r -c "DSPAM Daemon" -d /var/lib/dspam -g dspam -s /bin/false dspam \ + && echo "done." + passwd -l dspam &>/dev/null + chown root:dspam usr/bin/dspam{,c} + chown -R root:dspam etc/dspam + chmod g+rs usr/bin/dspam{,c} + +cat << EOF +>>> To populate the DSPAM database, you need to follow several steps. +>>> First create a database. Login to the mysql command prompt. + $ mysql -u root -p + mysql> CREATE database dspam; +>>> Next, you need to create a dspam user. At the same MySQL prompt: + mysql> GRANT ALL PRIVILEGES ON dspam.* TO dspam@'localhost' IDENTIFIED BY 'passwd'; +>>> Replacing passwd with your chosen password. +>>> Create dspam database: + $ mysql -u dspam dspam -p < /usr/share/dspam/mysql/mysql_objects-4.1.sql +>>> Create virtual user table: + $ mysql -u dspam dspam -p < /usr/share/dspam/mysql/virtual_users.sql +>>> Enter the password you set in the previous step, and the database should be populated. + +>>> Remember to edit /etc/dspam/dspam.conf accordingly +>>> If you want to use the postgresql, sqlite3 or Berekely DB4 backends, +>>> read the documentation +>>> +EOF +} + +post_upgrade() { + chown root:dspam usr/bin/dspam{,c} + chown -R root:dspam etc/dspam + chown dspam:dspam var/l{og,ib}/dspam + chmod g+s usr/bin/dspamc +} Copied: dspam/repos/community-staging-x86_64/dspam.logrotated (from rev 230329, dspam/trunk/dspam.logrotated) =================================================================== --- community-staging-x86_64/dspam.logrotated (rev 0) +++ community-staging-x86_64/dspam.logrotated 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,10 @@ +/var/log/dspam/sql.errors +/var/lib/dspam/system.log +/var/log/dspam/dspam.debug +/var/log/dspam/dspam.messages +/var/log/dspam/dspam.log { + weekly + compress + missingok + copytruncate +} Copied: dspam/repos/community-staging-x86_64/dspam.service (from rev 230329, dspam/trunk/dspam.service) =================================================================== --- community-staging-x86_64/dspam.service (rev 0) +++ community-staging-x86_64/dspam.service 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,11 @@ +[Unit] +Description=A highly accurate statistical spam filter that uses minimal resources + +[Service] +Type=forking +User=dspam +ExecStart=/usr/bin/dspam --daemon 2>/dev/null +PrivateTmp=true + +[Install] +WantedBy=multi-user.target \ No newline at end of file Copied: dspam/repos/community-staging-x86_64/dspam.tmpfiles (from rev 230329, dspam/trunk/dspam.tmpfiles) =================================================================== --- community-staging-x86_64/dspam.tmpfiles (rev 0) +++ community-staging-x86_64/dspam.tmpfiles 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1 @@ +d /var/run/dspam 0770 dspam mail - Copied: dspam/repos/community-staging-x86_64/dspam_maintenance.cron (from rev 230329, dspam/trunk/dspam_maintenance.cron) =================================================================== --- community-staging-x86_64/dspam_maintenance.cron (rev 0) +++ community-staging-x86_64/dspam_maintenance.cron 2017-05-25 23:42:38 UTC (rev 230330) @@ -0,0 +1,6 @@ +#!/bin/sh + +# DSPAM maintenance tasks +# check "man 1 dspam_maintenance" for more options + +/usr/bin/dspam_maintenance --verbose --purgescriptdir=/usr/share/dspam 1> /dev/null