diff --git a/.gitignore b/.gitignore index 3a3d11b..7828a48 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,16 @@ clog /php-justinrainbow-json-schema5-5.1.0-48817e5.tgz /php-justinrainbow-json-schema5-5.2.0-e3c9bcc.tgz /php-justinrainbow-json-schema5-5.2.1-429be23.tgz +/php-justinrainbow-json-schema5-5.2.2-b80053b.tgz +/php-justinrainbow-json-schema5-5.2.4-7ccb0e6.tgz +/php-justinrainbow-json-schema5-5.2.5-0d4fda8.tgz +/php-justinrainbow-json-schema5-5.2.6-d283e11.tgz +/php-justinrainbow-json-schema5-5.2.7-8560d43.tgz +/php-justinrainbow-json-schema5-5.2.8-dcb6e10.tgz +/php-justinrainbow-json-schema5-5.2.9-44c6787.tgz +/php-justinrainbow-json-schema5-5.2.10-2ba9c8c.tgz +/php-justinrainbow-json-schema5-5.2.11-2ab6744.tgz +/php-justinrainbow-json-schema5-5.2.12-ad87d5a.tgz +/php-justinrainbow-json-schema5-5.2.13-fbbe7e5.tgz +/php-justinrainbow-json-schema5-5.3.0-feb2ca6.tgz +/php-justinrainbow-json-schema5-5.3.1-b5a44b6.tgz diff --git a/php-justinrainbow-json-schema5-makesrc.sh b/php-justinrainbow-json-schema5-makesrc.sh index e9f0fbc..dfd5c2a 100755 --- a/php-justinrainbow-json-schema5-makesrc.sh +++ b/php-justinrainbow-json-schema5-makesrc.sh @@ -3,9 +3,7 @@ NAME=$(basename $PWD) OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) -MAJOR=$(sed -n '/^%global major/{s/.* //;p}' $NAME.spec) -MINOR=$(sed -n '/^%global minor/{s/.* //;p}' $NAME.spec) -VERSION=$MAJOR.$MINOR +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec) SHORT=${COMMIT:0:7} diff --git a/php-justinrainbow-json-schema5-rpm.patch b/php-justinrainbow-json-schema5-rpm.patch index e354326..eb8e536 100644 --- a/php-justinrainbow-json-schema5-rpm.patch +++ b/php-justinrainbow-json-schema5-rpm.patch @@ -1,6 +1,6 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json ---- ./bin/validate-json.rpm 2017-03-23 08:58:50.000000000 +0100 -+++ ./bin/validate-json 2017-03-23 09:23:35.797857285 +0100 +--- ./bin/validate-json.rpm 2019-09-26 09:03:49.371018279 +0200 ++++ ./bin/validate-json 2019-09-26 09:06:21.033483985 +0200 @@ -6,32 +6,7 @@ * @author Christian Weiske */ @@ -12,7 +12,7 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json - * - * @return void - */ --function __autoload($className) +-spl_autoload_register(function ($className) -{ - $className = ltrim($className, '\\'); - $fileName = ''; @@ -25,7 +25,7 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json - if (stream_resolve_include_path($fileName)) { - require_once $fileName; - } --} +-}); - -// support running this tool from git checkout -if (is_dir(__DIR__ . '/../src/JsonSchema')) { @@ -36,9 +36,9 @@ diff -up ./bin/validate-json.rpm ./bin/validate-json $arOptions = array(); $arArgs = array(); diff -up ./src/JsonSchema/Uri/UriRetriever.php.rpm ./src/JsonSchema/Uri/UriRetriever.php ---- ./src/JsonSchema/Uri/UriRetriever.php.rpm 2017-03-23 08:58:50.000000000 +0100 -+++ ./src/JsonSchema/Uri/UriRetriever.php 2017-03-23 09:23:35.797857285 +0100 -@@ -323,7 +323,8 @@ class UriRetriever implements BaseUriRet +--- ./src/JsonSchema/Uri/UriRetriever.php.rpm 2019-09-26 09:03:13.000000000 +0200 ++++ ./src/JsonSchema/Uri/UriRetriever.php 2019-09-26 09:03:49.371018279 +0200 +@@ -342,7 +342,8 @@ class UriRetriever implements BaseUriRet } // translate references to local files within the json-schema package @@ -49,9 +49,9 @@ diff -up ./src/JsonSchema/Uri/UriRetriever.php.rpm ./src/JsonSchema/Uri/UriRetri return $uri; } diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php ---- ./tests/Uri/UriRetrieverTest.php.rpm 2017-03-23 08:58:50.000000000 +0100 -+++ ./tests/Uri/UriRetrieverTest.php 2017-03-23 09:28:28.992372836 +0100 -@@ -295,7 +295,8 @@ EOF; +--- ./tests/Uri/UriRetrieverTest.php.rpm 2019-09-26 09:03:13.000000000 +0200 ++++ ./tests/Uri/UriRetrieverTest.php 2019-09-26 09:03:49.372018275 +0200 +@@ -296,7 +296,8 @@ EOF; public function testPackageURITranslation() { $retriever = new UriRetriever(); @@ -61,7 +61,7 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php $uri = $retriever->translate('package://foo/bar.json'); $this->assertEquals("${root}foo/bar.json", $uri); -@@ -304,7 +305,8 @@ EOF; +@@ -305,7 +306,8 @@ EOF; public function testDefaultDistTranslations() { $retriever = new UriRetriever(); @@ -71,7 +71,7 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php $this->assertEquals( $root . 'json-schema-draft-03.json', -@@ -322,11 +324,12 @@ EOF; +@@ -323,11 +325,12 @@ EOF; $retriever = new UriRetriever(); // load schema from package @@ -85,8 +85,8 @@ diff -up ./tests/Uri/UriRetrieverTest.php.rpm ./tests/Uri/UriRetrieverTest.php + $this->assertEquals('c2ef5714b639cea176fdeeafe418aa09', md5(json_encode($schema))); } - public function testJsonSchemaOrgMediaTypeHack() -@@ -365,7 +367,7 @@ EOF; + public function testInvalidContentTypeEndpointsDefault() +@@ -389,7 +392,7 @@ EOF; 'JsonSchema\Exception\JsonDecodingException', 'JSON syntax is malformed' ); diff --git a/php-justinrainbow-json-schema5.spec b/php-justinrainbow-json-schema5.spec index aa4758f..f31e0e3 100644 --- a/php-justinrainbow-json-schema5.spec +++ b/php-justinrainbow-json-schema5.spec @@ -1,19 +1,25 @@ # remirepo/fedora spec file for php-justinrainbow-json-schema5 # -# Copyright (c) 2016-2017 Remi Collet -# License: CC-BY-SA -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # -%global gh_commit 429be236f296ca249d61c65649cdf2652f4a5e80 + +%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 +# disable test suite until recent phpunit is supported +%bcond_with tests +%else +%bcond_without tests +%endif + +%global gh_commit b5a44b6391a3bbb75c9f2b73e1ef03d6045e1e20 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner justinrainbow %global gh_project json-schema %global php_home %{_datadir}/php -%global with_tests 0%{!?_without_tests:1} %global major 5 -%global minor 2.1 # Some sample files, only used for tests @@ -28,13 +34,12 @@ %global eolv2 0 Name: php-%{gh_owner}-%{gh_project}%{major} -Version: %{major}.%{minor} +Version: 5.3.1 Release: 1%{?dist} Summary: A library to validate a json schema - -Group: Development/Libraries License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} + # git snapshot to get upstream test suite Source0: %{name}-%{version}-%{gh_short}.tgz Source1: https://github.com/%{ts_owner}/%{ts_project}/archive/%{ts_commit}/%{ts_project}-%{ts_version}-%{ts_short}.tar.gz @@ -45,22 +50,17 @@ Source3: %{name}-makesrc.sh Patch0: %{name}-rpm.patch BuildArch: noarch -%if %{with_tests} +%if %{with tests} # For tests -BuildRequires: php(language) >= 5.3.3 +BuildRequires: php(language) >= 7.1 BuildRequires: php-curl -BuildRequires: php-date -BuildRequires: php-filter BuildRequires: php-json BuildRequires: php-mbstring -BuildRequires: php-pcre -BuildRequires: php-spl # From composer.json, "require-dev": { -# "json-schema/JSON-Schema-Test-Suite": "1.2.0", -# "phpunit/phpunit": "^4.8.22", +# "json-schema/json-schema-test-suite": "1.2.0", # "friendsofphp/php-cs-fixer": "^2.1", -# "phpdocumentor/phpdocumentor": "^2.7" -BuildRequires: php-composer(phpunit/phpunit) >= 4.8.22 +# "phpunit/phpunit": "^4.8.35" +BuildRequires: php-composer(phpunit/phpunit) >= 4.8.35 # Autoloader BuildRequires: php-composer(fedora/autoloader) # For composer schema @@ -68,16 +68,12 @@ BuildRequires: composer %endif # From composer.json, "require": { -# "php": ">=5.3.3" -Requires: php(language) >= 5.3.3 +# "php": ">=7.1" +Requires: php(language) >= 7.1 # From phpcompatinfo report for version 4.0.1 Requires: php-curl -Requires: php-date -Requires: php-filter Requires: php-json Requires: php-mbstring -Requires: php-pcre -Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) %if %{eolv1} @@ -104,7 +100,7 @@ Autoloader: %{php_home}/JsonSchema%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -a 1 -%patch0 -p1 -b .rpm +%patch -P0 -p1 -b .rpm find src -name \*.rpm -delete -print cp %{SOURCE2} src/JsonSchema/autoload.php @@ -140,7 +136,7 @@ install -Dpm 0755 bin/validate-json %{buildroot}%{_bindir}/validate-json%{major} %check -%if %{with_tests} +%if %{with tests} : Test suite autoloader cat << 'EOF' | tee vendor/autoload.php - 5.3.1-1 +- update to 5.3.1 +- re-license spec file to CECILL-2.1 + +* Fri Jul 25 2025 Fedora Release Engineering - 5.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 5.3.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Fri Jul 19 2024 Fedora Release Engineering - 5.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jul 8 2024 Remi Collet - 5.3.0-1 +- update to 5.3.0 +- raise dependency on PHP 7.1 + +* Thu Jan 25 2024 Fedora Release Engineering - 5.2.13-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 5.2.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Sep 28 2023 Remi Collet - 5.2.13-1 +- update to 5.2.13 +- disable test suite + +* Fri Jul 21 2023 Fedora Release Engineering - 5.2.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 5.2.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 5.2.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Apr 13 2022 Remi Collet - 5.2.12-1 +- update to 5.2.12 + +* Fri Jan 21 2022 Fedora Release Engineering - 5.2.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Remi Collet - 5.2.11-1 +- update to 5.2.11 + +* Wed Jan 27 2021 Fedora Release Engineering - 5.2.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 5.2.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu May 28 2020 Remi Collet - 5.2.10-1 +- update to 5.2.10 + +* Thu Jan 30 2020 Fedora Release Engineering - 5.2.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Sep 26 2019 Remi Collet - 5.2.9-1 +- update to 5.2.9 + +* Fri Jul 26 2019 Fedora Release Engineering - 5.2.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 5.2.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jan 15 2019 Remi Collet - 5.2.8-1 +- update to 5.2.8 + +* Fri Jul 13 2018 Fedora Release Engineering - 5.2.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 15 2018 Remi Collet - 5.2.7-1 +- Update to 5.2.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 5.2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Oct 22 2017 Remi Collet - 5.2.6-1 +- Update to 5.2.6 + +* Wed Oct 11 2017 Remi Collet - 5.2.5-1 +- Update to 5.2.5 + +* Thu Oct 5 2017 Remi Collet - 5.2.4-1 +- Update to 5.2.4 + +* Tue Oct 3 2017 Remi Collet - 5.2.2-1 +- Update to 5.2.2 + +* Thu Jul 27 2017 Fedora Release Engineering - 5.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Wed May 17 2017 Remi Collet - 5.2.1-1 - Update to 5.2.1 diff --git a/sources b/sources index 45c837a..77cf9e2 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (JSON-Schema-Test-Suite-1.2.0-f3d5aeb.tar.gz) = 6b917a0a0b02d5b2be6457403fba0ae4d3789634da911ebbdc56986b99ae285ed8a7bc696abc668f2a95b55e33d7bfbf8709162fc0995d76ab2f0d05494a2d02 -SHA512 (php-justinrainbow-json-schema5-5.2.1-429be23.tgz) = c8b22be2ba601d4e9e2ec94470841f5cadc5a0a73bceb8bfeb5d7a16ed5fe8da0e3769e5843a16a38512bfbcfc99aece55003945e48f1bcfebd63e5b6e35f733 +SHA512 (php-justinrainbow-json-schema5-5.3.1-b5a44b6.tgz) = bf183d685d7410c09da2c24d6aeac86fe6f804bd79f15bc573d9e52f7437817437e975d34ce79e56f824fa6d9deb57cc7df531977e745a66c0a0c54eafeacb8c