summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-08-30 12:25:55 +0200
committerRemi Collet <remi@php.net>2023-08-30 12:25:55 +0200
commitd792d850dfb33c25e87dc02767ae34a07c7441d9 (patch)
treeaf551dc35e1b6decb9664e207483a41e99ca816e
parent627e1502d5206fc341ffb78824c46ac1dc6adb1e (diff)
update to 8.3.0RC1
bump to final API/ABI switch to nikic/php-parser version 5 openssl: always warn about missing curve_name
-rw-r--r--failed.txt14
-rw-r--r--php-8.3.0-openssl-ec-param.patch47
-rw-r--r--php-8.3.0-parser.patch (renamed from php-8.2.0-parser.patch)6
-rw-r--r--php-dtrace.patch126
-rw-r--r--php.ini10
-rw-r--r--php83.spec41
6 files changed, 223 insertions, 21 deletions
diff --git a/failed.txt b/failed.txt
index f31a774..ae2101d 100644
--- a/failed.txt
+++ b/failed.txt
@@ -1,13 +1,13 @@
-===== 8.2.10 (2023-08-31)
+===== 8.3.0RC1 (2023-08-31)
$ grep -ar 'Tests failed' /var/lib/mock/*/build.log
-/var/lib/mock/el7x82/build.log:Tests failed : 0
-/var/lib/mock/el8x82/build.log:Tests failed : 0
-/var/lib/mock/el9x82/build.log:Tests failed : 0
-/var/lib/mock/fc37x82/build.log:Tests failed : 0
-/var/lib/mock/fc38x82/build.log:Tests failed : 2
-/var/lib/mock/fc39x82/build.log:Tests failed : 2
+/var/lib/mock/el7x83/build.log:Tests failed : 0
+/var/lib/mock/el8x83/build.log:Tests failed : 0
+/var/lib/mock/el9x83/build.log:Tests failed : 0
+/var/lib/mock/fc37x83/build.log:Tests failed : 0
+/var/lib/mock/fc38x83/build.log:Tests failed : 2
+/var/lib/mock/fc39x83/build.log:Tests failed : 2
fc38x, fc39x:
diff --git a/php-8.3.0-openssl-ec-param.patch b/php-8.3.0-openssl-ec-param.patch
new file mode 100644
index 0000000..94e4037
--- /dev/null
+++ b/php-8.3.0-openssl-ec-param.patch
@@ -0,0 +1,47 @@
+From 21f9d16e130b412b6839494dcf30a2f1d7dcee0f Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 24 Jul 2023 10:54:49 +0200
+Subject: [PATCH] Always warn about missing curve_name
+
+Both Fedora and RHEL do not support arbitrary EC parameters
+See https://bugzilla.redhat.com/2223953
+---
+ ext/openssl/openssl.c | 13 ++-----------
+ 1 file changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
+index 33f51bfa4d..340b0467d3 100644
+--- a/ext/openssl/openssl.c
++++ b/ext/openssl/openssl.c
+@@ -4299,13 +4299,8 @@ static bool php_openssl_pkey_init_legacy_ec(EC_KEY *eckey, zval *data, bool *is_
+ OPENSSL_PKEY_SET_BN(data, b);
+ OPENSSL_PKEY_SET_BN(data, order);
+
++ php_error_docref(NULL, E_WARNING, "Missing params: curve_name (params only is not supported by OpenSSL)");
+ if (!(p && a && b && order)) {
+- if (!p && !a && !b && !order) {
+- php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
+- } else {
+- php_error_docref(
+- NULL, E_WARNING, "Missing params: curve_name or p, a, b, order");
+- }
+ goto clean_exit;
+ }
+
+@@ -4455,12 +4450,8 @@ static EVP_PKEY *php_openssl_pkey_init_ec(zval *data, bool *is_private) {
+ OPENSSL_PKEY_SET_BN(data, b);
+ OPENSSL_PKEY_SET_BN(data, order);
+
++ php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
+ if (!(p && a && b && order)) {
+- if (!p && !a && !b && !order) {
+- php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
+- } else {
+- php_error_docref(NULL, E_WARNING, "Missing params: curve_name or p, a, b, order");
+- }
+ goto cleanup;
+ }
+
+--
+2.41.0
+
diff --git a/php-8.2.0-parser.patch b/php-8.3.0-parser.patch
index dcfe617..27ff2f1 100644
--- a/php-8.2.0-parser.patch
+++ b/php-8.3.0-parser.patch
@@ -6,11 +6,11 @@ diff -up ./build/gen_stub.php.syslib ./build/gen_stub.php
$isInitialized = true;
+
-+ if (file_exists('/usr/share/php/PhpParser4/autoload.php')) {
-+ require_once '/usr/share/php/PhpParser4/autoload.php';
++ if (file_exists('/usr/share/php/PhpParser5/autoload.php')) {
++ require_once '/usr/share/php/PhpParser5/autoload.php';
+ return;
+ }
+
- $version = "4.15.1";
+ $version = "5.0.0alpha3";
$phpParserDir = __DIR__ . "/PHP-Parser-$version";
if (!is_dir($phpParserDir)) {
diff --git a/php-dtrace.patch b/php-dtrace.patch
new file mode 100644
index 0000000..b9e21b5
--- /dev/null
+++ b/php-dtrace.patch
@@ -0,0 +1,126 @@
+From 475fd29527ffd86297e7cd61fd1617a7374c5220 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Filip=20Zr=C5=AFst?=
+ <128540+f4z4on@users.noreply.github.com>
+Date: Wed, 19 Jul 2023 15:30:02 +0200
+Subject: [PATCH] Improve DTrace probe generation /w non-default compiler
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With DTrace support enabled during ./configure, our custom Autoconf
+macro PHP_INIT_DTRACE creates make rules to generate header and object
+files using dtrace utility. SystemTap† implementation of dtrace relies
+on other utilities to provide header preprocessing and final object file
+compilation. These utilities are configured by common environment
+variables with common defaults:‡
+
+* preprocessor from CPP defaults to “cpp”
+* compiler from CC defaults to “gcc”
+* compiler arguments can be expanded with CFLAGS
+
+This has been in SystemTap since version 1.5 released on 2011-05-23. We
+have been setting CFLAGS for dtrace since 717b367 released in versions
+5.4.20 and 5.5.4 on 2013-09-18. This change fixed build against
+SystemTap. It fixes majority of cases since practically all free Linux
+distributions use SystemTap for DTrace-like dynamic tracing and
+practically all of them use GCC or compatible compiler suite. However,
+this becomes an issue when cross-compiling using GCC because utility
+names contain target triplets. Autoconf already handles
+cross-compilation well —setting correct CC and CPP make macros
+(variables).
+
+Therefore, we simply set CC and CPP environment variables using
+respective macros when executing dtrace. Although SystemTap dtrace does
+not always use CC nor CPP, we set it every time. SystemTap documentation
+does not talk about this at all¶, so it is safer to always set it. We
+also follow how we set CFLAGS every time in the past.
+
+Original (or ported) DTrace mainly used on Oracle Linux, Solaris and
+macOS ignores these and does not support cross compilation.§
+
+† Well-known dynamic tracing infrastructure for Linux compatible with
+statically-defined tracing from DTrace.
+‡ https://sourceware.org/git/?p=systemtap.git;a=blob;f=dtrace.in;h=73a6f22e2de072773c692e3fea05c4b8cf814e43;hb=ebb424eee5599fcc131901c0d82d0bfc0d2f57ab
+¶ https://sourceware.org/systemtap/man/dtrace.1.html
+§ https://docs.oracle.com/cd/E88353_01/html/E72487/dtrace-8.html
+
+Closes GH-11643
+---
+ build/php.m4 | 8 ++++----
+ ext/oci8/config.m4 | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/build/php.m4 b/build/php.m4
+index 919279833f79..921a78eb78e3 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -2389,7 +2389,7 @@ dnl overwritten (Bug 61268).
+ $abs_srcdir/$ac_provsrc:;
+
+ $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
+- CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
++ CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
+
+ \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
+
+@@ -2409,12 +2409,12 @@ EOF
+ $ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
+ echo "[#] Generated by Makefile for libtool" > \$[]@
+ @test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
+- if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
++ if CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
+ echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
+ else [\\]
+ echo "pic_object='none'" >> \$[]@ [;\\]
+ fi
+- if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
++ if CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
+ echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
+ else [\\]
+ echo "non_pic_object='none'" >> \$[]@ [;\\]
+@@ -2426,7 +2426,7 @@ EOF
+ *)
+ cat>>Makefile.objects<<EOF
+ $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
+- CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
++ CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
+
+ EOF
+ ;;
+diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4
+index 714c655be439..883e272fb1fa 100644
+--- a/ext/oci8/config.m4
++++ b/ext/oci8/config.m4
+@@ -124,7 +124,7 @@ dnl overwritten (Bug 61268).
+ PHP_EXT_SRCDIR([oci8])/$ac_provsrc:;
+
+ $ac_bdir[$]ac_hdrobj: $ac_srcdir[$]ac_provsrc
+- CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHPOCI_,DTRACE_,g' \$[]@.bak > \$[]@
++ CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHPOCI_,DTRACE_,g' \$[]@.bak > \$[]@
+
+ \$(OCI8_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
+
+@@ -145,12 +145,12 @@ EOF
+ $ac_bdir[$]ac_provsrc.lo: \$(OCI8_DTRACE_OBJS)
+ echo "[#] Generated by Makefile for libtool" > \$[]@
+ @test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
+- if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $ac_srcdir[$]ac_provsrc $dtrace_oci8_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
++ if CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $ac_srcdir[$]ac_provsrc $dtrace_oci8_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
+ echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
+ else [\\]
+ echo "pic_object='none'" >> \$[]@ [;\\]
+ fi
+- if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $ac_srcdir[$]ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
++ if CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $ac_srcdir[$]ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
+ echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
+ else [\\]
+ echo "non_pic_object='none'" >> \$[]@ [;\\]
+@@ -162,7 +162,7 @@ EOF
+ AC_MSG_WARN([OCI8 extension: OCI8 DTrace support is not confirmed on this platform])
+ cat>>Makefile.objects<<EOF
+ $ac_bdir[$]ac_provsrc.o: \$(OCI8_DTRACE_OBJS)
+- CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $ac_srcdir[$]ac_provsrc $dtrace_oci8_objs
++ CPP="\$(CPP)" CC="\$(CC)" CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $ac_srcdir[$]ac_provsrc $dtrace_oci8_objs
+
+ EOF
+ ;;
diff --git a/php.ini b/php.ini
index fa92cd3..38b10a4 100644
--- a/php.ini
+++ b/php.ini
@@ -144,6 +144,11 @@
; Development Value: 5
; Production Value: 5
+; session.sid_length
+; Default Value: 32
+; Development Value: 26
+; Production Value: 26
+
; short_open_tag
; Default Value: On
; Development Value: Off
@@ -154,6 +159,11 @@
; Development Value: "GPCS"
; Production Value: "GPCS"
+; zend.assertions
+; Default Value: 1
+; Development Value: 1
+; Production Value: -1
+
; zend.exception_ignore_args
; Default Value: Off
; Development Value: Off
diff --git a/php83.spec b/php83.spec
index 5ae8078..6f0f7c3 100644
--- a/php83.spec
+++ b/php83.spec
@@ -8,19 +8,19 @@
# Please preserve changelog entries
#
# API/ABI check
-%global apiver 20220829
-%global zendver 20220829
+%global apiver 20230831
+%global zendver 20230831
%global pdover 20170320
# Extension version
%global fileinfover 1.0.5
%global oci8ver 3.3.0
-%global zipver 1.21.1
+%global zipver 1.22.2
# Adds -z now to the linker flags
%global _hardened_build 1
# version used for php embedded library soname
-%global embed_version 8.2
+%global embed_version 8.3
%global mysql_sock %(mysql_config --socket 2>/dev/null || echo /var/lib/mysql/mysql.sock)
@@ -109,8 +109,9 @@
%bcond_without libgd
%bcond_with zip
-%global upver 8.2.10
-#global rcver RC1
+%global upver 8.3.0
+%global rcver RC1
+# TODO set PHP_EXTRA_VERSION for EOL version
Summary: PHP scripting language for creating dynamic web sites
Name: php
@@ -159,7 +160,7 @@ Patch10: php-8.2.0-curl.patch
# Functional changes
# Use system nikic/php-parser
-Patch41: php-8.2.0-parser.patch
+Patch41: php-8.3.0-parser.patch
# use system tzdata
Patch42: php-8.1.0-systzdata-v23.patch
# See http://bugs.php.net/53436
@@ -171,6 +172,9 @@ Patch46: php-8.0.7-argon2.patch
# drop "Configure command" from phpinfo output
# and only use gcc (instead of full version)
Patch47: php-8.1.0-phpinfo.patch
+# Always warn about missing curve_name
+# Both Fedora and RHEL do not support arbitrary EC parameters
+Patch48: php-8.3.0-openssl-ec-param.patch
# RC Patch
Patch91: php-7.2.0-oci8conf.patch
@@ -184,6 +188,7 @@ Patch91: php-7.2.0-oci8conf.patch
Patch300: php-7.4.0-datetests.patch
# WIP
+Patch400: php-dtrace.patch
BuildRequires: gnupg2
BuildRequires: bzip2-devel
@@ -226,7 +231,7 @@ BuildRequires: libtool-ltdl-devel
BuildRequires: %{?dtsprefix}systemtap-sdt-devel
%endif
#BuildRequires: bison
-#BuildRequires: re2c
+#BuildRequires: re2c >= 1.0.3
# used for tests
BuildRequires: /bin/ps
%if %{with tzdata}
@@ -403,7 +408,7 @@ Provides: php-date, php-date%{?_isa}
Provides: bundled(timelib)
Provides: php-exif, php-exif%{?_isa}
Provides: php-fileinfo, php-fileinfo%{?_isa}
-Provides: bundled(libmagic) = 5.29
+Provides: bundled(libmagic) = 5.43
Provides: php-filter, php-filter%{?_isa}
Provides: php-ftp, php-ftp%{?_isa}
Provides: php-gettext, php-gettext%{?_isa}
@@ -500,6 +505,7 @@ need to install this package.
%package opcache
Summary: The Zend OPcache
License: PHP-3.01
+BuildRequires: pkgconfig(capstone) >= 3.0
Requires: php-common%{?_isa} = %{version}-%{release}
Obsoletes: php-pecl-zendopcache < 7.0.6
Provides: php-pecl-zendopcache = %{version}
@@ -1186,6 +1192,7 @@ in pure PHP.
%patch -P45 -p1 -b .ldap_r
%patch -P46 -p1 -b .argon2
%patch -P47 -p1 -b .phpinfo
+%patch -P48 -p1 -b .ec-param
%patch -P91 -p1 -b .remi-oci8
@@ -1199,6 +1206,7 @@ in pure PHP.
%endif
# WIP patch
+%patch -P400 -p1 -R -b .dtrace
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE ZEND_LICENSE
@@ -1206,7 +1214,7 @@ cp Zend/asm/LICENSE BOOST_LICENSE
cp TSRM/LICENSE TSRM_LICENSE
cp sapi/fpm/LICENSE fpm_LICENSE
cp ext/mbstring/libmbfl/LICENSE libmbfl_LICENSE
-cp ext/fileinfo/libmagic/LICENSE libmagic_LICENSE
+# cp ext/fileinfo/libmagic/LICENSE libmagic_LICENSE
cp ext/bcmath/libbcmath/LICENSE libbcmath_LICENSE
cp ext/date/lib/LICENSE.rst timelib_LICENSE
@@ -1240,6 +1248,9 @@ rm Zend/tests/bug68412.phpt
rm sapi/cli/tests/upload_2G.phpt
# tar issue
rm ext/zlib/tests/004-mb.phpt
+# Both Fedora and RHEL do not support arbitrary EC parameters
+# https://bugzilla.redhat.com/2223953
+rm ext/openssl/tests/ecc_custom_params.phpt
# avoid issue when 2 builds run simultaneously (keep 64321 for the SCL)
%ifarch x86_64
@@ -1432,6 +1443,7 @@ build --libdir=%{_libdir}/php \
--enable-pcntl \
--enable-opcache \
--enable-opcache-file \
+ --with-capstone \
--enable-phpdbg \
%if %{with imap}
--with-imap=shared --with-imap-ssl \
@@ -1576,6 +1588,7 @@ build --includedir=%{_includedir}/php-zts \
--enable-pcntl \
--enable-opcache \
--enable-opcache-file \
+ --with-capstone \
%if %{with imap}
--with-imap=shared --with-imap-ssl \
%endif
@@ -2044,7 +2057,7 @@ fi
%files common -f files.common
%doc EXTENSIONS NEWS UPGRADING* README.REDIST.BINS *md docs
%license LICENSE TSRM_LICENSE ZEND_LICENSE BOOST_LICENSE
-%license libmagic_LICENSE
+#license libmagic_LICENSE
%license timelib_LICENSE
%doc php.ini-*
%config(noreplace) %{_sysconfdir}/php.ini
@@ -2195,6 +2208,12 @@ fi
%changelog
+* Tue Aug 29 2023 Remi Collet <remi@remirepo.net> - 8.3.0~rc1-1
+- update to 8.3.0RC1
+- bump to final API/ABI
+- switch to nikic/php-parser version 5
+- openssl: always warn about missing curve_name
+
* Tue Aug 29 2023 Remi Collet <remi@remirepo.net> - 8.2.10-1
- Update to 8.2.10 - http://www.php.net/releases/8_2_10.php