Update to 1.6.14

Resolves: rhbz#2053327
This commit is contained in:
Tomas Korbar 2022-02-15 14:04:11 +01:00
parent 6cf28ae350
commit 6e5b0d6ebe
5 changed files with 8 additions and 68 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@
/memcached-1.6.10.tar.gz
/memcached-1.6.12.tar.gz
/memcached-1.6.13.tar.gz
/memcached-1.6.14.tar.gz

View File

@ -1,22 +0,0 @@
commit 8dfe2f07847a4ead1c54959de794557713bc9f79
Author: Tomas Korbar <tkorbar@redhat.com>
Date: Fri Jan 28 15:33:14 2022 +0100
Expand extbuf buffer
diff --git a/proto_bin.c b/proto_bin.c
index b61c3bb..50b3591 100644
--- a/proto_bin.c
+++ b/proto_bin.c
@@ -110,7 +110,10 @@ int try_read_command_binary(conn *c) {
// want to refactor a ton of code either. Header is only ever used out
// of c->binary_header, but the extlen stuff is used for the latter
// bytes. Just wastes 24 bytes on the stack this way.
- char extbuf[sizeof(c->binary_header) + BIN_MAX_EXTLEN+1];
+
+ // +4 need to be here because extbuf is used for protocol_binary_request_incr
+ // and its member message is alligned to 48 bytes intead of 44
+ char extbuf[sizeof(c->binary_header) + BIN_MAX_EXTLEN+4];
memcpy(extbuf + sizeof(c->binary_header), c->rcurr + sizeof(c->binary_header),
extlen > BIN_MAX_EXTLEN ? BIN_MAX_EXTLEN : extlen);
c->rbytes -= sizeof(c->binary_header) + extlen + keylen;

View File

@ -1,41 +0,0 @@
diff --git a/memcached.c b/memcached.c
index d796abb4b..dc67267c4 100644
--- a/memcached.c
+++ b/memcached.c
@@ -8400,18 +8400,6 @@ static void sig_usrhandler(const int sig) {
stop_main_loop = GRACE_STOP;
}
-#ifndef HAVE_SIGIGNORE
-static int sigignore(int sig) {
- struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 };
-
- if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) {
- return -1;
- }
- return 0;
-}
-#endif
-
-
/*
* On systems that supports multiple page sizes we may reduce the
* number of TLB-misses by using the biggest available page size
@@ -10097,7 +10085,7 @@ int main (int argc, char **argv) {
/* daemonize if requested */
/* if we want to ensure our ability to dump core, don't chdir to / */
if (do_daemonize) {
- if (sigignore(SIGHUP) == -1) {
+ if (signal(SIGHUP, SIG_IGN) == SIG_ERR) {
perror("Failed to ignore SIGHUP");
}
if (daemonize(maxcore, settings.verbose) == -1) {
@@ -10247,7 +10235,7 @@ int main (int argc, char **argv) {
* ignore SIGPIPE signals; we can use errno == EPIPE if we
* need that information
*/
- if (sigignore(SIGPIPE) == -1) {
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
perror("failed to ignore SIGPIPE; sigaction");
exit(EX_OSERR);
}

View File

@ -11,8 +11,8 @@
%global selinuxmoduledir %{selinuxmodulename}-selinux-%{selinuxmodulever}
Name: memcached
Version: 1.6.13
Release: 3%{?dist}
Version: 1.6.14
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: complete-incr-bin.patch
BuildRequires: make
BuildRequires: gcc libevent-devel systemd
@ -70,7 +69,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 .testing
%build
%configure \
@ -176,6 +174,10 @@ fi
%license ../%{selinuxmoduledir}/COPYING
%changelog
* Tue Feb 15 2022 Tomas Korbar <tkorbar@redhat.com> - 1.6.14-1
- Update to 1.6.14
- Resolves: rhbz#2053327
* Fri Jan 28 2022 Tomas Korbar <tkorbar@redhat.com> - 1.6.13-3
- Fix complete_incr_bin function
- Resolves: rhbz#2046734

View File

@ -1,2 +1,2 @@
SHA512 (memcached-1.6.13.tar.gz) = 3f3ef37f5838d8b1b8100cdb77b2226d8d29eef093bcb2c9a03f2420144aa35a5c8c1c957134eddce1fdd37a05b5ffc19058baf05dd3aad60fca12f8c81eaf1d
SHA512 (memcached-1.6.14.tar.gz) = 607b5c0d4c721c714b6e6e3fbca4845fc24103e1dfb988a2edf818b78f918eeb71b86b211e311dc2bcbc438a9a0ffcb69a3bd6694b591720ede8b5349c804740
SHA512 (memcached-selinux-1.0.2.tar.gz) = 7db24bbf10d002cfa5870aa0f937197c26d7b885b0652fc5c426919a4e7039274963a5677e7306e7b05927a40cecfef9054de523e273b36a4b3bee7ca27ae48c