summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO3
-rw-r--r--REFLECTION9
-rw-r--r--memcached-build.patch41
-rw-r--r--memcached-upstream.patch254
-rw-r--r--php-pecl-memcached.spec124
5 files changed, 370 insertions, 61 deletions
diff --git a/PHPINFO b/PHPINFO
index 0142ac7..116427c 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,7 +3,8 @@ memcached
memcached support => enabled
Version => 3.2.0
-libmemcached-awesome version => 1.1.1
+libmemcached-awesome headers version => 1.1.2
+libmemcached-awesome library version => 1.1.4
SASL support => yes
Session support => yes
igbinary support => yes
diff --git a/REFLECTION b/REFLECTION
index a0f2315..e3efdf0 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
+Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
- Dependencies {
Dependency [ session (Required) ]
@@ -95,7 +95,7 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
Class [ <internal:memcached> class Memcached ] {
- Constants [146] {
- Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781313 }
+ Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781314 }
Constant [ public int OPT_COMPRESSION ] { -1001 }
Constant [ public int OPT_COMPRESSION_TYPE ] { -1004 }
Constant [ public int OPT_PREFIX_KEY ] { -1002 }
@@ -833,8 +833,8 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
- Properties [4] {
Property [ protected $message = '' ]
Property [ protected $code = 0 ]
- Property [ protected $file = NULL ]
- Property [ protected $line = NULL ]
+ Property [ protected string $file = '' ]
+ Property [ protected int $line = 0 ]
}
- Methods [10] {
@@ -851,6 +851,7 @@ Extension [ <persistent> extension #113 memcached version 3.2.0 ] {
- Parameters [0] {
}
+ - Tentative return [ void ]
}
Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
diff --git a/memcached-build.patch b/memcached-build.patch
new file mode 100644
index 0000000..2ce2cba
--- /dev/null
+++ b/memcached-build.patch
@@ -0,0 +1,41 @@
+Adapted for 3.7.0 from:
+
+From d226ee7d45538a853160d6e2264a56c121700775 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 30 Jan 2024 09:44:48 +0100
+Subject: [PATCH] Fix incompatible pointer types
+
+---
+ php_memcached.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/php_memcached.c b/php_memcached.c
+index 00d5e3d4..c3ef16e8 100644
+--- a/php_memcached.c
++++ b/php_memcached.c
+@@ -899,10 +899,11 @@ zend_bool s_compress_value (php_memc_com
+
+ case COMPRESSION_TYPE_ZLIB:
+ {
+- compressed_size = buffer_size;
+- int status = compress((Bytef *) buffer, &compressed_size, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
++ unsigned long cs = compressed_size = buffer_size;
++ int status = compress((Bytef *) buffer, &cs, (Bytef *) ZSTR_VAL(payload), ZSTR_LEN(payload));
+
+ if (status == Z_OK) {
++ compressed_size = cs;
+ compress_status = 1;
+ compression_type_flag = MEMC_VAL_COMPRESSION_ZLIB;
+ }
+@@ -3633,7 +3634,10 @@ zend_string *s_decompress_value (const c
+ decompress_status = ((length = fastlz_decompress(payload, payload_len, &buffer->val, buffer->len)) > 0);
+ }
+ else if (is_zlib) {
+- decompress_status = (uncompress((Bytef *) buffer->val, &buffer->len, (Bytef *)payload, payload_len) == Z_OK);
++ unsigned long ds = buffer->len;
++
++ decompress_status = (uncompress((Bytef *) buffer->val, &ds, (Bytef *)payload, payload_len) == Z_OK);
++ buffer->len = ds;
+ }
+
+ ZSTR_VAL(buffer)[stored_length] = '\0';
diff --git a/memcached-upstream.patch b/memcached-upstream.patch
new file mode 100644
index 0000000..302c007
--- /dev/null
+++ b/memcached-upstream.patch
@@ -0,0 +1,254 @@
+From 1f22de74379208d9758ba99a9bd7373eefeb48f2 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 28 Mar 2022 08:09:29 +0200
+Subject: [PATCH 1/3] fix #513 skip test with old and dead libmemcached
+
+---
+ tests/memcachedserver.phpt | 1 -
+ tests/memcachedserver6.phpt | 3 +++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/memcachedserver.phpt b/tests/memcachedserver.phpt
+index 7b058d7..407fcf9 100644
+--- a/tests/memcachedserver.phpt
++++ b/tests/memcachedserver.phpt
+@@ -8,7 +8,6 @@ if (!extension_loaded("memcached")) {
+ if (!class_exists("MemcachedServer")) {
+ die("skip memcached not built with libmemcachedprotocol support\n");
+ }
+-
+ if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x1001000) {
+ die("skip needs at least libmemcached 1.1.0\n");
+ }
+diff --git a/tests/memcachedserver6.phpt b/tests/memcachedserver6.phpt
+index a2277b4..3d02b24 100644
+--- a/tests/memcachedserver6.phpt
++++ b/tests/memcachedserver6.phpt
+@@ -8,6 +8,9 @@ if (!extension_loaded("memcached")) {
+ if (!class_exists("MemcachedServer")) {
+ die("skip memcached not built with libmemcachedprotocol support\n");
+ }
++if (Memcached::LIBMEMCACHED_VERSION_HEX < 0x1001000) {
++ die("skip needs at least libmemcached 1.1.0\n");
++}
+ ?>
+ --FILE--
+ <?php
+--
+2.35.3
+
+From fc388e65e7ceab9e6d52bc77b6306f71db981873 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 3 Jun 2022 16:56:00 +0200
+Subject: [PATCH 2/3] fix ${var} deprecation
+
+---
+ tests/touch_binary.phpt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/touch_binary.phpt b/tests/touch_binary.phpt
+index 382c177..059ec74 100644
+--- a/tests/touch_binary.phpt
++++ b/tests/touch_binary.phpt
+@@ -28,12 +28,12 @@ function status_print ($op, $mem, $expected)
+ $code = $mem->getResultcode();
+
+ if ($code == $expected)
+- echo "${op} status code as expected" . PHP_EOL;
++ echo "{$op} status code as expected" . PHP_EOL;
+ else {
+ $expected = resolve_to_constant ($expected);
+ $code = resolve_to_constant ($code);
+
+- echo "${op} status code mismatch, expected ${expected} but got ${code}" . PHP_EOL;
++ echo "{$op} status code mismatch, expected {$expected} but got {$code}" . PHP_EOL;
+ }
+ }
+
+--
+2.35.3
+
+From ce2dfa5e649e01e4b4df925ebaef95ca75a3f353 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 28 Jul 2022 09:28:33 +0200
+Subject: [PATCH 3/3] mark password as a sensitive param for 8.2 (#516)
+
+* mark password as a sensitive param for 8.2
+---
+ php_memcached.c | 7 +++----
+ php_memcached.stub.php | 6 +++---
+ php_memcached_arginfo.h | 37 +++++++++++++++++++++++++++++-----
+ php_memcached_legacy_arginfo.h | 30 ++++++++++++++++++++++-----
+ 4 files changed, 63 insertions(+), 17 deletions(-)
+
+diff --git a/php_memcached.c b/php_memcached.c
+index 73deaf6..7ccc9b5 100644
+--- a/php_memcached.c
++++ b/php_memcached.c
+@@ -3898,6 +3898,7 @@ PHP_METHOD(MemcachedServer, on)
+ #if PHP_VERSION_ID < 80000
+ #include "php_memcached_legacy_arginfo.h"
+ #else
++#include "zend_attributes.h"
+ #include "php_memcached_arginfo.h"
+ #endif
+
+@@ -4254,8 +4255,7 @@ PHP_MINIT_FUNCTION(memcached)
+
+ le_memc = zend_register_list_destructors_ex(NULL, php_memc_dtor, "Memcached persistent connection", module_number);
+
+- INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
+- memcached_ce = zend_register_internal_class(&ce);
++ memcached_ce = register_class_Memcached();
+ memcached_ce->create_object = php_memc_object_new;
+
+ #ifdef HAVE_MEMCACHED_PROTOCOL
+@@ -4264,8 +4264,7 @@ PHP_MINIT_FUNCTION(memcached)
+ memcached_server_object_handlers.clone_obj = NULL;
+ memcached_server_object_handlers.free_obj = php_memc_server_free_storage;
+
+- INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
+- memcached_server_ce = zend_register_internal_class(&ce);
++ memcached_server_ce = register_class_MemcachedServer();
+ memcached_server_ce->create_object = php_memc_server_new;
+ #endif
+
+diff --git a/php_memcached.stub.php b/php_memcached.stub.php
+index 819186f..a44b180 100644
+--- a/php_memcached.stub.php
++++ b/php_memcached.stub.php
+@@ -3,9 +3,9 @@
+ /**
+ * @generate-function-entries
+ * @generate-legacy-arginfo
++ * @generate-class-entries
+ */
+
+-
+ class Memcached {
+
+ public function __construct(?string $persistent_id=null, ?callable $callback=null, ?string $connection_str=null) {}
+@@ -75,7 +75,7 @@ class Memcached {
+ public function setOptions(array $options): bool {}
+ public function setBucket(array $host_map, ?array $forward_map, int $replicas): bool {}
+ #ifdef HAVE_MEMCACHED_SASL
+- public function setSaslAuthData(string $username, string $password): bool {}
++ public function setSaslAuthData(string $username, #[\SensitiveParameter] string $password): bool {}
+ #endif
+
+ #ifdef HAVE_MEMCACHED_SET_ENCODING_KEY
+@@ -86,7 +86,7 @@ class Memcached {
+ public function checkKey(string $key): bool {}
+ }
+
+-#ifdef HAVE_MEMCACHED_PROTOCOL
++#if defined(HAVE_MEMCACHED_PROTOCOL)
+ class MemcachedServer {
+
+ public function run(string $address): bool {}
+diff --git a/php_memcached_arginfo.h b/php_memcached_arginfo.h
+index 3373624..3108e39 100644
+--- a/php_memcached_arginfo.h
++++ b/php_memcached_arginfo.h
+@@ -1,5 +1,5 @@
+ /* This is a generated file, edit the .stub.php file instead.
+- * Stub hash: 3f4694d4e1f3d1647a832acd8539b056b2ab5e7a */
++ * Stub hash: 0964c9bfee903e59b63e5a16bd8b6611d827b151 */
+
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, persistent_id, IS_STRING, 1, "null")
+@@ -406,12 +406,39 @@ static const zend_function_entry class_Memcached_methods[] = {
+ };
+
+
+-static const zend_function_entry class_MemcachedServer_methods[] = {
+ #if defined(HAVE_MEMCACHED_PROTOCOL)
++static const zend_function_entry class_MemcachedServer_methods[] = {
+ ZEND_ME(MemcachedServer, run, arginfo_class_MemcachedServer_run, ZEND_ACC_PUBLIC)
+-#endif
+-#if defined(HAVE_MEMCACHED_PROTOCOL)
+ ZEND_ME(MemcachedServer, on, arginfo_class_MemcachedServer_on, ZEND_ACC_PUBLIC)
+-#endif
+ ZEND_FE_END
+ };
++#endif
++
++static zend_class_entry *register_class_Memcached(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++#if (PHP_VERSION_ID >= 80200)
++
++#if defined(HAVE_MEMCACHED_SASL)
++
++ zend_add_parameter_attribute(zend_hash_str_find_ptr(&class_entry->function_table, "setsaslauthdata", sizeof("setsaslauthdata") - 1), 1, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
++#endif
++#endif
++
++ return class_entry;
++}
++
++#if defined(HAVE_MEMCACHED_PROTOCOL)
++static zend_class_entry *register_class_MemcachedServer(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++
++ return class_entry;
++}
++#endif
+diff --git a/php_memcached_legacy_arginfo.h b/php_memcached_legacy_arginfo.h
+index ad6d656..6bb8e2d 100644
+--- a/php_memcached_legacy_arginfo.h
++++ b/php_memcached_legacy_arginfo.h
+@@ -1,5 +1,5 @@
+ /* This is a generated file, edit the .stub.php file instead.
+- * Stub hash: 3f4694d4e1f3d1647a832acd8539b056b2ab5e7a */
++ * Stub hash: 0964c9bfee903e59b63e5a16bd8b6611d827b151 */
+
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Memcached___construct, 0, 0, 0)
+ ZEND_ARG_INFO(0, persistent_id)
+@@ -402,12 +402,32 @@ static const zend_function_entry class_Memcached_methods[] = {
+ };
+
+
+-static const zend_function_entry class_MemcachedServer_methods[] = {
+ #if defined(HAVE_MEMCACHED_PROTOCOL)
++static const zend_function_entry class_MemcachedServer_methods[] = {
+ ZEND_ME(MemcachedServer, run, arginfo_class_MemcachedServer_run, ZEND_ACC_PUBLIC)
+-#endif
+-#if defined(HAVE_MEMCACHED_PROTOCOL)
+ ZEND_ME(MemcachedServer, on, arginfo_class_MemcachedServer_on, ZEND_ACC_PUBLIC)
+-#endif
+ ZEND_FE_END
+ };
++#endif
++
++static zend_class_entry *register_class_Memcached(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "Memcached", class_Memcached_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++
++ return class_entry;
++}
++
++#if defined(HAVE_MEMCACHED_PROTOCOL)
++static zend_class_entry *register_class_MemcachedServer(void)
++{
++ zend_class_entry ce, *class_entry;
++
++ INIT_CLASS_ENTRY(ce, "MemcachedServer", class_MemcachedServer_methods);
++ class_entry = zend_register_internal_class_ex(&ce, NULL);
++
++ return class_entry;
++}
++#endif
+--
+2.35.3
+
diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec
index d4a7425..6d01272 100644
--- a/php-pecl-memcached.spec
+++ b/php-pecl-memcached.spec
@@ -3,16 +3,13 @@
#
# Fedora spec file for php-pecl-memcached
#
-# Copyright (c) 2009-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2009-2024 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-memcached
@@ -35,26 +32,32 @@
# upstream use dev => alpha => beta => RC
# make RPM happy DEV => alpha => beta => rc
#global upstream_lower rc2
+%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global _configure ../%{sources}/configure
Summary: Extension to work with the Memcached caching daemon
-Name: %{?sub_prefix}php-pecl-memcached
+Name: %{?scl_prefix}php-pecl-memcached
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: PHP
+Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Source0: https://pecl.php.net/get/%{sources}.tgz
+
+# upstream patch for PHP 8.2
+Patch0: %{pecl_name}-upstream.patch
+Patch1: %{pecl_name}-build.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
%if %{with igbinary}
-BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel
+BuildRequires: %{?scl_prefix}php-pecl-igbinary-devel
%endif
%if %{with msgpack}
-BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel
+BuildRequires: %{?scl_prefix}php-pecl-msgpack-devel
%endif
BuildRequires: zlib-devel
BuildRequires: cyrus-sasl-devel
@@ -83,23 +86,18 @@ Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
%if %{with igbinary}
-Requires: %{?sub_prefix}php-igbinary%{?_isa}
+Requires: %{?scl_prefix}php-igbinary%{?_isa}
%endif
%if %{with msgpack}
-Requires: %{?sub_prefix}php-msgpack%{?_isa}
+Requires: %{?scl_prefix}php-msgpack%{?_isa}
%endif
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
# Other third party repo stuff
Obsoletes: php53-pecl-%{pecl_name} <= %{version}
Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
@@ -126,12 +124,6 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
%endif
%if %{move_to_opt}
@@ -155,14 +147,16 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
+%patch -P0 -p1 -b .up
+%patch -P1 -p1 -b .pr555
+
%if %{with fastlz}
rm -r fastlz
sed -e '/name=.fastlz/d' -i ../package.xml
@@ -198,10 +192,11 @@ extension=%{pecl_name}.so
EOF
# default options with description from upstream
-cat NTS/memcached.ini >>%{ini_name}
+cat %{sources}/memcached.ini >>%{ini_name}
+mkdir NTS
%if %{with_zts}
-cp -r NTS ZTS
+mkdir ZTS
%endif
@@ -232,15 +227,16 @@ peclconf() {
%endif
--with-php-config=$1
}
-cd NTS
-%{_bindir}/phpize
-peclconf %{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+peclconf %{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-peclconf %{_bindir}/zts-php-config
+peclconf %{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -265,7 +261,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Documentation
-cd NTS
+cd %{sources}
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -292,12 +288,6 @@ fi
%check
-%if "%{php_version}" < "7.3"
-# ::1:50770 vs [::1]:%s
-rm ?TS/tests/memcachedserver6.phpt
-%endif
-
-
OPT="-n"
[ -f %{php_extdir}/igbinary.so ] && OPT="$OPT -d extension=igbinary.so"
[ -f %{php_extdir}/json.so ] && OPT="$OPT -d extension=json.so"
@@ -306,45 +296,45 @@ OPT="-n"
: Minimal load test for NTS extension
%{__php} $OPT \
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} $OPT \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
%endif
%if %{with tests}
+cd %{sources}
ret=0
+%if "%{php_version}" < "7.3"
+# ::1:50770 vs [::1]:%s
+rm tests/memcachedserver6.phpt
+%endif
+
: Launch the Memcached service
port=$(%{__php} -r 'echo 10000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
memcached -p $port -U $port -d -P $PWD/memcached.pid
-sed -e "s/11211/$port/" -i ?TS/tests/*
+sed -e "s/11211/$port/" -i tests/*
: Port for MemcachedServer
port=$(%{__php} -r 'echo 11000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};')
-sed -e "s/3434/$port/" -i ?TS/tests/*
+sed -e "s/3434/$port/" -i tests/*
: Run the upstream test Suite for NTS extension
-pushd NTS
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php -x --show-diff || ret=1
-popd
+%{__php} -n run-tests.php -q -x --show-diff || ret=1
%if %{with_zts}
: Run the upstream test Suite for ZTS extension
-pushd ZTS
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/modules/%{pecl_name}.so" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="$OPT -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -x --show-diff || ret=1
-popd
+%{__ztsphp} -n run-tests.php -q -x --show-diff || ret=1
%endif
# Cleanup
@@ -358,7 +348,7 @@ exit $ret
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -372,6 +362,28 @@ exit $ret
%changelog
+* Tue Jan 30 2024 Remi Collet <remi@remirepo.net> - 3.2.0-9
+- fix incompatible pointer types using patch from
+ https://github.com/php-memcached-dev/php-memcached/pull/555
+
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.2.0-7
+- rebuild for PHP 8.3.0RC1
+
+* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 3.2.0-6
+- build out of sources tree
+
+* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 3.2.0-5
+- rebuild for PHP 8.2 with msgpack and igbinary
+
+* Thu Sep 1 2022 Remi Collet <remi@remirepo.net> - 3.2.0-4
+- rebuild for PHP 8.2.0RC1
+
+* Thu Jul 28 2022 Remi Collet <remi@remirepo.net> - 3.2.0-3
+- more upstream patches for PHP 8.2
+
+* Fri Jun 3 2022 Remi Collet <remi@remirepo.net> - 3.2.0-2
+- add upstream patches for PHP 8.2
+
* Thu Mar 24 2022 Remi Collet <remi@remirepo.net> - 3.2.0-1
- update to 3.2.0