Bug 7039 - sa-compile notes inability to write in home dir even though it successfully uses a /tmp dir
Summary: sa-compile notes inability to write in home dir even though it successfully u...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: sa-compile (show other bugs)
Version: 3.4.0
Hardware: PC Mac OS X
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-02 22:42 UTC by Quanah Gibson-Mount
Modified: 2019-08-03 15:10 UTC (History)
2 users (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 Quanah Gibson-Mount 2014-05-02 22:42:02 UTC
If sa-compile cannot write to the user's home dir, it will fall back to using a dir in /tmp.  However, it still logs warnings about its inability to write to the home dir unnecessarily:

cannot create a directory: No such file or directory at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm line 1033.
cannot write to /opt/zimbra/.spamassassin/sa-compile.cache/rules.body_0 at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm line 1035.
print() on closed filehandle CACHE at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm line 1036.
plugin: eval failed: error writing: Bad file descriptor at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm line 1036.
cd /tmp/.spamassassin25185JJ34ectmp
reading bases_body_0.in
Comment 1 Quanah Gibson-Mount 2014-05-02 22:54:25 UTC
It would be handy to have an option to say what location to use as the tmp directory...
Comment 2 Henrik Krohns 2019-08-03 15:10:34 UTC
Fixed warnings. Pretty sure current version doesn't fallback to /tmp so that's not an issue.

If cache write fails, doesn't break anything, it's simply a speedup for next sa-compile run.

Sending        spamassassin-3.4/lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
Sending        trunk/lib/Mail/SpamAssassin/Plugin/BodyRuleBaseExtractor.pm
Transmitting file data ..done
Committing transaction...
Committed revision 1864341.