[packages/php/PHP_5_2] Rel 46; fix some issues and disable problematic modules (not worth fixing for such old php)
arekm
arekm at pld-linux.org
Thu Jul 17 14:58:40 CEST 2025
commit a8ddc8b152897f93dab46c662b58f3e943f06e66
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Jul 17 14:58:15 2025 +0200
Rel 46; fix some issues and disable problematic modules (not worth fixing for such old php)
mbstring.patch | 20 ++++++++++++++++++++
pgsql.patch | 34 ++++++++++++++++++++++++++++++++++
php.spec | 21 +++++++++++++++------
xmlwriter.patch | 11 +++++++++++
zip.patch | 11 +++++++++++
5 files changed, 91 insertions(+), 6 deletions(-)
---
diff --git a/php.spec b/php.spec
index d925b77..63661f7 100644
--- a/php.spec
+++ b/php.spec
@@ -38,15 +38,15 @@
%bcond_without curl # without CURL extension module
%bcond_without filter # without filter extension module
%bcond_without imap # without IMAP extension module
-%bcond_without interbase # without InterBase extension module
+%bcond_with interbase # without InterBase extension module
%bcond_without ldap # without LDAP extension module
%bcond_without mhash # without mhash extension module
%bcond_without mime_magic # without mime-magic module
%bcond_with ming # with ming extension module
%bcond_without mm # without mm support for session storage
-%bcond_without mssql # without MS SQL extension module
+%bcond_with mssql # without MS SQL extension module
%bcond_without mysqli # without mysqli support (Requires mysql > 4.1)
-%bcond_without odbc # without ODBC extension module
+%bcond_with odbc # without ODBC extension module
%bcond_without openssl # without OpenSSL support and OpenSSL extension (module)
%bcond_without pcre # without PCRE extension module
%bcond_without pgsql # without PostgreSQL extension module
@@ -54,8 +54,8 @@
%bcond_without recode # without recode extension module
%bcond_without snmp # without SNMP extension module
%bcond_without sqlite # without SQLite extension module
-%bcond_without sybase # without Sybase extension module
-%bcond_without sybase_ct # without Sybase-CT extension module
+%bcond_with sybase # without Sybase extension module
+%bcond_with sybase_ct # without Sybase-CT extension module
%bcond_without tidy # without Tidy extension module
%bcond_without wddx # without WDDX extension module
%bcond_without xmlrpc # without XML-RPC extension module
@@ -112,7 +112,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
%define magic_mime /usr/share/misc/magic.mime
%endif
-%define rel 45
+%define rel 46
%define orgname php
%define ver_suffix 52
%define php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -232,6 +232,10 @@ Patch82: libxml2.patch
Patch83: readdir.patch
Patch84: fopencookie.patch
Patch85: curl.patch
+Patch86: mbstring.patch
+Patch87: pgsql.patch
+Patch88: zip.patch
+Patch89: xmlwriter.patch
# CENTALT patches
# Backport from 5.3.6
Patch311: php-5.3.6-bug-47435.patch
@@ -288,6 +292,7 @@ BuildRequires: libxslt-devel >= 1.1.0
%{?with_ming:BuildRequires: ming-devel >= 0.3}
%{?with_mm:BuildRequires: mm-devel >= 1.3.0}
BuildRequires: mysql-devel >= 4.0.0
+BuildRequires: mysql-devel < 6.0
%{?with_mysqli:BuildRequires: mysql-devel >= 4.1}
BuildRequires: ncurses-ext-devel
%{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7}
@@ -1998,6 +2003,10 @@ done
%patch -P83 -p1
%patch -P84 -p1
%patch -P85 -p1
+%patch -P86 -p1
+%patch -P87 -p1
+%patch -P88 -p1
+%patch -P89 -p1
# Bugfix backport from 5.3.6
%patch -P311 -p1 -b .bug-47435
diff --git a/mbstring.patch b/mbstring.patch
new file mode 100644
index 0000000..b87bc80
--- /dev/null
+++ b/mbstring.patch
@@ -0,0 +1,20 @@
+--- php-5.2.17/ext/mbstring/mbstring.c.org 2010-01-03 10:23:27.000000000 +0100
++++ php-5.2.17/ext/mbstring/mbstring.c 2025-07-17 13:25:23.262801399 +0200
+@@ -4277,7 +4277,7 @@ MBSTRING_API int php_mb_stripos(int mode
+ needle.no_encoding = MBSTRG(current_internal_encoding);
+
+ do {
+- haystack.val = php_unicode_convert_case(PHP_UNICODE_CASE_UPPER, old_haystack, (size_t) old_haystack_len, &haystack.len, from_encoding TSRMLS_CC);
++ haystack.val = php_unicode_convert_case(PHP_UNICODE_CASE_UPPER, old_haystack, (size_t) old_haystack_len, (unsigned long *)&haystack.len, from_encoding TSRMLS_CC);
+
+ if (!haystack.val) {
+ break;
+@@ -4287,7 +4287,7 @@ MBSTRING_API int php_mb_stripos(int mode
+ break;
+ }
+
+- needle.val = php_unicode_convert_case(PHP_UNICODE_CASE_UPPER, old_needle, (size_t) old_needle_len, &needle.len, from_encoding TSRMLS_CC);
++ needle.val = php_unicode_convert_case(PHP_UNICODE_CASE_UPPER, old_needle, (size_t) old_needle_len, (unsigned long *)&needle.len, from_encoding TSRMLS_CC);
+
+ if (!needle.val) {
+ break;
diff --git a/pgsql.patch b/pgsql.patch
new file mode 100644
index 0000000..11ba645
--- /dev/null
+++ b/pgsql.patch
@@ -0,0 +1,34 @@
+--- php-5.2.17/ext/pdo_pgsql/pgsql_driver.c~ 2010-01-12 13:46:54.000000000 +0100
++++ php-5.2.17/ext/pdo_pgsql/pgsql_driver.c 2025-07-17 14:27:34.374458676 +0200
+@@ -309,16 +309,17 @@ static int pgsql_handle_quoter(pdo_dbh_t
+ {
+ unsigned char *escaped;
+ pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
++ size_t tmp_len;
+
+ switch (paramtype) {
+ case PDO_PARAM_LOB:
+ /* escapedlen returned by PQescapeBytea() accounts for trailing 0 */
+ #ifdef HAVE_PQESCAPE_BYTEA_CONN
+- escaped = PQescapeByteaConn(H->server, unquoted, unquotedlen, quotedlen);
++ escaped = PQescapeByteaConn(H->server, unquoted, unquotedlen, &tmp_len);
+ #else
+- escaped = PQescapeBytea(unquoted, unquotedlen, quotedlen);
++ escaped = PQescapeBytea(unquoted, unquotedlen, &tmp_len);
+ #endif
+- *quotedlen += 1;
++ *quotedlen = (int)tmp_len + 1;
+ *quoted = emalloc(*quotedlen + 1);
+ memcpy((*quoted)+1, escaped, *quotedlen-2);
+ (*quoted)[0] = '\'';
+--- php-5.2.17/ext/pgsql/pgsql.c~ 2025-07-17 14:18:21.000000000 +0200
++++ php-5.2.17/ext/pgsql/pgsql.c 2025-07-17 14:32:24.582521071 +0200
+@@ -272,7 +272,7 @@ ZEND_GET_MODULE(pgsql)
+ static int le_link, le_plink, le_result, le_lofp, le_string;
+
+ /* {{{ _php_pgsql_trim_message */
+-static char * _php_pgsql_trim_message(const char *message, int *len)
++static char * _php_pgsql_trim_message(const char *message, size_t *len)
+ {
+ register int i = strlen(message)-1;
+
diff --git a/xmlwriter.patch b/xmlwriter.patch
new file mode 100644
index 0000000..b52e8ba
--- /dev/null
+++ b/xmlwriter.patch
@@ -0,0 +1,11 @@
+--- php-5.2.17/ext/xmlwriter/php_xmlwriter.c~ 2025-07-17 14:40:39.000000000 +0200
++++ php-5.2.17/ext/xmlwriter/php_xmlwriter.c 2025-07-17 14:48:41.012841386 +0200
+@@ -28,7 +28,7 @@
+ #include "php_ini.h"
+ #include "ext/standard/info.h"
+ #include "php_xmlwriter.h"
+-
++#include "ext/standard/php_string.h"
+
+ #if LIBXML_VERSION >= 20605
+ static PHP_FUNCTION(xmlwriter_set_indent);
diff --git a/zip.patch b/zip.patch
new file mode 100644
index 0000000..dfec0dd
--- /dev/null
+++ b/zip.patch
@@ -0,0 +1,11 @@
+--- php-5.2.17/ext/zip/php_zip.c~ 2025-07-17 14:18:21.000000000 +0200
++++ php-5.2.17/ext/zip/php_zip.c 2025-07-17 14:38:24.975456935 +0200
+@@ -436,7 +436,7 @@ static int php_zip_extract_file(struct z
+ len = spprintf(&file_dirname_fullpath, 0, "%s/%s", dest, file_dirname);
+ }
+
+- php_basename(path_cleaned, path_cleaned_len, NULL, 0, &file_basename, (unsigned int *)&file_basename_len TSRMLS_CC);
++ php_basename(path_cleaned, path_cleaned_len, NULL, 0, &file_basename, &file_basename_len TSRMLS_CC);
+
+ if (OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) {
+ efree(file_dirname_fullpath);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/a8ddc8b152897f93dab46c662b58f3e943f06e66
More information about the pld-cvs-commit
mailing list