commit 395665fa5ea3da9e111527e39d47f2a4fc52c2ef Author: Nathanael D. Noblet <nathanael@xxxxxxx> Date: Thu Jan 17 13:40:01 2013 -0700 attempted fix for bug 657357 (Unable to find purge scripts) dspam-cron | 48 ++++-------------------------------------------- dspam.spec | 5 ++++- 2 files changed, 8 insertions(+), 45 deletions(-) --- diff --git a/dspam-cron b/dspam-cron index 26e0ae3..a513b26 100644 --- a/dspam-cron +++ b/dspam-cron @@ -148,9 +148,9 @@ clean_mysql_drv() { # For the 4.1-optimized version see: # http://securitydot.net/txt/id/32/type/articles/ # Version >= 3.9.0 of DSPAM do already include a better purge script. - DSPAM_MySQL_PURGE_SQL_FILES="mysql_purge-4.1-optimized mysql_purge-4.1" + DSPAM_MySQL_PURGE_SQL_FILES="mysql/purge-4.1-optimized mysql/purge-4.1" else - DSPAM_MySQL_PURGE_SQL_FILES="mysql_purge" + DSPAM_MySQL_PURGE_SQL_FILES="mysql/purge" fi @@ -239,7 +239,7 @@ clean_pgsql_drv() { [ -n "${PgSQLServer}" -a -n "${PgSQLUser}" -a -n "${PgSQLDb}" ] then DSPAM_PgSQL_PURGE_SQL= - DSPAM_PgSQL_PURGE_SQL_FILES="pgsql_pe-purge" + DSPAM_PgSQL_PURGE_SQL_FILES="pgsql/pe-purge pgsql/purge" # # We first search for the purge scripts in the directory the user has @@ -348,6 +348,7 @@ clean_sqlite3_drv() { DSPAM_SQLite3_PURGE_SQL="" [ -f "${DSPAM_CONFIGDIR}/config/sqlite3_purge.sql" ] && DSPAM_SQLite3_PURGE_SQL="${DSPAM_CONFIGDIR}/config/sqlite3_purge.sql" [ -f "${DSPAM_CONFIGDIR}/sqlite3_purge.sql" ] && DSPAM_SQLite3_PURGE_SQL="${DSPAM_CONFIGDIR}/sqlite3_purge.sql" + [ -f "${DSPAM_PURGE_SCRIPT_DIR}/sqlite3/purge-3.sql" ] && DSPAM_SQLite3_PURGE_SQL="${DSPAM_PURGE_SCRIPT_DIR}/sqlite3/purge-3.sql" if [ -z "${DSPAM_SQLite3_PURGE_SQL}" ] then @@ -377,47 +378,6 @@ clean_sqlite3_drv() { # -# Function to clean DSPAM SQLite < 3.0 data -# -clean_sqlite_drv() { - # - # SQLite - # - [ "${VERBOSE}" = "true" ] && echo "Running SQLite v2 storage driver data cleanup" - if [ "${USE_SQL_PURGE}" = "true" ] - then - DSPAM_SQLite_PURGE_SQL="" - [ -f "${DSPAM_CONFIGDIR}/config/sqlite_purge.sql" ] && DSPAM_SQLite_PURGE_SQL="${DSPAM_CONFIGDIR}/config/sqlite_purge.sql" - [ -f "${DSPAM_CONFIGDIR}/sqlite_purge.sql" ] && DSPAM_SQLite_PURGE_SQL="${DSPAM_CONFIGDIR}/sqlite_purge.sql" - - if [ -z "${DSPAM_SQLite_PURGE_SQL}" ] - then - echo "Can not run SQLite purge script:" - echo " No sqlite_purge SQL script found" - return 1 - fi - - if [ ! -e "${SQLITE_BIN_DIR}/sqlite" ] - then - echo "Can not run SQLite purge script:" - echo " ${SQLITE_BIN_DIR}/sqlite does not exist" - return 1 - fi - - # Run the SQLite purge script and vacuum - find "${DSPAM_HOMEDIR}" -name "*.sdb" -print | while read name - do - ${SQLITE_BIN_DIR}/sqlite "${name}" < "${DSPAM_SQLite_PURGE_SQL}" >/dev/null - # Enable the next line if you don't vacuum in the purge script - # echo "vacuum;" | ${SQLITE_BIN_DIR}/sqlite "${name}" >/dev/null - done 1>/dev/null 2>&1 - return 0 - fi - -} - - -# # Use a lock file to prevent multiple runs at the same time # DSPAM_CRON_LOCKFILE="/var/run/$(basename $0 .sh).pid" diff --git a/dspam.spec b/dspam.spec index 25754e1..dd9eeb5 100644 --- a/dspam.spec +++ b/dspam.spec @@ -11,7 +11,7 @@ Summary: A library and Mail Delivery Agent for Bayesian SPAM filtering Name: dspam Version: 3.10.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz @@ -367,6 +367,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf %changelog +* Thu Jan 17 2012 Nathanael Noblet <nathanael@xxxxxxx> - 3.10.2-6 +- Attempting to fix purge bug #657357 + * Thu Nov 29 2012 Nathanael Noblet <nathanael@xxxxxxx> - 3.10.2-5 - Fix dspam-web.conf file to work with httpd 2.4 and 2.2 bug#871396 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel