summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-03-25 08:03:43 +0100
committerRemi Collet <remi@remirepo.net>2019-03-25 08:03:43 +0100
commita3fe39a3668b1284c343da6191146a001082782f (patch)
treedc6a703d12e0aed004d9aa52b479b5d0f2b27ed6
parent7a8f4193836a81b31c51eb69cc4eaa22a62c2836 (diff)
update to 4.0.3
drop patches merged upstream open https://github.com/websupport-sk/pecl-memcache/pull/48 version
-rw-r--r--40.patch24
-rw-r--r--45.patch114
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-memcache.spec25
5 files changed, 14 insertions, 153 deletions
diff --git a/40.patch b/40.patch
deleted file mode 100644
index 678ad3e..0000000
--- a/40.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 315cf20acea252da86b1e3524dd2a018cb6e5dae Mon Sep 17 00:00:00 2001
-From: Jan Ehrhardt <github@ehrhardt.nl>
-Date: Tue, 12 Mar 2019 09:06:52 +0100
-Subject: [PATCH] readd this for php < 7.2
-
-Remaining part of https://github.com/websupport-sk/pecl-memcache/pull/30
----
- php7/memcache_pool.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/php7/memcache_pool.c b/php7/memcache_pool.c
-index 5bea3e1..ffeb744 100644
---- a/php7/memcache_pool.c
-+++ b/php7/memcache_pool.c
-@@ -44,6 +44,9 @@ ZEND_DECLARE_MODULE_GLOBALS(memcache)
- MMC_POOL_INLINE void mmc_buffer_alloc(mmc_buffer_t *buffer, unsigned int size) /*
- ensures space for an additional size bytes {{{ */
- {
-+#if PHP_VERSION_ID < 70200
-+ register size_t newlen;
-+#endif
- smart_string_alloc((&(buffer->value)), size, 0);
- }
- /* }}} */
diff --git a/45.patch b/45.patch
deleted file mode 100644
index 3e7e196..0000000
--- a/45.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From fd0cc8c9b0171a36116917332acc9f479e45ec81 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 19 Mar 2019 11:12:37 +0100
-Subject: [PATCH] allow to work with standard session.save_path option and
- session_save_path function
-
----
- php7/memcache_session.c | 8 +++--
- tests/036b.phpt | 70 +++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 76 insertions(+), 2 deletions(-)
- create mode 100644 tests/036b.phpt
-
-diff --git a/php7/memcache_session.c b/php7/memcache_session.c
-index 7807942..4cc356d 100644
---- a/php7/memcache_session.c
-+++ b/php7/memcache_session.c
-@@ -56,7 +56,12 @@ PS_OPEN_FUNC(memcache)
- zval params, *param;
- int i, j, path_len;
-
-- char *path = MEMCACHE_G(session_save_path);
-+ const char *path = MEMCACHE_G(session_save_path);
-+ if (!path) {
-+ /* allow to work with standard session.save_path option
-+ and session_save_path function */
-+ path = save_path;
-+ }
- if (!path) {
- PS_SET_MOD_DATA(NULL);
- return FAILURE;
-@@ -98,7 +103,6 @@ PS_OPEN_FUNC(memcache)
- if (!url) {
- php_error_docref(NULL, E_WARNING,
- "Failed to parse memcache.save_path (error at offset %d, url was '%s')", i, path);
-- efree(path);
-
- mmc_pool_free(pool);
- PS_SET_MOD_DATA(NULL);
-diff --git a/tests/036b.phpt b/tests/036b.phpt
-new file mode 100644
-index 0000000..858807a
---- /dev/null
-+++ b/tests/036b.phpt
-@@ -0,0 +1,70 @@
-+--TEST--
-+ini_set('session.save_path')
-+--SKIPIF--
-+<?php include 'connect.inc'; if (!MEMCACHE_HAVE_SESSION) print 'skip not compiled with session support'; ?>
-+--FILE--
-+<?php
-+
-+include 'connect.inc';
-+
-+$session_save_path = "tcp://$host:$port?persistent=1&udp_port=0&weight=2&timeout=2&retry_interval=10,tcp://$host2:$port2";
-+ini_set('session.save_handler', 'memcache');
-+session_save_path($session_save_path);
-+
-+
-+$result1 = session_start();
-+$id = session_id();
-+
-+$_SESSION['_test_key'] = 'Test';
-+
-+$result2 = $memcache->get($id);
-+session_write_close();
-+$result3 = $memcache->get($id);
-+
-+// Test destroy
-+$result4 = session_start();
-+$result5 = session_destroy();
-+$result6 = $memcache->get($id);
-+
-+// Test large session
-+$session_save_path = "tcp://$host:$port";
-+session_save_path($session_save_path);
-+
-+session_start();
-+$largeval = str_repeat('a', 1024*2048);
-+$_SESSION['_test_key']= $largeval;
-+session_write_close();
-+
-+// test large cookie lifetime
-+ini_set('session.gc_maxlifetime', 1209600);
-+$result7 = session_start();
-+$id = session_id();
-+$_SESSION['_test_key'] = 'Test';
-+$result8 = $memcache->get($id);
-+session_write_close();
-+$result9 = $memcache->get($id);
-+
-+
-+var_dump($result1);
-+var_dump($id);
-+var_dump($result2);
-+var_dump($result3);
-+var_dump($result4);
-+var_dump($result5);
-+var_dump($result6);
-+var_dump($result7);
-+var_dump($result8);
-+var_dump($result9);
-+
-+?>
-+--EXPECTF--
-+bool(true)
-+string(%d) "%s"
-+bool(false)
-+string(%d) "%s"
-+bool(true)
-+bool(true)
-+bool(false)
-+bool(true)
-+string(%d) "%s"
-+string(%d) "%s"
diff --git a/PHPINFO b/PHPINFO
index 1e53c44..9539aa1 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
memcache
memcache support => enabled
-Version => 4.0.2
+Version => 4.0.3
Revision => $Revision$
Directive => Local Value => Master Value
diff --git a/REFLECTION b/REFLECTION
index d71f371..be06843 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #118 memcache version 4.0.2 ] {
+Extension [ <persistent> extension #118 memcache version 4.0.3 ] {
- INI {
Entry [ memcache.allow_failover <ALL> ]
diff --git a/php-pecl-memcache.spec b/php-pecl-memcache.spec
index 7a76e47..da90dc8 100644
--- a/php-pecl-memcache.spec
+++ b/php-pecl-memcache.spec
@@ -12,7 +12,7 @@
%endif
# https://github.com/websupport-sk/pecl-memcache/commits/NON_BLOCKING_IO_php7
-%global gh_commit ddda96f7bfa0f0bba9ffb6974215ced8a1b80010
+%global gh_commit f8bd3e76fcdf5c5599b24f83d176d108ab12925a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner websupport-sk
%global gh_project pecl-memcache
@@ -30,19 +30,16 @@
Summary: Extension to work with the Memcached caching daemon
Name: %{?scl_prefix}php-pecl-memcache
-Version: 4.0.2
+Version: 4.0.3
%if 0%{?prever:1}
-Release: 0.13.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
License: PHP
URL: http://pecl.php.net/package/%{pecl_name}
-Patch0: https://patch-diff.githubusercontent.com/raw/websupport-sk/pecl-memcache/pull/40.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/websupport-sk/pecl-memcache/pull/45.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -137,11 +134,11 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
pushd NTS
-%patch0 -p1 -b .gh40
-%patch1 -p1 -b .gh45
-
# Chech version as upstream often forget to update this
dir=php$(%{__php} -r 'echo PHP_MAJOR_VERSION;')
+
+sed -e 's/4.0.2/%{version}/' -i $dir/php_memcache.h
+
extver=$(sed -n '/#define PHP_MEMCACHE_VERSION/{s/.* "//;s/".*$//;p}' $dir/php_memcache.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
: Error: Upstream version is now ${extver}, expecting %{version}%{?prever:-%{prever}}
@@ -264,9 +261,6 @@ cd NTS
sed -e "s:/var/run/memcached/memcached.sock:$PWD/memcached.sock:" \
-i tests/connect.inc
-: Udp tests
-rm tests/0{35,40,44,53}.phpt tests/bug73539.phpt
-
: Launch the daemons
memcached -p 11211 -U 11211 -d -P $PWD/memcached1.pid
memcached -p 11212 -U 11212 -d -P $PWD/memcached2.pid
@@ -324,6 +318,11 @@ fi
%changelog
+* Mon Mar 25 2019 Remi Collet <remi@remirepo.net> - 4.0.3-1
+- update to 4.0.3
+- drop patches merged upstream
+- open https://github.com/websupport-sk/pecl-memcache/pull/48 version
+
* Tue Mar 19 2019 Remi Collet <remi@remirepo.net> - 4.0.2-2
- update to 4.0.2 from https://github.com/websupport-sk/pecl-memcache
- add patch for PHP < 7.2 from