[packages/memcached] Up to 1.6.40
arekm
arekm at pld-linux.org
Sat Mar 14 20:28:49 CET 2026
commit b864ebb56ee3e058dcc7a50fb042341dff575ef9
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Mar 14 20:20:58 2026 +0100
Up to 1.6.40
memcached-testapp-redzone.patch | 80 +++++++++++++++++++++++++++++++++++++++++
memcached.spec | 10 +++---
2 files changed, 86 insertions(+), 4 deletions(-)
---
diff --git a/memcached.spec b/memcached.spec
index ef3404f..1c0028d 100644
--- a/memcached.spec
+++ b/memcached.spec
@@ -11,15 +11,16 @@
Summary: A high-performance, distributed memory object caching system
Summary(pl.UTF-8): Rozproszony, wysokiej wydajności system cache'owania obiektów
Name: memcached
-Version: 1.5.20
-Release: 2
+Version: 1.6.40
+Release: 1
License: BSD
Group: Networking/Daemons
-Source0: http://www.memcached.org/files/%{name}-%{version}.tar.gz
-# Source0-md5: 4b64296ea0eeccdee9168c035e0488ab
+Source0: https://www.memcached.org/files/%{name}-%{version}.tar.gz
+# Source0-md5: 9b3b63e2e99182ecb158724ba040ddb4
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.tmpfiles
+Patch0: %{name}-testapp-redzone.patch
URL: https://memcached.org/about
BuildRequires: autoconf
BuildRequires: automake
@@ -57,6 +58,7 @@ require access to the memcached binary include files.
%prep
%setup -q
+%patch -P0 -p1
sed -nie '1,/^$/p' ChangeLog
diff --git a/memcached-testapp-redzone.patch b/memcached-testapp-redzone.patch
new file mode 100644
index 0000000..68d55eb
--- /dev/null
+++ b/memcached-testapp-redzone.patch
@@ -0,0 +1,80 @@
+Preserve RPM release flags while keeping testapp cache redzone checks.
+
+--- memcached-1.6.40/Makefile.am.orig
++++ memcached-1.6.40/Makefile.am
+@@ -3,6 +3,7 @@
+ noinst_PROGRAMS = memcached-debug sizes testapp timedrun
+
+ BUILT_SOURCES=
++testapp_CPPFLAGS = -DCACHE_REDZONE_TESTING
+
+ testapp_SOURCES = testapp.c util.c util.h stats_prefix.c stats_prefix.h jenkins_hash.c murmur3_hash.c hash.h cache.c crc32c.c
+
+--- memcached-1.6.40/cache.c.orig
++++ memcached-1.6.40/cache.c
+@@ -4,31 +4,35 @@
+ #include <inttypes.h>
+ #include <assert.h>
+
+-#ifndef NDEBUG
++#if !defined(NDEBUG) || defined(CACHE_REDZONE_TESTING)
+ #include <signal.h>
+ #endif
+
+ #include "cache.h"
+
+-#ifndef NDEBUG
++#if !defined(NDEBUG) || defined(CACHE_REDZONE_TESTING)
++#define CACHE_REDZONE_ENABLED 1
++#endif
++
++#ifdef CACHE_REDZONE_ENABLED
+ const uint64_t redzone_pattern = 0xdeadbeefcafedeed;
+ int cache_error = 0;
+ #endif
+
+ cache_t* cache_create(const char *name, size_t bufsize, size_t align) {
+ cache_t* ret = calloc(1, sizeof(cache_t));
+ char* nm = strdup(name);
+ if (ret == NULL || nm == NULL ||
+ pthread_mutex_init(&ret->mutex, NULL) == -1) {
+ free(ret);
+ free(nm);
+ return NULL;
+ }
+
+ ret->name = nm;
+ STAILQ_INIT(&ret->head);
+
+-#ifndef NDEBUG
++#ifdef CACHE_REDZONE_ENABLED
+ ret->bufsize = bufsize + 2 * sizeof(redzone_pattern);
+ #else
+ ret->bufsize = bufsize;
+@@ -45,7 +49,7 @@
+ }
+
+ static inline void* get_object(void *ptr) {
+-#ifndef NDEBUG
++#ifdef CACHE_REDZONE_ENABLED
+ uint64_t *pre = ptr;
+ return pre + 1;
+ #else
+@@ -94,7 +98,7 @@
+ object = NULL;
+ }
+
+-#ifndef NDEBUG
++#ifdef CACHE_REDZONE_ENABLED
+ if (object != NULL) {
+ /* add a simple form of buffer-check */
+ uint64_t *pre = ret;
+@@ -114,7 +118,7 @@
+ }
+
+ void do_cache_free(cache_t *cache, void *ptr) {
+-#ifndef NDEBUG
++#ifdef CACHE_REDZONE_ENABLED
+ /* validate redzone... */
+ if (memcmp(((char*)ptr) + cache->bufsize - (2 * sizeof(redzone_pattern)),
+ &redzone_pattern, sizeof(redzone_pattern)) != 0) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/memcached.git/commitdiff/b864ebb56ee3e058dcc7a50fb042341dff575ef9
More information about the pld-cvs-commit
mailing list