version bump - bug #299090. Ebuild thanks to Tom Hendrikx
authorEray Aslan <eras@gentoo.org>
Fri, 5 Aug 2011 06:42:42 +0000 (06:42 +0000)
committerEray Aslan <eras@gentoo.org>
Fri, 5 Aug 2011 06:42:42 +0000 (06:42 +0000)
Package-Manager: portage-2.1.10.9/cvs/Linux x86_64

mail-filter/dspam/ChangeLog
mail-filter/dspam/Manifest
mail-filter/dspam/dspam-3.10.0.ebuild [new file with mode: 0644]
mail-filter/dspam/files/dspam.confd [new file with mode: 0644]
mail-filter/dspam/files/dspam.cron [new file with mode: 0644]

index 233677bf3b7f45ff4f09c50f634de38e79eae318..16a3dd04e35cc6eb39069e1a3445c70b893d0e60 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for mail-filter/dspam
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.131 2010/06/17 21:44:20 patrick Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.132 2011/08/05 06:42:42 eras Exp $
+
+*dspam-3.10.0 (05 Aug 2011)
+
+  05 Aug 2011; Eray Aslan <eras@gentoo.org> +dspam-3.10.0.ebuild,
+  +files/dspam.confd, +files/dspam.cron, +files/dspam.initd,
+  +files/dspam.logrotate, metadata.xml:
+  version bump - bug #299090. Ebuild thanks to Tom Hendrikx
 
   17 Jun 2010; Patrick Lauer <patrick@gentoo.org> dspam-3.8.0-r15.ebuild:
   Really migrating away from deprecated postgres virtuals
index d32f2f02e0bf16c1028005d7973b651330335ece..20145c5a963ab8034d3fa80a2fc32cda72b91b9b 100644 (file)
@@ -1,13 +1,39 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
 AUX README.postfix 309 RMD160 34f35ffa4e393ba1791cef2800bc8b4d4f49df5b SHA1 c004a3e7d54dfdd6fae8a654e44d0b9240935739 SHA256 e0928cf2d734e79419c30a4ee829962351ef5a1247ed1d1ddf3b58410e14828b
 AUX README.qmail 2317 RMD160 ebdd90be77441540848caf39b6fcde3d332b2b93 SHA1 081b28b6c261644fe3f799e3bbb5aedf59b00b8f SHA256 c70a32eb183401f3d36b8e13c1e298875692b8a9d3f34151ae42b172dd6f064a
+AUX dspam.confd 299 RMD160 f53e474d51912b00ccf4876a20071814d2066364 SHA1 cde7c587dcf94174568d538cd55188bf5916de16 SHA256 fdc691c71a2518c13f61aa44159f1318b03ba4f9ca004a3f38c3c95ba6f02e63
 AUX dspam.cron-r3 9269 RMD160 8063c0d0b5a7150a4aa9ba98e62795adca154e20 SHA1 6c1657aefc2a2e391a20c19ffc82475f88d39515 SHA256 e6a1a4194818a6ede5065979227b6b092ef2bea26cad6767f41de1a1952c840d
+AUX dspam.cron-r4 160 RMD160 cd633a4a72ecae12ad70faf8d0ae486bba1fbe6e SHA1 0b620d69451b52968389c6e83d5a904d38299cc1 SHA256 ef59ea37a272b3d044a59fc1f30d1c60087e15d5735ba961cc57458cc5026aca
+AUX dspam.initd 957 RMD160 6f9f14b0eebadd8cfaea43cb6e68f6a3f93dd9ed SHA1 497f274d7377d4f44082efa347bffa18ca007a51 SHA256 b5a7d772a7e261959c421b36204322bbd3a2eb6fe03d555c7c8e13fb7b541c63
+AUX dspam.logrotate 180 RMD160 56ba31d0bf4558dd0b3b6bda247050bd2cbcc18e SHA1 94a988258efad37d51604769b0336c27e1aa3b31 SHA256 17285ab0e624ec52124e8f661649ac9549c00e91a2f8d0d6d9de4eabf273d582
 AUX dspam.rc 1025 RMD160 d223977cf390b1e89392462f06b31b0722810fa3 SHA1 6b243ffac8179120ed7ee6f4b24bf01ad3a511f0 SHA256 9726e4b7699ccbb305d5e161baec2010e115731e582f69c3c670ec36bb099d34
 AUX logrotate.dspam 155 RMD160 17e0f5401843ccac1d349b938b1e9b755f847108 SHA1 7462edc16642aa3b43263f8a7ce093de7f4a2ade SHA256 dd5bce638b92936e02ff02faf781cbf903faac7b73c61c1c666eb06cfb56bfac
 AUX pgsql_createdb.py 4520 RMD160 bcabe6298a0e97c4b3c10c48f98c5d09eb4a063b SHA1 0fe09f67a4f431dd9bf57a3e6c9ef6662f837403 SHA256 dc107ae72a3832b6ebce1066c5e84a0b164bcc01be74bb7dc1ee28c9135e9768
 AUX pgsql_purge.py 1236 RMD160 0fcc6154527932ded25397b093d40d113bb44335 SHA1 198add2080c5d229c77c518ff49b372a6f6f2b93 SHA256 3e996ed8ed5fdbdf3a65504ead870c742be7c0d05f4760e3d7d798205b6cdc1b
+DIST dspam-3.10.0.tar.gz 1027188 RMD160 87c0ea034557a1fce47a5b9e2c8ae0154b5dbb81 SHA1 68eb4e961898275a74a627a364ff0e7fe292ac76 SHA256 9195f584bbfdf8d55efe6b383aac551c1ebbd2024305502f1fd7491da5f7e29b
 DIST dspam-3.8.0-patches-20091202.tar.gz 16009 RMD160 7dfff3091f4c8ccdd8feda0af8292c5b755e76e2 SHA1 e836d49679e07659775756cd504142d8d194a9b8 SHA256 c72f7e624ceafcf43f0402430eaeaaa47c7a1507192e696dadbc7f0957ca5d5b
 DIST dspam-3.8.0.tar.gz 726160 RMD160 e7831e2415e30e819dd9cbc0ba3f269e113e2fb9 SHA1 d1de7ee2134522adaf52f49167accecf1589fa96 SHA256 84a227934a7aee73516bdb82c33ee7b359e955c8cd95a1544a9a13069f79bfc7
 DIST dspam_sa_trainer.tar.gz 1230 RMD160 c3d0fca7169d23ecf9d44c850ee255b42d97d818 SHA1 71a002f26a888bdfe47759cf1f780cd6478dacac SHA256 8fb6b1ebe592acf00a028737ef8e174544af166768b987d29048b2319bc5a215
+EBUILD dspam-3.10.0.ebuild 6141 RMD160 c3a415a28fcad0bcd842e53cb908ee656b0fac47 SHA1 3c2f3eb0762abd91ddaf72c9b2fafc6a47a1df69 SHA256 82bf4c253e43c936ec40d8f1d723fb020ec95500c849ce7372167145c1f19074
 EBUILD dspam-3.8.0-r15.ebuild 19692 RMD160 dbfc9ae12e751cc0ade8608f3073c284fd6f7fe4 SHA1 3beff2e7820d8a3a7e35d2ca871e042d8fc0c100 SHA256 6002f6e9db1e6e2de4296596297e7ea91d59b7090652d428df53301737fcd4a7
-MISC ChangeLog 22732 RMD160 6160226f344ec927de479a14e23aa62f64f366c8 SHA1 c7921aa99edb143259e547c46e52cf98f43a11a3 SHA256 cdadc29e3f01ec210b7d81ec0840ce88734c4ad1196f8bce34278084f5e54d55
-MISC metadata.xml 1036 RMD160 3b2e93686e16df39df1459789554f7b13c1bc9a0 SHA1 ecc04cc4c541aae8ed056601089c026185168fd5 SHA256 e3d1fb4f2c60cf80228bea9c5289f6fcda0d25d4b18d662af3ec32c83aba3223
+MISC ChangeLog 22986 RMD160 74ba4e990b1110cfb438500194bc9b68ea611052 SHA1 b3b9d45d640220fac70c043110fcce07dd2bc5fb SHA256 63d71d9c350fef1808a5a5f1ccd1a3602d5eafa424b071ab3d4d904e77d2c649
+MISC metadata.xml 1256 RMD160 d7eeed5d88048c350019ab6255fd32ec431ad199 SHA1 c9b3d4f0f8a5bec011427b83be5343b62f0a0878 SHA256 6d9d76c05e7a36602dc149746308a143439b9bf7ebee7609dbc898571498d978
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iQIcBAEBCAAGBQJOO5HiAAoJEHfx8XVYajsflooP/0kQSnR1t0LfVpeHPQ/SOIrI
+ZQgPvLAUJ/8s5wsCCmbqI9+3pXHXqcSIWvpLZGhW7T+Y1zY7sla15o3A8mKIxYtx
+rXuZjkBtwslu2o+OgwuvuNxZ4ZD2UaqdREgxvisY+8ExNhPlDsKe/KcIebL2hNSm
+lNTnQCP3gt+teUSYT7KHAw1gssnYpuVj4FyP1NZb6QD3vu8Lk6pLLSughe0WR9/T
+f6CLuYkJ0AfdNIxNhNRVLPV5TGoZqreqa7/GrDkPtWcRJtKuCmD/l1TwfDw3caGJ
+/V0VjlpEa53L5ZzIF1pEoxi8YIhYVJMB+NnPBvoTWW6RbctSWJEqvhQSotpQtB09
+cF0cIbIoMpnZphdNW2l85pUAct6t4GmgMzjtuKIEVjDglbBj7zIlvi+5Gn2rHbpe
+vVY77LM4fiLKLXT9I3wF+Seos8EUyHFgifJ/45OCpWZ5YVG82tbcRdyT3gzl6UeH
++VNNANxWq+ypqfVPvy26BL3R8E17D3TGxpuMhjmAkAVMZ/e7oeKWteH8YaySLcaq
+apZCmsXi67LOXDGBd6aT/3IrLjTbZ9G/FpKP6xzi94CIZtrXpUYPtoT1VS8J4K/z
+I+UwNeHAUD4qAMzMTDxbpYukqNQJlGUxLHU7+vLwM6LFCGvss1pyn3V6oLYKQIzQ
+MXGVhtm02kYF46K5mvRF
+=te5+
+-----END PGP SIGNATURE-----
diff --git a/mail-filter/dspam/dspam-3.10.0.ebuild b/mail-filter/dspam/dspam-3.10.0.ebuild
new file mode 100644 (file)
index 0000000..86ec13a
--- /dev/null
@@ -0,0 +1,224 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.10.0.ebuild,v 1.1 2011/08/05 06:42:42 eras Exp $
+
+EAPI=4
+
+inherit eutils
+
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter"
+HOMEPAGE="http://dspam.sourceforge.net/"
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+DRIVERS_IUSE="hash mysql postgres sqlite"
+SCALES_IUSE="domain-scale large-scale"
+IUSE="clamav daemon debug ldap static-libs syslog virtual-users user-homedirs ${DRIVERS_IUSE} ${SCALES_IUSE}"
+
+DEPEND="
+       ldap? ( net-nds/openldap )
+       mysql? ( >=virtual/mysql-5.0 )
+       postgres? ( dev-db/postgresql-base )
+       sqlite? ( dev-db/sqlite:3 )
+"
+
+RDEPEND="
+       ${DEPEND}
+       clamav? ( app-antivirus/clamav )
+       syslog? ( virtual/logger )
+"
+
+# Demands on sane USE flags:
+# - find out what driver to use: select at least one
+# - if static-libs is set, only one driver may be selected
+# - find out what scale to use: choose at most one (default to domain-scale if
+# both not selected)
+# - user-homedirs does not work with virtual-users
+# - virtual-users does not work with hash or sqlite
+REQUIRED_USE="
+       || ( ${DRIVERS_IUSE} )
+       static-libs? ( ^^ ( ${DRIVERS_IUSE} ) )
+       domain-scale? ( !large-scale )
+       large-scale? ( !domain-scale )
+       virtual-users? ( !user-homedirs )
+       hash? ( !virtual-users )
+       sqlite? ( !virtual-users )
+"
+
+# dspam setup defaults
+DSPAM_HOME=/var/spool/dspam
+DSPAM_CONF=/etc/dspam
+DSPAM_LOG=/var/log/dspam
+DSPAM_MODE=2510
+DSPAM_DRIVERS=
+DSPAM_DRIVERS_EXTRAS=
+
+pkg_setup() {
+       # setup storage, this sets DSPAM_DRIVERS
+       dspam_setup_storage_drivers
+
+       # create dspam user and group
+       dspam_setup_user
+}
+
+src_configure() {
+       local myconf=""
+       if ! use large-scale && ! use domain-scale ; then
+               # default to domain-scale
+               myconf="--disable-large-scale --enable-domain-scale"
+       fi
+
+       econf \
+       --sysconfdir=${DSPAM_CONF} \
+       --with-dspam-home=${DSPAM_HOME} \
+       --with-dspam-home-group=dspam \
+       --with-dspam-mode=${DSPAM_MODE} \
+       --with-dspam-group=dspam \
+       --with-logdir=${DSPAM_LOG} \
+       --enable-external-lookup \
+       --enable-long-usernames \
+       --enable-split-configuration \
+       $(use_enable clamav) \
+       $(use_enable daemon) \
+       $(use_enable debug) \
+       $(use_enable debug bnr-debug) \
+       $(use_enable debug verbose-debug) \
+       $(use_enable domain-scale) \
+       $(use_enable large-scale) \
+       $(use_enable static-libs static) \
+       $(use_enable syslog) \
+       $(use_enable user-homedirs homedir) \
+       $(use_enable virtual-users) \
+       --with-storage-driver=${DSPAM_DRIVERS} ${DSPAM_DRIVERS_EXTRAS} \
+       $(use mysql || use postgres && echo "--enable-preferences-extension") \
+       $(use syslog || echo "--with-logfile=${DSPAM_LOG}/dspam.log") \
+       ${myconf}
+}
+
+dspam_setup_user() {
+       # DSPAM CGI web gui (www-apps/dspam-web) needs to run as a regular user
+       # under suexec in apache, so DSPAM user/group need to be regular users too
+
+       local euid egid
+       for euid in {1000..5000} ; do
+               [ -z "$(egetent passwd ${euid})" ] && break
+       done
+       for egid in {1000..5000} ; do
+               [ -z "$(egetent group ${egid})" ] && break
+       done
+       enewgroup dspam ${egid}
+       enewuser dspam ${euid} -1 "${DSPAM_HOMEDIR}" dspam,mail
+}
+
+dspam_setup_storage_drivers() {
+       # Find out which storage drivers need to be enabled, and set some
+       # variables so that src_configure can pick them up
+
+       if use hash; then
+               DSPAM_DRIVERS+=",hash_drv"
+       fi
+
+       if use mysql; then
+               DSPAM_DRIVERS+=",mysql_drv"
+               DSPAM_DRIVERS_EXTRAS+="--with-mysql-includes=/usr/include/mysql "
+       fi
+
+       if use postgres; then
+               DSPAM_DRIVERS+=",pgsql_drv"
+       fi
+
+       if use sqlite; then
+               DSPAM_DRIVERS+=",sqlite3_drv"
+       fi
+
+       if ! use static-libs; then
+               # set the driver name twice to avoid a static build
+               DSPAM_DRIVERS+=${DSPAM_DRIVERS}
+       fi
+
+       # remove first comma separator
+       DSPAM_DRIVERS=${DSPAM_DRIVERS:1}
+       einfo "Building with drivers: ${DSPAM_DRIVERS}"
+       #echo DSPAM_DRIVERS_EXTRAS=$DSPAM_DRIVERS_EXTRAS
+}
+
+src_install() {
+       default
+
+       if use daemon; then
+               newinitd "${FILESDIR}/dspam.initd" dspam
+               newconfd "${FILESDIR}/dspam.confd" dspam
+       fi
+
+       if use mysql; then
+               insinto "/usr/share/${PN}/mysql"
+
+               local files="mysql_objects-4.1.sql mysql_objects-space.sql mysql_objects-speed.sql purge-4.1.sql purge.sql"
+               if use virtual-users; then
+                       files+=" virtual_user_aliases.sql virtual_users.sql"
+               fi
+
+               for file in $files; do
+                       doins src/tools.mysql_drv/${file}
+               done
+       fi
+
+       if use postgres; then
+               insinto "/usr/share/${PN}/pgsql"
+
+               local files="pgsql_objects.sql purge-pe.sql purge.sql"
+               if use virtual-users; then
+                       files+=" virtual_users.sql"
+               fi
+
+               for file in $files; do
+                       doins src/tools.pgsql_drv/${file}
+               done
+       fi
+
+       if use sqlite; then
+               insinto "/usr/share/${PN}/sqlite"
+               newins src/tools.sqlite_drv/purge-3.sql purge.sql
+       fi
+
+       insinto "${DSPAM_HOME}/txt"
+       doins txt/*.txt
+       for i in spam nonspam; do
+               echo "Scanned and tagged with DSPAM ${PV} on Gentoo Linux as ${i} by ISP" > "${T}/msgtag.${i}"
+               doins "${T}/msgtag.${i}"
+       done
+
+       exeinto /usr/bin
+       newexe contrib/dspam_maintenance/dspam_maintenance.sh dspam_maintenance
+       exeinto /etc/cron.daily
+       newexe "${FILESDIR}/dspam.cron" dspam
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/dspam.logrotate" dspam
+
+       dodoc CHANGELOG README* RELEASE.NOTES UPGRADING doc/*.txt
+}
+
+pkg_preinst() {
+       # dspam-3.10.0: config dir change, should be removed at some later point
+       ewarn "The configuration directory of DSPAM has been relocated from /etc/mail/dspam to ${DSPAM_CONF}."
+       if [ -d "${ROOT}/etc/mail/dspam" ]; then
+               if [ -h "${ROOT}${DSPAM_CONF}" ]; then
+                       # symlink, this is the setup in older ebuilds
+                       ewarn "Moving contents of /etc/mail/dspam to ${DSPAM_CONF} ..."
+                       rm "${ROOT}${DSPAM_CONF}" && mv "${ROOT}/etc/mail/dspam" "${DSPAM_CONF}"
+                       eend $?
+
+               elif [ -d "${ROOT}${DSPAM_CONF}" ]; then
+                       # directory and no symlink, do it manually since we cannot decide.
+                       ewarn "You have both /etc/mail/dspam and ${DSPAM_CONF} directories, please delete the former."
+
+               else
+                       # nothing interesting in /etc/dspam
+                       ewarn "Moving contents of /etc/mail/dspam to ${DSPAM_CONF} ..."
+                       mv "${ROOT}/etc/mail/dspam" "${DSPAM_CONF}"
+                       eend $?
+               fi
+       fi
+}
diff --git a/mail-filter/dspam/files/dspam.confd b/mail-filter/dspam/files/dspam.confd
new file mode 100644 (file)
index 0000000..75e0d4b
--- /dev/null
@@ -0,0 +1,7 @@
+# Change this to the user:group you want to run the dspam daemon as.
+# If you need dspam to switch uids, this is root:root.
+# If you use virtual users and deliver via LMTP, this can be nonprivileged such as dspam:dspam. 
+DAEMON_USER_GROUP="root:root"
+
+# Pid file
+PID_FILE="/var/run/dspam/dspam.pid"
diff --git a/mail-filter/dspam/files/dspam.cron b/mail-filter/dspam/files/dspam.cron
new file mode 100644 (file)
index 0000000..edf97dc
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# See dspam_maintenance --help for a list additional parameters
+
+/usr/bin/dspam_maintenance --verbose --purgescriptdir=/usr/share/dspam 1> /dev/null