Bug 25 - installing spamassassin outside of the main perl library
Summary: installing spamassassin outside of the main perl library
Status: RESOLVED DUPLICATE of bug 80
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 2.0
Hardware: All All
: P4 minor
Target Milestone: ---
Assignee: Craig Hughes
URL:
Whiteboard:
Keywords:
: 41 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-02-03 14:17 UTC by jalex
Modified: 2002-04-01 02:06 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description jalex 2002-02-03 14:17:26 UTC
I've installed spamassassin in my home directory essentially just like
described in the archived mailing list message here:

  http://www.geocrawler.com/archives/3/11679/2001/12/0/7425099/

This, unfortunately, does not work without some modification. Although
everything installs where I want it, spamassassin can't find its own configuration files since the various rules and prefs paths set in
SpamAssassin.pm are completely hardcoded: they ignore the setting of
PREFIX. Simply adding these:

 - $PREFIX/share/spamassassin to @default_rules_path
 - $PREFIX/etc/mail/spamassassin to @site_rules_path
 - $PREFIX/share/spamassassin/user_prefs.template to @default_prefs_path

... looks like it will allow spamassassin to find its files in the places that a 'make install' puts them if the user customizes PREFIX as I have done.
Comment 1 Craig Hughes 2002-02-04 00:43:19 UTC
Hmm.  Is $PREFIX defined properly at runtime?  Can I just add these directories
in SpamAssassin.pm inside the qw() definitions?
Comment 2 jalex 2002-02-04 07:01:06 UTC
No. $PREFIX is not an environment variable - it's a Makefile variable. It's
value needs to be substituted into SpamAssassin.pm during the 'make'.

Check out your Makefile.PL file - it defines this:

 my $DEF_RULES_DIR       = '$(PREFIX)/share/spamassassin';

... which indeed puts the default rules files under $PREFIX. But SpamAssassin doesn't actually _look_ for them there. I actually
also changed the next line to look like this:

  my $LOCAL_RULES_DIR     = '$(PREFIX)/etc/mail/spamassassin';

... since I can't have any of this stuff installed outside my home
directory.

Really, I think all of the paths in SpamAssassin.pm ought to be configured
at build time, under control of the Makefile, rather then just having a
list of places where the config files _might_ be hardcoded into the module.
Or, at the very least, you should add directions to the build instructions in the README that lib/Mail/SpamAssassin.pm will need to have these path variables edited if you wish to have your config files installed somewhere outside of the default paths.
Comment 3 Craig Hughes 2002-02-18 19:47:57 UTC
*** Bug 41 has been marked as a duplicate of this bug. ***
Comment 4 Craig Hughes 2002-02-24 03:07:03 UTC
Downgraded priority since README has been updated to mention the '-c' flag for local installations.
Comment 5 Craig Hughes 2002-04-01 11:06:34 UTC

*** This bug has been marked as a duplicate of 80 ***