diff options
author | Eray Aslan <eras@gentoo.org> | 2011-08-06 10:16:52 +0000 |
---|---|---|
committer | Eray Aslan <eras@gentoo.org> | 2011-08-06 10:16:52 +0000 |
commit | 8b39b86dc719c8e3db30dd4bbaa9fcf5895977b7 (patch) | |
tree | d5e4d4440d9c5a3fbdde26741d7c58ba012d8c65 /mail-filter | |
parent | Update the gcc-4.6 patch. (diff) | |
download | historical-8b39b86dc719c8e3db30dd4bbaa9fcf5895977b7.tar.gz historical-8b39b86dc719c8e3db30dd4bbaa9fcf5895977b7.tar.bz2 historical-8b39b86dc719c8e3db30dd4bbaa9fcf5895977b7.zip |
Add support for small-scale filesystem scale
Package-Manager: portage-2.1.10.10/cvs/Linux x86_64
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/dspam/ChangeLog | 8 | ||||
-rw-r--r-- | mail-filter/dspam/Manifest | 27 | ||||
-rw-r--r-- | mail-filter/dspam/dspam-3.10.0-r1.ebuild | 222 | ||||
-rw-r--r-- | mail-filter/dspam/metadata.xml | 7 |
4 files changed, 251 insertions, 13 deletions
diff --git a/mail-filter/dspam/ChangeLog b/mail-filter/dspam/ChangeLog index fde1bec0fe58..3e2794094a07 100644 --- a/mail-filter/dspam/ChangeLog +++ b/mail-filter/dspam/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-filter/dspam # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.133 2011/08/06 03:45:01 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.134 2011/08/06 10:16:52 eras Exp $ + +*dspam-3.10.0-r1 (06 Aug 2011) + + 06 Aug 2011; Eray Aslan <eras@gentoo.org> +dspam-3.10.0-r1.ebuild, + metadata.xml: + Add support for small-scale filesystem scale 06 Aug 2011; Tim Harder <radhermit@gentoo.org> dspam-3.10.0.ebuild: Enable hash storage driver by default. diff --git a/mail-filter/dspam/Manifest b/mail-filter/dspam/Manifest index e5f4c579f79e..8d7d2a7e5d05 100644 --- a/mail-filter/dspam/Manifest +++ b/mail-filter/dspam/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 +Hash: SHA256 AUX README.postfix 309 RMD160 34f35ffa4e393ba1791cef2800bc8b4d4f49df5b SHA1 c004a3e7d54dfdd6fae8a654e44d0b9240935739 SHA256 e0928cf2d734e79419c30a4ee829962351ef5a1247ed1d1ddf3b58410e14828b AUX README.qmail 2317 RMD160 ebdd90be77441540848caf39b6fcde3d332b2b93 SHA1 081b28b6c261644fe3f799e3bbb5aedf59b00b8f SHA256 c70a32eb183401f3d36b8e13c1e298875692b8a9d3f34151ae42b172dd6f064a @@ -16,18 +16,25 @@ DIST dspam-3.10.0.tar.gz 1027188 RMD160 87c0ea034557a1fce47a5b9e2c8ae0154b5dbb81 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-r1.ebuild 6077 RMD160 ec446e07f1a1fa8bd384b70fc81d26d21f13bcf6 SHA1 1a7b111da5f1136cbbd7056d596cea7a07e86df6 SHA256 24e388e5c2529590a0acf1f611f630e0269bd0a7ccb17041472e440b30ee850d EBUILD dspam-3.10.0.ebuild 6153 RMD160 6bf5922ab9822aad7acab4c927e6b71cdae57e04 SHA1 a181b49c423a901d93ef89d605fbb6bd3d3ede63 SHA256 35c85a297f2740e07ba6a4a91d5ad4b4b5bd39afaf4d580d5f33a32752813bf2 EBUILD dspam-3.8.0-r15.ebuild 19692 RMD160 dbfc9ae12e751cc0ade8608f3073c284fd6f7fe4 SHA1 3beff2e7820d8a3a7e35d2ca871e042d8fc0c100 SHA256 6002f6e9db1e6e2de4296596297e7ea91d59b7090652d428df53301737fcd4a7 -MISC ChangeLog 23103 RMD160 b4e09e06790a8d8d8c6565befa4537b98ec0d357 SHA1 8634dc79f830e2ee144c5e4d2592263af789f544 SHA256 d3612e1ced7ac6a8acba38185d07dfcd29a0805e88ac4822c68807b35ea3283e -MISC metadata.xml 1256 RMD160 d7eeed5d88048c350019ab6255fd32ec431ad199 SHA1 c9b3d4f0f8a5bec011427b83be5343b62f0a0878 SHA256 6d9d76c05e7a36602dc149746308a143439b9bf7ebee7609dbc898571498d978 +MISC ChangeLog 23263 RMD160 9defb6ae40bb1c80b23ff7dfdffd0b0763a70bd0 SHA1 bd49de4f612e2589fe3f9d7887d10b9bc57440c5 SHA256 5d5abaac4381b1b456386c4673db21e2e3d0a650490f02d57acd569d62430a98 +MISC metadata.xml 1429 RMD160 40b71e8574ed33364dd81fae8f6f510c9dadbe5f SHA1 727dcfbe77e781fb4ad6b45837d70acace16e4bb SHA256 797884e76db42660b78b292db1436cf3154c74cd71a891ea482f9a68264d1560 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iQEcBAEBCgAGBQJOPLjHAAoJEEqz6FtPBkyjb24H/jUj2IXR1vmQHEvQXFiHQ6wd -D2q4ZUEGMwXAZTo1UMJzL4+Vuyd1l11HhgWNI38m+E5Nfpbfl7OEdHkTC0+Whfnm -fJpA+ItAD2XFr+ebNe/uhXhqFtr2E8OOmKNdC/47yjphQ6Ul16XvRY27EchyLWe+ -3fVxdUhxn32OCcUz9eDXLeEglNseuu7+48aLijv5AK+Ie1+Nj5hkMDrBT4ohdmm2 -v4BX4PCLGUupOC2Kk3r2oP2AeF/f6v3PZ/4BjJsusOQV/AKk6rFwgC1oX0RAxX4R -osP+UXugvq9b4zOtO+uA9D9LSseqwTwD+Ws4MOx/cpkU9OjqxG7Ua5DTjPC4yf4= -=z845 +iQIcBAEBCAAGBQJOPRSkAAoJEHfx8XVYajsfEtIQAKPX6zk0dOBQ2JsrQCM2FOpY +MtzCxPpvD1SE+JsfSUbSIbmhQtZ1S3x8pAoz4A/F1GJGmM0sgDg1izRBeIxaI8Hc +QdgpPqq8ccuss6iwqrNJXjtTy5L+t8kBuTkD43Q1ZyCl4/aKRaykwVMiVHqzqQWz +5vpR0d97Rs4QImAd0Om/XuN2+FlLIp38Zs3gtYYD7FfiWObtYCcJjX1k6FGMdjD1 +UEfdMjNugPLXM66kEtS4wvOt8ePmYT/lJ97jY6w32MYvyORvMOBlJzcIiiV7YQTW +PRDP63ObkQ9zAunxYKi3m72ONl9i+P77qiU64RuFLdc3qEgtkRzjxGD1Z1d0jaLi +fBq/hbtmuar4zqgn28+XIpH7FXFHsLqXZxdHMJDHloUbE4zwHvYPPnpMVyYUrwj1 +/+8zPCKBqx9iyydOiamgVTB/sTUtbijMFvYfMP8jUiejxfRONR2guzgMFQPrbokk +uQNA8sViHfk8u14cGoioFs3253rIR+xRJ/qn8bienr82TlvruSjRNejkBFGDYkS1 +AtZbcT77NZ2f1/I4SCS+rnLg21hy/U4i76Yh+SSivHjkcogenHjcNMu+0MkL8ANm +IrSa3/uYEa8NCiy1YL8qjHIWhwcpks89ilJlXkry9Ek2CaYaJlSrL/z/nSsN1XO7 +UCAo4jzzYZjhHTyyEYb8 +=CmSl -----END PGP SIGNATURE----- diff --git a/mail-filter/dspam/dspam-3.10.0-r1.ebuild b/mail-filter/dspam/dspam-3.10.0-r1.ebuild new file mode 100644 index 000000000000..6f8f14e1196a --- /dev/null +++ b/mail-filter/dspam/dspam-3.10.0-r1.ebuild @@ -0,0 +1,222 @@ +# 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-r1.ebuild,v 1.1 2011/08/06 10:16:52 eras Exp $ + +EAPI=4 + +inherit eutils + +DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter" +HOMEPAGE="http://dspam.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +DRIVERS_IUSE="+hash mysql postgres sqlite" +SCALES_IUSE="+small-scale 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 +# - 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//+} ) ) + ^^ ( ${SCALES_IUSE//+} ) + 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-r4" 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/metadata.xml b/mail-filter/dspam/metadata.xml index 28c56e67dbe2..28501bf25eb0 100644 --- a/mail-filter/dspam/metadata.xml +++ b/mail-filter/dspam/metadata.xml @@ -30,11 +30,14 @@ <flag name='virtual-users'> Build with virtual-users support </flag> + <flag name='small-scale'> + Build for small scale setups - puts data to $HOME/data/user + </flag> <flag name='domain-scale'> - Build with domain scale setups + Build for domain scale setups - puts data to $HOME/data/domain.com/user </flag> <flag name='large-scale'> - Build with large scale setups + Build for large scale setups - puts data to $HOME/data/u/s/user </flag> <flag name='hash'> Enable support for the file-orientated hash driver |