pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/daemontools-encore



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Thu Jan 23 16:49:59 UTC 2020

Modified Files:
        pkgsrc/sysutils/daemontools-encore: Makefile distinfo
Added Files:
        pkgsrc/sysutils/daemontools-encore/patches: patch-sleeper.c

Log Message:
Apply upstream patch to fix self-tests on NetBSD 8 and 9, FreeBSD 12,
and OpenBSD 6.6. Self-tests continue to pass on macOS, Debian, and
Devuan. (Some test failures remain on CentOS and Tribblix.) Bump
PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/daemontools-encore/Makefile \
    pkgsrc/sysutils/daemontools-encore/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/daemontools-encore/patches/patch-sleeper.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/daemontools-encore/Makefile
diff -u pkgsrc/sysutils/daemontools-encore/Makefile:1.1 pkgsrc/sysutils/daemontools-encore/Makefile:1.2
--- pkgsrc/sysutils/daemontools-encore/Makefile:1.1     Tue Jan 21 21:54:25 2020
+++ pkgsrc/sysutils/daemontools-encore/Makefile Thu Jan 23 16:49:59 2020
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2020/01/21 21:54:25 schmonz Exp $
+# $NetBSD: Makefile,v 1.2 2020/01/23 16:49:59 schmonz Exp $
 
 DISTNAME=              daemontools-encore-1.11
+PKGREVISION=           1
 CATEGORIES=            sysutils
 MASTER_SITES=          ${HOMEPAGE}
 
Index: pkgsrc/sysutils/daemontools-encore/distinfo
diff -u pkgsrc/sysutils/daemontools-encore/distinfo:1.1 pkgsrc/sysutils/daemontools-encore/distinfo:1.2
--- pkgsrc/sysutils/daemontools-encore/distinfo:1.1     Wed Jan 22 01:26:16 2020
+++ pkgsrc/sysutils/daemontools-encore/distinfo Thu Jan 23 16:49:59 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2020/01/22 01:26:16 schmonz Exp $
+$NetBSD: distinfo,v 1.2 2020/01/23 16:49:59 schmonz Exp $
 
 SHA1 (daemontools-encore-1.11.tar.gz) = 23f8dc5cf2d063c481b328fce523fc8a0349b693
 RMD160 (daemontools-encore-1.11.tar.gz) = 518f85f1502bf969ee60d5169642089752bd2d52
@@ -7,3 +7,4 @@ Size (daemontools-encore-1.11.tar.gz) = 
 SHA1 (patch-MAN) = 7c361a3365a43a992d7a0ccf938b79dc2a8691bc
 SHA1 (patch-Makefile) = b1bc2500071491280a02f158bf4d8ed4e0aa369e
 SHA1 (patch-rts.tests_supervise-downtime.sh) = c6415e1c0adce32e5ad57ad5457fd1be98c53958
+SHA1 (patch-sleeper.c) = cdae9837bb8a5cc268c8e86e97e03d11f8e9d32d

Added files:

Index: pkgsrc/sysutils/daemontools-encore/patches/patch-sleeper.c
diff -u /dev/null pkgsrc/sysutils/daemontools-encore/patches/patch-sleeper.c:1.1
--- /dev/null   Thu Jan 23 16:49:59 2020
+++ pkgsrc/sysutils/daemontools-encore/patches/patch-sleeper.c  Thu Jan 23 16:49:59 2020
@@ -0,0 +1,145 @@
+$NetBSD: patch-sleeper.c,v 1.1 2020/01/23 16:49:59 schmonz Exp $
+
+Apply https://github.com/bruceg/daemontools-encore/pull/54 to fix tests.
+
+--- sleeper.c.orig     2018-10-14 00:48:50.000000000 +0000
++++ sleeper.c
+@@ -1,39 +1,84 @@
++#include <unistd.h>
+ #include <signal.h>
++#include "ndelay.h"
++#include "strerr.h"
++#include "error.h"
+ #include "byte.h"
+ #include "sig.h"
+ #include "str.h"
+-#include <unistd.h>
++
++static int selfpipe[2];
+ 
+ static void catch_sig(int sig)
+ {
++  int ignored;
++  char c;
++
++  c = (char)sig;
++  ignored = write(selfpipe[1],&c,1);
++  (void)ignored;
++}
++
++static void show_sig(int sig)
++{
+   char buf[7+14+2] = "Caught ";
+   const char *name;
+   int ignored;
+   int i;
++
+   switch (sig) {
+-  case SIGALRM: name = "ALRM"; break;
+-  case SIGCONT: name = "CONT"; break;
+-  case SIGHUP: name = "HUP"; break;
+-  case SIGINT: name = "INT"; break;
+-  case SIGQUIT: name = "QUIT"; break;
+-  case SIGTERM: name = "TERM"; break;
+-  case SIGUSR1: name = "USR1"; break;
+-  case SIGUSR2: name = "USR2"; break;
+-  case SIGWINCH: name = "WINCH"; break;
+-  default: name = "unknown signal";
++    case SIGALRM: name = "ALRM"; break;
++    case SIGCONT: name = "CONT"; break;
++    case SIGHUP: name = "HUP"; break;
++    case SIGINT: name = "INT"; break;
++    case SIGQUIT: name = "QUIT"; break;
++    case SIGTERM: name = "TERM"; break;
++    case SIGUSR1: name = "USR1"; break;
++    case SIGUSR2: name = "USR2"; break;
++    case SIGWINCH: name = "WINCH"; break;
++    default: name = "unknown signal";
+   }
+   i = str_len(name);
+   byte_copy(buf+7,i,name);
+   i += 7;
+   buf[i++] = '\n';
+   ignored = write(1,buf,i);
+-  if (sig != SIGCONT)
+-    _exit(1);
+   (void)ignored;
+ }
+ 
++static void show_err()
++{
++  int ignored;
++
++  ignored = write(1,"invalid signal\n",15);
++  return;
++  (void)ignored;
++}
++
++static void show_one(int sig)
++{
++  show_sig(sig);
++  return;
++}
++
++static void show_two(int sig1, int sig2)
++{
++  show_sig(sig1);
++  show_sig(sig2);
++  return;
++}
++
+ int main(void)
+ {
++  int r;
++  int nc, nt, oc, ot;
++  int new_sig, old_sig=0;
++  char buf;
++
++  if (pipe(selfpipe) == -1)
++    strerr_die1sys(111,"sleeper: fatal: unable to create pipe");
++  ndelay_on(selfpipe[1]);
++
+   sig_catch(SIGALRM,catch_sig);
+   sig_catch(SIGCONT,catch_sig);
+   sig_catch(SIGHUP,catch_sig);
+@@ -43,6 +88,38 @@ int main(void)
+   sig_catch(SIGUSR1,catch_sig);
+   sig_catch(SIGUSR2,catch_sig);
+   sig_catch(SIGWINCH,catch_sig);
+-  sleep(9999);
+-  return 0;
++
++  for (;;) {
++    r = read(selfpipe[0],&buf,1);
++    if (!r) break;
++    if (r == -1) {
++      if (errno == error_intr) continue;
++      break;
++    }
++
++    new_sig = (int)buf;
++
++    nc = new_sig == SIGCONT;
++    nt = new_sig == SIGTERM;
++    oc = old_sig == SIGCONT;
++    ot = old_sig == SIGTERM;
++
++    if (!nc && !nt && !oc && !ot) {show_one(new_sig);          break;   }
++    if (!nc && !nt && !oc &&  ot) {show_two(SIGTERM, new_sig); break;   }
++    if (!nc && !nt &&  oc && !ot) {show_two(SIGCONT, new_sig); break;   }
++    if (!nc && !nt &&  oc &&  ot) {show_err();                 break;   }
++    if (!nc &&  nt && !oc && !ot) {old_sig = SIGTERM;          continue;}
++    if (!nc &&  nt && !oc &&  ot) {show_one(SIGTERM);          continue;}
++    if (!nc &&  nt &&  oc && !ot) {show_two(SIGCONT, SIGTERM); break;   }
++    if (!nc &&  nt &&  oc &&  ot) {show_err();                 break;   }
++    if ( nc && !nt && !oc && !ot) {old_sig = SIGCONT;          continue;}
++    if ( nc && !nt && !oc &&  ot) {show_two(SIGCONT, SIGTERM); break;   }
++    if ( nc && !nt &&  oc && !ot) {show_one(SIGCONT);          continue;}
++    if ( nc && !nt &&  oc &&  ot) {show_err();                 break;   }
++    if ( nc &&  nt && !oc && !ot) {show_err();                 break;   }
++    if ( nc &&  nt && !oc &&  ot) {show_err();                 break;   }
++    if ( nc &&  nt &&  oc && !ot) {show_err();                 break;   }
++    if ( nc &&  nt &&  oc &&  ot) {show_err();                 break;   }
++  }
++  _exit(0);
+ }



Home | Main Index | Thread Index | Old Index