commit dfe0f5813431eac5a852603b3122024e8e46c3f9
Author: Nathanael D. Noblet <nathan...@gnat.ca>
Date:   Wed May 15 10:17:24 2013 -0600

    fixed bugs #657357 and #954345

 dspam-cron |   48 ++++--------------------------------------------
 dspam.spec |    7 ++++++-
 2 files changed, 10 insertions(+), 45 deletions(-)
---
diff --git a/dspam-cron b/dspam-cron
index 26e0ae3..ad92777 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/purge-pe 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 428a5ed..37aeffb 100644
--- a/dspam.spec
+++ b/dspam.spec
@@ -7,11 +7,12 @@
 %global dspam_mode      2511
 %global dspam_web_docroot %{_localstatedir}/www/dspam
 %global __perl_requires %{SOURCE99}
+%global _hardened_build 1
 
 Summary:                A library and Mail Delivery Agent for Bayesian SPAM 
filtering
 Name:                   dspam
 Version:                3.10.2
-Release:                2%{?dist}
+Release:                3%{?dist}
 License:                GPLv2
 Group:                  System Environment/Daemons
 Source0:                
http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -376,6 +377,10 @@ exit 0
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf
 
 %changelog
+* Wed May 15 2013 Nathanael Noblet <nathan...@gnat.ca> - 3.10.2-3
+- set hardened build to add PIE option since dspam can be long running bug 
#954345
+- properly fixes #657357 - PostgreSQL purge script works
+
 * Sun Oct 7 2012 Nathanael Noblet <nathan...@gnat.ca> - 3.10.2-2
 - require perl(Mail::MboxParser)
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-de...@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to