LEGACY LEGACY LEGACY... see AutoRuleUpdates instead.
The Normal way
The short version is to run this on spamassassin.zones.apache.org:
No Format |
---|
cd /export/home/jm/ftp/trunk/build/mkupdates
sudo -u updatesd ./update-rules VERSION
|
where VERSION is 3.1 or 3.2, right now. The script will do everything necessary to generate an update and make it available.
Note that both 3.1 and 3.2 build updates from a different SVN branch than the code! See SvnBranches for details.
Legacy
Obsolete doc, but here for historyThis is a quick doc I wrote up and used for 3.1 updates, it's possible to not be complete. - tvd
- make a tar file that you're happy with (#.tar.gz) make sure that you only include files! ie:
...
- update /var/named/updates.spamassassin.org.d/3.1.0 with #
- run /home/updatesd/svn/spamassassin/build/mkupdates/tick_zone_serial
As Commands
jm – this is more "concrete" and cut-and-pasteable...
on the zone, check out the relevant SVN paths:
...
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, ...
Run a lint:
No Format |
---|
cd ~/b31 perl Makefile.PL; make ./spamassassin -C ./rules-3.1 -p /nonexistent --siteconfigpath=/nonexistent --lint |
Quit here if that lint check fails.
No Format |
---|
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 #!/bin/bash if [ "$USER" != "updatesd" ]; then echo "Need to be updatesd!" >&2 exit 2 fi 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 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/$rev.tar.gz sudo rm -u updatesd cp $revf $V.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 * mv /tmp/$V.tar.gz . /local/gnupg-1.4.2/bin/gpg --batch \ --homedir /home/updatesd/key -bas $rev$V.tar.gz sudo -u updatesd /local/perl586/bin/perl \ /home/updatesd/svn/spamassassin/build/sha1sum.pl $rev$V.tar.gz \ > ~/$rev$V.tar.gz.sha1 sudochmod -u updatesd cp ~/$rev0444 $V.tar.gz.sha1 . sudo -u updatesd chmod 0444 *.tar.gz.* *.tar.gz* echo '0.1.3 A 127.0.0.1' > /var/named/updates.spamassassin.org.d/3.1.0 echo '*.1.3 TXT "'$rev$V'"' > ~/newzoneline |
Update the DNS zone file:
No Format |
---|
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 |
Notes:
And you're done.
...
- chmod'ing manual updates to 0444 is important! The script (run_part2) for automated updates will clear out any updates older than 4 days old if their perms are set to 0644.
- to avoid update number collisions (or somebody accidentally creating identical updates with different version numbers), please use the Last Changed Rev number of the rule branch directory that you are creating an update for the update version number rather than the revision number from svnversion in the code referenced above