Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 2004 21:40:31 +0200 (CEST)
From:      Joerg Pulz <Joerg.Pulz@frm2.tum.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/68289: Update ftp/pure-ftpd to 1.0.19 + rcNG'ify + OPTIONS
Message-ID:  <200406241940.i5OJeVZw081947@hades.admin.frm2>
Resent-Message-ID: <200406241950.i5OJoRDD020257@freefall.freebsd.org>

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

>Number:         68289
>Category:       ports
>Synopsis:       Update ftp/pure-ftpd to 1.0.19 + rcNG'ify + OPTIONS
>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:   Thu Jun 24 19:50:27 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Joerg Pulz
>Release:        FreeBSD 5.2.1-RELEASE-p8 i386
>Organization:
TU-Munich / ZWE FRM-II
>Environment:
System: FreeBSD hades.admin.frm2 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #3: Fri Jun 11 08:51:32 CEST 2004 root@hades.admin.frm2:/usr/obj/usr/src/sys/HADES i386


	
>Description:
	Update ftp/pure-ftpd to the current version 1.0.19.
	use OPTIONS to to enable/disable LDAP,MySQL,PostgreSQL support
	and priviledge separation.
	new rc script which utilizes the rcNG system.

	small patch to fix core-dumps on 4.x system (from Frank DENIS via ML)
>How-To-Repeat:
	
>Fix:

	

--- pure-ftpd.diff begins here ---
diff -urN --exclude=CVS /usr/ports/ftp/pure-ftpd/Makefile pure-ftpd/Makefile
--- /usr/ports/ftp/pure-ftpd/Makefile	Thu May 27 18:43:45 2004
+++ pure-ftpd/Makefile	Thu Jun 24 21:05:45 2004
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	pure-ftpd
-PORTVERSION=	1.0.18
+PORTVERSION=	1.0.19
 PORTREVISION=	0
 CATEGORIES=	ftp ipv6
 MASTER_SITES=	ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/ \
@@ -23,6 +23,8 @@
 MAINTAINER=	j@pureftpd.org
 COMMENT=	A small, easy to set up, fast and very secure FTP server
 
+USE_RC_SUBR=	yes
+RC_DIR?=	${LOCALBASE}/etc/rc.d
 USE_BZIP2=	yes
 USE_REINPLACE=	yes
 GNU_CONFIGURE=	yes
@@ -33,6 +35,13 @@
 			--with-largefile \
 			--sysconfdir=${PREFIX}/etc
 
+OPTIONS=	LDAP		"With users in LDAP directories" off \
+		MYSQL		"With users in MySQL databases" off \
+		PGSQL		"With users in PostgreSQL databases" off \
+		WITH_PRIVSEP	"With privilege separation" off
+
+.include <bsd.port.pre.mk>
+
 # language support requested?
 .if defined(WITH_LANG)
 CONFIGURE_ARGS+=	--with-language="${WITH_LANG}"
@@ -76,8 +85,6 @@
 		pure-uploadscript.8 pure-pw.8 pure-pwconvert.8 pure-quotacheck.8 \
 		pure-authd.8
 
-.include <bsd.port.pre.mk>
-
 .if ${OSVERSION} > 500000
 PAM_TEMPL?=	${FILESDIR}/pam.conf.5
 .else
@@ -98,12 +105,10 @@
 
 CONTRIB=	xml_python_processors.txt pure-vpopauth.pl
 
+PLIST_SUB=	RC_DIR=${RC_DIR}
+
 pre-fetch:
 	@${ECHO_MSG} "You can use the following additional options:"
-	@${ECHO_MSG} "WITH_LDAP=1           - Support for users in LDAP directories"
-	@${ECHO_MSG} "WITH_MYSQL=1          - Support for users in MySQL databases"
-	@${ECHO_MSG} "WITH_PGSQL=1          - Support for users in PostgreSQL databases"
-	@${ECHO_MSG} "WITH_PRIVSEP=1        - Enable privilege separation"
 	@${ECHO_MSG} "WITH_CERTFILE=/path   - Set different location of certificate file for TLS"
 	@${ECHO_MSG} "WITH_LANG=lang        - Enable compilation of language support, lang is one of"
 	@${ECHO_MSG} "  english, german, romanian, french, french-funny, polish, spanish,"
@@ -128,7 +133,10 @@
 	@${MKDIR} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
-	${INSTALL_SCRIPT} ${FILESDIR}/pure-ftpd.sh.sample ${PREFIX}/etc/rc.d/
+	@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%RC_SUBR%%|${RC_SUBR}|g" \
+		< ${FILESDIR}/pure-ftpd.sh.sample > \
+		${WRKDIR}/pure-ftpd.sh
+	${INSTALL_SCRIPT} ${WRKDIR}/pure-ftpd.sh ${RC_DIR}/pure-ftpd.sh
 .if defined(PAM_TEMPL)
 	${MKDIR} ${PAM_DIR}
 	${INSTALL_DATA} ${PAM_TEMPL} ${PAM_DIR}/${PAM_TARGET}
diff -urN --exclude=CVS /usr/ports/ftp/pure-ftpd/distinfo pure-ftpd/distinfo
--- /usr/ports/ftp/pure-ftpd/distinfo	Mon Mar  8 23:33:50 2004
+++ pure-ftpd/distinfo	Thu Jun 24 19:56:36 2004
@@ -1,2 +1,2 @@
-MD5 (pure-ftpd-1.0.18.tar.bz2) = 56925bb7a35b07ca70e5453af731acba
-SIZE (pure-ftpd-1.0.18.tar.bz2) = 458995
+MD5 (pure-ftpd-1.0.19.tar.bz2) = 1ff9e9215d3b1fdad36571e892a726d1
+SIZE (pure-ftpd-1.0.19.tar.bz2) = 460292
diff -urN --exclude=CVS /usr/ports/ftp/pure-ftpd/files/patch-src_bsd-getopt_long.c pure-ftpd/files/patch-src_bsd-getopt_long.c
--- /usr/ports/ftp/pure-ftpd/files/patch-src_bsd-getopt_long.c	Thu Jan  1 01:00:00 1970
+++ pure-ftpd/files/patch-src_bsd-getopt_long.c	Thu Jun 24 21:19:25 2004
@@ -0,0 +1,11 @@
+--- src/bsd-getopt_long.c.orig  Sun Jun 20 19:29:34 2004
++++ src/bsd-getopt_long.c       Tue Jun 22 15:21:09 2004
+@@ -472,6 +472,8 @@
+                      *nargv[pure_optind + 1] != '-') {
+                      pure_optarg = nargv[++pure_optind];
+                  }
++            } else {
++                    pure_optarg = nargv[pure_optind];       
+             }
+         }
+         pure_place = EMSG;
diff -urN --exclude=CVS /usr/ports/ftp/pure-ftpd/files/pure-ftpd.sh.sample pure-ftpd/files/pure-ftpd.sh.sample
--- /usr/ports/ftp/pure-ftpd/files/pure-ftpd.sh.sample	Sun Jun 22 20:22:29 2003
+++ pure-ftpd/files/pure-ftpd.sh.sample	Thu Jun 24 20:42:58 2004
@@ -1,25 +1,29 @@
 #!/bin/sh
 
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
-    echo "$0: Cannot determine the PREFIX" >&2
-    exit 1
-fi
-
-
-case "$1" in
-start)
-	[ -r ${PREFIX}/etc/pure-ftpd.conf ] && \
-	${PREFIX}/sbin/pure-config.pl ${PREFIX}/etc/pure-ftpd.conf > /dev/null && \
-	echo -n ' pure-ftp'
-	;;
-stop)
-	[ -r /var/run/pure-ftpd.pid ] && \
-	kill `cat /var/run/pure-ftpd.pid` > /dev/null && \
-	echo -n ' pure-ftp'
-	;;
-*)
-	echo "Usage: `basename $0` {start|stop}" >&2
-	;;
-esac
+# PROVIDE: pureftpd
+# REQUIRE: NETWORKING SERVERS
+# BEFORE: DAEMON
+# KEYWORD: FreeBSD shutdown
 
-exit 0
+#
+# Add the following lines to /etc/rc.conf to enable samba:
+#
+#pureftpd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=pureftpd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/pure-config.pl
+pureftpd_config=${pureftpd_config:-"%%PREFIX%%/etc/pure-ftpd.conf"}
+required_files=${pureftpd_config}
+pidfile=/var/run/pure-ftpd.pid
+procname=pure-ftpd
+
+pureftpd_enable=${pureftpd_enable:-"NO"}
+command_args=${pureftpd_config}
+
+load_rc_config $name
+run_rc_command "$1"
diff -urN --exclude=CVS /usr/ports/ftp/pure-ftpd/pkg-plist pure-ftpd/pkg-plist
--- /usr/ports/ftp/pure-ftpd/pkg-plist	Wed Aug 13 12:42:47 2003
+++ pure-ftpd/pkg-plist	Thu Jun 24 20:24:52 2004
@@ -5,7 +5,7 @@
 etc/pureftpd-ldap.conf.sample
 etc/pureftpd-mysql.conf.sample
 etc/pureftpd-pgsql.conf.sample
-etc/rc.d/pure-ftpd.sh.sample
+@unexec %%RC_DIR%%/pure-ftpd.sh stop 2>/dev/null || true
 sbin/pure-authd
 sbin/pure-config.pl
 sbin/pure-ftpd
--- pure-ftpd.diff ends here ---


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



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