You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by Apache Wiki <wi...@apache.org> on 2007/01/29 23:53:03 UTC

[Spamassassin Wiki] Update of "ManualRuleUpdates" by TheoVanDinter

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by TheoVanDinter:
http://wiki.apache.org/spamassassin/ManualRuleUpdates

------------------------------------------------------------------------------
  
  == As Commands ==
  
+ tvd -- here's the script I run as updatesd on the zones machine that does all of this stuff for you. :)   Note: I lint check before running this script, ...
- jm -- this is more "concrete" and cut-and-pasteable...
- 
- on the zone, check out the relevant SVN paths:
- 
- {{{
- svn co http://svn.apache.org/repos/asf/spamassassin/branches/3.1 ~/b31
- cd ~/b31
- svn co https://svn.apache.org/repos/asf/spamassassin/rules/branches/3.1 rules-3.1
- }}}
  
  Run a lint:
  
@@ -65, +57 @@

  Quit here if that lint check fails.
  
  {{{
- cd ~/b31/rules-3.1
+ #!/bin/bash
  
- tagver=3.1.x
- tagstamp=`perl -e 'use POSIX qw(strftime); print strftime "%Y%m%d%H%M%S", localtime time;'`
- tagurl=https://svn.apache.org/repos/asf/spamassassin/tags/sa-update_${tagver}_${tagstamp}
+ if [ "$USER" != "updatesd" ]; then
+   echo "Need to be updatesd!" >&2
+   exit 2
+ fi
  
- svn up
- svn copy -m 'promotions validated' . $tagurl < /dev/null
+ DIR=/tmp/upd-$$
+ rm -rf $DIR || exit 1
  
+ svn -q co http://svn.apache.org/repos/asf/spamassassin/rules/branches/3.1 $DIR || exit 1
- rm -rf tmpcheckout
- svn co $tagurl tmpcheckout && svn info tmpcheckout > svnrev
- rm -rf tmpcheckout
  
- rev=`perl -ne '/Revision: (\d+)/ and print $1' < svnrev`
- echo $rev
+ V=`svnversion $DIR`
+ cd $DIR
+ tar cf /tmp/$V.tar *
+ cd /tmp
+ rm -rf $DIR
+ gzip -9 $V.tar
+ cd /var/www/buildbot.spamassassin.org/updatestage
+ rm -f $V.tar.gz*
+ mv /tmp/$V.tar.gz .
+ /local/gnupg-1.4.2/bin/gpg --batch --homedir /home/updatesd/key -bas $V.tar.gz
+ /local/perl586/bin/perl /home/updatesd/svn/spamassassin/build/sha1sum.pl $V.tar.gz > $V.tar.gz.sha1
+ chmod 0444 $V.tar.*
  
+ echo '0.1.3 A 127.0.0.1' > /var/named/updates.spamassassin.org.d/3.1.0
+ echo '*.1.3 TXT "'$V'"' >> /var/named/updates.spamassassin.org.d/3.1.0
+ 
+ /home/updatesd/svn/spamassassin/build/mkupdates/tick_zone_serial
- tar cf $rev.tar *.{cf,pre}
- tar tvf $rev.tar
- rm $rev.tar.gz; gzip -9 $rev.tar
- sudo -u updatesd rm -f /var/www/buildbot.spamassassin.org/updatestage/$rev.tar.gz
- sudo -u updatesd cp $rev.tar.gz /var/www/buildbot.spamassassin.org/updatestage/
- cd /var/www/buildbot.spamassassin.org/updatestage/
- sudo -u updatesd rm -f $rev.tar.gz.sha1 $rev.tar.gz.asc
- sudo -u updatesd /local/gnupg-1.4.2/bin/gpg --batch \
-     --homedir /home/updatesd/key -bas $rev.tar.gz
- sudo -u updatesd /local/perl586/bin/perl \
-     /home/updatesd/svn/spamassassin/build/sha1sum.pl $rev.tar.gz \
-     > ~/$rev.tar.gz.sha1
- sudo -u updatesd cp ~/$rev.tar.gz.sha1 .
- sudo -u updatesd chmod 0444 *.tar.gz.* *.tar.gz
- echo '*.1.3 TXT "'$rev'"' > ~/newzoneline
  }}}
  
- Update the DNS zone file:
- 
- {{{
- sudo vi /var/named/updates.spamassassin.org.d/3.1.0
- :r ~/newzoneline
- [and replace the existing line with that]
- :wq
- 
- sudo -u updatesd /home/updatesd/svn/spamassassin/build/mkupdates/tick_zone_serial
- }}}
- 
- And you're done.
- 
- TODO: this should probably be a standalone script like the 3.2.0
- updates.
-