Bug 108934 - mail/p5-Mail-SpamAssassin: spamassassin uses /var/lib/spamassassin directory but /var/lib doesn't exist on FreeBSD
Summary: mail/p5-Mail-SpamAssassin: spamassassin uses /var/lib/spamassassin directory ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Cheng-Lung Sung
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-08 15:50 UTC by Matus UHLAR - fantomas
Modified: 2007-06-02 08:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matus UHLAR - fantomas 2007-02-08 15:50:22 UTC
spamassassin is by default built without specifying LOCALSTATEDIR, which
results into using /var/lib/spamassassin for its updates. However, the
/var/lib does not exists on FreeBSD, so alternate dir should probably be used.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-02-08 20:24:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

Over to maintainer
Comment 2 Michael Scheidell 2007-03-14 12:32:25 UTC
I have tested SpamAssassin on 4.11, 5.3,5.4 and 5.5,   installs, 
reinstalls and portsupgrade.

I don't have a /var/lib directory and SpamAssassin works fine.

Please explain when, where, and what fails with your spamassassin port.

If it is difficult to duplicate, please include exact steps, step by 
step needed to duplicate the error.



-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation
----------------------------------------------------------------- 
This email has been scanned and certified safe by SpammerTrap(tm) 
For Information please see http://www.spammertrap.com 
-----------------------------------------------------------------
Comment 3 Matus UHLAR - fantomas 2007-03-14 12:46:45 UTC
On 14.03.07 08:32, Michael Scheidell wrote:
> I have tested SpamAssassin on 4.11, 5.3,5.4 and 5.5,   installs, 
> reinstalls and portsupgrade.
> 
> I don't have a /var/lib directory and SpamAssassin works fine.
> 
> Please explain when, where, and what fails with your spamassassin port.
> 
> If it is difficult to duplicate, please include exact steps, step by 
> step needed to duplicate the error.

run sa-update. It will create
/var/lib/spamassassin/<version>/updates_spamassassin_org/ directory, where
it puts updated rules, if it founds them. spamassassin and spamd later check
these rules instead of those in /usr/local/share/spamassassin/50_scores.cf

You may need older installation of spamassassin to verify this, I'm not sure
that 3.1.8 has some updates, but I was able to update rules for 3.1.7 at
least twice.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Quantum mechanics: The dreams stuff is made of.
Comment 4 Michael Scheidell 2007-03-14 12:53:38 UTC
Matus UHLAR - fantomas wrote:
> run sa-update. It will create
> /var/lib/spamassassin/<version>/updates_spamassassin_org/ directory, where
> it puts updated rules, if it founds them. spamassassin and spamd later check
> these rules instead of those in /usr/local/share/spamassassin/50_scores.cf
>
> You may need older installation of spamassassin to verify this, I'm not sure
> that 3.1.8 has some updates, but I was able to update rules for 3.1.7 at
> least twice.
>
>   
I think some of this was discussed on SpamAssassin list.
If you actually let sa-update put the files in /var/lib/spamassassin, it 
REPLACES original files.

I think the suggestion was to run sa-update like this:

 sa-update --updatedir /usr/local/share/spamassassin

my suggestion to patch sa-update to do that was not met with enthusiasm.

try the above, things should work better, and I will look at patching 
sa-update for the ports only.


----------------------------------------------------------------- 
This email has been scanned and certified safe by SpammerTrap(tm) 
For Information please see http://www.spammertrap.com 
-----------------------------------------------------------------
Comment 5 Matus UHLAR - fantomas 2007-03-18 15:06:03 UTC
> Matus UHLAR - fantomas wrote:
> >run sa-update. It will create
> >/var/lib/spamassassin/<version>/updates_spamassassin_org/ directory, where
> >it puts updated rules, if it founds them. spamassassin and spamd later 
> >check
> >these rules instead of those in /usr/local/share/spamassassin/50_scores.cf
> >
> >You may need older installation of spamassassin to verify this, I'm not 
> >sure
> >that 3.1.8 has some updates, but I was able to update rules for 3.1.7 at
> >least twice.

On 14.03.07 08:53, Michael Scheidell wrote:
> I think some of this was discussed on SpamAssassin list.
> If you actually let sa-update put the files in /var/lib/spamassassin, it 
> REPLACES original files.

original files are in /usr/local/etc/mail/spamassassin/, but if there are any
updates in $LOCALSTATEDIR/..., spamassassin and spamd ignore those from
installation.

> I think the suggestion was to run sa-update like this:
> 
> sa-update --updatedir /usr/local/share/spamassassin

that is possible, but I prefer to keep files installed with spamassassin
available. It's good to use updates directory in /var, but
/var/lib/spamassassin/ seems not to be the best idea for FreeBSD...

> my suggestion to patch sa-update to do that was not met with enthusiasm.
> 
> try the above, things should work better, and I will look at patching 
> sa-update for the ports only.

actually, I don't mind have /var/lib/spamassassin on my filesystem, I just
think that's not good idea because of FreeBSD's different directory layout.
for ports, you could just specify localstatedir when configuring
SpamAssassin. However as I said, I would prefer different directory for
updates than the one in /usr/local/...

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Atheism is a non-prophet organization.
Comment 6 Michael Scheidell 2007-03-19 22:44:07 UTC
Matus UHLAR - fantomas wrote:
> actually, I don't mind have /var/lib/spamassassin on my filesystem, I just
> think that's not good idea because of FreeBSD's different directory layout.
> for ports, you could just specify localstatedir when configuring
> SpamAssassin. However as I said, I would prefer different directory for
> updates than the one in /usr/local/...
>
>   

I am looking at this again (I want to patch dependencies for gnupg)

When sa-update first came out, and I let it use the default 
/var/lib/spamassassin, SA broke
(since sa looks for: localrules, state dir, then site dir.  if it finds 
state dir (var/lib) it doesn't even load site dir (/usr/local/share)
This cause problems originally. (missing files, missing rules, etc)

however, by using my method (--updatedir 
/usr/local/share/spamassassin).  it seems to load BOTH sets (uses too 
much ram)

patching will need to be made, looking into it now.

Do you suggest /usr/local/lib/spamassassin ??

I think I should also do a postinstall, ifexists /var/lib  and move it 
to /usr/local/lib.

do you think that would work?  do you want to test out the patches 
before I commit them?


----------------------------------------------------------------- 
This email has been scanned and certified safe by SpammerTrap(tm) 
For Information please see http://www.spammertrap.com 
-----------------------------------------------------------------
Comment 7 Michael Scheidell 2007-04-16 12:00:48 UTC
Will change to /var/db with SpamAssassin 3.20.
Don't want to make a change like this or submit new port till a major 
code change.
Comment 8 Michael Scheidell 2007-05-07 22:10:52 UTC
Update applied to to SpamAssassin 3.2.0
bugs: please mark bug closed.
> run sa-update. It will create
> /var/lib/spamassassin/<version>/updates_spamassassin_org/ directory, where
> it puts updated rules, if it founds them. spamassassin and spamd later check
> these rules instead of those in /usr/local/share/spamassassin/50_scores.cf
>
> You may need older installation of spamassassin to verify this, I'm not sure
> that 3.1.8 has some updates, but I was able to update rules for 3.1.7 at
> least twice.
>
>   

_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________
Comment 9 Cheng-Lung Sung freebsd_committer freebsd_triage 2007-05-25 09:49:05 UTC
Responsible Changed
From-To: perl->clsung

I'll watch this.
Comment 10 Michael Scheidell 2007-05-26 04:07:19 UTC
PR: please close bug, will be fixed in SA 3.20 Update (submitted and updated tonight)
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/112502
Comment 11 Cheng-Lung Sung freebsd_committer freebsd_triage 2007-06-02 08:10:47 UTC
State Changed
From-To: open->closed

Closed by ports/112502, SA 3.2