Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070215003642.GA3548@openwall.com>
Date: Thu, 15 Feb 2007 03:36:42 +0300
From: Solar Designer <solar@...nwall.com>
To: owl-users@...ts.openwall.com
Subject: Re: Perl modules needed by SpamAssassin

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.