On Wed, Dec 12, 2012 at 10:45:59AM -0800, John Hardin wrote: > If it still misbehaves, I'd suggest a manual "svn up ; make" just to > see if the masscheck scripting isn't updating the code properly for > some reason, which would be a different problem.
masscheck scripting does not use subversion (directly); in fact, issuing "svn update" from the masscheck work directory does nothing since the subversion directories are not present. Instead, auto-mass-check.sh uses rsync to download a tagged version. Also, I believe make is superfluous for masscheck users as the only thing it builds is the perceptron, which is not called from auto-mass-check.sh. Attached are a diff and a modified version of auto-mass-check.sh to add two new command line options "--svn-weekly" and "--svn-nightly" to check out or update to svn head and execute from there. To minimize unexpected side effects, it does not upload results when run with one of these options. (It also includes an enhancement to enable the HitFreqsRuleTiming plugin if a variable FREQSTIMING is set to a nonzero string in .auto-mass-check.cf.) Hope this helps. Regards Marc
--- auto-mass-check.sh.orig 2012-08-17 13:28:06.000000000 +0200
+++ auto-mass-check.sh 2012-12-13 07:47:48.000000000 +0100
@@ -33,6 +33,24 @@
if [ -n "${INTERNAL_NETWORKS}" ]; then
echo "internal_networks ${INTERNAL_NETWORKS}" >> spamassassin/user_prefs
fi
+ if [ -n "${FREQSTIMING}" ]; then
+ echo "loadplugin HitFreqsRuleTiming $WORKDIR/$TYPE/masses/plugins/HitFreqsRuleTiming.pm" >> spamassassin/local.cf
+ fi
+}
+
+svn_checkout() {
+ if [ -d $WORKDIR/$TYPE ]; then
+ echo "Running svn update"
+ cd $WORKDIR/$TYPE
+ svn update
+ retval=$?
+ else
+ echo "Creating subversion directory"
+ cd $WORKDIR
+ svn checkout http://svn.apache.org/repos/asf/spamassassin/trunk spamassassin-trunk
+ retval=$?
+ fi
+ return $retval
}
setup_checktype() {
@@ -78,6 +96,24 @@
JOBS=1
LOGTYPE=
RSYNCMOD=corpus
+ elif [ "$1" == "--svn-weekly" ]; then
+ # Run weekly_mass_check from subversion, but don't upload results
+ TYPE=spamassassin-trunk
+ svn_checkout
+ retval=$?
+ JOBS=4
+ NET=--net
+ LOGTYPE=net-
+ RSYNCMOD=
+ elif [ "$1" == "--svn-nightly" ]; then
+ # Run nightly_mass_check from subversion, but don't upload results
+ TYPE=spamassassin-trunk
+ svn_checkout
+ retval=$?
+ JOBS=1
+ NET=
+ LOGTYPE=
+ RSYNCMOD=
elif date -u |grep -q ^Sat; then
# If Saturday, run the weekly_mass_check
TYPE=weekly_mass_check
@@ -99,7 +135,7 @@
RSYNCMOD=corpus
fi
if [ $retval -ne 0 ]; then
- echo "ERROR: rsync failed in some way, aborting..."
+ echo "ERROR: rsync/svn failed in some way, aborting..."
exit 1
fi
}
auto-mass-check.sh
Description: Bourne shell script
