Hello community,

here is the log from the commit of package memcached for openSUSE:Factory 
checked in at 2020-09-08 22:43:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/memcached (Old)
 and      /work/SRC/openSUSE:Factory/.memcached.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "memcached"

Tue Sep  8 22:43:27 2020 rev:48 rq:831922 version:1.6.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/memcached/memcached.changes      2020-06-11 
14:47:51.837935184 +0200
+++ /work/SRC/openSUSE:Factory/.memcached.new.3399/memcached.changes    
2020-09-08 22:43:36.219407562 +0200
@@ -1,0 +2,6 @@
+Tue Sep  1 19:24:14 UTC 2020 - Callum Farmer <callumjfarme...@gmail.com>
+
+- Add use-signal-function-instead-of-sigignore.patch: sigignore
+  causes deprecation errors(gh#memcached/memcached#691)
+
+-------------------------------------------------------------------

New:
----
  use-signal-function-instead-of-sigignore.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ memcached.spec ++++++
--- /var/tmp/diff_new_pack.J4kqOA/_old  2020-09-08 22:43:39.947409376 +0200
+++ /var/tmp/diff_new_pack.J4kqOA/_new  2020-09-08 22:43:39.951409379 +0200
@@ -39,6 +39,8 @@
 Source2:        %{name}.sysconfig
 Source3:        memcached-rpmlintrc
 Source4:        memcached.service
+# PATCH-FIX-UPSTREAM gh#memcached/memcached#691
+Patch:          use-signal-function-instead-of-sigignore.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  cyrus-sasl-devel
@@ -88,6 +90,7 @@
 
 %prep
 %setup -q
+%patch -p1
 
 %build
 autoreconf -fi

++++++ use-signal-function-instead-of-sigignore.patch ++++++
>From c6821a866e50754181bcf14533e3d4c31be36b79 Mon Sep 17 00:00:00 2001
From: Tomas Korbar <tkor...@redhat.com>
Date: Mon, 29 Jun 2020 08:56:09 +0200
Subject: [PATCH] Use signal function instead of sigignore

Sigignore has been marked as deprecated on Fedora rawhide and
signal function is used already on multiple places in memcached.c

fix #690
---
 configure.ac |  5 ++---
 memcached.c  | 16 ++--------------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index ffc98b24e..a7be211e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -630,7 +630,6 @@ AC_CHECK_FUNCS(mlockall)
 AC_CHECK_FUNCS(getpagesizes)
 AC_CHECK_FUNCS(sysconf)
 AC_CHECK_FUNCS(memcntl)
-AC_CHECK_FUNCS(sigignore)
 AC_CHECK_FUNCS(clock_gettime)
 AC_CHECK_FUNCS(preadv)
 AC_CHECK_FUNCS(pread)
@@ -779,7 +778,7 @@ if test "$ICC" = "yes"
 then
    dnl ICC trying to be gcc.
    CFLAGS="$CFLAGS -diag-disable 187 -Wall -Werror"
-   AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
+   AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
 elif test "$GCC" = "yes"
 then
   GCC_VERSION=`$CC -dumpversion`
@@ -792,7 +791,7 @@ then
     CFLAGS="$CFLAGS -fno-strict-aliasing"
     ;;
   esac
-  AC_DEFINE([_GNU_SOURCE],[1],[find sigignore on Linux])
+  AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
 elif test "$SUNCC" = "yes"
 then
   CFLAGS="$CFLAGS -errfmt=error -errwarn -errshort=tags"
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);
     }

Reply via email to