pkgsrc-Changes archive

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

CVS commit: pkgsrc/editors/nvi



Module Name:    pkgsrc
Committed By:   fhajny
Date:           Tue Apr  4 07:53:23 UTC 2017

Modified Files:
        pkgsrc/editors/nvi: Makefile distinfo
        pkgsrc/editors/nvi/patches: patch-common_msg.c
Added Files:
        pkgsrc/editors/nvi/patches: patch-cl_funcs__termh.c
            patch-cl_screen__termh.c

Log Message:
Fix an issue with editor segfaulting in ex mode on Darwin and suppress benign stderr output regarding locale. Reported in joyent/pkgsrc/issues/402, patch provided by @bjcooke in 
joyent/pkgsrc/pull/463. Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 pkgsrc/editors/nvi/Makefile
cvs rdiff -u -r1.22 -r1.23 pkgsrc/editors/nvi/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/editors/nvi/patches/patch-cl_funcs__termh.c \
    pkgsrc/editors/nvi/patches/patch-cl_screen__termh.c
cvs rdiff -u -r1.1 -r1.2 pkgsrc/editors/nvi/patches/patch-common_msg.c

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

Modified files:

Index: pkgsrc/editors/nvi/Makefile
diff -u pkgsrc/editors/nvi/Makefile:1.49 pkgsrc/editors/nvi/Makefile:1.50
--- pkgsrc/editors/nvi/Makefile:1.49    Mon Sep  7 12:02:05 2015
+++ pkgsrc/editors/nvi/Makefile Tue Apr  4 07:53:23 2017
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2015/09/07 12:02:05 jperkin Exp $
+# $NetBSD: Makefile,v 1.50 2017/04/04 07:53:23 fhajny Exp $
 
 DISTNAME=      nvi-1.81.6
-PKGREVISION=   10
+PKGREVISION=   11
 CATEGORIES=    editors
 MASTER_SITES=  ${HOMEPAGE:Q}
 EXTRACT_SUFX=  .tar.bz2

Index: pkgsrc/editors/nvi/distinfo
diff -u pkgsrc/editors/nvi/distinfo:1.22 pkgsrc/editors/nvi/distinfo:1.23
--- pkgsrc/editors/nvi/distinfo:1.22    Tue Nov  3 03:32:19 2015
+++ pkgsrc/editors/nvi/distinfo Tue Apr  4 07:53:23 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2015/11/03 03:32:19 agc Exp $
+$NetBSD: distinfo,v 1.23 2017/04/04 07:53:23 fhajny Exp $
 
 SHA1 (nvi-1.81.6.tar.bz2) = d3445ed69166102735335a2ff60d092d9a9143c6
 RMD160 (nvi-1.81.6.tar.bz2) = 0db8568bea96392d9a027044177c60317c8ade36
@@ -34,9 +34,11 @@ SHA1 (patch-ba) = 57edce2dafc630d7e948a5
 SHA1 (patch-bb) = 5110c239cd1cc82cdd1eaeba6ceedb11ee797b26
 SHA1 (patch-bc) = 6ac8377ae6f2fc513c058c0bf7f5ad18e97141a8
 SHA1 (patch-bd) = 9a04f7a247fe6bf800469e81f7a83ffddd45b4b5
+SHA1 (patch-cl_funcs__termh.c) = 27a974bf865c8006c6929fa20fde44a4cf53182b
+SHA1 (patch-cl_screen__termh.c) = 55d9214a0e1cd740a065ae58defee6f0fa4d4204
 SHA1 (patch-common_conv.c) = efb2dabf226523a493fc1172013adc8021f4c2b9
 SHA1 (patch-common_key.h) = 29f8b89b41b087ff7c2e9a5483fb9e6d2291c750
-SHA1 (patch-common_msg.c) = 73c6e8df0d5c85f4fee1316ea65de9da1876340b
+SHA1 (patch-common_msg.c) = b1c7662b195a7438a73bffee86ab2b10f7fe1487
 SHA1 (patch-dist_Makefile.am) = ebae821ce659df003f5f2043f754e325c0863aff
 SHA1 (patch-dist_config.h.in) = 21568929b165d1e774e59d6c648e0af7b17760da
 SHA1 (patch-dist_configure.in) = c7b70b1a93889f41d949a3ede034f30abc063b7b

Index: pkgsrc/editors/nvi/patches/patch-common_msg.c
diff -u pkgsrc/editors/nvi/patches/patch-common_msg.c:1.1 pkgsrc/editors/nvi/patches/patch-common_msg.c:1.2
--- pkgsrc/editors/nvi/patches/patch-common_msg.c:1.1   Mon May 11 08:43:44 2015
+++ pkgsrc/editors/nvi/patches/patch-common_msg.c       Tue Apr  4 07:53:23 2017
@@ -1,14 +1,70 @@
-$NetBSD: patch-common_msg.c,v 1.1 2015/05/11 08:43:44 enami Exp $
+$NetBSD: patch-common_msg.c,v 1.2 2017/04/04 07:53:23 fhajny Exp $
 
---- common/msg.c.orig  2007-11-18 16:41:42.000000000 +0000
+--- common/msg.c.orig  2017-04-03 15:17:07.396452540 +0000
 +++ common/msg.c
-@@ -640,7 +640,8 @@ msgq_status(SCR *sp, db_recno_t lno, u_i
-                       p += len;
-               } else {
-                       t = msg_cat(sp, "027|line %lu of %lu [%ld%%]", &len);
--                      (void)sprintf(p, t, lno, last, (lno * 100) / last);
-+                      (void)sprintf(p, t, (u_long)lno, (u_long)last,
-+                          (long)((lno * 100) / last));
-                       p += strlen(p);
-               }
-       } else {
+@@ -716,7 +716,7 @@ msg_open(SCR *sp, char *file)
+       DB *db;
+       DBT data, key;
+       db_recno_t msgno;
+-      char *p, *t, buf[MAXPATHLEN];
++      char *p, *p2, *t, buf[MAXPATHLEN];
+ 
+       if ((p = strrchr(file, '/')) != NULL && p[1] == '\0' &&
+           (((t = getenv("LC_MESSAGES")) != NULL && t[0] != '\0') ||
+@@ -725,16 +725,15 @@ msg_open(SCR *sp, char *file)
+               p = buf;
+       } else
+               p = file;
+-      if ((sp->db_error = db_create(&db, 0, 0)) != 0 ||
+-          (sp->db_error = db->set_re_source(db, p)) != 0 ||
+-          (sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0) {
+-              if (first) {
+-                      first = 0;
+-                      return (1);
+-              }
+-              msgq_str(sp, M_DBERR, p, "%s");
+-              return (1);
+-      }
++
++      p2 = "%s";
++      if ((sp->db_error = db_create(&db, 0, 0)) == 0 &&
++          (sp->db_error = db->set_re_source(db, p)) == 0) {
++              db->set_errcall(db, 0);
++              if ((sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0)
++                      goto err;
++      } else
++              goto err;
+ 
+       /*
+        * Test record 1 for the magic string.  The msgq call is here so
+@@ -750,13 +749,8 @@ msg_open(SCR *sp, char *file)
+           data.size != sizeof(VMC) - 1 ||
+           memcmp(data.data, VMC, sizeof(VMC) - 1)) {
+               (void)db->close(db, DB_NOSYNC);
+-              if (first) {
+-                      first = 0;
+-                      return (1);
+-              }
+-              msgq_str(sp, M_DBERR, p,
+-                  "030|The file %s is not a message catalog");
+-              return (1);
++              p2 = "030|The file %s is not a message catalog";
++              goto err;
+       }
+       first = 0;
+ 
+@@ -764,6 +758,14 @@ msg_open(SCR *sp, char *file)
+               (void)sp->gp->msg->close(sp->gp->msg, DB_NOSYNC);
+       sp->gp->msg = db;
+       return (0);
++
++err:
++      if (first) {
++              first = 0;
++              return (1);
++      }
++      msgq_str(sp, M_DBERR, p, p2);
++      return (1);
+ }
+ 
+ /*

Added files:

Index: pkgsrc/editors/nvi/patches/patch-cl_funcs__termh.c
diff -u /dev/null pkgsrc/editors/nvi/patches/patch-cl_funcs__termh.c:1.1
--- /dev/null   Tue Apr  4 07:53:23 2017
+++ pkgsrc/editors/nvi/patches/patch-cl_funcs__termh.c  Tue Apr  4 07:53:23 2017
@@ -0,0 +1,20 @@
+$NetBSD: patch-cl_funcs__termh.c,v 1.1 2017/04/04 07:53:23 fhajny Exp $
+
+-  Suppress compile time warning on Linux and prevent segfault on Darwin when
+ run as nex.
+-  Original patch was found in release 13 of nvi 1.81.6 for debian under the
+ name 19include_term_h.patch.
+
+##From: <hesso%pool.math.tu-berlin.de@localhost>
+##Subject: Add <term.h> to the include list to suppress a few warnings.
+
+--- cl/cl_funcs.c.orig 2007-11-18 17:41:42.000000000 +0100
++++ cl/cl_funcs.c      2008-05-01 18:23:08.000000000 +0200
+@@ -18,6 +18,7 @@
+ #include <sys/time.h>
+ 
+ #include <bitstring.h>
++#include <term.h>
+ #include <ctype.h>
+ #include <signal.h>
+ #include <stdio.h>
Index: pkgsrc/editors/nvi/patches/patch-cl_screen__termh.c
diff -u /dev/null pkgsrc/editors/nvi/patches/patch-cl_screen__termh.c:1.1
--- /dev/null   Tue Apr  4 07:53:23 2017
+++ pkgsrc/editors/nvi/patches/patch-cl_screen__termh.c Tue Apr  4 07:53:23 2017
@@ -0,0 +1,20 @@
+$NetBSD: patch-cl_screen__termh.c,v 1.1 2017/04/04 07:53:23 fhajny Exp $
+
+-  Suppress compile time warning on Linux and prevent segfault on Darwin when
+ run as nex.
+-  Original patch was found in release 13 of nvi 1.81.6 for debian under the
+ name 19include_term_h.patch. 
+
+##From: <hesso%pool.math.tu-berlin.de@localhost>
+##Subject: Add <term.h> to the include list to suppress a few warnings.
+
+--- cl/cl_screen.c.orig        2007-11-18 17:41:42.000000000 +0100
++++ cl/cl_screen.c     2008-05-01 18:23:02.000000000 +0200
+@@ -17,6 +17,7 @@
+ #include <sys/queue.h>
+ 
+ #include <bitstring.h>
++#include <term.h>
+ #include <errno.h>
+ #include <signal.h>
+ #include <stdio.h>



Home | Main Index | Thread Index | Old Index