Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173759 - mail-filter/spamassassin: postgres useflag support is too limited
Summary: mail-filter/spamassassin: postgres useflag support is too limited
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 216105 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-08 12:23 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-04-19 10:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild patch (spamassassin-ebuild.patch,3.16 KB, patch)
2007-04-08 15:21 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff
Init script patch (spamassassin-init.patch,354 bytes, patch)
2007-04-08 15:21 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2007-04-08 12:23:32 UTC
(CCing pgsql herd so they can say their opinion about init.d script)

I just finished setting up SpamAssassin with PostgreSQL support locally; currently the postgres useflag does not really help much, beside installing the proper Perl modules needed for PostgreSQL access. (Probably the same holds true for mysql, but I haven't looked that up.)

First of all, the ebuild should probably warn that the useflag alone won't enable any pgsql feature (okay this is trivial to know if you know Gentoo, but anyway).

Plus, with it enabled (and configured) and berkdb disabled, Bayesian filtering works just as well, so the warning about missing DB_File is then moot.

The init.d script does not currently require pgsql so spamd could be started without postgresql; as it can use a remote postgresql server it might not be a good idea to "need postgresql", but maybe "use postgresql" can help to get it started in the correct order.

And most important, the doc useflag is currently opting-in for user documentation (which is not the usual use for it, as user documentation should be always available), which includes the SQL schemas needed to properly set up the PostgreSQL database.

If wanted, I can provide a couple of possible ways to improve the situation.
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2007-04-08 13:24:35 UTC
(In reply to comment #0)

> The init.d script does not currently require pgsql so spamd could be started
> without postgresql; as it can use a remote postgresql server it might not be a
> good idea to "need postgresql", but maybe "use postgresql" can help to get it
> started in the correct order.
Fully agree.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-04-08 15:21:01 UTC
Created attachment 115727 [details, diff]
Ebuild patch

This is a proposed ebuild patch; it changes the name of the init.d file from 3.0.0-spamd.init to 3.1.8-spamd.init, as I'll be attaching a patch to the init.d file, then manages the init script so that if the postgres or mysql useflags are enabled, the proper code is enabled on the init script. It also removes the conditional on doc useflag for the installation of text documentation; the doc useflag still exists for html documentation, that as far as I can see require an extra step during compile.

The SQL documentation is installed only if one of the three SQL backends is installed; more fine-grained installation could be achieved so that only the schemas for the enabled databases are installed, but I'm unsure how much does that help.

The note to look at the documentation is no more conditional to doc useflag either, and it doesn't point to the .gz file (as it's likely to be bz2 nowadays, but should also be configurable, so taking it generic should be fine). An added note tell users to set up their SQL database if they want Bayes support, before checking for DB_File.

Probably the remaining einfo calls should be changed to elog, by the way.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2007-04-08 15:21:20 UTC
Created attachment 115728 [details, diff]
Init script patch
Comment 5 David Abbott gentoo-dev 2009-11-26 17:53:54 UTC
*** Bug 216105 has been marked as a duplicate of this bug. ***
Comment 6 David Abbott gentoo-dev 2010-04-19 10:30:20 UTC
Updated init.d script added to spamassassin-3.3.1-r1 please test.