On Sat, Jan 04, 2003 at 08:41:22PM +0100, Denis Ducamp wrote: > On Sat, Jan 04, 2003 at 01:49:37PM -0500, Theo Van Dinter wrote: > > On Sat, Jan 04, 2003 at 07:31:40PM +0100, Denis Ducamp wrote: > > > are loaded from /usr/lib/perl5/site_perl first. Looking at the spamassassin > > > installed script show it uses that directory : > > > $ grep 'use lib' ~/saCVSusr/bin/spamassassin > > > use lib '/usr/lib/perl5/site_perl'; # substituted at 'make' time > > > > > > So this line isn't substituted at make time, even after a fresh > > > "cvs co spamassassin" > > > > You're assuming it's "use lib". As with all things perl, TIMTOWTDI. > > Look at the spamassassin script for the section titled "BEGIN". I have > > a feeling the problem is that you're using '~' which doesn't translate > > to $HOME in most places. Try replacing ~ with $HOME when you install. > > With ~ or /home/ducamp in "perl Makefile.PL" the installed script begin with : > > my $PREFIX = '/home/ducamp/saCVSusr'; # substituted at 'make' time > my $DEF_RULES_DIR = '/home/ducamp/saCVSusr/share/spamassassin'; # substituted at >'make' time > my $LOCAL_RULES_DIR = '/home/ducamp/saCVSetc/mail/spamassassin'; # substituted at >'make' time > > use lib '/usr/lib/perl5/site_perl'; # substituted at 'make' time > > I use the slackware 8.0 version of perl v5.6.1.
After "perl Makefile.PL PREFIX=/home/ducamp/saCVSusr SYSCONFDIR=/home/ducamp/saCVSetc" here is a extract of the generated Makefile : # --- MakeMaker constants section: AR_STATIC_ARGS = cr NAME = Mail::SpamAssassin DISTNAME = Mail-SpamAssassin NAME_SYM = Mail_SpamAssassin VERSION = 2.50 VERSION_SYM = 2_50 XS_VERSION = 2.50 INST_BIN = blib/bin INST_EXE = blib/script INST_LIB = blib/lib INST_ARCHLIB = blib/arch INST_SCRIPT = blib/script PREFIX = /home/ducamp/saCVSusr INSTALLDIRS = site INSTALLPRIVLIB = $(PREFIX)/lib INSTALLARCHLIB = $(PREFIX)/lib/i386-linux INSTALLSITELIB = $(PREFIX)/lib/site_perl INSTALLSITEARCH = $(PREFIX)/lib/site_perl/i386-linux INSTALLBIN = $(PREFIX)/bin INSTALLSCRIPT = $(PREFIX)/bin [...] # --- MakeMaker postamble section: INST_PREFIX = /home/ducamp/saCVSusr SYSCONFDIR = /home/ducamp/saCVSetc INST_SYSCONFDIR = /home/ducamp/saCVSetc PKG_DEF_RULES_DIR = $(PREFIX)/share/spamassassin DEF_RULES_DIR = $(INST_PREFIX)/share/spamassassin PKG_LOCAL_RULES_DIR = $(SYSCONFDIR)/mail/spamassassin LOCAL_RULES_DIR = $(INST_SYSCONFDIR)/mail/spamassassin And after make here is the diff between spamassassin.raw and spamassassin : --- spamassassin.raw Fri Jan 3 19:08:19 2003 +++ spamassassin Sat Jan 4 22:44:04 2003 @@ -1,13 +1,13 @@ -#!/usr/bin/perl -w -T +#!/usr/bin/perl -w eval "use bytes"; use File::Spec; -my $PREFIX = '@@PREFIX@@'; # substituted at 'make' time -my $DEF_RULES_DIR = '@@DEF_RULES_DIR@@'; # substituted at 'make' time -my $LOCAL_RULES_DIR = '@@LOCAL_RULES_DIR@@'; # substituted at 'make' time +my $PREFIX = '/home/ducamp/saCVSusr'; # substituted at 'make' time +my $DEF_RULES_DIR = '/home/ducamp/saCVSusr/share/spamassassin'; # substituted at +'make' time +my $LOCAL_RULES_DIR = '/home/ducamp/saCVSetc/mail/spamassassin'; # substituted at +'make' time -use lib '@@INSTALLSITELIB@@'; # substituted at 'make' time +use lib '/usr/lib/perl5/site_perl'; # substituted at 'make' time BEGIN { # Locate locally installed SA libraries *without* using FindBin, which generates @@ -21,7 +21,7 @@ # note that ./lib/Mail/SpamAssassin.pm takes precedence, for # building SpamAssassin on a machine where an old version is installed. if (-e $bin.'/lib/Mail/SpamAssassin.pm' - || !-e '@@INSTALLSITELIB@@/Mail/SpamAssassin.pm') + || !-e '/usr/lib/perl5/site_perl/Mail/SpamAssassin.pm') { # These are common paths where the SA libs might be found. foreach (qw(lib ../lib/site_perl So variables defined from INST_PREFIX and INST_SYSCONFDIR as DEF_RULES_DIR and LOCAL_RULES_DIR respectively are correctly substituted but INSTALLSITELIB which is defined from PREFIX is uncorrectly substituted while PREFIX is correct... In Makefile, a line seems to be strange : it replaces the value of INSTALLSITELIB by the value of SITELIBEXP. By applying the following diff to the Makefile generated by Makefile.PL the locally installed spamassassin is successfully generated : $ diff -u Makefile.orig Makefile --- Makefile.orig Sat Jan 4 22:42:26 2003 +++ Makefile Sat Jan 4 23:01:49 2003 @@ -926,7 +926,7 @@ -DPREFIX="$(INST_PREFIX)" \ -DDEF_RULES_DIR="$(DEF_RULES_DIR)" \ -DLOCAL_RULES_DIR="$(LOCAL_RULES_DIR)" \ - -DINSTALLSITELIB="$(SITELIBEXP)" + -DINSTALLSITELIB="$(INSTALLSITELIB)" But I have no idea if this is good for a system wide installation of spamassassin... A proposed patch to Makefile.PL is the following : $ diff -u Makefile.PL.orig Makefile.PL --- Makefile.PL.orig Sun Dec 29 07:51:34 2002 +++ Makefile.PL Sat Jan 4 23:09:34 2003 @@ -222,7 +222,7 @@ -DPREFIX="$(INST_PREFIX)" \ -DDEF_RULES_DIR="$(DEF_RULES_DIR)" \ -DLOCAL_RULES_DIR="$(LOCAL_RULES_DIR)" \ - -DINSTALLSITELIB="$(SITELIBEXP)" + -DINSTALLSITELIB="$(INSTALLSITELIB)" # . ($mm_version < 5.45 ? q# pm_to_blib: $(TO_INST_PM) But beware : this is the first time in my life that I look at a Makefile.PL ! At least it works for me for a local installation, I can't test for a system wide installation. Denis Ducamp. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk