Migrating from perl5-5.20 to perl5.22 using custom packages?

olli hauer ohauer at gmx.de
Sat Sep 5 19:26:39 UTC 2015

On 2015-09-05 18:29, David Wolfskill wrote:
> For my "development machines (laptop & build machine), I track stable/10
> & head daily, and update ports (also daily) under stable/10 using
> portmaster.  There's been a bit of turbulence now and then, but overall,
> the process generally works.
> In particular, ports/UPDATING has fairly explicit instructions for
> performing migrations of this nature -- e.g., extrapolating a bit from
> the instructions for portmaster users in the 20150513 entry:
> 	portmaster -o lang/perl5.22 lang/perl5.20
> 	portmaster -f -D `pkg shlib -R libperl.so.5.20|tail +2`
> which worked (as shown on my laptop):
> g1-252(10.2-S)[1] pkg info -o perl\*
> perl5.22-5.22.0_2              lang/perl5.22
> g1-252(10.2-S)[2] 
> Up to a few weeks ago, I had also been using portmaster on my
> "production" machines.  My primary incentive for migrating to using "pkg
> upgrade" on these systems was their conversion from i386 to amd64 (and
> the daunting prospect of rebuilding all of those ports -- and having
> the machines' services disabled during that period.  (I documented that
> experience in
> <http://www.catwhisker.org/~david/FreeBSD/convert_i386_amd64.html>.)
> I have since continued to use poudriere on my build machine on a
> weekly cycle, then updating FreeBSD base, then the installed packages
> on the production machines every Sunday since -- which process has
> been working rather well.
> Now, however, after having updated my development machines to use
> Perl5.22, I'd like to do the same for the production machines.
> The above-referenced ports/UPDATING entry merely states:
>   The default Perl version has been switched to Perl 5.20.  If you are using
>   binary packages to upgrade your system, you do not have anything to do, pkg
>   upgrade will do the right thing....
> Fortunately, I have a test machine that is set up like the producton
> one that has the bulk of the ports/packages installed, so I tried
> an upgrade cycle on it.
> The update of FreeBSD from:
> FreeBSD pogo.catwhisker.org 10.2-BETA1 FreeBSD 10.2-BETA1 #417  r285346M/285355:1001519: Fri Jul 10 04:29:33 PDT 2015     root at freebeast.catwhisker.org:/common/S2/obj/usr/src/sys/ALBERT  amd64
> to
> FreeBSD pogo.catwhisker.org 10.2-STABLE FreeBSD 10.2-STABLE #465  r287480M/287482:1002500: Sat Sep  5 04:17:26 PDT 2015     root at freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/ALBERT  amd64
> was (quite) uneventful -- it Just Worked.
> After the successful reboot, I then stopped services (that relied
> on installed ports/packages) on the machine and performed "pkg upgrade".
> While it claimed success and exited with an exit status of 0, it says
> that what it did with respect to Perl was:
> 	        perl5: 5.20.2_5 -> 5.20.2_6
> which isn't quite what I had in mind.
> In checking the package repository, I see:
> freebeast(10.2-S)[9] (cd All; ls -lT perl*)
> -rw-r--r--  5 nobody  wheel  13746168 Aug 16 04:33:03 2015 perl5-5.20.2_6.txz
> -rw-r--r--  5 nobody  wheel  13935800 Jul  4 14:53:37 2015 perl5.18-5.18.4_15.txz
> -rw-r--r--  1 nobody  wheel  13958800 Sep  5 05:53:23 2015 perl5.22-5.22.0_2.txz
> freebeast(10.2-S)[10] 
> I suppose a bit of housecleaning is in order... but is the existence
> of the the perl5-5.20.2_6.txz the reason/excuse for not picking up
> perl5.22-5.22.0_2.txz?
> What do I need to do to switch to perl5.22 on my production machines?

You can use the 'pkg set -o ...' command, but I suspect the version change is not happened automatically because the default in your poudriere is not set to perl5.22

# pkg set -o lang/perl5.20:lang/perl5.22
(note old <--> new swapped and separated with ':' )

>From Mk/bsd.default-versions.mk:

To overwrite this in PD globally
$ cat $LOCALBASE/etc/poudriere/make.conf (or $set-make.conf, for only a dedicated ports set)

and fire a new build, all ports depending on the default perl are reflecting the new 5.22 version as dependency and the perl version should change automatically.
>From my past experience with perl upgrades I would run 'pkg upgrade -f' else not all p5-$ports are reinstalled.
And as super bonus since you are already building with PD you don't have to mess around with portmaster

nice writeup on your webpage, to get a even smaller package list you can run "ports-tools/pkg_tree" with the parameter '-t'


More information about the freebsd-ports mailing list