diff options
-rw-r--r-- | memcached.spec | 10 | ||||
-rw-r--r-- | upstream.patch | 52 |
2 files changed, 60 insertions, 2 deletions
diff --git a/memcached.spec b/memcached.spec index 221f354..2db0780 100644 --- a/memcached.spec +++ b/memcached.spec @@ -33,10 +33,9 @@ %global selinuxmodulever 1.0.2 %global selinuxmoduledir %{selinuxmodulename}-selinux-%{selinuxmodulever} - Name: memcached Version: 1.6.32 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 0 Summary: High Performance, Distributed Memory Object Cache @@ -54,6 +53,8 @@ Source4: memcached.service Patch1: memcached-unit.patch # honors system CFLAGS for bundled libraries (lua, mcmc) Patch2: memcached-build.patch +# Upstream +Patch3: upstream.patch BuildRequires: gcc BuildRequires: pkgconfig(libevent) >= 2 @@ -129,6 +130,7 @@ access to the memcached binary include files. %if %{with proxy} %patch -P2 -p0 -b .fixbuild sed -e 's:@CFLAGS@:%{build_cflags}:' -i vendor/Makefile +%patch -P3 -p1 -b .up %endif @@ -281,6 +283,10 @@ exit 0 %changelog +* Fri Nov 15 2024 Remi Collet <remi@remirepo.net> - 1.6.32-2 +- test build for upstream patch fixing build failure on EL-10 + https://github.com/memcached/memcached/issues/1186 + * Mon Oct 21 2024 Remi Collet <remi@remirepo.net> - 1.6.32-1 - update to 1.6.32 (2024-10-20) diff --git a/upstream.patch b/upstream.patch new file mode 100644 index 0000000..6cac41c --- /dev/null +++ b/upstream.patch @@ -0,0 +1,52 @@ +From 08b00579fd9d2abd5d5116bbda27f8eceaba6038 Mon Sep 17 00:00:00 2001 +From: dormando <dormando@rydia.net> +Date: Thu, 14 Nov 2024 10:04:12 -0800 +Subject: [PATCH] proxy: fix compilation issue on beta RHEL/GCC + +Apparently _rotl no-go as a function name. no idea why but we generally +use the mcp_ and _mcp namespace anyway. + +Fixes #1186 +--- + proxy_lua.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/proxy_lua.c b/proxy_lua.c +index 8a579d7ab..4309f0167 100644 +--- a/proxy_lua.c ++++ b/proxy_lua.c +@@ -1409,13 +1409,13 @@ static int mcplib_log_req(lua_State *L) { + return 0; + } + +-static inline uint32_t _rotl(const uint32_t x, int k) { ++static inline uint32_t _mcp_rotl(const uint32_t x, int k) { + return (x << k) | (x >> (32 - k)); + } + + // xoroshiro128++ 32bit version. +-static uint32_t _nextrand(uint32_t *s) { +- const uint32_t result = _rotl(s[0] + s[3], 7) + s[0]; ++static uint32_t _mcp_nextrand(uint32_t *s) { ++ const uint32_t result = _mcp_rotl(s[0] + s[3], 7) + s[0]; + + const uint32_t t = s[1] << 9; + +@@ -1426,7 +1426,7 @@ static uint32_t _nextrand(uint32_t *s) { + + s[2] ^= t; + +- s[3] = _rotl(s[3], 11); ++ s[3] = _mcp_rotl(s[3], 11); + + return result; + } +@@ -1474,7 +1474,7 @@ static int mcplib_log_reqsample(lua_State *L) { + } else if (rate > 0) { + // slightly biased random-to-rate without adding a loop, which is + // completely fine for this use case. +- uint32_t rnd = (uint64_t)_nextrand(t->proxy_rng) * (uint64_t)rate >> 32; ++ uint32_t rnd = (uint64_t)_mcp_nextrand(t->proxy_rng) * (uint64_t)rate >> 32; + if (rnd == 0) { + do_log = true; + } |