ftp/vsftpd-ext: unbreak build on 9.x i386 and clean up port
- Force clang on FreeBSD < 10.0 to resolve 9.x i386 build issues - Modernize USES with tar:tgz - Rely on USERS/GROUPS; remove pkg-install/pkg deinstall scripts - Remove direct chmod usage - Regen patch to pet portlint PR: 200791 Submitted by: Xu Jing <xjflyttp@gmail.com> (maintainer - original version) Approved by: delphij (mentor) MFH: 2015Q3
This commit is contained in:
parent
ce0db51f73
commit
9b02a7e3f0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=394236
@ -8,19 +8,16 @@ CATEGORIES= ftp ipv6
|
||||
MASTER_SITES= http://vsftpd.devnet.ru/files/${UPSTREAMVERSION}/ext.${EXTVERSION}/
|
||||
PKGNAMESUFFIX?= ${SSL_SUFFIX}${PKGNAMESUFFIX2}
|
||||
DISTNAME= vsFTPd-${UPSTREAMVERSION}-ext${EXTVERSION}
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= xjflyttp@gmail.com
|
||||
COMMENT= FTP daemon that aims to be "very secure". Extended build
|
||||
|
||||
BROKEN_FreeBSD_9_i386= does not link
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
UPSTREAMVERSION=3.0.2
|
||||
EXTVERSION= 1
|
||||
|
||||
USES= alias gmake
|
||||
USES= alias gmake tar:tgz
|
||||
WRKSRC= ${WRKDIR}/vsFTPd-${UPSTREAMVERSION}-ext.${EXTVERSION}
|
||||
ALL_TARGET= vsftpd
|
||||
|
||||
@ -41,11 +38,12 @@ CONFLICTS= vsftpd-3* vsftpd${SSL_SUFFIX}${PKGNAMESUFFIX2}-3*
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 902001
|
||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
|
||||
.if exists(/usr/bin/clang)
|
||||
CC= clang
|
||||
.else
|
||||
BUILD_DEPENDS+= clang33:${PORTSDIR}/lang/clang33
|
||||
CC= clang33
|
||||
.if ${ARCH} == i386
|
||||
BROKEN= does not build on 9.x i386
|
||||
.endif
|
||||
.endif
|
||||
|
||||
@ -115,7 +113,6 @@ do-install:
|
||||
.for i in EXAMPLE SECURITY
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}/${i}
|
||||
${CP} -p -R -L ${WRKSRC}/${i}/./ ${STAGEDIR}${DOCSDIR}/${i}/
|
||||
${CHMOD} -R -L a+rX,go-w ${STAGEDIR}${DOCSDIR}/${i}/
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- utility.c.orig Fri Jul 2 18:26:30 2004
|
||||
+++ utility.c Mon Oct 10 01:19:02 2005
|
||||
@@ -33,6 +33,10 @@
|
||||
--- utility.c.orig 2012-10-26 20:05:38 UTC
|
||||
+++ utility.c
|
||||
@@ -40,6 +40,10 @@ die2(const char* p_text1, const char* p_
|
||||
void
|
||||
bug(const char* p_text)
|
||||
{
|
||||
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD: /tmp/pcvs/ports/ftp/vsftpd-ext/pkg-deinstall,v 1.1 2009-06-16 03:53:39 pgollucci Exp $
|
||||
#
|
||||
|
||||
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
|
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD: /tmp/pcvs/ports/ftp/vsftpd-ext/pkg-install,v 1.1 2009-06-16 03:53:39 pgollucci Exp $
|
||||
#
|
||||
|
||||
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
|
Loading…
Reference in New Issue
Block a user