You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by da...@apache.org on 2017/06/02 02:48:28 UTC
svn commit: r1797310 - in /spamassassin/trunk:
build/mkupdates/do-stable-update-with-scores
build/mkupdates/mkupdate-with-scores
masses/rule-update-score-gen/generate-new-scores.sh
Author: davej
Date: Fri Jun 2 02:48:28 2017
New Revision: 1797310
URL: http://svn.apache.org/viewvc?rev=1797310&view=rev
Log:
Fixed minor pathing issues for new tmp dir location.
Modified:
spamassassin/trunk/build/mkupdates/do-stable-update-with-scores
spamassassin/trunk/build/mkupdates/mkupdate-with-scores
spamassassin/trunk/masses/rule-update-score-gen/generate-new-scores.sh
Modified: spamassassin/trunk/build/mkupdates/do-stable-update-with-scores
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkupdates/do-stable-update-with-scores?rev=1797310&r1=1797309&r2=1797310&view=diff
==============================================================================
--- spamassassin/trunk/build/mkupdates/do-stable-update-with-scores (original)
+++ spamassassin/trunk/build/mkupdates/do-stable-update-with-scores Fri Jun 2 02:48:28 2017
@@ -22,7 +22,7 @@ if [ $RV -ne 0 ] ; then
else
echo "Running mkupdate-with-scores..."
echo ""
- /usr/local/spamassassin/automc/svn/trunk/build/mkupdates/mkupdate-with-scores $1
+ /usr/local/spamassassin/automc/svn/trunk/build/mkupdates/mkupdate-with-scores
RV=$?
if [ $RV -ne 0 ] ; then
echo "Exit Status $RV is not zero for mkupdate-with-scores"
Modified: spamassassin/trunk/build/mkupdates/mkupdate-with-scores
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkupdates/mkupdate-with-scores?rev=1797310&r1=1797309&r2=1797310&view=diff
==============================================================================
--- spamassassin/trunk/build/mkupdates/mkupdate-with-scores (original)
+++ spamassassin/trunk/build/mkupdates/mkupdate-with-scores Fri Jun 2 02:48:28 2017
@@ -39,11 +39,18 @@ set -x
umask 022
-UPDATEDIR=/var/www/automc.spamassassin.org/updates
-KEYDIR=/usr/local/spamassassin/automc/key
+PROGDIR=`dirname $0`
+[[ "$PROGDIR" = "." ]] && PROGDIR=`pwd`
+PROGNAME=`basename $0 .sh`
+HOST=`hostname -f`
+
+TMPDIR="/usr/local/spamassassin/automc/tmp/${PROGNAME}"
+UPDATEDIR="/var/www/automc.spamassassin.org/updates"
+KEYDIR="/usr/local/spamassassin/automc/key"
UPDATE_BUILD_DIR=0
REVERT_REVISION=0
+
# if $1 is present redirect output files to a test directory structure
if [ ${#1} -gt 1 ]; then
UPDATEDIR=$1$UPDATEDIR
@@ -153,8 +160,7 @@ make_rule_update_from_trunk() {
# remove files we don't want to ship in updates
# remember that 3KB == 1GB of traffic on the mirrors as of Jan 1, 2010
set +e
- rm 70_sandbox.cf 70_inactive.cf
- rm STATISTICS-set?.txt
+ rm -f 70_sandbox.cf 70_inactive.cf STATISTICS-set?.txt
set -e
mkdir -p $TMPDIR/trunk/etc/mail/spamassassin
@@ -168,6 +174,8 @@ make_rule_update_from_trunk() {
shasum $TMPDIR/${REVISION}.tar.gz > $TMPDIR/${REVISION}.tar.gz.sha1
gpg --batch --homedir $KEYDIR -bas $TMPDIR/${REVISION}.tar.gz || exit $?
+
+ tar -ztvf $TMPDIR/${REVISION}.tar.gz
}
copy_existing_update_for_reversion_testing() {
@@ -227,7 +235,6 @@ disable_auto_update_publishing_and_get_n
echo "New update version/revision will be $REVISION"
}
-TMPDIR="/tmp/sa-mkupdate-$$"
rm -rf $TMPDIR
mkdir $TMPDIR
cd $TMPDIR
@@ -257,24 +264,27 @@ else
fi
# test to make sure it works with sa-update --install
-UPDATED_VERSIONS=0
+TESTED_VERSIONS=""
MAJOR_VERS=3
for (( MINOR_VERS=4; 1; MINOR_VERS++ )); do
for (( UPDATE_VERS=1; 1; UPDATE_VERS++ )); do
- set +e
svn info https://svn.apache.org/repos/asf/spamassassin/tags/spamassassin_release_${MAJOR_VERS}_${MINOR_VERS}_${UPDATE_VERS} || break
- set -e
- test_version ${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} tags/spamassassin_release_${MAJOR_VERS}_${MINOR_VERS}_${UPDATE_VERS} && ((UPDATED_VERSIONS++))
+ test_version ${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} tags/spamassassin_release_${MAJOR_VERS}_${MINOR_VERS}_${UPDATE_VERS} &&
+ TESTED_VERSIONS="$TESTED_VERSIONS ${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS}"
done
# we just assume that the next stable version is the branch's current version
- test_version ${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} branches/${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} && ((UPDATED_VERSIONS++))
+ set +e
+ svn info https://svn.apache.org/repos/asf/spamassassin/branches_${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} || break
+ test_version ${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} branches/${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS} &&
+ TESTED_VERSIONS="$TESTED_VERSIONS ${MAJOR_VERS}.${MINOR_VERS}.${UPDATE_VERS}"
+ set -e
done
-echo "VERSIONS UPDATE PASSED ON: $UPDATED_VERSIONS"
+echo "VERSIONS UPDATE PASSED ON: $TESTED_VERSIONS"
# publish update
-if [ $UPDATED_VERSIONS -gt 0 ]; then
+if [[ ! -z "$TESTED_VERSIONS" ]]; then
(
copy_update_paranoid "$TMPDIR/$REVISION.tar.gz" "$UPDATEDIR/$REVISION.tar.gz" &&
copy_update_paranoid "$TMPDIR/$REVISION.tar.gz.asc" "$UPDATEDIR/$REVISION.tar.gz.asc" &&
@@ -285,14 +295,11 @@ if [ $UPDATED_VERSIONS -gt 0 ]; then
if [ $AUTOUPDATESDISABLED -eq 1 -a $REVERT_REVISION -eq 0 ]; then
echo "DNS updating disabled (auto update publishing disabled), skipping DNS reload"
else
- # Current supported versions of SpamAssassin are CNAMEd to 3.3.3
+ # Current supported versions of SpamAssassin are CNAME'd to 3.3.3
/usr/local/bin/updateDNS.sh 3.3.3.updates TXT $REVISION
- # sa-update for these older versions doesn't support CNAMEing
+ # sa-update for these older versions doesn't support CNAME'ing
/usr/local/bin/updateDNS.sh 2.3.3.updates TXT $REVISION
/usr/local/bin/updateDNS.sh 1.3.3.updates TXT $REVISION
/usr/local/bin/updateDNS.sh 0.3.3.updates TXT $REVISION
fi
fi
-
-cd
-rm -rf $TMPDIR
Modified: spamassassin/trunk/masses/rule-update-score-gen/generate-new-scores.sh
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-update-score-gen/generate-new-scores.sh?rev=1797310&r1=1797309&r2=1797310&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-update-score-gen/generate-new-scores.sh (original)
+++ spamassassin/trunk/masses/rule-update-score-gen/generate-new-scores.sh Fri Jun 2 02:48:28 2017
@@ -33,7 +33,7 @@ TMP="/tmp/$PROGNAME/$DOW"
SCORESET=$1
OPTION=$2
-CORPUS_SRC_DIR="/usr/local/spamassassin/rsync/corpus"
+CORPUS_SRC_DIR="/usr/local/spamassassin/automc/rsync/corpus"
MINHAMCONTRIBS=10
MINSPAMCONTRIBS=10
@@ -43,11 +43,9 @@ HAMHISTORY=84
SPAMHISTORY=2
if [[ "$OPTION" = "force" ]]; then
- MINHAMCONTRIBS=1
- MINSPAMCONTRIBS=1
- MINHAMCOUNT=1500
- MINSPAMCOUNT=1500
- HAMHISTORY=84
+ MINHAMCONTRIBS=8
+ MINSPAMCONTRIBS=8
+ HAMHISTORY=96
SPAMHISTORY=24
fi