ports/55229: New port: ftp/tnftpd (obsoletes ftp/lukemftpd)

Alex Vasylenko lxv at send-pr.sink.omut.org
Mon Aug 4 07:50:20 UTC 2003


>Number:         55229
>Category:       ports
>Synopsis:       New port: ftp/tnftpd (obsoletes ftp/lukemftpd)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 04 00:50:15 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alex Vasylenko
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
System: FreeBSD 4.8-RELEASE #0: Fri May 9 22:09:25 PDT 2003


	
>Description:
	tnftpd (formerly known as lukemftpd) is a port of the 
	enhanced NetBSD ftp server to other systems

>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	.
#	./pkg-plist
#	./pkg-descr
#	./distinfo
#	./Makefile
#	./files
#	./files/patch-src-logwtmp.c
#	./files/patch-tnftpd.h
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo x - ./pkg-plist
sed 's/^X//' >./pkg-plist << 'END-of-./pkg-plist'
Xlibexec/tnftpd
X%%PORTDOCS%%share/doc/tnftpd/ChangeLog
X%%PORTDOCS%%share/doc/tnftpd/README
X%%PORTDOCS%%share/doc/tnftpd/THANKS
X%%PORTDOCS%%share/doc/tnftpd/COPYING
X%%PORTDOCS%%@dirrm share/doc/tnftpd
END-of-./pkg-plist
echo x - ./pkg-descr
sed 's/^X//' >./pkg-descr << 'END-of-./pkg-descr'
Xtnftpd is a port of the enhanced NetBSD ftp server to other systems.
X(Note: lukemftpd was renamed to tnftpd)
END-of-./pkg-descr
echo x - ./distinfo
sed 's/^X//' >./distinfo << 'END-of-./distinfo'
XMD5 (tnftpd-2.0-beta3.tar.gz) = 2c70bdc6549f88f992191ebe772629a7
END-of-./distinfo
echo x - ./Makefile
sed 's/^X//' >./Makefile << 'END-of-./Makefile'
X# New ports collection makefile for:	tnftpd
X# Date created:				3 August 2003
X# Whom:					ports
X#
X# $FreeBSD$
X#
X
XPORTNAME=	tnftpd
XPORTVERSION=	2.0b3
XCATEGORIES=	ftp ipv6
XMASTER_SITES=	ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/
XDISTNAME=	${PORTNAME}-2.0-beta3
X
XMAINTAINER=	ports at FreeBSD.org
XCOMMENT=	Enhanced ftp server from NetBSD
X
XUSE_REINPLACE=	yes
XGNU_CONFIGURE=	yes
X
X.if defined(WITH_SOCKS5)
XBUILD_DEPENDS=	${LOCALBASE}/lib/libsocks5.a:${PORTSDIR}/net/socks5
XCONFIGURE_ARGS+=	--with-socks5
X.endif
X
XDOCS=		ChangeLog README THANKS COPYING
X
XMAN5=		ftpd.conf.5 ftpusers.5
XMAN8=		tnftpd.8
X
XFIXPREFIX=	ftpd.8 ftpd.conf.5 ftpusers.5
X
Xpre-patch:
X.for f in ${FIXPREFIX}
X	${REINPLACE_CMD} -e \
X		"s@^\.Dq Pa /etc at .Dq Pa ${PREFIX}/etc at g; \
X		s@^\.Pa /etc at .Pa ${PREFIX}/etc at g; \
X		s@^\.It Pa /etc/@.It Pa ${PREFIX}/etc/@g; \
X		s@^\.Ss /etc/@.Ss ${PREFIX}/etc/@g; \
X		s@^\.Sx /etc/@.Sx ${PREFIX}/etc/@g; \
X		s@^\.Bl -tag -width /etc/@.Bl -tag -width ${PREFIX}/etc/@g; \
X		s@${PREFIX}/etc/shells@/etc/shells at g; \
X		s@${PREFIX}/etc/motd@/etc/motd at g; \
X		s@${PREFIX}/etc/nologin@/etc/nologin at g; \
X		s@${PREFIX}/etc/pwd.db@/etc/pwd.db at g" \
X	${WRKSRC}/src/${f}
X.endfor
X	${REINPLACE_CMD} -e \
X		"s@^#define	_DEFAULT_CONFDIR	\"/etc\"@#define	_DEFAULT_CONFDIR	\"${PREFIX}/etc\"@" \
X	${WRKSRC}/src/pathnames.h
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/src/tnftpd ${PREFIX}/libexec
X	${INSTALL_MAN} ${WRKSRC}/src/ftpd.8 ${PREFIX}/man/man8/tnftpd.8
X	${INSTALL_MAN} ${WRKSRC}/src/ftpd.conf.5 ${PREFIX}/man/man5
X	${INSTALL_MAN} ${WRKSRC}/src/ftpusers.5 ${PREFIX}/man/man5
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/${PORTNAME}
X.for f in ${DOCS}
X	${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/${PORTNAME}/
X.endfor
X.endif
X
Xpost-install:
X	@${ECHO} "================================================================================"
X	@${ECHO} "This port relies on a number of configuration files in ${PREFIX}/etc."
X	@${ECHO} "At the very least, create a ftpusers file with the usernams of users you don't"
X	@${ECHO} "want to connect (root, toor, etc.). This will allow non-listed users to log in."
X	@${ECHO} "Copying /etc/ftpusers to ${PREFIX}/etc/ftpusers should be sufficient."
X	@${ECHO}
X	@${ECHO} "See the man files for more information. The man- and configuration files for"
X	@${ECHO} "FreeBSD's built-in ftpd can also be of use as examples/additional info."
X	@${ECHO} "================================================================================"
X
X.include <bsd.port.mk>
END-of-./Makefile
echo c - ./files
mkdir -p ./files > /dev/null 2>&1
echo x - ./files/patch-src-logwtmp.c
sed 's/^X//' >./files/patch-src-logwtmp.c << 'END-of-./files/patch-src-logwtmp.c'
X--- src/logwtmp.c-orig	Sun Feb 23 22:38:44 2003
X+++ src/logwtmp.c	Sun Aug  3 15:53:32 2003
X@@ -78,6 +78,26 @@
X 	struct utmp ut;
X 	struct stat buf;
X 
X+	if (strlen(host) > UT_HOSTSIZE) {
X+		struct addrinfo hints, *res;
X+		int error;
X+		static char hostbuf[BUFSIZ];
X+
X+		memset(&hints, 0, sizeof(hints));
X+		hints.ai_family = PF_UNSPEC;
X+		error = getaddrinfo(host, NULL, &hints, &res);
X+		if (error)
X+			host = "invalid hostname";
X+		else {
X+			getnameinfo(res->ai_addr, res->ai_addrlen,
X+				hostbuf, sizeof(hostbuf), NULL, 0,
X+				NI_NUMERICHOST);
X+			host = hostbuf;
X+			if (strlen(host) > UT_HOSTSIZE)
X+				host[UT_HOSTSIZE] = '\0';
X+		}
X+	}
X+
X 	if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0)
X 		return;
X 	if (fstat(fd, &buf) == 0) {
END-of-./files/patch-src-logwtmp.c
echo x - ./files/patch-tnftpd.h
sed 's/^X//' >./files/patch-tnftpd.h << 'END-of-./files/patch-tnftpd.h'
X--- tnftpd.h-orig	Wed Feb 26 19:16:13 2003
X+++ tnftpd.h	Sun Aug  3 15:49:57 2003
X@@ -404,6 +404,8 @@
X #define SECSPERDAY	86400
X #define TM_YEAR_BASE	1900
X 
X-#if ! defined(LOGIN_NAME_MAX)
X+#if defined(MAXLOGNAME)
X+# define LOGIN_NAME_MAX MAXLOGNAME
X+#elif ! defined(LOGIN_NAME_MAX)
X # define LOGIN_NAME_MAX (9)
X #endif
END-of-./files/patch-tnftpd.h
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list