pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/yale-tftpd Added compatibility fixes for NetBSD/Fr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ba4070581315
branches:  trunk
changeset: 533838:ba4070581315
user:      heinz <heinz%pkgsrc.org@localhost>
date:      Tue Oct 02 20:23:07 2007 +0000

description:
Added compatibility fixes for NetBSD/FreeBSD/Linux/Solaris provided by
Yakovetsky Vladimir in PR pkg/36942.
Shut up warning by pkglint (PLIST).
Introduced PKGMANDIR in software Makefile.

diffstat:

 net/yale-tftpd/Makefile         |  11 ++++++++-
 net/yale-tftpd/PLIST            |   4 +-
 net/yale-tftpd/distinfo         |  17 ++++++++-------
 net/yale-tftpd/patches/patch-aa |   6 ++--
 net/yale-tftpd/patches/patch-ad |  43 ++++++++++++++++++++++++++--------------
 net/yale-tftpd/patches/patch-af |  22 +++++++++++++++++---
 net/yale-tftpd/patches/patch-ag |  12 ++++++++--
 net/yale-tftpd/patches/patch-ah |  14 +++++++++++-
 net/yale-tftpd/patches/patch-ai |  12 ++++++++++-
 net/yale-tftpd/patches/patch-aj |  14 ++++++++----
 net/yale-tftpd/patches/patch-ak |  15 ++++++++++++++
 11 files changed, 125 insertions(+), 45 deletions(-)

diffs (truncated from 398 to 300 lines):

diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/Makefile
--- a/net/yale-tftpd/Makefile   Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/Makefile   Tue Oct 02 20:23:07 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2007/03/24 19:21:31 joerg Exp $
+# $NetBSD: Makefile,v 1.16 2007/10/02 20:23:07 heinz Exp $
 
 DISTNAME=      yale-tftpd-3.0
 PKGREVISION=   4
@@ -8,7 +8,14 @@
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 COMMENT=       Enhanced tftpd(8) from Yale University and cisco Systems
 
-WRKSRC=                ${WRKDIR}
+WRKSRC=                                ${WRKDIR}
+
+CFLAGS.FreeBSD+=               -DHAVE_STRERROR
+CFLAGS.Linux+=                 -DHAVE_STRERROR
+CFLAGS.SunOS+=                 -DHAVE_STRERROR -DBROKEN_TH_STUFF
+LDFLAGS.SunOS+=                        -lsocket -lnsl
+
+USE_LANGUAGES=                 c
 
 SUBST_CLASSES+=                        ytftpdman
 SUBST_STAGE.ytftpdman=         post-configure
diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/PLIST
--- a/net/yale-tftpd/PLIST      Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/PLIST      Tue Oct 02 20:23:07 2007 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:59:58 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2007/10/02 20:23:07 heinz Exp $
 libexec/tftpd
+man/cat8/tftpd.0
 man/man8/tftpd.8
-man/cat8/tftpd.0
diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/distinfo
--- a/net/yale-tftpd/distinfo   Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/distinfo   Tue Oct 02 20:23:07 2007 +0000
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.8 2006/03/14 14:11:53 he Exp $
+$NetBSD: distinfo,v 1.9 2007/10/02 20:23:07 heinz Exp $
 
 SHA1 (yale-tftpd-3.0.tar.gz) = 5f87e3d37feb5c5c8b7f2db34a0c87ee537727af
 RMD160 (yale-tftpd-3.0.tar.gz) = 207b88c4383b283e3c0d81a50061a65513031854
 Size (yale-tftpd-3.0.tar.gz) = 33469 bytes
-SHA1 (patch-aa) = e6e9b368db8f70bdb4fbb2a1b032bd4ce66206f2
+SHA1 (patch-aa) = 9523f1d0727be08b2ebea275f0676f824f06c82a
 SHA1 (patch-ab) = e6eb66ed95139b47ee1df07014a636803e89ad47
 SHA1 (patch-ac) = bd44bf8d19079e1a74850dbcc8cfea3d82f36c3e
-SHA1 (patch-ad) = 04a3a46c795618a996207dcf64af5e1bdf41042e
+SHA1 (patch-ad) = f16ad4e705873deb7c06c4a10fe96bd3dc428279
 SHA1 (patch-ae) = 61ae35f5e8d5d8f3cd60ba515a925a4098628fb1
-SHA1 (patch-af) = 028ffa7fb05d3961d4cedd979e5ea130f19f7489
-SHA1 (patch-ag) = 7e14bea74c2d94222cc5f13b03b7735fbe442487
-SHA1 (patch-ah) = 623a09bbb11ae354007cd90e55a98dea3555ec68
-SHA1 (patch-ai) = 1b216b650d1d31c403f0bc7f32009e9d7c92186a
-SHA1 (patch-aj) = f57139380e8b7e48b9e40f9ef9864eb1b56720f0
+SHA1 (patch-af) = d51ac136dc653395faea0c6f2c748f57584d47b5
+SHA1 (patch-ag) = be6114e57b7c154eccd09ac4b9187957d2ba4dde
+SHA1 (patch-ah) = aee72d3af9fd015b9e1563610b7e72011ce07a05
+SHA1 (patch-ai) = 7ef84005b287c614b03186a11c030964e596076c
+SHA1 (patch-aj) = 289bd4840cabe516f9ab09e883089f4aa4f7763b
+SHA1 (patch-ak) = 48c125fc5012e65b9310298dba29f76e5b60b078
diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/patches/patch-aa
--- a/net/yale-tftpd/patches/patch-aa   Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/patches/patch-aa   Tue Oct 02 20:23:07 2007 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2002/04/23 15:27:16 seb Exp $
+$NetBSD: patch-aa,v 1.3 2007/10/02 20:23:08 heinz Exp $
 
---- Makefile.orig      Fri Oct  7 01:41:10 1994
+--- Makefile.orig      1994-10-07 01:41:10.000000000 +0100
 +++ Makefile
 @@ -2,10 +2,11 @@
  
@@ -13,7 +13,7 @@
 -BINDIR?=${DESTDIR}/usr/libexec
 +ETCDIR=${PKG_SYSCONFDIR}
 +BINDIR=${PREFIX}/libexec
-+MANDIR=${PREFIX}/man
++MANDIR=${PREFIX}/${PKGMANDIR}
  
  CFLAGS+=-DCONFIGFILE='"${ETCDIR}/tftpd.conf"'
  
diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/patches/patch-ad
--- a/net/yale-tftpd/patches/patch-ad   Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/patches/patch-ad   Tue Oct 02 20:23:07 2007 +0000
@@ -1,13 +1,26 @@
-$NetBSD: patch-ad,v 1.4 2006/03/14 14:11:53 he Exp $
+$NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
 
 --- tftpd.c.orig       1995-03-20 21:14:39.000000000 +0100
 +++ tftpd.c
-@@ -56,17 +56,19 @@ static char sccsid[] = "@(#)tftpd.c        5.12
+@@ -43,6 +43,9 @@ static char sccsid[] = "@(#)tftpd.c  5.12
+ #include <sys/signal.h>
+ #include <sys/time.h>
+ #include <sys/param.h>
++#ifdef __sun
++#include <sys/filio.h>
++#endif
+ 
+ #include <netinet/in.h>
+ 
+@@ -56,17 +59,22 @@ static char sccsid[] = "@(#)tftpd.c        5.12
  #include <syslog.h>
  #include <string.h>
  
 +#include <unistd.h>
 +#include <fcntl.h>
++#ifdef __STDC__
++#include <stdlib.h>
++#endif
 +
  #define       TIMEOUT         5
  
@@ -26,7 +39,7 @@
  struct        sockaddr_in from;
  int   fromlen;
  
-@@ -105,6 +107,8 @@ char       **argv;
+@@ -105,6 +113,8 @@ char       **argv;
  
        if (argc > 1 && strcmp (argv[1], "-d") == 0) {
                setUpForDebugging();
@@ -35,7 +48,7 @@
        }
        if (ioctl(0, FIONBIO, &on) < 0) {
                syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
-@@ -202,7 +206,7 @@ setUpForDebugging()
+@@ -202,7 +212,7 @@ setUpForDebugging()
  awaitInput(chan)
  int   chan;
  {
@@ -44,7 +57,7 @@
        int nready;
        struct timeval tv;
        extern int maxInputWait;
-@@ -212,8 +216,9 @@ int        chan;
+@@ -212,8 +222,9 @@ int        chan;
        else
                tv.tv_sec = 5*60;       /* default: wait for 5 minutes */
        tv.tv_usec = 0;
@@ -56,7 +69,7 @@
        return nready;
  }
  
-@@ -294,7 +299,10 @@ int n;
+@@ -294,7 +305,10 @@ int n;
  }
  
  int   validate_access();
@@ -68,7 +81,7 @@
  
  struct formats {
        char    *f_mode;
-@@ -303,8 +311,8 @@ struct formats {
+@@ -303,8 +317,8 @@ struct formats {
        int     (*f_recv)();
        int     f_convert;
  } formats[] = {
@@ -79,7 +92,7 @@
  #ifdef notdef
        { "mail",       validate_user,          sendmail,       recvmail, 1 },
  #endif
-@@ -355,13 +363,13 @@ again:
+@@ -355,13 +369,13 @@ again:
                exit(1);
        }
        if (tftpDebugLevel > 0) {
@@ -96,7 +109,7 @@
        }
        ecode = (*pf->f_validate)(filename, tp->th_opcode);
        if (ecode) {
-@@ -459,17 +467,25 @@ validate_access(filename, mode)
+@@ -459,17 +473,25 @@ validate_access(filename, mode)
  
        /* Rule 2:
         */
@@ -125,7 +138,7 @@
  
                        /* Insure our temporary space is big enough */
                        maxPath = ((sizeof _tmp) - 1) - rootLen;
-@@ -481,6 +497,8 @@ validate_access(filename, mode)
+@@ -481,6 +503,8 @@ validate_access(filename, mode)
                                return EACCESS;
                        }
  
@@ -134,7 +147,7 @@
                        /* Squeeze out any '.' or '..' components */
                        strcpy (tmpPath, filename);
                        if (realPath (tmpPath, _tmp) < 0) {
-@@ -492,21 +510,54 @@ validate_access(filename, mode)
+@@ -492,21 +516,54 @@ validate_access(filename, mode)
                        /* Create the full pathname, prefixed by the
                         * virtual root.
                         */
@@ -193,7 +206,7 @@
        /* Check access lists */
        /* Rules 4&5:
         */
-@@ -565,7 +616,7 @@ validate_access(filename, mode)
+@@ -565,7 +622,7 @@ validate_access(filename, mode)
         * This will be done with the effective permissions of the TFTPD
         * process.
         */
@@ -202,7 +215,7 @@
        if (fd < 0) {
                syslog (LOG_DEBUG, "open fails; errno = %d", errno);
                return errno+100;
-@@ -593,7 +644,7 @@ void timer()
+@@ -593,7 +650,7 @@ void timer()
  /*
   * Send the requested file.
   */
@@ -211,7 +224,7 @@
        struct formats *pf;
  {
        struct tftphdr *dp, *r_init();
-@@ -664,7 +715,7 @@ void justquit()
+@@ -664,7 +721,7 @@ void justquit()
  /*
   * Receive a file.
   */
@@ -220,7 +233,7 @@
        struct formats *pf;
  {
        struct tftphdr *dp, *w_init();
-@@ -688,7 +739,7 @@ send_ack:
+@@ -688,7 +745,7 @@ send_ack:
                write_behind(file, pf->f_convert);
                for ( ; ; ) {
                        alarm(rexmtval);
diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/patches/patch-af
--- a/net/yale-tftpd/patches/patch-af   Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/patches/patch-af   Tue Oct 02 20:23:07 2007 +0000
@@ -1,16 +1,21 @@
-$NetBSD: patch-af,v 1.2 2005/12/18 18:37:16 joerg Exp $
+$NetBSD: patch-af,v 1.3 2007/10/02 20:23:08 heinz Exp $
 
---- classes/config.c.orig      1994-10-05 05:18:21.000000000 +0000
+--- classes/config.c.orig      1994-10-05 06:18:21.000000000 +0100
 +++ classes/config.c
-@@ -1,6 +1,7 @@
+@@ -1,8 +1,12 @@
  #define CLASS_Config_PRIVATE
  #include "config.h"
  
 +#include <stdlib.h>
  #include <strings.h>
  #include <ctype.h>
++#ifdef HAVE_STRERROR
++#include <string.h>
++#endif
  
-@@ -35,10 +36,6 @@ static Config config_expand();
+ #define DFLT_NFIELDS  10
+ #define START_FIELD(S)        \
+@@ -35,10 +39,6 @@ static Config config_expand();
  static unsigned char* config_copy();
  static unsigned char* get_quoted_string();
  
@@ -21,3 +26,12 @@
  static int dflt_options       = CFG_OPT_UCASE;
  
  Config
+@@ -130,7 +130,7 @@ char*      buf;
+               switch (type) {
+                case BRK_QUOTE:
+                       START_FIELD(to);
+-                      fr = get_quoted_string (*fr, fr+1, &to);
++                      fr = get_quoted_string (*fr, fr+1, (char**)&to);
+                       fr++;   /* skip terminating quote */
+                       break;
+ 
diff -r de97c3e01227 -r ba4070581315 net/yale-tftpd/patches/patch-ag
--- a/net/yale-tftpd/patches/patch-ag   Tue Oct 02 19:03:11 2007 +0000
+++ b/net/yale-tftpd/patches/patch-ag   Tue Oct 02 20:23:07 2007 +0000
@@ -1,12 +1,18 @@
-$NetBSD: patch-ag,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
+$NetBSD: patch-ag,v 1.2 2007/10/02 20:23:08 heinz Exp $
 
---- classes/dict.c.orig        Wed Oct  5 01:20:48 1994
+--- classes/dict.c.orig        1994-10-05 06:20:48.000000000 +0100
 +++ classes/dict.c
-@@ -14,6 +14,7 @@
+@@ -14,8 +14,13 @@
   */
  
  #include <stdio.h>
 +#include <stdlib.h>
  #include <strings.h>
++#ifdef HAVE_STRERROR
++#include <string.h>
++#else
  extern char*  strdup();
++#endif
  extern int    strcasecmp();
+ 
+ #define _CLASS_Dict_PRIVATE_



Home | Main Index | Thread Index | Old Index