From 9e9f2023e3876055685c86c5f45abaca219be8f9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 23 Oct 2023 07:56:38 +0200 Subject: [PATCH] fix configuration file using patch from https://github.com/xdebug/xdebug/pull/916 --- 916.patch | 23 +++++++++++++++++++++++ php-pecl-xdebug3.spec | 33 +++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 916.patch diff --git a/916.patch b/916.patch new file mode 100644 index 0000000..ef61153 --- /dev/null +++ b/916.patch @@ -0,0 +1,23 @@ +From d9a61214ca40418dba961858029dc00e79977056 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Sun, 22 Oct 2023 08:55:38 +0200 +Subject: [PATCH] Update xdebug.ini + +--- + xdebug.ini | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/xdebug.ini b/xdebug.ini +index c983bef23..9d091b4c7 100644 +--- a/xdebug.ini ++++ b/xdebug.ini +@@ -1,9 +1,5 @@ + ; This file is generated by the 'xdebug.org:html/docs/convert.php' robot +-<<<<<<< Updated upstream +-; for Xdebug 3.3.0alpha2 — do not modify by hand +-======= + ; for Xdebug 3.3.0alpha3 — do not modify by hand +->>>>>>> Stashed changes + + ; ----------------------------------------------------------------------------- + ; xdebug.cli_color diff --git a/php-pecl-xdebug3.spec b/php-pecl-xdebug3.spec index 9f7fb8c..35bb6f2 100644 --- a/php-pecl-xdebug3.spec +++ b/php-pecl-xdebug3.spec @@ -29,9 +29,11 @@ Name: php-pecl-xdebug3 Summary: Provides functions for function traces and profiling Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} -Release: 1%{?dist} +Release: 2%{?dist} Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz +Patch0: https://patch-diff.githubusercontent.com/raw/xdebug/xdebug/pull/916.patch + License: Xdebug-1.03 URL: https://xdebug.org/ @@ -87,6 +89,8 @@ mv %{sources}/package.xml . sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml cd %{sources} +%patch -P0 -p1 + # Check extension version ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h) if test "$ver" != "%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then @@ -100,7 +104,7 @@ mkdir NTS mkdir ZTS %endif -cat << 'EOF' | tee %{ini_name} +cat << 'EOF' >%{ini_name} ; Enable xdebug extension module zend_extension=%{pecl_name}.so @@ -108,7 +112,9 @@ zend_extension=%{pecl_name}.so ; See https://xdebug.org/docs/all_settings EOF -sed -e '1d' %{sources}/%{pecl_name}.ini >>%{ini_name} +sed -e '1,2d' %{sources}/%{pecl_name}.ini >>%{ini_name} + +head -n15 <%{ini_name} %build @@ -165,17 +171,28 @@ for mod in simplexml; do fi done -# only check if build extension can be loaded +: check if NTS extension can be loaded %{__php} \ --no-php-ini \ --define zend_extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep Xdebug + --modules | grep '^Xdebug$' + +: check if provided config file is usable +%{__php} \ + --no-php-ini \ + -c %{buildroot}%{php_inidir}/%{ini_name} -v 2>err.log \ + | grep 'with Xdebug v%{upstream_version}%{?upstream_prever}' +if [ -s err.log ]; then + cat err.log + exit 1 +fi %if %{with_zts} +: check if ZTS extension can be loaded %{__ztsphp} \ --no-php-ini \ --define zend_extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep Xdebug + --modules | grep '^Xdebug$' %endif %if %{with tests} @@ -214,6 +231,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Sun Oct 22 2023 Remi Collet - 3.3.0~alpha3-2 +- fix configuration file using patch from + https://github.com/xdebug/xdebug/pull/916 + * Fri Oct 20 2023 Remi Collet - 3.3.0~alpha3-1 - update to 3.3.0alpha3