summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-04 18:00:06 +0200
committerRemi Collet <remi@php.net>2024-10-04 18:00:06 +0200
commit622e54e0b2b664b27534b4c94ad4edea5d28572c (patch)
treebbf8fc508812b7498d6d78c6f267aab887317b97
parent1d38a06a4793fed16af1757765843faa2132cd93 (diff)
update to 3.3.0RC1HEADmaster
enable zstd compression support
-rw-r--r--PHPINFO8
-rw-r--r--REFLECTION20
-rw-r--r--memcached-build.patch41
-rw-r--r--memcached-upstream.patch254
-rw-r--r--php-pecl-memcached.spec97
5 files changed, 43 insertions, 377 deletions
diff --git a/PHPINFO b/PHPINFO
index 116427c..89ed0a2 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,14 +2,14 @@
memcached
memcached support => enabled
-Version => 3.2.0
-libmemcached-awesome headers version => 1.1.2
-libmemcached-awesome library version => 1.1.4
+Version => 3.3.0RC1
+libmemcached-awesome version => 1.1.4
SASL support => yes
Session support => yes
igbinary support => yes
json support => yes
msgpack support => yes
+zstd support => yes
Directive => Local Value => Master Value
memcached.sess_locking => On => On
@@ -33,9 +33,11 @@ memcached.sess_lock_wait => not set => not set
memcached.sess_lock_max_wait => not set => not set
memcached.compression_type => fastlz => fastlz
memcached.compression_factor => 1.3 => 1.3
+memcached.compression_level => 3 => 3
memcached.compression_threshold => 2000 => 2000
memcached.serializer => igbinary => igbinary
memcached.store_retry_count => 0 => 0
+memcached.item_size_limit => 0 => 0
memcached.default_consistent_hash => Off => Off
memcached.default_binary_protocol => Off => Off
memcached.default_connect_timeout => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index e3efdf0..80a5679 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
+Extension [ <persistent> extension #112 memcached version 3.3.0RC1 ] {
- Dependencies {
Dependency [ session (Required) ]
@@ -71,6 +71,9 @@ Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
Entry [ memcached.compression_factor <ALL> ]
Current = '1.3'
}
+ Entry [ memcached.compression_level <ALL> ]
+ Current = '3'
+ }
Entry [ memcached.compression_threshold <ALL> ]
Current = '2000'
}
@@ -80,6 +83,9 @@ Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
Entry [ memcached.store_retry_count <ALL> ]
Current = '0'
}
+ Entry [ memcached.item_size_limit <ALL> ]
+ Current = '0'
+ }
Entry [ memcached.default_consistent_hash <ALL> ]
Current = '0'
}
@@ -94,15 +100,18 @@ Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
- Classes [3] {
Class [ <internal:memcached> class Memcached ] {
- - Constants [146] {
- Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781314 }
+ - Constants [150] {
+ Constant [ public int LIBMEMCACHED_VERSION_HEX ] { 16781316 }
Constant [ public int OPT_COMPRESSION ] { -1001 }
Constant [ public int OPT_COMPRESSION_TYPE ] { -1004 }
+ Constant [ public int OPT_COMPRESSION_LEVEL ] { -1007 }
Constant [ public int OPT_PREFIX_KEY ] { -1002 }
Constant [ public int OPT_SERIALIZER ] { -1003 }
Constant [ public int OPT_USER_FLAGS ] { -1006 }
Constant [ public int OPT_STORE_RETRY_COUNT ] { -1005 }
+ Constant [ public int OPT_ITEM_SIZE_LIMIT ] { -1008 }
Constant [ public bool HAVE_IGBINARY ] { 1 }
+ Constant [ public bool HAVE_ZSTD ] { 1 }
Constant [ public bool HAVE_JSON ] { 1 }
Constant [ public bool HAVE_MSGPACK ] { 1 }
Constant [ public bool HAVE_ENCODING ] { 1 }
@@ -207,6 +216,7 @@ Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
Constant [ public int SERIALIZER_MSGPACK ] { 5 }
Constant [ public int COMPRESSION_FASTLZ ] { 2 }
Constant [ public int COMPRESSION_ZLIB ] { 1 }
+ Constant [ public int COMPRESSION_ZSTD ] { 3 }
Constant [ public int GET_PRESERVE_ORDER ] { 1 }
Constant [ public int GET_EXTENDED ] { 2 }
Constant [ public int ON_CONNECT ] { 0 }
@@ -413,7 +423,7 @@ Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
Method [ <internal:memcached> public method cas ] {
- Parameters [4] {
- Parameter #0 [ <required> string $cas_token ]
+ Parameter #0 [ <required> string|int|float $cas_token ]
Parameter #1 [ <required> string $key ]
Parameter #2 [ <required> mixed $value ]
Parameter #3 [ <optional> int $expiration = 0 ]
@@ -424,7 +434,7 @@ Extension [ <persistent> extension #72 memcached version 3.2.0 ] {
Method [ <internal:memcached> public method casByKey ] {
- Parameters [5] {
- Parameter #0 [ <required> string $cas_token ]
+ Parameter #0 [ <required> string|int|float $cas_token ]
Parameter #1 [ <required> string $server_key ]
Parameter #2 [ <required> string $key ]
Parameter #3 [ <required> mixed $value ]
diff --git a/memcached-build.patch b/memcached-build.patch
deleted file mode 100644
index 2ce2cba..0000000
--- a/memcached-build.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-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
deleted file mode 100644
index 302c007..0000000
--- a/memcached-upstream.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-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 6d01272..d31bf78 100644
--- a/php-pecl-memcached.spec
+++ b/php-pecl-memcached.spec
@@ -18,6 +18,7 @@
%endif
%bcond_without fastlz
+%bcond_without zstd
%bcond_without igbinary
%bcond_without msgpack
%bcond_without tests
@@ -27,11 +28,11 @@
# After 40-igbinary, 40-json, 40-msgpack
%global ini_name 50-%{pecl_name}.ini
-%global upstream_version 3.2.0
-#global upstream_prever RC2
+%global upstream_version 3.3.0
+%global upstream_prever RC1
# upstream use dev => alpha => beta => RC
# make RPM happy DEV => alpha => beta => rc
-#global upstream_lower rc2
+%global upstream_lower %(echo %{upstream_prever} | tr '[:upper:]' '[:lower:]')
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
@@ -39,16 +40,12 @@
Summary: Extension to work with the Memcached caching daemon
Name: %{?scl_prefix}php-pecl-memcached
Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
-Release: 9%{?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;')}}
License: PHP-3.01
URL: https://pecl.php.net/package/%{pecl_name}
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
@@ -64,6 +61,9 @@ BuildRequires: cyrus-sasl-devel
%if %{with fastlz}
BuildRequires: fastlz-devel
%endif
+%if %{with zstd}
+BuildRequires: libzstd-devel
+%endif
%if %{with tests}
BuildRequires: memcached
%endif
@@ -97,35 +97,6 @@ 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 "%{?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}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
%if %{move_to_opt}
%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$}
%endif
@@ -150,13 +121,10 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
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
@@ -225,19 +193,24 @@ peclconf() {
%if %{with fastlz}
--with-system-fastlz \
%endif
+%if %{with zstd}
+ --with-zstd \
+%endif
--with-php-config=$1
}
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
peclconf %{__phpconfig}
-make %{?_smp_mflags}
+%make_build
%if %{with_zts}
cd ../ZTS
peclconf %{__ztsphpconfig}
-make %{?_smp_mflags}
+%make_build
%endif
@@ -245,7 +218,7 @@ make %{?_smp_mflags}
%{?dtsenable}
# Install the NTS extension
-make install -C NTS INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
# Drop in the bit of configuration
# rename to z-memcached to be load after msgpack
@@ -256,7 +229,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# Install the ZTS extension
%if %{with_zts}
-make install -C ZTS INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -267,26 +240,6 @@ do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%check
OPT="-n"
[ -f %{php_extdir}/igbinary.so ] && OPT="$OPT -d extension=igbinary.so"
@@ -329,14 +282,6 @@ TEST_PHP_ARGS="$OPT -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q -x --show-diff || ret=1
-%if %{with_zts}
-: Run the upstream test Suite for ZTS extension
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="$OPT -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q -x --show-diff || ret=1
-%endif
-
# Cleanup
if [ -f memcached.pid ]; then
kill $(cat memcached.pid)
@@ -348,7 +293,7 @@ exit $ret
%files
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -362,6 +307,10 @@ exit $ret
%changelog
+* Fri Oct 4 2024 Remi Collet <remi@remirepo.net> - 3.3.0~RC1-1
+- update to 3.3.0RC1
+- enable zstd compression support
+
* 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