From owner-freebsd-perl@FreeBSD.ORG Fri Jan 7 13:23:56 2005 Return-Path: Delivered-To: freebsd-perl@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3292F16A4CE for ; Fri, 7 Jan 2005 13:23:56 +0000 (GMT) Received: from post-24.mail.nl.demon.net (post-24.mail.nl.demon.net [194.159.73.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F4A943D4C for ; Fri, 7 Jan 2005 13:23:55 +0000 (GMT) (envelope-from Bram@moolenaar.net) Received: from zimbu.demon.nl ([82.161.100.193]:2570 helo=moolenaar.net) by post-24.mail.nl.demon.net with esmtp (Exim 4.34) id 1Cmu5q-0002yT-CZ; Fri, 07 Jan 2005 13:23:54 +0000 Received: from masaka.moolenaar.net (localhost [127.0.0.1]) by moolenaar.net (8.12.9p2/8.12.9) with ESMTP id j07DTuCO020726; Fri, 7 Jan 2005 14:29:56 +0100 (CET) (envelope-from Bram@moolenaar.net) Message-Id: <200501071329.j07DTuCO020726@moolenaar.net> To: Anton Berezin In-Reply-To: <20050107095733.GC56677@heechee.tobez.org> From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Fri, 07 Jan 2005 14:29:56 +0100 Sender: Bram@moolenaar.net cc: perl@FreeBSD.org Subject: Re: spamassassin and Perl 5.8 port broken X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2005 13:23:56 -0000 Anton Berezin wrote: > > Oh, looking for where PERL_VERSION is set I found one obvious problem. > > In /usr/ports/Mk/bsd.port.mk (around line 1174): > > > > .if ${OSVERSION} >= 300000 > > PERL_VERSION?= 5.00503 > > > > It seems PERL_VERSION only depends on the OS version, it doesn't > > actually check what Perl is installed. This is an obvious lack of > > intelligence. > > > > When I change it to: > > > > .if ${OSVERSION} >= 300000 > > #PERL_VERSION?= 5.00503 > > PERL_VERSION?= 5.6.1 > > > > Then the spamassassin port continues as expected (with the usual hickups > > that require manual tweaking). A dirty hack that gets me further. > > Hopefully the new spamassassin works better, since the port system > > doesn't allow for going back to an older version... > > Well, this is exactly the problem. When you install 5.6.1 from a > package or a port, on 4.X systems it tells you to run > /usr/local/bin/use.perl port afterwards (this is done automatically on > 5.X systems). If you install a port so much text scrolls over the screen that it's nearly impossible to notice such a message. I hope you are not surprised I misssed this. > One of the things that little script does is to override > PERL_VERSION settings used by the ports collection (it does that by > modifying /etc/make.conf). % man use.perl No manual entry for use.perl Hmm, a tool without documentation. Looking at the script, I notice it changes things in /usr/bin. That's a big no-no for a port. I don't want to change the base system, I want to install a new perl in /usr/local/. So that /usr/bin/perl remains available for scripts that rely on it. That's not illogical, right? > So if you did not perform this step, all perl-related ports in the ports > collection will continue to operate with the default system perl, as > opposed to the perl in /usr/local/bin, even though /usr/local/bin/perl > works fine for your own scripts with #!/usr/local/bin/perl as opposed > to #!/usr/bin/perl shebang. I think the port should at least be very clear about why it fails to build. You can see I was completely confused. More than that, after installing spamassassin it uses the perl in /usr/local. Thus the checks in the port should check the version of that perl, not of /usr/bin/perl. The installed /usr/local/bin/spamassassin starts with the line: #!/usr/local/bin/perl5.6.1 -T -w Thus apparently it finds out what version of perl is used and adjust to it. The port should thus check that version of perl. Using /etc/make.conf is unreliable. By the way, notice that the symlinks are the wrong way around: %ls -l /usr/local/bin/perl* -rwxr-xr-x 1 root wheel 704676 Jan 6 22:55 /usr/local/bin/perl lrwxr-xr-x 1 root wheel 19 Jan 6 22:55 /usr/local/bin/perl5 -> /usr/local/bin/perl lrwxr-xr-x 1 root wheel 19 Jan 6 22:55 /usr/local/bin/perl5.6.1 -> /usr/local/bin/perl When I would install a new version of perl as "/usr/local/bin/perl" then "/usr/local/bin/perl5.6.1" suddenly changes to the new perl! That is very likely to cause trouble. For example, spamassassin remembers the lib path to perl: "use lib '/usr/local/lib/perl5/site_perl/5.6.1';". I think installing Perl 5.8 actually did this (which is why perl 5.6.1 stopped working when installing Perl 5.8 failed halfway through). -- hundred-and-one symptoms of being an internet addict: 261. You find diskettes in your pockets when doing laundry. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///