Re: [owl-users] Perl modules needed by SpamAssassin

From: Solar Designer (solar@private)
Date: Wed Feb 14 2007 - 16:36:42 PST


On Wed, Feb 14, 2007 at 08:15:22PM +0300, Andrey V Stolyarov wrote:
> I'm currently requested to deploy SpamAssassin on one of my
> customer's Owl installation.  Trying it out-of-the-box I found
> out that Owl doesn't contain several Perl modules needed by
> SpamAssassin.
...
> My question is, should I now proceed with manual packing of these
> modules?

Why do you want to have them packaged at all?  This is useful for
redistribution, but not for local installs.

I suggest that you install them from CPAN, but do it under whatever
pseudo-user account you allocate for SpamAssassin - that is, don't run
any of the CPAN code as root.  It's done roughly as follows:

	mkdir ~/perl
	cpan	# or "perl -MCPAN -e shell" on some non-Owl systems

In response to the appropriate prompt, enter "PREFIX=~/perl".

Once in the CPAN shell, type "install MODULE", where MODULE is the
name of the module to install.

In order for Perl scripts to use modules installed in this way, at least
_one_ of the following must be true:

1. PERL5OPT be set to imply the appropriate "-I..." option to Perl.
You can add this line to .bashrc:

	export PERL5OPT="-I${HOME}/perl/lib/perl5/site_perl"

This should work great for scripts invoked manually while logged in.

2. The appropriate "-I..." option be passed to "perl" explicitly.
This may be done by editing the first line of Perl scripts to become:

	#!/usr/bin/perl -I/home/.../perl/lib/perl5/site_perl

(also include any other options to "perl" that the script might have
already been using).

3. A "use lib ..." directive may be added to the Perl scripts:

	use lib qw(/home/.../perl/lib/perl5/site_perl);

Naturally, the last two options are only needed for CGIs where we
couldn't have conveniently set PERL5OPT.

-- 
Alexander Peslyak <solar at openwall.com>
GPG key ID: 5B341F15  fp: B3FB 63F4 D7A3 BCCC 6F6E  FC55 A2FC 027C 5B34 1F15
http://www.openwall.com - bringing security into open computing environments



This archive was generated by hypermail 2.1.3 : Wed Feb 14 2007 - 16:35:31 PST