From 7f67ab6133bac86aeb7d6dde95412a9eb30ff173 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 Nov 2024 12:12:02 +0100 Subject: update to 4.2.6 --- PHPINFO | 8 ++-- REFLECTION | 18 ++++----- pecl_http-build.patch | 22 ----------- pecl_http-curl.patch | 27 -------------- pecl_http-php84.patch | 100 -------------------------------------------------- php-pecl-http.spec | 59 +++++++---------------------- 6 files changed, 27 insertions(+), 207 deletions(-) delete mode 100644 pecl_http-build.patch delete mode 100644 pecl_http-curl.patch delete mode 100644 pecl_http-php84.patch diff --git a/PHPINFO b/PHPINFO index b554302..1217d27 100644 --- a/PHPINFO +++ b/PHPINFO @@ -2,13 +2,13 @@ http HTTP Support => enabled -Extension Version => 4.2.4 +Extension Version => 4.2.6 Used Library => Compiled => Linked -libz => 1.2.12 => 1.2.12 -libcurl => 7.85.0 => 7.85.0 +libz => 1.2.13 => 1.2.13 +libcurl => 8.2.1 => 8.2.1 libevent => 2.1.12-stable => 2.1.12-stable -libicu (IDNA2008/IDNA2003) => 72.1 => 72.1 +libicu (IDNA2008/IDNA2003) => 74.2 => 74.2 libidn2 (IDNA2008) => disabled => disabled libidn (IDNA2003) => disabled => disabled libidnkit2 (IDNA2008) => disabled => disabled diff --git a/REFLECTION b/REFLECTION index 9c05ddb..7737c82 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #114 http version 4.2.4 ] { +Extension [ extension #116 http version 4.2.6 ] { - Dependencies { Dependency [ raphf (Required) ] @@ -12,7 +12,7 @@ Extension [ extension #114 http version 4.2.4 ] { } - Constants [90] { - Constant [ int http\Client\Curl\FEATURES ] { 1371522973 } + Constant [ int http\Client\Curl\FEATURES ] { 1362036621 } Constant [ int http\Client\Curl\Features\IPV6 ] { 1 } Constant [ int http\Client\Curl\Features\KERBEROS4 ] { 2 } Constant [ int http\Client\Curl\Features\SSL ] { 4 } @@ -39,15 +39,15 @@ Extension [ extension #114 http version 4.2.4 ] { Constant [ int http\Client\Curl\Features\ZSTD ] { 67108864 } Constant [ int http\Client\Curl\Features\UNICODE ] { 134217728 } Constant [ int http\Client\Curl\Features\HSTS ] { 268435456 } - Constant [ string http\Client\Curl\VERSIONS ] { libcurl/7.85.0 OpenSSL/3.0.9 zlib/1.2.12 brotli/1.0.9 libidn2/2.3.4 libpsl/0.21.1 (+libidn2/2.3.3) libssh/0.10.5/openssl/zlib nghttp2/1.51.0 } - Constant [ string http\Client\Curl\Versions\CURL ] { 7.85.0 } - Constant [ string http\Client\Curl\Versions\SSL ] { OpenSSL/3.0.9 } - Constant [ string http\Client\Curl\Versions\LIBZ ] { 1.2.12 } + Constant [ string http\Client\Curl\VERSIONS ] { libcurl/8.2.1 OpenSSL/3.1.4 zlib/1.2.13 libidn2/2.3.7 nghttp2/1.55.1 } + Constant [ string http\Client\Curl\Versions\CURL ] { 8.2.1 } + Constant [ string http\Client\Curl\Versions\SSL ] { OpenSSL/3.1.4 } + Constant [ string http\Client\Curl\Versions\LIBZ ] { 1.2.13 } Constant [ null http\Client\Curl\Versions\ARES ] { } - Constant [ string http\Client\Curl\Versions\IDN ] { 2.3.4 } + Constant [ string http\Client\Curl\Versions\IDN ] { 2.3.7 } Constant [ null http\Client\Curl\Versions\ICONV ] { } - Constant [ string http\Client\Curl\Versions\BROTLI ] { 1.0.9 } - Constant [ string http\Client\Curl\Versions\NGHTTP2 ] { 1.51.0 } + Constant [ null http\Client\Curl\Versions\BROTLI ] { } + Constant [ string http\Client\Curl\Versions\NGHTTP2 ] { 1.55.1 } Constant [ null http\Client\Curl\Versions\QUIC ] { } Constant [ string http\Client\Curl\Versions\CAINFO ] { /etc/pki/tls/certs/ca-bundle.crt } Constant [ null http\Client\Curl\Versions\CAPATH ] { } diff --git a/pecl_http-build.patch b/pecl_http-build.patch deleted file mode 100644 index 887a6ed..0000000 --- a/pecl_http-build.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 88e279db21e25244ecb6b804af0a6565db4ecbf1 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Mon, 29 Jan 2024 16:10:26 +0100 -Subject: [PATCH] Fix incompatible pointer types - ---- - src/php_http_url.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/php_http_url.c b/src/php_http_url.c -index 943a436c..459396f3 100644 ---- a/src/php_http_url.c -+++ b/src/php_http_url.c -@@ -73,7 +73,7 @@ static inline char *localhostname(void) - static php_http_url_t *php_http_url_from_env(void) - { - zval *https, *zhost, *zport; -- long port; -+ zend_long port; - php_http_buffer_t buf; - - php_http_buffer_init_ex(&buf, MAX(PHP_HTTP_BUFFER_DEFAULT_SIZE, sizeof(php_http_url_t)<<2), PHP_HTTP_BUFFER_INIT_PREALLOC); diff --git a/pecl_http-curl.patch b/pecl_http-curl.patch deleted file mode 100644 index e10b05c..0000000 --- a/pecl_http-curl.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9c0294956c75fda02269432ba4f693afecea1c5b Mon Sep 17 00:00:00 2001 -From: Michael Wallner -Date: Tue, 27 Aug 2024 19:59:56 +0200 -Subject: [PATCH] curl: add workaround for CURLOPT_INTERFACE for v8.9-8.10 - ---- - src/php_http_client_curl.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c -index 4decc7a..ed778b1 100644 ---- a/src/php_http_client_curl.c -+++ b/src/php_http_client_curl.c -@@ -1413,7 +1413,12 @@ static void php_http_curle_options_init(php_http_options_t *registry) - #endif - - /* outgoing interface */ -- php_http_option_register(registry, ZEND_STRL("interface"), CURLOPT_INTERFACE, IS_STRING); -+ if ((opt = php_http_option_register(registry, ZEND_STRL("interface"), CURLOPT_INTERFACE, IS_STRING))) { -+#if PHP_HTTP_CURL_VERSION(8,9,0) && !PHP_HTTP_CURL_VERSION(8,10,0) -+ // NULL support lost in v8.9 and restored in libcurl v8.10 -+ opt->flags |= PHP_HTTP_CURLE_OPTION_IGNORE_RC; -+#endif -+ } - if ((opt = php_http_option_register(registry, ZEND_STRL("portrange"), CURLOPT_LOCALPORT, IS_ARRAY))) { - opt->setter = php_http_curle_option_set_portrange; - } diff --git a/pecl_http-php84.patch b/pecl_http-php84.patch deleted file mode 100644 index 93ca5b1..0000000 --- a/pecl_http-php84.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 74984d42a8b71fefc6f3400e0a569f778a0f101e Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 9 Jul 2024 15:33:05 +0200 -Subject: [PATCH 1/2] Fix header name for 8.4 - ---- - src/php_http_message_body.c | 4 ++++ - src/php_http_misc.c | 4 ++++ - 2 files changed, 8 insertions(+) - -diff --git a/src/php_http_message_body.c b/src/php_http_message_body.c -index 8bde1a77..105e369c 100644 ---- a/src/php_http_message_body.c -+++ b/src/php_http_message_body.c -@@ -12,7 +12,11 @@ - - #include "php_http_api.h" - -+#if PHP_VERSION_ID < 80400 - #include "ext/standard/php_lcg.h" -+#else -+#include "ext/random/php_random.h" -+#endif - - #define BOUNDARY_OPEN(body) \ - do {\ -diff --git a/src/php_http_misc.c b/src/php_http_misc.c -index 261387f6..d5da37fd 100644 ---- a/src/php_http_misc.c -+++ b/src/php_http_misc.c -@@ -12,7 +12,11 @@ - - #include "php_http_api.h" - -+#if PHP_VERSION_ID < 80400 - #include "ext/standard/php_lcg.h" -+#else -+#include "ext/random/php_random.h" -+#endif - #include "zend_exceptions.h" - - /* SLEEP */ - -From e0919d1756b661573a248c8b83705cd05094c0c8 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 9 Jul 2024 15:33:22 +0200 -Subject: [PATCH 2/2] Fix tests for 8.4 - ---- - tests/client002.phpt | 2 +- - tests/client028.phpt | 2 +- - tests/info002.phpt | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/client002.phpt b/tests/client002.phpt -index d020f16e..8849ae94 100644 ---- a/tests/client002.phpt -+++ b/tests/client002.phpt -@@ -15,7 +15,7 @@ echo "Test\n"; - class Observer implements SplObserver - { - #[ReturnTypeWillChange] -- function update(SplSubject $client, http\Client\Request $request = null, StdClass $progress = null) { -+ function update(SplSubject $client, ?http\Client\Request $request = null, ?StdClass $progress = null) { - echo "P"; - /* fence against buggy infof() calls in some curl versions */ - $compare = $client->getProgressInfo($request); -diff --git a/tests/client028.phpt b/tests/client028.phpt -index f14fb8e5..58adc685 100644 ---- a/tests/client028.phpt -+++ b/tests/client028.phpt -@@ -80,7 +80,7 @@ class UserHandler implements http\Client\Curl\User - return count($this->client); - } - -- function wait(int $timeout_ms = null) { -+ function wait(?int $timeout_ms = null) { - echo "W"; - - if ($timeout_ms === null) { -diff --git a/tests/info002.phpt b/tests/info002.phpt -index 4d034403..44172b8d 100644 ---- a/tests/info002.phpt -+++ b/tests/info002.phpt -@@ -37,13 +37,13 @@ Test - http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in %sinfo002.php:%d - Stack trace: - #0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...') --#1 %sinfo002.php(%d): {closure}() -+#1 %sinfo002.php(%d): {closur%s}() - #2 %sinfo002.php(%d): trap(Object(Closure)) - #3 {main} - http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in %sinfo002.php:%d - Stack trace: - #0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....') --#1 %sinfo002.php(%d): {closure}() -+#1 %sinfo002.php(%d): {closur%s}() - #2 %sinfo002.php(%d): trap(Object(Closure)) - #3 {main} - HTTP/1.1 200 diff --git a/php-pecl-http.spec b/php-pecl-http.spec index d3c8927..ba7b312 100644 --- a/php-pecl-http.spec +++ b/php-pecl-http.spec @@ -10,50 +10,35 @@ # Please, preserve the changelog entries # %if 0%{?scl:1} -%scl_package php-pecl-http +%scl_package php-pecl-http %else %global _root_prefix %{_prefix} %endif -%bcond_without libbrotli +%bcond_without libbrotli +%bcond_without tests %global gh_commit a84b499418ee7b8992fd9e7e2abc661735a869bd %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner m6w6 %global gh_project ext-http -#global gh_date 20150928 # The project is pecl_http but the extension is only http -%global proj_name pecl_http -%global pecl_name http -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global proj_name pecl_http +%global pecl_name http +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} # after 40-raphf -%global ini_name 50-%{pecl_name}.ini -%ifarch %{arm} -# Test suite disabled because of erratic results on slow ARM (timeout) -%bcond_with tests -%else -%bcond_without tests -%endif +%global ini_name 50-%{pecl_name}.ini -%global upstream_version 4.2.4 +%global upstream_version 4.2.6 #global upstream_prever beta1 #global upstream_lower beta1 -%if 0%{?gh_date:1} -%global sources %{gh_project}-%{gh_commit} -%else %global sources %{proj_name}-%{upstream_version}%{?upstream_prever} -%endif %global _configure ../%{sources}/configure Name: %{?scl_prefix}php-pecl-http Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -%if 0%{?gh_date:1} -Release: 0.10.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz -%else -Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{proj_name}-%{upstream_version}%{?upstream_prever}.tgz -%endif Summary: Extended HTTP support License: BSD-2-Clause @@ -62,10 +47,6 @@ URL: https://pecl.php.net/package/pecl_http # From http://www.php.net/manual/en/http.configuration.php Source1: %{proj_name}.ini -Patch0: %{proj_name}-build.patch -Patch1: %{proj_name}-php84.patch -Patch2: %{proj_name}-curl.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 8.0 @@ -131,20 +112,13 @@ These are the files needed to compile programs using HTTP extension. %prep %setup -c -q -%if 0%{?gh_date} -mv NTS/package.xml . -%endif sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml cd %{sources} -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 - extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h) -if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}%{?gh_date:dev}"; then - : Error: Upstream HTTP version is now ${extver}, expecting %{upstream_version}%{?upstream_prever}%{?gh_date:dev}. +if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then + : Error: Upstream HTTP version is now ${extver}, expecting %{upstream_version}%{?upstream_prever}. : Update the pdover macro and rebuild. exit 1 fi @@ -154,7 +128,6 @@ cp %{SOURCE1} %{ini_name} mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build mkdir ZTS %endif @@ -274,13 +247,6 @@ TEST_PHP_ARGS="-n $modules -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ $modules \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' - -%if %{with tests} -: Upstream test suite ZTS extension -TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="-n $modules -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ -%{__ztsphp} -n run-tests.php -q --show-diff -%endif %endif @@ -306,6 +272,9 @@ TEST_PHP_ARGS="-n $modules -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ %changelog +* Wed Nov 6 2024 Remi Collet - 4.2.6-1 +- update to 4.2.6 + * Mon Sep 30 2024 Remi Collet - 4.2.4-6 - add upstream patch for libcurl 8.9 -- cgit