From 0710a637220022e39dec30ecc856ac71c7882dd0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 3 Jul 2024 16:50:39 +0200 Subject: Update to 8.4.0alpha1 drop imap, pspell, oci8 and pdo_oci extensions --- 20-oci8.ini | 60 ---- macros.php | 2 + php-7.2.0-oci8conf.patch | 13 - php-7.4.0-httpd.patch | 27 -- php-7.4.0-phpize.patch | 65 ---- php-8.0.0-embed.patch | 25 -- php-8.2.0-curl.patch | 23 -- php-8.3.0-systzdata-v24.patch | 746 ------------------------------------------ php-8.4.0-embed.patch | 25 ++ php-8.4.0-httpd.patch | 26 ++ php-8.4.0-phpize.patch | 35 ++ php-8.4.0-systzdata-v24.patch | 742 +++++++++++++++++++++++++++++++++++++++++ php-fpm.service | 1 - php.spec | 269 +-------------- 14 files changed, 848 insertions(+), 1211 deletions(-) delete mode 100644 20-oci8.ini delete mode 100644 php-7.2.0-oci8conf.patch delete mode 100644 php-7.4.0-httpd.patch delete mode 100644 php-7.4.0-phpize.patch delete mode 100644 php-8.0.0-embed.patch delete mode 100644 php-8.2.0-curl.patch delete mode 100644 php-8.3.0-systzdata-v24.patch create mode 100644 php-8.4.0-embed.patch create mode 100644 php-8.4.0-httpd.patch create mode 100644 php-8.4.0-phpize.patch create mode 100644 php-8.4.0-systzdata-v24.patch diff --git a/20-oci8.ini b/20-oci8.ini deleted file mode 100644 index 3777858..0000000 --- a/20-oci8.ini +++ /dev/null @@ -1,60 +0,0 @@ -; Enable oci8 extension module -extension=oci8 - -; Connection: Enables privileged connections using external -; credentials (OCI_SYSOPER, OCI_SYSDBA) -; https://php.net/oci8.privileged-connect -;oci8.privileged_connect = Off - -; Connection: The maximum number of persistent OCI8 connections per -; process. Using -1 means no limit. -; https://php.net/oci8.max-persistent -;oci8.max_persistent = -1 - -; Connection: The maximum number of seconds a process is allowed to -; maintain an idle persistent connection. Using -1 means idle -; persistent connections will be maintained forever. -; https://php.net/oci8.persistent-timeout -;oci8.persistent_timeout = -1 - -; Connection: The number of seconds that must pass before issuing a -; ping during oci_pconnect() to check the connection validity. When -; set to 0, each oci_pconnect() will cause a ping. Using -1 disables -; pings completely. -; https://php.net/oci8.ping-interval -;oci8.ping_interval = 60 - -; Connection: Set this to a user chosen connection class to be used -; for all pooled server requests with Oracle Database Resident -; Connection Pooling (DRCP). To use DRCP, this value should be set to -; the same string for all web servers running the same application, -; the database pool must be configured, and the connection string must -; specify to use a pooled server. -;oci8.connection_class = - -; High Availability: Using On lets PHP receive Fast Application -; Notification (FAN) events generated when a database node fails. The -; database must also be configured to post FAN events. -;oci8.events = Off - -; Tuning: This option enables statement caching, and specifies how -; many statements to cache. Using 0 disables statement caching. -; https://php.net/oci8.statement-cache-size -;oci8.statement_cache_size = 20 - -; Tuning: Enables row prefetching and sets the default number of -; rows that will be fetched automatically after statement execution. -; https://php.net/oci8.default-prefetch -;oci8.default_prefetch = 100 - -; Tuning: Sets the amount of LOB data that is internally returned from -; Oracle Database when an Oracle LOB locator is initially retrieved as -; part of a query. Setting this can improve performance by reducing -; round-trips. -; https://php.net/oci8.prefetch-lob-size -; oci8.prefetch_lob_size = 0 - -; Compatibility. Using On means oci_close() will not close -; oci_connect() and oci_new_connect() connections. -; https://php.net/oci8.old-oci-close-semantics -;oci8.old_oci_close_semantics = Off diff --git a/macros.php b/macros.php index d3e937f..54aea04 100644 --- a/macros.php +++ b/macros.php @@ -18,3 +18,5 @@ %@SCL@__phpconfig @BINDIR@/php-config +%@SCL@_pecl_xmldir @STATEDIR@/lib/php/peclxml + diff --git a/php-7.2.0-oci8conf.patch b/php-7.2.0-oci8conf.patch deleted file mode 100644 index d026575..0000000 --- a/php-7.2.0-oci8conf.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up ./ext/ldap/php_ldap.h.remi-oci8 ./ext/ldap/php_ldap.h ---- ./ext/ldap/php_ldap.h.remi-oci8 2017-06-20 15:45:35.000000000 +0200 -+++ ./ext/ldap/php_ldap.h 2017-06-20 16:55:01.640203868 +0200 -@@ -27,7 +27,7 @@ - #include - #endif - --#include -+#include "/usr/include/ldap.h" - - extern zend_module_entry ldap_module_entry; - #define ldap_module_ptr &ldap_module_entry - diff --git a/php-7.4.0-httpd.patch b/php-7.4.0-httpd.patch deleted file mode 100644 index 34f7c8a..0000000 --- a/php-7.4.0-httpd.patch +++ /dev/null @@ -1,27 +0,0 @@ -Disable MPM detection - -mod_php is build twice -- as NTS without option -- as ZTS using --enable-maintainer-zts - -diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 ---- a/sapi/apache2handler/config.m4 -+++ b/sapi/apache2handler/config.m4 -@@ -105,17 +105,6 @@ if test "$PHP_APXS2" != "no"; then - ;; - esac - -- if test "$APACHE_VERSION" -lt 2004001; then -- APXS_MPM=`$APXS -q MPM_NAME` -- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then -- PHP_BUILD_THREAD_SAFE -- fi -- else -- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'` -- if test -n "$APACHE_THREADED_MPM"; then -- PHP_BUILD_THREAD_SAFE -- fi -- fi - AC_MSG_RESULT(yes) - PHP_SUBST(APXS) - else diff --git a/php-7.4.0-phpize.patch b/php-7.4.0-phpize.patch deleted file mode 100644 index 46aff56..0000000 --- a/php-7.4.0-phpize.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -up ./scripts/phpize.in.headers ./scripts/phpize.in ---- ./scripts/phpize.in.headers 2019-07-23 10:05:11.000000000 +0200 -+++ ./scripts/phpize.in 2019-07-23 10:18:13.648098089 +0200 -@@ -166,6 +166,15 @@ phpize_autotools() - $PHP_AUTOHEADER || exit 1 - } - -+phpize_check_headers() -+{ -+ if test ! -f $includedir/main/php.h; then -+ echo "Can't find PHP headers in $includedir" -+ echo "The php-devel package is required for use of this command." -+ exit 1 -+ fi -+} -+ - # Main script - - case "$1" in -@@ -184,12 +193,15 @@ case "$1" in - - # Version - --version|-v) -+ phpize_check_headers - phpize_print_api_numbers - exit 0 - ;; - - # Default - *) -+ phpize_check_headers -+ - phpize_check_configm4 0 - - phpize_check_build_files -From c454f120857df6f771c5475bf1fcc99e683b87dc Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 7 Sep 2023 09:56:51 +0200 -Subject: [PATCH] also display PHP version in phpize - ---- - scripts/phpize.in | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/scripts/phpize.in b/scripts/phpize.in -index 7d9c1df14c8e..81605e06a590 100644 ---- a/scripts/phpize.in -+++ b/scripts/phpize.in -@@ -59,6 +59,8 @@ phpize_check_configm4() - phpize_get_api_numbers() - { - # extracting API NOs: -+ PHP_MINOR_VERSION=`grep '#define PHP_MINOR_VERSION' $includedir/main/php_version.h|$SED 's/#define PHP_MINOR_VERSION //'` -+ PHP_MAJOR_VERSION=`grep '#define PHP_MAJOR_VERSION' $includedir/main/php_version.h|$SED 's/#define PHP_MAJOR_VERSION//'` - PHP_API_VERSION=`grep '#define PHP_API_VERSION' $includedir/main/php.h|$SED 's/#define PHP_API_VERSION//'` - ZEND_MODULE_API_NO=`grep '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO//'` - ZEND_EXTENSION_API_NO=`grep '#define ZEND_EXTENSION_API_NO' $includedir/Zend/zend_extensions.h|$SED 's/#define ZEND_EXTENSION_API_NO//'` -@@ -68,6 +70,7 @@ phpize_print_api_numbers() - { - phpize_get_api_numbers - echo "Configuring for:" -+ echo "PHP Version: ${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}" - echo "PHP Api Version: "$PHP_API_VERSION - echo "Zend Module Api No: "$ZEND_MODULE_API_NO - echo "Zend Extension Api No: "$ZEND_EXTENSION_API_NO diff --git a/php-8.0.0-embed.patch b/php-8.0.0-embed.patch deleted file mode 100644 index 27533ea..0000000 --- a/php-8.0.0-embed.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up ./sapi/embed/config.m4.embed ./sapi/embed/config.m4 ---- ./sapi/embed/config.m4.embed 2020-07-07 13:51:05.879764972 +0200 -+++ ./sapi/embed/config.m4 2020-07-07 13:52:50.128412148 +0200 -@@ -12,7 +12,8 @@ if test "$PHP_EMBED" != "no"; then - yes|shared) - LIBPHP_CFLAGS="-shared" - PHP_EMBED_TYPE=shared -- INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib" -+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" -+ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)" - ;; - static) - LIBPHP_CFLAGS="-static" -diff -up ./scripts/php-config.in.embed ./scripts/php-config.in ---- ./scripts/php-config.in.embed 2020-07-07 12:54:42.000000000 +0200 -+++ ./scripts/php-config.in 2020-07-07 13:51:05.880764968 +0200 -@@ -18,7 +18,7 @@ exe_extension="@EXEEXT@" - php_cli_binary=NONE - php_cgi_binary=NONE - configure_options="@CONFIGURE_OPTIONS@" --php_sapis="@PHP_INSTALLED_SAPIS@" -+php_sapis="apache2handler litespeed fpm phpdbg @PHP_INSTALLED_SAPIS@" - ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@" - ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@" - diff --git a/php-8.2.0-curl.patch b/php-8.2.0-curl.patch deleted file mode 100644 index e581310..0000000 --- a/php-8.2.0-curl.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up ./ext/curl/curl_arginfo.h.bck ./ext/curl/curl_arginfo.h ---- ./ext/curl/curl_arginfo.h.bck 2022-09-01 09:46:21.410502957 +0200 -+++ ./ext/curl/curl_arginfo.h 2022-09-01 09:47:16.020506046 +0200 -@@ -723,13 +723,16 @@ static void register_curl_symbols(int mo - #if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */ - REGISTER_LONG_CONSTANT("CURLOPT_LOGIN_OPTIONS", CURLOPT_LOGIN_OPTIONS, CONST_PERSISTENT); - #endif --#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */ -+/* Available since 7.19.0 (in upstream curl 7.34) -+ backported in RHEL-7 curl-7.29.0-16.el7 rhbz#1012136 -+ backported in RHEL-6 curl-7.19.7-43.el6 rhbz#1036789 */ -+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.34.0 */ - REGISTER_LONG_CONSTANT("CURL_SSLVERSION_TLSv1_0", CURL_SSLVERSION_TLSv1_0, CONST_PERSISTENT); - #endif --#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */ -+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.34.0 */ - REGISTER_LONG_CONSTANT("CURL_SSLVERSION_TLSv1_1", CURL_SSLVERSION_TLSv1_1, CONST_PERSISTENT); - #endif --#if LIBCURL_VERSION_NUM >= 0x072200 /* Available since 7.34.0 */ -+#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.34.0 */ - REGISTER_LONG_CONSTANT("CURL_SSLVERSION_TLSv1_2", CURL_SSLVERSION_TLSv1_2, CONST_PERSISTENT); - #endif - #if LIBCURL_VERSION_NUM >= 0x072400 /* Available since 7.36.0 */ diff --git a/php-8.3.0-systzdata-v24.patch b/php-8.3.0-systzdata-v24.patch deleted file mode 100644 index ca6e634..0000000 --- a/php-8.3.0-systzdata-v24.patch +++ /dev/null @@ -1,746 +0,0 @@ -# License: MIT -# http://opensource.org/licenses/MIT - -Add support for use of the system timezone database, rather -than embedding a copy. Discussed upstream but was not desired. - -History: -f24: add internal UTC if tzdata is missing -r23: fix possible buffer overflow -r22: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi -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) -r16: adapt for timelib 2017.06 (in 7.2.3RC1) -r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1) -r14: improve check for valid tz file -r13: adapt for upstream changes to use PHP allocator -r12: adapt for upstream changes for new zic -r11: use canonical names to avoid more case sensitivity issues - round lat/long from zone.tab towards zero per builtin db -r10: make timezone case insensitive -r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold) -r8: fix compile error without --with-system-tzdata configured -r7: improve check for valid timezone id to exclude directories -r6: fix fd leak in r5, fix country code/BC flag use in - timezone_identifiers_list() using system db, - fix use of PECL timezonedb to override system db, -r5: reverts addition of "System/Localtime" fake tzname. - updated for 5.3.0, parses zone.tab to pick up mapping between - timezone name, country code and long/lat coords -r4: added "System/Localtime" tzname which uses /etc/localtime -r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) -r2: add filesystem trawl to set up name alias index -r1: initial revision - - -diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 -index 6b803bf33e..53c3cdb3f4 100644 ---- a/ext/date/config0.m4 -+++ b/ext/date/config0.m4 -@@ -4,6 +4,19 @@ AC_CHECK_HEADERS([io.h]) - dnl Check for 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], -+no, no) -+ -+if test "$PHP_SYSTEM_TZDATA" != "no"; then -+ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) -+ -+ if test "$PHP_SYSTEM_TZDATA" != "yes"; then -+ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", -+ [Define for location of system timezone data]) -+ fi -+fi -+ - 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" -diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c -index c7f93580d7..ec196a98b6 100644 ---- a/ext/date/lib/parse_tz.c -+++ b/ext/date/lib/parse_tz.c -@@ -26,9 +26,33 @@ - #include "timelib.h" - #include "timelib_private.h" - -+#ifdef HAVE_SYSTEM_TZDATA -+#include -+#include -+#include -+#include -+#include -+ -+#include "php_scandir.h" -+ -+static const unsigned char internal_utc[] = { -+ 0x54, 0x5a, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x54, 0x5a, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, -+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x0a, 0x55, 0x54, 0x43, -+ 0x30, 0x0a -+}; -+ -+#else - #define TIMELIB_SUPPORTS_V2DATA - #define TIMELIB_SUPPORT_SLIM_FILE - #include "timezonedb.h" -+#endif -+ -+#include - - #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) - # if defined(__LITTLE_ENDIAN__) -@@ -95,6 +119,11 @@ static int read_php_preamble(const unsigned char **tzf, timelib_tzinfo *tz) - { - uint32_t version; - -+ if (memcmp(*tzf, "TZif", 4) == 0) { -+ *tzf += 20; -+ return 0; -+ } -+ - /* read ID */ - version = (*tzf)[3] - '0'; - *tzf += 4; -@@ -577,7 +606,475 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) - } - } - --static int seek_to_tz_position(const unsigned char **tzf, const char *timezone, const timelib_tzdb *tzdb) -+#ifdef HAVE_SYSTEM_TZDATA -+ -+#ifdef HAVE_SYSTEM_TZDATA_PREFIX -+#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX -+#else -+#define ZONEINFO_PREFIX "/usr/share/zoneinfo" -+#endif -+ -+/* System timezone database pointer. */ -+static const timelib_tzdb *timezonedb_system; -+ -+/* Hash table entry for the cache of the zone.tab mapping table. */ -+struct location_info { -+ char code[2]; -+ double latitude, longitude; -+ char name[64]; -+ char *comment; -+ struct location_info *next; -+}; -+ -+/* Cache of zone.tab. */ -+static struct location_info **system_location_table; -+ -+/* Size of the zone.tab hash table; a random-ish prime big enough to -+ * prevent too many collisions. */ -+#define LOCINFO_HASH_SIZE (1021) -+ -+/* Compute a case insensitive hash of str */ -+static uint32_t tz_hash(const char *str) -+{ -+ const unsigned char *p = (const unsigned char *)str; -+ uint32_t hash = 5381; -+ int c; -+ -+ while ((c = tolower(*p++)) != '\0') { -+ hash = (hash << 5) ^ hash ^ c; -+ } -+ -+ return hash % LOCINFO_HASH_SIZE; -+} -+ -+/* Parse an ISO-6709 date as used in zone.tab. Returns end of the -+ * parsed string on success, or NULL on parse error. On success, -+ * writes the parsed number to *result. */ -+static char *parse_iso6709(char *p, double *result) -+{ -+ double v, sign; -+ char *pend; -+ size_t len; -+ -+ if (*p == '+') -+ sign = 1.0; -+ else if (*p == '-') -+ sign = -1.0; -+ else -+ return NULL; -+ -+ p++; -+ for (pend = p; *pend >= '0' && *pend <= '9'; pend++) -+ ;; -+ -+ /* Annoying encoding used by zone.tab has no decimal point, so use -+ * the length to determine the format: -+ * -+ * 4 = DDMM -+ * 5 = DDDMM -+ * 6 = DDMMSS -+ * 7 = DDDMMSS -+ */ -+ len = pend - p; -+ if (len < 4 || len > 7) { -+ return NULL; -+ } -+ -+ /* p => [D]DD */ -+ v = (p[0] - '0') * 10.0 + (p[1] - '0'); -+ p += 2; -+ if (len == 5 || len == 7) -+ v = v * 10.0 + (*p++ - '0'); -+ /* p => MM[SS] */ -+ v += (10.0 * (p[0] - '0') -+ + p[1] - '0') / 60.0; -+ p += 2; -+ /* p => [SS] */ -+ if (len > 5) { -+ v += (10.0 * (p[0] - '0') -+ + p[1] - '0') / 3600.0; -+ p += 2; -+ } -+ -+ /* Round to five decimal place, not because it's a good idea, -+ * but, because the builtin data uses rounded data, so, match -+ * that. */ -+ *result = trunc(v * sign * 100000.0) / 100000.0; -+ -+ return p; -+} -+ -+/* This function parses the zone.tab file to build up the mapping of -+ * timezone to country code and geographic location, and returns a -+ * hash table. The hash table is indexed by the function: -+ * -+ * tz_hash(timezone-name) -+ */ -+static struct location_info **create_location_table(void) -+{ -+ struct location_info **li, *i; -+ char zone_tab[PATH_MAX]; -+ char line[512]; -+ FILE *fp; -+ -+ strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab); -+ -+ fp = fopen(zone_tab, "r"); -+ if (!fp) { -+ return NULL; -+ } -+ -+ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); -+ -+ while (fgets(line, sizeof line, fp)) { -+ char *p = line, *code, *name, *comment; -+ uint32_t hash; -+ double latitude, longitude; -+ -+ while (isspace(*p)) -+ p++; -+ -+ if (*p == '#' || *p == '\0' || *p == '\n') -+ continue; -+ -+ if (!isalpha(p[0]) || !isalpha(p[1]) || p[2] != '\t') -+ continue; -+ -+ /* code => AA */ -+ code = p; -+ p[2] = 0; -+ p += 3; -+ -+ /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */ -+ p = parse_iso6709(p, &latitude); -+ if (!p) { -+ continue; -+ } -+ p = parse_iso6709(p, &longitude); -+ if (!p) { -+ continue; -+ } -+ -+ if (!p || *p != '\t') { -+ continue; -+ } -+ -+ /* name = string */ -+ name = ++p; -+ while (*p != '\t' && *p && *p != '\n') -+ p++; -+ -+ *p++ = '\0'; -+ -+ /* comment = string */ -+ comment = p; -+ while (*p != '\t' && *p && *p != '\n') -+ p++; -+ -+ if (*p == '\n' || *p == '\t') -+ *p = '\0'; -+ -+ hash = tz_hash(name); -+ i = malloc(sizeof *i); -+ memcpy(i->code, code, 2); -+ strncpy(i->name, name, sizeof i->name); -+ i->comment = strdup(comment); -+ i->longitude = longitude; -+ i->latitude = latitude; -+ i->next = li[hash]; -+ li[hash] = i; -+ /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */ -+ } -+ -+ fclose(fp); -+ -+ return li; -+} -+ -+/* Return location info from hash table, using given timezone name. -+ * Returns NULL if the name could not be found. */ -+const struct location_info *find_zone_info(struct location_info **li, -+ const char *name) -+{ -+ uint32_t hash = tz_hash(name); -+ const struct location_info *l; -+ -+ if (!li) { -+ return NULL; -+ } -+ -+ for (l = li[hash]; l; l = l->next) { -+ if (timelib_strcasecmp(l->name, name) == 0) -+ return l; -+ } -+ -+ return NULL; -+} -+ -+/* Filter out some non-tzdata files and the posix/right databases, if -+ * present. */ -+static int index_filter(const struct dirent *ent) -+{ -+ return strcmp(ent->d_name, ".") != 0 -+ && strcmp(ent->d_name, "..") != 0 -+ && strcmp(ent->d_name, "posix") != 0 -+ && strcmp(ent->d_name, "posixrules") != 0 -+ && strcmp(ent->d_name, "right") != 0 -+ && strstr(ent->d_name, ".list") == NULL -+ && strstr(ent->d_name, ".tab") == NULL; -+} -+ -+static int sysdbcmp(const void *first, const void *second) -+{ -+ const timelib_tzdb_index_entry *alpha = first, *beta = second; -+ -+ return timelib_strcasecmp(alpha->id, beta->id); -+} -+ -+/* Retrieve tzdata version. */ -+static void retrieve_zone_version(timelib_tzdb *db) -+{ -+ static char buf[30]; -+ char path[PATH_MAX]; -+ FILE *fp; -+ -+ strncpy(path, ZONEINFO_PREFIX "/tzdata.zi", sizeof(path)); -+ -+ fp = fopen(path, "r"); -+ if (fp) { -+ if (fgets(buf, sizeof(buf), fp)) { -+ if (!memcmp(buf, "# version ", 10) && -+ isdigit(buf[10]) && -+ isdigit(buf[11]) && -+ isdigit(buf[12]) && -+ isdigit(buf[13]) && -+ islower(buf[14])) { -+ if (buf[14] >= 't') { /* 2022t = 2022.20 */ -+ buf[17] = 0; -+ buf[16] = buf[14] - 't' + '0'; -+ buf[15] = '2'; -+ } else if (buf[14] >= 'j') { /* 2022j = 2022.10 */ -+ buf[17] = 0; -+ buf[16] = buf[14] - 'j' + '0'; -+ buf[15] = '1'; -+ } else { /* 2022a = 2022.1 */ -+ buf[16] = 0; -+ buf[15] = buf[14] - 'a' + '1'; -+ } -+ buf[14] = '.'; -+ db->version = buf+10; -+ } -+ } -+ fclose(fp); -+ } -+} -+ -+ -+/* Create the zone identifier index by trawling the filesystem. */ -+static void create_zone_index(timelib_tzdb *db) -+{ -+ size_t dirstack_size, dirstack_top; -+ size_t index_size, index_next; -+ timelib_tzdb_index_entry *db_index; -+ char **dirstack; -+ -+ /* LIFO stack to hold directory entries to scan; each slot is a -+ * directory name relative to the zoneinfo prefix. */ -+ dirstack_size = 32; -+ dirstack = malloc(dirstack_size * sizeof *dirstack); -+ dirstack_top = 1; -+ dirstack[0] = strdup(""); -+ -+ /* Index array. */ -+ index_size = 64; -+ db_index = malloc(index_size * sizeof *db_index); -+ index_next = 0; -+ -+ do { -+ struct dirent **ents; -+ char name[PATH_MAX], *top; -+ int count; -+ -+ /* Pop the top stack entry, and iterate through its contents. */ -+ top = dirstack[--dirstack_top]; -+ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top); -+ -+ count = php_scandir(name, &ents, index_filter, php_alphasort); -+ -+ while (count > 0) { -+ struct stat st; -+ const char *leaf = ents[count - 1]->d_name; -+ -+ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s", -+ top, leaf); -+ -+ if (strlen(name) && stat(name, &st) == 0) { -+ /* Name, relative to the zoneinfo prefix. */ -+ const char *root = top; -+ -+ if (root[0] == '/') root++; -+ -+ snprintf(name, sizeof name, "%s%s%s", root, -+ *root ? "/": "", leaf); -+ -+ if (S_ISDIR(st.st_mode)) { -+ if (dirstack_top == dirstack_size) { -+ dirstack_size *= 2; -+ dirstack = realloc(dirstack, -+ dirstack_size * sizeof *dirstack); -+ } -+ dirstack[dirstack_top++] = strdup(name); -+ } -+ else { -+ if (index_next == index_size) { -+ index_size *= 2; -+ db_index = realloc(db_index, -+ index_size * sizeof *db_index); -+ } -+ -+ db_index[index_next++].id = strdup(name); -+ } -+ } -+ -+ free(ents[--count]); -+ } -+ -+ if (count != -1) free(ents); -+ free(top); -+ } while (dirstack_top); -+ -+ qsort(db_index, index_next, sizeof *db_index, sysdbcmp); -+ -+ if (!index_next) { -+ db_index[index_next++].id = strdup("UTC"); -+ } -+ db->index = db_index; -+ db->index_size = index_next; -+ -+ free(dirstack); -+} -+ -+#define FAKE_HEADER "1234\0??\1??" -+#define FAKE_UTC_POS (7 - 4) -+ -+/* Create a fake data segment for database 'sysdb'. */ -+static void fake_data_segment(timelib_tzdb *sysdb, -+ struct location_info **info) -+{ -+ size_t n; -+ char *data, *p; -+ -+ data = malloc(3 * sysdb->index_size + sizeof(FAKE_HEADER) - 1); -+ -+ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); -+ -+ for (n = 0; n < sysdb->index_size; n++) { -+ const struct location_info *li; -+ timelib_tzdb_index_entry *ent; -+ -+ ent = (timelib_tzdb_index_entry *)&sysdb->index[n]; -+ -+ /* Lookup the timezone name in the hash table. */ -+ if (strcmp(ent->id, "UTC") == 0) { -+ ent->pos = FAKE_UTC_POS; -+ continue; -+ } -+ -+ li = find_zone_info(info, ent->id); -+ if (li) { -+ /* If found, append the BC byte and the -+ * country code; set the position for this -+ * section of timezone data. */ -+ ent->pos = (p - data) - 4; -+ *p++ = '\1'; -+ *p++ = li->code[0]; -+ *p++ = li->code[1]; -+ } -+ else { -+ /* If not found, the timezone data can -+ * point at the header. */ -+ ent->pos = 0; -+ } -+ } -+ -+ sysdb->data = (unsigned char *)data; -+} -+ -+/* Returns true if the passed-in stat structure describes a -+ * probably-valid timezone file. */ -+static int is_valid_tzfile(const struct stat *st, int fd) -+{ -+ if (fd) { -+ char buf[20]; -+ if (read(fd, buf, 20)!=20) { -+ return 0; -+ } -+ lseek(fd, SEEK_SET, 0); -+ if (memcmp(buf, "TZif", 4)) { -+ return 0; -+ } -+ } -+ return S_ISREG(st->st_mode) && st->st_size > 20; -+} -+ -+/* To allow timezone names to be used case-insensitively, find the -+ * canonical name for this timezone, if possible. */ -+static const char *canonical_tzname(const char *timezone) -+{ -+ if (timezonedb_system) { -+ timelib_tzdb_index_entry *ent, lookup; -+ -+ lookup.id = (char *)timezone; -+ -+ ent = bsearch(&lookup, timezonedb_system->index, -+ timezonedb_system->index_size, sizeof lookup, -+ sysdbcmp); -+ if (ent) { -+ return ent->id; -+ } -+ } -+ -+ return timezone; -+} -+ -+/* Return the mmap()ed tzfile if found, else NULL. On success, the -+ * length of the mapped data is placed in *length. */ -+static char *map_tzfile(const char *timezone, size_t *length) -+{ -+ char fname[PATH_MAX]; -+ struct stat st; -+ char *p; -+ int fd; -+ -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ return NULL; -+ } -+ -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ -+ fd = open(fname, O_RDONLY); -+ if (fd == -1) { -+ if (strcmp(timezone, "UTC")) { -+ return NULL; -+ } else { -+ *length = sizeof(internal_utc); -+ return internal_utc; -+ } -+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) { -+ close(fd); -+ return NULL; -+ } -+ -+ *length = st.st_size; -+ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); -+ close(fd); -+ -+ return p != MAP_FAILED ? p : NULL; -+} -+ -+#endif -+ -+static int inmem_seek_to_tz_position(const unsigned char **tzf, const char *timezone, const timelib_tzdb *tzdb) - { - int left = 0, right = tzdb->index_size - 1; - -@@ -603,9 +1100,49 @@ static int seek_to_tz_position(const unsigned char **tzf, const char *timezone, - return 0; - } - -+static int seek_to_tz_position(const unsigned char **tzf, const char *timezone, -+ char **map, size_t *maplen, -+ const timelib_tzdb *tzdb) -+{ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char *orig; -+ -+ orig = map_tzfile(timezone, maplen); -+ if (orig == NULL) { -+ return 0; -+ } -+ -+ (*tzf) = (unsigned char *)orig; -+ *map = orig; -+ return 1; -+ } -+ else -+#endif -+ { -+ return inmem_seek_to_tz_position(tzf, timezone, tzdb); -+ } -+} -+ - const timelib_tzdb *timelib_builtin_db(void) - { -+#ifdef HAVE_SYSTEM_TZDATA -+ if (timezonedb_system == NULL) { -+ timelib_tzdb *tmp = malloc(sizeof *tmp); -+ -+ tmp->version = "0"; -+ tmp->data = NULL; -+ create_zone_index(tmp); -+ retrieve_zone_version(tmp); -+ system_location_table = create_location_table(); -+ fake_data_segment(tmp, system_location_table); -+ timezonedb_system = tmp; -+ } -+ -+ return timezonedb_system; -+#else - return &timezonedb_builtin; -+#endif - } - - const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count) -@@ -617,7 +1154,32 @@ const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_ - int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb) - { - const unsigned char *tzf; -- return (seek_to_tz_position(&tzf, timezone, tzdb)); -+ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char fname[PATH_MAX]; -+ struct stat st; -+ -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ return 0; -+ } -+ if (!strcmp(timezone, "UTC")) { -+ return 1; -+ } -+ if (system_location_table) { -+ if (find_zone_info(system_location_table, timezone) != NULL) { -+ /* found in cache */ -+ return 1; -+ } -+ } -+ -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); -+ -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0); -+ } -+#endif -+ -+ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); - } - - static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) -@@ -662,6 +1224,8 @@ static timelib_tzinfo* timelib_tzinfo_ctor(const char *name) - timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *tzdb, int *error_code) - { - const unsigned char *tzf; -+ char *memmap = NULL; -+ size_t maplen; - timelib_tzinfo *tmp; - int version; - int transitions_result, types_result; -@@ -669,7 +1233,7 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t - - *error_code = TIMELIB_ERROR_NO_ERROR; - -- if (seek_to_tz_position(&tzf, timezone, tzdb)) { -+ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { - tmp = timelib_tzinfo_ctor(timezone); - - version = read_preamble(&tzf, tmp, &type); -@@ -712,11 +1276,38 @@ timelib_tzinfo *timelib_parse_tzfile(const char *timezone, const timelib_tzdb *t - return NULL; - } - -+#ifdef HAVE_SYSTEM_TZDATA -+ if (memmap) { -+ const struct location_info *li; -+ -+ /* TZif-style - grok the location info from the system database, -+ * if possible. */ -+ -+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { -+ tmp->location.comments = timelib_strdup(li->comment); -+ strncpy(tmp->location.country_code, li->code, 2); -+ tmp->location.longitude = li->longitude; -+ tmp->location.latitude = li->latitude; -+ tmp->bc = 1; -+ } -+ else { -+ set_default_location_and_comments(&tzf, tmp); -+ } -+ -+ /* Now done with the mmap segment - discard it. */ -+ if (memmap != internal_utc) { -+ munmap(memmap, maplen); -+ } -+ } else { -+#endif - if (type == TIMELIB_TZINFO_PHP) { - read_location(&tzf, tmp); - } else { - set_default_location_and_comments(&tzf, tmp); - } -+#ifdef HAVE_SYSTEM_TZDATA -+ } -+#endif - } else { - *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE; - tmp = NULL; -diff --git a/ext/date/php_date.c b/ext/date/php_date.c -index 48c82bf7ec..443299c089 100644 ---- a/ext/date/php_date.c -+++ b/ext/date/php_date.c -@@ -490,7 +490,11 @@ PHP_MINFO_FUNCTION(date) - php_info_print_table_row(2, "date/time support", "enabled"); - php_info_print_table_row(2, "timelib version", TIMELIB_ASCII_VERSION); - php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version); -+#ifdef HAVE_SYSTEM_TZDATA -+ php_info_print_table_row(2, "Timezone Database", "system"); -+#else - php_info_print_table_row(2, "Timezone Database", php_date_global_timezone_db_enabled ? "external" : "internal"); -+#endif - php_info_print_table_row(2, "Default timezone", guess_timezone(tzdb)); - php_info_print_table_end(); - diff --git a/php-8.4.0-embed.patch b/php-8.4.0-embed.patch new file mode 100644 index 0000000..fdb0477 --- /dev/null +++ b/php-8.4.0-embed.patch @@ -0,0 +1,25 @@ +diff -up ./sapi/embed/config.m4.embed ./sapi/embed/config.m4 +--- ./sapi/embed/config.m4.embed 2024-07-03 16:17:17.973277200 +0200 ++++ ./sapi/embed/config.m4 2024-07-03 16:19:32.224546927 +0200 +@@ -12,7 +12,8 @@ if test "$PHP_EMBED" != "no"; then + yes|shared) + LIBPHP_CFLAGS="-shared" + PHP_EMBED_TYPE=shared +- INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(orig_libdir)" ++ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -release \$(PHP_MAJOR_VERSION).\$(PHP_MINOR_VERSION)" ++ INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(libdir); \$(LIBTOOL) --mode=install \$(INSTALL) -m 0755 \$(OVERALL_TARGET) \$(INSTALL_ROOT)\$(libdir)" + ;; + static) + LIBPHP_CFLAGS="-static" +diff -up ./scripts/php-config.in.embed ./scripts/php-config.in +--- ./scripts/php-config.in.embed 2024-07-03 16:17:17.973277200 +0200 ++++ ./scripts/php-config.in 2024-07-03 16:20:00.439654444 +0200 +@@ -19,7 +19,7 @@ exe_extension="@EXEEXT@" + php_cli_binary=NONE + php_cgi_binary=NONE + configure_options="@CONFIGURE_OPTIONS@" +-php_sapis="@PHP_INSTALLED_SAPIS@" ++php_sapis="apache2handler litespeed fpm phpdbg @PHP_INSTALLED_SAPIS@" + ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@" + ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@" + php_embed_type="@PHP_EMBED_TYPE@" diff --git a/php-8.4.0-httpd.patch b/php-8.4.0-httpd.patch new file mode 100644 index 0000000..d219faf --- /dev/null +++ b/php-8.4.0-httpd.patch @@ -0,0 +1,26 @@ +Disable MPM detection + +mod_php is build twice +- as NTS without option +- as ZTS using --enable-maintainer-zts + +diff -up ./sapi/apache2handler/config.m4.mpmcheck ./sapi/apache2handler/config.m4 +--- ./sapi/apache2handler/config.m4.mpmcheck 2024-07-03 15:56:56.882370597 +0200 ++++ ./sapi/apache2handler/config.m4 2024-07-03 15:59:15.967824949 +0200 +@@ -105,16 +105,4 @@ if test "$PHP_APXS2" != "no"; then + INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL" + ;; + esac +- +- if test "$APACHE_VERSION" -lt 2004001; then +- APXS_MPM=`$APXS -q MPM_NAME` +- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then +- PHP_BUILD_THREAD_SAFE +- fi +- else +- APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes'` +- if test -n "$APACHE_THREADED_MPM"; then +- PHP_BUILD_THREAD_SAFE +- fi +- fi + fi diff --git a/php-8.4.0-phpize.patch b/php-8.4.0-phpize.patch new file mode 100644 index 0000000..76c3ed5 --- /dev/null +++ b/php-8.4.0-phpize.patch @@ -0,0 +1,35 @@ +diff -up ./scripts/phpize.in.headers ./scripts/phpize.in +--- ./scripts/phpize.in.headers 2019-07-23 10:05:11.000000000 +0200 ++++ ./scripts/phpize.in 2019-07-23 10:18:13.648098089 +0200 +@@ -166,6 +166,15 @@ phpize_autotools() + $PHP_AUTOHEADER || exit 1 + } + ++phpize_check_headers() ++{ ++ if test ! -f $includedir/main/php.h; then ++ echo "Can't find PHP headers in $includedir" ++ echo "The php-devel package is required for use of this command." ++ exit 1 ++ fi ++} ++ + # Main script + + case "$1" in +@@ -184,12 +193,15 @@ case "$1" in + + # Version + --version|-v) ++ phpize_check_headers + phpize_print_api_numbers + exit 0 + ;; + + # Default + *) ++ phpize_check_headers ++ + phpize_check_configm4 0 + + phpize_check_build_files diff --git a/php-8.4.0-systzdata-v24.patch b/php-8.4.0-systzdata-v24.patch new file mode 100644 index 0000000..eeeeaad --- /dev/null +++ b/php-8.4.0-systzdata-v24.patch @@ -0,0 +1,742 @@ +# License: MIT +# http://opensource.org/licenses/MIT + +Add support for use of the system timezone database, rather +than embedding a copy. Discussed upstream but was not desired. + +History: +r24: add internal UTC if tzdata is missing +r23: fix possible buffer overflow +r22: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi +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) +r16: adapt for timelib 2017.06 (in 7.2.3RC1) +r15: adapt for timelib 2017.05beta7 (in 7.2.0RC1) +r14: improve check for valid tz file +r13: adapt for upstream changes to use PHP allocator +r12: adapt for upstream changes for new zic +r11: use canonical names to avoid more case sensitivity issues + round lat/long from zone.tab towards zero per builtin db +r10: make timezone case insensitive +r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold) +r8: fix compile error without --with-system-tzdata configured +r7: improve check for valid timezone id to exclude directories +r6: fix fd leak in r5, fix country code/BC flag use in + timezone_identifiers_list() using system db, + fix use of PECL timezonedb to override system db, +r5: reverts addition of "System/Localtime" fake tzname. + updated for 5.3.0, parses zone.tab to pick up mapping between + timezone name, country code and long/lat coords +r4: added "System/Localtime" tzname which uses /etc/localtime +r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) +r2: add filesystem trawl to set up name alias index +r1: initial revision + + +diff -up ./ext/date/config0.m4.systzdata ./ext/date/config0.m4 +--- ./ext/date/config0.m4.systzdata 2024-07-03 16:21:20.240786848 +0200 ++++ ./ext/date/config0.m4 2024-07-03 16:25:14.838995464 +0200 +@@ -4,6 +4,18 @@ AC_CHECK_HEADERS([io.h]) + dnl Check for strtoll, atoll + AC_CHECK_FUNCS([strtoll atoll]) + ++PHP_ARG_WITH(system-tzdata, for use of system timezone data, ++ [AS_HELP_STRING([--with-system-tzdata[=DIR]],[to specify use of system timezone data])], no, no) ++ ++if test "$PHP_SYSTEM_TZDATA" != "no"; then ++ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) ++ ++ if test "$PHP_SYSTEM_TZDATA" != "yes"; then ++ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", ++ [Define for location of system timezone data]) ++ fi ++fi ++ + 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" +diff -up ./ext/date/lib/parse_tz.c.systzdata ./ext/date/lib/parse_tz.c +--- ./ext/date/lib/parse_tz.c.systzdata 2024-07-02 15:43:13.000000000 +0200 ++++ ./ext/date/lib/parse_tz.c 2024-07-03 16:21:20.240786848 +0200 +@@ -26,9 +26,33 @@ + #include "timelib.h" + #include "timelib_private.h" + ++#ifdef HAVE_SYSTEM_TZDATA ++#include ++#include ++#include ++#include ++#include ++ ++#include "php_scandir.h" ++ ++static const unsigned char internal_utc[] = { ++ 0x54, 0x5a, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x54, 0x5a, 0x69, 0x66, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, ++ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x0a, 0x55, 0x54, 0x43, ++ 0x30, 0x0a ++}; ++ ++#else + #define TIMELIB_SUPPORTS_V2DATA + #define TIMELIB_SUPPORT_SLIM_FILE + #include "timezonedb.h" ++#endif ++ ++#include + + #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) + # if defined(__LITTLE_ENDIAN__) +@@ -95,6 +119,11 @@ static int read_php_preamble(const unsig + { + uint32_t version; + ++ if (memcmp(*tzf, "TZif", 4) == 0) { ++ *tzf += 20; ++ return 0; ++ } ++ + /* read ID */ + version = (*tzf)[3] - '0'; + *tzf += 4; +@@ -577,7 +606,475 @@ void timelib_dump_tzinfo(timelib_tzinfo + } + } + +-static int seek_to_tz_position(const unsigned char **tzf, const char *timezone, const timelib_tzdb *tzdb) ++#ifdef HAVE_SYSTEM_TZDATA ++ ++#ifdef HAVE_SYSTEM_TZDATA_PREFIX ++#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX ++#else ++#define ZONEINFO_PREFIX "/usr/share/zoneinfo" ++#endif ++ ++/* System timezone database pointer. */ ++static const timelib_tzdb *timezonedb_system; ++ ++/* Hash table entry for the cache of the zone.tab mapping table. */ ++struct location_info { ++ char code[2]; ++ double latitude, longitude; ++ char name[64]; ++ char *comment; ++ struct location_info *next; ++}; ++ ++/* Cache of zone.tab. */ ++static struct location_info **system_location_table; ++ ++/* Size of the zone.tab hash table; a random-ish prime big enough to ++ * prevent too many collisions. */ ++#define LOCINFO_HASH_SIZE (1021) ++ ++/* Compute a case insensitive hash of str */ ++static uint32_t tz_hash(const char *str) ++{ ++ const unsigned char *p = (const unsigned char *)str; ++ uint32_t hash = 5381; ++ int c; ++ ++ while ((c = tolower(*p++)) != '\0') { ++ hash = (hash << 5) ^ hash ^ c; ++ } ++ ++ return hash % LOCINFO_HASH_SIZE; ++} ++ ++/* Parse an ISO-6709 date as used in zone.tab. Returns end of the ++ * parsed string on success, or NULL on parse error. On success, ++ * writes the parsed number to *result. */ ++static char *parse_iso6709(char *p, double *result) ++{ ++ double v, sign; ++ char *pend; ++ size_t len; ++ ++ if (*p == '+') ++ sign = 1.0; ++ else if (*p == '-') ++ sign = -1.0; ++ else ++ return NULL; ++ ++ p++; ++ for (pend = p; *pend >= '0' && *pend <= '9'; pend++) ++ ;; ++ ++ /* Annoying encoding used by zone.tab has no decimal point, so use ++ * the length to determine the format: ++ * ++ * 4 = DDMM ++ * 5 = DDDMM ++ * 6 = DDMMSS ++ * 7 = DDDMMSS ++ */ ++ len = pend - p; ++ if (len < 4 || len > 7) { ++ return NULL; ++ } ++ ++ /* p => [D]DD */ ++ v = (p[0] - '0') * 10.0 + (p[1] - '0'); ++ p += 2; ++ if (len == 5 || len == 7) ++ v = v * 10.0 + (*p++ - '0'); ++ /* p => MM[SS] */ ++ v += (10.0 * (p[0] - '0') ++ + p[1] - '0') / 60.0; ++ p += 2; ++ /* p => [SS] */ ++ if (len > 5) { ++ v += (10.0 * (p[0] - '0') ++ + p[1] - '0') / 3600.0; ++ p += 2; ++ } ++ ++ /* Round to five decimal place, not because it's a good idea, ++ * but, because the builtin data uses rounded data, so, match ++ * that. */ ++ *result = trunc(v * sign * 100000.0) / 100000.0; ++ ++ return p; ++} ++ ++/* This function parses the zone.tab file to build up the mapping of ++ * timezone to country code and geographic location, and returns a ++ * hash table. The hash table is indexed by the function: ++ * ++ * tz_hash(timezone-name) ++ */ ++static struct location_info **create_location_table(void) ++{ ++ struct location_info **li, *i; ++ char zone_tab[PATH_MAX]; ++ char line[512]; ++ FILE *fp; ++ ++ strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab); ++ ++ fp = fopen(zone_tab, "r"); ++ if (!fp) { ++ return NULL; ++ } ++ ++ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); ++ ++ while (fgets(line, sizeof line, fp)) { ++ char *p = line, *code, *name, *comment; ++ uint32_t hash; ++ double latitude, longitude; ++ ++ while (isspace(*p)) ++ p++; ++ ++ if (*p == '#' || *p == '\0' || *p == '\n') ++ continue; ++ ++ if (!isalpha(p[0]) || !isalpha(p[1]) || p[2] != '\t') ++ continue; ++ ++ /* code => AA */ ++ code = p; ++ p[2] = 0; ++ p += 3; ++ ++ /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */ ++ p = parse_iso6709(p, &latitude); ++ if (!p) { ++ continue; ++ } ++ p = parse_iso6709(p, &longitude); ++ if (!p) { ++ continue; ++ } ++ ++ if (!p || *p != '\t') { ++ continue; ++ } ++ ++ /* name = string */ ++ name = ++p; ++ while (*p != '\t' && *p && *p != '\n') ++ p++; ++ ++ *p++ = '\0'; ++ ++ /* comment = string */ ++ comment = p; ++ while (*p != '\t' && *p && *p != '\n') ++ p++; ++ ++ if (*p == '\n' || *p == '\t') ++ *p = '\0'; ++ ++ hash = tz_hash(name); ++ i = malloc(sizeof *i); ++ memcpy(i->code, code, 2); ++ strncpy(i->name, name, sizeof i->name); ++ i->comment = strdup(comment); ++ i->longitude = longitude; ++ i->latitude = latitude; ++ i->next = li[hash]; ++ li[hash] = i; ++ /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */ ++ } ++ ++ fclose(fp); ++ ++ return li; ++} ++ ++/* Return location info from hash table, using given timezone name. ++ * Returns NULL if the name could not be found. */ ++const struct location_info *find_zone_info(struct location_info **li, ++ const char *name) ++{ ++ uint32_t hash = tz_hash(name); ++ const struct location_info *l; ++ ++ if (!li) { ++ return NULL; ++ } ++ ++ for (l = li[hash]; l; l = l->next) { ++ if (timelib_strcasecmp(l->name, name) == 0) ++ return l; ++ } ++ ++ return NULL; ++} ++ ++/* Filter out some non-tzdata files and the posix/right databases, if ++ * present. */ ++static int index_filter(const struct dirent *ent) ++{ ++ return strcmp(ent->d_name, ".") != 0 ++ && strcmp(ent->d_name, "..") != 0 ++ && strcmp(ent->d_name, "posix") != 0 ++ && strcmp(ent->d_name, "posixrules") != 0 ++ && strcmp(ent->d_name, "right") != 0 ++ && strstr(ent->d_name, ".list") == NULL ++ && strstr(ent->d_name, ".tab") == NULL; ++} ++ ++static int sysdbcmp(const void *first, const void *second) ++{ ++ const timelib_tzdb_index_entry *alpha = first, *beta = second; ++ ++ return timelib_strcasecmp(alpha->id, beta->id); ++} ++ ++/* Retrieve tzdata version. */ ++static void retrieve_zone_version(timelib_tzdb *db) ++{ ++ static char buf[30]; ++ char path[PATH_MAX]; ++ FILE *fp; ++ ++ strncpy(path, ZONEINFO_PREFIX "/tzdata.zi", sizeof(path)); ++ ++ fp = fopen(path, "r"); ++ if (fp) { ++ if (fgets(buf, sizeof(buf), fp)) { ++ if (!memcmp(buf, "# version ", 10) && ++ isdigit(buf[10]) && ++ isdigit(buf[11]) && ++ isdigit(buf[12]) && ++ isdigit(buf[13]) && ++ islower(buf[14])) { ++ if (buf[14] >= 't') { /* 2022t = 2022.20 */ ++ buf[17] = 0; ++ buf[16] = buf[14] - 't' + '0'; ++ buf[15] = '2'; ++ } else if (buf[14] >= 'j') { /* 2022j = 2022.10 */ ++ buf[17] = 0; ++ buf[16] = buf[14] - 'j' + '0'; ++ buf[15] = '1'; ++ } else { /* 2022a = 2022.1 */ ++ buf[16] = 0; ++ buf[15] = buf[14] - 'a' + '1'; ++ } ++ buf[14] = '.'; ++ db->version = buf+10; ++ } ++ } ++ fclose(fp); ++ } ++} ++ ++ ++/* Create the zone identifier index by trawling the filesystem. */ ++static void create_zone_index(timelib_tzdb *db) ++{ ++ size_t dirstack_size, dirstack_top; ++ size_t index_size, index_next; ++ timelib_tzdb_index_entry *db_index; ++ char **dirstack; ++ ++ /* LIFO stack to hold directory entries to scan; each slot is a ++ * directory name relative to the zoneinfo prefix. */ ++ dirstack_size = 32; ++ dirstack = malloc(dirstack_size * sizeof *dirstack); ++ dirstack_top = 1; ++ dirstack[0] = strdup(""); ++ ++ /* Index array. */ ++ index_size = 64; ++ db_index = malloc(index_size * sizeof *db_index); ++ index_next = 0; ++ ++ do { ++ struct dirent **ents; ++ char name[PATH_MAX], *top; ++ int count; ++ ++ /* Pop the top stack entry, and iterate through its contents. */ ++ top = dirstack[--dirstack_top]; ++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top); ++ ++ count = php_scandir(name, &ents, index_filter, php_alphasort); ++ ++ while (count > 0) { ++ struct stat st; ++ const char *leaf = ents[count - 1]->d_name; ++ ++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s", ++ top, leaf); ++ ++ if (strlen(name) && stat(name, &st) == 0) { ++ /* Name, relative to the zoneinfo prefix. */ ++ const char *root = top; ++ ++ if (root[0] == '/') root++; ++ ++ snprintf(name, sizeof name, "%s%s%s", root, ++ *root ? "/": "", leaf); ++ ++ if (S_ISDIR(st.st_mode)) { ++ if (dirstack_top == dirstack_size) { ++ dirstack_size *= 2; ++ dirstack = realloc(dirstack, ++ dirstack_size * sizeof *dirstack); ++ } ++ dirstack[dirstack_top++] = strdup(name); ++ } ++ else { ++ if (index_next == index_size) { ++ index_size *= 2; ++ db_index = realloc(db_index, ++ index_size * sizeof *db_index); ++ } ++ ++ db_index[index_next++].id = strdup(name); ++ } ++ } ++ ++ free(ents[--count]); ++ } ++ ++ if (count != -1) free(ents); ++ free(top); ++ } while (dirstack_top); ++ ++ qsort(db_index, index_next, sizeof *db_index, sysdbcmp); ++ ++ if (!index_next) { ++ db_index[index_next++].id = strdup("UTC"); ++ } ++ db->index = db_index; ++ db->index_size = index_next; ++ ++ free(dirstack); ++} ++ ++#define FAKE_HEADER "1234\0??\1??" ++#define FAKE_UTC_POS (7 - 4) ++ ++/* Create a fake data segment for database 'sysdb'. */ ++static void fake_data_segment(timelib_tzdb *sysdb, ++ struct location_info **info) ++{ ++ size_t n; ++ char *data, *p; ++ ++ data = malloc(3 * sysdb->index_size + sizeof(FAKE_HEADER) - 1); ++ ++ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); ++ ++ for (n = 0; n < sysdb->index_size; n++) { ++ const struct location_info *li; ++ timelib_tzdb_index_entry *ent; ++ ++ ent = (timelib_tzdb_index_entry *)&sysdb->index[n]; ++ ++ /* Lookup the timezone name in the hash table. */ ++ if (strcmp(ent->id, "UTC") == 0) { ++ ent->pos = FAKE_UTC_POS; ++ continue; ++ } ++ ++ li = find_zone_info(info, ent->id); ++ if (li) { ++ /* If found, append the BC byte and the ++ * country code; set the position for this ++ * section of timezone data. */ ++ ent->pos = (p - data) - 4; ++ *p++ = '\1'; ++ *p++ = li->code[0]; ++ *p++ = li->code[1]; ++ } ++ else { ++ /* If not found, the timezone data can ++ * point at the header. */ ++ ent->pos = 0; ++ } ++ } ++ ++ sysdb->data = (unsigned char *)data; ++} ++ ++/* Returns true if the passed-in stat structure describes a ++ * probably-valid timezone file. */ ++static int is_valid_tzfile(const struct stat *st, int fd) ++{ ++ if (fd) { ++ char buf[20]; ++ if (read(fd, buf, 20)!=20) { ++ return 0; ++ } ++ lseek(fd, SEEK_SET, 0); ++ if (memcmp(buf, "TZif", 4)) { ++ return 0; ++ } ++ } ++ return S_ISREG(st->st_mode) && st->st_size > 20; ++} ++ ++/* To allow timezone names to be used case-insensitively, find the ++ * canonical name for this timezone, if possible. */ ++static const char *canonical_tzname(const char *timezone) ++{ ++ if (timezonedb_system) { ++ timelib_tzdb_index_entry *ent, lookup; ++ ++ lookup.id = (char *)timezone; ++ ++ ent = bsearch(&lookup, timezonedb_system->index, ++ timezonedb_system->index_size, sizeof lookup, ++ sysdbcmp); ++ if (ent) { ++ return ent->id; ++ } ++ } ++ ++ return timezone; ++} ++ ++/* Return the mmap()ed tzfile if found, else NULL. On success, the ++ * length of the mapped data is placed in *length. */ ++static char *map_tzfile(const char *timezone, size_t *length) ++{ ++ char fname[PATH_MAX]; ++ struct stat st; ++ char *p; ++ int fd; ++ ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return NULL; ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); ++ ++ fd = open(fname, O_RDONLY); ++ if (fd == -1) { ++ if (strcmp(timezone, "UTC")) { ++ return NULL; ++ } else { ++ *length = sizeof(internal_utc); ++ return internal_utc; ++ } ++ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st, fd)) { ++ close(fd); ++ return NULL; ++ } ++ ++ *length = st.st_size; ++ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); ++ close(fd); ++ ++ return p != MAP_FAILED ? p : NULL; ++} ++ ++#endif ++ ++static int inmem_seek_to_tz_position(const unsigned char **tzf, const char *timezone, const timelib_tzdb *tzdb) + { + int left = 0, right = tzdb->index_size - 1; + +@@ -603,9 +1100,49 @@ static int seek_to_tz_position(const uns + return 0; + } + ++static int seek_to_tz_position(const unsigned char **tzf, const char *timezone, ++ char **map, size_t *maplen, ++ const timelib_tzdb *tzdb) ++{ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (tzdb == timezonedb_system) { ++ char *orig; ++ ++ orig = map_tzfile(timezone, maplen); ++ if (orig == NULL) { ++ return 0; ++ } ++ ++ (*tzf) = (unsigned char *)orig; ++ *map = orig; ++ return 1; ++ } ++ else ++#endif ++ { ++ return inmem_seek_to_tz_position(tzf, timezone, tzdb); ++ } ++} ++ + const timelib_tzdb *timelib_builtin_db(void) + { ++#ifdef HAVE_SYSTEM_TZDATA ++ if (timezonedb_system == NULL) { ++ timelib_tzdb *tmp = malloc(sizeof *tmp); ++ ++ tmp->version = "0"; ++ tmp->data = NULL; ++ create_zone_index(tmp); ++ retrieve_zone_version(tmp); ++ system_location_table = create_location_table(); ++ fake_data_segment(tmp, system_location_table); ++ timezonedb_system = tmp; ++ } ++ ++ return timezonedb_system; ++#else + return &timezonedb_builtin; ++#endif + } + + const timelib_tzdb_index_entry *timelib_timezone_identifiers_list(const timelib_tzdb *tzdb, int *count) +@@ -617,7 +1154,32 @@ const timelib_tzdb_index_entry *timelib_ + int timelib_timezone_id_is_valid(const char *timezone, const timelib_tzdb *tzdb) + { + const unsigned char *tzf; +- return (seek_to_tz_position(&tzf, timezone, tzdb)); ++ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (tzdb == timezonedb_system) { ++ char fname[PATH_MAX]; ++ struct stat st; ++ ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return 0; ++ } ++ if (!strcmp(timezone, "UTC")) { ++ return 1; ++ } ++ if (system_location_table) { ++ if (find_zone_info(system_location_table, timezone) != NULL) { ++ /* found in cache */ ++ return 1; ++ } ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); ++ ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st, 0); ++ } ++#endif ++ ++ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); + } + + static int skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -662,6 +1224,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; ++ char *memmap = NULL; ++ size_t maplen; + timelib_tzinfo *tmp; + int version; + int transitions_result, types_result; +@@ -669,7 +1233,7 @@ timelib_tzinfo *timelib_parse_tzfile(con + + *error_code = TIMELIB_ERROR_NO_ERROR; + +- if (seek_to_tz_position(&tzf, timezone, tzdb)) { ++ if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { + tmp = timelib_tzinfo_ctor(timezone); + + version = read_preamble(&tzf, tmp, &type); +@@ -712,11 +1276,38 @@ timelib_tzinfo *timelib_parse_tzfile(con + return NULL; + } + ++#ifdef HAVE_SYSTEM_TZDATA ++ if (memmap) { ++ const struct location_info *li; ++ ++ /* TZif-style - grok the location info from the system database, ++ * if possible. */ ++ ++ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { ++ tmp->location.comments = timelib_strdup(li->comment); ++ strncpy(tmp->location.country_code, li->code, 2); ++ tmp->location.longitude = li->longitude; ++ tmp->location.latitude = li->latitude; ++ tmp->bc = 1; ++ } ++ else { ++ set_default_location_and_comments(&tzf, tmp); ++ } ++ ++ /* Now done with the mmap segment - discard it. */ ++ if (memmap != internal_utc) { ++ munmap(memmap, maplen); ++ } ++ } else { ++#endif + if (type == TIMELIB_TZINFO_PHP) { + read_location(&tzf, tmp); + } else { + set_default_location_and_comments(&tzf, tmp); + } ++#ifdef HAVE_SYSTEM_TZDATA ++ } ++#endif + } else { + *error_code = TIMELIB_ERROR_NO_SUCH_TIMEZONE; + tmp = NULL; +diff -up ./ext/date/php_date.c.systzdata ./ext/date/php_date.c +--- ./ext/date/php_date.c.systzdata 2024-07-02 15:43:13.000000000 +0200 ++++ ./ext/date/php_date.c 2024-07-03 16:21:20.240786848 +0200 +@@ -487,7 +487,11 @@ PHP_MINFO_FUNCTION(date) + php_info_print_table_row(2, "date/time support", "enabled"); + php_info_print_table_row(2, "timelib version", TIMELIB_ASCII_VERSION); + php_info_print_table_row(2, "\"Olson\" Timezone Database Version", tzdb->version); ++#ifdef HAVE_SYSTEM_TZDATA ++ php_info_print_table_row(2, "Timezone Database", "system"); ++#else + php_info_print_table_row(2, "Timezone Database", php_date_global_timezone_db_enabled ? "external" : "internal"); ++#endif + php_info_print_table_row(2, "Default timezone", guess_timezone(tzdb)); + php_info_print_table_end(); + diff --git a/php-fpm.service b/php-fpm.service index 687dfc0..e9ebb4a 100644 --- a/php-fpm.service +++ b/php-fpm.service @@ -8,7 +8,6 @@ After=syslog.target network.target [Service] Type=notify -EnvironmentFile=/etc/sysconfig/php-fpm ExecStart=/usr/sbin/php-fpm --nodaemonize ExecReload=/bin/kill -USR2 $MAINPID PrivateTmp=true diff --git a/php.spec b/php.spec index a68180b..c9adba4 100644 --- a/php.spec +++ b/php.spec @@ -1,4 +1,4 @@ -# remirepo spec file for php83-php +# remirepo spec file for php84-php # with SCL and backport stuff, adapted from # # Fedora spec file for php @@ -23,17 +23,15 @@ %endif # API/ABI check -%global apiver 20230831 -%global zendver 20230831 -%global pdover 20170320 -# Extension version -%global oci8ver 3.3.0 +%global apiver 20230901 +%global zendver 20230901 +%global pdover 20240423 # Adds -z now to the linker flags %global _hardened_build 1 # version used for php embedded library soname -%global embed_version 8.3 +%global embed_version 8.4 # Ugly hack. Harcoded values to avoid relocation. %global _httpd_mmn %(cat %{_root_includedir}/httpd/.mmn 2>/dev/null || echo 0) @@ -49,16 +47,6 @@ %global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock) -%ifarch aarch64 -%global oraclever 19.22 -%global oraclelib 19.1 -%global oracledir 19.22 -%else -%global oraclever 21.13 -%global oraclelib 21.1 -%global oracledir 21 -%endif - # Build for LiteSpeed Web Server (LSAPI), you can disable using --without tests %bcond_without lsws @@ -71,66 +59,30 @@ %global mysql_config %{_root_libdir}/mysql/mysql_config # Optional extensions; to enable: pass "--with xxx" etc to rpmbuild/mock. -%bcond_with oci8 %bcond_with zip # Optional extensions; to disable: pass "--without xxx" etc to rpmbuild/mock. -%bcond_without imap %bcond_without firebird %bcond_without freetds %bcond_without tidy %bcond_without sqlite3 %bcond_without enchant -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -# switch to bundled library using --without libpcre %bcond_without libpcre -%else -# switch to system library using --with libpcre -%bcond_with libpcre -%endif - -# Using qdbm from "remi" for now, see https://bugzilla.redhat.com/2017308 -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8 %bcond_without qdbm -%else -%bcond_with qdbm -%endif - -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 8 -# switch to bundled library using --without libxcrypt %bcond_without libxcrypt -%else -# switch to system library using --with libxcrypt -%bcond_with libxcrypt -%endif - %bcond_without dtrace - # build with system libgd (gd-last in remi repo) %bcond_without libgd - # build with system tzdata (2021 required) -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 7 %bcond_without tzdata -%else -%bcond_with tzdata -%endif - - -# httpd 2.4.10 with httpd-filesystem and sethandler support -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 -%global with_httpd2410 1 -%else -%global with_httpd2410 0 -%endif %global gh_commit 9ce6980b4d93d539341807087abef9217cb81351 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20230605 %global gh_owner php %global gh_project php-src -%global upver 8.3.9 -#global rcver RC1 +%global upver 8.4.0 +%global rcver alpha1 # TODO set PHP_EXTRA_VERSION for EOL version Summary: PHP scripting language for creating dynamic web sites @@ -169,25 +121,22 @@ Source12: php-fpm.wants # Configuration files for some extensions Source50: 10-opcache.ini Source51: opcache-default.blacklist -Source52: 20-oci8.ini Source53: 20-ffi.ini # Build fixes -Patch1: php-7.4.0-httpd.patch +Patch1: php-8.4.0-httpd.patch Patch5: php-7.2.0-includedir.patch -Patch6: php-8.0.0-embed.patch +Patch6: php-8.4.0-embed.patch Patch8: php-8.1.0-libdb.patch -# RHEL backports -Patch10: php-8.2.0-curl.patch # Functional changes # Use system nikic/php-parser Patch41: php-8.3.3-parser.patch # use system tzdata -Patch43: php-8.3.0-systzdata-v24.patch +Patch43: php-8.4.0-systzdata-v24.patch # See http://bugs.php.net/53436 # + display PHP version backported from 8.4 -Patch44: php-7.4.0-phpize.patch +Patch44: php-8.4.0-phpize.patch # Use -lldap_r for OpenLDAP Patch45: php-7.4.0-ldap_r.patch # Ignore unsupported "threads" option on password_hash @@ -200,7 +149,6 @@ Patch47: php-8.1.0-phpinfo.patch Patch48: php-8.3.0-openssl-ec-param.patch # RC Patch -Patch91: php-7.2.0-oci8conf.patch # Upstream fixes (100+) @@ -218,10 +166,8 @@ BuildRequires: pkgconfig(libcurl) >= 7.29.0 BuildRequires: libdb-devel BuildRequires: httpd-devel >= 2.0.46-1 BuildRequires: pam-devel -%if %{with_httpd2410} # to ensure we are using httpd with filesystem feature (see #1081453) BuildRequires: httpd-filesystem -%endif BuildRequires: %{?dtsprefix}libstdc++-devel # no pkgconfig to avoid compat-openssl10 BuildRequires: openssl-devel >= 1.0.2 @@ -263,13 +209,8 @@ Requires: httpd-mmn = %{_httpd_mmn} Provides: %{?scl_prefix}mod_php = %{version}-%{release} Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} # To ensure correct /var/lib/php/session ownership: -%if %{with_httpd2410} Requires(pre): httpd-filesystem -%else -Requires(pre): httpd -%endif -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 # For backwards-compatibility, pull the "php" command Recommends: %{?scl_prefix}php-cli%{?_isa} = %{version}-%{release} # httpd have threaded MPM by default @@ -280,13 +221,6 @@ Recommends: %{?scl_prefix}php-opcache%{?_isa} = %{version}-%{release} Recommends: %{?scl_prefix}php-pdo%{?_isa} = %{version}-%{release} Recommends: %{?scl_prefix}php-sodium%{?_isa} = %{version}-%{release} Recommends: %{?scl_prefix}php-xml%{?_isa} = %{version}-%{release} -%else -# For backwards-compatibility, require php-cli for the time being: -Requires: %{?scl_prefix}php-cli%{?_isa} = %{version}-%{release} -# For ARGON2 password -Requires: %{?scl_prefix}php-sodium%{?_isa} = %{version}-%{release} -%endif - # Don't provides extensions, or shared libraries (embedded) %{?filter_from_requires: %filter_from_requires /libphp.*so/d} @@ -339,15 +273,11 @@ Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} # is not valid. We can use %%post because this particular %%triggerun script # should fire just after this package is installed. Requires(post): systemd-sysv -%if %{with_httpd2410} # To ensure correct /var/lib/php/session ownership: Requires(pre): httpd-filesystem # For php.conf in /etc/httpd/conf.d # and version 2.4.10 for proxy support in SetHandler Requires: httpd-filesystem >= 2.4.10 -%else -Requires(pre): %{_root_sbindir}/useradd -%endif %description fpm PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI @@ -452,9 +382,7 @@ Requires: openssl-devel%{?_isa} >= 1.0.2 Requires: pcre2-devel%{?_isa} >= 10.30 %endif Requires: zlib-devel%{?_isa} -%if 0%{?fedora} || 0%{?rhel} >= 8 Recommends: php-nikic-php-parser5 >= 5.0.0 -%endif %description devel The %{?scl_prefix}php-devel package contains the files needed for building PHP @@ -478,23 +406,6 @@ bytecode in the shared memory. This eliminates the stages of reading code from the disk and compiling it on future access. In addition, it applies a few bytecode optimization patterns that make code execution faster. -%if %{with imap} -%package imap -Summary: A module for PHP applications that use IMAP -# All files licensed under PHP version 3.01 -License: PHP-3.01 -Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} -BuildRequires: pkgconfig(krb5) -BuildRequires: pkgconfig(krb5-gssapi) -BuildRequires: openssl-devel >= 1.0.2 -BuildRequires: libc-client-devel - -%description imap -The %{?scl_prefix}php-imap module will add IMAP (Internet Message Access Protocol) -support to PHP. IMAP is a protocol for retrieving and uploading e-mail -messages on mail servers. PHP is an HTML-embedded scripting language. -%endif - %package ldap Summary: A module for PHP applications that use LDAP # All files licensed under PHP version 3.01 @@ -639,43 +550,6 @@ Inprise Corp (now known as Borland Software Corp) under the InterBase Public License. %endif -%if %{with oci8} -%package oci8 -Summary: A module for PHP applications that use OCI8 databases -# All files licensed under PHP version 3.01 -License: PHP-3.01 -%ifarch aarch64 -BuildRequires: oracle-instantclient%{oraclever}-devel -# Should requires libclntsh.so.19.1()(aarch-64), but it's not provided by Oracle RPM. -Requires: libclntsh.so.%{oraclelib} -AutoReq: 0 -%else -BuildRequires: oracle-instantclient-devel >= %{oraclever} -%endif -Requires: %{?scl_prefix}php-pdo%{?_isa} = %{version}-%{release} -Provides: %{?scl_prefix}php_database -Provides: %{?scl_prefix}php-pdo_oci -Provides: %{?scl_prefix}php-pdo_oci%{?_isa} -Obsoletes: %{?scl_prefix}php-pecl-oci8 <= %{oci8ver} -Conflicts: %{?scl_prefix}php-pecl-oci8 > %{oci8ver} -Provides: %{?scl_prefix}php-pecl(oci8) = %{oci8ver} -Provides: %{?scl_prefix}php-pecl(oci8)%{?_isa} = %{oci8ver} - -%description oci8 -The %{?scl_prefix}php-oci8 packages provides the OCI8 extension version %{oci8ver} -and the PDO driver to access Oracle Database. - -The extension is linked with Oracle client libraries %{oraclever} -(Oracle Instant Client). For details, see Oracle's note -"Oracle Client / Server Interoperability Support" (ID 207303.1). - -You must install libclntsh.so.%{oraclelib} to use this package, -provided by Oracle Instant Client RPM available from Oracle on: -https://www.oracle.com/database/technologies/instant-client/downloads.html - -Documentation is at http://php.net/oci8 and http://php.net/pdo_oci -%endif - %package snmp Summary: A module for PHP applications that query SNMP-managed devices # All files licensed under PHP version 3.01 @@ -824,17 +698,6 @@ that implements the PHP Data Objects (PDO) interface to enable access from PHP to Microsoft SQL Server and Sybase databases through the FreeTDS library. %endif -%package pspell -Summary: A module for PHP applications for using pspell interfaces -# All files licensed under PHP version 3.01 -License: PHP-3.01 -Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release} -BuildRequires: aspell-devel >= 0.50.0 - -%description pspell -The %{?scl_prefix}php-pspell package contains a dynamic shared object that will add -support for using the pspell library to PHP. - %package intl Summary: Internationalization extension for PHP applications # All files licensed under PHP version 3.01 @@ -914,15 +777,9 @@ in pure PHP. %if %{with lsws} : With Litespeed SAPI %endif -%if %{with oci8} -: With Oracle extensions -%endif %if %{with enchant} : With Enchant extensions %endif -%if %{with imap} -: With Imap extensions -%endif %if %{with firebird} : With pdo_firebird extension %endif @@ -971,9 +828,6 @@ in pure PHP. %patch -P5 -p1 -b .includedir %patch -P6 -p1 -b .embed %patch -P8 -p1 -b .libdb -%if 0%{?rhel} == 7 -%patch -P10 -p1 -b .curltls -%endif %patch -P41 -p1 -b .syslib %if %{with tzdata} @@ -986,8 +840,6 @@ sed -e 's/php-devel/%{?scl_prefix}php-devel/' -i scripts/phpize.in %patch -P47 -p1 -b .phpinfo %patch -P48 -p1 -b .ec-param -%patch -P91 -p1 -b .remi-oci8 - # upstream patches # security patches @@ -1071,14 +923,6 @@ if test "x${vpdo}" != "x%{pdover}"; then exit 1 fi -# Check for some extension version -ver=$(sed -n '/#define PHP_OCI8_VERSION /{s/.* "//;s/".*$//;p}' ext/oci8/php_oci8.h) -if test "$ver" != "%{oci8ver}"; then - : Error: Upstream OCI8 version is now ${ver}, expecting %{oci8ver}. - : Update the oci8ver macro and rebuild. - exit 1 -fi - # https://bugs.php.net/63362 - Not needed but installed headers. # Drop some Windows specific headers to avoid installation, # before build to ensure they are really not needed. @@ -1103,14 +947,12 @@ sed -e "s/@PHP_APIVER@/%{apiver}-%{__isa_bits}/" \ -e "s:@ETCDIR@:%{_sysconfdir}:" \ -e "s:@INCDIR@:%{_includedir}:" \ -e "s:@BINDIR@:%{_bindir}:" \ + -e "s:@STATEDIR@:%{_localstatedir}:" \ -e "s:@SCL@:%{?scl:%{scl}_}:" \ %{SOURCE3} | tee macros.php -%if 0%{?fedora} >= 24 || 0%{?rhel} >= 8 -echo '%%%{?scl:%{scl}_}pecl_xmldir %{_localstatedir}/lib/php/peclxml' | tee -a macros.php -%endif # Some extensions have their own configuration file -cp %{SOURCE50} %{SOURCE51} %{SOURCE52} %{SOURCE53} . +cp %{SOURCE50} %{SOURCE51} %{SOURCE53} . sed -e 's:%{_root_sysconfdir}:%{_sysconfdir}:' \ -i 10-opcache.ini @@ -1205,7 +1047,6 @@ ln -sf ../configure %endif --with-zlib \ --with-layout=GNU \ - --with-kerberos \ --with-libxml \ %if %{with tzdata} --with-system-tzdata \ @@ -1235,9 +1076,6 @@ build --libdir=%{_libdir}/php \ --enable-opcache-file \ --with-capstone \ --enable-phpdbg \ -%if %{with imap} - --with-imap=shared --with-imap-ssl \ -%endif --enable-mbstring=shared \ --enable-mbregex \ --enable-gd=shared \ @@ -1269,10 +1107,6 @@ build --libdir=%{_libdir}/php \ --enable-mysqlnd=shared \ --with-mysqli=shared,mysqlnd \ --with-mysql-sock=%{mysql_sock} \ -%if %{with oci8} - --with-oci8=shared,instantclient,%{_root_prefix}/lib/oracle/%{oracledir}/client64/lib,%{oraclever} \ - --with-pdo-oci=shared,instantclient,%{_root_prefix}/lib/oracle/%{oracledir}/client64/lib,%{oraclever} \ -%endif %if %{with firebird} --with-pdo-firebird=shared \ %endif @@ -1300,7 +1134,6 @@ build --libdir=%{_libdir}/php \ %endif --without-readline \ --with-libedit \ - --with-pspell=shared \ --enable-phar=shared \ %if %{with tidy} --with-tidy=shared,%{_root_prefix} \ @@ -1329,7 +1162,6 @@ without_shared="--disable-gd \ --disable-xmlreader --disable-xmlwriter \ --without-sodium \ --without-sqlite3 --disable-phar --disable-fileinfo \ - --without-pspell \ --without-curl --disable-posix --disable-xml \ --disable-simplexml --disable-exif --without-gettext \ --without-iconv --disable-ftp --without-bz2 --disable-ctype \ @@ -1439,9 +1271,7 @@ cp %{SOURCE9} modconf # Dual config file with httpd >= 2.4 (RHEL >= 7) install -D -m 644 modconf $RPM_BUILD_ROOT%{_httpd_modconfdir}/20-%{name}.conf install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}/%{name}.conf -%if %{with_httpd2410} cat %{SOURCE10} >>$RPM_BUILD_ROOT%{_httpd_confdir}/%{name}.conf -%endif sed -e 's:/var/lib:%{_localstatedir}/lib:' \ -i $RPM_BUILD_ROOT%{_httpd_confdir}/%{name}.conf @@ -1451,11 +1281,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/wsdlcache install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/opcache -%if 0%{?fedora} >= 24 || 0%{?rhel} >= 8 install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/peclxml install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/pecl install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/tests/pecl -%endif %if %{with lsws} install -m 755 build-apache/sapi/litespeed/php $RPM_BUILD_ROOT%{_bindir}/lsphp @@ -1483,11 +1311,9 @@ mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf.default . # install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/php-fpm.conf # install systemd unit files and scripts for handling server startup install -Dm 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}php-fpm.service -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/httpd.service.d/%{?scl_prefix}php-fpm.conf install -Dm 644 %{SOURCE12} $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/nginx.service.d/%{?scl_prefix}php-fpm.conf sed -e 's/php-fpm/%{?scl_prefix}php-fpm/' -i $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/*.service.d/%{?scl_prefix}php-fpm.conf -%endif sed -e 's:/run:%{_localstatedir}/run:' \ -e 's:/etc/sysconfig:%{_sysconfdir}/sysconfig:' \ -e 's:php-fpm.service:%{?scl_prefix}php-fpm.service:' \ @@ -1496,7 +1322,6 @@ sed -e 's:/run:%{_localstatedir}/run:' \ # this folder requires systemd >= 204 install -m 755 -d $RPM_BUILD_ROOT%{_root_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d -%if %{with_httpd2410} # Switch to UDS # FPM sed -e 's@127.0.0.1:9000@%{_localstatedir}/run/php-fpm/www.sock@' \ @@ -1505,7 +1330,6 @@ sed -e 's@127.0.0.1:9000@%{_localstatedir}/run/php-fpm/www.sock@' \ # Apache sed -e 's@proxy:fcgi://127.0.0.1:9000@proxy:unix:%{_localstatedir}/run/php-fpm/www.sock|fcgi://localhost@' \ -i $RPM_BUILD_ROOT%{_httpd_confdir}/%{name}.conf -%endif # LogRotate install -m 755 -d $RPM_BUILD_ROOT%{_root_sysconfdir}/logrotate.d @@ -1514,16 +1338,6 @@ sed -e 's:/run:%{_localstatedir}/run:' \ -e 's:/var/log:%{_localstatedir}/log:' \ -i $RPM_BUILD_ROOT%{_root_sysconfdir}/logrotate.d/%{?scl_prefix}php-fpm -# Environment file -%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 -sed -e '/EnvironmentFile/d' -i $RPM_BUILD_ROOT%{_unitdir}/%{?scl_prefix}php-fpm.service -%else -install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig -install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm -sed -e 's:php-fpm.service:%{?scl_prefix}php-fpm.service:' \ - -i $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm -%endif - # make the cli commands available in standard root for SCL build %if 0%{?scl:1} install -m 755 -d $RPM_BUILD_ROOT%{_root_bindir} @@ -1548,9 +1362,6 @@ TESTCMD="$TESTCMD --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/php/modules" # Generate files lists and stub .ini files for each subpackage for mod in pgsql odbc ldap snmp \ mysqlnd mysqli \ -%if %{with imap} - imap \ -%endif mbstring gd dom xsl soap bcmath dba \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ tokenizer opcache \ @@ -1570,12 +1381,9 @@ for mod in pgsql odbc ldap snmp \ zip \ %endif sodium \ - pspell curl xml \ + curl xml \ posix shmop sysvshm sysvsem sysvmsg \ pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite \ -%if %{with oci8} - oci8 pdo_oci \ -%endif %if %{with firebird} pdo_firebird \ %endif @@ -1629,9 +1437,6 @@ cat files.mysqli \ # Split out the PDO modules cat files.pdo_pgsql >> files.pgsql cat files.pdo_odbc >> files.odbc -%if %{with oci8} -cat files.pdo_oci >> files.oci8 -%endif # sysv* and posix in packaged in php-process cat files.shmop files.sysv* files.posix > files.process @@ -1667,33 +1472,15 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/php/modules/*.a \ rm -f README.{Zeus,QNX,CVS-RULES} -%if ! %{with_httpd2410} -%pre fpm -# Add the "apache" user (to avoid pulling httpd in our dep) -getent group apache >/dev/null || \ - groupadd -g 48 -r apache -getent passwd apache >/dev/null || \ - useradd -r -u 48 -g apache -s /sbin/nologin \ - -d %{_httpd_contentdir} -c "Apache" apache -exit 0 -%endif - %post fpm %systemd_post %{?scl:%{scl}-}php-fpm.service %preun fpm %systemd_preun %{?scl:%{scl}-}php-fpm.service -%if 0%{?fedora} < 27 && 0%{?rhel} < 8 -%postun fpm -%systemd_postun_with_restart %{?scl:%{scl}-}php-fpm.service -%endif - -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 # Raised by new pool installation or new extension installation %transfiletriggerin fpm -- %{_sysconfdir}/php-fpm.d %{_sysconfdir}/php.d systemctl try-restart %{?scl:%{scl}-}php-fpm.service >/dev/null 2>&1 || : -%endif # Handle upgrading from SysV initscript to native systemd unit. # We can tell if a SysV version of php-fpm was previously installed by @@ -1711,14 +1498,6 @@ if [ -f /etc/rc.d/init.d/%{?scl_prefix}php-fpm ]; then fi -%if 0%{?fedora} < 28 && 0%{?rhel} < 8 -%post embedded -p /sbin/ldconfig -%postun embedded -p /sbin/ldconfig -%endif - - -%{!?_licensedir:%global license %%doc} - %files %{_httpd_moddir}/libphp.so %if 0%{?scl:1} @@ -1744,12 +1523,10 @@ fi %dir %{_libdir}/php/modules %dir %{_localstatedir}/lib/php %dir %{_datadir}/php -%if 0%{?fedora} >= 24 || 0%{?rhel} >= 8 %dir %{_localstatedir}/lib/php/peclxml %dir %{_docdir}/pecl %dir %{_datadir}/tests %dir %{_datadir}/tests/pecl -%endif %files cli %{_bindir}/php @@ -1783,22 +1560,15 @@ fi %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/wsdlcache %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/opcache -%if %{with_httpd2410} %config(noreplace) %{_httpd_confdir}/%{name}.conf -%endif %config(noreplace) %{_sysconfdir}/php-fpm.conf %config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf %config(noreplace) %{_root_sysconfdir}/logrotate.d/%{?scl_prefix}php-fpm -%if 0%{?fedora} < 26 && 0%{?rhel} < 8 -%config(noreplace) %{_sysconfdir}/sysconfig/php-fpm -%endif # {_prefix}/lib/tmpfiles.d/php-fpm.conf %{_unitdir}/%{?scl_prefix}php-fpm.service %dir %{_root_sysconfdir}/systemd/system/%{?scl_prefix}php-fpm.service.d -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 %config(noreplace) %{_root_sysconfdir}/systemd/system/httpd.service.d/%{?scl_prefix}php-fpm.conf %config(noreplace) %{_root_sysconfdir}/systemd/system/nginx.service.d/%{?scl_prefix}php-fpm.conf -%endif %{_sbindir}/php-fpm %dir %{_sysconfdir}/php-fpm.d # log owned by apache for log @@ -1829,9 +1599,6 @@ fi %files pgsql -f files.pgsql %files odbc -f files.odbc -%if %{with imap} -%files imap -f files.imap -%endif %files ldap -f files.ldap %files snmp -f files.snmp %files xml -f files.xml @@ -1850,7 +1617,6 @@ fi %if %{with freetds} %files pdo-dblib -f files.pdo_dblib %endif -%files pspell -f files.pspell %files intl -f files.intl %files process -f files.process %if %{with firebird} @@ -1862,9 +1628,6 @@ fi %files mysqlnd -f files.mysqlnd %files opcache -f files.opcache %config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist -%if %{with oci8} -%files oci8 -f files.oci8 -%endif %if %{with zip} %files zip -f files.zip %endif @@ -1874,6 +1637,10 @@ fi %changelog +* Wed Jul 3 2024 Remi Collet - 8.4.0~alpha1-1 +- Update to 8.4.0alpha1 +- drop imap, pspell, oci8 and pdo_oci extensions + * Wed Jul 3 2024 Remi Collet - 8.3.9-1 - Update to 8.3.9 - http://www.php.net/releases/8_3_9.php -- cgit