Bug 195604 - Switch PHP and MySQL default versions to 5.6
Summary: Switch PHP and MySQL default versions to 5.6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alex Dupre
Depends on:
Reported: 2014-12-03 10:18 UTC by Alex Dupre
Modified: 2015-02-22 22:32 UTC (History)
2 users (show)

See Also:
ale: exp-run?

Patch (1.16 KB, patch)
2014-12-03 10:18 UTC, Alex Dupre
no flags Details | Diff
New patch (8.02 KB, patch)
2014-12-05 11:17 UTC, Alex Dupre
no flags Details | Diff
Final patch (10.89 KB, patch)
2014-12-10 12:33 UTC, Alex Dupre
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Dupre freebsd_committer 2014-12-03 10:18:15 UTC
Created attachment 150138 [details]

I ask an exp-run to raise default versions for PHP and MySQL.
Comment 1 Antoine Brodin freebsd_committer 2014-12-03 10:34:58 UTC
Take for exp-run
Comment 2 Antoine Brodin freebsd_committer 2014-12-04 07:11:29 UTC
Exp-run results:


New failures:

+ {"origin"=>"archivers/php5-snappy", "pkgname"=>"php5-snappy-0.0.2_1", "phase"=>"stage", "errortype"=>"???"}
+ {"origin"=>"databases/apq-mysql", "pkgname"=>"apq-mysql-3.2.0", "phase"=>"stage", "errortype"=>"install_error"}
+ {"origin"=>"databases/mydumper", "pkgname"=>"mydumper-0.6.1", "phase"=>"build", "errortype"=>"linker_error"}
+ {"origin"=>"databases/php-adodb-ext", "pkgname"=>"php-adodb-ext-5.04_3", "phase"=>"build", "errortype"=>"???"}
+ {"origin"=>"devel/pecl-qb", "pkgname"=>"pecl-qb-2.2.0", "phase"=>"build", "errortype"=>"compiler_error"}
+ {"origin"=>"devel/pecl-yac", "pkgname"=>"pecl-yac-0.1.1.r20140114,1", "phase"=>"build", "errortype"=>"compiler_error"}
+ {"origin"=>"finance/frontaccounting", "pkgname"=>"frontaccounting-2.3.22", "phase"=>"run-depends", "errortype"=>"???"}
+ {"origin"=>"net-im/jabberd", "pkgname"=>"jabberd-2.3.1_7", "phase"=>"build", "errortype"=>"clang-bug"}
+ {"origin"=>"security/base", "pkgname"=>"base-1.4.5", "phase"=>"run-depends", "errortype"=>"???"}

Failure logs:

Comment 3 Alex Dupre freebsd_committer 2014-12-05 11:17:17 UTC
Created attachment 150219 [details]
New patch

New patch that fixes the issues.
Comment 4 Mathieu Arnold freebsd_committer 2014-12-05 13:02:56 UTC
(In reply to Alex Dupre from comment #3)
> Created attachment 150219 [details]
> New patch
> New patch that fixes the issues.

I'm not very fond of the change to databases/apq-mysql/Makefile which will force the mysql version for the port, I think it'll force installing mysql55-client, which will conflict with mysql56-client, which is a bad thing, might as well not put the MYSQL_VERSION there and let it be broken.
Comment 5 Alex Dupre freebsd_committer 2014-12-05 13:33:18 UTC
I've already informed marino@, he is working to fix it in a better way. Anyway I've not forced a mysql version, just changed the default to one that works to build the package. Of course we may choose to not build the package at all.
Comment 6 Antoine Brodin freebsd_committer 2014-12-06 07:42:13 UTC
devel/pecl-qb fails to build on freebsd 9:


this can probably be fixed by using libmissing on older freebsd (see math/libproj4 or math/sfft for instance)
the rest looks ok
Comment 7 Alex Dupre freebsd_committer 2014-12-10 12:33:08 UTC
Created attachment 150430 [details]
Final patch

This should be the final patch, I've fixed pecl-qb on FreeBSD < 10.
Comment 8 Antoine Brodin freebsd_committer 2014-12-10 13:22:19 UTC
Ok I assume you tested it.
Make sure that you have UPDATING instructions for people doing the upgrade.
Comment 9 commit-hook freebsd_committer 2015-02-04 13:45:50 UTC
A commit references this bug:

Author: ale
Date: Wed Feb  4 13:45:14 UTC 2015
New revision: 378400
URL: https://svnweb.freebsd.org/changeset/ports/378400

  Switch default MySQL version to 5.6.

  PR:		195604
  Approved by:	portmgr

Comment 10 commit-hook freebsd_committer 2015-02-20 13:56:54 UTC
A commit references this bug:

Author: ale
Date: Fri Feb 20 13:56:15 UTC 2015
New revision: 379433
URL: https://svnweb.freebsd.org/changeset/ports/379433

  Switch default PHP version to 5.6.x.

  - Update PHP 5.4 to 5.4.38 release
  - Update PHP 5.5 to 5.5.22 release
  - Update PHP 5.6 to 5.6.6 release

  PR:		195604
  Approved by:	portmgr

Comment 11 Kalten 2015-02-22 02:50:17 UTC
I am sorry to bother in this matter, but are you sure, you did that
right? (It may be necessary to reopen this Bug)

The problem I do see is the following one:

lang/php5 still means php-5.4.x there is no lang/php54, but there is a
lang/php56. One would assume, that the default version of php would be
that one in lang/php5 i.e. php-5.4.x yet you have changed the default
version to php-5.6.x as stated in Mk/bsd.default-versions.mk

E.g. databases/php5-mysql is still using lang/php5 by that bound to
php-5.4.x and there is some databases/php56-mysql using lang/php56 and
by that bound to php-5.6.x.

Someone needing some php sub-port will have to change all ports from
*/php5-* to */php56-* by hand and what is even worse: that pour lad will
have to come up with that idea that php5 is not the default in the first
place—am I right?

UPDATING talks in “20150220:” about using 'pkg info php5\*' to produce a
list of installed php ports prior to 'pkg upgrade' and then installing
those ports missing from that list. Those would be php5-* ports and by
that of version php-5.4.x, not php56-* ports of version php-5.6.x so at
least there would occur conflicts with newly installed php56-* ports
(which are the default now because of ${PHP_DEFAULT} set in

This is some mess, or did I miss something? (I am not daring to update
my systems in this situation)

Comment 12 Alex Dupre freebsd_committer 2015-02-22 14:37:46 UTC
If you are using the ports, nothing has changed, you'll continue to use php 5.4.

If you use the packages, it's likely that you end up with the new version, this is the reason to create the extension list before upgrading, and to check that every needed extension is still installed after it.

No port should directly depends on any php5 port, we have the USE_PHP know for that.
Comment 13 Kalten 2015-02-22 21:29:10 UTC
> If you are using the ports, nothing has changed, you'll continue to
> use php 5.4.
And again—maybe clarifying the logical problem:
there are:
 lang/php5   meaning php54
This is not logical—at least not any more. As long as php-5.4.x was the
default, there was logic in calling those ports php5-* as it was the
default version. Now php56 is the default, so php5- should still be
the default and mean php56-*. php5-* should more or less be nothing
more than symbolic links to the default version (or just e.g. include
the Makefile of the default version).
Are you honestly of the opinion, that this should not be the way I have
just described? If so: please do clarify why.

> If you use the packages, it's likely that you end up with the new
> version,
It does not give me any confidence to read a sentence like “it’s likely
that you end up with…”. Should it not be certain what will happen???

> this is the reason to create the extension list before upgrading,
The mentioned command »pkg info php5\*« from /usr/ports/UPDATING at
“20150220:” leads to a list like:
As you can clearly see: each and every on is a php5-* port.

> and to check that every needed extension is still installed after it.
The user will call e.g. »pkg install archivers/php5-zip« as mentioned
on http://www.freshports.org/archivers/php5-zip/ he will most certainly
assume, that php5-zip in fact /is/ the default version using php-5.6.x!
He will not search for some package matching anything else—will he?
That is my point!

> No port should directly depends on any php5 port, we have the USE_PHP
> know for that.
I do accept the uncertainty of the expression “should” here—by time all
ports will honour that.
But e.g. for some program not in the ports I did install missing
dependencies and would not have thought of using some php56-* instead
of the more likely default version php5-*. I would not have searched
for variables for each and every port on my system written down in some
file I would not even have on disk if I had not installed the ports
collection, namely /usr/ports/Mk/bsd.default-versions.mk I would not
have read /usr/ports/UPDATING even if I had downloaded the ports
collection as I would not be updating if I freshly installed some system
and even on http://www.freshports.org/lang/php56/ there is no word about
being the default version, nor in e.g.
http://www.freshports.org/archivers/php56-zip/ and even in the version
most likely to be assumed to be the default, namely
http://www.freshports.org/lang/php5/ there is no word to be found, that
it is not the default, the same at
Again: are you of the opinion, that all that would not most certainly
be as described for anybody not developing the ports?
If so: please do clarify why.

The use of USE_PHP even strengthens the interpretation to use php5-* as
the name for default ports! The user does not really have influence in
which version to use any more, since USE_PHP decides. And each time you
change the default version, you have to update each port instead of
only those view (to be hoped zero) that can not cope with the new
version.  There would be less to change in the ports collection would
php5-* be the default version; am I wrong there?

In all clarity: I am of the opinion, that php5-* ports must be the
default version of php-5.* in FreeBSD or people will lose track of
what to use.

(I do apologise should my text appear somewhat aggressive, but I think
that we are dealing with an important matter here and I seem not to be
good at expressing what I mean at least in a foreign language—it is a
bit depressing for me ;-))

Comment 14 Antoine Brodin freebsd_committer 2015-02-22 21:59:28 UTC
php5 should have been renamed php54 a long time ago but it never was.

Moving php56 to php5 would be an error in my opinion, let's wait php54 end of life and the php5 directories will disappear.
Comment 15 Alex Dupre freebsd_committer 2015-02-22 22:32:05 UTC
Antoine is 100% correct.

I have no time to move every php5 port to php54, but if someone wants to do it before they will be removed, he will have my approval.

>It does not give me any confidence to read a sentence like “it’s likely
>that you end up with…”. Should it not be certain what will happen???

No, it's not, it depends on the other packages you have installed. If you have pecl ports or ports that depends on php extensions, your php installation will be updated, otherwise not, because there aren't conflicting packages.