From a11eafa2fc46ff71b8923e91d9c4091d15a39f71 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Jan 09 2019 15:11:10 +0000 Subject: v3.2.3 add upstream patch for PHP 7.3 use range dependencies on F27+ ignore 1 test failing with sabre/http 4.2.4 fix project URL --- diff --git a/.gitignore b/.gitignore index 8f02c94..ef711d3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ clog /sabre-dav-2.1.10-9f8c193.tar.gz /sabre-dav-3.0.9-b425939.tar.gz /sabre-dav-3.2.2-e987775.tar.gz +/php-sabre-dav-3.2.2-e987775.tar.gz +/php-sabre-dav-3.2.3-a9780ce.tar.gz diff --git a/5eb5d74514230b11c80b67c7e147242757ccc660.patch b/5eb5d74514230b11c80b67c7e147242757ccc660.patch new file mode 100644 index 0000000..d7c31f8 --- /dev/null +++ b/5eb5d74514230b11c80b67c7e147242757ccc660.patch @@ -0,0 +1,43 @@ +From 5eb5d74514230b11c80b67c7e147242757ccc660 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20M=C3=BCller?= +Date: Wed, 26 Sep 2018 10:05:14 +0200 +Subject: [PATCH] Fix for php7.3 + adjusting PHPDoc + +--- + lib/CalDAV/ICSExportPlugin.php | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/lib/CalDAV/ICSExportPlugin.php b/lib/CalDAV/ICSExportPlugin.php +index eafb583620..6f84746cae 100644 +--- a/lib/CalDAV/ICSExportPlugin.php ++++ b/lib/CalDAV/ICSExportPlugin.php +@@ -76,6 +76,9 @@ function initialize(DAV\Server $server) { + * + * @param RequestInterface $request + * @param ResponseInterface $response ++ * @throws BadRequest ++ * @throws DAV\Exception\NotFound ++ * @throws VObject\InvalidDataException + * @return bool + */ + function httpGet(RequestInterface $request, ResponseInterface $response) { +@@ -166,6 +169,8 @@ function httpGet(RequestInterface $request, ResponseInterface $response) { + * @param string $format + * @param array $properties + * @param ResponseInterface $response ++ * @throws DAV\Exception\NotFound ++ * @throws VObject\InvalidDataException + */ + protected function generateResponse($path, $start, $end, $expand, $componentType, $format, $properties, ResponseInterface $response) { + +@@ -318,7 +323,9 @@ function mergeObjects(array $properties, array $inputObjects) { + // VTIMEZONE is special, because we need to filter out the duplicates + case 'VTIMEZONE' : + // Naively just checking tzid. +- if (in_array((string)$child->TZID, $collectedTimezones)) continue; ++ if (in_array((string)$child->TZID, $collectedTimezones)) { ++ break; ++ } + + $timezones[] = clone $child; + $collectedTimezones[] = $child->TZID; diff --git a/php-sabre-dav-php71.patch b/php-sabre-dav-php71.patch deleted file mode 100644 index 0956313..0000000 --- a/php-sabre-dav-php71.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 072589cd5dbce0f3e3a28b29ee778a1183c6d45d Mon Sep 17 00:00:00 2001 -From: Evert Pot -Date: Fri, 7 Oct 2016 17:23:14 -0400 -Subject: [PATCH] PHP 7.1 tweak - ---- - tests/Sabre/DAV/ServerEventsTest.php | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/Sabre/DAV/ServerEventsTest.php b/tests/Sabre/DAV/ServerEventsTest.php -index 7f995c6..e41b827 100644 ---- a/tests/Sabre/DAV/ServerEventsTest.php -+++ b/tests/Sabre/DAV/ServerEventsTest.php -@@ -113,8 +113,8 @@ function testMethod() { - false - ); - -- $this->assertEquals(2, $k); -- -+ // Fun fact, PHP 7.1 changes the order when sorting-by-callback. -+ $this->assertTrue($k>=2 && $k <=3); - - } - diff --git a/php-sabre-dav.spec b/php-sabre-dav.spec index 2a1a8aa..5664c3c 100644 --- a/php-sabre-dav.spec +++ b/php-sabre-dav.spec @@ -1,45 +1,50 @@ # remirepo/fedora spec file for php-sabre-dav # -# Copyright (c) 2013-2017 Remi Collet +# Copyright (c) 2013-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit e987775e619728f12205606c9cc3ee565ffb1516 +%global gh_commit a9780ce4f35560ecbd0af524ad32d9d2c8954b80 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global gh_owner fruux -%global gh_project sabre-dav +%global gh_owner sabre-io +%global gh_project dav %if 0%{?rhel} == 5 %global with_tests 0%{?_with_tests:1} %else %global with_tests 0%{!?_without_tests:1} %endif -Name: php-%{gh_project} +Name: php-sabre-%{gh_project} Summary: WebDAV Framework for PHP -Version: 3.2.2 -Release: 4%{?dist} +Version: 3.2.3 +Release: 1%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} License: BSD -Group: Development/Libraries -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz Source1: %{name}-autoload.php # replace composer autoloader Patch0: %{name}-autoload.patch # For PHP 7.2 Patch1: https://patch-diff.githubusercontent.com/raw/fruux/sabre-dav/pull/1006.patch +# For PHP 7.3 +Patch2: https://github.com/sabre-io/dav/commit/5eb5d74514230b11c80b67c7e147242757ccc660.patch BuildArch: noarch %if %{with_tests} BuildRequires: php(language) >= 5.5 -BuildRequires: php-composer(sabre/vobject) >= 4.1.0 -BuildRequires: php-composer(sabre/event) >= 2.0 -BuildRequires: php-composer(sabre/xml) >= 1.4.0 -BuildRequires: php-composer(sabre/http) >= 4.2.1 -BuildRequires: php-composer(sabre/uri) >= 1.0.1 +BuildRequires: (php-composer(sabre/vobject) >= 4.1.0 with php-composer(sabre/vobject) < 5) +BuildRequires: (php-composer(sabre/event) >= 2.0 with php-composer(sabre/event) < 3) +BuildRequires: (php-composer(sabre/xml) >= 1.4.0 with php-composer(sabre/xml) < 2) +BuildRequires: (php-composer(sabre/http) >= 4.2.1 with php-composer(sabre/http) < 5) +BuildRequires: (php-composer(sabre/uri) >= 1.0.1 with php-composer(sabre/uri) < 2) +BuildRequires: (php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2) +BuildRequires: (php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2) +BuildRequires: (php-composer(phpunit/phpunit) >= 4.8 with php-composer(phpunit/phpunit) < 6) +BuildRequires: (php-composer(monolog/monolog) >= 1.18 with php-composer(monolog/monolog) < 2) BuildRequires: php-dom BuildRequires: php-pcre BuildRequires: php-spl @@ -49,7 +54,6 @@ BuildRequires: php-ctype BuildRequires: php-date BuildRequires: php-iconv BuildRequires: php-libxml -BuildRequires: php-composer(psr/log) >= 1.0.1 BuildRequires: php-curl BuildRequires: php-pdo # From composer.json, "require-dev" : { @@ -58,8 +62,6 @@ BuildRequires: php-pdo # "squizlabs/php_codesniffer": "~1.5.3" # "sabre/cs" : "^1.0.0", # "monolog/monolog": "^1.18" -BuildRequires: php-composer(phpunit/phpunit) >= 4.8 -BuildRequires: php-composer(monolog/monolog) >= 1.18 # Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -83,17 +85,13 @@ BuildRequires: php-pdo_sqlite # "ext-iconv" : "*", # "lib-libxml" : ">=2.7.0", # "psr/log": "^1.0" -Requires: php(language) >= 5.4.1 -Requires: php-composer(sabre/vobject) >= 4.1.0 -Requires: php-composer(sabre/vobject) < 5 -Requires: php-composer(sabre/event) >= 2.0 -Requires: php-composer(sabre/event) < 3 -Requires: php-composer(sabre/xml) >= 1.4.0 -Requires: php-composer(sabre/xml) < 2 -Requires: php-composer(sabre/http) >= 4.2.1 -Requires: php-composer(sabre/http) < 5 -Requires: php-composer(sabre/uri) >= 1.0.1 -Requires: php-composer(sabre/uri) < 2 +Requires: php(language) >= 5.5 +Requires: (php-composer(sabre/vobject) >= 4.1.0 with php-composer(sabre/vobject) < 5) +Requires: (php-composer(sabre/event) >= 2.0 with php-composer(sabre/event) < 3) +Requires: (php-composer(sabre/xml) >= 1.4.0 with php-composer(sabre/xml) < 2) +Requires: (php-composer(sabre/http) >= 4.2.1 with php-composer(sabre/http) < 5) +Requires: (php-composer(sabre/uri) >= 1.0.1 with php-composer(sabre/uri) < 2) +Requires: (php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2) Requires: php-dom Requires: php-pcre Requires: php-spl @@ -103,8 +101,6 @@ Requires: php-ctype Requires: php-date Requires: php-iconv Requires: php-libxml -Requires: php-composer(psr/log) >= 1.0.1 -Requires: php-composer(psr/log) < 2 # From composer.json, "suggest" : { # "ext-curl" : "*", # "ext-pdo" : "*" @@ -143,6 +139,7 @@ Autoloader: %{_datadir}/php/Sabre/DAV/autoload.php %patch0 -p1 -b .rpm %patch1 -p1 +%patch2 -p1 cp %{SOURCE1} lib/DAV/autoload.php @@ -173,9 +170,11 @@ sed -e 's:@BUILDROOT@:%{buildroot}:' -i bootstrap.php : Run upstream test suite against installed library ret=0 -for cmd in php php56 php70 php71 php72; do +for cmd in php php70 php71 php72 php73; do if which $cmd; then - $cmd %{_bindir}/phpunit || ret=1 + $cmd %{_bindir}/phpunit \ + --filter '^((?!(testRequireAuth)).)*$' \ + || ret=1 fi done exit $ret @@ -197,6 +196,13 @@ exit $ret %changelog +* Wed Jan 9 2019 Remi Collet - 3.2.3-1 +- update to 3.2.3 +- add upstream patch for PHP 7.3 +- use range dependencies on F27+ +- ignore 1 test failing with sabre/http 4.2.4 +- fix project URL + * Fri Feb 09 2018 Fedora Release Engineering - 3.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index f35a00d..bcdb78f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sabre-dav-3.2.2-e987775.tar.gz) = 1baeb85908162d096d962d55661040b546b8533690c446e97cd98e50f0048153c99d14559a2b22e925d203f54dbf0b575c93c93bf48a98a6d1d6afcf4f678d47 +SHA512 (php-sabre-dav-3.2.3-a9780ce.tar.gz) = 842056d243147da2a359b5bd86d32a484888aa0f54d6b55b45e8ac03a4f417bb2e2c13854557a2d91afe039b4fb43d42a7c55be6cd91741be10758a0dee90f55