diff --git a/.gitignore b/.gitignore index 61203de..78f7e10 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,18 @@ /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 fa0e6ff..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-2020 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 5736f943c90d8d73d04cd8944d8c913811dc7360 +%global gh_commit 074373bcd689a30bcf5aaa6bbb20a3395964ce7a %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project dav @@ -18,18 +21,19 @@ %global ns_vendor Sabre %global ns_project DAV %global major 4 -%bcond_without tests Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: WebDAV Framework for PHP -Version: 4.1.1 -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 @@ -42,9 +46,8 @@ BuildRequires: (php-composer(sabre/event) >= 5.0 with php-composer(sabre/ BuildRequires: (php-composer(sabre/xml) >= 2.0.1 with php-composer(sabre/xml) < 3) 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,20 +61,20 @@ BuildRequires: php-curl BuildRequires: php-pdo BuildRequires: php-json # From composer.json, "require-dev" : { -# "friendsofphp/php-cs-fixer": "~2.16.1", -# "phpstan/phpstan": "^0.12", -# "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0", -# "evert/phpdoc-md" : "~0.1.0", -# "squizlabs/php_codesniffer": "~1.5.3" -# "monolog/monolog": "^1.18" -BuildRequires: phpunit8 >= 8.5 +# "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.1.0", +# "php": ">=7.1.0 || ^8.0", # "sabre/vobject": "^4.2.1", # "sabre/event" : "^5.0", # "sabre/xml" : "^2.0.1", @@ -86,7 +89,7 @@ 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.1 Requires: (php-composer(sabre/vobject) >= 4.2.1 with php-composer(sabre/vobject) < 5) @@ -94,7 +97,7 @@ Requires: (php-composer(sabre/event) >= 5.0 with php-composer(sabre/ev Requires: (php-composer(sabre/xml) >= 2.0.1 with php-composer(sabre/xml) < 3) 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 @@ -109,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) @@ -146,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 @@ -164,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 @@ -188,15 +193,15 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor} 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 php72 php73 php74 php80; do - if which $cmd; then - $cmd %{_bindir}/phpunit8 \ - --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 @@ -217,6 +222,87 @@ 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 diff --git a/sources b/sources index 728fa85..1492fa3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-sabre-dav4-4.1.1-5736f94.tar.gz) = d650e5319184a1148134ba75669c4effd9c7e59718695ec08db6e2cd1f427cf41f709320caf0afa2626f7a3c2ee13b2dd02e67037615e5ee2f1aef2afc75064b +SHA512 (php-sabre-dav4-4.7.0-074373b.tgz) = 95f6a85567c7a6fcf0d74fe13a60465ea99a8c8d5920f82a6e8a98e96e21f05ea614f607d67360f7ff2f6c2393e1d447ebd5761697f371b29ffab92051ac4aac