diff --git a/.gitignore b/.gitignore index ccc2452..78f7e10 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,21 @@ /php-sabre-dav4-4.0.0-a4959bf.tar.gz +/php-sabre-dav4-4.0.1-e06e620.tar.gz +/php-sabre-dav4-4.0.2-fd0234d.tar.gz +/php-sabre-dav4-4.0.3-b793fb4.tar.gz +/php-sabre-dav4-4.1.0-8f6f4d2.tar.gz +/php-sabre-dav4-4.1.1-5736f94.tar.gz +/php-sabre-dav4-4.1.2-e1f617a.tar.gz +/php-sabre-dav4-4.1.3-b903eee.tar.gz +/php-sabre-dav4-4.1.4-4258420.tgz +/php-sabre-dav4-4.1.5-c1afdc7.tgz +/php-sabre-dav4-4.2.0-af125a4.tgz +/php-sabre-dav4-4.2.1-5e651f9.tgz +/php-sabre-dav4-4.2.2-5d73987.tgz +/php-sabre-dav4-4.2.3-6703fb7.tgz +/php-sabre-dav4-4.3.0-1f9bfa7.tgz +/php-sabre-dav4-4.3.1-130abb7.tgz +/php-sabre-dav4-4.4.0-b65362a.tgz +/php-sabre-dav4-4.5.0-7e40343.tgz +/php-sabre-dav4-4.5.1-b29899b.tgz +/php-sabre-dav4-4.6.0-5541453.tgz +/php-sabre-dav4-4.7.0-074373b.tgz diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..f9982c6 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) +SHORT=${COMMIT:0:7} + +if [ -f $NAME-$VERSION-$SHORT.tgz ]; then + echo "Already there." +else + echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + + echo "Cloning..." + rm -rf $PROJECT-$COMMIT + git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + + echo "Getting commit..." + pushd $PROJECT-$COMMIT + git checkout $COMMIT || exit 1 + cp composer.json ../composer.json + popd + + echo "Archiving..." + tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT + + echo "Cleaning..." + rm -rf $PROJECT-$COMMIT + + echo "Done." +fi diff --git a/php-sabre-dav4-autoload.patch b/php-sabre-dav4-autoload.patch index 9cdafef..a9722e2 100644 --- a/php-sabre-dav4-autoload.patch +++ b/php-sabre-dav4-autoload.patch @@ -1,7 +1,7 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php --- ./tests/bootstrap.php.rpm 2019-07-05 14:29:48.486775637 +0200 +++ ./tests/bootstrap.php 2019-07-05 14:32:02.171555393 +0200 -@@ -2,15 +2,11 @@ +@@ -2,15 +2,13 @@ declare(strict_types=1); @@ -9,7 +9,9 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php - -$autoLoader = include __DIR__.'/../vendor/autoload.php'; +require '@BUILDROOT@/usr/share/php/Sabre/DAV4/autoload.php'; -+require '/usr/share/php/Monolog/autoload.php'; ++if (file_exists('/usr/share/php/Monolog2/autoload.php')) ++ require '/usr/share/php/Monolog2/autoload.php'; ++else require '/usr/share/php/Monolog/autoload.php'; // SabreDAV tests auto loading -$autoLoader->add('Sabre\\', __DIR__); @@ -20,7 +22,7 @@ diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php date_default_timezone_set('UTC'); -@@ -30,8 +26,8 @@ foreach ($environmentVars as $var) { +@@ -35,8 +33,8 @@ foreach ($environmentVars as $var) { $config = [ 'SABRE_TEMPDIR' => dirname(__FILE__).'/temp/', 'SABRE_HASSQLITE' => in_array('sqlite', PDO::getAvailableDrivers()), diff --git a/php-sabre-dav4.spec b/php-sabre-dav4.spec index 0fc7f8b..333a5f9 100644 --- a/php-sabre-dav4.spec +++ b/php-sabre-dav4.spec @@ -1,13 +1,16 @@ # remirepo/fedora spec file for php-sabre-dav4 # -# Copyright (c) 2013-2019 Remi Collet +# Copyright (c) 2013-2024 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # + +%bcond_without tests + # Github -%global gh_commit a4959bf2b9b175aef6fd91c9006b1ca7a56f9bb0 +%global gh_commit 074373bcd689a30bcf5aaa6bbb20a3395964ce7a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project dav @@ -18,33 +21,33 @@ %global ns_vendor Sabre %global ns_project DAV %global major 4 -%global with_tests 0%{!?_without_tests:1} Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: WebDAV Framework for PHP -Version: 4.0.0 -Release: 2%{?dist} +Version: 4.7.0 +Release: 3%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} # sabre is BSD # assets/openiconic is MIT -License: BSD and MIT -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz +License: BSD-3-Clause AND MIT +Source0: %{name}-%{version}-%{gh_short}.tgz +# git snapshot to retrieve tests +Source1: makesrc.sh # replace composer autoloader Patch0: %{name}-autoload.patch BuildArch: noarch -%if %{with_tests} -BuildRequires: php(language) >= 7.0 -BuildRequires: (php-composer(sabre/vobject) >= 4.2 with php-composer(sabre/vobject) < 5) +%if %{with tests} +BuildRequires: php(language) >= 7.1 +BuildRequires: (php-composer(sabre/vobject) >= 4.2.1 with php-composer(sabre/vobject) < 5) BuildRequires: (php-composer(sabre/event) >= 5.0 with php-composer(sabre/event) < 6) BuildRequires: (php-composer(sabre/xml) >= 2.0.1 with php-composer(sabre/xml) < 3) -BuildRequires: (php-composer(sabre/http) >= 5.0 with php-composer(sabre/http) < 6) +BuildRequires: (php-composer(sabre/http) >= 5.0.5 with php-composer(sabre/http) < 6) BuildRequires: (php-composer(sabre/uri) >= 2.0 with php-composer(sabre/uri) < 3) -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(monolog/monolog) >= 1.18 with php-composer(monolog/monolog) < 2) +BuildRequires: (php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 4) +BuildRequires: (php-composer(monolog/monolog) >= 1.27 with php-composer(monolog/monolog) < 3) BuildRequires: php-dom BuildRequires: php-pcre BuildRequires: php-spl @@ -58,22 +61,24 @@ BuildRequires: php-curl BuildRequires: php-pdo BuildRequires: php-json # From composer.json, "require-dev" : { -# "phpunit/phpunit" : "^6", -# "evert/phpdoc-md" : "~0.1.0", -# "squizlabs/php_codesniffer": "~1.5.3" -# "monolog/monolog": "^1.18" -BuildRequires: phpunit6 +# "friendsofphp/php-cs-fixer": "^2.19", +# "monolog/monolog": "^1.27 || ^2.0", +# "phpstan/phpstan": "^0.12 || ^1.0", +# "phpstan/phpstan-phpunit": "^1.0", +# "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6" +BuildRequires: phpunit9 >= 9.6 +%global phpunit %{_bindir}/phpunit9 %endif # Autoloader BuildRequires: php-fedora-autoloader-devel BuildRequires: php-pdo_sqlite # From composer.json, "require": { -# "php": ">=7.0.0", -# "sabre/vobject": "^4.2.0-alpha1", +# "php": ">=7.1.0 || ^8.0", +# "sabre/vobject": "^4.2.1", # "sabre/event" : "^5.0", # "sabre/xml" : "^2.0.1", -# "sabre/http" : "^5.0", +# "sabre/http" : "^5.0.5", # "sabre/uri" : "^2.0", # "ext-dom": "*", # "ext-pcre": "*", @@ -84,15 +89,15 @@ BuildRequires: php-pdo_sqlite # "ext-date" : "*", # "ext-iconv" : "*", # "lib-libxml" : ">=2.7.0", -# "psr/log": "^1.0", +# "psr/log": "^1.0 || ^2.0 || ^3.0", # "ext-json": "*" -Requires: php(language) >= 7.0 -Requires: (php-composer(sabre/vobject) >= 4.2 with php-composer(sabre/vobject) < 5) +Requires: php(language) >= 7.1 +Requires: (php-composer(sabre/vobject) >= 4.2.1 with php-composer(sabre/vobject) < 5) Requires: (php-composer(sabre/event) >= 5.0 with php-composer(sabre/event) < 6) Requires: (php-composer(sabre/xml) >= 2.0.1 with php-composer(sabre/xml) < 3) -Requires: (php-composer(sabre/http) >= 5.0.0 with php-composer(sabre/http) < 6) +Requires: (php-composer(sabre/http) >= 5.0.5 with php-composer(sabre/http) < 6) Requires: (php-composer(sabre/uri) >= 2.0 with php-composer(sabre/uri) < 3) -Requires: (php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2) +Requires: (php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 4) Requires: php-dom Requires: php-pcre Requires: php-spl @@ -107,11 +112,9 @@ Requires: php-json # "ext-curl" : "*", # "ext-pdo" : "*", # "ext-imap": "*" -%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 Recommends: php-curl Recommends: php-pdo Recommends: php-imap -%endif # Autoloader Requires: php-composer(fedora/autoloader) @@ -144,7 +147,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php %setup -q -n %{gh_project}-%{gh_commit} mv lib/DAV/Browser/assets/openiconic/ICON-LICENSE . -%patch0 -p1 -b .rpm +%patch -P0 -p1 -b .rpm : relocate for dir in CalDAV CardDAV DAV DAVACL; do @@ -162,7 +165,11 @@ cat << 'EOF' | tee -a lib/%{ns_project}%{major}/autoload.php '%{_datadir}/php/%{ns_vendor}/Uri2/autoload.php', '%{_datadir}/php/%{ns_vendor}/HTTP5/autoload.php', '%{_datadir}/php/%{ns_vendor}/VObject4/autoload.php', - '%{_datadir}/php/Psr/Log/autoload.php', + [ + '%{_datadir}/php/Psr/Log3/autoload.php', + '%{_datadir}/php/Psr/Log2/autoload.php', + '%{_datadir}/php/Psr/Log/autoload.php', + ], ]); EOF @@ -181,20 +188,20 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor} %check -%if %{with_tests} +%if %{with tests} : Fix bootstrap cd tests sed -e 's:@BUILDROOT@:%{buildroot}:' -i bootstrap.php -# TODO testDeliverInsignificantRequest fails locally, not in mock - : Run upstream test suite against installed library ret=0 -for cmd in php php71 php72 php73 php74; do - if which $cmd; then - $cmd %{_bindir}/phpunit6 \ - --filter '^((?!(testDeliverInsignificantRequest)).)*$' \ - || ret=1 +for cmdarg in "php %{phpunit}" php81 php82 php83 php84; do + if which $cmdarg; then + set $cmdarg + for ts in sabre-dav sabre-davacl sabre-caldav sabre-carddav; do + $1 ${2:-%{_bindir}/phpunit9} \ + --testsuite $ts || ret=1 + done fi done exit $ret @@ -215,6 +222,118 @@ exit $ret %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 4.7.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 4.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Tue Oct 29 2024 Remi Collet - 4.7.0-1 +- update to 4.7.0 + +* Fri Jul 19 2024 Fedora Release Engineering - 4.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jan 29 2024 Fedora Release Engineering - 4.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 4.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 4.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Dec 11 2023 Remi Collet - 4.6.0-1 +- update to 4.6.0 + +* Thu Nov 23 2023 Remi Collet - 4.5.1-1 +- update to 4.5.1 + +* Tue Nov 14 2023 Remi Collet - 4.5.0-1 +- update to 4.5.0 + +* Fri Jul 21 2023 Fedora Release Engineering - 4.4.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 4.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 4.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 27 2022 Remi Collet - 4.4.0-1 +- update to 4.4.0 + +* Fri Jan 21 2022 Remi Collet - 4.3.1-1 +- update to 4.3.1 + +* Tue Dec 14 2021 Remi Collet - 4.3.0-1 +- update to 4.3.0 + +* Thu Dec 9 2021 Remi Collet - 4.2.3-1 +- update to 4.2.3 + +* Thu Dec 9 2021 Remi Collet - 4.2.2-1 +- update to 4.2.2 +- allow psr/log v2 and v3 + +* Tue Nov 30 2021 Remi Collet - 4.2.1-1 +- update to 4.2.1 + +* Wed Nov 17 2021 Remi Collet - 4.2.0-1 +- update to 4.2.0 + +* Fri Jul 23 2021 Fedora Release Engineering - 4.1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Feb 15 2021 Remi Collet - 4.1.5-1 +- update to 4.1.5 + +* Wed Jan 27 2021 Fedora Release Engineering - 4.1.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jan 12 2021 Remi Collet - 4.1.4-1 +- update to 4.1.4 +- sources from git snapshot + +* Mon Nov 9 2020 Remi Collet - 4.1.3-1 +- update to 4.1.3 + +* Mon Oct 5 2020 Remi Collet - 4.1.2-1 +- update to 4.1.2 +- switch to phpunit9 + +* Tue Jul 28 2020 Fedora Release Engineering - 4.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 14 2020 Remi Collet - 4.1.1-1 +- update to 4.1.1 + +* Fri Mar 20 2020 Remi Collet - 4.1.0-1 +- update to 4.1.0 +- raise dependency on PHP 7.1 +- raise dependency on sabre/vobject 4.2.1 +- raise dependency on sabre/http 5.0.5 +- switch to phpunit7 + +* Thu Jan 30 2020 Fedora Release Engineering - 4.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 10 2020 Remi Collet - 4.0.3-1 +- update to 4.0.3 + +* Mon Oct 21 2019 Remi Collet - 4.0.2-1 +- update to 4.0.2 +- drop patch merged upstream + +* Tue Aug 20 2019 Remi Collet - 4.0.1-2 +- update to 4.0.1 +- add patch for 7.4 from + https://github.com/sabre-io/dav/pull/1187 + +* Fri Jul 26 2019 Fedora Release Engineering - 4.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Mon Jul 15 2019 Remi Collet - 4.0.0-2 - fix LICENSE for assets/openiconic diff --git a/sources b/sources index 8d5914f..1492fa3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-sabre-dav4-4.0.0-a4959bf.tar.gz) = 666c1f92a405c4ae385fa624716c8e9e2c7f6fcffbdde82dca9fe6596fd776de820c4dfb4b51f5b803c5b68234305b2044946204534c470084d5f4e4d00c187f +SHA512 (php-sabre-dav4-4.7.0-074373b.tgz) = 95f6a85567c7a6fcf0d74fe13a60465ea99a8c8d5920f82a6e8a98e96e21f05ea614f607d67360f7ff2f6c2393e1d447ebd5761697f371b29ffab92051ac4aac