Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Aug 2008 18:52:33 -0400 (EDT)
From:      Yarema <yds@CoolRat.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        cejkar@fit.vutbr.cz
Subject:   ports/126749: [PATCH] ftp/tnftpd new version 20080609
Message-ID:  <20080822225233.909506432CC1@orion.dppl.com>
Resent-Message-ID: <200808222300.m7MN0BM1098238@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         126749
>Category:       ports
>Synopsis:       [PATCH] ftp/tnftpd new version 20080609
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 22 23:00:10 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Yarema
>Release:        FreeBSD 6.3-STABLE amd64
>Organization:
NYCBUG.org
>Environment:
FreeBSD 6.3-STABLE amd64
FreeBSD 7.0-STABLE amd64
>Description:
Update NetBSD's tnftpd server to the latest and clean up the Makefile.

pkg-message moved to files/pkg-message.in and all the relevant code
replaced with:
SUB_FILES=	pkg-message

files/patch-configure no longer needed.

All the other patches refreshed to apply cleanly to the new sources.

>How-To-Repeat:

>Fix:
diff -u -r -N tnftpd-20061204/Makefile tnftpd/Makefile
--- tnftpd-20061204/Makefile	2007-02-04 10:19:49.000000000 -0500
+++ tnftpd/Makefile	2008-08-22 18:22:48.683980220 -0400
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	tnftpd
-PORTVERSION=	20061204
-PORTREVISION=	1
+PORTVERSION=	20080609
 CATEGORIES=	ftp ipv6
 MASTER_SITES=	ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/
 
@@ -15,7 +14,6 @@
 COMMENT=	Enhanced ftp server from NetBSD
 
 GNU_CONFIGURE=	yes
-PKGMESSAGE=	${WRKDIR}/pkg-message
 
 CFLAGS+=	-DSUPPORT_UTMP
 
@@ -24,13 +22,12 @@
 CONFIGURE_ARGS+=	--with-socks5
 .endif
 
-DOCS=		ChangeLog README THANKS COPYING
-
 MAN5=		ftpd.conf.5 ftpusers.5
 MAN8=		tnftpd.8
 PLIST_FILES=	libexec/tnftpd
-PORTDOCS=	ChangeLog README THANKS COPYING
+PORTDOCS=	ChangeLog NEWS README THANKS COPYING
 
+SUB_FILES=	pkg-message
 FIXPREFIX=	ftpd.8 ftpd.conf.5 ftpusers.5
 
 pre-patch:
@@ -51,9 +48,6 @@
 		"s@^#define	_DEFAULT_CONFDIR	\"/etc\"@#define	_DEFAULT_CONFDIR	\"${PREFIX}/etc\"@" \
 	${WRKSRC}/src/pathnames.h
 
-post-build:
-	@${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}|' > ${PKGMESSAGE}
-
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/tnftpd ${PREFIX}/libexec
 	${INSTALL_MAN} ${WRKSRC}/src/ftpd.8 ${PREFIX}/man/man8/tnftpd.8
@@ -61,7 +55,7 @@
 	${INSTALL_MAN} ${WRKSRC}/src/ftpusers.5 ${PREFIX}/man/man5
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}
-.for f in ${DOCS}
+.for f in ${PORTDOCS}
 	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
 .endfor
 .endif
diff -u -r -N tnftpd-20061204/distinfo tnftpd/distinfo
--- tnftpd-20061204/distinfo	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/distinfo	2008-08-22 13:37:24.543280524 -0400
@@ -1,3 +1,3 @@
-MD5 (tnftpd-20061204.tar.gz) = dada97588519fea2535678b6652ecf64
-SHA256 (tnftpd-20061204.tar.gz) = 7cc0532a8d492ed79ced7c44c3351829021169cc1e75bff8fd1d1066f0c2a2cc
-SIZE (tnftpd-20061204.tar.gz) = 187164
+MD5 (tnftpd-20080609.tar.gz) = 9753e194b81357262581de12f07a76b5
+SHA256 (tnftpd-20080609.tar.gz) = 82f594afd58f70e4439c52262edefee7edbd8802d7feb86710e34cab2facdd7c
+SIZE (tnftpd-20080609.tar.gz) = 244732
diff -u -r -N tnftpd-20061204/files/patch-configure tnftpd/files/patch-configure
--- tnftpd-20061204/files/patch-configure	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/files/patch-configure	1969-12-31 19:00:00.000000000 -0500
@@ -1,13 +0,0 @@
-
-Fix off_t size detection, so that determined off_t size is 8 instead of 0.
-
---- configure.orig	Wed Dec 13 11:00:41 2006
-+++ configure	Wed Dec 13 11:02:41 2006
-@@ -2455,6 +2455,7 @@
-   cat > conftest.$ac_ext <<EOF
- #line 2457 "configure"
- #include "confdefs.h"
-+#include <sys/types.h>
- #include <stdio.h>
- main()
- {
diff -u -r -N tnftpd-20061204/files/patch-src-Makefile.in tnftpd/files/patch-src-Makefile.in
--- tnftpd-20061204/files/patch-src-Makefile.in	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/files/patch-src-Makefile.in	2008-03-09 16:51:35.000000000 -0400
@@ -2,15 +2,15 @@
 FreeBSD does have support for utmp/wtmp, so include relevant files into
 a build.
 
---- src/Makefile.in.orig	Wed Dec 13 13:03:12 2006
-+++ src/Makefile.in	Wed Dec 13 13:03:47 2006
-@@ -23,8 +23,7 @@
- INSTALL	= @INSTALL@
+--- src/Makefile.in.orig	2008-03-09 16:51:35.000000000 -0400
++++ src/Makefile.in	2008-03-09 16:51:35.000000000 -0400
+@@ -2,8 +2,7 @@
+ #
  
- PROG	= tnftpd
--OBJS	= cmds.o conf.o ftpd.o ftpcmd.o popen.o @LSOBJS@
+ PROG	= tnftpd@EXEEXT@
+-SRCS	= cmds.c conf.c ftpd.c ftpcmd.c popen.c @LSOBJS@
 -# removed: logutmp.o logwtmp.o
-+OBJS	= cmds.o conf.o ftpd.o ftpcmd.o popen.o logutmp.o logwtmp.o @LSOBJS@
- 
- all:	${PROG}
++SRCS	= cmds.c conf.c ftpd.c ftpcmd.c popen.c logutmp.c logwtmp.c @LSOBJS@
  
+ srcdir	= @srcdir@
+ VPATH	= @srcdir@
diff -u -r -N tnftpd-20061204/files/patch-src-ftpd.c tnftpd/files/patch-src-ftpd.c
--- tnftpd-20061204/files/patch-src-ftpd.c	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/files/patch-src-ftpd.c	2008-06-08 20:52:33.000000000 -0400
@@ -8,9 +8,9 @@
 We are sure, that we have good LOGIN_NAME_MAX from tnftpd.h, so use it
 instead of unnecessarily conservative _POSIX_LOGIN_NAME_MAX.
 
---- src/ftpd.c.orig	Wed Sep 27 07:22:18 2006
-+++ src/ftpd.c	Thu Dec 14 00:19:55 2006
-@@ -371,6 +371,24 @@
+--- src/ftpd.c.orig	2008-06-08 20:52:33.000000000 -0400
++++ src/ftpd.c	2008-06-08 20:52:33.000000000 -0400
+@@ -368,6 +368,24 @@
  			break;
  
  		case 'C':
@@ -35,7 +35,7 @@
  			pw = sgetpwnam(optarg);
  			exit(checkaccess(optarg) ? 0 : 1);
  			/* NOTREACHED */
-@@ -496,12 +514,12 @@
+@@ -497,12 +515,12 @@
  		exit(1);
  	} else if (l <= 0) {
  		syslog(LOG_WARNING, "using conservative LOGIN_NAME_MAX value");
@@ -50,7 +50,7 @@
  #endif
  	curname = malloc(curname_len);
  	if (curname == NULL) {
-@@ -1166,18 +1184,38 @@
+@@ -1179,18 +1197,38 @@
  
  					/* have a host specifier */
  		if ((p = strchr(word, '@')) != NULL) {
@@ -98,10 +98,10 @@
  					continue;
  
  					/* check against hostname glob */
-@@ -3744,7 +3782,7 @@
+@@ -3776,7 +3814,7 @@
  	expire = pwent->pw_expire;
  #endif
- #if HAVE_PW_CHANGE
+ #if defined(HAVE_STRUCT_PASSWD_PW_CHANGE)
 -	change = (pwent->pw_change == _PASSWORD_CHGNOW)? now : pwent->pw_change;
 +	change = (pwent->pw_change == -1)? now : pwent->pw_change;
  #endif
diff -u -r -N tnftpd-20061204/files/patch-src-logutmp.c tnftpd/files/patch-src-logutmp.c
--- tnftpd-20061204/files/patch-src-logutmp.c	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/files/patch-src-logutmp.c	2006-12-04 16:13:22.000000000 -0500
@@ -2,8 +2,8 @@
 FreeBSD does not have header file util.h, fortunately it is not needed.
 Add header file time.h for time().
 
---- src/logutmp.c.orig	Wed Dec 13 13:16:58 2006
-+++ src/logutmp.c	Wed Dec 13 13:17:18 2006
+--- src/logutmp.c.orig	2006-12-04 16:13:22.000000000 -0500
++++ src/logutmp.c	2006-12-04 16:13:22.000000000 -0500
 @@ -59,13 +59,13 @@
  #include <stdio.h>
  #include <stdlib.h>
diff -u -r -N tnftpd-20061204/files/patch-src-logwtmp.c tnftpd/files/patch-src-logwtmp.c
--- tnftpd-20061204/files/patch-src-logwtmp.c	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/files/patch-src-logwtmp.c	2008-05-31 23:26:12.000000000 -0400
@@ -4,9 +4,9 @@
 If host name is longer than UT_HOSTSIZE (16 characters), log numeric
 address to utmp.
 
---- src/logwtmp.c.orig	Wed Dec 13 13:26:40 2006
-+++ src/logwtmp.c	Wed Dec 13 14:14:52 2006
-@@ -42,11 +42,13 @@
+--- src/logwtmp.c.orig	2008-05-31 23:26:12.000000000 -0400
++++ src/logwtmp.c	2008-05-31 23:26:12.000000000 -0400
+@@ -43,11 +43,13 @@
  
  #include <sys/types.h>
  #include <sys/param.h>
@@ -20,7 +20,7 @@
  #include <signal.h>
  #include <stdio.h>
  #include <string.h>
-@@ -59,7 +61,6 @@
+@@ -60,7 +62,6 @@
  #ifdef SUPPORT_UTMPX
  #include <utmpx.h>
  #endif
@@ -28,11 +28,10 @@
  
  #ifdef KERBEROS5
  #include <krb5/krb5.h>
-@@ -88,6 +89,26 @@
- {
+@@ -90,6 +91,26 @@
  	struct utmp ut;
  	struct stat buf;
-+
+ 
 +	if (strlen(host) > UT_HOSTSIZE) {
 +		struct addrinfo hints, *res;
 +		int error;
@@ -52,6 +51,7 @@
 +				hostbuf[UT_HOSTSIZE] = '\0';
 +		}
 +	}
- 
++
  	if (fd < 0)
  		return;
+ 	if (fstat(fd, &buf) == 0) {
diff -u -r -N tnftpd-20061204/files/patch-tnftpd.h tnftpd/files/patch-tnftpd.h
--- tnftpd-20061204/files/patch-tnftpd.h	2006-12-15 03:44:21.000000000 -0500
+++ tnftpd/files/patch-tnftpd.h	2008-06-08 21:24:51.000000000 -0400
@@ -2,17 +2,18 @@
 FreeBSD does not have LOGIN_NAME_MAX, but it has MAXLOGNAME instead,
 so use it as much as possible.
 
---- tnftpd.h.orig	Wed Dec 13 14:38:43 2006
-+++ tnftpd.h	Wed Dec 13 14:39:24 2006
-@@ -479,7 +479,11 @@
+--- tnftpd.h.orig	2008-06-08 21:24:51.000000000 -0400
++++ tnftpd.h	2008-06-08 21:24:51.000000000 -0400
+@@ -548,8 +548,12 @@
  #define TM_YEAR_BASE	1900
  
- #if ! defined(LOGIN_NAME_MAX)
+ #if !defined(LOGIN_NAME_MAX)
 +#if defined(MAXLOGNAME)
 +# define LOGIN_NAME_MAX MAXLOGNAME
 +#else
  # define LOGIN_NAME_MAX (9)
-+#endif
  #endif
++#endif
  
- #if ! defined(_POSIX_LOGIN_NAME_MAX)
+ #if !defined(_POSIX_LOGIN_NAME_MAX)
+ # define _POSIX_LOGIN_NAME_MAX LOGIN_NAME_MAX
diff -u -r -N tnftpd-20061204/files/pkg-message.in tnftpd/files/pkg-message.in
--- tnftpd-20061204/files/pkg-message.in	1969-12-31 19:00:00.000000000 -0500
+++ tnftpd/files/pkg-message.in	2004-01-23 17:56:46.000000000 -0500
@@ -0,0 +1,9 @@
+================================================================================
+This port relies on a number of configuration files in %%PREFIX%%/etc.
+At the very least, create a ftpusers file with the usernams of users you don't
+want to connect (root, toor, etc.). This will allow non-listed users to log in.
+Copying /etc/ftpusers to %%PREFIX%%/etc/ftpusers should be sufficient.
+
+See the man files for more information. The man- and configuration files for
+FreeBSD's built-in ftpd can also be of use as examples/additional info.
+================================================================================
diff -u -r -N tnftpd-20061204/pkg-message tnftpd/pkg-message
--- tnftpd-20061204/pkg-message	2004-01-23 17:56:46.000000000 -0500
+++ tnftpd/pkg-message	1969-12-31 19:00:00.000000000 -0500
@@ -1,9 +0,0 @@
-================================================================================
-This port relies on a number of configuration files in %%PREFIX%%/etc.
-At the very least, create a ftpusers file with the usernams of users you don't
-want to connect (root, toor, etc.). This will allow non-listed users to log in.
-Copying /etc/ftpusers to %%PREFIX%%/etc/ftpusers should be sufficient.
-
-See the man files for more information. The man- and configuration files for
-FreeBSD's built-in ftpd can also be of use as examples/additional info.
-================================================================================
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080822225233.909506432CC1>