Update to latest major version and simplify pledge(1) patch a bit.
 Comments ? Ok ?
  Cheers
   Giovanni
Index: Makefile
===================================================================
RCS file: /var/cvs/ports/misc/memcached/Makefile,v
retrieving revision 1.38
diff -u -p -r1.38 Makefile
--- Makefile    17 Jul 2017 08:35:08 -0000      1.38
+++ Makefile    19 Oct 2017 06:33:27 -0000
@@ -2,7 +2,7 @@
 
 COMMENT=       distributed memory object caching system
 
-DISTNAME=      memcached-1.4.39
+DISTNAME=      memcached-1.5.2
 CATEGORIES=    misc
 
 HOMEPAGE=      http://www.memcached.org/
Index: distinfo
===================================================================
RCS file: /var/cvs/ports/misc/memcached/distinfo,v
retrieving revision 1.24
diff -u -p -r1.24 distinfo
--- distinfo    17 Jul 2017 08:35:08 -0000      1.24
+++ distinfo    19 Oct 2017 06:33:33 -0000
@@ -1,2 +1,2 @@
-SHA256 (memcached-1.4.39.tar.gz) = I8S/fHh+T9mnsKe2Gz/8s3TuhvnMALqJLOU+7ECv1zU=
-SIZE (memcached-1.4.39.tar.gz) = 403751
+SHA256 (memcached-1.5.2.tar.gz) = mskxE7210DfnnGEnc4ZWSsLl4x1J5ZTxHlVOTBSbckU=
+SIZE (memcached-1.5.2.tar.gz) = 407715
Index: patches/patch-configure
===================================================================
RCS file: /var/cvs/ports/misc/memcached/patches/patch-configure,v
retrieving revision 1.9
diff -u -p -r1.9 patch-configure
--- patches/patch-configure     20 Jun 2017 19:52:26 -0000      1.9
+++ patches/patch-configure     30 Aug 2017 15:33:33 -0000
@@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.9 2017/06/
 Index: configure
 --- configure.orig
 +++ configure
-@@ -6432,7 +6432,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+@@ -6517,7 +6517,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
  elif test "$GCC" = "yes"
  then
    GCC_VERSION=`$CC -dumpversion`
Index: patches/patch-memcached_c
===================================================================
RCS file: /var/cvs/ports/misc/memcached/patches/patch-memcached_c,v
retrieving revision 1.13
diff -u -p -r1.13 patch-memcached_c
--- patches/patch-memcached_c   17 Jul 2017 08:35:08 -0000      1.13
+++ patches/patch-memcached_c   30 Aug 2017 15:33:24 -0000
@@ -10,36 +10,22 @@ Index: memcached.c
  
  /* some POSIX systems need the following definition
   * to get mlockall flags out of sys/mman.h.  */
-@@ -6733,6 +6734,32 @@ int main (int argc, char **argv) {
+@@ -6861,6 +6862,18 @@ int main (int argc, char **argv) {
  
      if (pid_file != NULL) {
          save_pid(pid_file);
 +    }
 +
 +    if (settings.socketpath != NULL) {
-+        if (pid_file != NULL) {
-+           if (pledge("stdio cpath unix", NULL) == -1) {
-+              fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+              exit(1);
-+           }
-+        } else {
 +           if (pledge("stdio unix", NULL) == -1) {
 +              fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
 +              exit(1);
 +           }
-+        }
 +    } else {
-+        if (pid_file != NULL) {
-+           if (pledge("stdio cpath inet", NULL) == -1) {
-+              fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
-+              exit(1);
-+           }
-+        } else {
 +           if (pledge("stdio inet", NULL) == -1) {
 +              fprintf(stderr, "%s: pledge: %s\n", argv[0], strerror(errno));
 +              exit(1);
 +           }
-+        }
      }
  
      /* Drop privileges no longer needed */

Attachment: signature.asc
Description: PGP signature



Reply via email to