How-to: Problems with Perl 5.18 in jails as of September 2015

Status
Not open for further replies.

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
If you have done any of your own personal jail installations on FreeNAS (e.g., murmur, ZNC, whatever), then you have a high likelihood of having an atypical perl (typically 5.18) installed in your jail by ports or packages.

As of a couple days ago, there was a substantial change (in the direction of more fascist) to how default perl versions work, where they can be installed, how they can be installed, and how they must be built, etc. I may have triggered this by pointing something out in #freebsd the other day (whoops), so there is a possibility that it's my fault. :(

Thus, you may have discovered that your portmaster build for perl is suddenly breaking, and if that breaks, everything else won't build.

The solution is little bit of a pain in the ass, and the details of it were provided in the "UPDATING" errata that comes with the ports tree. I copy the relevant section here for your perusal---I am myself rebuilding now, and it seems to be working after following the instructions:

Code:
root@murmur:/tmp # grep -A 33 20150914 /usr/ports/UPDATING
20150914:
  AFFECTS: users of lang/perl5*
  AUTHOR: mat@FreeBSD.org

  Binary package users can ignore this.

  The way lang/perl5* ports install themselves has changed.  From now on, only
  the default Perl port (currently 5.20), or the version listed in
  DEFAULT_VERSIONS, will install /usr/local/bin/perl.

  If you are NOT using the default version of Perl (as of right now, it is
  5.20) you MUST add a line setting the version you are using to your
  /etc/make.conf, to preserve /usr/local/bin/perl:

  DEFAULT_VERSIONS+=  perl5=5.xx

  If your Perl package name is not called perl5-5.xx.y but perl5.xx-5.xx.y,
  you will need to rename it so that portupgrade and portmaster do not get
  confused:

  pkg set -n perl5.xx:perl5

  After this date, to migrate from one Perl version to the other, you must
  first put the DEFAULT_VERSIONS line in your make.conf, and then, for example,
  if you want to move from 5.20 to 5.22, do:

  pkg set -o lang/perl5.20:lang/perl5.22
  portmaster `pkg shlib -qR libperl.so.5.20`

  If you do not do that, you will replace your default Perl 5.20 installation
  (one that has /usr/local/bin/perl) with an installation that does not have
  /usr/local/bin/perl, and it will break everything.


When they say, "it will break everything", believe me, it will completely break everything. Also, as to this part:
Code:

  If your Perl package name is not called perl5-5.xx.y but perl5.xx-5.xx.y,
  you will need to rename it so that portupgrade and portmaster do not get
  confused

more than likely you *do* have your perl named perl5.xx-5.xx.y, and will have to make this change. To find out what your perl pkg is named:
Code:
pkg info | grep perl
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Glad I had snapshots. Trying to fix it myself, I screwed everything up. Without snapshots I would have been in deep doo doo. :)
 
Status
Not open for further replies.
Top