From 9ebb457377f7104c1f03906580454172a21f184b Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Tue, 21 Jan 2025 21:28:00 +0100 Subject: [PATCH] php8: update to 8.4.5 This is a major upgrade to latest stable PHP version. - IMAP extension was unbundled from PHP - align patch filenames with latest ones from Debian - removed obsolete patches - adapted/refreshed patches - added patch to remove call to httpd during configure Note: this assumes that 'prefork' mpm is used Upstream changelog for this specific release: https://www.php.net/ChangeLog-8.php#8.4.5 Signed-off-by: Michael Heimpold --- lang/php8/Makefile | 18 +- lang/php8/files/php.ini | 2 +- ...use-of-the-system-timezone-database.patch} | 2 +- ...e.patch => 0020-Use-system-timezone.patch} | 2 +- .../patches/0023-php-5.4.9-fixheader.patch | 22 ++ .../patches/0025-php-5.4.9-fixheader.patch | 20 -- ...ation-icon-to-not-expose-the-reader-.patch | 23 -- .../patches/1004-disable-phar-command.patch | 12 +- .../1010-dont-try-to-install-mod_php.patch | 2 +- ...und-external-libgd-feature-detection.patch | 74 +++--- .../1030-loongarch64-support-for-fibers.patch | 234 ------------------ .../1030_workaround-call-to-httpd.patch | 29 +++ 12 files changed, 100 insertions(+), 340 deletions(-) rename lang/php8/patches/{0007-Add-support-for-use-of-the-system-timezone-database.patch => 0006-Add-support-for-use-of-the-system-timezone-database.patch} (99%) rename lang/php8/patches/{0022-Use-system-timezone.patch => 0020-Use-system-timezone.patch} (94%) create mode 100644 lang/php8/patches/0023-php-5.4.9-fixheader.patch delete mode 100644 lang/php8/patches/0025-php-5.4.9-fixheader.patch delete mode 100644 lang/php8/patches/0030-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch delete mode 100644 lang/php8/patches/1030-loongarch64-support-for-fibers.patch create mode 100644 lang/php8/patches/1030_workaround-call-to-httpd.patch diff --git a/lang/php8/Makefile b/lang/php8/Makefile index 17f4262080..336926380c 100644 --- a/lang/php8/Makefile +++ b/lang/php8/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=8.3.14 +PKG_VERSION:=8.4.5 PKG_RELEASE:=1 PKG_MAINTAINER:=Michael Heimpold @@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.php.net/distributions/ -PKG_HASH:=58b4cb9019bf70c0cbcdb814c7df79b9065059d14cf7dbf48d971f8e56ae9be7 +PKG_HASH:=0d3270bbce4d9ec617befce52458b763fd461d475f1fe2ed878bb8573faed327 PKG_BUILD_PARALLEL:=1 PKG_BUILD_FLAGS:=no-mips16 @@ -28,7 +28,7 @@ PHP8_MODULES= \ exif \ fileinfo filter ftp \ gettext gd gmp \ - iconv imap intl \ + iconv intl \ ldap \ mbstring mysqli mysqlnd \ opcache openssl \ @@ -288,15 +288,6 @@ else CONFIGURE_ARGS+= --without-iconv endif -ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-imap),) - CONFIGURE_ARGS+= \ - --with-imap=shared,"$(STAGING_DIR)/usr" \ - --with-kerberos=no \ - --with-imap-ssl="$(STAGING_DIR)/usr" -else - CONFIGURE_ARGS+= --without-imap -endif - ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-intl),) CONFIGURE_ARGS+= --enable-intl=shared else @@ -337,7 +328,7 @@ else CONFIGURE_ARGS+= --disable-opcache endif -ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-openssl)$(CONFIG_PACKAGE_php8-mod-ftp)$(CONFIG_PACKAGE_php8-mod-imap)$(CONFIG_PACKAGE_php8-mod-snmp),) +ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-openssl)$(CONFIG_PACKAGE_php8-mod-ftp)$(CONFIG_PACKAGE_php8-mod-snmp),) CONFIGURE_ARGS+= \ --with-openssl=shared \ --with-kerberos=no \ @@ -651,7 +642,6 @@ $(eval $(call BuildModule,gd,GD graphics,+PACKAGE_php8-mod-gd:libgd-full)) $(eval $(call BuildModule,gettext,Gettext,+PACKAGE_php8-mod-gettext:libintl-full)) $(eval $(call BuildModule,gmp,GMP,+PACKAGE_php8-mod-gmp:libgmp)) $(eval $(call BuildModule,iconv,iConv,$(ICONV_DEPENDS))) -$(eval $(call BuildModule,imap,IMAP,+PACKAGE_php8-mod-imap:libopenssl +PACKAGE_libpam:libpam +PACKAGE_php8-mod-imap:uw-imap)) $(eval $(call BuildModule,intl,Internationalization Functions,+PACKAGE_php8-mod-intl:icu +PHP8_FULLICUDATA:icu-full-data)) $(eval $(call BuildModule,ldap,LDAP,+PACKAGE_php8-mod-ldap:libopenldap +PACKAGE_php8-mod-ldap:libsasl2)) $(eval $(call BuildModule,mbstring,MBString,+PACKAGE_php8-mod-mbstring:oniguruma)) diff --git a/lang/php8/files/php.ini b/lang/php8/files/php.ini index 0254b43091..bdbb67f327 100644 --- a/lang/php8/files/php.ini +++ b/lang/php8/files/php.ini @@ -53,7 +53,7 @@ memory_limit = 8M ; Error handling and logging ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT +error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED display_errors = On display_startup_errors = Off log_errors = Off diff --git a/lang/php8/patches/0007-Add-support-for-use-of-the-system-timezone-database.patch b/lang/php8/patches/0006-Add-support-for-use-of-the-system-timezone-database.patch similarity index 99% rename from lang/php8/patches/0007-Add-support-for-use-of-the-system-timezone-database.patch rename to lang/php8/patches/0006-Add-support-for-use-of-the-system-timezone-database.patch index 0eaead3455..96a6d53db5 100644 --- a/lang/php8/patches/0007-Add-support-for-use-of-the-system-timezone-database.patch +++ b/lang/php8/patches/0006-Add-support-for-use-of-the-system-timezone-database.patch @@ -47,7 +47,7 @@ r1: initial revision +++ b/ext/date/config0.m4 @@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h]) dnl Check for strtoll, atoll - AC_CHECK_FUNCS(strtoll atoll) + AC_CHECK_FUNCS([strtoll atoll]) +PHP_ARG_WITH(system-tzdata, for use of system timezone data, +[ --with-system-tzdata[=DIR] to specify use of system timezone data], diff --git a/lang/php8/patches/0022-Use-system-timezone.patch b/lang/php8/patches/0020-Use-system-timezone.patch similarity index 94% rename from lang/php8/patches/0022-Use-system-timezone.patch rename to lang/php8/patches/0020-Use-system-timezone.patch index 1ac44204b6..78877b94e4 100644 --- a/lang/php8/patches/0022-Use-system-timezone.patch +++ b/lang/php8/patches/0020-Use-system-timezone.patch @@ -15,7 +15,7 @@ To be used in tandem with use_embedded_timezonedb.patch and use_embedded_timezon --- a/ext/date/php_date.c +++ b/ext/date/php_date.c -@@ -568,6 +568,23 @@ static const char* guess_timezone(const +@@ -566,6 +566,23 @@ static const char* guess_timezone(const } else if (*DATEG(default_timezone)) { return DATEG(default_timezone); } diff --git a/lang/php8/patches/0023-php-5.4.9-fixheader.patch b/lang/php8/patches/0023-php-5.4.9-fixheader.patch new file mode 100644 index 0000000000..c52cf495db --- /dev/null +++ b/lang/php8/patches/0023-php-5.4.9-fixheader.patch @@ -0,0 +1,22 @@ +From: Debian PHP Maintainers +Date: Sat, 2 May 2015 10:26:56 +0200 +Subject: php-5.4.9-fixheader + +Make generated php_config.h constant across rebuilds. +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -1392,8 +1392,8 @@ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PR + + AC_ARG_VAR([PHP_UNAME], + [System information (defaults to the 'uname -a' output)]) +-AS_VAR_IF([PHP_UNAME],, [PHP_UNAME=$(uname -a | xargs)]) +-AC_DEFINE_UNQUOTED([PHP_UNAME], ["$PHP_UNAME"], [The 'uname -a' output.]) ++AS_VAR_IF([PHP_UNAME],, [PHP_UNAME=$(uname | xargs)]) ++AC_DEFINE_UNQUOTED([PHP_UNAME], ["$PHP_UNAME"], [The 'uname' output.]) + + PHP_OS=$(uname | xargs) + AC_DEFINE_UNQUOTED([PHP_OS], ["$PHP_OS"], [The 'uname' output.]) diff --git a/lang/php8/patches/0025-php-5.4.9-fixheader.patch b/lang/php8/patches/0025-php-5.4.9-fixheader.patch deleted file mode 100644 index b423fc1026..0000000000 --- a/lang/php8/patches/0025-php-5.4.9-fixheader.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Debian PHP Maintainers -Date: Sat, 2 May 2015 10:26:56 +0200 -Subject: php-5.4.9-fixheader - -Make generated php_config.h constant across rebuilds. ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -1501,7 +1501,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS) - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" - EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" - --UNAME=`uname -a | xargs` -+UNAME=`uname | xargs` - PHP_UNAME=${PHP_UNAME:-$UNAME} - AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output]) - PHP_OS=`uname | xargs` diff --git a/lang/php8/patches/0030-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch b/lang/php8/patches/0030-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch deleted file mode 100644 index 9934d1b2c2..0000000000 --- a/lang/php8/patches/0030-Remove-W3C-validation-icon-to-not-expose-the-reader-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= -Date: Wed, 29 Jul 2015 14:37:55 +0200 -Subject: Remove W3C validation icon to not expose the reader's IP address to - potential tracking. - ---- - sapi/fpm/status.html.in | 5 ----- - 1 file changed, 5 deletions(-) - ---- a/sapi/fpm/status.html.in -+++ b/sapi/fpm/status.html.in -@@ -70,11 +70,6 @@ - PID↓Start TimeStart SinceRequests ServedRequest DurationRequest methodRequest URIContent LengthUserScriptLast Request %CPULast Request Memory - - --

-- -- Valid XHTML 1.0 Transitional -- --

-