summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-13 00:59:35 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-13 00:59:35 -0500
commit515285591af3a73e0ca578535edbcf109918f296 (patch)
treefb8e1169e1cba8ed997b572a2f946ddf23a84d8a
parenta6e5821e4da4a5296ddeaf460cd66d1f848decca (diff)
downloadpackages-515285591af3a73e0ca578535edbcf109918f296.tar.gz
packages-515285591af3a73e0ca578535edbcf109918f296.tar.bz2
packages-515285591af3a73e0ca578535edbcf109918f296.tar.xz
packages-515285591af3a73e0ca578535edbcf109918f296.zip
user/php7: Revbump for ICU 75 rebuild, libxml2 fix
-rw-r--r--user/php7/APKBUILD11
-rw-r--r--user/php7/fpm-paths.patch10
-rw-r--r--user/php7/gh14834.patch62
-rw-r--r--user/php7/zend_bool.patch2
4 files changed, 75 insertions, 10 deletions
diff --git a/user/php7/APKBUILD b/user/php7/APKBUILD
index de6c5612b..7d1f5fddf 100644
--- a/user/php7/APKBUILD
+++ b/user/php7/APKBUILD
@@ -26,7 +26,7 @@
pkgname=php7
_pkgname=php
pkgver=7.4.30
-pkgrel=0
+pkgrel=1
_apiver=20190902
_zendver=20190902
_pdover=20170320
@@ -81,6 +81,7 @@ source="https://www.php.net/distributions/$_pkgname-$pkgver.tar.bz2
disabled-tests.list
enchant-2.patch
fpm-paths.patch
+ gh14834.patch
install-pear.patch
libgd-unused-constants.patch
no-max-ent-size.patch
@@ -335,6 +336,7 @@ _build() {
build() {
export CFLAGS="$CFLAGS -fno-strict-aliasing -Wno-pointer-sign"
+ export CXXFLAGS="$CXXFLAGS -std=c++17"
# apache-httpd module
_build --disable-fpm \
@@ -382,7 +384,7 @@ check() {
}
package() {
- make -j1 INSTALL_ROOT="$pkgdir" install
+ make -j1 INSTALL_ROOT="$pkgdir" V=1 VERBOSE=1 install
install -Dm644 php.ini-production "$pkgdir"/etc/$_pkgname/php.ini
find "$pkgdir" -name '.*' | xargs rm -rf
@@ -549,9 +551,10 @@ cb3ba48fbd412f12d98ef1f88b509b40bc4ca44a16779a06d43e4db3cb8d24d54404b9e11ca941b5
a7f9ba5e11652fd1cb9e756c3269269a95de083ecb5be936a85c7a09c1396db9088e0251c6a643c40235c0e776fce2a471e5c7f5a033b85c7d3b3110c2b39e48 php-module.conf
587057aaf93feec2936e2851dbb42ba78310fc012e340d90c58a8912437a8b6a15585895490c31ac31cf36969ea1f2999993c5ca42031c378f31fb83d361fd73 disabled-tests.list
7c8c3cac9efce81d525cb5a70e1402e393881b83ef4c7b5d39d3565803d21cd283daf3d74e9a8b059ecac66cf339756acc63608ffcb83d960dba86583bd45108 enchant-2.patch
-a77dd3bdf9dc7a0f2c06ff3e7c425d062bbaa29902c17402ce98701dc99499be863ad543aa5e6a7d1c249702d6afb193398dd3199ae58e42b32b95d434fb1883 fpm-paths.patch
+846932c7bc2725c36ad319af41c8ba0e587dc2f87b40c812b1c75b73ff78da61c579d1a276b3ff70ccfee42bc69496c403423a1ed8895ba8c87776f4766061df fpm-paths.patch
+aa16fbaaae386035bfa77b3e085b055714e5660addc1d20cd0869d680f81cac53b25249550924288cfcfa6379a8dfacc075242f84f6ee532d6bc0d3529809e33 gh14834.patch
951fa8445c20513aa48bf7c7d773c6b4012322e7e7592c13d965758e761b9898c484f0dbc5ae565c05787e6ab868769c97c71504624b10c9570e1d4214f75b10 install-pear.patch
441305a96329bf8442a6b633c0a8b8e53af0e6cd5fc673057cbb6b5aeb687542894a7a068073dad0a8d8dc75aa8ca42e6b0a32e29d2a7a69c115714a75127e97 libgd-unused-constants.patch
0e88f432d273103bff203b439cc3464d34613092007c88ec8806d82c3e317ba267d70c84e5ebc3c8b2c739fa498816e0e102a22b191ee387a42146f4ecc60481 no-max-ent-size.patch
9160e5c6b8bf2d87299f38421caf498519eb42243118570754a5764b5e682c546309548e76df6163df49e841ff51fb07e50fadeed1687da5d73dec1810c393ee test-fixes.patch
-0cd6b8739533511c0d1edcb1ecff4d8d21a6b51d21f77c382645cf31d1645eeb2ebd80e2720557ceefa58f538385e097402bdc50e613dc7699bd8f033aefa543 zend_bool.patch"
+d214722c394ef69ba91920e408f2fb694d7233bfe5fd4abe9764d91733a00e2b58d530cf82c2183d59f925f7a8f995e343dc9ce1c20457f7adf3b9789f9e18c3 zend_bool.patch"
diff --git a/user/php7/fpm-paths.patch b/user/php7/fpm-paths.patch
index 56d40298b..eeaeaeda1 100644
--- a/user/php7/fpm-paths.patch
+++ b/user/php7/fpm-paths.patch
@@ -1,6 +1,6 @@
--- a/sapi/fpm/fpm/fpm_conf.c
+++ b/sapi/fpm/fpm/fpm_conf.c
-@@ -1205,7 +1205,7 @@
+@@ -1212,7 +1212,7 @@
}
if (!fpm_global_config.error_log) {
@@ -9,7 +9,7 @@
}
#ifdef HAVE_SYSTEMD
-@@ -1710,7 +1710,7 @@
+@@ -1722,7 +1722,7 @@
if (fpm_globals.prefix == NULL) {
spprintf(&tmp, 0, "%s/php-fpm.conf", PHP_SYSCONFDIR);
} else {
@@ -30,7 +30,7 @@
--- a/sapi/fpm/www.conf.in
+++ b/sapi/fpm/www.conf.in
-@@ -256,7 +256,7 @@
+@@ -257,7 +257,7 @@
; The access log file
; Default: not set
@@ -39,7 +39,7 @@
; The access log format.
; The following syntax is allowed
-@@ -320,7 +320,7 @@
+@@ -321,7 +321,7 @@
; The log file for slow requests
; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set
@@ -48,7 +48,7 @@
; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
-@@ -418,6 +418,6 @@
+@@ -434,6 +434,6 @@
; specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
diff --git a/user/php7/gh14834.patch b/user/php7/gh14834.patch
new file mode 100644
index 000000000..258b5e8f9
--- /dev/null
+++ b/user/php7/gh14834.patch
@@ -0,0 +1,62 @@
+From dc2ce0df9be530e7ee91b0dfa6eb6ce2d5e5baad Mon Sep 17 00:00:00 2001
+From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
+Date: Fri, 5 Jul 2024 23:34:09 +0200
+Subject: [PATCH] Fix GH-14834: Error installing PHP when --with-pear is used
+
+libxml2 2.13 makes changes to how the parsing state is set, update our
+code accordingly. In particular, it started reporting entities within
+attributes, while it should only report entities inside text nodes.
+---
+ ext/xml/compat.c | 2 +-
+ ext/xml/tests/gh14834.phpt | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 1 deletion(-)
+ create mode 100644 ext/xml/tests/gh14834.phpt
+
+diff --git a/ext/xml/compat.c b/ext/xml/compat.c
+index 7b463ebb5112e..7ca015acc5421 100644
+--- a/ext/xml/compat.c
++++ b/ext/xml/compat.c
+@@ -376,7 +376,7 @@ _get_entity(void *user, const xmlChar *name)
+ if (ret == NULL)
+ ret = xmlGetDocEntity(parser->parser->myDoc, name);
+
+- if (ret == NULL || (parser->parser->instate != XML_PARSER_ENTITY_VALUE && parser->parser->instate != XML_PARSER_ATTRIBUTE_VALUE)) {
++ if (ret == NULL || parser->parser->instate == XML_PARSER_CONTENT) {
+ if (ret == NULL || ret->etype == XML_INTERNAL_GENERAL_ENTITY || ret->etype == XML_INTERNAL_PARAMETER_ENTITY || ret->etype == XML_INTERNAL_PREDEFINED_ENTITY) {
+ /* Predefined entities will expand unless no cdata handler is present */
+ if (parser->h_default && ! (ret && ret->etype == XML_INTERNAL_PREDEFINED_ENTITY && parser->h_cdata)) {
+diff --git a/ext/xml/tests/gh14834.phpt b/ext/xml/tests/gh14834.phpt
+new file mode 100644
+index 0000000000000..2781ba2ed0941
+--- /dev/null
++++ b/ext/xml/tests/gh14834.phpt
+@@ -0,0 +1,29 @@
++--TEST--
++GH-14834 (Error installing PHP when --with-pear is used)
++--EXTENSIONS--
++xml
++--FILE--
++<?php
++$xml = <<<XML
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE root [
++ <!ENTITY foo "ent">
++]>
++<root>
++ <element hint="hello&apos;world">&foo;<![CDATA[ &amp; ]]><?x &amp; ?></element>
++</root>
++XML;
++
++$parser = xml_parser_create();
++xml_set_character_data_handler($parser, function($_, $data) {
++ var_dump($data);
++});
++xml_parse($parser, $xml, true);
++?>
++--EXPECT--
++string(3) "
++ "
++string(3) "ent"
++string(7) " &amp; "
++string(1) "
++"
diff --git a/user/php7/zend_bool.patch b/user/php7/zend_bool.patch
index b2e0b0f8f..cdea08533 100644
--- a/user/php7/zend_bool.patch
+++ b/user/php7/zend_bool.patch
@@ -8,7 +8,7 @@ the next 7.4 release[1], so don't bother forwarding.
--- php-7.4.4/ext/reflection/php_reflection.c 2020-03-17 06:40:26.000000000 -0400
+++ php-7.4.4/ext/reflection/php_reflection.c 2020-03-30 01:00:27.938405046 -0400
-@@ -1304,7 +1304,7 @@ static void _reflection_export(INTERNAL_
+@@ -1318,7 +1318,7 @@ static void _reflection_export(INTERNAL_
zval *argument_ptr, *argument2_ptr;
zval retval, params[2];
int result;