From 5f30fde3a5ccb0b2d86c005f92171a2fa8bbf534 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 5 Oct 2020 10:36:14 +0200 Subject: [PATCH 1/3] v4.1.3 switch to phpunit9 (cherry picked from commit f908c19fa3b22be7ebe01d2aee30189a355bb123) --- .gitignore | 2 ++ php-sabre-dav4.spec | 31 ++++++++++++++++++++++--------- sources | 2 +- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 61203de..27c2127 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ /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 diff --git a/php-sabre-dav4.spec b/php-sabre-dav4.spec index 25fae75..e43443f 100644 --- a/php-sabre-dav4.spec +++ b/php-sabre-dav4.spec @@ -6,8 +6,11 @@ # # Please, preserve the changelog entries # + +%bcond_without tests + # Github -%global gh_commit 5736f943c90d8d73d04cd8944d8c913811dc7360 +%global gh_commit b903eeedfbdcd6cab7935661ec6dc2d90cdf8a1e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project dav @@ -18,11 +21,10 @@ %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 +Version: 4.1.3 Release: 1%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} @@ -58,20 +60,26 @@ BuildRequires: php-curl BuildRequires: php-pdo BuildRequires: php-json # From composer.json, "require-dev" : { -# "friendsofphp/php-cs-fixer": "~2.16.1", +# "friendsofphp/php-cs-fixer": "~2.16.7", # "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 +%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 +BuildRequires: phpunit9 +%global phpunit %{_bindir}/phpunit9 +%else +BuildRequires: phpunit8 +%global phpunit %{_bindir}/phpunit8 +%endif %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", @@ -192,9 +200,10 @@ sed -e 's:@BUILDROOT@:%{buildroot}:' -i bootstrap.php : 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 \ +for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit9} \ --filter '^((?!(testDeliverInsignificantRequest)).)*$' \ || ret=1 fi @@ -217,6 +226,10 @@ exit $ret %changelog +* Mon Nov 9 2020 Remi Collet - 4.1.3-1 +- update to 4.1.3 +- switch to phpunit9 + * Tue Jul 14 2020 Remi Collet - 4.1.1-1 - update to 4.1.1 diff --git a/sources b/sources index 728fa85..0fc254b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-sabre-dav4-4.1.1-5736f94.tar.gz) = d650e5319184a1148134ba75669c4effd9c7e59718695ec08db6e2cd1f427cf41f709320caf0afa2626f7a3c2ee13b2dd02e67037615e5ee2f1aef2afc75064b +SHA512 (php-sabre-dav4-4.1.3-b903eee.tar.gz) = 46c1151461be0e6cba93ab71e372b272869196eb3dc287315c210756f54f6e856df1e6eaf541bca7c92f712b7ca64ce7446f1fad88f5f08d11c9d9648a53f5c7 From 0fcf8923bf0b069aa10623644b964812e63128b4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 12 Jan 2021 08:34:55 +0100 Subject: [PATCH 2/3] update to 4.1.4 sources from git snapshot (cherry picked from commit 8277a0ea8621c0a33be3452381a86be65034dbc7) --- .gitignore | 1 + makesrc.sh | 32 ++++++++++++++++++++++++++++++++ php-sabre-dav4.spec | 25 +++++++++++++++---------- sources | 2 +- 4 files changed, 49 insertions(+), 11 deletions(-) create mode 100755 makesrc.sh diff --git a/.gitignore b/.gitignore index 27c2127..c077675 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /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 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.spec b/php-sabre-dav4.spec index e43443f..b8b4283 100644 --- a/php-sabre-dav4.spec +++ b/php-sabre-dav4.spec @@ -1,6 +1,6 @@ # remirepo/fedora spec file for php-sabre-dav4 # -# Copyright (c) 2013-2020 Remi Collet +# Copyright (c) 2013-2021 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -10,7 +10,7 @@ %bcond_without tests # Github -%global gh_commit b903eeedfbdcd6cab7935661ec6dc2d90cdf8a1e +%global gh_commit 4258420f15425a5f128fe5cad454e00ab4a68ae5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project dav @@ -24,14 +24,16 @@ Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: WebDAV Framework for PHP -Version: 4.1.3 +Version: 4.1.4 Release: 1%{?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 +Source0: %{name}-%{version}-%{gh_short}.tgz +# git snapshot to retrieve tests +Source1: makesrc.sh # replace composer autoloader Patch0: %{name}-autoload.patch @@ -60,7 +62,7 @@ BuildRequires: php-curl BuildRequires: php-pdo BuildRequires: php-json # From composer.json, "require-dev" : { -# "friendsofphp/php-cs-fixer": "~2.16.7", +# "friendsofphp/php-cs-fixer": "^2.17.1", # "phpstan/phpstan": "^0.12", # "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0", # "evert/phpdoc-md" : "~0.1.0", @@ -196,16 +198,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 cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit9} \ - --filter '^((?!(testDeliverInsignificantRequest)).)*$' \ - || ret=1 + 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 @@ -226,6 +227,10 @@ exit $ret %changelog +* 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 - switch to phpunit9 diff --git a/sources b/sources index 0fc254b..46dd795 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-sabre-dav4-4.1.3-b903eee.tar.gz) = 46c1151461be0e6cba93ab71e372b272869196eb3dc287315c210756f54f6e856df1e6eaf541bca7c92f712b7ca64ce7446f1fad88f5f08d11c9d9648a53f5c7 +SHA512 (php-sabre-dav4-4.1.4-4258420.tgz) = 35d7eeb18de18bce1d8ecbc0aacf907ae4f6c84108108f86fa632e0ad13c642e87bb73432234df58ff03cab59b92977f40a6f18c0a829890a351d30a0034fd4a From b186a4616227d272f4cff563b482ace2767ac7ba Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 15 Feb 2021 13:49:19 +0100 Subject: [PATCH 3/3] v4.1.5 (cherry picked from commit 2e0922da0afd5d7b973117cd03e6138bff90eb63) (cherry picked from commit c8878864de2e9a1f88dc9e903f05c13b8b9b47b1) --- .gitignore | 1 + php-sabre-dav4.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c077675..d9ec8a9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /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 diff --git a/php-sabre-dav4.spec b/php-sabre-dav4.spec index b8b4283..d3868fc 100644 --- a/php-sabre-dav4.spec +++ b/php-sabre-dav4.spec @@ -10,7 +10,7 @@ %bcond_without tests # Github -%global gh_commit 4258420f15425a5f128fe5cad454e00ab4a68ae5 +%global gh_commit c1afdc77a95efea6ee40c03c45f57c3c0c80ec22 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sabre-io %global gh_project dav @@ -24,7 +24,7 @@ Name: php-%{pk_vendor}-%{pk_project}%{major} Summary: WebDAV Framework for PHP -Version: 4.1.4 +Version: 4.1.5 Release: 1%{?dist} URL: https://github.com/%{gh_owner}/%{gh_project} @@ -227,6 +227,9 @@ exit $ret %changelog +* Mon Feb 15 2021 Remi Collet - 4.1.5-1 +- update to 4.1.5 + * Tue Jan 12 2021 Remi Collet - 4.1.4-1 - update to 4.1.4 - sources from git snapshot diff --git a/sources b/sources index 46dd795..daf1e9b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-sabre-dav4-4.1.4-4258420.tgz) = 35d7eeb18de18bce1d8ecbc0aacf907ae4f6c84108108f86fa632e0ad13c642e87bb73432234df58ff03cab59b92977f40a6f18c0a829890a351d30a0034fd4a +SHA512 (php-sabre-dav4-4.1.5-c1afdc7.tgz) = 3f21634ae7494e78dcc93b4878ca640e46d4cdc005b47a5594892ba0c3e93917973166a470696e954034756abf2b1e6c5d559104d75a5331a7d98b3c72f2083d