http://bugzilla.spamassassin.org/show_bug.cgi?id=4153
------- Additional Comments From [EMAIL PROTECTED] 2005-05-19 02:12 -------
Subject: Re: [review] RFE : Spamc patch for config file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> 'No, a define that specifies if it should go off and try to find the
> config file. That gives the local admin the power to do what you want
> without penalizing the folks that have no need.'
>
> ok, I can go for that.
>
> combine that with a fix for Makefile.PL and configure to ensure that
> sysconfdir is actually set during build, so that in almost all cases it
> will just attempt to open one file
> (${sysconfdir}/mail/spamassassin/spamc.conf), and I think we'd
> be good here. Michael?
>
Justin, Makefile.PL _always_ sets sysconfdir, but if spamc is built on
its own (ie. cd $srcdir/spamc; perl configure.pl && make) _then_
sysconfdir isn't set.
I also realised something last night -- I didn't do any work on making
it compile under Windows, so spamc.h.in never gets parsed into spamc.h,
which obviously means the vars aren't #define'd and spamc won't compile.
Basically, the extra code to search for spamc.conf was put in to cover
the outside case where spamc is built separate to spamd. So, what I'd
suggest is a prompt within configure.pl to run _only_ if configure.pl is
being run directly (and not being called via Makefile.PL). This prompt
asks where spamc.conf is located, with a default set of
$sysconfdir/mail/SA/spamc.conf (in much the same way as Makefile.PL
prompts for the email address to use), which can then be #define'd in
spamc.h.
I've just done some poking, and it's possible, using a preprocessor
macro, to define CONFIG_FILE to @sysconfdir@/mail/spamassassin/spamc.conf
_only_if_ the first character of @sysconfdir@ isn't '$', otherwise use
@prefix@/etc/spamc.conf. This can all be done before compilation, and so
will remove the need to check each time spamc is run. The major problem
would be if --sysconfdir isn't passed to configure, spamc (by default) is
installed in /usr/local; there's no easy way to check that so that the
default sysconfdirs can be used (ie. /etc/mail/spamassassin for /usr/*,
/etc/opt for /opt/* etc.).
So, do any of the above fit the bill? Either way, if this code is to
remain, the compilation for Windows has to be sorted out.
- --
Chat ya later,
John.
- --
BOFH excuse #158: Defunct processes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCjFoxQBw+ZtKOvTIRAlrBAKCHi/kukhQeME4ZeoSVxd1UUcVEHQCeMfCk
/6jfGIjh2MkZ/9AZLYG/D/s=
=msii
-----END PGP SIGNATURE-----
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.