Update to 1.6.5

This commit is contained in:
Tomas Korbar 2020-04-22 10:52:16 +02:00
parent af4cd47b9f
commit 8001a8da29
4 changed files with 7 additions and 57 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/memcached-1.6.1.tar.gz
/memcached-1.6.2.tar.gz
/memcached-1.6.3.tar.gz
/memcached-1.6.5.tar.gz

View File

@ -1,51 +0,0 @@
From c65973d08c4dffbb38ce032d00b901d0ce534c6f Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Mon, 30 Mar 2020 17:49:38 +0000
Subject: [PATCH] Fix undefined behavior when compiling with
-D_FORTIFY_SOURCE=2
When compiling with -D_FORTIFY_SOURCE=2, printf is defined as a macro,
which makes the #ifdef TLS block in the usage() function of memcached.c
undefined behavior.
This warning was caught by compiling with clang:
memcached.c:7829:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
^
memcached.c:7832:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
^
---
memcached.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/memcached.c b/memcached.c
index 2592b3f94..148a3b55a 100644
--- a/memcached.c
+++ b/memcached.c
@@ -7825,12 +7825,13 @@ static void usage(void) {
"-s, --unix-socket=<file> UNIX socket to listen on (disables network support)\n"
"-A, --enable-shutdown enable ascii \"shutdown\" command\n"
"-a, --unix-mask=<mask> access mask for UNIX socket, in octal (default: %o)\n"
- "-l, --listen=<addr> interface to listen on (default: INADDR_ANY)\n"
+ "-l, --listen=<addr> interface to listen on (default: INADDR_ANY)\n",
+ settings.port, settings.udpport, settings.access);
#ifdef TLS
- " if TLS/SSL is enabled, 'notls' prefix can be used to\n"
- " disable for specific listeners (-l notls:<ip>:<port>) \n"
+ printf(" if TLS/SSL is enabled, 'notls' prefix can be used to\n"
+ " disable for specific listeners (-l notls:<ip>:<port>) \n");
#endif
- "-d, --daemon run as a daemon\n"
+ printf("-d, --daemon run as a daemon\n"
"-r, --enable-coredumps maximize core file limit\n"
"-u, --user=<user> assume identity of <username> (only when run as root)\n"
"-m, --memory-limit=<num> item memory in megabytes (default: %lu)\n"
@@ -7846,7 +7847,7 @@ static void usage(void) {
"-P, --pidfile=<file> save PID in <file>, only used with -d option\n"
"-f, --slab-growth-factor=<num> chunk size growth factor (default: %2.2f)\n"
"-n, --slab-min-size=<bytes> min space used for key+value+flags (default: %d)\n",
- settings.port, settings.udpport, settings.access, (unsigned long) settings.maxbytes / (1 << 20),
+ (unsigned long) settings.maxbytes / (1 << 20),
settings.maxconns, settings.factor, settings.chunk_size);
verify_default("udp-port",settings.udpport == 0);
printf("-L, --enable-largepages try to use large memory pages (if available)\n");

View File

@ -11,8 +11,8 @@
%global selinuxmoduledir %{selinuxmodulename}-selinux-%{selinuxmodulever}
Name: memcached
Version: 1.6.3
Release: 2%{?dist}
Version: 1.6.5
Release: 1%{?dist}
Epoch: 0
Summary: High Performance, Distributed Memory Object Cache
@ -24,7 +24,6 @@ Source1: memcached.sysconfig
Source2: https://releases.pagure.org/memcached-selinux/memcached-selinux-1.0.2.tar.gz
Patch1: memcached-unit.patch
Patch2: memcached-1.6.3-dfortify.patch
BuildRequires: gcc libevent-devel systemd
BuildRequires: perl-generators
@ -69,7 +68,6 @@ optimised for use with this version of memcached.
# and SELinux policy sources into memcached-selinux-X.X
%setup -q -b 2
%patch1 -p1 -b .unit
%patch2 -p1 -b .dfortify
%build
%configure \
@ -175,6 +173,9 @@ fi
%license ../%{selinuxmoduledir}/COPYING
%changelog
* Wed Apr 22 2020 Tomas Korbar <tkorbar@redhat.com> - 0:1.6.5-1
- Update to 1.6.5
* Mon Apr 06 2020 Tomas Korbar <tkorbar@redhat.com> - 0:1.6.3-2
- Fix undefined behaviour on build with -D_FORTIFY_SOURCE=2
- Found by tstellar@redhat.com

View File

@ -1,2 +1 @@
SHA512 (memcached-1.6.3.tar.gz) = f51248906f59eca3025dd8b56adcd49dcacbf706f66b0fbdafeb054a213d5595a8e13dc38a365cf852d3b1058f90a981f464e24025a4f33dccd09aa579f7cbbd
SHA512 (memcached-selinux-1.0.2.tar.gz) = 7db24bbf10d002cfa5870aa0f937197c26d7b885b0652fc5c426919a4e7039274963a5677e7306e7b05927a40cecfef9054de523e273b36a4b3bee7ca27ae48c
SHA512 (memcached-1.6.5.tar.gz) = e6cc2db70bbd05dd40131ca9e0cbbc72c41d747f64b6e6e6c2e3ac2630b67fefcd5e945b2e8d57db6d0b379ba9c34d89eb2c19f20391493e4e2390d7a1616d90