summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-04-02 09:08:38 +0200
committerRemi Collet <fedora@famillecollet.com>2014-04-02 09:08:38 +0200
commitb9180233bb78967b5e2ed5815e21c628848e2abc (patch)
tree3c9c41f87179a8caa1e8394366676d8820308bb9
parent96188b750f0d736fd244e0a0cf13e82e4c40f31a (diff)
php-pecl-memcached: 2.2.0 (stable)
-rw-r--r--memcached-build.patch34
-rw-r--r--memcached-info.patch16
-rw-r--r--php-pecl-memcached.spec74
-rw-r--r--reflection-2.2.0 (renamed from reflection-2.2.0b1)7
4 files changed, 61 insertions, 70 deletions
diff --git a/memcached-build.patch b/memcached-build.patch
deleted file mode 100644
index 1581e08..0000000
--- a/memcached-build.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 74542111f175fe2ec41c8bf722fc2cd3dac93eea Mon Sep 17 00:00:00 2001
-From: Andrei Zmievski <andrei@zmievski.org>
-Date: Sun, 30 Sep 2012 11:09:01 -0700
-Subject: [PATCH] Fix version access for libmemcached older than 1.0.8.
-
----
- php_memcached.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/php_memcached.c b/php_memcached.c
-index 90ea8ab..7e6041a 100644
---- a/php_memcached.c
-+++ b/php_memcached.c
-@@ -2642,10 +2642,17 @@ static memcached_return php_memc_do_version_callback(const memcached_st *ptr, me
- struct callbackContext* context = (struct callbackContext*) in_context;
-
- hostport_len = spprintf(&hostport, 0, "%s:%d", memcached_server_name(instance), memcached_server_port(instance));
-+#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000008
- version_len = snprintf(version, sizeof(version), "%d.%d.%d",
- memcached_server_major_version(instance),
- memcached_server_minor_version(instance),
- memcached_server_micro_version(instance));
-+#else
-+ version_len = snprintf(version, sizeof(version), "%d.%d.%d",
-+ instance->major_version,
-+ instance->minor_version,
-+ instance->micro_version);
-+#endif
-
- add_assoc_stringl_ex(context->return_value, hostport, hostport_len+1, version, version_len, 1);
- efree(hostport);
---
-1.7.10
-
diff --git a/memcached-info.patch b/memcached-info.patch
deleted file mode 100644
index c5c494f..0000000
--- a/memcached-info.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up memcached-2.1.0/php_memcached.c.info memcached-2.1.0/php_memcached.c
---- memcached-2.1.0/php_memcached.c.info 2012-11-17 09:52:02.576769778 +0100
-+++ memcached-2.1.0/php_memcached.c 2012-11-17 09:54:23.335280240 +0100
-@@ -3877,6 +3877,12 @@ PHP_MINFO_FUNCTION(memcached)
- php_info_print_table_row(2, "Version", PHP_MEMCACHED_VERSION);
- php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
-
-+#if HAVE_MEMCACHED_SASL
-+ php_info_print_table_row(2, "SASL support", "yes");
-+#else
-+ php_info_print_table_row(2, "SASL support", "no");
-+#endif
-+
- #ifdef HAVE_MEMCACHED_SESSION
- php_info_print_table_row(2, "Session support", "yes");
- #else
diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec
index e4e13d8..8fadad1 100644
--- a/php-pecl-memcached.spec
+++ b/php-pecl-memcached.spec
@@ -16,13 +16,13 @@
%global with_zts 0%{?__ztsphp:1}
%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
%global pecl_name memcached
-%global prever RC1
-%global intver rc1
+#global prever RC1
+#global intver rc1
Summary: Extension to work with the Memcached caching daemon
Name: %{?scl_prefix}php-pecl-memcached
Version: 2.2.0
-Release: 0.3.%{prever}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
# memcached is PHP, FastLZ is MIT
License: PHP and MIT
Group: Development/Languages
@@ -36,7 +36,9 @@ BuildRequires: %{?scl_prefix}php-devel >= 5.2.10
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
+%ifnarch ppc64
BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
+%endif
BuildRequires: zlib-devel
BuildRequires: cyrus-sasl-devel
%if %{with_tests}
@@ -53,15 +55,23 @@ BuildRequires: %{?scl_prefix}libmemcached-devel > 1
Requires: %{?scl_prefix}libmemcached-libs%{_isa} > 1
%else
BuildRequires: libevent-devel >= 2.0.2
+%if 0%{?rhel} == 5
+BuildRequires: libmemcached-devel > 1
+%else
+# To ensure use of libmemcached-last for --enable-memcached-protocol
+BuildRequires: libmemcached-devel > 1.0.16
+%endif
%endif
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php-pecl-igbinary%{?_isa}
-Requires: %{?scl_prefix}php-pecl-msgpack%{?_isa}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+%ifnarch ppc64
+Requires: %{?scl_prefix}php-pecl-msgpack%{?_isa}
+%endif
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -120,14 +130,38 @@ extension=%{pecl_name}.so
; RPM note : save_handler and save_path are defined
; for mod_php, in /etc/httpd/conf.d/php.conf
-; for php-fpm, in /etc/php-fpm.d/*conf
+; for php-fpm, in %{_sysconfdir}/php-fpm.d/*conf
; Use memcache as a session handler
;session.save_handler=memcached
; Defines a comma separated list of server urls to use for session storage
;session.save_path="localhost:11211"
+
+; ----- Configuration options
+; http://php.net/manual/en/memcached.configuration.php
+
+;memcached.sess_locking = 1
+;memcached.sess_consistent_hash = 0
+;memcached.sess_binary = 0
+;memcached.sess_lock_wait = 150000
+;memcached.sess_lock_max_wait = 0
+;memcached.sess_lock_expire = 0
+;memcached.sess_prefix = "memc.sess.key."
+;memcached.sess_number_of_replicas = 0
+;memcached.sess_randomize_replica_read = 0
+;memcached.sess_remove_failed = 0
+;memcached.sess_connect_timeout = 1000
+;memcached.sess_sasl_username = ""
+;memcached.sess_sasl_password = ""
+;memcached.compression_type = "fastlz"
+;memcached.compression_factor = "1.3"
+;memcached.compression_threshold = 2000
+;memcached.serializer = "igbinary"
+;memcached.use_sasl = 0
+;memcached.store_retry_count = 2
EOF
+
%if %{with_zts}
cp -r NTS ZTS
%endif
@@ -141,7 +175,9 @@ peclconf() {
%configure --enable-memcached-igbinary \
--enable-memcached-json \
--enable-memcached-sasl \
+%ifnarch ppc64
--enable-memcached-msgpack \
+%endif
%if 0%{?rhel} == 5
--disable-memcached-protocol \
%else
@@ -204,21 +240,20 @@ fi
%check
+OPT="-n"
+[ -f %{php_extdir}/igbinary.so ] && OPT="$OPT -d extension=igbinary.so"
+[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
+[ -f %{php_extdir}/msgpack.so ] && OPT="$OPT -d extension=msgpack.so"
+
: Minimal load test for NTS extension
-%{__php} -n -q \
- -d extension=igbinary.so \
- -d extension=json.so \
- -d extension=msgpack.so \
- -d extension=NTS/modules/%{pecl_name}.so \
+%{__php} $OPT \
+ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_zts}
: Minimal load test for ZTS extension
-%{__ztsphp} -n -q \
- -d extension=igbinary.so \
- -d extension=json.so \
- -d extension=msgpack.so \
- -d extension=ZTS/modules/%{pecl_name}.so \
+%{__ztsphp} $OPT \
+ -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%endif
@@ -232,7 +267,7 @@ memcached -p 11211 -U 11211 -d -P $PWD/memcached.pid
pushd NTS
rm tests/flush_buffers.phpt tests/touch_binary.phpt
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=igbinary.so -d extension=json.so -d extension=msgpack.so -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php || ret=1
@@ -243,7 +278,7 @@ popd
pushd ZTS
rm tests/flush_buffers.phpt tests/touch_binary.phpt
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=igbinary.so -d extension=json.so -d extension=msgpack.so -d extension=$PWD/modules/%{pecl_name}.so" \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php || ret=1
@@ -274,6 +309,11 @@ exit $ret
%changelog
+* Wed Apr 2 2014 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
+- update to 2.2.0 (stable)
+- add all ini options
+- msgpack not available for ppc64
+
* Wed Mar 19 2014 Remi Collet <rcollet@redhat.com> - 2.2.0-0.3.RC1
- allow SCL build
diff --git a/reflection-2.2.0b1 b/reflection-2.2.0
index 4a15c0d..48dec61 100644
--- a/reflection-2.2.0b1
+++ b/reflection-2.2.0
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #148 memcached version 2.2.0b1 ] {
+Extension [ <persistent> extension #156 memcached version 2.2.0 ] {
- INI {
Entry [ memcached.sess_locking <ALL> ]
@@ -63,8 +63,8 @@ Extension [ <persistent> extension #148 memcached version 2.2.0b1 ] {
- Classes [3] {
Class [ <internal:memcached> class Memcached ] {
- - Constants [129] {
- Constant [ integer LIBMEMCACHED_VERSION_HEX ] { 16777238 }
+ - Constants [130] {
+ Constant [ integer LIBMEMCACHED_VERSION_HEX ] { 16777240 }
Constant [ integer OPT_COMPRESSION ] { -1001 }
Constant [ integer OPT_COMPRESSION_TYPE ] { -1004 }
Constant [ integer OPT_PREFIX_KEY ] { -1002 }
@@ -115,6 +115,7 @@ Extension [ <persistent> extension #148 memcached version 2.2.0b1 ] {
Constant [ integer OPT_NUMBER_OF_REPLICAS ] { 29 }
Constant [ integer OPT_RANDOMIZE_REPLICA_READ ] { 30 }
Constant [ integer OPT_REMOVE_FAILED_SERVERS ] { 35 }
+ Constant [ integer OPT_SERVER_TIMEOUT_LIMIT ] { 37 }
Constant [ integer RES_SUCCESS ] { 0 }
Constant [ integer RES_FAILURE ] { 1 }
Constant [ integer RES_HOST_LOOKUP_FAILURE ] { 2 }