summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--10-opcache.ini3
-rw-r--r--19301.patch36
-rw-r--r--failed.txt2
-rw-r--r--php-8.5.0-parser.patch2
-rw-r--r--php.spec49
5 files changed, 59 insertions, 33 deletions
diff --git a/10-opcache.ini b/10-opcache.ini
index a036eee..252303a 100644
--- a/10-opcache.ini
+++ b/10-opcache.ini
@@ -1,6 +1,3 @@
-; Enable Zend OPcache extension module
-zend_extension=opcache
-
; Determines if Zend OPCache is enabled
opcache.enable=1
diff --git a/19301.patch b/19301.patch
new file mode 100644
index 0000000..d440311
--- /dev/null
+++ b/19301.patch
@@ -0,0 +1,36 @@
+From 60f5e26274ca8f3afdc2ed50b402b006f2f33a38 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Jul 2025 09:42:02 +0200
+Subject: [PATCH] Fix GH-19298 missing libraries for opcache
+
+---
+ ext/opcache/config.m4 | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
+index 75a5a219cb53..e9ce51bbd227 100644
+--- a/ext/opcache/config.m4
++++ b/ext/opcache/config.m4
+@@ -85,7 +85,7 @@ AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [
+ AS_VAR_IF([PHP_CAPSTONE], [yes],
+ [PKG_CHECK_MODULES([CAPSTONE], [capstone >= 3.0.0], [
+ AC_DEFINE([HAVE_CAPSTONE], [1], [Define to 1 if Capstone is available.])
+- PHP_EVAL_LIBLINE([$CAPSTONE_LIBS], [OPCACHE_SHARED_LIBADD])
++ PHP_EVAL_LIBLINE([$CAPSTONE_LIBS])
+ PHP_EVAL_INCLINE([$CAPSTONE_CFLAGS])
+ ZEND_JIT_SRC="$ZEND_JIT_SRC jit/ir/ir_disasm.c"
+ ])])
+@@ -318,7 +318,7 @@ AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [
+ AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1],
+ [Define to 1 if you have the POSIX mmap() SHM support.])
+ AS_CASE([$ac_cv_search_shm_open], ["none required"|no], [],
+- [PHP_EVAL_LIBLINE([$ac_cv_search_shm_open], [OPCACHE_SHARED_LIBADD])])
++ [PHP_EVAL_LIBLINE([$ac_cv_search_shm_open])])
+ ])
+
+ PHP_NEW_EXTENSION([opcache], m4_normalize([
+@@ -361,4 +361,3 @@ AS_VAR_IF([PHP_OPCACHE_JIT], [yes], [
+ ])
+ PHP_ADD_MAKEFILE_FRAGMENT([$ext_srcdir/jit/Makefile.frag])
+ ])
+-PHP_SUBST([OPCACHE_SHARED_LIBADD])
diff --git a/failed.txt b/failed.txt
index caee591..0253d46 100644
--- a/failed.txt
+++ b/failed.txt
@@ -1,4 +1,4 @@
-===== 8.5.0alpha2 (2025-07-17)
+===== 8.5.0alpha3 (2025-07-31)
$ grep -ar 'Tests failed' /var/lib/mock/*/build.log
diff --git a/php-8.5.0-parser.patch b/php-8.5.0-parser.patch
index ed4ba27..f9cf060 100644
--- a/php-8.5.0-parser.patch
+++ b/php-8.5.0-parser.patch
@@ -11,6 +11,6 @@ diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php
+ return;
+ }
+
- $version = "5.5.0";
+ $version = "5.6.0";
$phpParserDir = __DIR__ . "/PHP-Parser-$version";
if (!is_dir($phpParserDir)) {
diff --git a/php.spec b/php.spec
index 8c19025..6f8c0a3 100644
--- a/php.spec
+++ b/php.spec
@@ -94,8 +94,8 @@
%global gh_owner php
%global gh_project php-src
%global upver 8.5.0
-%global rcver alpha2
-%global lowrc alpha2
+%global rcver alpha3
+%global lowrc alpha3
# TODO set PHP_EXTRA_VERSION for EOL version
Summary: PHP scripting language for creating dynamic web sites
@@ -170,6 +170,7 @@ Patch48: php-8.5.0-openssl-ec-param.patch
Patch300: php-7.4.0-datetests.patch
# WIP
+Patch400: 19301.patch
BuildRequires: gnupg2
BuildRequires: bzip2-devel
@@ -195,6 +196,7 @@ BuildRequires: pkgconfig(libpcre2-8) >= 10.30
%else
Provides: bundled(pcre2) = 10.40
%endif
+BuildRequires: pkgconfig(capstone) >= 3.0
%if %{with libxcrypt}
BuildRequires: pkgconfig(libxcrypt)
%endif
@@ -235,7 +237,6 @@ Recommends: %{?scl_prefix}php-cli%{?_isa} = %{version}-%{release}
Recommends: %{?scl_prefix}php-fpm%{?_isa} = %{version}-%{release}
# as "php" is now mostly a meta-package, commonly used extensions
Recommends: %{?scl_prefix}php-mbstring%{?_isa} = %{version}-%{release}
-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}
@@ -366,6 +367,8 @@ Provides: %{?scl_prefix}php-iconv, %{?scl_prefix}php-iconv%{?_isa}
Obsoletes: %{?scl_prefix}php-json < 8.0.0
Provides: %{?scl_prefix}php-json = %{upver}, %{?scl_prefix}php-json%{?_isa} = %{upver}
Provides: %{?scl_prefix}php-libxml, %{?scl_prefix}php-libxml%{?_isa}
+Obsoletes: %{?scl_prefix}php-opcache < 8.5.0
+Provides: %{?scl_prefix}php-opcache = %{upver}, %{?scl_prefix}php-opcache%{?_isa} = %{upver}
Provides: %{?scl_prefix}php-openssl, %{?scl_prefix}php-openssl%{?_isa}
Provides: %{?scl_prefix}php-phar, %{?scl_prefix}php-phar%{?_isa}
Provides: %{?scl_prefix}php-pcre, %{?scl_prefix}php-pcre%{?_isa}
@@ -402,30 +405,14 @@ Requires: openssl-devel%{?_isa} >= 1.0.2
Requires: pcre2-devel%{?_isa} >= 10.30
%endif
Requires: zlib-devel%{?_isa}
-Recommends: php-nikic-php-parser5 >= 5.5.0
+Recommends: php-nikic-php-parser5 >= 5.6.0
+Conflicts: php-nikic-php-parser5 < 5.6.0
%description devel
The %{?scl_prefix}php-devel package contains the files needed for building PHP
extensions. If you need to compile your own PHP extensions, you will
need to install this package.
-%package opcache
-Summary: The Zend OPcache
-License: PHP-3.01
-BuildRequires: pkgconfig(capstone) >= 3.0
-Requires: %{?scl_prefix}php-common%{?_isa} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-zendopcache = %{version}
-Provides: %{?scl_prefix}php-pecl-zendopcache%{?_isa} = %{version}
-Provides: %{?scl_prefix}php-pecl(opcache) = %{version}
-Provides: %{?scl_prefix}php-pecl(opcache)%{?_isa} = %{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.
-
%package ldap
Summary: A module for PHP applications that use LDAP
# All files licensed under PHP version 3.01
@@ -874,6 +861,7 @@ sed -e 's/php-devel/%{?scl_prefix}php-devel/' -i scripts/phpize.in
%patch -P300 -p1 -b .datetests
# WIP patch
+%patch -P400 -p1 -b .pr19301
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE ZEND_LICENSE
@@ -1058,6 +1046,7 @@ ln -sf ../configure
--without-pear \
--with-exec-dir=%{_bindir} \
--without-gdbm \
+ --enable-opcache-file \
--with-openssl \
%if %{with openssl32}
--with-openssl-argon2 \
@@ -1095,8 +1084,6 @@ make %{?_smp_mflags}
pushd build-cgi
build --enable-pcntl \
- --enable-opcache \
- --enable-opcache-file \
--with-capstone \
--enable-phpdbg --enable-phpdbg-readline \
--enable-mbstring=shared \
@@ -1186,7 +1173,6 @@ without_shared="--disable-gd \
--disable-dom --disable-dba --without-unixODBC \
--without-mysqli \
--disable-pdo \
- --disable-opcache \
--disable-phpdbg \
--without-ffi \
--disable-xmlreader --disable-xmlwriter \
@@ -1410,8 +1396,7 @@ do
# for extension load order
case $mod in
opcache)
- # Zend extensions
- TESTCMD="$TESTCMD --define zend_extension=$mod"
+ # static extension
ini=10-${mod}.ini;;
pdo_*|mysqli|xmlreader)
# Extensions with dependencies on 20-*
@@ -1470,6 +1455,7 @@ cat files.curl files.phar files.fileinfo \
files.tokenizer > files.common
# The default Zend OPcache blacklist file
+rm files.opcache
install -m 644 opcache-default.blacklist $RPM_BUILD_ROOT%{_sysconfdir}/php.d/opcache-default.blacklist
# Install the macros file:
@@ -1533,6 +1519,8 @@ fi
%license timelib_LICENSE
%doc php.ini-*
%config(noreplace) %{_sysconfdir}/php.ini
+%config(noreplace) %{_sysconfdir}/php.d/10-opcache.ini
+%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist
%dir %{_sysconfdir}/php.d
%dir %{_libdir}/php
%dir %{_libdir}/php/modules
@@ -1641,8 +1629,6 @@ fi
%files enchant -f files.enchant
%endif
%files mysqlnd -f files.mysqlnd
-%files opcache -f files.opcache
-%config(noreplace) %{_sysconfdir}/php.d/opcache-default.blacklist
%if %{with zip}
%files zip -f files.zip
%endif
@@ -1652,6 +1638,13 @@ fi
%changelog
+* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 8.5.0~alpha3-1
+- update to 8.5.0alpha3
+- bump dependency on php-nikic-php-parser5 5.6
+- drop opcache subpackage, extension is build statically
+- fix missing libraries for opcache using patch from
+ https://github.com/php/php-src/pull/19301
+
* Tue Jul 15 2025 Remi Collet <remi@remirepo.net> - 8.5.0~alpha2-1
- update to 8.5.0alpha2