Compare commits

..

1 Commits

Author SHA1 Message Date
22eb9c274d Import from AlmaLinux stable repository 2024-06-07 11:53:52 +00:00
4 changed files with 59 additions and 25 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/xdebug-3.1.2-52911af.tar.gz
SOURCES/xdebug-3.2.2-a909eb0.tar.gz

View File

@ -1 +1 @@
0d487e5ba43ac5bcb4f659a54c700e5887012ecc SOURCES/xdebug-3.1.2-52911af.tar.gz
27d40f52010464e5d06169ba7a46906d08b7d439 SOURCES/xdebug-3.2.2-a909eb0.tar.gz

View File

@ -0,0 +1,28 @@
From aa79e6e4eff65e722ef66ab61cb6aa20805a7dec Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
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;

View File

@ -1,6 +1,6 @@
# Fedora spec file for php-pecl-xdebug3
#
# Copyright (c) 2010-2021 Remi Collet
# Copyright (c) 2010-2023 Remi Collet
# Copyright (c) 2006-2009 Christopher Stone
#
# License: MIT
@ -16,11 +16,11 @@
%global pecl_name xdebug
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global gh_commit 52911afee0d66f4569d71d25bb9532c8fab9d5f5
%global gh_commit a909eb088ad9fd8c8e09fcc71d892fa54b957b31
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
# version/release
%global upstream_version 3.1.2
%global upstream_version 3.2.2
#global upstream_prever RC1
#global upstream_lower rc1
@ -30,17 +30,17 @@
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
# The Xdebug License, version 1.01
# (Based on "The PHP License", version 3.0)
License: BSD
Patch0: %{pecl_name}-deprecated.patch
License: Xdebug-1.03
URL: https://xdebug.org/
BuildRequires: gcc
BuildRequires: make
BuildRequires: php-devel >= 7.2
BuildRequires: php-devel >= 8.0
BuildRequires: php-pear
BuildRequires: php-simplexml
BuildRequires: libtool
@ -54,14 +54,10 @@ Provides: php-%{pecl_name}%{?_isa} = %{version}
Provides: php-pecl(Xdebug) = %{version}
Provides: php-pecl(Xdebug)%{?_isa} = %{version}
%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9 || "%{php_version}" > "8.0"
# package was renamed on new major version
Obsoletes: php-pecl-%{pecl_name} < 3
Provides: php-pecl-%{pecl_name} = %{version}-%{release}
Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%else
# A single version can be installed
Conflicts: php-pecl-%{pecl_name} < 3
%endif
%description
The Xdebug extension helps you debugging your script by providing a lot of
@ -92,10 +88,7 @@ mv NTS/package.xml .
sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
cd NTS
# ignore tests relying on DNS
find tests -type f -exec grep -q 'xdebug.client_host=' {} \; -delete -print
# ignore test with erratic result
rm tests/debugger/start_with_request_default_no_env.phpt
%patch -P0 -p1 -b .deprecated
# Check extension version
ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h)
@ -190,10 +183,14 @@ done
cd NTS
: Upstream test suite NTS extension
%ifarch %{ix86}
# ignore tests relying on DNS
find tests -type f -exec grep -q 'xdebug.client_host=' {} \; -delete -print
# ignore test with erratic result
rm tests/debugger/start_with_request_default_no_env.phpt
# see https://bugs.xdebug.org/view.php?id=2048
rm tests/base/bug02036.phpt
%endif
# Erratic result
rm tests/debugger/bug00998-ipv6.phpt
# bug00886 is marked as slow as it uses a lot of disk space
TEST_OPTS="-q -x --show-diff"
@ -222,6 +219,15 @@ REPORT_EXIT_STATUS=1 \
%changelog
* Wed Nov 29 2023 Remi Collet <rcollet@redhat.com> - 3.2.2-2
- drop inet_ntoa usage using upstream patch
* Fri Nov 24 2023 Remi Collet <rcollet@redhat.com> - 3.2.2-1
- update to 3.2.2 for PHP 8.2 RHEL-14699
* Mon May 16 2022 Remi Collet <rcollet@redhat.com> - 3.1.4-1
- update to 3.1.4 for PHP 8.1 #2070040
* Fri Dec 10 2021 Remi Collet <rcollet@redhat.com> - 3.1.2-1
- update to 3.1.2 rhbz#2030322