summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-06-17 14:24:13 +0200
committerRemi Collet <fedora@famillecollet.com>2015-06-17 14:24:13 +0200
commit77e15afe59789a94afdd4b4d2aa65f81b5f8f817 (patch)
tree7165392e6f4124314f58c765bc1e11255ba93058
parentb15df912ecb973b3ce5f96ca33fda1d53e8094b3 (diff)
php-pecl-yar: rebuild
-rw-r--r--php-pecl-yar-dev.spec32
-rw-r--r--yar-pr51.patch53
2 files changed, 65 insertions, 20 deletions
diff --git a/php-pecl-yar-dev.spec b/php-pecl-yar-dev.spec
index bf69fb8..1ea3353 100644
--- a/php-pecl-yar-dev.spec
+++ b/php-pecl-yar-dev.spec
@@ -11,11 +11,11 @@
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
-%global gh_commit 3b43b26f28a615ee1a1dda36f0081dd67785d78c
+%global gh_commit 410ca7a3f1d633050000ee2ec233366d73e3fda3
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner laruence
%global gh_project yar
-%global gh_date 20150612
+%global gh_date 20150615
%global with_zts 0%{?__ztsphp:1}
%global pecl_name yar
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
@@ -31,7 +31,7 @@ Summary: Light, concurrent RPC framework
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.2.5
%if 0%{?gh_date:1}
-Release: 0.2.%{gh_date}git%{gh_short}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 0.3.%{gh_date}git%{gh_short}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
%else
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
%endif
@@ -40,6 +40,8 @@ Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
+Patch0: %{pecl_name}-pr51.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: curl-devel
BuildRequires: %{?scl_prefix}php-devel
@@ -109,6 +111,7 @@ sed -e 's/role="test"/role="src"/' \
-i package2.xml
cd NTS
+%patch0 -p1
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YAR_VERSION/{s/.* "//;s/".*$//;p}' php_yar.h)
@@ -236,29 +239,15 @@ export TEST_PHP_EXECUTABLE=%{__php}
export TEST_PHP_ARGS="-n -d extension=json.so -d extension=msgpack.so -d extension=$PWD/modules/%{pecl_name}.so"
export NO_INTERACTION=1
export REPORT_EXIT_STATUS=1
-RET=0
%ifarch x86_64
-PORT=8088
+export YAR_API_PORT=8968
%else
-PORT=8084
+export YAR_API_PORT=8964
%endif
-sed -e "/YAR_API_HOST/s|localhost:8090|127.0.0.1:$PORT|" \
- -e "/YAR_API_URI/s|/yar/|/|" \
- -i tests/yar.inc
-
-: launch the server
-%{__php} $TEST_PHP_ARGS -S 127.0.0.1:$PORT -t tests/htdocs &>serv.log &
-PID=$!
-
: Run the upstream test suite
-%{__php} -n run-tests.php --show-diff || RET=1
-
-: Cleanup
-kill $PID
-
-exit $RET
+%{__php} -n run-tests.php --show-diff
%else
: upstream test suite disabled
%endif
@@ -284,6 +273,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Jun 17 2015 Remi Collet <remi@fedoraproject.org> - 1.2.5-0.3.20150615git410ca7a
+- rebuild
+
* Fri Jun 12 2015 Remi Collet <remi@fedoraproject.org> - 1.2.5-0.2.20150612git3b43b26
- enable test suite during the build
diff --git a/yar-pr51.patch b/yar-pr51.patch
new file mode 100644
index 0000000..6023440
--- /dev/null
+++ b/yar-pr51.patch
@@ -0,0 +1,53 @@
+From 7fc722c993ca01038dbfd52439891dd6f21b34e9 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Wed, 17 Jun 2015 14:06:52 +0200
+Subject: [PATCH 1/2] honours TEST_PHP_ARGS (which can include other extension,
+ json, msgpack, ...)
+
+---
+ tests/yar.inc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/yar.inc b/tests/yar.inc
+index 467efe3..bd76ac1 100644
+--- a/tests/yar.inc
++++ b/tests/yar.inc
+@@ -10,7 +10,11 @@ define("YAR_API_URI", "/");
+ define("YAR_API_ADDRESS", "http://" . YAR_API_HOST . YAR_API_URI);
+
+ function yar_server_start($doc_root = __DIR__ . "/htdocs", $cmd_args = "-dextension=" . __DIR__ . "/../modules/yar.so") {
+- $php_executable = getenv('TEST_PHP_EXECUTABLE');
++ $php_executable = (getenv('TEST_PHP_EXECUTABLE')?:PHP_BINARY);
++ $tmp = getenv('TEST_PHP_ARGS');
++ if ($tmp) {
++ $cmd_args = $tmp;
++ }
+
+ $descriptorspec = array(
+ 0 => STDIN,
+
+From a2b79d399a6eb666f4873a42ce8cbf0cfb3b86b0 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Wed, 17 Jun 2015 14:09:34 +0200
+Subject: [PATCH 2/2] use ENV if defined for hostname and port (make
+ downstream)
+
+---
+ tests/yar.inc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/yar.inc b/tests/yar.inc
+index bd76ac1..e7161e2 100644
+--- a/tests/yar.inc
++++ b/tests/yar.inc
+@@ -3,8 +3,8 @@
+ define("YAR_API_USER", "dummy");
+ define("YAR_API_PASS", "foo");
+
+-define("YAR_API_HOSTNAME", "localhost");
+-define("YAR_API_PORT", "8964");
++define("YAR_API_HOSTNAME", (getenv('YAR_API_HOSTNAME') ?: "localhost"));
++define("YAR_API_PORT", (getenv('YAR_API_PORT') ?: "8964"));
+ define("YAR_API_HOST", YAR_API_HOSTNAME . ":" . YAR_API_PORT);
+ define("YAR_API_URI", "/");
+ define("YAR_API_ADDRESS", "http://" . YAR_API_HOST . YAR_API_URI);