summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-03-20 09:33:56 +0100
committerRemi Collet <fedora@famillecollet.com>2017-03-20 09:33:56 +0100
commit7d8ab11edae3cdf826c280bad2f75c64e5e37cef (patch)
tree302018ded9073cc9e3efd733417ef6464af7f6b7
parent8177001cd953b1fadbfd44df11d9a0cc56666247 (diff)
php-react-dns: 0.4.6 (backported from Fedora)
-rw-r--r--composer.json11
-rw-r--r--php-react-dns.spec68
2 files changed, 59 insertions, 20 deletions
diff --git a/composer.json b/composer.json
index a632721..85dbd16 100644
--- a/composer.json
+++ b/composer.json
@@ -1,13 +1,18 @@
{
"name": "react/dns",
- "description": "Async DNS resolver.",
+ "description": "Async DNS resolver for ReactPHP",
"keywords": ["dns", "dns-resolver"],
"license": "MIT",
"require": {
"php": ">=5.3.0",
"react/cache": "~0.4.0|~0.3.0",
- "react/socket": "~0.4.0|~0.3.0",
- "react/promise": "~2.1|~1.2"
+ "react/socket": "^0.5 || ^0.4.4",
+ "react/stream": "^0.6 || ^0.5 || ^0.4.5",
+ "react/promise": "~2.1|~1.2",
+ "react/promise-timer": "~1.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.0 || ^4.8.10"
},
"autoload": {
"psr-4": { "React\\Dns\\": "src" }
diff --git a/php-react-dns.spec b/php-react-dns.spec
index 9b96d2b..b0d1dab 100644
--- a/php-react-dns.spec
+++ b/php-react-dns.spec
@@ -12,13 +12,13 @@
%global github_owner reactphp
%global github_name dns
-%global github_version 0.4.3
-%global github_commit 751b3129556e04944f164e3556a20ca6e201e459
+%global github_version 0.4.6
+%global github_commit a4c32f0021c742a1781c445270cb29a2d4b76fed
%global composer_vendor react
%global composer_project dns
-# "php": ">= 5.3.0"
+# "php": ">=5.3.0"
%global php_min_ver 5.3.0
# "react/cache": "~0.4.0|~0.3.0"
%global react_cache_min_ver 0.3.0
@@ -27,9 +27,15 @@
# NOTE: Min version not 1.2 to restrict to one major version
%global react_promise_min_ver 2.1
%global react_promise_max_ver 3.0
-# "react/socket": "~0.4.0|~0.3.0"
-%global react_socket_min_ver 0.3.0
-%global react_socket_max_ver 0.5.0
+# "react/promise-timer": "~1.1"
+%global react_promise_timer_min_ver 1.1
+%global react_promise_timer_max_ver 2.0
+# "react/socket": ^0.5 || ^0.4.4"
+%global react_socket_min_ver 0.4.4
+%global react_socket_max_ver 1.0
+# "react/stream": "^0.6 || ^0.5 || ^0.4.5"
+%global react_stream_min_ver 0.4.5
+%global react_stream_max_ver 1.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -38,7 +44,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: Async DNS resolver
Group: Development/Libraries
@@ -54,11 +60,15 @@ BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(react/cache) < %{react_cache_max_ver}
BuildRequires: php-composer(react/cache) >= %{react_cache_min_ver}
+BuildRequires: php-composer(react/promise-timer) < %{react_promise_timer_max_ver}
+BuildRequires: php-composer(react/promise-timer) >= %{react_promise_timer_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}
-## phpcompatinfo (computed from version 0.4.3)
+BuildRequires: php-composer(react/stream) < %{react_stream_max_ver}
+BuildRequires: php-composer(react/stream) >= %{react_stream_min_ver}
+## phpcompatinfo (computed from version 0.4.6)
BuildRequires: php-date
BuildRequires: php-pcre
BuildRequires: php-reflection
@@ -71,11 +81,15 @@ BuildRequires: php-composer(fedora/autoloader)
Requires: php(language) >= %{php_min_ver}
Requires: php-composer(react/cache) < %{react_cache_max_ver}
Requires: php-composer(react/cache) >= %{react_cache_min_ver}
+Requires: php-composer(react/promise-timer) < %{react_promise_timer_max_ver}
+Requires: php-composer(react/promise-timer) >= %{react_promise_timer_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}
-# phpcompatinfo (computed from version 0.4.3)
+Requires: php-composer(react/stream) < %{react_stream_max_ver}
+Requires: php-composer(react/stream) >= %{react_stream_min_ver}
+# phpcompatinfo (computed from version 0.4.6)
Requires: php-date
Requires: php-pcre
Requires: php-spl
@@ -114,7 +128,9 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::required(array(
'%{phpdir}/React/Cache/autoload.php',
'%{phpdir}/React/Promise/autoload.php',
+ '%{phpdir}/React/Promise/Timer/autoload.php',
'%{phpdir}/React/Socket/autoload.php',
+ '%{phpdir}/React/Stream/autoload.php',
));
AUTOLOAD
@@ -138,16 +154,31 @@ sed 's/function testResolveGoogleResolves/function SKIP_testResolveGoogleResolve
-i tests/FunctionalResolverTest.php
: Upstream tests
-%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
-
-: Upstream tests with SCLs if available
-SCL_RETURN_CODE=0
-for SCL in %{?rhel:php54 php55} php56 php70 php71; do
- if which $SCL; then
- $SCL %{_bindir}/phpunit --verbose --bootstrap bootstrap.php || SCL_RETURN_CODE=1
+RETURN_CODE=0
+for PHP_EXEC in php %{?rhel:php54 php55} php56 php70 php71; do
+ if which $PHP_EXEC; then
+ if $PHP_EXEC -r 'exit (PHP_VERSION_ID >= 70100 ? 0 : 1);' ; then
+ : Skip tests known to fail
+ : See https://github.com/reactphp/dns/issues/55
+ : See https://github.com/reactphp/dns/pull/56
+ # These test functions do not start with "test" and instead are marked with "/** @test */"
+ for FUNC in \
+ resolveShouldRetryWithTcpIfResponseIsTruncated \
+ resolveShouldRetryWithTcpIfUdpThrows \
+ resolveShouldCancelTimerWhenFullResponseIsReceived
+ do
+ # Get function line
+ FUNC_LINE=$(grep -n "function ${FUNC}" tests/Query/ExecutorTest.php | cut -d : -f 1)
+ # Delete previous line (i.e. "/** @test */")
+ LINE=$(expr ${FUNC_LINE} - 1)
+ sed "${LINE}d" -i tests/Query/ExecutorTest.php
+ done
+ fi
+
+ $PHP_EXEC %{_bindir}/phpunit --verbose --bootstrap bootstrap.php || RETURN_CODE=1
fi
done
-exit $SCL_RETURN_CODE
+exit $RETURN_CODE
%else
: Tests skipped
%endif
@@ -162,6 +193,9 @@ exit $SCL_RETURN_CODE
%changelog
+* Sat Mar 18 2017 Shawn Iwinski <shawn@iwin.ski> - 0.4.6-1
+- Update to 0.4.6 (RHBZ #1421888)
+
* Thu Jan 26 2017 Remi Collet <remi@remirepo.net> - 0.4.3-3
- backport