Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: converted to 1.6 markup

The short version is to get a copy of the update-rules script from trunk/build/mkupdates, then from the zones machine:

No Format
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.



Obsolete doc, but here for history

  • make a tar file that you're happy with (#.tar.gz) make sure that you only include files! ie:
No Format
tar cf #.tar *

and not

No Format
tar cf #.tar .
  • if you want, double check files-only with:
No Format
tar tvvf #.tar
  • compress the tar file with
    No Format
     gzip -9 
  • log into the zones machine
  • No Format
     sudo -u updatesd -s 
  • copy the tar file into /var/www/buildbot.spamassassin.org/updatestage
  • generate the sha1 and gpg files appropriately:
No Format
/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
  • make sure the file permissions for #.tar.gz.* are set to 0444:
No Format
chmod 0444 #.tar.gz.*
  • update /var/named/updates.spamassassin.org.d/3.1.0 with #
  • run /home/updatesd/svn/spamassassin/build/mkupdates/tick_zone_serial

As Commands

tvd – here's the script I run as updatesd on the zones machine that does all of this stuff for you. (smile) 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
#!/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
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

Notes:

  • 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