From 18bcf35f26151f3be36663c5e2ac42d6bfb7ef9e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 13 Nov 2018 13:37:57 +0100 Subject: From Fedora: Update to 0.8.3 (RHBZ #1421136) Add range version dependencies for Fedora >= 27 || RHEL >= 8 Add composer.json to repo --- .gitignore | 8 ++++ composer.json | 20 +++++---- php-react-http.spec | 119 ++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 109 insertions(+), 38 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc9aa8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index c186927..c3d46a9 100644 --- a/composer.json +++ b/composer.json @@ -1,18 +1,24 @@ { "name": "react/http", - "description": "Library for building an evented http server.", - "keywords": ["http"], + "description": "Event-driven, streaming plaintext HTTP and secure HTTPS server for ReactPHP", + "keywords": ["event-driven", "streaming", "HTTP", "HTTPS", "server", "ReactPHP"], "license": "MIT", "require": { - "php": ">=5.4.0", - "guzzlehttp/psr7": "^1.0", - "react/socket": "^0.4", - "react/stream": "^0.4", - "evenement/evenement": "^2.0" + "php": ">=5.3.0", + "ringcentral/psr7": "^1.2", + "react/socket": "^1.0 || ^0.8.3", + "react/stream": "^1.0 || ^0.7.1", + "react/promise": "^2.3 || ^1.2.1", + "evenement/evenement": "^3.0 || ^2.0 || ^1.0", + "react/promise-stream": "^1.1" }, "autoload": { "psr-4": { "React\\Http\\": "src" } + }, + "require-dev": { + "clue/block-react": "^1.1", + "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35" } } diff --git a/php-react-http.spec b/php-react-http.spec index 9141ac8..6b0ad66 100644 --- a/php-react-http.spec +++ b/php-react-http.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-react-http # -# Copyright (c) 2017 Shawn Iwinski +# Copyright (c) 2017-2018 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -12,26 +12,39 @@ %global github_owner reactphp %global github_name http -%global github_version 0.4.2 -%global github_commit abedac54967d7ea237ad104cff8274e2c4077cf4 +%global github_version 0.8.3 +%global github_commit f8bcdab2dc0ecd94f35ff9657a263028b96f0c46 %global composer_vendor react %global composer_project http -# "php": ">= 5.4.0" -%global php_min_ver 5.4.0 -# "evenement/evenement": "^2.0" +# "php": ">=5.3.0" +%global php_min_ver 5.3.0 +# "clue/block-react": "^1.1" +%global clue_block_react_min_ver 1.1 +%global clue_block_react_max_ver 2.0 +# "evenement/evenement": "^3.0 || ^2.0 || ^1.0" +# NOTE: Restricting to one major version %global evenement_min_ver 2.0 %global evenement_max_ver 3.0 -# "guzzlehttp/psr7": "^1.0" -%global guzzlehttp_psr7_min_ver 1.0 -%global guzzlehttp_psr7_max_ver 2.0 -# "react/socket": "^0.4" -%global react_socket_min_ver 0.4 +# "react/promise": "^2.3 || ^1.2.1" +# NOTE: Restricting to one major version +%global react_promise_min_ver 2.3 +%global react_promise_max_ver 3.0 +# "react/promise-stream": "^1.1" +%global react_promise_stream_min_ver 1.1 +%global react_promise_stream_max_ver 2.0 +# "react/socket": "^1.0 || ^0.8.3" +# NOTE: Restricting to one major version +%global react_socket_min_ver 0.8.3 %global react_socket_max_ver 1.0 -# "react/stream": "^0.4" -%global react_stream_min_ver 0.4 +# "react/stream": "^1.0 || ^0.7.1" +# NOTE: Restricting to one major version +%global react_stream_min_ver 0.7.1 %global react_stream_max_ver 1.0 +# "ringcentral/psr7": "^1.2" +%global ringcentral_psr7_min_ver 1.2 +%global ringcentral_psr7_max_ver 2.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -40,13 +53,13 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 2%{?github_release}%{?dist} +Release: 1%{?github_release}%{?dist} Summary: Library for building an evented http server Group: Development/Libraries License: MIT -URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +URL: https://reactphp.org/http/ +Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz BuildArch: noarch # Tests @@ -54,15 +67,33 @@ BuildArch: noarch ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(clue/block-react) >= %{clue_block_react_min_ver} with php-composer(clue/block-react) < %{clue_block_react_max_ver}) +BuildRequires: (php-composer(evenement/evenement) >= %{evenement_min_ver} with php-composer(evenement/evenement) < %{evenement_max_ver}) +BuildRequires: (php-composer(react/promise-stream) >= %{react_promise_stream_min_ver} with php-composer(react/promise-stream) < %{react_promise_stream_max_ver}) +BuildRequires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver}) +BuildRequires: (php-composer(react/socket) >= %{react_socket_min_ver} with php-composer(react/socket) < %{react_socket_max_ver}) +BuildRequires: (php-composer(react/stream) >= %{react_stream_min_ver} with php-composer(react/stream) < %{react_stream_max_ver}) +BuildRequires: (php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver} with php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver}) +%else +BuildRequires: php-composer(clue/block-react) < %{clue_block_react_max_ver} +BuildRequires: php-composer(clue/block-react) >= %{clue_block_react_min_ver} BuildRequires: php-composer(evenement/evenement) < %{evenement_max_ver} BuildRequires: php-composer(evenement/evenement) >= %{evenement_min_ver} -BuildRequires: php-composer(guzzlehttp/psr7) < %{guzzlehttp_psr7_max_ver} -BuildRequires: php-composer(guzzlehttp/psr7) >= %{guzzlehttp_psr7_min_ver} +BuildRequires: php-composer(react/promise-stream) < %{react_promise_stream_max_ver} +BuildRequires: php-composer(react/promise-stream) >= %{react_promise_stream_min_ver} +BuildRequires: php-composer(react/promise) < %{react_promise_max_ver} +BuildRequires: php-composer(react/promise) >= %{react_promise_min_ver} BuildRequires: php-composer(react/socket) < %{react_socket_max_ver} BuildRequires: php-composer(react/socket) >= %{react_socket_min_ver} BuildRequires: php-composer(react/stream) < %{react_stream_max_ver} BuildRequires: php-composer(react/stream) >= %{react_stream_min_ver} -## phpcompatinfo (computed from version 0.4.2) +BuildRequires: php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver} +BuildRequires: php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver} +%endif +## phpcompatinfo (computed from version 0.8.3) +BuildRequires: php-date +BuildRequires: php-pcre BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -70,15 +101,30 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(evenement/evenement) >= %{evenement_min_ver} with php-composer(evenement/evenement) < %{evenement_max_ver}) +Requires: (php-composer(react/promise-stream) >= %{react_promise_stream_min_ver} with php-composer(react/promise-stream) < %{react_promise_stream_max_ver}) +Requires: (php-composer(react/promise) >= %{react_promise_min_ver} with php-composer(react/promise) < %{react_promise_max_ver}) +Requires: (php-composer(react/socket) >= %{react_socket_min_ver} with php-composer(react/socket) < %{react_socket_max_ver}) +Requires: (php-composer(react/stream) >= %{react_stream_min_ver} with php-composer(react/stream) < %{react_stream_max_ver}) +Requires: (php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver} with php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver}) +%else Requires: php-composer(evenement/evenement) < %{evenement_max_ver} Requires: php-composer(evenement/evenement) >= %{evenement_min_ver} -Requires: php-composer(guzzlehttp/psr7) < %{guzzlehttp_psr7_max_ver} -Requires: php-composer(guzzlehttp/psr7) >= %{guzzlehttp_psr7_min_ver} +Requires: php-composer(react/promise-stream) < %{react_promise_stream_max_ver} +Requires: php-composer(react/promise-stream) >= %{react_promise_stream_min_ver} +Requires: php-composer(react/promise) < %{react_promise_max_ver} +Requires: php-composer(react/promise) >= %{react_promise_min_ver} Requires: php-composer(react/socket) < %{react_socket_max_ver} Requires: php-composer(react/socket) >= %{react_socket_min_ver} Requires: php-composer(react/stream) < %{react_stream_max_ver} Requires: php-composer(react/stream) >= %{react_stream_min_ver} -# phpcompatinfo (computed from version 0.4.2) +Requires: php-composer(ringcentral/psr7) < %{ringcentral_psr7_max_ver} +Requires: php-composer(ringcentral/psr7) >= %{ringcentral_psr7_min_ver} +%endif +# phpcompatinfo (computed from version 0.8.3) +Requires: php-date +Requires: php-pcre Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -120,9 +166,11 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required(array( '%{phpdir}/Evenement/autoload.php', - '%{phpdir}/GuzzleHttp/Psr7/autoload.php', + '%{phpdir}/React/Promise/autoload.php', + '%{phpdir}/React/Promise/Stream/autoload.php', '%{phpdir}/React/Socket/autoload.php', '%{phpdir}/React/Stream/autoload.php', + '%{phpdir}/RingCentral/Psr7/autoload.php', )); AUTOLOAD @@ -138,20 +186,24 @@ cp -rp src %{buildroot}%{phpdir}/React/Http cat <<'BOOTSTRAP' | tee bootstrap.php - 0.8.3-1 +- Update to 0.8.3 (RHBZ #1421136) +- Add range version dependencies for Fedora >= 27 || RHEL >= 8 +- Add composer.json to repo + * Thu Jan 26 2017 Remi Collet - 0.4.2-2 - backport -- cgit