From a057c25229c52def14c1250a6687073640dfccae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alin=20N=C4=83stac?= Date: Tue, 19 Dec 2006 09:46:21 +0000 Subject: [PATCH] Remove obsolete version. Improve pkg_config and cron script (#158194 and #158227). Package-Manager: portage-2.1.1-r2 --- mail-filter/dspam/Manifest | 50 ++- mail-filter/dspam/dspam-3.6.6.ebuild | 496 --------------------- mail-filter/dspam/dspam-3.6.8.ebuild | 458 ------------------- mail-filter/dspam/files/digest-dspam-3.6.6 | 6 - mail-filter/dspam/files/digest-dspam-3.6.8 | 9 - 5 files changed, 26 insertions(+), 993 deletions(-) delete mode 100644 mail-filter/dspam/dspam-3.6.6.ebuild delete mode 100644 mail-filter/dspam/dspam-3.6.8.ebuild delete mode 100644 mail-filter/dspam/files/digest-dspam-3.6.6 delete mode 100644 mail-filter/dspam/files/digest-dspam-3.6.8 diff --git a/mail-filter/dspam/Manifest b/mail-filter/dspam/Manifest index d50ac758e319..a698a3dd2893 100644 --- a/mail-filter/dspam/Manifest +++ b/mail-filter/dspam/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX README.postfix 309 RMD160 34f35ffa4e393ba1791cef2800bc8b4d4f49df5b SHA1 c004a3e7d54dfdd6fae8a654e44d0b9240935739 SHA256 e0928cf2d734e79419c30a4ee829962351ef5a1247ed1d1ddf3b58410e14828b MD5 c12a54112c6fec3530a7b1a368d04ac8 files/README.postfix 309 RMD160 34f35ffa4e393ba1791cef2800bc8b4d4f49df5b files/README.postfix 309 @@ -6,10 +9,10 @@ AUX README.qmail 2317 RMD160 ebdd90be77441540848caf39b6fcde3d332b2b93 SHA1 081b2 MD5 e0469b961385fda4305602dc2519d319 files/README.qmail 2317 RMD160 ebdd90be77441540848caf39b6fcde3d332b2b93 files/README.qmail 2317 SHA256 c70a32eb183401f3d36b8e13c1e298875692b8a9d3f34151ae42b172dd6f064a files/README.qmail 2317 -AUX dspam.cron 4365 RMD160 480ee9f38e938e326d8027a3ea9278627104f4ac SHA1 4647273e98d0895f74e8bed9b868e164afa475bb SHA256 4c5e354832d89e8de6fdd1666c68cad66cd93f65ba53b7c3badf409a613c70f1 -MD5 c587b15b04392911dd203bb84b410fc1 files/dspam.cron 4365 -RMD160 480ee9f38e938e326d8027a3ea9278627104f4ac files/dspam.cron 4365 -SHA256 4c5e354832d89e8de6fdd1666c68cad66cd93f65ba53b7c3badf409a613c70f1 files/dspam.cron 4365 +AUX dspam.cron 4460 RMD160 a4df1c73d17284bb9b221beb63830a77511f3200 SHA1 699ed06f8ace32cb4cb36cc9110d73f58f130b25 SHA256 caa771fcb38fe7e76dc1141c4990ae9f58f38c8fd0a3767a4f2bbbf880277f81 +MD5 0155a8f49c9f481270d9c76b6f002293 files/dspam.cron 4460 +RMD160 a4df1c73d17284bb9b221beb63830a77511f3200 files/dspam.cron 4460 +SHA256 caa771fcb38fe7e76dc1141c4990ae9f58f38c8fd0a3767a4f2bbbf880277f81 files/dspam.cron 4460 AUX dspam.rc 1025 RMD160 d223977cf390b1e89392462f06b31b0722810fa3 SHA1 6b243ffac8179120ed7ee6f4b24bf01ad3a511f0 SHA256 9726e4b7699ccbb305d5e161baec2010e115731e582f69c3c670ec36bb099d34 MD5 e2850ede85e459ab5479b7d2e79eeb5a files/dspam.rc 1025 RMD160 d223977cf390b1e89392462f06b31b0722810fa3 files/dspam.rc 1025 @@ -18,29 +21,28 @@ AUX logrotate.dspam 156 RMD160 256f2607b275336f944b0882591366c39b53daf7 SHA1 280 MD5 2163ca41de383f09f4d754e2d35cb158 files/logrotate.dspam 156 RMD160 256f2607b275336f944b0882591366c39b53daf7 files/logrotate.dspam 156 SHA256 75e04139e564ad55011ee77b8245dc5cdefbb6d56ca451feab5861ab907d614e files/logrotate.dspam 156 -DIST dspam-3.6.6.tar.gz 725502 RMD160 2416908398e7e8e6a180e97dbebd4f9aee6088d7 SHA1 6113966122597c277d51b7f27539b899c3dcf847 SHA256 af9b9429ee3b69c5d1fe8e8891f21c8640ca572f6244a794835646301ce84e91 -DIST dspam-3.6.8-patches-20061029.tar.gz 5030 RMD160 cfc2d2c8f896b1e17b8ceed2f51d2c74640e3a58 SHA1 b9cc608c9b111ada584a1a09c72b37b28c6dd823 SHA256 841e93b6347dd3f96f536e9fab3717b5b1c7aa21f0acf04f524fe4c1bb8e903a +DIST dspam-3.6.8-patches-20061219.tar.gz 5370 RMD160 0347a618b63b9fe662838f888f84b705bd24c72a SHA1 a998c131ef763efb32c6f538188de987ec544dc9 SHA256 cdd43862d939e089052bf0fde9e85f7a6b056a441d2d54ff4f3b8bb016f0de4c DIST dspam-3.6.8.tar.gz 743275 RMD160 93a70db14070cb61bd2ef1b0ca55a18be1dbfd7b SHA1 e8c413882eadf1e02837e4a2ffcfc98b801eded1 SHA256 88c7b41fb81e90ba8a260885a1d14bce39f2ef4a06cc2c6b8bfa0b99ba1aec34 DIST dspam_sa_trainer.tar.gz 1230 RMD160 c3d0fca7169d23ecf9d44c850ee255b42d97d818 SHA1 71a002f26a888bdfe47759cf1f780cd6478dacac SHA256 8fb6b1ebe592acf00a028737ef8e174544af166768b987d29048b2319bc5a215 -EBUILD dspam-3.6.6.ebuild 18436 RMD160 a14c51c1377c4da1687ba02df4923b3590d2a243 SHA1 f46bd0c3641f86fb809ef1877c32cf751c960897 SHA256 ee833ab7cb9acc4e64c8f253ed0aff9a80af21301f22a6b148977f9a366430e8 -MD5 2b603d5be9f8e87cfeb94033c43c6cea dspam-3.6.6.ebuild 18436 -RMD160 a14c51c1377c4da1687ba02df4923b3590d2a243 dspam-3.6.6.ebuild 18436 -SHA256 ee833ab7cb9acc4e64c8f253ed0aff9a80af21301f22a6b148977f9a366430e8 dspam-3.6.6.ebuild 18436 -EBUILD dspam-3.6.8.ebuild 15851 RMD160 825a2f32330c1b63e201bca40e2b7ac4e6266a4e SHA1 40cb29548cfc5793cd852f81ea8cbb1b075b73f7 SHA256 38a84165efa6fcf39c2966ee09541b9ac53734b2c101498f5f575606dc484ed6 -MD5 fc0e391665ca68cd31e010202db940f3 dspam-3.6.8.ebuild 15851 -RMD160 825a2f32330c1b63e201bca40e2b7ac4e6266a4e dspam-3.6.8.ebuild 15851 -SHA256 38a84165efa6fcf39c2966ee09541b9ac53734b2c101498f5f575606dc484ed6 dspam-3.6.8.ebuild 15851 -MISC ChangeLog 13927 RMD160 4f92be42c3dc587adacb2d9598d7ca9c110d454e SHA1 9f7cd4bda5915280d4176f5192424dcb1886fd16 SHA256 48ca895581c801dc400b91c1f82a4b781a4621ef0eeb76edb440083ab665f01a -MD5 36409aaa9776704de8f0247fae0a9ff8 ChangeLog 13927 -RMD160 4f92be42c3dc587adacb2d9598d7ca9c110d454e ChangeLog 13927 -SHA256 48ca895581c801dc400b91c1f82a4b781a4621ef0eeb76edb440083ab665f01a ChangeLog 13927 +EBUILD dspam-3.6.8-r1.ebuild 17376 RMD160 67e7f59a26ad7a9c1d6f4adc7ca388bbb97793e5 SHA1 19700f075bf2391c62e99d38a20b22c30a77318f SHA256 9d85213cc25b5257239c57eecab1e1bf9e127b4e39430783badc97dccd7ee57a +MD5 8675e2415008ff3e7aa2da3f9f648f4b dspam-3.6.8-r1.ebuild 17376 +RMD160 67e7f59a26ad7a9c1d6f4adc7ca388bbb97793e5 dspam-3.6.8-r1.ebuild 17376 +SHA256 9d85213cc25b5257239c57eecab1e1bf9e127b4e39430783badc97dccd7ee57a dspam-3.6.8-r1.ebuild 17376 +MISC ChangeLog 14182 RMD160 9e985123838df670671ed4a2385ada64291351ca SHA1 24a952fda38b5b84fa1a2798c0f4bf86fd8db5be SHA256 f11dc3949b5ad7071b3b2ce446b663c4f0be106617efa3cc65fe8ee383d142ed +MD5 4a5a0aa65ce94d852f6f4fb5c128d250 ChangeLog 14182 +RMD160 9e985123838df670671ed4a2385ada64291351ca ChangeLog 14182 +SHA256 f11dc3949b5ad7071b3b2ce446b663c4f0be106617efa3cc65fe8ee383d142ed ChangeLog 14182 MISC metadata.xml 397 RMD160 1d897be7c5d2f12f25490fa6ece53d7dacbe1427 SHA1 5d77bb1cd119d2ff52d65d9256dff9dca7ebcf6f SHA256 19348733b588bec627f76b297a101b21bc9ae7021a2f55fe12240b1dfa176a77 MD5 91827a3d521f4dd3c43a9a062a052e7c metadata.xml 397 RMD160 1d897be7c5d2f12f25490fa6ece53d7dacbe1427 metadata.xml 397 SHA256 19348733b588bec627f76b297a101b21bc9ae7021a2f55fe12240b1dfa176a77 metadata.xml 397 -MD5 7af3180e32cd59d6be1665812e5900a5 files/digest-dspam-3.6.6 479 -RMD160 d37fce937cfec8e8c86d94bf14cf34c9f7fd14d3 files/digest-dspam-3.6.6 479 -SHA256 4019ae3c73affe51f0da1bcae2d8c7fbf7e70975c066b09a9b2b1ec89f5be575 files/digest-dspam-3.6.6 479 -MD5 6738ddaa18a0207f5880647f2e7308c6 files/digest-dspam-3.6.8 759 -RMD160 63e1d22e27ce3864037aff0ab76730f54f034aea files/digest-dspam-3.6.8 759 -SHA256 77d2bbffe1f362788029ffe1cc83beb9265bbd4b373371af5f6e1230a5b11a1b files/digest-dspam-3.6.8 759 +MD5 0e04eb21f6f99782a7962960107e50b7 files/digest-dspam-3.6.8-r1 759 +RMD160 80f03239eb5c96f1d0539aca513209073d9725c7 files/digest-dspam-3.6.8-r1 759 +SHA256 21bd59876972d22bbc5301b0ce7606b1e24c521ddf5b7c91304b005f1d577a5e files/digest-dspam-3.6.8-r1 759 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQFFh7Tp3sf9c6kjmR8RAjVoAKC+AN420ziSjtL8wf2+OXkKNcNQ9wCffY6K +ysoCjazGHaNwRRFQR9P7d9M= +=w0gb +-----END PGP SIGNATURE----- diff --git a/mail-filter/dspam/dspam-3.6.6.ebuild b/mail-filter/dspam/dspam-3.6.6.ebuild deleted file mode 100644 index 0af5d65731fb..000000000000 --- a/mail-filter/dspam/dspam-3.6.6.ebuild +++ /dev/null @@ -1,496 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.6.6.ebuild,v 1.5 2006/11/23 15:52:21 vivo Exp $ - -inherit eutils - -DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter" -SRC_URI="http://dspam.nuclearelephant.com/sources/${P}.tar.gz - http://dspam.nuclearelephant.com/sources/extras/dspam_sa_trainer.tar.gz" -HOMEPAGE="http://dspam.nuclearelephant.com/" -LICENSE="GPL-2" - -IUSE="berkdb clamav cyrus daemon debug large-domain ldap logrotate mysql oci8 postgres procmail sqlite sqlite3 virtual-users user-homedirs" - -DEPEND="berkdb? ( >=sys-libs/db-4.0 ) - clamav? ( >=app-antivirus/clamav-0.86 ) - ldap? ( >=net-nds/openldap-2.2 ) - daemon? ( || ( mysql? ( virtual/mysql ) ) ( postgres? ( >=dev-db/postgresql-7.4.3 ) ) ) - sqlite? ( =sys-apps/portage-2.0.50" && ( - einfo "It would be best practice to add the set of USE flags that you use for this" - einfo "package to the file: /etc/portage/package.use. Example:" - einfo "\`echo \"mail-filter/dspam -mysql -postgres -oci8 -sqlite sqlite3\" >> /etc/portage/package.use\`" - einfo "to build dspam with a SQLite database as your dspam backend." - ) - elif [ "${multiple_dbs}" -eq "0" ]; then - echo - ewarn "You did not select any SQL based database backend." - ewarn "DSPAM will use self-contained Hash driver for storing data." - ewarn "If you don't want that, then enable one of the following" - ewarn "USE flags: ${supported_dbs}" - fi - - if use daemon && has_version ">sys-kernel/linux-headers-2.6"; then - einfo "To use the new DSPAM daemon mode, you need to emerge" - einfo ">sys-kernel/linux-headers-2.6 and rebuild glibc to support NPTL" - fi - - if use daemon && ! use mysql && ! use postgres ; then - echo - ewarn "To use the new DSPAM daemon mode, you need to emerge either MySQL or PostgreSQL" - fi - - if use virtual-users && use user-homedirs ; then - ewarn "If the users are virtual, then they probably should not have home directories." - fi - - if use user-homedirs ; then - ewarn "WARNING: dspam-web will not work with user-homedirs. Disable this USE flag" - ewarn "if you intend on using dspam-web." - fi - - id dspam 2>/dev/null || enewgroup dspam 26 - id dspam 2>/dev/null || enewuser dspam 26 /bin/bash ${HOMEDIR} dspam -} - -src_compile() { - local myconf - - myconf="${myconf} --enable-long-username" - - use large-domain && myconf="${myconf} --enable-large-scale" ||\ - myconf="${myconf} --enable-domain-scale" - - myconf="${myconf} --with-dspam-home=${HOMEDIR}" - myconf="${myconf} --sysconfdir=${CONFDIR}" - use user-homedirs && myconf="${myconf} --enable-homedir" - use clamav && myconf="${myconf} --enable-clamav" - use ldap && myconf="${myconf} --enable-ldap" - - if use cyrus; then - myconf="${myconf} --with-delivery-agent=/usr/lib/cyrus/deliver" - elif use procmail; then - myconf="${myconf} --with-delivery-agent=/usr/bin/procmail" - fi - - # enables support for debugging (touch /etc/dspam/.debug to turn on) - # optional: even MORE debugging output, use with extreme caution! - use debug && myconf="${myconf} --enable-debug --enable-verbose-debug --enable-bnr-debug" - - if use daemon && has_version ">sys-kernel/linux-headers-2.6"; then - myconf="${myconf} --enable-daemon" - fi - - # select storage driver - if use sqlite ; then - myconf="${myconf} --with-storage-driver=sqlite_drv" - myconf="${myconf} --enable-virtual-users" - elif use sqlite3 ; then - myconf="${myconf} --with-storage-driver=sqlite3_drv" - myconf="${myconf} --enable-virtual-users" - elif use mysql; then - myconf="${myconf} --with-storage-driver=mysql_drv" - myconf="${myconf} --with-mysql-includes=/usr/include/mysql" - myconf="${myconf} --with-mysql-libraries=/usr/lib/mysql" - myconf="${myconf} --enable-preferences-extension" - - use virtual-users && myconf="${myconf} --enable-virtual-users" - elif use postgres ; then - myconf="${myconf} --with-storage-driver=pgsql_drv" - myconf="${myconf} --with-pgsql-includes=/usr/include/postgresql" - myconf="${myconf} --with-pgsql-libraries=/usr/lib/postgresql" - myconf="${myconf} --enable-preferences-extension" - - use virtual-users && myconf="${myconf} --enable-virtual-users" - elif use sqlite ; then - myconf="${myconf} --with-storage-driver=sqlite_drv" - myconf="${myconf} --enable-virtual-users" - elif use sqlite3 ; then - myconf="${myconf} --with-storage-driver=sqlite3_drv" - myconf="${myconf} --enable-virtual-users" - elif use oci8 ; then - myconf="${myconf} --with-storage-driver=ora_drv" - myconf="${myconf} --with-oracle-home=${ORACLE_HOME}" - myconf="${myconf} --enable-virtual-users" - - # I am in no way a Oracle specialist. If someone knows - # how to query the version of Oracle, then let me know. - if (expr ${ORACLE_HOME/*\/} : 10 1>/dev/null 2>&1); then - myconf="${myconf} --with-oracle-version=10" - fi - else - myconf="${myconf} --with-storage-driver=hash_drv" - fi - - econf ${myconf} || die - emake || die -} - -src_install () { - - # Fix issues with older dspam configuration - CONFIG_PROTECT="${CONFIG_PROTECT} ${HOMEDIR} ${CONFDIR} /var/run/dspam" - CONFIG_PROTECT_MASK="${CONFIG_PROTECTMASK/${HOMEDIR}/}" - CONFIG_PROTECT_MASK="${CONFIG_PROTECTMASK/${CONFDIR}/}" - - # open up perms on $HOMEDIR - diropts -m0775 -o dspam -g dspam - dodir ${HOMEDIR} - keepdir ${HOMEDIR} - - # keeps dspam data in $CONFDIR - diropts -m0775 -o dspam -g dspam - dodir ${CONFDIR} - keepdir ${CONFDIR} - - # create logdir - diropts -m0775 -o dspam -g dspam - dodir ${LOGDIR} - keepdir ${LOGDIR} - - # make install - make DESTDIR=${D} install || die - chmod o+s ${D}/usr/bin/dspam - chmod o+s ${D}/usr/bin/dspam_stats - - # documentation - dodoc CHANGELOG LICENSE README* RELEASE.NOTES UPGRADING - dodoc ${DISTDIR}/dspam_sa_trainer.tar.gz - docinto doc - dodoc doc/*.txt - docinto gentoo - dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail - doman man/dspam* - dodoc ${DISTDIR}/dspam_sa_trainer.tar.gz - - # build some initial configuration data - [ ! -f ${CONFDIR}/dspam.conf ] \ - && cp src/dspam.conf ${T}/dspam.conf - - if use daemon; then - if has_version ">sys-kernel/linux-headers-2.6"; then - # keeps dspam socket for daemon in /var/run/dspam - diropts -m0775 -o dspam -g dspam - dodir /var/run/dspam - keepdir /var/run/dspam - - # We use sockets for the daemon instead of tcp port 24 - sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/var/run/dspam/dspam.sock\":gI' \ - -e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/var/run/dspam/dspam.pid:gI' \ - -i ${T}/dspam.conf - - # dspam init script - exeinto /etc/init.d - exeopts -m0755 -o root -g root - newexe ${FILESDIR}/dspam.rc dspam - fi - fi - - # generate random password - local PASSWORD="${RANDOM}${RANDOM}${RANDOM}${RANDOM}" - - # database related configuration and scripts - if use sqlite; then - insinto ${CONFDIR} - insopts -m644 -o dspam -g dspam - newins src/tools.sqlite_drv/purge-2.sql sqlite_purge.sql - elif use sqlite3; then - insinto ${CONFDIR} - insopts -m644 -o dspam -g dspam - newins src/tools.sqlite_drv/purge-3.sql sqlite3_purge.sql - elif use mysql; then - # Use existing configuration if possible - if [[ -f ${ROOT}${CONFDIR}/mysql.data ]]; then - DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/mysql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - else - DSPAM_DB_DATA[0]="/var/run/mysqld/mysqld.sock" - DSPAM_DB_DATA[1]="" - DSPAM_DB_DATA[2]="dspam" - DSPAM_DB_DATA[3]="${PASSWORD}" - DSPAM_DB_DATA[4]="dspam" - DSPAM_DB_DATA[5]="true" - fi - - # Modify configuration and create mysql.data file - sed -e "s:^#*\(MySQLServer[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[0]}:gI" \ - -e "s:^#*\(MySQLPort[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[1]}:gI" \ - -e "s:^#*\(MySQLUser[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[2]}:gI" \ - -e "s:^#*\(MySQLPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI" \ - -e "s:^#*\(MySQLDb[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[4]}:gI" \ - -e "s:^#*\(MySQLCompress[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[5]}:gI" \ - -i ${T}/dspam.conf - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${T}/mysql.data - done - insinto ${CONFDIR} - insopts -m644 -o dspam -g dspam - doins ${T}/mysql.data - newins src/tools.mysql_drv/mysql_objects-space.sql mysql_objects-space.sql - newins src/tools.mysql_drv/mysql_objects-speed.sql mysql_objects-speed.sql - newins src/tools.mysql_drv/mysql_objects-4.1.sql mysql_objects-4.1.sql - newins src/tools.mysql_drv/virtual_users.sql mysql_virtual_users.sql - newins src/tools.mysql_drv/purge.sql mysql_purge.sql - newins src/tools.mysql_drv/purge-4.1.sql mysql_purge-4.1.sql - - elif use postgres ; then - # Use existing configuration if possible - if [ -f ${ROOT}${CONFDIR}/pgsql.data ]; then - DSPAM_DB_DATA=( $(cat "${ROOT}${CONFDIR}/pgsql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - else - DSPAM_DB_DATA[0]="127.0.0.1" - DSPAM_DB_DATA[1]="5432" - DSPAM_DB_DATA[2]="dspam" - DSPAM_DB_DATA[3]="${PASSWORD}" - DSPAM_DB_DATA[4]="dspam" - fi - - # Modify configuration and create pgsql.data file - sed -e "s:^#*\(PgSQLServer[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[0]}:gI" \ - -e "s:^#*\(PgSQLPort[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[1]}:gI" \ - -e "s:^#*\(PgSQLUser[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[2]}:gI" \ - -e "s:^#*\(PgSQLPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI" \ - -e "s:^#*\(PgSQLDb[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[4]}:gI" \ - -e "s:^#*\(PgSQLConnectionCache[\t ]*.\):\1:gI" \ - -i ${T}/dspam.conf - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${T}/pgsql.data - done - - insinto ${CONFDIR} - insopts -m644 -o dspam -g dspam - doins ${T}/pgsql.data - newins src/tools.pgsql_drv/pgsql_objects.sql pgsql_objects.sql - newins src/tools.pgsql_drv/virtual_users.sql pgsql_virtual_users.sql - newins src/tools.pgsql_drv/purge.sql pgsql_purge.sql - - elif use oci8 ; then - # Use existing configuration if possible - if [ -f ${ROOT}${CONFDIR}/oracle.data ]; then - DSPAM_DB_DATA=( $(cat "${ROOT}${CONFDIR}/oracle.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - else - DSPAM_DB_DATA[0]="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SID=PROD)))" - DSPAM_DB_DATA[1]="dspam" - DSPAM_DB_DATA[2]="${PASSWORD}" - DSPAM_DB_DATA[3]="dspam" - fi - - # Modify configuration and create oracle.data file - sed -e "s:^#*\(OraServer[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[0]}:gI" \ - -e "s:^\(OraUser[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[1]}:gI" \ - -e "s:^\(OraPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[2]}:gI" \ - -e "s:^\(OraSchema[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI"\ - -i ${T}/dspam.conf - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${T}/oracle.data - done - - insinto ${CONFDIR} - insopts -m644 -o dspam -g dspam - doins ${T}/oracle.data - newins src/tools.ora_drv/oral_objects.sql ora_objects.sql - newins src/tools.ora_drv/virtual_users.sql ora_virtual_users.sql - newins src/tools.ora_drv/purge.sql ora_purge.sql - fi - - sed -e "s:^\(Purge.*\):###\1:g" \ - -e "s:^#\(Purge.*\):\1:g" \ - -e "s:^###\(Purge.*\):#\1:g" \ - -i ${T}/dspam.conf - insinto ${CONFDIR} - insopts -m644 -o dspam -g dspam - doins ${T}/dspam.conf - - # installs the notification messages - # -> The documentation is wrong! The files need to be in ./txt - diropts -m0775 -o dspam -g dspam - dodir ${HOMEDIR}/txt - keepdir ${HOMEDIR}/txt - insinto ${HOMEDIR}/txt - insopts -m644 -o dspam -g dspam - doins ${S}/txt/*.txt - - # Create the opt-in / opt-out directories - diropts -m0775 -o dspam -g dspam - dodir ${HOMEDIR}/opt-in - keepdir ${HOMEDIR}/opt-in - dodir ${HOMEDIR}/opt-out - keepdir ${HOMEDIR}/opt-out - - # logrotation scripts - diropts -m0755 -o dspam -g dspam - dodir /etc/logrotate.d - keepdir /etc/logrotate.d - insinto /etc/logrotate.d - insopts -m0644 -o dspam -g dspam - newins ${FILESDIR}/logrotate.dspam dspam - - # dspam cron job - diropts -m0755 -o dspam -g dspam - dodir /etc/cron.daily - keepdir /etc/cron.daily - exeinto /etc/cron.daily - exeopts -m0755 -o dspam -g dspam - doexe ${FILESDIR}/dspam.cron - - # dspam enviroment - echo -ne "CONFIG_PROTECT=\"${CONFDIR} /var/run/dspam\"\n\n" > ${T}/40dspam - doenvd ${T}/40dspam || die -} - -pkg_postinst() { - # need enewgroup/enewuser in this function for binary install. - enewgroup dspam 26 - enewuser dspam 26 /bin/bash ${HOMEDIR} dspam - - env-update - if use mysql || use postgres || use oci8; then - echo - einfo "To setup DSPAM to run out-of-the-box on your system with a MySQL," - einfo "PostgreSQL or Oracle database, run:" - einfo "emerge --config =${PF}" - fi - - if has_version ">dev-db/postgresql-8.0"; then - echo - einfo "Before executing the configuration command mentioned above you have" - einfo "to execute the following command:" - einfo "createlang plpgsql -U postgres dspam" - fi - - if use daemon; then - if has_version ">sys-kernel/linux-headers-2.6"; then - einfo "If you want to run DSPAM in the new daemon mode remember" - einfo "to make the DSPAM daemon start during boot:" - einfo " rc-update add dspam default" - fi - fi - if use exim ; then - echo - einfo "To use dspam in conjunction with your exim system, you should read the README" - fi -} - -pkg_config () { - if use sqlite ; then - einfo "sqlite_drv will automatically create the necessary database" - elif use mysql ; then - DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/mysql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - DSPAM_MySQL_USER="${DSPAM_DB_DATA[2]}" - DSPAM_MySQL_PWD="${DSPAM_DB_DATA[3]}" - DSPAM_MySQL_DB="${DSPAM_DB_DATA[4]}" - - ewarn "When prompted for a password, please enter your MySQL root password" - ewarn - - einfo "Creating DSPAM MySQL database \"${DSPAM_MySQL_DB}\"" - /usr/bin/mysqladmin -u root -p create ${DSPAM_MySQL_DB} - - einfo "Creating DSPAM MySQL tables for data objects" - einfo " Please select what kind of object database you like to use." - einfo " [1] Space optimized database" - einfo " [2] Speed optimized database" - einfo - while true - do - read -n 1 -s -p " Press 1 or 2 on the keyboard to select database" DSPAM_MySQL_DB_Type - [[ "${DSPAM_MySQL_DB_Type}" == "1" || "${DSPAM_MySQL_DB_Type}" == "2" ]] && echo && break - done - - if [ "${DSPAM_MySQL_DB_Type}" == "1" ] - then - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_objects-space.sql - else - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_objects-speed.sql - fi - - if use virtual-users ; then - einfo "Creating DSPAM MySQL database for virtual-users users" - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_virtual_users.sql - fi - - einfo "Creating DSPAM MySQL user \"${DSPAM_MySQL_USER}\"" - /usr/bin/mysql -u root -p -e "GRANT SELECT,INSERT,UPDATE,DELETE ON ${DSPAM_MySQL_DB}.* TO ${DSPAM_MySQL_USER}@localhost IDENTIFIED BY '${DSPAM_MySQL_PWD}';FLUSH PRIVILEGES;" -D mysql - elif use postgres ; then - DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/pgsql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - DSPAM_PgSQL_USER="${DSPAM_DB_DATA[2]}" - DSPAM_PgSQL_PWD="${DSPAM_DB_DATA[3]}" - DSPAM_PgSQL_DB="${DSPAM_DB_DATA[4]}" - - ewarn "When prompted for a password, please enter your PgSQL postgres password" - ewarn - - einfo "Creating DSPAM PostgreSQL database \"${DSPAM_PgSQL_DB}\" and user \"${DSPAM_PgSQL_USER}\"" - /usr/bin/psql -h localhost -d template1 -U postgres -c "CREATE USER ${DSPAM_PgSQL_USER} WITH PASSWORD '${DSPAM_PgSQL_PWD}' NOCREATEDB NOCREATEUSER; CREATE DATABASE ${DSPAM_PgSQL_DB}; GRANT ALL PRIVILEGES ON DATABASE ${DSPAM_PgSQL_DB} TO ${DSPAM_PgSQL_USER}; GRANT ALL PRIVILEGES ON SCHEMA public TO ${DSPAM_PgSQL_USER}; UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE usename='${DSPAM_PgSQL_USER}') WHERE datname='${DSPAM_PgSQL_DB}';" - - einfo "Creating DSPAM PostgreSQL tables" - PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${CONFDIR}/pgsql_objects.sql 1>/dev/null 2>&1 - - if use virtual-users ; then - einfo "Creating DSPAM PostgreSQL database for virtual-users users" - PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${CONFDIR}/pgsql_virtual_users.sql 1>/dev/null 2>&1 - fi - elif use oci8 ; then - einfo "We have not enought Oracle knowledge to configure Oracle" - einfo "automatically. If you know how, please post a message in" - einfo "Gentoo Bugzilla." - einfo - einfo "You need manually to create the Oracle user for DSPAM and" - einfo "the necessary database." - einfo "But the DSPAM configuration file dspam.conf and oracle.data" - einfo "was already configured with the necessary information to" - einfo "access the database." - einfo "Please read your dspam.conf, oracle.data and the README for" - einfo "more info on how to setup DSPAM with Oracle." - einfo "objects for each user upon first use of DSPAM by that user." - fi -} diff --git a/mail-filter/dspam/dspam-3.6.8.ebuild b/mail-filter/dspam/dspam-3.6.8.ebuild deleted file mode 100644 index 7b2b61fa1d68..000000000000 --- a/mail-filter/dspam/dspam-3.6.8.ebuild +++ /dev/null @@ -1,458 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.6.8.ebuild,v 1.3 2006/11/23 15:52:21 vivo Exp $ - -inherit eutils autotools flag-o-matic - -DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter" -HOMEPAGE="http://dspam.nuclearelephant.com/" -SRC_URI="http://dspam.nuclearelephant.com/sources/${P}.tar.gz - mirror://gentoo/${P}-patches-20061029.tar.gz - http://dspam.nuclearelephant.com/sources/extras/dspam_sa_trainer.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -IUSE="clamav daemon debug large-domain ldap logrotate mysql oracle postgres \ - sqlite sqlite3 virtual-users user-homedirs" - -DEPEND="clamav? ( >=app-antivirus/clamav-0.86 ) - ldap? ( >=net-nds/openldap-2.2 ) - mysql? ( virtual/mysql ) - postgres? ( >=dev-db/postgresql-7.4.3 ) - sqlite? ( = 1000, for being able to use suexec in apache - for euid in $(seq 1000 5000 ) ; do - [[ -z $(egetent passwd ${euid}) ]] && break - done - for egid in $(seq 1000 5000 ) ; do - [[ -z $(egetent group ${egid}) ]] && break - done - - enewgroup dspam ${egid} - enewuser dspam ${euid} -1 ${HOMEDIR} dspam,mail -} - -pkg_setup() { - if use virtual-users && use user-homedirs ; then - eerror "If the users are virtual, then they probably should not have home directories." - die "Incompatible USE flag selection" - fi - - create_dspam_usergroup -} - -src_unpack() { - unpack ${A} - cd "${S}" - - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patches - - # Fix Lazy bindings - append-flags $(bindnow-flags) - - AT_M4DIR="${S}/m4" - eautoreconf -} - -src_compile() { - local myconf="--enable-long-usernames --enable-syslog" - - use large-domain && myconf="${myconf} --enable-large-scale" ||\ - myconf="${myconf} --enable-domain-scale" - - use user-homedirs && myconf="${myconf} --enable-homedir" - - use debug && myconf="${myconf} --enable-debug --enable-verbose-debug --enable-bnr-debug" - - if use virtual-users ; then - if use mysql || use postgres || use oracle ; then - myconf="${myconf} --enable-virtual-users" - fi - fi - - if use mysql || use postgres ; then - myconf="${myconf} --enable-preferences-extension" - fi - - local STORAGE - # select storage driver - if use sqlite ; then - if [ "$STORAGE" ] ; then STORAGE="${STORAGE}," ; fi - STORAGE="${STORAGE}sqlite_drv" - fi - if use sqlite3 ; then - if [ "$STORAGE" ] ; then STORAGE="${STORAGE}," ; fi - STORAGE="${STORAGE}sqlite3_drv" - fi - if use mysql; then - if [ "$STORAGE" ] ; then STORAGE="${STORAGE}," ; fi - STORAGE="${STORAGE}mysql_drv" - myconf="${myconf} --with-mysql-includes=/usr/include/mysql" - myconf="${myconf} --with-mysql-libraries=/usr/lib/mysql" - fi - if use postgres ; then - if [ "$STORAGE" ] ; then STORAGE="${STORAGE}," ; fi - STORAGE="${STORAGE}pgsql_drv" - myconf="${myconf} --with-pgsql-includes=/usr/include/postgresql" - myconf="${myconf} --with-pgsql-libraries=/usr/lib/postgresql" - fi - if use oracle ; then - if [ "$STORAGE" ] ; then STORAGE="${STORAGE}," ; fi - STORAGE="${STORAGE}ora_drv" - myconf="${myconf} --with-oracle-home=${ORACLE_HOME}" - - # I am in no way a Oracle specialist. If someone knows - # how to query the version of Oracle, then let me know. - if (expr ${ORACLE_HOME/*\/} : 10 1>/dev/null 2>&1); then - myconf="${myconf} --with-oracle-version=10" - fi - fi - if [[ -z "${STORAGE}" ]]; then - STORAGE="${STORAGE}hash_drv" - fi - - econf ${myconf} --with-storage-driver=${STORAGE} \ - --with-dspam-home=${HOMEDIR} \ - --sysconfdir=${CONFDIR} \ - $(use_enable daemon) \ - $(use_enable ldap) \ - $(use_enable clamav) \ - --with-dspam-group=dspam \ - --with-dspam-home-group=dspam \ - --with-logdir=${LOGDIR} || die "econf failed" - emake || die "emake failed" -} - -src_install () { - diropts -m0770 -o dspam -g dspam - dodir ${CONFDIR} - insinto ${CONFDIR} - insopts -m640 -o dspam -g dspam - doins src/dspam.conf - - dosym /etc/mail/dspam /etc/dspam - - # make install - make DESTDIR="${D}" install || die "make install failed" - chgrp dspam "${D}/usr/bin/dspam" - chmod g+xs,o+x "${D}/usr/bin/dspam" - - dodir /usr/lib/dspam - mv "${D}"/usr/lib/*drv* "${D}"/usr/lib/dspam/ - - diropts -m0755 -o dspam -g dspam - keepdir /var/run/dspam - - # create logdir - if use debug ; then - diropts -m0770 -o dspam -g dspam - keepdir ${LOGDIR} - fi - - #clean options - diropts - insopts - - if use daemon; then - # We use sockets for the daemon instead of tcp port 24 - sed -e 's:^#*\(ServerDomainSocketPath[\t ]\{1,\}\).*:\1\"/var/run/dspam/dspam.sock\":gI' \ - -e 's:^#*\(ServerPID[\t ]\{1,\}\).*:\1/var/run/dspam/dspam.pid:gI' \ - -i "${D}/${CONFDIR}/dspam.conf" - - newinitd "${FILESDIR}/dspam.rc" dspam - fi - - # generate random password - local PASSWORD="${RANDOM}${RANDOM}${RANDOM}${RANDOM}" - - # database related configuration and scripts - if use sqlite; then - insinto ${CONFDIR} - newins src/tools.sqlite_drv/purge-2.sql sqlite_purge.sql - fi - if use sqlite3; then - insinto ${CONFDIR} - newins src/tools.sqlite_drv/purge-3.sql sqlite3_purge.sql - fi - if use mysql; then - # Use existing configuration if possible - if [[ -f "${ROOT}${CONFDIR}/mysql.data" ]]; then - DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/mysql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - else - DSPAM_DB_DATA[0]="/var/run/mysqld/mysqld.sock" - DSPAM_DB_DATA[1]="" - DSPAM_DB_DATA[2]="dspam" - DSPAM_DB_DATA[3]="${PASSWORD}" - DSPAM_DB_DATA[4]="dspam" - DSPAM_DB_DATA[5]="true" - fi - - # Modify configuration and create mysql.data file - sed -e "s:^#*\(MySQLServer[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[0]}:gI" \ - -e "s:^#*\(MySQLPort[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[1]}:gI" \ - -e "s:^#*\(MySQLUser[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[2]}:gI" \ - -e "s:^#*\(MySQLPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI" \ - -e "s:^#*\(MySQLDb[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[4]}:gI" \ - -e "s:^#*\(MySQLCompress[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[5]}:gI" \ - -i "${D}"/${CONFDIR}/dspam.conf - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${D}/${CONFDIR}/mysql.data - done - - insinto ${CONFDIR} - newins src/tools.mysql_drv/mysql_objects-space.sql mysql_objects-space.sql - newins src/tools.mysql_drv/mysql_objects-speed.sql mysql_objects-speed.sql - newins src/tools.mysql_drv/mysql_objects-4.1.sql mysql_objects-4.1.sql - newins src/tools.mysql_drv/virtual_users.sql mysql_virtual_users.sql - newins src/tools.mysql_drv/purge.sql mysql_purge.sql - newins src/tools.mysql_drv/purge-4.1.sql mysql_purge-4.1.sql - - fperms 640 ${CONFDIR}/mysql.data - fowners root:dspam ${CONFDIR}/mysql.data - fi - if use postgres ; then - # Use existing configuration if possible - if [ -f ${ROOT}${CONFDIR}/pgsql.data ]; then - DSPAM_DB_DATA=( $(cat "${ROOT}${CONFDIR}/pgsql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - else - DSPAM_DB_DATA[0]="127.0.0.1" - DSPAM_DB_DATA[1]="5432" - DSPAM_DB_DATA[2]="dspam" - DSPAM_DB_DATA[3]="${PASSWORD}" - DSPAM_DB_DATA[4]="dspam" - fi - - # Modify configuration and create pgsql.data file - sed -e "s:^#*\(PgSQLServer[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[0]}:gI" \ - -e "s:^#*\(PgSQLPort[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[1]}:gI" \ - -e "s:^#*\(PgSQLUser[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[2]}:gI" \ - -e "s:^#*\(PgSQLPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI" \ - -e "s:^#*\(PgSQLDb[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[4]}:gI" \ - -e "s:^#*\(PgSQLConnectionCache[\t ]*.\):\1:gI" \ - -i ${D}/${CONFDIR}/dspam.conf - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> ${D}/${CONFDIR}/pgsql.data - done - - insinto ${CONFDIR} - newins src/tools.pgsql_drv/pgsql_objects.sql pgsql_objects.sql - newins src/tools.pgsql_drv/virtual_users.sql pgsql_virtual_users.sql - newins src/tools.pgsql_drv/purge.sql pgsql_purge.sql - - fperms 640 ${CONFDIR}/pgsql.data - fowners root:dspam ${CONFDIR}/pgsql.data - fi - if use oracle ; then - # Use existing configuration if possible - if [ -f ${ROOT}${CONFDIR}/oracle.data ]; then - DSPAM_DB_DATA=( $(cat "${ROOT}${CONFDIR}/oracle.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - else - DSPAM_DB_DATA[0]="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SID=PROD)))" - DSPAM_DB_DATA[1]="dspam" - DSPAM_DB_DATA[2]="${PASSWORD}" - DSPAM_DB_DATA[3]="dspam" - fi - - # Modify configuration and create oracle.data file - sed -e "s:^#*\(OraServer[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[0]}:gI" \ - -e "s:^\(OraUser[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[1]}:gI" \ - -e "s:^\(OraPass[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[2]}:gI" \ - -e "s:^\(OraSchema[\t ]\{1,\}\).*:\1${DSPAM_DB_DATA[3]}:gI"\ - -i "${D}"/${CONFDIR}/dspam.conf - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - echo "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" >> "${D}"/${CONFDIR}/oracle.data - done - - insinto ${CONFDIR} - newins src/tools.ora_drv/oral_objects.sql ora_objects.sql - newins src/tools.ora_drv/virtual_users.sql ora_virtual_users.sql - newins src/tools.ora_drv/purge.sql ora_purge.sql - - fperms 640 ${CONFDIR}/oracle.data - fowners root:dspam ${CONFDIR}/oracle.data - fi - - sed -e "s:^\(Purge.*\):###\1:g" \ - -e "s:^#\(Purge.*\):\1:g" \ - -e "s:^###\(Purge.*\):#\1:g" \ - -i "${D}"/${CONFDIR}/dspam.conf - - # installs the notification messages - # -> The documentation is wrong! The files need to be in ./txt - insinto ${CONFDIR}/txt - doins "${S}"/txt/*.txt - - # Create the opt-in / opt-out directories - diropts -m0770 -o dspam -g dspam - dodir ${HOMEDIR} - keepdir ${HOMEDIR}/opt-in - keepdir ${HOMEDIR}/opt-out - diropts - - # logrotation scripts - if use logrotate && use debug ; then - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.dspam" dspam - fi - - # dspam cron job - exeinto /etc/cron.daily - doexe "${FILESDIR}/dspam.cron" - - # documentation - dodoc CHANGELOG README* RELEASE.NOTES UPGRADING - docinto doc - dodoc doc/*.txt - docinto gentoo - dodoc "${FILESDIR}/README.postfix" "${FILESDIR}/README.qmail" - docinto sa_train - dodoc "${WORKDIR}"/dspam_sa_trainer/* - doman man/dspam* -} - -pkg_postinst() { - # need enewgroup/enewuser in this function for binary install. - create_dspam_usergroup - - if use mysql || use postgres || use oracle; then - echo - einfo "To setup DSPAM to run out-of-the-box on your system with a MySQL," - einfo "PostgreSQL or Oracle database, run:" - einfo "emerge --config =${PF}" - fi - - if use postgres && has_version ">dev-db/postgresql-8.0"; then - echo - einfo "Before executing the configuration command mentioned above you have" - einfo "to execute the following command:" - einfo "createlang plpgsql -U postgres dspam" - fi - - if use daemon; then - echo - einfo "If you want to run DSPAM in the new daemon mode remember" - einfo "to make the DSPAM daemon start during boot:" - einfo " rc-update add dspam default" - fi - if use daemon ; then - einfo "To use the DSPAM daemon mode, the used storage driver must be thread-safe." - fi - - einfo "Edit /etc/mail/dspam.conf with your delivery agent" - einfo "See http://dspamwiki.expass.de/Installation for more info" -} - -pkg_config () { - if use sqlite || use sqlite3 ; then - einfo "sqlite_drv will automatically create the necessary database" - fi - if use mysql ; then - DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/mysql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - DSPAM_MySQL_USER="${DSPAM_DB_DATA[2]}" - DSPAM_MySQL_PWD="${DSPAM_DB_DATA[3]}" - DSPAM_MySQL_DB="${DSPAM_DB_DATA[4]}" - - ewarn "When prompted for a password, please enter your MySQL root password" - ewarn - - einfo "Creating DSPAM MySQL database \"${DSPAM_MySQL_DB}\"" - /usr/bin/mysqladmin -u root -p create ${DSPAM_MySQL_DB} - - - if has_version ">=virtual/mysql-4.1"; then - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_objects-4.1.sql - else - einfo "Creating DSPAM MySQL tables for data objects" - einfo " Please select what kind of object database you like to use." - einfo " [1] Space optimized database" - einfo " [2] Speed optimized database" - einfo - while true - do - read -n 1 -s -p " Press 1 or 2 on the keyboard to select database" DSPAM_MySQL_DB_Type - [[ "${DSPAM_MySQL_DB_Type}" == "1" || "${DSPAM_MySQL_DB_Type}" == "2" ]] && echo && break - done - - if [ "${DSPAM_MySQL_DB_Type}" == "1" ] - then - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_objects-space.sql - else - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_objects-speed.sql - fi - fi - - if use virtual-users ; then - einfo "Creating DSPAM MySQL database for virtual-users users" - /usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${CONFDIR}/mysql_virtual_users.sql - fi - - einfo "Creating DSPAM MySQL user \"${DSPAM_MySQL_USER}\"" - /usr/bin/mysql -u root -p -e "GRANT SELECT,INSERT,UPDATE,DELETE ON ${DSPAM_MySQL_DB}.* TO ${DSPAM_MySQL_USER}@localhost IDENTIFIED BY '${DSPAM_MySQL_PWD}';FLUSH PRIVILEGES;" -D mysql - fi - if use postgres ; then - DSPAM_DB_DATA=( $(sed "s:^[\t ]*$:###:gI" "${ROOT}${CONFDIR}/pgsql.data") ) - for DB_DATA_INDEX in $(seq 0 $((${#DSPAM_DB_DATA[@]} - 1))); do - [[ "${DSPAM_DB_DATA[$DB_DATA_INDEX]}" = "###" ]] && DSPAM_DB_DATA[$DB_DATA_INDEX]="" - done - DSPAM_PgSQL_USER="${DSPAM_DB_DATA[2]}" - DSPAM_PgSQL_PWD="${DSPAM_DB_DATA[3]}" - DSPAM_PgSQL_DB="${DSPAM_DB_DATA[4]}" - - ewarn "When prompted for a password, please enter your PgSQL postgres password" - ewarn - - einfo "Creating DSPAM PostgreSQL database \"${DSPAM_PgSQL_DB}\" and user \"${DSPAM_PgSQL_USER}\"" - /usr/bin/psql -h localhost -d template1 -U postgres -c "CREATE USER ${DSPAM_PgSQL_USER} WITH PASSWORD '${DSPAM_PgSQL_PWD}' NOCREATEDB NOCREATEUSER; CREATE DATABASE ${DSPAM_PgSQL_DB}; GRANT ALL PRIVILEGES ON DATABASE ${DSPAM_PgSQL_DB} TO ${DSPAM_PgSQL_USER}; GRANT ALL PRIVILEGES ON SCHEMA public TO ${DSPAM_PgSQL_USER}; UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE usename='${DSPAM_PgSQL_USER}') WHERE datname='${DSPAM_PgSQL_DB}';" - - einfo "Creating DSPAM PostgreSQL tables" - PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${CONFDIR}/pgsql_objects.sql 1>/dev/null 2>&1 - - if use virtual-users ; then - einfo "Creating DSPAM PostgreSQL database for virtual-users users" - PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${CONFDIR}/pgsql_virtual_users.sql 1>/dev/null 2>&1 - fi - fi - if use oracle ; then - einfo "We have not enought Oracle knowledge to configure Oracle" - einfo "automatically. If you know how, please post a message in" - einfo "Gentoo Bugzilla." - einfo - einfo "You need manually to create the Oracle user for DSPAM and" - einfo "the necessary database." - einfo "But the DSPAM configuration file dspam.conf and oracle.data" - einfo "was already configured with the necessary information to" - einfo "access the database." - einfo "Please read your dspam.conf, oracle.data and the README for" - einfo "more info on how to setup DSPAM with Oracle." - einfo "objects for each user upon first use of DSPAM by that user." - fi -} diff --git a/mail-filter/dspam/files/digest-dspam-3.6.6 b/mail-filter/dspam/files/digest-dspam-3.6.6 deleted file mode 100644 index 1819391b8d3b..000000000000 --- a/mail-filter/dspam/files/digest-dspam-3.6.6 +++ /dev/null @@ -1,6 +0,0 @@ -MD5 72dbf9d802ac3645c93b715c81cc9f50 dspam-3.6.6.tar.gz 725502 -RMD160 2416908398e7e8e6a180e97dbebd4f9aee6088d7 dspam-3.6.6.tar.gz 725502 -SHA256 af9b9429ee3b69c5d1fe8e8891f21c8640ca572f6244a794835646301ce84e91 dspam-3.6.6.tar.gz 725502 -MD5 8ffe9d41e6104a4c6d19067528193145 dspam_sa_trainer.tar.gz 1230 -RMD160 c3d0fca7169d23ecf9d44c850ee255b42d97d818 dspam_sa_trainer.tar.gz 1230 -SHA256 8fb6b1ebe592acf00a028737ef8e174544af166768b987d29048b2319bc5a215 dspam_sa_trainer.tar.gz 1230 diff --git a/mail-filter/dspam/files/digest-dspam-3.6.8 b/mail-filter/dspam/files/digest-dspam-3.6.8 deleted file mode 100644 index 96df03bbfde5..000000000000 --- a/mail-filter/dspam/files/digest-dspam-3.6.8 +++ /dev/null @@ -1,9 +0,0 @@ -MD5 1111971fe18d1cd9c8117870f7363b78 dspam-3.6.8-patches-20061029.tar.gz 5030 -RMD160 cfc2d2c8f896b1e17b8ceed2f51d2c74640e3a58 dspam-3.6.8-patches-20061029.tar.gz 5030 -SHA256 841e93b6347dd3f96f536e9fab3717b5b1c7aa21f0acf04f524fe4c1bb8e903a dspam-3.6.8-patches-20061029.tar.gz 5030 -MD5 c4b1a7079690ee16d8b0f36b2a2a90a4 dspam-3.6.8.tar.gz 743275 -RMD160 93a70db14070cb61bd2ef1b0ca55a18be1dbfd7b dspam-3.6.8.tar.gz 743275 -SHA256 88c7b41fb81e90ba8a260885a1d14bce39f2ef4a06cc2c6b8bfa0b99ba1aec34 dspam-3.6.8.tar.gz 743275 -MD5 8ffe9d41e6104a4c6d19067528193145 dspam_sa_trainer.tar.gz 1230 -RMD160 c3d0fca7169d23ecf9d44c850ee255b42d97d818 dspam_sa_trainer.tar.gz 1230 -SHA256 8fb6b1ebe592acf00a028737ef8e174544af166768b987d29048b2319bc5a215 dspam_sa_trainer.tar.gz 1230 -- 2.26.2