From 7c0a614a602c5db51e29b8c4e9c3846f2adf76e2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 29 Nov 2023 09:49:13 +0100 Subject: [PATCH] drop inet_ntoa usage using upstream patch --- .php-pecl-xdebug3.metadata | 1 + php-pecl-xdebug3.spec | 9 ++++++++- xdebug-deprecated.patch | 28 ++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .php-pecl-xdebug3.metadata create mode 100644 xdebug-deprecated.patch diff --git a/.php-pecl-xdebug3.metadata b/.php-pecl-xdebug3.metadata new file mode 100644 index 0000000..35ae2fc --- /dev/null +++ b/.php-pecl-xdebug3.metadata @@ -0,0 +1 @@ +27d40f52010464e5d06169ba7a46906d08b7d439 xdebug-3.2.2-a909eb0.tar.gz diff --git a/php-pecl-xdebug3.spec b/php-pecl-xdebug3.spec index fc80229..53c6094 100644 --- a/php-pecl-xdebug3.spec +++ b/php-pecl-xdebug3.spec @@ -30,9 +30,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: %{pecl_name}-deprecated.patch + License: Xdebug-1.03 URL: https://xdebug.org/ @@ -86,6 +88,8 @@ mv NTS/package.xml . sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml cd NTS +%patch -P0 -p1 -b .deprecated + # 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 @@ -215,6 +219,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Nov 29 2023 Remi Collet - 3.2.2-2 +- drop inet_ntoa usage using upstream patch + * Fri Nov 24 2023 Remi Collet - 3.2.2-1 - update to 3.2.2 for PHP 8.2 RHEL-14699 diff --git a/xdebug-deprecated.patch b/xdebug-deprecated.patch new file mode 100644 index 0000000..82dd3d1 --- /dev/null +++ b/xdebug-deprecated.patch @@ -0,0 +1,28 @@ +From aa79e6e4eff65e722ef66ab61cb6aa20805a7dec Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 29 Nov 2023 08:59:52 +0100 +Subject: [PATCH] Fixed issue #2217: Replace inet_ntoa with inet_ntop to + support IPv6 with xdebug://gateway + +--- + src/debugger/ip_info.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/debugger/ip_info.c b/src/debugger/ip_info.c +index 143fd722c..abe858c4a 100644 +--- a/src/debugger/ip_info.c ++++ b/src/debugger/ip_info.c +@@ -222,11 +222,12 @@ char *xdebug_get_gateway_ip(void) + { + in_addr_t addr = 0; + char iface[IF_NAMESIZE]; ++ char addrbuf[INET6_ADDRSTRLEN]; + + memset(iface, 0, sizeof(iface)); + + if (get_gateway_and_iface(&addr, iface)) { +- return xdstrdup(inet_ntoa(*(struct in_addr *) &addr)); ++ return xdstrdup(inet_ntop(AF_INET, &addr, addrbuf, sizeof(addrbuf))); + } + + return NULL;