Upgrading perl on -CURRENT
Matthew Seaman
matthew at FreeBSD.org
Wed Jan 20 07:59:35 UTC 2016
On 20/01/2016 03:56, Chris H wrote:
> On Tue, 19 Jan 2016 16:58:10 -0800 "Chris H" <bsd-lists at bsdforge.com> wrote
>
>> I just finished a long overdue update on one of my
>> boxes that track -CURRENT. It's on 5.18. Is it enough
>> to cd /usr/ports/lang/perl5.20;
>> make; make deinstall && make reinstall clean ?
> I probably should have also mentioned that I already changed
> DEFAULT_VERSIONS+=perl5=5.18 to perl5=5.20
No, you're going to need to do more than that. There are critical parts
of the perl package that are version specific. For instance:
% locate perl.so
/usr/local/lib/perl5/5.22/mach/CORE/libperl.so
/usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22
/usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22.1
This means that anything that embeds a perl interpreter will need
rebuilding to use the new perl. That includes applications like net-snmpd.
The same goes for any perl modules that include compiled (XS) code. For
instance:
% locate Socket6.so
/usr/local/lib/perl5/site_perl/mach/5.22/auto/Socket6/Socket6.so
All those modules will need rebuilding. Pure-perl modules should be OK
without.
By far the easiest and cleanest perl upgrade mechanism I've found is to
use pkg(8) -- modify the DEFAULT_VERSIONS in your poudriere config and
do a 'poudriere bulk' which will rebuild anything with a dependency on
perl in your repo. Then a simple 'pkg upgrade' will do the trick.
One thing to watch out for: there's no longer a /usr/bin/perl symlink
with perl-5.22 so you'll need to check any #! lines in locally developed
scripts: change that either to '#!/usr/bin/env perl' (preferred) or
'#!/usr/local/bin/perl' in situations where the script is run with $PATH
not including /usr/local/bin -- for instance perl run at boot from
${LOCALBASE}/etc/rc.d scripts.
Cheers,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 957 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-perl/attachments/20160120/fe5f4781/attachment.sig>
More information about the freebsd-perl
mailing list