ports/79687: Update port: ftp/vsftpd to 2.0.3

Marcus Grando marcus at corp.grupos.com.br
Fri Apr 8 15:20:06 UTC 2005


>Number:         79687
>Category:       ports
>Synopsis:       Update port: ftp/vsftpd to 2.0.3
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 08 15:20:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Marcus Grando
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
Grupos Internet S/A
>Environment:
System: FreeBSD corp.grupos.com.br 4.11-STABLE FreeBSD 4.11-STABLE #47: Thu Apr 7 19:39:31 BRT 2005 root at corp.grupos.com.br:/usr/obj/usr/src/sys/CORP i386


	
>Description:
Update port: ftp/vsftpd to 2.0.3

- Update to 2.0.3
- Add rcNG script
- Removing REINPLACE_CMD noise

Add files:

files/vsftpd.sh

NOTE:

Add on ports/UPDATING:

--
  AFFECTS: users of ftp/vsftpd
  AUTHOR: marcus at corp.grupos.com.br

  Vsftpd now installs an rcNG script for starting the vsftpd daemon.
  To enable vsftpd to start at boot time, add the following to /etc/rc.conf:

  vsftpd_enable="YES"

  You can also pass flags to vsftpd by setting the rc.conf variable
  vsftpd_flags. Per default vsftpd use ${PREFIX}/etc/vsftpd.conf.

  * To vsftpd rcNG work, config file need "listen=YES" and "background=YES".
--

	
>How-To-Repeat:
	
>Fix:

	

--- vsftpd.patch begins here ---
diff -ruN vsftpd.orig/Makefile vsftpd/Makefile
--- vsftpd.orig/Makefile	Tue Jul  6 17:28:39 2004
+++ vsftpd/Makefile	Fri Apr  8 10:43:58 2005
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	vsftpd
-PORTVERSION=	2.0.1
+PORTVERSION=	2.0.3
 CATEGORIES=	ftp ipv6
 MASTER_SITES=	ftp://vsftpd.beasts.org/users/cevans/
 
@@ -14,6 +14,7 @@
 COMMENT=	A FTP daemon that aims to be "very secure"
 
 USE_REINPLACE=	yes
+USE_RC_SUBR=	yes
 ALL_TARGET=	vsftpd
 MAN5=		vsftpd.conf.5
 MAN8=		vsftpd.8
@@ -21,35 +22,41 @@
 		README README.security README.ssl REFS REWARD \
 		SIZE SPEED TODO TUNING
 
+OPTIONS=	VSFTPD_SSL "vsftpd with SSL options" off
+
+.include <bsd.port.pre.mk>
+
 .if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
 USE_OPENSSL=	yes
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}
 .endif
 
-.include <bsd.port.pre.mk>
-
 do-configure:
-	${REINPLACE_CMD} -e "s=/etc/vsftpd.conf=${PREFIX}/etc/vsftpd.conf=" \
+	@${REINPLACE_CMD} -e "s=/etc/vsftpd.conf=${PREFIX}/etc/vsftpd.conf=" \
 		${WRKSRC}/defs.h
-	${REINPLACE_CMD} \
+	@${REINPLACE_CMD} \
 		-e "s|^CC 	=	gcc|CC	= ${CC}|" \
 		-e "s|^CFLAGS	=|CFLAGS	= ${CFLAGS}|" \
-		-e "s|	-Wl,-s| -Wl,-s ${LDFLAGS}|" \
+		-e "s|	-Wl,-s| -Wl,-s -lwrap ${LDFLAGS}|" \
 		${WRKSRC}/Makefile
-	${REINPLACE_CMD} -e \
+	@${REINPLACE_CMD} -e \
 		"s/#undef VSF_BUILD_TCPWRAPPERS/#define VSF_BUILD_TCPWRAPPERS 1/" \
 		${WRKSRC}/builddefs.h
-	${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \
+	@${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \
 		${WRKSRC}/vsftpd.conf
-	${REINPLACE_CMD} -e "s=/etc/v=${PREFIX}/etc/v=" \
+	@${REINPLACE_CMD} -e "s=/etc/v=${PREFIX}/etc/v=" \
 		${WRKSRC}/vsftpd.8 ${WRKSRC}/vsftpd.conf.5 ${WRKSRC}/tunables.c
 .if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
-	${REINPLACE_CMD} -e \
+	@${REINPLACE_CMD} -e \
 		"s/#undef VSF_BUILD_SSL/#define VSF_BUILD_SSL 1/" \
 		${WRKSRC}/builddefs.h
 .endif
 
+post-build:
+	@${SED} -e 's,%%RC_SUBR%%,${RC_SUBR},g' -e 's,%%PREFIX%%,${PREFIX},g' \
+		${FILESDIR}/${PORTNAME}.sh >${WRKDIR}/${PORTNAME}.sh
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/vsftpd ${PREFIX}/libexec/
 	${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${PREFIX}/etc/vsftpd.conf.dist
@@ -77,5 +84,9 @@
 	${CHMOD} -R -L a+rX,go-w ${DOCSDIR}/${i}/
 .endfor
 .endif
+
+post-install:
+	@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh \
+		${PREFIX}/etc/rc.d/${PORTNAME}.sh
 
 .include <bsd.port.post.mk>
diff -ruN vsftpd.orig/distinfo vsftpd/distinfo
--- vsftpd.orig/distinfo	Tue Jul  6 17:28:39 2004
+++ vsftpd/distinfo	Fri Apr  8 09:55:11 2005
@@ -1,2 +1,2 @@
-MD5 (vsftpd-2.0.1.tar.gz) = 63838791ec8b1375ed154fb2603e52e9
-SIZE (vsftpd-2.0.1.tar.gz) = 146231
+MD5 (vsftpd-2.0.3.tar.gz) = 74936cbd8e8251deb1cd99c5fb18b6f8
+SIZE (vsftpd-2.0.3.tar.gz) = 153266
diff -ruN vsftpd.orig/files/vsftpd.sh vsftpd/files/vsftpd.sh
--- vsftpd.orig/files/vsftpd.sh	Wed Dec 31 21:00:00 1969
+++ vsftpd/files/vsftpd.sh	Fri Apr  8 11:34:44 2005
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: vsftpd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+
+# Add the following line to /etc/rc.conf to enable `vsftpd':
+#
+# vsftpd_enable="YES"
+# vsftpd_flags="/some/path/conf.file" # Not required
+#
+
+. "%%RC_SUBR%%"
+
+name="vsftpd"
+rcvar=`set_rcvar`
+
+load_rc_config "$name"
+: ${vsftpd_enable="NO"}
+: ${vsftpd_flags=""}
+
+command="%%PREFIX%%/libexec/$name ${vsftpd_flags}"
+required_files="%%PREFIX%%/etc/$name.conf"
+
+vsftpd_check()
+{
+	cat ${required_files} | egrep -E "^listen.*=.*YES$" > /dev/null
+	if [ $? = 1 ]; then
+		err 1 "vsftpd script need "listen=YES" on config file"
+	fi
+	cat ${required_files} | egrep -E "^background.*=.*YES$" > /dev/null
+	if [ $? = 1 ]; then
+		err 1 "vsftpd script need "background=YES" on config file"
+	fi
+}
+
+vsftpd_check
+
+run_rc_command "$1"
diff -ruN vsftpd.orig/pkg-plist vsftpd/pkg-plist
--- vsftpd.orig/pkg-plist	Tue Jul  6 17:28:39 2004
+++ vsftpd/pkg-plist	Fri Apr  8 11:38:42 2005
@@ -3,6 +3,7 @@
 @unexec if diff -q %D/etc/vsftpd.conf %D/etc/vsftpd.conf.dist; then rm %D/etc/vsftpd.conf; fi
 etc/vsftpd.conf.dist
 @exec if [ ! -f %B/vsftpd.conf ]; then cp %B/vsftpd.conf.dist %B/vsftpd.conf; fi
+etc/rc.d/vsftpd.sh
 @exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi
 @unexec rmdir /var/ftp 2>/dev/null || true
 @dirrm share/vsftpd/empty
--- vsftpd.patch ends here ---


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



More information about the freebsd-ports-bugs mailing list