php8: update to 8.1.0
authorMichael Heimpold <mhei@heimpold.de>
Sun, 5 Dec 2021 13:33:57 +0000 (14:33 +0100)
committerMichael Heimpold <mhei@heimpold.de>
Mon, 6 Dec 2021 18:26:50 +0000 (19:26 +0100)
Also update patches and remove obsolete ones.
We also need to add one to prevent mod_php to be enabled
by apxs in configuration file.

While at, remove the VARIANT setting for pecl extensions.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
lang/php8/Makefile
lang/php8/files/php.ini
lang/php8/patches/0007-Add-support-for-use-of-the-system-timezone-database.patch
lang/php8/patches/0025-php-5.4.9-fixheader.patch
lang/php8/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch [deleted file]
lang/php8/patches/0050-remove-build-timestamps.patch [deleted file]
lang/php8/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch [deleted file]
lang/php8/patches/1004-disable-phar-command.patch
lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch [deleted file]
lang/php8/patches/1010-dont-try-to-install-mod_php.patch [new file with mode: 0644]
lang/php8/pecl.mk

index da0556b707f3ba72a399e194b6429f2fa8a56500..8ba30a283bacefcd8f030e6767210b9391339685 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php
-PKG_VERSION:=8.0.13
+PKG_VERSION:=8.1.0
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://www.php.net/distributions/
-PKG_HASH:=cd976805ec2e9198417651027dfe16854ba2c2c388151ab9d4d268513d52ed52
+PKG_HASH:=a1317eff0723a2b3d3122bbfe107a1158570ea2822dc35a5fb360086db0f6bbc
 
 PKG_BUILD_PARALLEL:=1
 PKG_USE_MIPS16:=0
@@ -490,9 +490,6 @@ CONFIGURE_VARS+= \
        ac_cv_u8t_decompose=yes \
        ac_cv_have_pcre2_jit=no
 
-MAKE_VARS+= \
-       HOSTCC="$(HOSTCC)"
-
 define Package/php8/conffiles
 /etc/php.ini
 /etc/php8/
index 3b8329ee963275697fb92896683900483a7e6d48..0254b43091134377838c93f0b7022f215cdfebef 100644 (file)
@@ -57,7 +57,6 @@ error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
 display_errors = On
 display_startup_errors = Off
 log_errors = Off
-log_errors_max_len = 1024
 ignore_repeated_errors = Off
 ignore_repeated_source = Off
 report_memleaks = On
index 8ca9a823f1ce7da897d058eaedb9c1ab1cd51ac4..ce1ab37ca4cdfb9f849b7900c1600b3b4947af3f 100644 (file)
@@ -1,5 +1,5 @@
 From: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
-Date: Wed, 7 Oct 2020 10:58:24 +0200
+Date: Wed, 25 Aug 2021 16:47:17 +0200
 Subject: Add-support-for-use-of-the-system-timezone-database
 
 # License: MIT
@@ -12,6 +12,8 @@ Add support for use of the system timezone database, rather
 than embedding a copy.  Discussed upstream but was not desired.
 
 History:
+r21: adapt for timelib 2021.03 (in 8.1.0)
+r20: adapt for timelib 2020.03 (in 8.0.10RC1)
 r19: adapt for timelib 2020.02 (in 8.0.0beta2)
 r18: adapt for autotool change in 7.3.3RC1
 r17: adapt for timelib 2018.01 (in 7.3.2RC1)
@@ -60,12 +62,12 @@ r1: initial revision
 +   fi
 +fi
 +
- PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
- timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
+ PHP_DATE_CFLAGS="-Wno-implicit-fallthrough -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
+ timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c
                   lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
 --- a/ext/date/lib/parse_tz.c
 +++ b/ext/date/lib/parse_tz.c
-@@ -26,8 +26,21 @@
+@@ -26,9 +26,22 @@
  #include "timelib.h"
  #include "timelib_private.h"
  
@@ -80,6 +82,7 @@ r1: initial revision
 +
 +#else
  #define TIMELIB_SUPPORTS_V2DATA
+ #define TIMELIB_SUPPORT_SLIM_FILE
  #include "timezonedb.h"
 +#endif
 +
@@ -87,7 +90,7 @@ r1: initial revision
  
  #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__))
  # if defined(__LITTLE_ENDIAN__)
-@@ -94,6 +107,11 @@ static int read_php_preamble(const unsig
+@@ -95,6 +108,11 @@ static int read_php_preamble(const unsig
  {
        uint32_t version;
  
@@ -99,7 +102,7 @@ r1: initial revision
        /* read ID */
        version = (*tzf)[3] - '0';
        *tzf += 4;
-@@ -435,7 +453,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
+@@ -577,7 +595,429 @@ void timelib_dump_tzinfo(timelib_tzinfo
        }
  }
  
@@ -530,7 +533,7 @@ r1: initial revision
  {
        int left = 0, right = tzdb->index_size - 1;
  
-@@ -461,9 +901,48 @@ static int seek_to_tz_position(const uns
+@@ -603,9 +1043,48 @@ static int seek_to_tz_position(const uns
        return 0;
  }
  
@@ -579,7 +582,7 @@ r1: initial revision
  }
  
  const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count)
-@@ -475,7 +954,30 @@ const timelib_tzdb_index_entry *timelib_
+@@ -617,7 +1096,30 @@ const timelib_tzdb_index_entry *timelib_
  int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb)
  {
        const unsigned char *tzf;
@@ -611,7 +614,7 @@ r1: initial revision
  }
  
  static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz)
-@@ -517,6 +1019,8 @@ static timelib_tzinfo* timelib_tzinfo_ct
+@@ -662,6 +1164,8 @@ static timelib_tzinfo* timelib_tzinfo_ct
  timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code)
  {
        const unsigned char *tzf;
@@ -620,7 +623,7 @@ r1: initial revision
        timelib_tzinfo *tmp;
        int version;
        int transitions_result, types_result;
-@@ -524,7 +1028,7 @@ timelib_tzinfo *timelib_parse_tzfile(con
+@@ -669,7 +1173,7 @@ timelib_tzinfo *timelib_parse_tzfile(con
  
        *error_code = TIMELIB_ERROR_NO_ERROR;
  
@@ -629,9 +632,9 @@ r1: initial revision
                tmp = timelib_tzinfo_ctor(timezone);
  
                version = read_preamble(&tzf, tmp, &type);
-@@ -563,11 +1067,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
+@@ -712,11 +1216,36 @@ timelib_tzinfo *timelib_parse_tzfile(con
+                       return NULL;
                }
-               skip_posix_string(&tzf, tmp);
  
 +#ifdef HAVE_SYSTEM_TZDATA
 +              if (memmap) {
index 344085829a694a540926f7a1d03efe644029af32..68ec1b68730fcf7f2cce5e80740ced030df092e5 100644 (file)
@@ -9,7 +9,7 @@ Make generated php_config.h constant across rebuilds.
 
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1289,7 +1289,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS)
+@@ -1387,7 +1387,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS)
  EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
  EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
  
diff --git a/lang/php8/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch b/lang/php8/patches/0041-Add-patch-to-remove-build-timestamps-from-generated-.patch
deleted file mode 100644 (file)
index 6b2ed16..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-From: Thijs Kinkhorst <thijs@debian.org>
-Date: Mon, 2 Dec 2019 22:18:43 +0100
-Subject: Add patch to remove build timestamps from generated binaries.
-
----
-
---- a/ext/standard/info.c
-+++ b/ext/standard/info.c
-@@ -792,7 +792,6 @@ PHPAPI ZEND_COLD void php_print_info(int
-               php_info_print_box_end();
-               php_info_print_table_start();
-               php_info_print_table_row(2, "System", ZSTR_VAL(php_uname));
--              php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__);
- #ifdef PHP_BUILD_SYSTEM
-               php_info_print_table_row(2, "Build System", PHP_BUILD_SYSTEM);
- #endif
---- a/sapi/apache2handler/config.m4
-+++ b/sapi/apache2handler/config.m4
-@@ -64,18 +64,9 @@ if test "$PHP_APXS2" != "no"; then
-   fi
-   APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
--  if test -z `$APXS -q SYSCONFDIR`; then
--    INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
--                 $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
--                       -i -n php"
--  else
--    APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
--    INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
--                \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
--                 $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
--                       -S SYSCONFDIR='$APXS_SYSCONFDIR' \
--                       -i -a -n php"
--  fi
-+  INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
-+               $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
-+                     -i -n php"
-   LIBPHP_CFLAGS="-shared"
-   PHP_SUBST(LIBPHP_CFLAGS)
---- a/sapi/cgi/cgi_main.c
-+++ b/sapi/cgi/cgi_main.c
-@@ -2372,9 +2372,9 @@ parent_loop_end:
-                                                       SG(headers_sent) = 1;
-                                                       SG(request_info).no_headers = 1;
- #if ZEND_DEBUG
--                                                      php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                                                      php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name,  get_zend_version());
- #else
--                                                      php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                                                      php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #endif
-                                                       php_request_shutdown((void *) 0);
-                                                       fcgi_shutdown();
---- a/sapi/cli/php_cli.c
-+++ b/sapi/cli/php_cli.c
-@@ -633,8 +633,8 @@ static int do_cli(int argc, char **argv)
-                               goto out;
-                       case 'v': /* show php version & quit */
--                              php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s",
--                                      PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
-+                              php_printf("PHP %s (%s) ( %s)\nCopyright (c) The PHP Group\n%s",
-+                                      PHP_VERSION, cli_sapi_module.name,
- #ifdef ZTS
-                                       "ZTS "
- #else
---- a/sapi/fpm/fpm/fpm_main.c
-+++ b/sapi/fpm/fpm/fpm_main.c
-@@ -1692,9 +1692,9 @@ int main(int argc, char *argv[])
-                               SG(request_info).no_headers = 1;
- #if ZEND_DEBUG
--                              php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__,        __TIME__, get_zend_version());
-+                              php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #else
--                              php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__,      get_zend_version());
-+                              php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #endif
-                               php_request_shutdown((void *) 0);
-                               fcgi_shutdown();
---- a/sapi/phpdbg/phpdbg.c
-+++ b/sapi/phpdbg/phpdbg.c
-@@ -1634,10 +1634,8 @@ phpdbg_main:
-                               phpdbg_do_help_cmd(exec);
-                       } else if (show_version) {
-                               phpdbg_out(
--                                      "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) The PHP Group\n%s",
-+                                      "phpdbg %s\nPHP %s, Copyright (c) The PHP Group\n%s",
-                                       PHPDBG_VERSION,
--                                      __DATE__,
--                                      __TIME__,
-                                       PHP_VERSION,
-                                       get_zend_version()
-                               );
diff --git a/lang/php8/patches/0050-remove-build-timestamps.patch b/lang/php8/patches/0050-remove-build-timestamps.patch
deleted file mode 100644 (file)
index 3f0149c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/sapi/litespeed/lsapi_main.c
-+++ b/sapi/litespeed/lsapi_main.c
-@@ -1276,9 +1276,9 @@ static int cli_main( int argc, char * ar
-             case 'v':
-                 if (php_request_startup() != FAILURE) {
- #if ZEND_DEBUG
--                    php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                    php_printf("PHP %s (%s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #else
--                    php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
-+                    php_printf("PHP %s (%s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
- #endif
- #ifdef PHP_OUTPUT_NEWAPI
-                     php_output_end_all();
diff --git a/lang/php8/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch b/lang/php8/patches/1001-ext-opcache-fix-detection-of-shm-mmap.patch
deleted file mode 100644 (file)
index 9fb7cf7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-From dd6ee0fb6715881b204fb4cb124db9134c1a6c7d Mon Sep 17 00:00:00 2001
-From: Michael Heimpold <mhei@heimpold.de>
-Date: Mon, 2 Dec 2019 22:42:28 +0100
-Subject: [PATCH] ext/opcache: fix detection of shm/mmap
-
-The detection of sysvipc and mmap doesn't work well when cross-compiling,
-so I decided to only check for the availability of the functions involved.
-This is not a clean solution, but works for now(tm) :-)
-
-It should be discussed with upstream to find a better solution.
-
-This solves the issue reported at
-https://github.com/openwrt/packages/issues/1010
-and makes opcache usable on OpenWrt.
-
-Signed-off-by: Michael Heimpold <mhei@heimpold.de>
----
- ext/opcache/config.m4 | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/ext/opcache/config.m4
-+++ b/ext/opcache/config.m4
-@@ -167,7 +167,10 @@ int main() {
- }
- ]])],[dnl
-     AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
--    have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
-+    have_shm_ipc=yes],[have_shm_ipc=no],[dnl
-+    AC_CHECK_FUNC(shmget,[dnl
-+        AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
-+        have_shm_ipc=yes],[have_shm_ipc=no])])
-   AC_MSG_RESULT([$have_shm_ipc])
-   AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
-@@ -219,7 +222,10 @@ int main() {
- }
- ]])],[dnl
-     AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
--    have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[have_shm_mmap_anon=no])
-+    have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[dnl
-+    AC_CHECK_FUNC(mmap,[dnl
-+        AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
-+        have_shm_mmap_anon=yes],[have_shm_mmap_anon=no])])
-   AC_MSG_RESULT([$have_shm_mmap_anon])
-   PHP_CHECK_FUNC_LIB(shm_open, rt, root)
-@@ -294,8 +300,11 @@ int main() {
-     PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])
-   ],[
-     AC_MSG_RESULT([no])
--  ],[
--    AC_MSG_RESULT([no])
-+  ],[dnl
-+    AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support])
-+    AC_MSG_RESULT([yes])
-+    have_shm_mmap_posix=yes
-+    PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])
-   ])
-   PHP_NEW_EXTENSION(opcache,
index ee2b87b4c87830ca58c2b23768986d5348380630..6aee0977ad65b42937eb020472f471a88808a1b4 100644 (file)
@@ -11,7 +11,7 @@
  
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1434,13 +1434,13 @@ CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)"
+@@ -1564,13 +1564,13 @@ CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)"
  CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
  CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
  
diff --git a/lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch b/lang/php8/patches/1010-Fix-opcache-jit-minilua-compiling.patch
deleted file mode 100644 (file)
index 6f134fa..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-From 73ea1d44c1e6b063bfa02e12919ec8a9de3709d8 Mon Sep 17 00:00:00 2001
-From: Michael Heimpold <mhei@heimpold.de>
-Date: Wed, 3 Feb 2021 22:51:34 +0100
-Subject: [PATCH] Fix opcache jit minilua compiling
-
-Signed-off-by: Michael Heimpold <mhei@heimpold.de>
----
- ext/opcache/jit/Makefile.frag | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/ext/opcache/jit/Makefile.frag
-+++ b/ext/opcache/jit/Makefile.frag
-@@ -1,6 +1,6 @@
- $(builddir)/minilua: $(srcdir)/jit/dynasm/minilua.c
--      $(CC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@
-+      $(HOSTCC) $(srcdir)/jit/dynasm/minilua.c -lm -o $@
- $(builddir)/jit/zend_jit_x86.c: $(srcdir)/jit/zend_jit_x86.dasc $(srcdir)/jit/dynasm/*.lua $(builddir)/minilua
-       $(builddir)/minilua $(srcdir)/jit/dynasm/dynasm.lua  $(DASM_FLAGS) -o $@ $(srcdir)/jit/zend_jit_x86.dasc
diff --git a/lang/php8/patches/1010-dont-try-to-install-mod_php.patch b/lang/php8/patches/1010-dont-try-to-install-mod_php.patch
new file mode 100644 (file)
index 0000000..1a4463c
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/sapi/apache2handler/config.m4
++++ b/sapi/apache2handler/config.m4
+@@ -74,7 +74,7 @@ if test "$PHP_APXS2" != "no"; then
+                 \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
+                  $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
+                        -S SYSCONFDIR='$APXS_SYSCONFDIR' \
+-                       -i -a -n php"
++                       -i -n php"
+   fi
+   LIBPHP_CFLAGS="-shared"
index 139f5575e24ef900cfdda5a7e3658c112f483fd9..4f35779fdc322f1656f65b205f9bb8081d043b41 100644 (file)
@@ -36,8 +36,6 @@ define PHP8PECLPackage
     ifneq ($(3),)
       DEPENDS+=$(3)
     endif
-
-    VARIANT:=php8
   endef
 
   define Package/php8-pecl-$(1)/install