diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-18 20:54:41 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-18 20:54:41 +0000 |
commit | ea99a484345535a464a374dff9df4f53ca956dd0 (patch) | |
tree | 65a691eead9673ee80131af5bd33ca100ed461d2 /ftp | |
parent | 4e4e81c019ebbd2435cd0ccfd3106402a6c89067 (diff) | |
download | ports-ea99a484345535a464a374dff9df4f53ca956dd0.tar.gz ports-ea99a484345535a464a374dff9df4f53ca956dd0.zip |
Notes
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/bsdftpd-ssl/Makefile | 47 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/distinfo | 4 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/README.examples | 11 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh | 34 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh.compat (renamed from ftp/bsdftpd-ssl/files/bsdftpd-ssl.sh) | 15 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/ftpchroot | 15 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/ftpusers | 31 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/patch-aa | 89 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/pkg-message.server | 13 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/pkg-message.server.compat | 14 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/pkg-plist.server.compat | 22 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/files/rc_conf_d.bsdftpd_ssl | 16 | ||||
-rw-r--r-- | ftp/bsdftpd-ssl/pkg-plist | 8 |
13 files changed, 212 insertions, 107 deletions
diff --git a/ftp/bsdftpd-ssl/Makefile b/ftp/bsdftpd-ssl/Makefile index 70f1a62bd903..a239a6ab8143 100644 --- a/ftp/bsdftpd-ssl/Makefile +++ b/ftp/bsdftpd-ssl/Makefile @@ -6,14 +6,18 @@ # PORTNAME= bsdftpd-ssl -PORTVERSION= 1.0.2 +PORTVERSION= 1.1.0 PORTREVISION= 0 CATEGORIES= ftp -MASTER_SITES= http://bsdftpd-ssl.sc.ru/files/bsdftpd-ssl/archive/1.0/src/ +MASTER_SITES= http://bsdftpd-ssl.sc.ru/files/bsdftpd-ssl/archive/1.1/src/ DISTNAME= bsdftpd-ssl-${PORTVERSION} MAINTAINER= skynick@mail.sc.ru +USE_OPENSSL= yes + +.include <bsd.port.pre.mk> + # Client only part .if defined(CLIENT_ONLY) PKGNAMESUFFIX= -client @@ -28,13 +32,18 @@ MAN1= ftps.1 COMMENT= Secure FTP server with the TLS/SSL support MAN5= ftpchroot.5 xferlog.5 MAN8= ftpd.8 -MLINKS= ftpd.8 ftpd-ssl.8 +MLINKS= ftpd.8 ftpd-ssl.8 ftpchroot.5 ftpchroot-ssl.5 PKGMESSAGE= ${WRKDIR}/pkg-message -SED_ARG= 's|%%PREFIX%%|${PREFIX}|g; s|%%DOCSDIR%%|${DOCSDIR}|g' +SED_ARG= 's|%%PREFIX%%|${PREFIX}|g; s|%%DOCSDIR%%|${DOCSDIR}|g; s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g; s|%%RC_SUBR%%|${RC_SUBR}|g' +. if ${OSVERSION} >= 503001 +# FreeBSD >= 5.3 +USE_RC_SUBR= yes +. else +PLIST= ${FILESDIR}/pkg-plist.server.compat +. endif .endif MANCOMPRESSED= yes -USE_OPENSSL= yes BINOWN= root BINGRP= wheel @@ -50,15 +59,28 @@ MANDIR= ${PREFIX}/man/man DOCDIR= ${DOCSDIR}${PKGNAMESUFFIX} pre-build: +.if ${OSVERSION} < 500000 +# Compatibility with FreeBSD 4.x + (cd ${WRKSRC} && ./config.sh _conv_gcc29x) || exit +.endif (cd ${WRKSRC} && ./config.sh FreeBSD) || exit + do-build: # Client part (cd ${WRKSRC}/port && make && cd ${WRKSRC}/ftp && make) || exit # Server part .if !defined(CLIENT_ONLY) (cd ${WRKSRC}/ftpd && make) || exit +. if ${OSVERSION} >= 503001 +# FreeBSD >= 5.3 @${SED} ${SED_ARG} ${FILESDIR}/pkg-message.server > \ ${WRKDIR}/pkg-message + @${SED} ${SED_ARG} ${FILESDIR}/bsdftpd_ssl.sh > \ + ${WRKDIR}/bsdftpd_ssl.sh +. else + @${SED} ${SED_ARG} ${FILESDIR}/pkg-message.server.compat > \ + ${WRKDIR}/pkg-message +. endif .endif do-install: @@ -98,10 +120,21 @@ post-install: ${INSTALL_SCRIPT} -p ${WRKSRC}/cert/xCA.sh ${DOCDIR}/cert/xCA.sh .endif .if !defined(CLIENT_ONLY) - @${INSTALL_SCRIPT} ${FILESDIR}/bsdftpd-ssl.sh ${PREFIX}/etc/rc.d/bsdftpd-ssl.sh.sample +. if ${OSVERSION} >= 503001 +# FreeBSD >= 5.3 + ${MKDIR} ${EXAMPLESDIR} + ${MKDIR} ${EXAMPLESDIR}/rc.conf.d + ${INSTALL_DATA} -p ${FILESDIR}/README.examples ${EXAMPLESDIR}/README + ${INSTALL_DATA} -p ${FILESDIR}/ftpchroot ${EXAMPLESDIR}/ftpchroot + ${INSTALL_DATA} -p ${FILESDIR}/ftpusers ${EXAMPLESDIR}/ftpusers + ${INSTALL_DATA} -p ${FILESDIR}/rc_conf_d.bsdftpd_ssl ${EXAMPLESDIR}/rc.conf.d/bsdftpd_ssl + ${INSTALL_SCRIPT} ${WRKDIR}/bsdftpd_ssl.sh ${PREFIX}/etc/rc.d/bsdftpd_ssl.sh +. else + ${INSTALL_SCRIPT} ${FILESDIR}/bsdftpd_ssl.sh.compat ${PREFIX}/etc/rc.d/bsdftpd_ssl.sh.sample +. endif @${ECHO_CMD} "*******************************************************************************" @${CAT} ${PKGMESSAGE} @${ECHO_CMD} "*******************************************************************************" .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/ftp/bsdftpd-ssl/distinfo b/ftp/bsdftpd-ssl/distinfo index 8e6e713641b2..525d736d900f 100644 --- a/ftp/bsdftpd-ssl/distinfo +++ b/ftp/bsdftpd-ssl/distinfo @@ -1,2 +1,2 @@ -MD5 (bsdftpd-ssl-1.0.2.tar.gz) = 987d8645a254ec3695d21054a6cad91f -SIZE (bsdftpd-ssl-1.0.2.tar.gz) = 334010 +MD5 (bsdftpd-ssl-1.1.0.tar.gz) = 95030e721a5f8c3c98c3a367da8260ff +SIZE (bsdftpd-ssl-1.1.0.tar.gz) = 338931 diff --git a/ftp/bsdftpd-ssl/files/README.examples b/ftp/bsdftpd-ssl/files/README.examples new file mode 100644 index 000000000000..dbd1081c811d --- /dev/null +++ b/ftp/bsdftpd-ssl/files/README.examples @@ -0,0 +1,11 @@ +This directory contains example configuration files for the bsdftpd-ssl FTP +server: + +rc.conf.d/bsdftpd_ssl - the configuration parameters for rc.d/ startup script, + which is already installed as /usr/local/etc/rc.d/bsdftpd_ssl.sh. The + script actually do nothing until that parameters will be added into the + one of the /etc/rc.conf.d/bsdftpd_ssl or /etc/rc.conf files. + +ftpusers - the /etc/ftpusers file. + +ftpchroot - the /etc/ftpchroot file. diff --git a/ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh b/ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh new file mode 100644 index 000000000000..3b12d07cd253 --- /dev/null +++ b/ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# PROVIDE: bsdftpd_ssl +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# You need to set "bsdftpd_ssl_enable=YES" in either /etc/rc.conf, +# /etc/rc.conf.local or /etc/rc.conf.d/bsdftpd_ssl to make this script actually +# do something. There you can also set bsdftpd_ssl_flags. Note: the "-D" and +# "-p" options will be added automatically, you should not specify them. Please +# see the examples and the ftpd-ssl(8) man page for more information. +# + +. %%RC_SUBR%% + +name="bsdftpd_ssl" +rcvar=`set_rcvar` +pidfile="/var/run/ftpd.pid" +command="%%PREFIX%%/libexec/ftpd" +command_args="-D -p ${pidfile}" + +stop_postcmd="rm -f /var/run/ftpd.pid" + +# Set defaults + +bsdftpd_ssl_enable=${bsdftpd_ssl_enable:-"NO"} +bsdftpd_ssl_flags=${bsdftpd_ssl_flags:-""} + +# Run the daemon + +load_rc_config $name +run_rc_command "$1" diff --git a/ftp/bsdftpd-ssl/files/bsdftpd-ssl.sh b/ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh.compat index a5f27ddfca2f..94f75034ee6d 100644 --- a/ftp/bsdftpd-ssl/files/bsdftpd-ssl.sh +++ b/ftp/bsdftpd-ssl/files/bsdftpd_ssl.sh.compat @@ -1,10 +1,23 @@ #!/bin/sh -# Add extra options here for the BSDftpd-ssl FTP server. +# This is the startup script that runs bsdftpd-ssl FTP server in FreeBSD 4.x. + +# Set the value to "YES" to make this script actually do something. +ENABLE="NO" + +# Add extra options here for the FTP server. # See ftpd-ssl(8) for more details. EXTRAOPTS="-l" # You shouldn't edit anything below... +case ${ENABLE} in + [Yy][Ee][Ss]) + ;; + *) + exit 0 + ;; +esac + if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 diff --git a/ftp/bsdftpd-ssl/files/ftpchroot b/ftp/bsdftpd-ssl/files/ftpchroot new file mode 100644 index 000000000000..37c6f4efc165 --- /dev/null +++ b/ftp/bsdftpd-ssl/files/ftpchroot @@ -0,0 +1,15 @@ +## +## This is the example "/etc/ftpchroot" file for the bsdftpd-ssl FTP server. +## The syntax of this file is described in the ftpchroot-ssl(8) man page. +## + +## "Pseudo-chroot" for system administrators. +@wheel / + +## Chroot webmasters to the location of the web site, and chroot web users to +## their respective ~/public_html. +# @webmasters /var/www/ +# @webusers public_html + +## Chroot all other users to their home directories. +@ diff --git a/ftp/bsdftpd-ssl/files/ftpusers b/ftp/bsdftpd-ssl/files/ftpusers new file mode 100644 index 000000000000..ebfdcb285021 --- /dev/null +++ b/ftp/bsdftpd-ssl/files/ftpusers @@ -0,0 +1,31 @@ +## +## This is the example "/etc/ftpusers" file for the bsdftpd-ssl FTP server. +## The syntax of this file is described in the ftpd-ssl(8) man page. +## + +## Deny various system users. +root +toor +daemon +operator +bin +tty +kmem +games +news +man +sshd +bind +proxy +_pflogd +uucp +pop +www +nobody +mailnull +smmsp + +## Deny members of the "noftp" group. +# @noftp + +## All other users are allowed. diff --git a/ftp/bsdftpd-ssl/files/patch-aa b/ftp/bsdftpd-ssl/files/patch-aa deleted file mode 100644 index 713ef5d84f92..000000000000 --- a/ftp/bsdftpd-ssl/files/patch-aa +++ /dev/null @@ -1,89 +0,0 @@ -diff -urN bsdftpd-ssl.ORI/ftp/ftp.c bsdftpd-ssl/ftp/ftp.c ---- ftp/ftp.c Sun Jul 4 22:00:32 2004 -+++ ftp/ftp.c Fri Aug 6 22:13:06 2004 -@@ -1544,6 +1544,7 @@ - prt[1] &= 0xff; - error = 0; - epsv_done: -+ ; - } else - error = 1; - -@@ -1867,6 +1868,7 @@ - - return NULL; - default: -+ ; - } - - X509_free(x509_ssl_con); -@@ -1982,6 +1984,7 @@ - - return NULL; - default: -+ ; - } - - X509_free(x509_ssl_con); -diff -urN bsdftpd-ssl.ORI/ftp/util.c bsdftpd-ssl/ftp/util.c ---- ftp/util.c Mon May 31 02:24:47 2004 -+++ ftp/util.c Fri Aug 6 21:59:59 2004 -@@ -987,6 +987,7 @@ - ssl_log_msgn(bio_err,"Reason: Certificate revoked"); - break; - default: -+ ; - } - - warnx("TLS/SSL connection to server failed"); -diff -urN bsdftpd-ssl.ORI/ftpd/ftpd.c bsdftpd-ssl/ftpd/ftpd.c ---- ftpd/ftpd.c Thu Jul 8 02:35:54 2004 -+++ ftpd/ftpd.c Fri Aug 6 21:46:26 2004 -@@ -2262,6 +2262,7 @@ - SSL_get_shutdown(ssl_data_con); - break; - default: -+ ; - } - } - SSL_free(ssl_data_con); -@@ -2385,6 +2386,7 @@ - SSL_get_shutdown(ssl_data_con); - break; - default: -+ ; - } - } - SSL_free(ssl_data_con); -@@ -2636,6 +2638,7 @@ - - return NULL; - default: -+ ; - } - - X509_free(x509_ssl_con); -@@ -2797,6 +2800,7 @@ - - return NULL; - default: -+ ; - } - - X509_free(x509_ssl_con); -@@ -4100,6 +4104,7 @@ - SSL_get_shutdown(ssl_data_con); - break; - default: -+ ; - } - } - SSL_free(ssl_data_con); -@@ -4214,6 +4219,7 @@ - SSL_get_shutdown(ssl_data_con); - break; - default: -+ ; - } - } - SSL_free(ssl_data_con); diff --git a/ftp/bsdftpd-ssl/files/pkg-message.server b/ftp/bsdftpd-ssl/files/pkg-message.server index 8f1643a2f72d..e3c5a6d1c158 100644 --- a/ftp/bsdftpd-ssl/files/pkg-message.server +++ b/ftp/bsdftpd-ssl/files/pkg-message.server @@ -1,14 +1,13 @@ ============================================================================= You will also need to read "Configuration" and "Supplement information" parts -of %%DOCSDIR%%/INSTALL file from the package documentation -for the subsequent configuration steps: +of the %%DOCSDIR%%/INSTALL file from the package +documentation for the subsequent configuration steps: 1. Create the server certificate 2. Edit PAM configuration 3. Start the FTP server -If you want to run the FTP server in the daemon mode, you can copy the sample -start-up script %%PREFIX%%/etc/rc.d/bsdftpd-ssl.sh.sample to -%%PREFIX%%/etc/rc.d/bsdftpd-ssl.sh. - -Please note: the manual page for the FTP server is available as ftpd-ssl(8). +Please note: +- The example configuration files are available in the + %%EXAMPLESDIR%% directory. +- The manual page for the FTP server is available as ftpd-ssl(8). ============================================================================= diff --git a/ftp/bsdftpd-ssl/files/pkg-message.server.compat b/ftp/bsdftpd-ssl/files/pkg-message.server.compat new file mode 100644 index 000000000000..8637a1fbc643 --- /dev/null +++ b/ftp/bsdftpd-ssl/files/pkg-message.server.compat @@ -0,0 +1,14 @@ +============================================================================= +You will also need to read "Configuration" and "Supplement information" parts +of %%DOCSDIR%%/INSTALL file from the package documentation +for the subsequent configuration steps: + 1. Create the server certificate + 2. Edit PAM configuration + 3. Start the FTP server + +If you want to run the FTP server in the daemon mode, you can copy the sample +start-up script %%PREFIX%%/etc/rc.d/bsdftpd_ssl.sh.sample to +%%PREFIX%%/etc/rc.d/bsdftpd_ssl.sh. + +Please note: the manual page for the FTP server is available as ftpd-ssl(8). +============================================================================= diff --git a/ftp/bsdftpd-ssl/files/pkg-plist.server.compat b/ftp/bsdftpd-ssl/files/pkg-plist.server.compat new file mode 100644 index 000000000000..71c4aff5a04d --- /dev/null +++ b/ftp/bsdftpd-ssl/files/pkg-plist.server.compat @@ -0,0 +1,22 @@ +bin/ftps +etc/rc.d/bsdftpd_ssl.sh.sample +libexec/ftpd +%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/cert/cert-nopass.sh +%%PORTDOCS%%%%DOCSDIR%%/cert/cert-pass.sh +%%PORTDOCS%%%%DOCSDIR%%/cert/cert-dummy.sh +%%PORTDOCS%%%%DOCSDIR%%/cert/xCA.sh +%%PORTDOCS%%%%DOCSDIR%%/docs/README +%%PORTDOCS%%%%DOCSDIR%%/docs/cert-basics.txt +%%PORTDOCS%%%%DOCSDIR%%/docs/cert-howto.txt +%%PORTDOCS%%%%DOCSDIR%%/docs/ciphers.txt +%%PORTDOCS%%%%DOCSDIR%%/docs/licenses +%%PORTDOCS%%%%DOCSDIR%%/docs/standards.txt +%%PORTDOCS%%%%DOCSDIR%%/docs/verify.txt +%%PORTDOCS%%%%DOCSDIR%%/docs/x509_auth.txt +%%PORTDOCS%%@dirrm %%DOCSDIR%%/cert +%%PORTDOCS%%@dirrm %%DOCSDIR%%/docs +%%PORTDOCS%%@dirrm %%DOCSDIR%% diff --git a/ftp/bsdftpd-ssl/files/rc_conf_d.bsdftpd_ssl b/ftp/bsdftpd-ssl/files/rc_conf_d.bsdftpd_ssl new file mode 100644 index 000000000000..dea71edb1029 --- /dev/null +++ b/ftp/bsdftpd-ssl/files/rc_conf_d.bsdftpd_ssl @@ -0,0 +1,16 @@ +## +## This file contains configuration parameters for the bsdftpd-ssl FTP server, +## whose are required to run it in the daemon mode with help of rc.d/ script. +## +## There are several ways to make those parameters available for the script: +## 1. Copy this file into the /etc/rc.conf.d/bsdftpd_ssl one. +## 2. Add the following parameters into /etc/rc.conf file. +## + +## Set this flag to "YES" to run the bsdftpd-ssl FTP server in the daemon mode. +bsdftpd_ssl_enable=NO + +## Command-line options for the FTP server, see ftpd-ssl(8) man page for more +## information. The "-D" and "-p" options will be added automatically, you +## should not specify them. +bsdftpd_ssl_flags="-l -l" diff --git a/ftp/bsdftpd-ssl/pkg-plist b/ftp/bsdftpd-ssl/pkg-plist index ef0447bc5741..108e664f9af4 100644 --- a/ftp/bsdftpd-ssl/pkg-plist +++ b/ftp/bsdftpd-ssl/pkg-plist @@ -1,5 +1,5 @@ bin/ftps -etc/rc.d/bsdftpd-ssl.sh.sample +etc/rc.d/bsdftpd_ssl.sh libexec/ftpd %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT %%PORTDOCS%%%%DOCSDIR%%/README @@ -17,6 +17,12 @@ libexec/ftpd %%PORTDOCS%%%%DOCSDIR%%/docs/standards.txt %%PORTDOCS%%%%DOCSDIR%%/docs/verify.txt %%PORTDOCS%%%%DOCSDIR%%/docs/x509_auth.txt +%%PORTDOCS%%%%EXAMPLESDIR%%/README +%%PORTDOCS%%%%EXAMPLESDIR%%/ftpchroot +%%PORTDOCS%%%%EXAMPLESDIR%%/ftpusers +%%PORTDOCS%%%%EXAMPLESDIR%%/rc.conf.d/bsdftpd_ssl %%PORTDOCS%%@dirrm %%DOCSDIR%%/cert %%PORTDOCS%%@dirrm %%DOCSDIR%%/docs %%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/rc.conf.d +%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% |