OpenMacNews wrote:
after a clean install of SA 317, my DATADIR ((...)/SA/Dist/)
contains:

What's this "DATADIR"?  Are you referring to what would normally be
something like /var/lib/spamassassin/ ?

DATADIR is what i've specified as my DATADIR @ build time.

Mmm... it's not too often that people report problems that have changed the defaults.


from (distro)/3.1/README:

"File Locations:

SpamAssassin will look in a number of areas to find the default
configuration files that are used.  The "__*__" text are variables
whose value you can see by looking at the first several lines of the
"spamassassin" or "spamd" scripts.

They are set on install time and can be overridden with the Makefile.PL
command line options DATADIR (for __def_rules_dir__) and CONFDIR (for
__local_rules_dir__).  If none of these options were given, FHS-compliant
locations based on the PREFIX (which becomes __prefix__) are chosen.
These are:

 __prefix__    __def_rules_dir__              __local_rules_dir__

-------------------------------------------------------------------------
 /usr          /usr/share/spamassassin        /etc/mail/spamassassin
 /usr/local    /usr/local/share/spamassassin  /etc/mail/spamassassin
 /opt/$DIR     /opt/$DIR/share/spamassassin /etc/opt/mail/spamassassin
 $DIR          $DIR/share/spamassassin $DIR/etc/mail/spamassassin
"

Well, the local state dir option doesn't seem to be documented (which is probably a valid bug), but I believe you could set it with LOCALSTATEDIR.


unknown reason,

The reason is that that's my understanding of the documentation.

I'm not entirely sure which documentation you are referring to. The sa-update documentation doesn't seem to suggest that the default
--updatedir is the same as the default DATADIR.

The how-to for the SARE channels doesn't mention anything about using --updatedir in the example sa-update command either.


til now, with "just" sa-update of updates.spamassain.org, i've been using:

    sa-update \
    --channel updates.spamassassin.org \
    --updatedir /var/SA/Dist

i.e., defining --updatedir=$DATADIR, and all's been working fine.

I'm not sure why it worked for you before. You're now seeing the "official" rules being loaded twice too, not just the ones from the SARE channels.


It may well be incorrect.

It may obvious to all others.

Not to me.

Hence, I'm asking a question.

you're using an --updatedir that
already has a bunch of rules in it you've now got two copies of the
rulesets in the same directory that you are trying load.  Not good.

ok.

Either don't try to override the --updatedir, or make sure that
whatever your "DATADIR" is (what should be something like
/usr/share/spamassassin maybe?) isn't the same as your --updatedir
(which would normally be /var/lib/spamassassin).
...
No, not at all.  There should be no "plain" ruleset files in the
directory that contains all of the channel directories and .cf files.

ok.

given my build config of:

    perl Makefile.PL \
    PREFIX=/usr/local/spamassassin \
    DATADIR=/var/SA/Dist \
    CONFDIR=/var/SA/Local \
    ENABLE_SSL="yes" \
    LDDLFLAGS="-L/usr/local/ssl/lib -lssl -lcrypto" \
    LDFLAGS="-bind_at_load -L/usr/local/ssl/lib -lssl -lcrypto
    -ldl" \
    INC="-I/usr/local/ssl/include"

DATADIR isn't really variable... it should only contain the rules that ship with the tarball, and never be updated. I'd stick with the default, which follows FHS, of /usr/share/spamassassin or even use /usr/local/share/spamassassin.


and that i invoke sa-update with:

    sa-update \
    --channelfile /var/SA/sa-update-channels.txt \
    --updatedir /var/SA/Dist \
    --gpgkey 856AA88A

can you please specifically clarify/suggest, should I:

 (a) *not* define --updatedir

That'll work.  I'd do that.

 (b) define --updatedir=$DATADIR

That's what you're doing now, and won't work.

 (c) define --updatedir=$CONFDIR

That'd probably work, but isn't a good idea.

 (d) define --updatedir=$somewhereelse

That'll work too (as long as $somewhereelse != $DATADIR), but unless you have a problem with the default of /var/lib/spamassassin, I don't see a reason to change it.


in other words, where _should_ the updates now go?

Well, according to FHS, they should go somewhere in /var. DATADIR should be somewhere in /usr and CONFDIR somewhere in /etc, just like the defaults.


Daryl

Reply via email to