summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-08-01 14:59:17 +0200
committerRemi Collet <remi@php.net>2023-08-01 14:59:17 +0200
commita241c146bd96a303a1391f157335b20b35d5a3b1 (patch)
tree43e86ad8b2cab0214b5b2ab476880c33542e857f
parent16bfe8481842870229de0c47d55091cef3d2e6ad (diff)
update to 8.3.0beta2
revert upstream changes breaking DTrace build see https://github.com/php/php-src/issues/11847
-rw-r--r--failed.txt10
-rw-r--r--php-8.3.0-openssl-ec-param.patch2
-rw-r--r--php-dtrace.patch126
-rw-r--r--php.spec11
4 files changed, 140 insertions, 9 deletions
diff --git a/failed.txt b/failed.txt
index 5c57526..cfe8173 100644
--- a/failed.txt
+++ b/failed.txt
@@ -1,16 +1,14 @@
-===== 8.3.0beta1 (2023-07-20)
+===== 8.3.0beta2 (2023-08-03)
$ grep -ar 'Tests failed' /var/lib/mock/*/build.log
-/var/lib/mock/scl82el7x/build.log:Tests failed : 2
-/var/lib/mock/scl82el8x/build.log:Tests failed : 1
+/var/lib/mock/scl82el7x/build.log:Tests failed : 1
+/var/lib/mock/scl82el8x/build.log:Tests failed : 0
/var/lib/mock/scl82el9x/build.log:Tests failed : 0
-/var/lib/mock/scl82fc37x/build.log:Tests failed : 1
+/var/lib/mock/scl82fc37x/build.log:Tests failed : 0
/var/lib/mock/scl82fc38x/build.log:Tests failed : 2
-fc37x, el7x, el8x:
- 3 ext/openssl/tests/ecc_custom_params.phpt
el7x:
5 ext/standard/tests/directory/bug74589_utf8.phpt
fc38x:
diff --git a/php-8.3.0-openssl-ec-param.patch b/php-8.3.0-openssl-ec-param.patch
index cd3658a..94e4037 100644
--- a/php-8.3.0-openssl-ec-param.patch
+++ b/php-8.3.0-openssl-ec-param.patch
@@ -17,7 +17,7 @@ index 33f51bfa4d..340b0467d3 100644
OPENSSL_PKEY_SET_BN(data, b);
OPENSSL_PKEY_SET_BN(data, order);
-+ php_error_docref(NULL, E_WARNING, "Missing params: curve_name");
++ 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");
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.spec b/php.spec
index 93602e1..d8c7a67 100644
--- a/php.spec
+++ b/php.spec
@@ -123,14 +123,14 @@
%global gh_owner php
%global gh_project php-src
%global upver 8.3.0
-%global rcver beta1
+%global rcver beta2
%global lower %(echo %{rcver} | tr '[:upper:]' '[:lower:]')
# TODO set PHP_EXTRA_VERSION for EOL version
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}}
-Release: 2%{?dist}
+Release: 1%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -204,6 +204,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
@@ -985,6 +986,7 @@ sed -e 's/php-devel/%{?scl_prefix}php-devel/' -i scripts/phpize.in
%patch -P300 -p1 -b .datetests
# WIP patch
+%patch -P400 -p1 -R -b .dtrace
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE ZEND_LICENSE
@@ -1862,6 +1864,11 @@ fi
%changelog
+* Tue Aug 1 2023 Remi Collet <remi@remirepo.net> - 8.3.0~beta2-1
+- update to 8.3.0beta2
+- revert upstream changes breaking DTrace build
+ see https://github.com/php/php-src/issues/11847
+
* Mon Jul 24 2023 Remi Collet <remi@remirepo.net> - 8.3.0~beta1-2
- openssl: always warn about missing curve_name