You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2009/06/24 23:54:21 UTC

svn commit: r788192 - in /spamassassin/trunk/build: README update_devel_rules update_stable

Author: jm
Date: Wed Jun 24 21:54:20 2009
New Revision: 788192

URL: http://svn.apache.org/viewvc?rev=788192&view=rev
Log:
bug 5752: get rid of rules in the main distribution tarball; we now have a new tarball for rules, alongside the main source tarball, or sa-update can be used to dl the freshest ruleset (more likely).

Added:
    spamassassin/trunk/build/update_devel_rules   (with props)
Modified:
    spamassassin/trunk/build/README
    spamassassin/trunk/build/update_stable

Modified: spamassassin/trunk/build/README
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/README?rev=788192&r1=788191&r2=788192&view=diff
==============================================================================
--- spamassassin/trunk/build/README (original)
+++ spamassassin/trunk/build/README Wed Jun 24 21:54:20 2009
@@ -18,9 +18,11 @@
 
     PATH=$HOME/sabuildtools/perl584/bin:$HOME/sabuildtools/bin:$PATH
 
-- run "./build/update_devel" to build the tar.gz files
+- run "./build/update_devel" to build the tar.gz files.
 
-- by default, they're written to ~/site/devel/ . 
+- next run "./build/update_devel_rules" to build the rules tarball.
+
+- by default, they're written to ~/public_html/devel/ . 
   Copy them to wherever you want, yourself.
 
 
@@ -274,17 +276,17 @@
   this command will do it:
 
         version=X.Y.Z
-        cp -p ~/public_html/devel/Mail-SpamAssassin-$version.* \
+        cp -p ~/public_html/devel/Mail-SpamAssassin*-$version.* \
             ~/public_html/rc/
 
   (for full release builds) copy the tarballs to www.apache.org/dist:
 
         version=X.Y.Z
-        cp -p ~/public_html/devel/Mail-SpamAssassin-$version.* \
+        cp -p ~/public_html/devel/Mail-SpamAssassin*-$version.* \
             /www/www.apache.org/dist/spamassassin/source
 
         cd /www/www.apache.org/dist/spamassassin
-        cp -p source/Mail-SpamAssassin-$version.* .
+        cp -p source/Mail-SpamAssassin*-$version.* .
 
         chmod -R g+w /www/www.apache.org/dist/spamassassin
 
@@ -296,8 +298,8 @@
 
         cd /www/www.apache.org/dist/spamassassin
         prev=X.Y.notZ
-        rm -f source/Mail-SpamAssassin-$prev.* Mail-SpamAssassin-$prev.*
-        rm -f binaries/*/Mail-SpamAssassin-$prev.*
+        rm -f source/Mail-SpamAssassin*-$prev.* Mail-SpamAssassin*-$prev.*
+        rm -f binaries/*/Mail-SpamAssassin*-$prev.*
 
   (Archive copies are automatically kept on archive.apache.org/dist/ .)
 
@@ -311,6 +313,9 @@
   possibly more, depending on if this is the first release of a new
   release line.
 
+  TODO: for the first 3.3.0 release, we'll need to add a section allowing
+  people to download the rules tarball as well.
+
 - rebuild the SpamAssassin website with webmake:
 
         PATH=$HOME/sabuildtools/perl584/bin:$HOME/sabuildtools/bin:$PATH

Added: spamassassin/trunk/build/update_devel_rules
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/update_devel_rules?rev=788192&view=auto
==============================================================================
--- spamassassin/trunk/build/update_devel_rules (added)
+++ spamassassin/trunk/build/update_devel_rules Wed Jun 24 21:54:20 2009
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+umask 002
+
+tmpdir=`pwd`/tmp/rulesdir.$$
+rm -rf $tmpdir; mkdir -p $tmpdir         || exit $?
+
+
+PERL=${PERL:-perl}
+
+RELDIR=$HOME/public_html/devel
+mkdir -p $RELDIR
+
+DISTNAME=Mail-SpamAssassin-rules
+make version.env || exit $?
+. ./version.env
+
+# "3.1.0-pre2-r202405" should appear as "3.1.0-pre2" after this!
+VERSION=`echo $FULL_VERSION | perl -pe 's/-r\d+$//'`
+DISTVNAME=$DISTNAME-$VERSION
+
+
+# remove the rules files for rules we won't be shipping
+rm -f rules/70_*.cf
+
+# remove new features, unsupported in existing code in the field
+# (TODO: need a better way to exclude files that require new features
+# like this; judicious use of "ifplugin" helps)
+# rm rules/60_somerandomfeature.cf
+
+# and ensure the ruleset lints!
+./spamassassin --lint                    || exit $?
+
+##make install                             || exit $?
+
+rulesdir=rules
+
+(
+  cd $rulesdir
+
+  # Use this to include plugin .pm files:
+  # tar cvf - *.cf *.pm                  || exit $?
+
+  # or this, to ban code from the updates:
+  tar cvf - [0-9]*.cf                    || exit $?
+
+) | gzip -9 > $tmpdir/update.tgz         || exit $?
+
+# ensure non-empty
+[ -s $tmpdir/update.tgz ] || exit 3
+
+linttmp=$tmpdir/lintdir
+rm -rf $linttmp
+mkdir $linttmp
+(
+  cd $linttmp
+  # check validity of tarball; also extract
+  gunzip -cd < $tmpdir/update.tgz | tar xf - || exit $?
+)
+
+# now, ensure the ruleset (entirely as distributed) lints, also.
+# use "-p /dev/null" so any user_prefs data is ignored.
+./spamassassin --debug -x --configpath=$linttmp -p /dev/null --lint \
+                || exit $?
+
+# sign and get sums
+rm -f $tmpdir/update.*.asc
+if [ -d $HOME/sabuildtools/sasigningkey ]; then
+  $HOME/sabuildtools/bin/gpg --homedir $HOME/sabuildtools/sasigningkey \
+        -bsa $tmpdir/update.tgz                  || exit $?
+fi
+
+$PERL build/md5sum.pl $tmpdir/update.tgz > $tmpdir/update.tgz.md5    || exit $?
+$PERL build/sha1sum.pl $tmpdir/update.tgz > $tmpdir/update.tgz.sha1  || exit $?
+
+for ext in tgz tgz.md5 tgz.sha1 tgz.asc ; do
+  rm -f $RELDIR/$DISTVNAME.$ext
+  if [ -f $tmpdir/update.$ext ] ; then
+    mv $tmpdir/update.$ext $RELDIR/$DISTVNAME.$ext
+    ls -l $RELDIR/$DISTVNAME.$ext
+  fi
+done
+
+rm -rf $tmpdir

Propchange: spamassassin/trunk/build/update_devel_rules
------------------------------------------------------------------------------
    svn:executable = *

Modified: spamassassin/trunk/build/update_stable
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/update_stable?rev=788192&r1=788191&r2=788192&view=diff
==============================================================================
--- spamassassin/trunk/build/update_stable (original)
+++ spamassassin/trunk/build/update_stable Wed Jun 24 21:54:20 2009
@@ -9,6 +9,8 @@
 rm -rf $WEBDIR/doc
 tar cf - --exclude=CVS --exclude='.#*' doc | ( cd $WEBDIR ; tar xf - )
 
+. build/update_devel_rules
+
 set +x
 echo