summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-09-13 16:20:57 +0200
committerRemi Collet <remi@php.net>2022-09-13 16:20:57 +0200
commit1239fdefe82054c00da905906a5fa842908e9fba (patch)
treee51c75f5891f9228d8586ea37002d82972659c04
parentaa87abfe1344200b97fa13a6a1ac0f836c426ce7 (diff)
add patch for test suite with PHP 8.2 from
https://github.com/Whissi/realpath_turbo/pull/20
-rw-r--r--php-realpath-turbo.spec33
-rw-r--r--realpath-turbo-tests.patch21
2 files changed, 32 insertions, 22 deletions
diff --git a/php-realpath-turbo.spec b/php-realpath-turbo.spec
index 3708e2c..b35e943 100644
--- a/php-realpath-turbo.spec
+++ b/php-realpath-turbo.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-realpath-turbo
#
-# Copyright (c) 2020 Remi Collet
+# Copyright (c) 2020-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -25,7 +25,7 @@
Name: %{?scl_prefix}php-%{pack_name}
Version: 2.0.0
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: Use realpath cache despite open_basedir restriction
@@ -33,33 +33,16 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pack_name}-%{version}-%{gh_short}.tar.gz
+Patch0: %{pack_name}-tests.patch
+
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 5.6
+BuildRequires: %{?scl_prefix}php-devel >= 5.6
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-%{pack_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-%{pack_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-%{pack_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter private shared
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
-
%description
When PHP's open_basedir restriction is set, PHP disables the realpath cache for
@@ -75,6 +58,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
mv %{gh_project}-%{gh_commit} NTS
cd NTS
+%patch0 -p1 -b .pr20
+
# Check extension version
ver=$(sed -n '/define REALPATH_TURBO_VERSION/{s/.* "//;s/".*$//;p}' realpath_turbo.h)
if test "$ver" != "%{version}%{?prever}%{?gh_date:-dev}"; then
@@ -180,6 +165,10 @@ exit $ret
%changelog
+* Tue Sep 13 2022 Remi Collet <remi@remirepo.net> - 2.0.0-3
+- add patch for test suite with PHP 8.2 from
+ https://github.com/Whissi/realpath_turbo/pull/20
+
* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 2.0.0-2
- rebuild for PHP 8.0.0RC1
diff --git a/realpath-turbo-tests.patch b/realpath-turbo-tests.patch
new file mode 100644
index 0000000..f492254
--- /dev/null
+++ b/realpath-turbo-tests.patch
@@ -0,0 +1,21 @@
+From 350b00fb53682c85c8b856033285419e7b51887a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 13 Sep 2022 16:15:18 +0200
+Subject: [PATCH] relax test expectation for 8.2
+
+---
+ tests/021.phpt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/021.phpt b/tests/021.phpt
+index 35e3515..69cfc83 100644
+--- a/tests/021.phpt
++++ b/tests/021.phpt
+@@ -11,6 +11,6 @@ realpath_turbo.open_basedir="/tmp/realpath_turbo-test"
+ var_dump(ini_get("realpath_turbo.open_basedir"));
+ var_dump(ini_get("open_basedir"));
+ --EXPECTF--
+-Warning: Unknown: open_basedir already set! Please unset open_basedir and only use realpath_turbo.open_basedir option. realpath_turbo will not have any effect when open_basedir is already set. in %s on line %d
++Warning: %s: open_basedir already set! Please unset open_basedir and only use realpath_turbo.open_basedir option. realpath_turbo will not have any effect when open_basedir is already set. in %s on line %d
+
+ Warning: request_startup() for realpath_turbo module failed in %s on line %d