PERL_VERSION ignored by Poudriere?

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer
I'm not quite sure how wide-spread this problem is, or may become, but after a load of package builds that needed redoing today because Perl 5.14.4 was built instead of Perl 5.16.3 (which I use on all of my systems) I found that Poudriere started ignoring the PERL_VERSION setting in make.conf starting today.

I think I have tracked it down to a recent change in /usr/ports/Mk/bsd.default-versions.mk, which now seems to prescribe setting
Code:
PERL5_DEFAULT?=5.16
(in this specific instance), totally ignoring the already present
Code:
# added by use.perl 2013-08-29 17:34:57
PERL_VERSION=5.16.3

The latter has always forced the proper Perl version into each and every port or package build I did. Not too happy about this 'feature', because Perl is still echo'ing PERL_VERSION= to make.conf, and I foresee a lot of problems when people start running into installation problems due to Perl conflicts.

This may be specific to Poudriere, a portmaster run did seems to pick up the proper Perl version with the regular PERL_VERSION setting.

Did anyone else see this, or can anyone replicate it? My Poudriere installation is pretty no-nonsense.
 
Looks like I'm running into the same problem just now. My current bulk run started building perl5.14.

Looks like this solves the problem:
Code:
PERL_VERSION=5.16.3
PERL5_DEFAULT=5.16
 
I seem to be getting the same problem. I am using ports-mgmt/poudriere-devel. Nothing special about the installation otherwise. Plain vanilla.

Code:
#cat /usr/local/etc/poudriere.d/release91amd64-make.conf 
PERL_VERSION=5.16.3
CC=clang
CXX=clang++
CPP=clang-cpp
 
Just add PERL5_DEFAULT=5.16 to your release91amd64-make.conf.

To be honest PERL_VERSION wasn't good for ports anyway since it always included the minor version.
 
But at least a Perl installation updated it every time the minor version changed. But this looks like an undocumented change that only affects Poudriere builds (also using -devel). Unless someone can confirm that it affects portmaster builds as well.
 
The default version is still 5.14, right? So unless somebody specified an alternate version I don't think anybody will notice the changes.
 
Ah, I couldn't find /usr/ports/Mk/bsd.default-versions.mk on my systems. Looks like it's been added yesterday.

If I read everything correctly the new way to set the default version is:
Code:
DEFAULT_VERSIONS= perl5=5.16

I think the idea is to get a consistent way of specifying a default version. Different ports, like Apache and MySQL, have used various different ways of setting a default version, there really never was a standard way for it.
 
That one did not work for me when I ran into the initial problem. I had to go with the PERL5_DEFAULT= setting. And I don't mind changing the required setting in make.conf, but I had expected something in UPDATING at the very least.
 
I guess they're not completely done with the transition yet. I can't find much about the change on the freebsd-perl@ mailing list either :(
 
Bingo.

Code:
# It expects users to define DEFAULT_VERSIONS in there make.conf
# Syntax is the following:
#
# DEFAULT_VERSION=  perl5=5.18 ruby=2.0

.if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK)
_INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes

.for lang in ${DEFAULT_VERSIONS}
_l=   ${lang:C/=.*//g}
${_l:U}_DEFAULT=  ${lang:C/.*=//g}
.endfor

The comments state DEFAULT_VERSION whereas the code actually uses DEFAULT_VERSIONS.
 
Yikes. That didn't hit me when I tried to stop 16 cores from building 600 ports on a couple of jails .. The 'there' is a nice touch though .. I did notice that). I wonder what I'll need for Apache.

Code:
DEFAULT_VERSION=  apache=apache22?
DEFAULT_VERSION=  apache2=apache22?
DEFAULT_VERSION=  apache22=apache22-2.2?

This could be better documented ..
 
I tried
Code:
DEFAULT_VERSIONS= perl5=5.16
but the Perl 5.14.4 builds started again. I'll stick with
Code:
PERL5_DEFAULT=5.16
for a bit longer.
 
I just have to ask: have you submitted a PR?

And from reading /usr/ports/Mk/bsd.default-versions.mk it seems to me that the syntax should be the following:

Code:
XXX_DEFAULT?=

which would then imply

Code:
APACHE22_DEFAULT?=
 
But Apache 22 is an Apache 2 sub-version, just like Perl 5.16 is a Perl 5 sub-version. So you'd expect

Code:
APACHE2_DEFAULT= apache22

And no, no PR. Feel free.
 
DutchDaemon said:
But Apache 22 is an Apache 2 sub-version, just like Perl 5.16 is a Perl 5 sub-version. So you'd expect

Code:
APACHE2_DEFAULT= apache22

And no, no PR. Feel free.

No, since years the Apache version is controlled via
Code:
APACHE_PORT=www/apache??
But the new default version code will be adopted.

From Mk/bsd.apache.mk:
Code:
# =========================================================================
# Parameter APACHE_PORT (user controlled):
#
# The parameter APACHE_PORT can be used in /etc/make.conf to
# overwrite the default apache port.
#
# This parameter should never be used in the Makefile of a port!
#
# Example entry in /etc/make.conf:
#  APACHE_PORT= www/apache22
 
From /usr/ports/UPDATING

Code:
20130920:
  AFFECTS: Users of ports
  AUTHOR: bapt@FreeBSD.org

  New way to override the default version of a language in the ports
  tree.

  The make variable, DEFAULT_VERSIONS, allows users to override the
  default version defined by the ports tree.

  For example, to declare specific versions for Perl, Ruby and Tcl/Tk,
  it would be defined as:
  DEFAULT_VERSIONS=	perl5=5.18 ruby=2.0 tcltk=8.6

  Today, this only is supported by Perl, Ruby and Tcl/Tk.
 
Well, it didn't work on the twentieth (nor was this in UPDATING on that date), see post 12. I'll try again later.
 
@DutchDaemon - I am in complete agreement with you. I only saw that UPDATING entry today.

It seems to be working for me now. I am getting the same Perl version that I set in the variable.
 
Last edited by a moderator:
Yeah, of course I ran into the problem a day before that (sometimes it sucks to be an early adopter), and I use pkg updating from a script, which doesn't print general and generic things like this. So I checked on September 19, and not after that. Oh well, if this syntax does work now, it's all water under the bridge.
 
I do hope they're going to use that DEFAULT_VERSIONS for other things too. Although I'm not quite sure how that would work for APACHE_PORT though. I do like the idea.
 
Back
Top