summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-17 17:46:12 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-17 17:46:12 +0100
commitda6f3b624ea0cdfa4a0163d28e18c3f49e53a533 (patch)
treeb33633c0ecb462ab647598ec90dcaa5c4a109394
parentfb121b695a46448c44d6c8a5cd98a2f9fe879d04 (diff)
php-nrk-Predis: fix FTBFS
-rw-r--r--php-nrk-Predis.spec47
1 files changed, 34 insertions, 13 deletions
diff --git a/php-nrk-Predis.spec b/php-nrk-Predis.spec
index 3a50bee..6457cc0 100644
--- a/php-nrk-Predis.spec
+++ b/php-nrk-Predis.spec
@@ -18,7 +18,7 @@
Name: php-nrk-Predis
Version: 1.1.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: PHP client library for Redis
Group: Development/Libraries
@@ -26,6 +26,9 @@ License: MIT
URL: http://%{pear_channel}
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+# https://github.com/nrk/predis/pull/393
+Patch0: %{name}-pr393.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.3.9
@@ -61,7 +64,8 @@ Flexible and feature-complete PHP client library for Redis.
%setup -q -c
cd %{pear_name}-%{version}
-mv ../package.xml %{name}.xml
+%patch0 -p1
+sed -e '/test/s/md5sum="[^"]*"//' ../package.xml >%{name}.xml
%build
@@ -89,24 +93,36 @@ sed -e 's:tests/::' \
%check
%if %{with_tests}
-
: Launch redis server
-pidfile=$PWD/run/redis/redis.pid
-mkdir -p {run,log,lib}/redis
-sed -e "s:/var:$PWD:" \
- /etc/redis.conf >redis.conf
-%{_bindir}/redis-server \
- ./redis.conf \
- --daemonize yes \
- --pidfile $pidfile
+port=6379
+pidfile=$PWD/redis.pid
+mkdir -p data
+redis-server \
+ --bind 127.0.0.1 \
+ --port $port \
+ --daemonize yes \
+ --logfile $PWD/redis.log \
+ --dir $PWD/data \
+ --pidfile $pidfile
: Run the installed test Suite against the installed library
pushd %{buildroot}%{pear_testdir}/%{pear_name}
ret=0
-%{_bindir}/phpunit --include-path=%{buildroot}%{pear_phpdir} || ret=1
-
+# remirepo:10
+run=0
if which php71; then
php71 %{_bindir}/phpunit --include-path=%{buildroot}%{pear_phpdir} || ret=1
+ run=1
+fi
+if which php56; then
+ php56 %{_bindir}/phpunit --include-path=%{buildroot}%{pear_phpdir} || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
+%{_bindir}/phpunit \
+ --include-path=%{buildroot}%{pear_phpdir} \
+ --verbose || ret=1
+# remirepo:1
fi
popd
@@ -145,6 +161,11 @@ fi
%changelog
+* Thu Nov 17 2016 Remi Collet <remi@fedoraproject.org> - 1.1.1-2
+- fix bootstraping to redis server for test suite
+- add patch for PHP 7.1
+- open https://github.com/nrk/predis/pull/393
+
* Fri Jun 17 2016 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
- Update to 1.1.1