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 2018/04/11 21:44:28 UTC
svn commit: r1828938 - /spamassassin/trunk/build/mkupdates/run_nightly
Author: davej
Date: Wed Apr 11 21:44:28 2018
New Revision: 1828938
URL: http://svn.apache.org/viewvc?rev=1828938&view=rev
Log:
Add check to the rules promotion to prevent duplicate rulesets 6 hours apart with the same name.
Modified:
spamassassin/trunk/build/mkupdates/run_nightly
Modified: spamassassin/trunk/build/mkupdates/run_nightly
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/mkupdates/run_nightly?rev=1828938&r1=1828937&r2=1828938&view=diff
==============================================================================
--- spamassassin/trunk/build/mkupdates/run_nightly (original)
+++ spamassassin/trunk/build/mkupdates/run_nightly Wed Apr 11 21:44:28 2018
@@ -168,27 +168,42 @@ make_tarball_for_version() {
chmod 644 $tmpdir/update.*
- mv $tmpdir/update.tgz $UPDDIR/${svnrev}.tar.gz || exit $?
- mv $tmpdir/update.tgz.sha1 $UPDDIR/${svnrev}.tar.gz.sha1 || exit $?
- mv $tmpdir/update.tgz.sha256 $UPDDIR/${svnrev}.tar.gz.sha256 || exit $?
- mv $tmpdir/update.tgz.asc $UPDDIR/${svnrev}.tar.gz.asc || exit $?
-
- # Give the mirrors time to pull the new files above
- sleep 600
-
- # next, create/update the new DNS record....
-
- # Versions >= 3.4.1 are CNAMEd to this DNS record:
- /usr/local/bin/updateDNS.sh 3.3.3.updates TXT ${svnrev}
- RC=$?
- if [[ "$RC" -ne 2 ]]; then
- # Set older version TXT records for older sa-update
- /usr/local/bin/updateDNS.sh 0.4.3.updates TXT ${svnrev}
- /usr/local/bin/updateDNS.sh 2.3.3.updates TXT ${svnrev}
- /usr/local/bin/updateDNS.sh 1.3.3.updates TXT ${svnrev}
- /usr/local/bin/updateDNS.sh 0.3.3.updates TXT ${svnrev}
- fi
+ # Integrate with masscheck ruleset updates to prevent duplicates
+ RECENT=`find $HOME/tmp/mkupdate-with-scores -name \*.tar.gz -mmin -480`
+
+ if [[ ! -z "$RECENT" ]]; then
+
+ echo "Recent ruleset from mkupdate-with-scores (massheck) NOT found."
+ echo "Proceeding with a ruleset publish..."
+ mv $tmpdir/update.tgz $UPDDIR/${svnrev}.tar.gz || exit $?
+ mv $tmpdir/update.tgz.sha1 $UPDDIR/${svnrev}.tar.gz.sha1 || exit $?
+ mv $tmpdir/update.tgz.sha256 $UPDDIR/${svnrev}.tar.gz.sha256 || exit $?
+ mv $tmpdir/update.tgz.asc $UPDDIR/${svnrev}.tar.gz.asc || exit $?
+
+ # Give the mirrors time to pull the new files above
+ sleep 600
+
+ # next, create/update the new DNS record....
+
+ # Versions >= 3.4.1 are CNAMEd to this DNS record:
+ /usr/local/bin/updateDNS.sh 3.3.3.updates TXT ${svnrev}
+ RC=$?
+ if [[ "$RC" -ne 2 ]]; then
+ # Set older version TXT records for older sa-update
+ /usr/local/bin/updateDNS.sh 0.4.3.updates TXT ${svnrev}
+ /usr/local/bin/updateDNS.sh 2.3.3.updates TXT ${svnrev}
+ /usr/local/bin/updateDNS.sh 1.3.3.updates TXT ${svnrev}
+ /usr/local/bin/updateDNS.sh 0.3.3.updates TXT ${svnrev}
+ fi
+
+ else
+
+ echo "Recent ruleset from mkupdate-with-scores (massheck) found:"
+ ls -l $RECENT
+ echo ""
+
+ fi
# clean up 4-day-old (and older) update tarballs. This seems as
# good a place as any to do this!