joshkel at gmail.com
Thu Apr 27 17:08:25 EDT 2006
On 4/24/06, David F. Skoll <dfs at roaringpenguin.com> wrote:
> Jonas Eckerman wrote:
> > + my $LOCAL_STATE_DIR = '/var/lib';
> That works for FreeBSD, but look at Mail-SpamAssassin's Makefile.PL.
> It contains a subroutine "_set_macro_LOCALSTATEDIR" that supposedly
> sets the default for LOCAL_STATE_DIR. If anyone doesn't think
> SpamAssassin is an evil piece of code, _set_macro_LOCALSTATEDIR should
> remove all remaining doubts.
> If/when I find a general-purpose way to detect what the *@#&$&#$
> LOCAL_STATE_DIR should be set to for a given SpamAssassin installation,
> I will patch MIMEDefang to use it. If I can't figure it out, I'll
> just use /var/lib.
sa-update knows what LOCAL_STATE_DIR is, and sa-update is simply Perl
code, so how about just taking its setting of LOCAL_STATE_DIR and
my $setlocalstatedir = `grep '^my \$LOCAL_STATE_DIR' /usr/bin/sa-update`;
$setlocalstatedir =~ s/^my //; # Remove leading "my" so that
$LOCAL_STATE_DIR isn't scoped locally to eval block
Or is that too much of a hack?
More information about the MIMEDefang