identifying bogofilter versions

David Relson relson at osagesoftware.com
Fri Oct 18 23:01:11 CEST 2002


Matthias,

At present, we have some trouble identifying which version of bogofilter a 
problem has been encountered in.  For example, last Sunday I was helping a 
fellow in Detroit who said he had version 0.7.4.  So part of the email was 
about the changed switches (from -h and -H to -n and -N) and the new 
switches (-h, -l, -u, and -e) and how they would work with procmail.  Part 
of his reply was that his bogofilter did understand -n and -N (indicating 
it was cvs) but did not understand -u and -e (indicating it was not 
cvs).  Ultimately he mentionned running debian and I remembered the cvs 
snapshot built for debian.

I'm not saying that cvs snapshots are bad.  However, we need a way to know 
when one is being used.  It would also be good to know the date of the 
snapshot.

I have a solution to the problem.

Part 1 is that in the development (cvs) branch of the repository, the 
version string in configure.in will end with ".cvs".  The release branch 
won't have the ".cvs" suffix.  When we create a release, the version string 
will be updated to the new revision for both the release branch and the 
development branch.

Part 2 is done by make.  When make is run, a new file (version.h) is 
generated by script version.sh (also new).  For a release branch, version.h 
contains the VERSION from config.h.  For a cvs branch, the script looks at 
the $Id:$ info at the beginning of files main.c and bogofilter.c, takes the 
newer date, and reformats it as 4 digits (MMDD).  This is appended to 
VERSION from config.h.

With this mechanism, a cvs built version of bogofilter will have a version 
like "0.7.5.cvs.1018".  When problems are reported with bogofilter, this 
mechanism will enable us to easily tell if it's a released version of 
bogofilter or if it's a version built from a cvs snapshot.

So, a release version will put out a tag line like:

	X-Bogosity: Yes, tests=bogofilter, spamicity=0.999999, version=0.7.5

and a cvs version will have:

	X-Bogosity: Yes, tests=bogofilter, spamicity=0.999999, version=0.7.5.cvs.1017

Currently bogoutil has a different version from bogofilter.  They can be 
made the same, or this mechanism can also do its magic for bogoutil.

Any comments?

David

--------------------------------------------------------
David Relson                   Osage Software Systems, Inc.
relson at osagesoftware.com       Ann Arbor, MI 48103
www.osagesoftware.com          tel:  734.821.8800



More information about the bogofilter-dev mailing list