From 6bb5cd8dfab4d6927eb3d816408ff3951e0a46e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20=C5=9Awi=C4=85tek?= Date: Thu, 8 Jan 2026 14:33:17 +0100 Subject: [PATCH] - Up to 8.5.1 --- openssl.patch | 18 +++++----- php-fcgi-graceful.patch | 16 --------- php-ini.patch | 37 ++++++++++++++------ php-sapi-ini-file.patch | 36 ++++++++++---------- php-shared.patch | 30 ++++++++--------- php-stupidapache_version.patch | 29 ---------------- php-systzdata.patch | 43 ++++++++++++----------- php-zlib-for-getimagesize.patch | 12 +++---- php.spec | 60 ++++++--------------------------- 9 files changed, 106 insertions(+), 175 deletions(-) delete mode 100644 php-stupidapache_version.patch diff --git a/openssl.patch b/openssl.patch index f6748f1..05ab780 100644 --- a/openssl.patch +++ b/openssl.patch @@ -1,19 +1,17 @@ -diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c -index 5564bf6f08..423f696c76 100644 ---- a/ext/openssl/xp_ssl.c -+++ b/ext/openssl/xp_ssl.c -@@ -1349,6 +1349,10 @@ static int php_openssl_set_server_specif +--- php-8.5.1/ext/openssl/xp_ssl.c.orig 2025-12-16 16:59:07.000000000 +0100 ++++ php-8.5.1/ext/openssl/xp_ssl.c 2026-01-08 12:42:37.787097996 +0100 +@@ -1241,6 +1241,10 @@ zval *zv; long ssl_ctx_options = SSL_CTX_get_options(ctx); +#ifdef SSL_OP_IGNORE_UNEXPECTED_EOF -+ ssl_ctx_options |= SSL_OP_IGNORE_UNEXPECTED_EOF; ++ ssl_ctx_options |= SSL_OP_IGNORE_UNEXPECTED_EOF; +#endif + - #if defined(HAVE_ECDH) && PHP_OPENSSL_API_VERSION < 0x10100 - if (php_openssl_set_server_ecdh_curve(stream, ctx) == FAILURE) { - return FAILURE; -@@ -1686,6 +1690,10 @@ int php_openssl_setup_crypto(php_stream + /* We now use php_openssl_tmp_rsa_cb to generate a key of appropriate size whenever necessary */ + if (php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "rsa_key_size") != NULL) { + php_error_docref(NULL, E_WARNING, "rsa_key_size context option has been removed"); +@@ -1576,6 +1580,10 @@ method = sslsock->is_client ? SSLv23_client_method() : SSLv23_server_method(); sslsock->ctx = SSL_CTX_new(method); diff --git a/php-fcgi-graceful.patch b/php-fcgi-graceful.patch index 4c26509..50d685b 100644 --- a/php-fcgi-graceful.patch +++ b/php-fcgi-graceful.patch @@ -60,19 +60,3 @@ echo "end!
\n"; fcgi_request *request = NULL; int warmup_repeats = 0; int repeats = 1; -@@ -2080,9 +2080,14 @@ - parent = 0; - - /* don't catch our signals */ -- sigaction(SIGTERM, &old_term, 0); - sigaction(SIGQUIT, &old_quit, 0); - sigaction(SIGINT, &old_int, 0); -+ -+ /* call graceful shutdown handler for SIGTERM */ -+ act.sa_flags = 0; -+ act.sa_handler = fastcgi_graceful_shutdown; -+ sigaction(SIGTERM, &act, &old_term); -+ - zend_signal_init(); - break; - case -1: diff --git a/php-ini.patch b/php-ini.patch index 35d7cfe..3a459ad 100644 --- a/php-ini.patch +++ b/php-ini.patch @@ -1,5 +1,5 @@ ---- php-8.4.1/php.ini.orig 2024-11-20 10:48:35.000000000 +0100 -+++ php-8.4.1/php.ini 2024-12-09 11:05:07.208307921 +0100 +--- php-8.5.1/php.ini.orig 2025-12-16 16:59:07.000000000 +0100 ++++ php-8.5.1/php.ini 2026-01-08 12:51:13.881735421 +0100 @@ -82,6 +82,16 @@ ; much more verbose when it comes to errors. We recommend using the ; development version only in development environments, as errors shown to @@ -44,7 +44,7 @@ ; Development Value: Off ; Production Value: Off ; https://php.net/short-open-tag -@@ -397,7 +407,7 @@ +@@ -392,7 +402,7 @@ ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ; https://php.net/expose-php @@ -53,7 +53,7 @@ ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; -@@ -763,7 +773,7 @@ +@@ -757,7 +767,7 @@ ; https://php.net/extension-dir ;extension_dir = "./" ; On windows: @@ -62,7 +62,7 @@ ; Directory where the temporary files should be placed. ; Defaults to the system default (see sys_get_temp_dir) -@@ -775,64 +785,6 @@ +@@ -769,70 +779,6 @@ ; https://php.net/enable-dl enable_dl = Off @@ -105,6 +105,12 @@ -; https://php.net/fastcgi.impersonate -;fastcgi.impersonate = 1 - +-; Prevent decoding of SCRIPT_FILENAME when using Apache ProxyPass or +-; ProxyPassMatch. This should be used if script file paths are not stored +-; in an encoded format on the file system. +-; Default is 1. +-;fastcgi.script_path_encoded = 0 +- -; Disable logging through FastCGI connection. PHP's default behavior is to enable -; this feature. -;fastcgi.logging = 0 @@ -127,7 +133,7 @@ ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; -@@ -988,19 +940,19 @@ +@@ -986,19 +932,19 @@ ; Use of this INI entry is deprecated, use global input_encoding instead. ; If empty, default_charset or input_encoding or iconv.input_encoding is used. ; The precedence is: default_charset < input_encoding < iconv.input_encoding @@ -150,17 +156,17 @@ [intl] ;intl.default_locale = -@@ -1167,6 +1119,9 @@ +@@ -1174,6 +1120,9 @@ ; https://php.net/mysqli.default-socket mysqli.default_socket = +; The name of the character set to use as the default character set. +;mysqli.connect_charset=utf8 + - ; Default host for mysqli_connect() (doesn't apply in safe mode). + ; Default host for mysqli_connect(). ; https://php.net/mysqli.default-host mysqli.default_host = -@@ -1257,7 +1212,7 @@ +@@ -1267,7 +1216,7 @@ [browscap] ; https://php.net/browscap @@ -169,7 +175,7 @@ [Session] ; Handler used to store/retrieve data. -@@ -1640,7 +1595,7 @@ +@@ -1653,7 +1602,7 @@ ; Sets the directory name where SOAP extension will put cache files. ; https://php.net/soap.wsdl-cache-dir @@ -178,7 +184,7 @@ ; (time to live) Sets the number of second while cached file will be used ; instead of original one. -@@ -1661,161 +1616,6 @@ +@@ -1674,170 +1623,6 @@ [dba] ;dba.default_handler= @@ -289,6 +295,15 @@ -; SHM reset. The default "" disables file based caching. -;opcache.file_cache= - +-; Enables or disables read-only mode for the second level cache directory. +-; It should improve performance for read-only containers, +-; when the cache is pre-warmed and packaged alongside the application. +-; Best used with `opcache.validate_timestamps=0`, `opcache.enable_file_override=1` +-; and `opcache.file_cache_consistency_checks=0`. +-; Note: A cache generated with a different build of PHP, a different file path, +-; or different settings (including which extensions are loaded), may be ignored. +-;opcache.file_cache_read_only=0 +- -; Enables or disables opcode caching in shared memory. -;opcache.file_cache_only=0 - diff --git a/php-sapi-ini-file.patch b/php-sapi-ini-file.patch index 5da800a..519866b 100644 --- a/php-sapi-ini-file.patch +++ b/php-sapi-ini-file.patch @@ -25,9 +25,9 @@ $ php -r 'var_dump(array(get_cfg_var("cfg_file_path"),php_ini_loaded_file()));' https://github.com/pld-linux/php/commit/762ec2e ---- php-8.0.0rc1/main/php_ini.c~ 2020-10-09 18:15:48.000000000 +0300 -+++ php-8.0.0rc1/main/php_ini.c 2020-10-09 18:42:20.087488856 +0300 -@@ -65,6 +65,11 @@ +--- php-8.5.1/main/php_ini.c.orig 2025-12-16 16:59:07.000000000 +0100 ++++ php-8.5.1/main/php_ini.c 2026-01-08 12:47:05.172174586 +0100 +@@ -64,6 +64,11 @@ PHPAPI char *php_ini_scanned_path=NULL; PHPAPI char *php_ini_scanned_files=NULL; @@ -39,28 +39,30 @@ https://github.com/pld-linux/php/commit/762ec2e /* {{{ php_ini_displayer_cb */ static ZEND_COLD void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) { -@@ -661,12 +666,14 @@ int php_init_config(void) +@@ -635,12 +640,15 @@ + char *p; zend_llist scanned_ini_list; - zend_llist_element *element; - int l, total_l = 0; + size_t total_l = 0; + const char *fmt = "%s:" PHP_CONFIG_FILE_PATH "/%s.d"; char *bufpath, *debpath, *endpath; - int lenpath; + size_t lenpath; - zend_llist_init(&scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1); + zend_llist_init(&scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, true); - bufpath = estrdup(php_ini_scanned_path); -+ bufpath = emalloc(strlen(php_ini_scanned_path) + strlen(fmt) + strlen(sapi_module.name)); -+ sprintf(bufpath, fmt, php_ini_scanned_path, sapi_module.name); ++ bufpath = emalloc(strlen(php_ini_scanned_path) + strlen(fmt) + strlen(sapi_module.name)); ++ sprintf(bufpath, fmt, php_ini_scanned_path, sapi_module.name); ++ for (debpath = bufpath ; debpath ; debpath=endpath) { endpath = strchr(debpath, DEFAULT_DIR_SEPARATOR); if (endpath) { -@@ -679,7 +686,7 @@ int php_init_config(void) - } - lenpath = (int)strlen(debpath); - -- if (lenpath > 0 && (ndir = php_scandir(debpath, &namelist, 0, php_alphasort)) > 0) { -+ if (lenpath > 0 && (ndir = php_scandir(debpath, &namelist, 0, php_csort)) > 0) { +@@ -654,7 +662,8 @@ + lenpath = strlen(debpath); - for (i = 0; i < ndir; i++) { + int ndir; +- if (lenpath > 0 && (ndir = php_scandir(debpath, &namelist, NULL, php_alphasort)) > 0) { ++ if (lenpath > 0 && (ndir = php_scandir(debpath, &namelist, 0, php_csort)) > 0) { ++ + for (int i = 0; i < ndir; i++) { + /* check for any file with .ini extension */ diff --git a/php-shared.patch b/php-shared.patch index b82b078..6d3d96c 100644 --- a/php-shared.patch +++ b/php-shared.patch @@ -83,21 +83,6 @@ $(BUILD_CLI) install-cli: $(SAPI_CLI_PATH) ---- php-7.0.0RC3/sapi/phpdbg/Makefile.frag~ 2015-09-16 15:49:38.000000000 +0300 -+++ php-7.0.0RC3/sapi/phpdbg/Makefile.frag 2015-09-27 21:24:44.370536565 +0300 -@@ -2,10 +2,10 @@ - - phpdbg-shared: $(BUILD_SHARED) - --$(BUILD_SHARED): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) -+$(BUILD_SHARED): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) - $(BUILD_PHPDBG_SHARED) - --$(BUILD_BINARY): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) -+$(BUILD_BINARY): libphp_common.la $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) - $(BUILD_PHPDBG) - - %.c: %.y --- php-8.0.0beta4/sapi/phpdbg/config.m4~ 2020-10-02 16:05:45.000000000 +0300 +++ php-8.0.0beta4/sapi/phpdbg/config.m4 2020-10-02 17:29:48.820717591 +0300 @@ -63,7 +63,7 @@ @@ -160,3 +145,18 @@ ]) PHP_SUBST([SAPI_LITESPEED_PATH]) +--- php-8.5.1/sapi/phpdbg/Makefile.frag.orig 2025-12-16 16:59:07.000000000 +0100 ++++ php-8.5.1/sapi/phpdbg/Makefile.frag 2026-01-08 12:34:27.663787981 +0100 +@@ -2,10 +2,10 @@ + + phpdbg-shared: $(SAPI_PHPDBG_SHARED_PATH) + +-$(SAPI_PHPDBG_SHARED_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) ++$(SAPI_PHPDBG_SHARED_PATH): libphp_common.la $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) + $(BUILD_PHPDBG_SHARED) + +-$(SAPI_PHPDBG_PATH): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) ++$(SAPI_PHPDBG_PATH): libphp_common.la $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS) + $(BUILD_PHPDBG) + + %.c: %.y diff --git a/php-stupidapache_version.patch b/php-stupidapache_version.patch deleted file mode 100644 index f8426e3..0000000 --- a/php-stupidapache_version.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- php-8.4.1/build/php.m4~ 2024-11-22 15:00:06.000000000 +0100 -+++ php-8.4.1/build/php.m4 2024-11-22 15:03:55.783321362 +0100 -@@ -2036,6 +2036,18 @@ dnl This macro is used to get a comparab - dnl - AC_DEFUN([PHP_AP_EXTRACT_VERSION], [m4_warn([obsolete], - [The macro 'PHP_AP_EXTRACT_VERSION' is obsolete. Use 'apxs -q HTTPD_VERSION']) -+ PHP_ARG_WITH(apache-version, Set Apache version, -+ [ --with-apache-version=VERSION Set Apache version instead of detecting from httpd binary]) -+ if test "$with_apache_version" != "no"; then -+ ac_output="foo bar baz $with_apache_version" -+ ac_IFS=$IFS -+IFS="- /. -+" -+ set $ac_output -+ IFS=$ac_IFS -+ -+ APACHE_VERSION=$(expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6) -+ else - AS_IF([test -x "$1"], [ - ac_output=$($1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//') - ac_IFS=$IFS -@@ -2046,6 +2058,7 @@ IFS="- /. - - APACHE_VERSION=$(expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6) - ]) -+ fi - ]) - - dnl diff --git a/php-systzdata.patch b/php-systzdata.patch index 6176a8b..8de0522 100644 --- a/php-systzdata.patch +++ b/php-systzdata.patch @@ -36,28 +36,6 @@ 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 -@@ -8,6 +8,18 @@ - [PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -Wno-implicit-fallthrough"],, - [-Werror]) - -+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="$PHP_DATE_CFLAGS -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1" - timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c 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 @@ -740,3 +718,24 @@ diff -up ./ext/date/php_date.c.systzdata ./ext/date/php_date.c php_info_print_table_row(2, "Default timezone", guess_timezone(tzdb)); php_info_print_table_end(); +--- ./ext/date/config0.m4.orig 2025-12-16 16:59:07.000000000 +0100 ++++ ./ext/date/config0.m4 2026-01-08 13:06:06.386641612 +0100 +@@ -7,6 +7,18 @@ + AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], + [PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -Wno-implicit-fallthrough"]) + ++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="$PHP_DATE_CFLAGS -DHAVE_TIMELIB_CONFIG_H=1" + PHP_TIMELIB_CFLAGS="$PHP_DATE_CFLAGS" + PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" diff --git a/php-zlib-for-getimagesize.patch b/php-zlib-for-getimagesize.patch index c09db17..b4b49ac 100644 --- a/php-zlib-for-getimagesize.patch +++ b/php-zlib-for-getimagesize.patch @@ -4,8 +4,8 @@ see also http://bugs.php.net/bug.php?id=29611 upstream: https://github.com/php/php-src/pull/4681 ---- php-8.2.0RC2/ext/standard/image.c~ 2022-09-14 12:42:49.000000000 +0300 -+++ php-8.2.0RC2/ext/standard/image.c 2022-09-29 01:20:02.719689289 +0300 +--- php-8.5.1/ext/standard/image.c.orig 2025-12-16 16:59:07.000000000 +0100 ++++ php-8.5.1/ext/standard/image.c 2026-01-08 12:54:27.628722771 +0100 @@ -28,7 +28,7 @@ #endif #include "php_image.h" @@ -15,19 +15,19 @@ upstream: https://github.com/php/php-src/pull/4681 #include "zlib.h" #endif -@@ -156,7 +156,7 @@ +@@ -154,7 +154,7 @@ } /* }}} */ -#if defined(HAVE_ZLIB) && !defined(COMPILE_DL_ZLIB) +#if defined(HAVE_ZLIB) /* {{{ php_handle_swc */ - static struct gfxinfo *php_handle_swc(php_stream * stream) + static struct php_gfxinfo *php_handle_swc(php_stream * stream) { -@@ -1454,7 +1454,7 @@ - result = php_handle_swf(stream); +@@ -1503,7 +1503,7 @@ break; case IMAGE_FILETYPE_SWC: + /* TODO: with the new php_image_register_handler() APIs, this restriction could be solved */ -#if defined(HAVE_ZLIB) && !defined(COMPILE_DL_ZLIB) +#if defined(HAVE_ZLIB) result = php_handle_swc(stream); diff --git a/php.spec b/php.spec index fb138a4..f5105b6 100644 --- a/php.spec +++ b/php.spec @@ -37,7 +37,6 @@ %bcond_without mysqli # mysqli support (Requires mysql >= 4.1) %bcond_without mysqlnd # mysqlnd support in mysql related extensions %bcond_without odbc # ODBC extension module -%bcond_without opcache # Enable Zend OPcache extension support %bcond_without openssl # OpenSSL support and OpenSSL extension (module) %bcond_without pcntl # pcntl extension module %bcond_without pcre_jit # PCRE JIT @@ -105,7 +104,7 @@ %endif %define orgname php -%define php_suffix 84 +%define php_suffix 85 Summary: PHP: Hypertext Preprocessor Summary(fr.UTF-8): Le langage de script embarque-HTML PHP Summary(pl.UTF-8): Język skryptowy PHP @@ -113,7 +112,7 @@ Summary(pt_BR.UTF-8): A linguagem de script PHP Summary(ru.UTF-8): PHP - язык препроцессирования HTML-файлов, выполняемый на сервере Summary(uk.UTF-8): PHP - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} -Version: 8.4.16 +Version: 8.5.1 Release: 1 Epoch: 4 # All files licensed under PHP version 3.01, except @@ -122,8 +121,8 @@ Epoch: 4 License: PHP 3.01 and Zend and BSD Group: Libraries Source0: https://php.net/distributions/%{orgname}-%{version}.tar.xz -# Source0-md5: caaccf12223032ec302322d2079af264 -Source1: opcache.ini +# Source0-md5: 430d08023cadc6f9408fef3354bbab02 +Source1: opcache.ini Source2: %{orgname}-mod_php.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -148,7 +147,6 @@ Patch21: %{orgname}-dba-link.patch Patch22: %{orgname}-both-apxs.patch Patch23: %{orgname}-paths.patch Patch24: %{orgname}-zlib-for-getimagesize.patch -Patch25: %{orgname}-stupidapache_version.patch Patch27: %{orgname}-config-dir.patch Patch29: %{orgname}-fcgi-graceful.patch Patch39: %{orgname}-use-prog_sendmail.patch @@ -240,9 +238,9 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir %{php_sysconfdir} # must be in sync with source. extra check ensuring that it is so is done in %%build -%define php_api_version 20240924 -%define zend_module_api 20240924 -%define zend_extension_api 420240924 +%define php_api_version 20250925 +%define zend_module_api 20250925 +%define zend_extension_api 420250925 %define php_pdo_api_version 20240423 # Extension versions @@ -1057,31 +1055,6 @@ Moduł PHP ze wsparciem dla ODBC. %description odbc -l pt_BR.UTF-8 Um módulo para aplicações PHP que usam ODBC. -%package opcache -Summary: Zend Optimizer+ - PHP code optimizer -Summary(pl.UTF-8): Zend Optimizer+ - optymalizator kodu PHP -Group: Libraries -URL: https://wiki.php.net/rfc/optimizerplus -Requires: %{name}-common = %{epoch}:%{version}-%{release} -Requires: %{name}-pcre = %{epoch}:%{version}-%{release} -Provides: php(opcache) = %{version} - -%description opcache -The Zend OPcache provides faster PHP execution through opcode caching -and optimization. It improves PHP performance by storing precompiled -script 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. - -%description opcache -l pl.UTF-8 -Zend OPcache zapewnia szybsze wykonywanie kodu PHP dzięki buforowaniu -i optymalizacji na poziomie opcode'ów. Poprawia wydajność PHP -przechowując prekompilowany bajtkod skryptu w pamięci współdzielonej. -Eliminuje etapy odczytu kodu z dysku i kompilacji przy późniejszym -dostępie. Ponadto wykonuje kilka wzorców optymalizacji bajtkodu, -czyniąc wykonywanie kodu szybszym. - %package openssl Summary: OpenSSL extension module for PHP Summary(pl.UTF-8): Moduł OpenSSL dla PHP @@ -1700,7 +1673,6 @@ cp -p php.ini-production php.ini %patch -P22 -p1 %patch -P23 -p1 %patch -P24 -p1 -%patch -P25 -p1 %patch -P27 -p1 %patch -P29 -p1 %patch -P39 -p1 @@ -1786,9 +1758,8 @@ sed -i -e 's#-fvisibility=hidden##g' configure* %{__rm} ext/standard/tests/file/file_get_contents_error001.phpt # fails sometimes %{__rm} ext/sockets/tests/mcast_ipv?_recv.phpt -# causes stack exhausion -%{__rm} Zend/tests/bug54268.phpt -%{__rm} Zend/tests/bug68412.phpt +%{__rm} Zend/tests/class_alias/bug54268.phpt +%{__rm} Zend/tests/magic_methods/bug68412.phpt # avoid issues when two builds run simultaneously %ifarch %{x8664} @@ -2006,7 +1977,7 @@ for sapi in $sapis; do --enable-option-checking=fatal \ %{__enable_disable bcmath bcmath shared} \ %{__enable_disable calendar calendar shared} \ - %{?with_opcache:--with-capstone} \ + --with-capstone \ %{__enable_disable ctype ctype shared} \ %{__enable_disable dba dba shared} \ %{__enable_disable dom dom shared} \ @@ -2070,7 +2041,6 @@ for sapi in $sapis; do %{?with_mm:--with-mm} \ %{?with_mysqlnd:--enable-mysqlnd=shared} \ %{?with_mysqli:--with-mysqli=shared,%{!?with_mysqlnd:/usr/bin/mysql_config}%{?with_mysqlnd:mysqlnd}} \ - %{__enable_disable opcache opcache shared} \ %{?with_openssl:--with-openssl=shared} \ --with-tcadb=/usr \ --with-external-pcre \ @@ -2505,7 +2475,6 @@ fi \ %extension_scripts mysqli %extension_scripts mysqlnd %extension_scripts odbc -%extension_scripts opcache %extension_scripts openssl %extension_scripts pcntl %extension_scripts pdo @@ -2619,6 +2588,7 @@ fi %dir %{_sysconfdir} %dir %{_sysconfdir}/conf.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/opcache.ini %attr(755,root,root) %{_libdir}/libphp_common%{php_suffix}-*.so %dir %{php_data_dir} %dir %{php_extensiondir} @@ -2825,14 +2795,6 @@ fi %attr(755,root,root) %{php_extensiondir}/odbc.so %endif -%if %{with opcache} -%files opcache -%defattr(644,root,root,755) -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/??_opcache.ini -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/opcache.ini -%attr(755,root,root) %{php_extensiondir}/opcache.so -%endif - %if %{with openssl} %files openssl %defattr(644,root,root,755) -- 2.52.0