diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2013-12-31 07:41:01 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2013-12-31 07:41:01 +0000 |
commit | 4cc160ab2d1b420c40d421484104420190f62076 (patch) | |
tree | 3cd1bfc6c459d3d0d7f7e4501e367916b7229c38 /ftp | |
parent | - Update to 1.36 (diff) |
- remove user ftp on deinstall
- remove deinstall/install scripts
- create /var/ftp in stage
PR: 185300
Notes
Notes:
svn path=/head/; revision=338258
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/vsftpd/Makefile | 6 | ||||
-rw-r--r-- | ftp/vsftpd/pkg-deinstall | 16 | ||||
-rw-r--r-- | ftp/vsftpd/pkg-install | 36 | ||||
-rw-r--r-- | ftp/vsftpd/pkg-plist | 6 |
4 files changed, 6 insertions, 58 deletions
diff --git a/ftp/vsftpd/Makefile b/ftp/vsftpd/Makefile index 3655134039dd..7c641e2bd39f 100644 --- a/ftp/vsftpd/Makefile +++ b/ftp/vsftpd/Makefile @@ -56,7 +56,7 @@ VSFTPD_NO_SSP= -e "s|-fstack-protector --param=ssp-buffer-size=4 ||" .endif do-configure: -.if !defined(WITHOUT_SSL) && ${PORT_OPTIONS:MVSFTPD_SSL} +.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL) ${REINPLACE_CMD} -e \ "s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \ -e "s|#undef VSF_BUILD_SSL|#define VSF_BUILD_SSL 1|" \ @@ -86,14 +86,12 @@ do-configure: @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# listen=YES" @${ECHO_CMD} >>${WRKSRC}/vsftpd.conf "# background=YES" -pre-install: - ${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/vsftpd ${STAGEDIR}${PREFIX}/libexec/ ${INSTALL_DATA} ${WRKSRC}/vsftpd.conf ${STAGEDIR}${PREFIX}/etc/vsftpd.conf.dist ${INSTALL_MAN} ${WRKSRC}/vsftpd.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5/ ${INSTALL_MAN} ${WRKSRC}/vsftpd.8 ${STAGEDIR}${MANPREFIX}/man/man8/ + ${MKDIR} ${STAGEDIR}/var/ftp .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} -m 644 ${DOCFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ diff --git a/ftp/vsftpd/pkg-deinstall b/ftp/vsftpd/pkg-deinstall deleted file mode 100644 index 96fbc043082b..000000000000 --- a/ftp/vsftpd/pkg-deinstall +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -USER=ftp - -if pw usershow "${USER}" 2>/dev/null 1>&2; then - echo "To delete FTP user permanently, use 'pw userdel ${USER}'" - echo "Don't do this if you're using FreeBSD's anonymous FTP server" -fi - -exit 0 diff --git a/ftp/vsftpd/pkg-install b/ftp/vsftpd/pkg-install deleted file mode 100644 index b9123aae27bb..000000000000 --- a/ftp/vsftpd/pkg-install +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# - -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -if ! pw groupshow operator >/dev/null; then - if pw groupadd operator 5; then - echo "Added group operator for vsftpd" - else - echo "Failed to add group operator as gid 5" >&2 - exit 1 - fi -fi - -if ! pw usershow ftp >/dev/null; then - if pw useradd ftp -g operator -u 14 -h - -d /var/ftp -s /nonexistent -c "Anonymous Ftp"; then - echo "Added user ftp for vsftpd" - else - echo "Failed to add user ftp as gid 14" >&2 - exit 1 - fi -fi - -# uid=14(ftp) gid=5(operator) groups=5(operator) -view="$(id ftp)" -view="${view%% *}" -if test "${view}" = "uid=14(ftp)"; then - exit 0 -fi - -echo "User ftp should have uid 14"; >&2 -exit 1 -# eof diff --git a/ftp/vsftpd/pkg-plist b/ftp/vsftpd/pkg-plist index 71abc90dbcfe..a7c4feb77c31 100644 --- a/ftp/vsftpd/pkg-plist +++ b/ftp/vsftpd/pkg-plist @@ -1,12 +1,14 @@ libexec/vsftpd man/man5/vsftpd.conf.5.gz man/man8/vsftpd.8.gz -@exec mkdir -p %D/share/vsftpd/empty +@exec if ! pw usershow ftp 2>/dev/null; then pw useradd ftp -g operator -u 14 -h - -d /var/ftp -s /nonexistent -c "Anonymous Ftp"; fi +@unexec if pw usershow ftp | grep -q 14:5; then pw userdel ftp; fi @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 -@exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi @unexec rmdir /var/ftp 2>/dev/null || true +@exec if [ ! -d /var/ftp ]; then mkdir /var/ftp ; fi +@exec mkdir -p %D/share/vsftpd/empty @dirrm share/vsftpd/empty @dirrm share/vsftpd %%PORTDOCS%%%%DOCSDIR%%/AUDIT |