This is a quick doc I wrote up and used for 3.1 updates, it's possible to not be complete. - tvd


tar cf #.tar *

and not

tar cf #.tar .
tar tvvf #.tar
/local/gnupg-1.4.2/bin/gpg --batch --homedir /home/updatesd/key -bas #.tar.gz
/local/perl586/bin/perl /home/updatesd/svn/spamassassin/build/sha1sum.pl #.tar.gz > #.tar.gz.sha1
chmod 0444 #.tar.gz.*

As Commands

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:

cd ~/b31
perl Makefile.PL; make
./spamassassin -C ./rules-3.1 -p /nonexistent --siteconfigpath=/nonexistent --lint

Quit here if that lint check fails.

cd ~/b31/rules-3.1

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}

svn up
svn copy -m 'promotions validated' . $tagurl < /dev/null

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

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.