From 19f02c873d796f722c3c83a2cb4a01a6211870c1 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 14 Apr 2021 12:16:43 +0200 Subject: [PATCH 01/11] update to 2.6.0 switch to phpunit7 --- .gitignore | 1 + php-mtdowling-jmespath-php-get-source.sh | 73 ++++++++++++++++++++++++ php-mtdowling-jmespath-php.spec | 49 +++++++++------- sources | 2 +- 4 files changed, 103 insertions(+), 22 deletions(-) create mode 100755 php-mtdowling-jmespath-php-get-source.sh diff --git a/.gitignore b/.gitignore index 9cca214..04f2e3b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /php-mtdowling-jmespath-php-2.3.0-192f93e43c2c97acde7694993ab171b3de284093.tar.gz /php-mtdowling-jmespath-php-2.4.0-adcc9531682cf87dfda21e1fd5d0e7a41d292fac.tar.gz /php-mtdowling-jmespath-php-2.5.0-52168cb9472de06979613d365c7f1ab8798be895.tar.gz +/php-mtdowling-jmespath-php-2.6.0-42dae2cbd13154083ca6d70099692fef8ca84bfb.tar.gz diff --git a/php-mtdowling-jmespath-php-get-source.sh b/php-mtdowling-jmespath-php-get-source.sh new file mode 100755 index 0000000..b2ac62b --- /dev/null +++ b/php-mtdowling-jmespath-php-get-source.sh @@ -0,0 +1,73 @@ +#/bin/sh + +GIT=`which git` +RPM=`which rpm` + +if [ -z "$GIT" ] +then + echo "ERROR: 'git' command not found" 1>&2 + exit 1 +elif [ -z "$RPM" ] +then + echo "ERROR: 'rpm' command not found" 1>&2 + exit 1 +fi + +function print { + echo -e "\e[0;33m>>>>> ${1}\e[0m" +} + +if [ -x "$1" ] +then + SPEC=$1 +else + SPEC=`ls *.spec | head -1` +fi + +SPEC_DIR=`pwd` + +print "SPEC_DIR = $SPEC_DIR" + +NAME=`echo $SPEC | sed 's#\.spec##'` +VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'` + +print "SPEC = $SPEC" +print "NAME = $NAME" + +GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'` +GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'` +GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'` +GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME} +GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'` + +print "GIT_OWNER = $GIT_OWNER" +print "GIT_NAME = $GIT_NAME" +print "GIT_COMMIT = $GIT_COMMIT" +print "GIT_REPO = $GIT_REPO" +print "GIT_DIR = $GIT_DIR" + +TEMP_DIR=$(mktemp --dir) + +pushd $TEMP_DIR + print "Cloning git repo..." + $GIT clone $GIT_REPO + + pushd $GIT_DIR + print "Checking out commit..." + $GIT checkout $GIT_COMMIT + popd + + TAR_DIR=${GIT_NAME}-${GIT_COMMIT} + print "TAR_DIR = $TAR_DIR" + + mv $GIT_DIR $TAR_DIR + + TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz + print "TAR_FILE = $TAR_FILE" + + [ -e $TAR_FILE ] && rm -f $TAR_FILE + tar --exclude-vcs -czf $TAR_FILE $TAR_DIR + chmod 0644 $TAR_FILE +popd + +rm -rf $TEMP_DIR diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 51d1837..96e327c 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -1,7 +1,7 @@ # # Fedora spec file for php-mtdowling-jmespath-php # -# Copyright (c) 2015-2020 Shawn Iwinski +# Copyright (c) 2015-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -9,44 +9,45 @@ # Please preserve changelog entries # +%bcond_without tests + %global github_owner jmespath %global github_name jmespath.php -%global github_version 2.5.0 -%global github_commit 52168cb9472de06979613d365c7f1ab8798be895 +%global github_version 2.6.0 +%global github_commit 42dae2cbd13154083ca6d70099692fef8ca84bfb %global composer_vendor mtdowling %global composer_project jmespath.php -# "php": ">=5.4.0" -%global php_min_ver 5.4.0 - -# Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +# "php": "^5.4 || ^7.0 || ^8.0" +%global php_min_ver 5.4 %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 3%{?github_release}%{?dist} +Release: 1%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +# GitHub export does not include tests. +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: phpunit7 >= 7.5.15 ## phpcompatinfo (computed from version 2.5.0) BuildRequires: php-json BuildRequires: php-mbstring BuildRequires: php-spl +%endif ## Autoloader BuildRequires: php-composer(fedora/autoloader) -%endif Requires: php-cli # composer.json @@ -106,21 +107,23 @@ install -pm 0755 bin/jp.php %{buildroot}%{_bindir}/ %check -%if %{with_tests} -: Skip test known to fail -sed 's/function testTokenizesJsonNumbers/function SKIP_testTokenizesJsonNumbers/' \ - -i tests/LexerTest.php - +%if %{with tests} : Run tests -%{_bindir}/phpunit --verbose \ - --bootstrap %{buildroot}%{phpdir}/JmesPath/autoload.php +RETURN_CODE=0 +for PHP_EXEC in php php73 php74 php80; do + if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then + $PHP_EXEC %{_bindir}/phpunit7 \ + --bootstrap %{buildroot}%{phpdir}/JmesPath/autoload.php \ + --verbose || RETURN_CODE=1 + fi +done +exit $RETURN_CODE %else : Tests skipped %endif %files -%{!?_licensedir:%global license %%doc} %license LICENSE %doc CHANGELOG.md %doc README.rst @@ -130,6 +133,10 @@ sed 's/function testTokenizesJsonNumbers/function SKIP_testTokenizesJsonNumbers/ %changelog +* Wed Apr 14 2021 Remi Collet - 2.6.0-1 +- update to 2.6.0 +- switch to phpunit7 + * Wed Jan 27 2021 Fedora Release Engineering - 2.5.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 0dbcc8b..eb73139 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-mtdowling-jmespath-php-2.5.0-52168cb9472de06979613d365c7f1ab8798be895.tar.gz) = ff80c15398d2f66ae466f6c546ab93a6e9f0e18d0f335404605c2df5e4d59ce003c7d57577faf3afcea004a9add63adc0f2e38ed2ba490b6c925ffe224db8668 +SHA512 (php-mtdowling-jmespath-php-2.6.0-42dae2cbd13154083ca6d70099692fef8ca84bfb.tar.gz) = 69eb3dc26bec2d2a0ae56cb0c9effd53b79fd5cae15e34e3bb9748cea46eff69209278466b2e020b0bebbb645fa65c918fba341ebbc182a2a0f144b8a50ab461 From f26807ceae59feae331cadc523ae483c7e1f853a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 02:31:31 +0000 Subject: [PATCH 02/11] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 96e327c..8f10a1c 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 2%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 2.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Apr 14 2021 Remi Collet - 2.6.0-1 - update to 2.6.0 - switch to phpunit7 From 089d4c9916d8a69cca30b343ba3df612ff9c2d08 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 07:54:12 +0000 Subject: [PATCH 03/11] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 8f10a1c..9a9d536 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 2%{?github_release}%{?dist} +Release: 3%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 2.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 2.6.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From d8f84d2e58de90073049c5381d99e05a3b44131a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 13:47:57 +0000 Subject: [PATCH 04/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 9a9d536..2f897d5 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 3%{?github_release}%{?dist} +Release: 4%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 2.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Fri Jan 21 2022 Fedora Release Engineering - 2.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 0ea64756ab0ed3d14ac426400aa4402e458aef2a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 08:49:47 +0000 Subject: [PATCH 05/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 2f897d5..b3f2c66 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 4%{?github_release}%{?dist} +Release: 5%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 2.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 2.6.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From e25b7feebb754c899488237ec4afd0f4d5682715 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 04:28:30 +0000 Subject: [PATCH 06/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index b3f2c66..1e5f143 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 5%{?github_release}%{?dist} +Release: 6%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 2.6.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jan 20 2023 Fedora Release Engineering - 2.6.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From c2044d03ce8b8ec51593157e8b67aac6814c7dfd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 20:58:58 +0000 Subject: [PATCH 07/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 1e5f143..42a9a2d 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 6%{?github_release}%{?dist} +Release: 7%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 2.6.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 2.6.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From ce6c24634c4fcfdc65c33f3a99f520f4ddb736b0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 22:45:43 +0000 Subject: [PATCH 08/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 42a9a2d..a6b11d1 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 7%{?github_release}%{?dist} +Release: 8%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 2.6.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 2.6.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d88b6eb31a427845f97b01036f8d8e44f353585e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 06:59:48 +0000 Subject: [PATCH 09/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index a6b11d1..ae7c150 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 8%{?github_release}%{?dist} +Release: 9%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 2.6.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jan 25 2024 Fedora Release Engineering - 2.6.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 6b40e2eb91cc590aa94958905bc28ddffe5cde0c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 09:10:58 +0000 Subject: [PATCH 10/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index ae7c150..2779169 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 9%{?github_release}%{?dist} +Release: 10%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 2.6.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jul 19 2024 Fedora Release Engineering - 2.6.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From e6d034c56ff01a5c3cd4f9eb795f020bc9a181e6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 05:15:31 +0000 Subject: [PATCH 11/11] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- php-mtdowling-jmespath-php.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/php-mtdowling-jmespath-php.spec b/php-mtdowling-jmespath-php.spec index 2779169..900742a 100644 --- a/php-mtdowling-jmespath-php.spec +++ b/php-mtdowling-jmespath-php.spec @@ -26,7 +26,7 @@ Name: php-%{composer_vendor}-jmespath-php Version: %{github_version} -Release: 10%{?github_release}%{?dist} +Release: 11%{?github_release}%{?dist} Summary: Declaratively specify how to extract elements from a JSON document License: MIT @@ -133,6 +133,9 @@ exit $RETURN_CODE %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.6.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Sat Jan 18 2025 Fedora Release Engineering - 2.6.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild