From 03c27ee7a1c9730903ab741719596e4d309ad219 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 20 Jan 2021 09:09:21 +0100 Subject: update to 2.3.0 add patch for test suite from https://github.com/horde/SessionHandler/pull/3 use weak and range dependencies --- 3.patch | 25 +++++++++++++++++ php-horde-Horde-SessionHandler.spec | 55 +++++++++++++++++++++++++------------ 2 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 3.patch diff --git a/3.patch b/3.patch new file mode 100644 index 0000000..c7965da --- /dev/null +++ b/3.patch @@ -0,0 +1,25 @@ +From 8cb2da6626e84b7e480917ff1d7a5cea140e539d Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 20 Jan 2021 09:03:39 +0100 +Subject: [PATCH] re-add setUpBeforeClass + +--- + test/Horde/SessionHandler/Storage/Base.php | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/test/Horde/SessionHandler/Storage/Base.php b/test/Horde/SessionHandler/Storage/Base.php +index f4eb0f3..1148cbb 100644 +--- a/test/Horde/SessionHandler/Storage/Base.php ++++ b/test/Horde/SessionHandler/Storage/Base.php +@@ -68,6 +68,11 @@ protected function _gc() + self::$handler->getSessionIDs()); + } + ++ public static function setUpBeforeClass() ++ { ++ self::$dir = Horde_Util::createTempDir(); ++ } ++ + public static function tearDownAfterClass() + { + self::$handler = null; diff --git a/php-horde-Horde-SessionHandler.spec b/php-horde-Horde-SessionHandler.spec index 5fca9ab..c162c3e 100644 --- a/php-horde-Horde-SessionHandler.spec +++ b/php-horde-Horde-SessionHandler.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-horde-Horde-SessionHandler # -# Copyright (c) 2013-2017 Remi Collet +# Copyright (c) 2013-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -11,22 +11,28 @@ %global pear_channel pear.horde.org Name: php-horde-Horde-SessionHandler -Version: 2.2.9 -Release: 3%{?dist} +Version: 2.3.0 +Release: 1%{?dist} Summary: Horde Session Handler API -Group: Development/Libraries License: LGPLv2 URL: http://pear.horde.org Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz +Patch0: https://patch-diff.githubusercontent.com/raw/horde/SessionHandler/pull/3.patch + BuildArch: noarch BuildRequires: php(language) >= 5.3.0 BuildRequires: php-pear(PEAR) BuildRequires: php-channel(%{pear_channel}) # To run unit tests -BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 -BuildRequires: php-pear(%{pear_channel}/Horde_Db) >= 2.0.0 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 with php-pear(%{pear_channel}/Horde_Test) < 3) +BuildRequires: (php-pear(%{pear_channel}/Horde_Db) >= 2.1.0 with php-pear(%{pear_channel}/Horde_Db) < 3) +%else +BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 +BuildRequires: php-pear(%{pear_channel}/Horde_Db) >= 2.0.0 +%endif Requires(post): %{__pear} Requires(postun): %{__pear} @@ -34,13 +40,20 @@ Requires: php(language) >= 5.3.0 Requires: php-date Requires: php-session Requires: php-channel(%{pear_channel}) -Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 -Requires: php-pear(%{pear_channel}/Horde_Exception) < 3.0.0 -Requires: php-pear(%{pear_channel}/Horde_Support) >= 2.0.0 -Requires: php-pear(%{pear_channel}/Horde_Support) < 3.0.0 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Exception) < 3) +Requires: (php-pear(%{pear_channel}/Horde_Support) >= 2.0.0 with php-pear(%{pear_channel}/Horde_Support) < 3) +# Optional +Recommends: (php-pear(%{pear_channel}/Horde_Db) >= 2.2.0 with php-pear(%{pear_channel}/Horde_Db) < 3) +%else +Requires: php-pear(%{pear_channel}/Horde_Exception) < 3.0.0 +Requires: php-pear(%{pear_channel}/Horde_Exception) >= 2.0.0 +Requires: php-pear(%{pear_channel}/Horde_Support) < 3.0.0 +Requires: php-pear(%{pear_channel}/Horde_Support) >= 2.0.0 # Optional -Requires: php-pear(%{pear_channel}/Horde_Db) >= 2.2.0 -Requires: php-pear(%{pear_channel}/Horde_Db) < 3.0.0 +Requires: php-pear(%{pear_channel}/Horde_Db) < 3.0.0 +Requires: php-pear(%{pear_channel}/Horde_Db) >= 2.2.0 +%endif # Optional and implicitly required: Horde_HashTable, Horde_Log, Horde_Mongo Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} @@ -56,7 +69,8 @@ handlers for PHP. %setup -q -c cd %{pear_name}-%{version} -mv ../package.xml %{name}.xml +%patch0 -p1 +sed -e '/Base.php/s/md5sum=.*name=/name=/' ../package.xml >%{name}.xml %build @@ -82,12 +96,11 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} cd %{pear_name}-%{version}/test/$(echo %{pear_name} | sed -e s:_:/:g) ret=0 -for cmd in php php56 php70 php71 php72; do +# TODO: php80 +rm -f Storage/BuiltinTest.php +for cmd in php php72 php73 php74; do if which $cmd; then - if [ $($cmd -r 'echo PHP_VERSION_ID;') -ge 70200 ]; then - rm Storage/BuiltinTest.php - fi - $cmd %{_bindir}/phpunit --verbose . || ret=1 + $cmd %{_bindir}/phpunit --bootstrap bootstrap.php --verbose . || ret=1 fi done exit $ret @@ -114,6 +127,12 @@ fi %changelog +* Wed Jan 20 2021 Remi Collet - 2.3.0-1 +- update to 2.3.0 +- add patch for test suite from + https://github.com/horde/SessionHandler/pull/3 +- use weak and range dependencies + * Thu Nov 9 2017 Remi Collet - 2.2.9-3 - fix FTBFS from Koschei, ignore 1 test with PHP 7.2 -- cgit