pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/cvsps Pull in patches from Debian 2.1-5, mainly ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/af1fd0706328
branches:  trunk
changeset: 398434:af1fd0706328
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sun Aug 30 17:16:53 2009 +0000

description:
Pull in patches from Debian 2.1-5, mainly for the 64-bit fix. Bump
PKGREVISION.

diffstat:

 devel/cvsps/Makefile         |   4 +-
 devel/cvsps/distinfo         |   8 +++-
 devel/cvsps/patches/patch-ab |  71 +++++++++++++++++++++++++++++++++++++------
 devel/cvsps/patches/patch-ac |  55 ++++++++++++++++++++++++++++++++++
 devel/cvsps/patches/patch-ad |  26 ++++++++++++++++
 devel/cvsps/patches/patch-ae |  13 ++++++++
 devel/cvsps/patches/patch-af |  13 ++++++++
 7 files changed, 175 insertions(+), 15 deletions(-)

diffs (233 lines):

diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/Makefile
--- a/devel/cvsps/Makefile      Sun Aug 30 17:05:48 2009 +0000
+++ b/devel/cvsps/Makefile      Sun Aug 30 17:16:53 2009 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2008/10/26 23:52:11 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2009/08/30 17:16:53 schmonz Exp $
 #
 
 DISTNAME=      cvsps-2.1
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel scm
 MASTER_SITES=  ${HOMEPAGE}
 
diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/distinfo
--- a/devel/cvsps/distinfo      Sun Aug 30 17:05:48 2009 +0000
+++ b/devel/cvsps/distinfo      Sun Aug 30 17:16:53 2009 +0000
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.8 2008/02/03 15:56:57 tnn Exp $
+$NetBSD: distinfo,v 1.9 2009/08/30 17:16:53 schmonz Exp $
 
 SHA1 (cvsps-2.1.tar.gz) = a53a62b121e7b86e07a393bcb8aa4f0492a747c4
 RMD160 (cvsps-2.1.tar.gz) = a3063f638fbf1136761549658432d5842e4a766f
 Size (cvsps-2.1.tar.gz) = 61634 bytes
 SHA1 (patch-aa) = 21e93db185459d7550ab30a117c4679f6d6fa0fb
-SHA1 (patch-ab) = d990e59b00f5d83057239371162d3c246b999323
+SHA1 (patch-ab) = c9357a01388a9631ba960661183981bb31cbf53b
+SHA1 (patch-ac) = 07f6d1955c0fde42784f8891b1136f12fa5dbfa4
+SHA1 (patch-ad) = 20d84dc236a5c259677fdf68268de5bb64e6d26f
+SHA1 (patch-ae) = 345036b4021f90a2f6629a5d32e85caa786d961f
+SHA1 (patch-af) = d32eb67ede1d81ee3abe55a7f94515fcf3ea93cf
diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/patches/patch-ab
--- a/devel/cvsps/patches/patch-ab      Sun Aug 30 17:05:48 2009 +0000
+++ b/devel/cvsps/patches/patch-ab      Sun Aug 30 17:16:53 2009 +0000
@@ -1,15 +1,64 @@
-$NetBSD: patch-ab,v 1.1 2005/07/15 22:25:58 kristerw Exp $
+$NetBSD: patch-ab,v 1.2 2009/08/30 17:16:54 schmonz Exp $
 
---- cvsps.c.orig       Sat Jul 16 00:22:10 2005
-+++ cvsps.c    Sat Jul 16 00:22:40 2005
-@@ -2550,9 +2550,9 @@
+--- cvsps.c.orig       2009-08-30 13:07:32.000000000 -0400
++++ cvsps.c
+@@ -265,7 +265,8 @@ static void load_from_cvs()
+     PatchSetMember * psm = NULL;
+     char datebuff[20];
+     char authbuff[AUTH_STR_MAX];
+-    char logbuff[LOG_STR_MAX + 1];
++    int logbufflen = LOG_STR_MAX + 1;
++    char * logbuff = malloc(logbufflen);
+     int loglen = 0;
+     int have_log = 0;
+     char cmd[BUFSIZ];
+@@ -273,6 +274,12 @@ static void load_from_cvs()
+     char use_rep_buff[PATH_MAX];
+     char * ltype;
  
-     for (next = ps->members.next; next != &ps->members; next = next->next) 
++    if (logbuff == NULL)
++    {
++      debug(DEBUG_SYSERROR, "could not malloc %d bytes for logbuff in load_from_cvs", logbufflen);
++      exit(1);
++    }
++
+     if (!no_rlog && !test_log_file && cvs_check_cap(CAP_HAVE_RLOG))
      {
-+      int d1, d2;
-       PatchSetMember * psm = list_entry(next, PatchSetMember, link);
-       rev = psm->pre_rev;
--      int d1, d2;
+       ltype = "rlog";
+@@ -480,24 +487,22 @@ static void load_from_cvs()
+                */
+               if (have_log || !is_revision_metadata(buff))
+               {
+-                  /* if the log buffer is full, that's it.  
+-                   * 
+-                   * Also, read lines (fgets) always have \n in them
+-                   * which we count on.  So if truncation happens,
+-                   * be careful to put a \n on.
+-                   * 
+-                   * Buffer has LOG_STR_MAX + 1 for room for \0 if
+-                   * necessary
+-                   */
+-                  if (loglen < LOG_STR_MAX)
++                  /* If the log buffer is full, try to reallocate more. */
++                  if (loglen < logbufflen)
+                   {
+                       int len = strlen(buff);
+                       
+-                      if (len >= LOG_STR_MAX - loglen)
++                      if (len >= logbufflen - loglen)
+                       {
+-                          debug(DEBUG_APPMSG1, "WARNING: maximum log length exceeded, truncating log");
+-                          len = LOG_STR_MAX - loglen;
+-                          buff[len - 1] = '\n';
++                          debug(DEBUG_STATUS, "reallocating logbufflen to %d bytes for file %s", logbufflen, file->filename);
++                          logbufflen += (len >= LOG_STR_MAX ? (len+1) : LOG_STR_MAX);
++                          char * newlogbuff = realloc(logbuff, logbufflen);
++                          if (newlogbuff == NULL)
++                          {
++                              debug(DEBUG_SYSERROR, "could not realloc %d bytes for logbuff in load_from_cvs", logbufflen);
++                              exit(1);
++                          }
++                          logbuff = newlogbuff;
+                       }
  
-       /* the reason this is at all complicated has to do with a 
-        * branch off of a branch.  it is possible (and indeed 
+                       debug(DEBUG_STATUS, "appending %s to log", buff);
diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cvsps/patches/patch-ac      Sun Aug 30 17:16:53 2009 +0000
@@ -0,0 +1,55 @@
+$NetBSD: patch-ac,v 1.1 2009/08/30 17:16:54 schmonz Exp $
+
+--- cache.c.orig       2005-05-25 23:39:40.000000000 -0400
++++ cache.c
+@@ -108,10 +108,19 @@ time_t read_cache()
+     int tag_flags = 0;
+     char branchbuff[LOG_STR_MAX] = "";
+     int branch_add = 0;
+-    char logbuff[LOG_STR_MAX] = "";
++    int logbufflen = LOG_STR_MAX + 1;
++    char * logbuff = malloc(logbufflen);
+     time_t cache_date = -1;
+     int read_version;
+ 
++    if (logbuff == NULL)
++    {
++      debug(DEBUG_SYSERROR, "could not malloc %d bytes for logbuff in read_cache", logbufflen);
++      exit(1);
++    }
++
++    logbuff[0] = 0;
++
+     if (!(fp = cache_open("r")))
+       goto out;
+ 
+@@ -299,8 +308,19 @@ time_t read_cache()
+           else
+           {
+               /* Make sure we have enough in the buffer */
+-              if (strlen(logbuff)+strlen(buff)<LOG_STR_MAX)
+-                  strcat(logbuff, buff);
++              int len = strlen(buff);
++              if (strlen(logbuff) + len >= LOG_STR_MAX)
++              {
++                  logbufflen += (len >= LOG_STR_MAX ? (len+1) : LOG_STR_MAX);
++                  char * newlogbuff = realloc(logbuff, logbufflen);
++                  if (newlogbuff == NULL)
++                  {
++                      debug(DEBUG_SYSERROR, "could not realloc %d bytes for logbuff in read_cache", logbufflen);
++                      exit(1);
++                  }
++                  logbuff = newlogbuff;
++              }
++              strcat(logbuff, buff);
+           }
+           break;
+       case CACHE_NEED_PS_MEMBERS:
+@@ -332,6 +352,7 @@ time_t read_cache()
+  out_close:
+     fclose(fp);
+  out:
++    free(logbuff);
+     return cache_date;
+ }
+ 
diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cvsps/patches/patch-ad      Sun Aug 30 17:16:53 2009 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-ad,v 1.1 2009/08/30 17:16:54 schmonz Exp $
+
+--- cap.c.orig 2005-05-25 23:39:40.000000000 -0400
++++ cap.c
+@@ -121,11 +121,19 @@ int check_version_string(const char * st
+       return 0;
+     }
+ 
++    /* We might have encountered a FreeBSD system which
++     * has a mucked up version string of:
++     *  Concurrent Versions System (CVS) '1.11.17'-FreeBSD (client/server)
++     * so re-test just in case
++     */
+     p += skip;
+     if (sscanf(p, "%d.%d.%d", &major, &minor, &extra) != 3)
+     { 
+-      debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str);
+-      return 0;
++        if (sscanf(p, "'%d.%d.%d'", &major, &minor, &extra) != 3)
++      {
++              debug(DEBUG_APPMSG1, "WARNING: malformed CVS version: %s", str);
++              return 0;
++      }
+     }
+ 
+     return (major > req_major || 
diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cvsps/patches/patch-ae      Sun Aug 30 17:16:53 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2009/08/30 17:16:54 schmonz Exp $
+
+--- cbtcommon/tcpsocket.c.orig 2005-05-25 23:39:40.000000000 -0400
++++ cbtcommon/tcpsocket.c
+@@ -198,7 +198,7 @@ convert_address(long *dest, const char *
+     memcpy(dest, &ip.s_addr, sizeof(ip.s_addr));
+   }
+ #else
+-  if ( (*dest = inet_addr(addr_str)) != -1)
++  if ( (*dest = inet_addr(addr_str)) != (in_addr_t)-1)
+   {
+     /* nothing */
+   }
diff -r 6cd3878142fa -r af1fd0706328 devel/cvsps/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/cvsps/patches/patch-af      Sun Aug 30 17:16:53 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 2009/08/30 17:16:54 schmonz Exp $
+
+--- cvsps.1.orig       2005-05-25 23:39:40.000000000 -0400
++++ cvsps.1
+@@ -83,7 +83,7 @@ some hacks which are not generally appli
+ disable the use of rlog internally.  Note: rlog is
+ required for stable PatchSet numbering.  Use with care.
+ .TP
+-.B \-\-diffs\-opts <option string>
++.B \-\-diff\-opts <option string>
+ send a custom set of options to diff, for example to increase
+ the number of context lines, or change the diff format.
+ .TP



Home | Main Index | Thread Index | Old Index