php: delete /usr/lib/php/build instead of /usr/lib/php
PATCH 1/6 php: delete /usr/lib/php/build instead of /usr/lib/php
External PHP modules like the OPcache may live in /usr/lib/php/extensions, so only delete /usr/lib/php/build
--- package/php/php.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/php/php.mk +1 -1
@@ -290,7 +290,7 @@ endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_EXTENSIONS_FIXUP define PHP_INSTALL_FIXUP - rm -rf $(TARGET_DIR)/usr/lib/php + rm -rf $(TARGET_DIR)/usr/lib/php/build rm -f $(TARGET_DIR)/usr/bin/phpize $(INSTALL) -D -m 0755 $(PHP_DIR)/php.ini-production \ $(TARGET_DIR)/etc/php.ini
Signature · 1 line
2.1.4
PATCH 2/6 php: patch acinclude.m4 instead of aclocal.m4
aclocal.m4 gets regenerated from acinclude.m4, so patch the last.
Fixes "Extensions are not supported on this platform" error when loading any external (zend) extension in php.ini.
Was caused by 0001-ditch-unset.patch not being applied to the correct file, and our ac_cv_func_dlopen=yes env setting being unset.
--- package/php/0001-ditch-unset.patch | 6 +++--- package/php/0002-no-iconv-search.patch | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
package/php/0001-ditch-unset.patch +3 -3
@@ -3,9 +3,9 @@ Terminate them with extreme prejudice. Signed-off-by: Gustavo Zacarias <[email protected]> -diff -Nura php-5.6.7.orig/aclocal.m4 php-5.6.7/aclocal.m4 ---- php-5.6.7.orig/aclocal.m4 2015-04-08 11:08:11.208848359 -0300 -+++ php-5.6.7/aclocal.m4 2015-04-08 11:08:49.828160195 -0300 +diff -Nura php-5.6.8.orig/acinclude.m4 php-5.6.8/acinclude.m4 +--- php-5.6.8.orig/acinclude.m4 2015-04-15 20:05:57.000000000 +0200 ++++ php-5.6.8/acinclude.m4 2015-05-18 20:03:50.833099001 +0200 @@ -1897,8 +1897,6 @@ dnl AC_DEFUN([PHP_CHECK_FUNC_LIB],[
package/php/0002-no-iconv-search.patch +4 -4
@@ -8,10 +8,10 @@ PHP_ICONV_H_PATH which, again, uses test and absolute paths. Signed-off-by: Gustavo Zacarias <[email protected]> [Gustavo: convert to nice m4 instead of patching configure] -diff -Nura php-5.6.7.orig/aclocal.m4 php-5.6.7/aclocal.m4 ---- php-5.6.7.orig/aclocal.m4 2015-04-08 11:08:11.208848359 -0300 -+++ php-5.6.7/aclocal.m4 2015-04-08 11:42:17.321044950 -0300 -@@ -2474,7 +2474,7 @@ +diff -Nura php-5.6.8.orig/acinclude.m4 php-5.6.8/acinclude.m4 +--- php-5.6.8.orig/acinclude.m4 2015-05-18 20:06:48.557099001 +0200 ++++ php-5.6.8/acinclude.m4 2015-05-18 20:07:33.177099001 +0200 +@@ -2470,7 +2470,7 @@ dnl if test "$found_iconv" = "no"; then
Signature · 1 line
2.1.4
PATCH 2/6 php: patch acinclude.m4 instead of aclocal.m4
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Floris" == Floris Bos <[email protected]> writes:
aclocal.m4 gets regenerated from acinclude.m4, so patch the last. Fixes "Extensions are not supported on this platform" error when loading any external (zend) extension in php.ini.
Was caused by 0001-ditch-unset.patch not being applied to the correct file, and our ac_cv_func_dlopen=yes env setting being unset.Signed-off-by Floris Bos <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/6 php: enable opcache extension in php.ini if selected
In reply to Floris BosAdd a line to load the opcache extension in php.ini, at the bottom of the "dynamic extensions" section.
--- package/php/php.mk | 3 +++ 1 file changed, 3 insertions(+)
package/php/php.mk +3 -0
@@ -296,6 +296,9 @@ define PHP_INSTALL_FIXUP $(TARGET_DIR)/etc/php.ini $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \ $(TARGET_DIR)/etc/php.ini + $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), + $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \ + $(TARGET_DIR)/etc/php.ini) endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP
Signature · 1 line
2.1.4
PATCH 3/6 php: enable opcache extension in php.ini if selected
Dear Floris Bos,
Quoted 13 lines · Floris Bos
Add a line to load the opcache extension in php.ini, at the bottom of the "dynamic extensions" section.
Signed-off-by Floris Bos <[email protected]>--- package/php/php.mk | 3 +++ 1 file changed, 3 insertions(+)package/php/php.mk +0
-0
package/php/php.mk define PHP_INSTALL_FIXUP · line 300
Quoted 5 lines
package/php/php.mk +2
-0@@ -296,6 +296,9 @@ define PHP_INSTALL_FIXUP $(TARGET_DIR)/etc/php.ini $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \ $(TARGET_DIR)/etc/php.ini + $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), + $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \
Why are you replacing the extension=php_xsl.dll line specifically?
If you're only looking at adding an extension, what about:
$(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), grep -q ^azend_extension=opcache.so $(TARGET_DIR)/etc/php.ini || \ echo azend_extension=opcache.so >> $(TARGET_DIR)/etc/php.ini)
I don't know it's a few more lines, but it seems more "correct" than hijacking some random line from php.ini, no?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/6 php: enable opcache extension in php.ini if selected
Dear Thomas,
Quoted 9 lines · Thomas Petazzoni
Quoted 8 lines · Floris Bos
Add a line to load the opcache extension in php.ini, at the bottom of the "dynamic extensions" section.
Signed-off-by Floris Bos <[email protected]>--- package/php/php.mk | 3 +++ 1 file changed, 3 insertions(+)
Quoted 11 lines
package/php/php.mk define PHP_INSTALL_FIXUP · line 300
Quoted 10 lines
package/php/php.mk +2
-0@@ -296,6 +296,9 @@ define PHP_INSTALL_FIXUP $(TARGET_DIR)/etc/php.ini $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \ $(TARGET_DIR)/etc/php.ini + $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), + $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \Why are you replacing the extension=php_xsl.dll line specifically?
I am not.
"/a" means Append line after the range specified. Replacing would be done with the "s" from Substitute instead.
Yours sincerely,
Floris Bos
PATCH 3/6 php: enable opcache extension in php.ini if selected
Floris,
Quoted 8 lines · Floris Bos
Quoted 3 lines
package/php/php.mk define PHP_INSTALL_FIXUP · line 300
Quoted 2 lines
package/php/php.mk +2
-0+ $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), + $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \Why are you replacing the extension=php_xsl.dll line specifically?
I am not.
"/a" means Append line after the range specified. Replacing would be done with the "s" from Substitute instead.
Ah, indeed, my bad. For some reason, I had in my mind that if you're using sed, you must be replacing an existing line.
So, I'm fine with your proposal.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/6 php: enable opcache extension in php.ini if selected
In reply to Floris BosQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Floris" == Floris Bos <[email protected]> writes:
Add a line to load the opcache extension in php.ini, at the bottom of the "dynamic extensions" section.
Signed-off-by Floris Bos <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/6 php: add PHP_VERSION_MAJOR variable
In reply to Floris BosAdd PHP_VERSION_MAJOR variable to php.mk for use by other packages. E.g. to install the Ioncube loader binary, it is necessary to know the PHP major version.
--- package/php/php.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/php/php.mk +2 -1
@@ -4,7 +4,8 @@ # ################################################################################ -PHP_VERSION = 5.6.8 +PHP_VERSION_MAJOR = 5.6 +PHP_VERSION = $(PHP_VERSION_MAJOR).8 PHP_SITE = http://www.php.net/distributions PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_INSTALL_STAGING = YES
Signature · 1 line
2.1.4
PATCH 4/6 php: add PHP_VERSION_MAJOR variable
Dear Floris Bos,
Quoted 3 lines · Floris Bos
Add
PHP_VERSION_MAJORvariable to php.mk for use by other packages. E.g. to install the Ioncube loader binary, it is necessary to know the PHP major version.
Are such packages going to be submitted to Buildroot at some point?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 4/6 php: add PHP_VERSION_MAJOR variable
Quoted 8 lines · Thomas Petazzoni
Dear Floris Bos,
Quoted 3 lines · Floris Bos
Add
PHP_VERSION_MAJORvariable to php.mk for use by other packages. E.g. to install the Ioncube loader binary, it is necessary to know the PHP major version.Are such packages going to be submitted to Buildroot at some point?
Maybe some time in the future.
There are currently some practical packaging problems with Ioncube, that have to be solved by the developer first.
Like that they only offer the latest version of the package for direct download, and not previous versions.
Yours sincerely,
Floris Bos
PATCH 4/6 php: add PHP_VERSION_MAJOR variable
In reply to Floris BosQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Floris" == Floris Bos <[email protected]> writes:
Add
PHP_VERSION_MAJORvariable to php.mk for use by other packages. E.g. to install the Ioncube loader binary, it is necessary to know the PHP major version.Signed-off-by Floris Bos <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 5/6 php: bump version to 5.6.9
In reply to Floris Bos--- package/php/php.hash | 2 +- package/php/php.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
package/php/php.hash +1 -1
@@ -1,2 +1,2 @@ # From http://php.net/downloads.php -md5 526a5a7f593de632cd9e8546335de8b7 php-5.6.8.tar.xz +sha256 1fac497b596f5e4e87d87a7ca90f8725e39a8ca3f9d7adb500fa83c4bb70a73f php-5.6.9.tar.xz
package/php/php.mk +1 -1
@@ -5,7 +5,7 @@ ################################################################################ PHP_VERSION_MAJOR = 5.6 -PHP_VERSION = $(PHP_VERSION_MAJOR).8 +PHP_VERSION = $(PHP_VERSION_MAJOR).9 PHP_SITE = http://www.php.net/distributions PHP_SOURCE = php-$(PHP_VERSION).tar.xz PHP_INSTALL_STAGING = YES
Signature · 1 line
2.1.4
PATCH 5/6 php: bump version to 5.6.9
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Floris" == Floris Bos <[email protected]> writes:
Signed-off-by Floris Bos <[email protected]>
Anything critical in this version bump? E.G. should we include this for the 2015.05 release?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 5/6 php: bump version to 5.6.9
Quoted 2 lines · Peter Korsgaard
Anything critical in this version bump? E.G. should we include this for the 2015.05 release?
https://bugs.php.net/bug.php?id=69418
There's a CVE regression in there, so from me for 2015.05:
PATCH 5/6 php: bump version to 5.6.9
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gustavo" == Gustavo Zacarias <[email protected]> writes:
Quoted 2 lines · Peter Korsgaard
Anything critical in this version bump? E.G. should we include this for the 2015.05 release?
https://bugs.php.net/bug.php?id=69418
There's a CVE regression in there, so from me for 2015.05:Acked-by Gustavo Zacarias <[email protected]>
Ok, committed - Thanks.
Signature · 1 line
Peter Korsgaard
PATCH 6/6 php: fpm: remove sample status page
In reply to Floris Bosphp-fpm installs a sample status page to $datadir/fpm/status.html It is not of any use in that directory, so remove it from target. If someone wants to use it, he can copy it to webroot manually.
--- package/php/php.mk | 2 ++ 1 file changed, 2 insertions(+)
package/php/php.mk +2 -0
@@ -276,6 +276,8 @@ define PHP_INSTALL_FPM_CONF $(INSTALL) -D -m 0644 package/php/php-fpm.conf \ $(TARGET_DIR)/etc/php-fpm.conf rm -f $(TARGET_DIR)/etc/php-fpm.conf.default + # remove unused sample status page /usr/php/php/fpm/status.html + rm -rf $(TARGET_DIR)/usr/php endef PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FPM_CONF
Signature · 1 line
2.1.4
PATCH 6/6 php: fpm: remove sample status page
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Floris" == Floris Bos <[email protected]> writes:
php-fpm installs a sample status page to $datadir/fpm/status.html It is not of any use in that directory, so remove it from target. If someone wants to use it, he can copy it to webroot manually.
Signed-off-by Floris Bos <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/6 php: delete /usr/lib/php/build instead of /usr/lib/php
In reply to Floris BosDear Floris Bos,
Quoted 7 lines · Floris Bos
External PHP modules like the OPcache may live in
/usr/lib/php/extensions, so only delete/usr/lib/php/buildSigned-off-by Floris Bos <[email protected]>--- package/php/php.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
This patch fixes bug #8121,
https://bugs.busybox.net/show_bug.cgi?id=8121.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/6 php: delete /usr/lib/php/build instead of /usr/lib/php
In reply to Floris BosQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Floris" == Floris Bos <[email protected]> writes:
External PHP modules like the OPcache may live in
/usr/lib/php/extensions, so only delete/usr/lib/php/buildSigned-off-by Floris Bos <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard