summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-09-23 09:53:47 +0200
committerRemi Collet <fedora@famillecollet.com>2012-09-23 09:53:47 +0200
commit654d2ec6d3e0a7b515ef7a4b7aa5b3557b877523 (patch)
treea029a0582e897413c3009db9f71891809ce15c7c
parentec83cdb0d50b656a8f317bd2366a4e48642070b4 (diff)
php-pecl-memcache: update to 3.0.7
-rw-r--r--memcache-php54.patch51
-rw-r--r--php-pecl-memcache-3.0.6-fdcast.patch17
-rw-r--r--php-pecl-memcache.spec33
3 files changed, 20 insertions, 81 deletions
diff --git a/memcache-php54.patch b/memcache-php54.patch
deleted file mode 100644
index be9f200..0000000
--- a/memcache-php54.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff -up memcache-3.0.6/memcache.c.orig memcache-3.0.6/memcache.c
---- memcache-3.0.6/memcache.c.orig 2011-11-13 10:54:04.230073555 +0100
-+++ memcache-3.0.6/memcache.c 2011-11-13 10:55:41.867315825 +0100
-@@ -718,7 +718,11 @@ mmc_t *mmc_find_persistent(const char *h
- mmc_server_free(mmc TSRMLS_CC);
- mmc = NULL;
- } else {
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
-+ zend_list_insert(mmc, le_memcache_server TSRMLS_CC);
-+#else
- zend_list_insert(mmc, le_memcache_server);
-+#endif
- }
- }
- else if (le->type != le_memcache_server || le->ptr == NULL) {
-@@ -735,7 +739,11 @@ mmc_t *mmc_find_persistent(const char *h
- mmc = NULL;
- }
- else {
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
-+ zend_list_insert(mmc, le_memcache_server TSRMLS_CC);
-+#else
- zend_list_insert(mmc, le_memcache_server);
-+#endif
- }
- }
- else {
-@@ -775,7 +783,11 @@ static mmc_t *php_mmc_pool_addserver(
- if (zend_hash_find(Z_OBJPROP_P(mmc_object), "connection", sizeof("connection"), (void **)&connection) == FAILURE) {
- pool = mmc_pool_new(TSRMLS_C);
- pool->failure_callback = &php_mmc_failure_callback;
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
-+ list_id = zend_list_insert(pool, le_memcache_pool TSRMLS_CC);
-+#else
- list_id = zend_list_insert(pool, le_memcache_pool);
-+#endif
- add_property_resource(mmc_object, "connection", list_id);
- }
- else {
-@@ -836,7 +848,11 @@ static void php_mmc_connect(INTERNAL_FUN
- int list_id;
- mmc_pool_t *pool = mmc_pool_new(TSRMLS_C);
- pool->failure_callback = &php_mmc_failure_callback;
-+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 3) || (PHP_MAJOR_VERSION > 5)
-+ list_id = zend_list_insert(pool, le_memcache_pool TSRMLS_CC);
-+#else
- list_id = zend_list_insert(pool, le_memcache_pool);
-+#endif
- mmc_object = return_value;
- object_init_ex(mmc_object, memcache_ce);
- add_property_resource(mmc_object, "connection", list_id);
diff --git a/php-pecl-memcache-3.0.6-fdcast.patch b/php-pecl-memcache-3.0.6-fdcast.patch
deleted file mode 100644
index 50d3021..0000000
--- a/php-pecl-memcache-3.0.6-fdcast.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Fix php_stream_cast() usage.
-
---- memcache-3.0.6/memcache_pool.c.fdcast 2011-04-11 05:56:53.000000000 +0100
-+++ memcache-3.0.6/memcache_pool.c 2012-07-05 15:27:02.447511095 +0100
-@@ -746,9 +746,9 @@ static int mmc_server_connect(mmc_pool_t
- }
-
- /* check connection and extract socket for select() purposes */
-- void *fd;
-+ int fd;
-
-- if (!io->stream || php_stream_cast(io->stream, PHP_STREAM_AS_FD_FOR_SELECT, &fd, 1) != SUCCESS) {
-+ if (!io->stream || php_stream_cast(io->stream, PHP_STREAM_AS_FD_FOR_SELECT, (void **)&fd, 1) != SUCCESS) {
- mmc_server_seterror(mmc, errstr != NULL ? errstr : "Connection failed", errnum);
- mmc_server_deactivate(pool, mmc TSRMLS_CC);
-
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec
index a717b3c..94e7ae5 100644
--- a/php-pecl-memcache.spec
+++ b/php-pecl-memcache.spec
@@ -4,23 +4,22 @@
Summary: Extension to work with the Memcached caching daemon
Name: php-pecl-memcache
-Version: 3.0.6
-Release: 5%{?dist}
+Version: 3.0.7
+Release: 1%{?dist}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Source2: xml2changelog
+# https://bugs.php.net/63141
Source3: LICENSE
-# https://bugs.php.net/60284
-Patch0: memcache-php54.patch
-Patch1: php-pecl-memcache-3.0.6-fdcast.patch
+# https://bugs.php.net/63142
Patch2: php-pecl-memcache-3.0.5-get-mem-corrupt.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: php-devel >= 4.3.11, php-pear, zlib-devel
+BuildRequires: php-devel php-pear, zlib-devel
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
@@ -37,7 +36,6 @@ Obsoletes: php53u-pecl-memcache
Obsoletes: php54-pecl-memcache
%endif
-
# Filter private shared
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%{?filter_setup}
@@ -57,10 +55,16 @@ Memcache can be used as a PHP session handler.
%prep
%setup -c -q
-%patch0 -p0 -b .php54
-pushd memcache-%{version}
-%patch1 -p1 -b .fdcast
+pushd %{pecl_name}-%{version}
%patch2 -p1 -b .get-mem-corrupt.patch
+
+# Chech version as upstream often forget to update this
+extver=$(sed -n '/#define PHP_MEMCACHE_VERSION/{s/.* "//;s/".*$//;p}' php_memcache.h)
+if test "x${extver}" != "x%{version}"; then
+ : Error: Upstream version is now ${extver}, expecting %{version}.
+ : Update the pdover macro and rebuild.
+ exit 1
+fi
popd
%{__php} -n %{SOURCE2} package.xml | tee CHANGELOG | head -n 5
@@ -72,6 +76,7 @@ cat >%{pecl_name}.ini << 'EOF'
extension=%{pecl_name}.so
; ----- Options for the %{pecl_name} module
+; see http://www.php.net/manual/en/memcache.ini.php
; Whether to transparently failover to other servers on errors
;memcache.allow_failover=1
@@ -104,9 +109,6 @@ extension=%{pecl_name}.so
;session.save_path="tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
EOF
-# avoid spurious-executable-perm
-find . -type f -exec chmod -x {} \;
-
cp -r %{pecl_name}-%{version} %{pecl_name}-%{version}-zts
@@ -178,6 +180,11 @@ fi
%changelog
+* Sun Sep 23 2012 Remi Collet <remi@fedoraproject.org> - 3.0.7-1
+- update to 3.0.7
+- drop patches merged upstream
+- cleanup spec
+
* Sat Sep 8 2012 Remi Collet <remi@fedoraproject.org> - 3.0.6-5
- add LICENSE
- Obsoletes php53*, php54* on EL