aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php/php
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/php/php')
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch93
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch (renamed from meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch)85
-rw-r--r--meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch (renamed from meta-oe/recipes-devtools/php/php/0001-php.m4-don-t-unset-cache-variables.patch)16
-rw-r--r--meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch36
-rw-r--r--meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch (renamed from meta-oe/recipes-devtools/php/php/0001-configure.ac-don-t-include-build-libtool.m4.patch)15
-rw-r--r--meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch (renamed from meta-oe/recipes-devtools/php/php/pear-makefile.patch)21
-rw-r--r--meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch (renamed from meta-oe/recipes-devtools/php/php/phar-makefile.patch)20
-rw-r--r--meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch (renamed from meta-oe/recipes-devtools/php/php/php_exec_native.patch)16
-rw-r--r--meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch (renamed from meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch)18
-rw-r--r--meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch (renamed from meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch)18
-rw-r--r--meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch35
-rw-r--r--meta-oe/recipes-devtools/php/php/70_mod_php8.conf (renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf)4
-rwxr-xr-xmeta-oe/recipes-devtools/php/php/debian-php-fixheader.patch31
-rw-r--r--meta-oe/recipes-devtools/php/php/iconv.patch41
-rw-r--r--meta-oe/recipes-devtools/php/php/php-fpm.service55
-rw-r--r--meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch34
16 files changed, 345 insertions, 193 deletions
diff --git a/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch
new file mode 100644
index 0000000000..5b8c76209a
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch
@@ -0,0 +1,93 @@
+From 1eeb59366d6140a799f6051fb9f57d988b81fd5b Mon Sep 17 00:00:00 2001
+From: easyaspi314 <easyaspi314@users.noreply.github.com>
+Date: Wed, 12 Apr 2023 13:33:07 +0800
+Subject: [PATCH] Change whether to inline XXH3_hashLong_withSecret to a config
+ option
+
+Change whether to inline XXH3_hashLong_withSecret to a config option to fix
+GCC 12 -Og.
+
+Upstream-Status: Submitted [https://github.com/php/php-src/pull/11062]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ ext/hash/xxhash/xxhash.h | 35 +++++++++++++++++++++++++++++++++--
+ 1 file changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/ext/hash/xxhash/xxhash.h b/ext/hash/xxhash/xxhash.h
+index b5bd2864..8e816c05 100644
+--- a/ext/hash/xxhash/xxhash.h
++++ b/ext/hash/xxhash/xxhash.h
+@@ -1375,6 +1375,23 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
+ */
+ # define XXH_NO_INLINE_HINTS 0
+
++/*!
++ * @def XXH3_INLINE_SECRET
++ * @brief Determines whether to inline the XXH3 withSecret code.
++ *
++ * When the secret size is known, the compiler can improve the performance
++ * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret().
++ *
++ * However, if the secret size is not known, it doesn't have any benefit. This
++ * happens when xxHash is compiled into a global symbol. Therefore, if
++ * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0.
++ *
++ * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers
++ * that are *sometimes* force inline on -Og, and it is impossible to automatically
++ * detect this optimization level.
++ */
++# define XXH3_INLINE_SECRET 0
++
+ /*!
+ * @def XXH32_ENDJMP
+ * @brief Whether to use a jump for `XXH32_finalize`.
+@@ -1439,6 +1456,15 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
+ # endif
+ #endif
+
++#ifndef XXH3_INLINE_SECRET
++# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \
++ || !defined(XXH_INLINE_ALL)
++# define XXH3_INLINE_SECRET 0
++# else
++# define XXH3_INLINE_SECRET 1
++# endif
++#endif
++
+ #ifndef XXH32_ENDJMP
+ /* generally preferable for performance */
+ # define XXH32_ENDJMP 0
+@@ -1515,6 +1541,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
+ # define XXH_NO_INLINE static
+ #endif
+
++#if XXH3_INLINE_SECRET
++# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE
++#else
++# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE
++#endif
+
+
+ /* *************************************
+@@ -4465,7 +4496,7 @@ XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len,
+ * so that the compiler can properly optimize the vectorized loop.
+ * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set.
+ */
+-XXH_FORCE_INLINE XXH64_hash_t
++XXH3_WITH_SECRET_INLINE XXH64_hash_t
+ XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len,
+ XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
+ {
+@@ -5263,7 +5294,7 @@ XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len,
+ * It's important for performance to pass @secretLen (when it's static)
+ * to the compiler, so that it can properly optimize the vectorized loop.
+ */
+-XXH_FORCE_INLINE XXH128_hash_t
++XXH3_WITH_SECRET_INLINE XXH128_hash_t
+ XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len,
+ XXH64_hash_t seed64,
+ const void* XXH_RESTRICT secret, size_t secretLen)
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch
index 1f3e683a0f..c743697469 100644
--- a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch
@@ -1,13 +1,11 @@
-From a74b42098aededd296ec6a3cd4cf5a17e59d6f29 Mon Sep 17 00:00:00 2001
-From: Claude Bing <cbing@cybernetics.com>
-Date: Fri, 8 May 2020 10:15:32 -0400
-Subject: [PATCH] opcache/config.m4: enable opcache
+From 889583912ddd7abc628f2703892ec4884db6419a Mon Sep 17 00:00:00 2001
+From: Soumya Sambu <soumya.sambu@windriver.com>
+Date: Tue, 7 May 2024 08:39:16 +0000
+Subject: [PATCH 01/11] ext/opcache/config.m4: enable opcache
-We can't use AC_TRY_RUN to run programs in a cross compile environment.
-Set
-the variables directly instead since we know that we'd be running on
-latest
-enough linux kernel.
+We can't use AC_TRY_RUN to run programs in a cross compile
+environment. Set the variables directly instead since we know
+that we'd be running on latest enough linux kernel.
Upstream-Status: Inappropriate [Configuration]
@@ -16,17 +14,24 @@ Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
update patch to version 7.4.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+update patch to version 8.0.12
fix issue linking with librt
Signed-off-by: Claude Bing <cbing@cybernetics.com>
+
+update patch to version 8.1.0
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
+update patch to version 8.2.18
+Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
---
- ext/opcache/config.m4 | 195 +-----------------------------------------
- 1 file changed, 4 insertions(+), 191 deletions(-)
+ ext/opcache/config.m4 | 204 ++----------------------------------------
+ 1 file changed, 8 insertions(+), 196 deletions(-)
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index 6c40cafc1c..6569aa9e1c 100644
+index 6bf07ad3..5d645b86 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
-@@ -23,201 +23,14 @@ if test "$PHP_OPCACHE" != "no"; then
+@@ -113,209 +113,21 @@ if test "$PHP_OPCACHE" != "no"; then
AC_CHECK_FUNCS([mprotect])
AC_MSG_CHECKING(for sysvipc shared memory support)
@@ -38,7 +43,7 @@ index 6c40cafc1c..6569aa9e1c 100644
-#include <unistd.h>
-#include <string.h>
-
--int main() {
+-int main(void) {
- pid_t pid;
- int status;
- int ipc_id;
@@ -94,11 +99,13 @@ index 6c40cafc1c..6569aa9e1c 100644
- }
- return 0;
-}
--]])],[dnl
+-]])],[have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+- if test "$have_shm_ipc" = "yes"; then
- AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])
+- fi
+ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
++ have_shm_ipc=yes
+ AC_MSG_RESULT([$have_shm_ipc])
AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -116,9 +123,8 @@ index 6c40cafc1c..6569aa9e1c 100644
-#ifndef MAP_FAILED
-# define MAP_FAILED ((void*)-1)
-#endif
-+ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
-
--int main() {
+-
+-int main(void) {
- pid_t pid;
- int status;
- char *shm;
@@ -148,12 +154,24 @@ index 6c40cafc1c..6569aa9e1c 100644
- }
- return 0;
-}
--]])],[dnl
+-]])],[have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[
+- case $host_alias in
+- *linux*)
+- have_shm_mmap_anon=yes
+- ;;
+- *)
+- have_shm_mmap_anon=no
+- ;;
+- esac
+-])
+- if test "$have_shm_mmap_anon" = "yes"; then
- AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])
--
-- PHP_CHECK_FUNC_LIB(shm_open, rt)
+- fi
++ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
++ have_shm_mmap_anon=yes
+ AC_MSG_RESULT([$have_shm_mmap_anon])
+
+ PHP_CHECK_FUNC_LIB(shm_open, rt, root)
AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
@@ -170,7 +188,7 @@ index 6c40cafc1c..6569aa9e1c 100644
-# define MAP_FAILED ((void*)-1)
-#endif
-
--int main() {
+-int main(void) {
- pid_t pid;
- int status;
- int fd;
@@ -218,20 +236,19 @@ index 6c40cafc1c..6569aa9e1c 100644
- }
- return 0;
-}
--]])],[dnl
+-]])],[have_shm_mmap_posix=yes],[have_shm_mmap_posix=no],[have_shm_mmap_posix=no])
+- if test "$have_shm_mmap_posix" = "yes"; then
- AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support])
-- AC_MSG_RESULT([yes])
- PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])
-- ],[
-- AC_MSG_RESULT([no])
-- ],[
-- AC_MSG_RESULT([no])
-- ])
+- fi
+- AC_MSG_RESULT([$have_shm_mmap_posix])
+ 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,
ZendAccelerator.c \
--
-2.17.1
+2.40.0
diff --git a/meta-oe/recipes-devtools/php/php/0001-php.m4-don-t-unset-cache-variables.patch b/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch
index 0d721ec506..6183f49c28 100644
--- a/meta-oe/recipes-devtools/php/php/0001-php.m4-don-t-unset-cache-variables.patch
+++ b/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch
@@ -1,4 +1,7 @@
-php.m4: don't unset cache variables
+From 1af203e8e385d46ad3e33b1c253b1c564aa99034 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:01:55 -0500
+Subject: [PATCH 02/11] build/php.m4: don't unset cache variables
Unsetting prevents cache variable from being passed to configure.
@@ -8,15 +11,18 @@ Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
update this patch to 7.4.4, acinclude.m4 move to build/php.m4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
build/php.m4 | 4 ----
1 file changed, 4 deletions(-)
diff --git a/build/php.m4 b/build/php.m4
-index 5c45d13..218ec47 100644
+index 9746ba28f3..93551d9ca7 100644
--- a/build/php.m4
+++ b/build/php.m4
-@@ -1587,8 +1587,6 @@ dnl PHP_CHECK_FUNC_LIB
+@@ -1568,8 +1568,6 @@ dnl PHP_CHECK_FUNC_LIB
dnl
AC_DEFUN([PHP_CHECK_FUNC_LIB],[
ifelse($2,,:,[
@@ -25,7 +31,7 @@ index 5c45d13..218ec47 100644
unset found
AC_CHECK_LIB($2, $1, [found=yes], [
AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
-@@ -1620,8 +1618,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and
+@@ -1601,8 +1599,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and
dnl HAVE_library if found and adds the library to LIBS.
dnl
AC_DEFUN([PHP_CHECK_FUNC],[
@@ -35,5 +41,5 @@ index 5c45d13..218ec47 100644
AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
--
-2.7.4
+2.25.1
diff --git a/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch b/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch
new file mode 100644
index 0000000000..9637ed9516
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch
@@ -0,0 +1,36 @@
+From c81d0bd3491a6c6371d9df2f43956d109f984310 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:02:29 -0500
+Subject: [PATCH 03/11] php: remove host specific info from header file
+
+Based on:
+https://sources.debian.org/data/main/p/php7.3/7.3.6-1/debian/patches/
+ 0036-php-5.4.9-fixheader.patch
+
+Upstream-Status: Inappropriate [not author]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1eafd62a44..90c94323aa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1289,7 +1289,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`
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0001-configure.ac-don-t-include-build-libtool.m4.patch b/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch
index 2861366a6b..19a8bf8e4f 100644
--- a/meta-oe/recipes-devtools/php/php/0001-configure.ac-don-t-include-build-libtool.m4.patch
+++ b/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch
@@ -1,7 +1,7 @@
-From f5a34e771532b8433f307b679500c26af328ba35 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Fri, 17 Apr 2020 15:01:57 +0800
-Subject: [PATCH] configure.ac: don't include build/libtool.m4
+From 41ef1121682c245b10df7de4b78c45baf9114c04 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:03:46 -0500
+Subject: [PATCH 04/11] configure.ac: don't include build/libtool.m4
we delete build/libtool.m4 before do_configure,
we will use libtool.m4 under ACLOCALDIR
@@ -9,12 +9,15 @@ we will use libtool.m4 under ACLOCALDIR
Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
configure.ac | 1 -
1 file changed, 1 deletion(-)
diff --git a/configure.ac b/configure.ac
-index 06c6a27..f85144e 100644
+index 90c94323aa..161e7c3f53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,6 @@ dnl ----------------------------------------------------------------------------
@@ -26,5 +29,5 @@ index 06c6a27..f85144e 100644
m4_include([build/php.m4])
m4_include([build/pkg.m4])
--
-2.7.4
+2.25.1
diff --git a/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch
index fcbf25be9b..37752ef949 100644
--- a/meta-oe/recipes-devtools/php/php/pear-makefile.patch
+++ b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch
@@ -1,17 +1,23 @@
-From edd575a546d56bb5683aff19782b16963d61fd0b Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-Status: Pending
+From f22958b4c1348eec3bb4c0f2cbe2d22676e0ad23 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:04:29 -0500
+Subject: [PATCH 05/11] pear: fix Makefile.frag for Yocto
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
+Upstream-Status: Pending
+
pear/Makefile.frag | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pear/Makefile.frag b/pear/Makefile.frag
-index bbe8ec3..16f43e2 100644
+index 9408757a3a..69072f39e0 100644
--- a/pear/Makefile.frag
+++ b/pear/Makefile.frag
-@@ -12,7 +12,7 @@ PEAR_SUFFIX = -ds a$(program_suffix)
+@@ -10,7 +10,7 @@ PEAR_SUFFIX = -ds a$(program_suffix)
PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
install-pear-installer: $(SAPI_CLI_PATH)
@@ -20,3 +26,6 @@ index bbe8ec3..16f43e2 100644
install-pear:
@echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch
index eb73bc440e..acf2940839 100644
--- a/meta-oe/recipes-devtools/php/php/phar-makefile.patch
+++ b/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch
@@ -1,6 +1,7 @@
-Subject: [PATCH] From 08962a56f69963e01892d98ca5b75de8354bd3f5 Mon Sep 17
- 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 2 Nov
- 2011 16:54:57 +0100 Subject: [PATCH] Fix phar packaging
+From eab5babdadea487bbbef025068c553f5ba741774 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:07:25 -0500
+Subject: [PATCH 06/11] ext/phar/Makefile.frag: Fix phar packaging
Inherited from OE-Classic, with some additions to fix host paths leaking
into the target package.
@@ -9,15 +10,17 @@ Upstream-Status: Inappropriate [config]
update patch to version 7.4.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
ext/phar/Makefile.frag | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
-diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
-index 6442f33..6145412 100644
--- a/ext/phar/Makefile.frag
+++ b/ext/phar/Makefile.frag
-@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
+@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir
PHP_PHARCMD_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0
PHP_PHARCMD_EXECUTABLE = ` \
@@ -37,10 +40,7 @@ index 6442f33..6145412 100644
-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
+ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
+
-+PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "/usr/bin/env $(program_prefix)php$(program_suffix)$(EXEEXT)";`
$(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
-@test -d $(builddir)/phar || mkdir $(builddir)/phar
---
-2.7.4
-
diff --git a/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch
index 4aec4812f6..9776e7f6db 100644
--- a/meta-oe/recipes-devtools/php/php/php_exec_native.patch
+++ b/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch
@@ -1,15 +1,21 @@
-Subject: [PATCH] rom d251b5aa3d23803d016ca16818e2e1d2f2b70a02 Mon Sep 17
- 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 2 Nov
- 2011 16:54:57 +0100 Subject: [PATCH] Upstream-Status: Inappriate
+From 03aa51625e0d1aa156c2f7cd71503b1f435d35a4 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:08:06 -0500
+Subject: [PATCH 07/11] sapi/cli/config.m4: fix build directory
+
+Upstream-Status: Inappropriate
update patch to version 7.4.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
sapi/cli/config.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
-index 917d45f..aaf1e27 100644
+index d17d531683..f2f87f9164 100644
--- a/sapi/cli/config.m4
+++ b/sapi/cli/config.m4
@@ -47,7 +47,7 @@ if test "$PHP_CLI" != "no"; then
@@ -22,5 +28,5 @@ index 917d45f..aaf1e27 100644
dnl Expose to Makefile.
--
-2.7.4
+2.25.1
diff --git a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch
index ebe5f6a93c..78bae58e00 100644
--- a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
+++ b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch
@@ -1,15 +1,19 @@
-Subject: [PATCH] From c084c8349d1780980e232cb28b60a109e3d89438 Mon Sep 17
- 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 2 Nov
- 2011 16:54:57 +0100 Subject: [PATCH] Upstream-Status: Pending
+From c3c20db4415e0f6c4a601d6f9da1f3746a96b301 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:08:58 -0500
+Subject: [PATCH 08/11] ext/imap/config.m4: fix include paths
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Upstream-Status: Pending
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
ext/imap/config.m4 | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/ext/imap/config.m4 b/ext/imap/config.m4
-index 5086a31..0e938bd 100644
+index 5086a312d0..0e938bd544 100644
--- a/ext/imap/config.m4
+++ b/ext/imap/config.m4
@@ -110,7 +110,7 @@ if test "$PHP_IMAP" != "no"; then
@@ -37,5 +41,5 @@ index 5086a31..0e938bd 100644
IMAP_LIB_CHK($PHP_LIBDIR)
IMAP_LIB_CHK(c-client)
--
-2.7.4
+2.25.1
diff --git a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch
index d68737366e..b5a33cca7f 100644
--- a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
+++ b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch
@@ -1,21 +1,23 @@
-From ebc101e0728b9db6c687cff525e5dfc8eb0edbf3 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Thu, 3 Nov 2011 14:27:15 +0100
-Subject: [PATCH 2/8] php: don't use broken wrapper for mkdir
+From 8707720c0aea405f0e06d67354f239232cc823cc Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:10:02 -0500
+Subject: [PATCH 09/11] php: don't use broken wrapper for mkdir
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
update patch to version 7.4.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
-Upstream-Status: Inappropriate
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+Upstream-Status: Pending
build/Makefile.global | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build/Makefile.global b/build/Makefile.global
-index ff858c2..ae554b4 100644
+index 6566d052de..eb39421f2a 100644
--- a/build/Makefile.global
+++ b/build/Makefile.global
@@ -1,4 +1,4 @@
@@ -25,5 +27,5 @@ index ff858c2..ae554b4 100644
INSTALL_DATA = $(INSTALL) -m 644
--
-1.9.3
+2.25.1
diff --git a/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch b/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch
new file mode 100644
index 0000000000..e3b8cd4707
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch
@@ -0,0 +1,35 @@
+From a04aabc5b80371e579fbaffdd417627390d22722 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:10:33 -0500
+Subject: [PATCH 10/11] iconv: fix detection
+
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 7.4.4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build/php.m4 b/build/php.m4
+index 93551d9ca7..dba50825fb 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+ unset ICONV_DIR
+
+ dnl Check libc first if no path is provided in --with-iconv.
+- if test "$PHP_ICONV" = "yes"; then
++ dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
++ if test "$PHP_ICONV" != "no"; then
+ dnl Reset LIBS temporarily as it may have already been included -liconv in.
+ LIBS_save="$LIBS"
+ LIBS=
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf
index d206265a25..58ce408aa4 100644
--- a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf
+++ b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf
@@ -1,6 +1,6 @@
-LoadModule php7_module lib/apache2/modules/libphp7.so
+LoadModule php_module lib/apache2/modules/libphp.so
-<FilesMatch "\.ph(p[2-7]?|tml)$">
+<FilesMatch "\.ph(p[2-8]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
deleted file mode 100755
index 21050f7605..0000000000
--- a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-php: remove host specific info from header file
-
-https://sources.debian.org/data/main/p/php7.3/7.3.6-1/debian/patches/
- 0036-php-5.4.9-fixheader.patch
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
----
-From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
-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(-)
-
-diff --git a/configure.ac b/configure.ac
-index 433d7e6..41893d7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1357,7 +1357,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
-
--PHP_UNAME=`uname -a | xargs`
-+PHP_UNAME=`uname | xargs`
- AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
- PHP_OS=`uname | xargs`
- AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-oe/recipes-devtools/php/php/iconv.patch
deleted file mode 100644
index 9ec8a89b57..0000000000
--- a/meta-oe/recipes-devtools/php/php/iconv.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Subject: [PATCH] From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17
- 00:00:00 2001 From: Koen Kooi <koen@dominion.thruhere.net> Date: Wed, 2 Nov
- 2011 16:54:57 +0100 Subject: [PATCH] Upstream-Status: Pending
-
-update patch to version 7.4.4
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- build/php.m4 | 3 ++-
- ext/iconv/config.m4 | 2 +-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/build/php.m4 b/build/php.m4
-index 7392876..5c45d13 100644
---- a/build/php.m4
-+++ b/build/php.m4
-@@ -1950,7 +1950,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
- echo > ext/iconv/php_iconv_supports_errno.h
-
- dnl Check libc first if no path is provided in --with-iconv.
-- if test "$PHP_ICONV" = "yes"; then
-+ dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
-+ if test "$PHP_ICONV" != "no"; then
- dnl Reset LIBS temporarily as it may have already been included -liconv in.
- LIBS_save="$LIBS"
- LIBS=
-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index fe9b47a..b6b632f 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -14,7 +14,7 @@ if test "$PHP_ICONV" != "no"; then
-
- if test "$iconv_avail" != "no"; then
- if test -z "$ICONV_DIR"; then
-- for i in /usr/local /usr; do
-+ for i in $PHP_ICONV /usr/local /usr; do
- if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
- PHP_ICONV_PREFIX="$i"
- break
---
-2.7.4
-
diff --git a/meta-oe/recipes-devtools/php/php/php-fpm.service b/meta-oe/recipes-devtools/php/php/php-fpm.service
index ac79dc931a..918ffe6749 100644
--- a/meta-oe/recipes-devtools/php/php/php-fpm.service
+++ b/meta-oe/recipes-devtools/php/php/php-fpm.service
@@ -1,10 +1,57 @@
+# It's not recommended to modify this file in-place, because it
+# will be overwritten during upgrades. If you want to customize,
+# the best way is to use the "systemctl edit" command.
+
[Unit]
-Description=PHP-FPM
+Description=The PHP FastCGI Process Manager
After=network.target
+
[Service]
-Type=forking
+Type=simple
PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid
-ExecStart=@SYSCONFDIR@/init.d/php-fpm start
-ExecStop=@SYSCONFDIR@/init.d/php-fpm stop
+ExecStart=@SBINDIR@/php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf
+ExecReload=@BINDIR@/kill -USR2 $MAINPID
+
+# Set up a new file system namespace and mounts private /tmp and /var/tmp directories
+# so this service cannot access the global directories and other processes cannot
+# access this service's directories.
+PrivateTmp=true
+
+# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit.
+ProtectSystem=full
+
+# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices
+# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it,
+# but no physical devices such as /dev/sda.
+PrivateDevices=true
+
+# Explicit module loading will be denied. This allows to turn off module load and unload
+# operations on modular kernels. It is recommended to turn this on for most services that
+# do not need special file systems or extra kernel modules to work.
+ProtectKernelModules=true
+
+# Kernel variables accessible through /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats,
+# /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be made read-only to all processes
+# of the unit. Usually, tunable kernel variables should only be written at boot-time, with the
+# sysctl.d(5) mechanism. Almost no services need to write to these at runtime; it is hence
+# recommended to turn this on for most services.
+ProtectKernelTunables=true
+
+# The Linux Control Groups (cgroups(7)) hierarchies accessible through /sys/fs/cgroup will be
+# made read-only to all processes of the unit. Except for container managers no services should
+# require write access to the control groups hierarchies; it is hence recommended to turn this on
+# for most services
+ProtectControlGroups=true
+
+# Any attempts to enable realtime scheduling in a process of the unit are refused.
+RestrictRealtime=true
+
+# Restricts the set of socket address families accessible to the processes of this unit.
+# Protects against vulnerabilities such as CVE-2016-8655
+RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
+
+# Takes away the ability to create or manage any kind of namespace
+RestrictNamespaces=true
+
[Install]
WantedBy=multi-user.target
diff --git a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
deleted file mode 100644
index 21057439c9..0000000000
--- a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-php-ptest: xfail two tests
-
-If and when these tests are modified to expect the correct output, they will
-succeed and generate warnings in the test summary. This patch can then be removed.
-
-Note that we add a closing '?>' to one test so that it can be executed directly by php.
-
-Upstream-Status: Pending
-
-Signed-off-By: Joe Slater <joe.slater@windriver.com>
-
-
---- a/tests/basic/bug71273.phpt
-+++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
- var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
- ?>
- ==DONE==
-+--XFAIL--
-+Output is int(0), not int(1)
- --EXPECT--
- int(1)
- ==DONE==
---- a/tests/run-test/bug75042-3.phpt
-+++ b/tests/run-test/bug75042-3.phpt
-@@ -8,5 +8,8 @@ display_errors=1
- nonexistentsharedmodule
- --FILE--
- <?php
-+?>
-+--XFAIL--
-+No warning message printed.
- --EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A