[php-pecl-memcache/f13/master] patch for bug #599305 (upstream #17566)
Remi Collet
remi at fedoraproject.org
Thu Sep 30 18:52:36 UTC 2010
commit 23c85a287fbae13c98bd9e4e8a6ef122dc19b1ec
Author: remi <fedora at famillecollet.com>
Date: Thu Sep 30 20:35:39 2010 +0200
patch for bug #599305 (upstream #17566)
memcache-17566.patch | 21 +++++++++++++++++++++
php-pecl-memcache.spec | 22 ++++++++++++++++++++--
2 files changed, 41 insertions(+), 2 deletions(-)
---
diff --git a/memcache-17566.patch b/memcache-17566.patch
new file mode 100644
index 0000000..08f1fac
--- /dev/null
+++ b/memcache-17566.patch
@@ -0,0 +1,21 @@
+diff -up memcache-3.0.4/memcache.c.orig memcache-3.0.4/memcache.c
+--- memcache-3.0.4/memcache.c.orig 2009-02-22 17:01:43.000000000 +0100
++++ memcache-3.0.4/memcache.c 2010-09-30 20:24:55.000000000 +0200
+@@ -642,7 +642,7 @@ static void php_mmc_numeric(INTERNAL_FUN
+ }
+
+ if (deleted) {
+- pool->protocol->delete(request, request->key, request->key_len, value);
++ pool->protocol->delete(request, request->key, request->key_len, exptime);
+ }
+ else {
+ pool->protocol->mutate(request, *key, request->key, request->key_len, invert ? -value : value, defval, defval_used, exptime);
+@@ -676,7 +676,7 @@ static void php_mmc_numeric(INTERNAL_FUN
+ }
+
+ if (deleted) {
+- pool->protocol->delete(request, request->key, request->key_len, value);
++ pool->protocol->delete(request, request->key, request->key_len, exptime);
+ }
+ else {
+ pool->protocol->mutate(request, keys, request->key, request->key_len, invert ? -value : value, defval, defval_used, exptime);
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec
index fd0ec66..2bf01a1 100644
--- a/php-pecl-memcache.spec
+++ b/php-pecl-memcache.spec
@@ -2,7 +2,7 @@
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}
%global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1)
-%define pecl_name memcache
+%global pecl_name memcache
Summary: Extension to work with the Memcached caching daemon
Name: php-pecl-memcache
@@ -15,6 +15,9 @@ URL: http://pecl.php.net/package/%{pecl_name}
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Source2: xml2changelog
+# http://pecl.php.net/bugs/bug.php?id=17566
+# http://svn.php.net/viewvc?view=revision&revision=300434
+Patch1: memcache-17566.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: php-devel >= 4.3.11, php-pear, zlib-devel
@@ -41,7 +44,9 @@ Memcache can be used as a PHP session handler.
%prep
%setup -c -q
-%{_bindir}/php -n %{SOURCE2} package.xml >CHANGELOG
+%{_bindir}/php -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 5
+
+%patch1 -p0 -b .17566
# avoid spurious-executable-perm
find . -type f -exec chmod -x {} \;
@@ -104,6 +109,15 @@ EOF
%{__install} -m 644 ../package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+%check
+cd %{pecl_name}-%{version}
+# simple module load test
+%{_bindir}/php --no-php-ini \
+ --define extension_dir=modules \
+ --define extension=%{pecl_name}.so \
+ --modules | grep %{pecl_name}
+
+
%clean
%{__rm} -rf %{buildroot}
@@ -132,6 +146,10 @@ fi
%changelog
+* Thu Sep 30 2010 Remi Collet <Fedora at FamilleCollet.com> 3.0.4-4
+- patch for bug #599305 (upstream #17566)
+- add minimal load test in %%check
+
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the scm-commits
mailing list