ports/170101: [PATCH] ftp/vsftpd: Fix build with clang 3.0
Hung-te Liang
lhd at cs.nctu.edu.tw
Tue Jul 24 06:30:14 UTC 2012
>Number: 170101
>Category: ports
>Synopsis: [PATCH] ftp/vsftpd: Fix build with clang 3.0
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 24 06:30:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Hung-te Liang
>Release: FreeBSD 9.0-RELEASE-p3 i386
>Organization:
>Environment:
System: FreeBSD bsd9 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 01:47:53 UTC 2012
>Description:
- Fix build with clang 3.0:
sysstr.c:77:40: error: implicit conversion from enumeration type 'enum EVSFSysStrOpenMode' to different enumeration type 'enum EVSFSysUtilOpenMode' [-Werror,-Wconversion]
enum EVSFSysUtilOpenMode open_mode = kVSFSysStrOpenUnknown;
~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
- Fix pass -rpath from compiler to linker
- Use OptionsNG
- Update pkg-descr from official website
Added file:
- files/patch-sysstr.c
Modified files:
- Makefile
- pkg-descr
Port maintainer (dinoex at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.99_6 (mode: change, diff: ports)
>How-To-Repeat:
>Fix:
--- vsftpd-3.0.0.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/ftp/vsftpd/Makefile /amd/cs/91/9123034/testports/vsftpd/Makefile
--- /usr/ports/ftp/vsftpd/Makefile 2012-05-28 17:49:56.000000000 +0800
+++ /amd/cs/91/9123034/testports/vsftpd/Makefile 2012-07-24 14:08:41.000000000 +0800
@@ -26,19 +26,21 @@
README README.security README.ssl REFS REWARD \
SIZE SPEED TODO TUNING
-OPTIONS= VSFTPD_SSL "Include support for SSL" off \
- PIDFILE "unofficial support for pidfile" off
+OPTIONS_DEFINE= VSFTPD_SSL PIDFILE
+
+VSFTPD_SSL_DESC=Include support for SSL
+PIDFILE_DESC= Unofficial support for pidfile
.include <bsd.port.pre.mk>
-.if defined(WITH_VSFTPD_SSL) && !defined(WITHOUT_SSL)
+.if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL)
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
SSL_SUFFIX= -ssl
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
.endif
-.if defined(WITH_PIDFILE)
+.if ${PORT_OPTIONS:MPIDFILE}
EXTRA_PATCHES+= ${FILESDIR}/pidfile.patch
.endif
@@ -46,7 +48,7 @@
LDFLAGS+= -lssp_nonshared
do-configure:
-.if !defined(WITHOUT_SSL) && defined(WITH_VSFTPD_SSL)
+.if !defined(WITHOUT_SSL) && ${PORT_OPTIONS:MVSFTPD_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|" \
@@ -65,7 +67,7 @@
-e "s|^CC = gcc|CC = ${CC}|" \
-e "s|^CFLAGS =|CFLAGS = ${CFLAGS}|" \
-e "s|^INSTALL =|INSTALL = ${INSTALL_PROGRAM}|" \
- -e "s| -Wl,-s| -Wl,-s ${LDFLAGS}|" \
+ -e "s| -Wl,-s| -Wl,-s ${LDFLAGS:S/-rpath=/-Wl,-rpath,/g}|" \
${WRKSRC}/Makefile
${REINPLACE_CMD} -e '/-lutil/d' ${WRKSRC}/vsf_findlibs.sh
@${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \
@@ -94,7 +96,7 @@
${INSTALL_MAN} -m 644 ${WRKSRC}/$${i} ${MANPREFIX}/man/man5/ ; \
done
${MKDIR} /var/ftp
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
.for i in ${DOCFILES}
${INSTALL_DATA} -m 644 ${WRKSRC}/${i} ${DOCSDIR}
diff -ruN --exclude=CVS /usr/ports/ftp/vsftpd/files/patch-sysstr.c /amd/cs/91/9123034/testports/vsftpd/files/patch-sysstr.c
--- /usr/ports/ftp/vsftpd/files/patch-sysstr.c 1970-01-01 08:00:00.000000000 +0800
+++ /amd/cs/91/9123034/testports/vsftpd/files/patch-sysstr.c 2012-07-24 11:27:53.000000000 +0800
@@ -0,0 +1,11 @@
+--- sysstr.c.orig 2011-12-14 18:26:39.000000000 +0800
++++ sysstr.c 2012-07-24 11:27:18.000000000 +0800
+@@ -74,7 +74,7 @@
+ int
+ str_open(const struct mystr* p_str, const enum EVSFSysStrOpenMode mode)
+ {
+- enum EVSFSysUtilOpenMode open_mode = kVSFSysStrOpenUnknown;
++ enum EVSFSysUtilOpenMode open_mode = (enum EVSFSysUtilOpenMode) kVSFSysStrOpenUnknown;
+ switch (mode)
+ {
+ case kVSFSysStrOpenReadOnly:
diff -ruN --exclude=CVS /usr/ports/ftp/vsftpd/pkg-descr /amd/cs/91/9123034/testports/vsftpd/pkg-descr
--- /usr/ports/ftp/vsftpd/pkg-descr 2009-01-17 00:38:35.000000000 +0800
+++ /amd/cs/91/9123034/testports/vsftpd/pkg-descr 2012-07-24 13:30:26.000000000 +0800
@@ -3,13 +3,13 @@
From the README file:
Author: Chris Evans
- Contact: chris at scary.beasts.org
+ Contact: scarybeasts at gmail.com
vsftpd is an FTP server, or daemon. The "vs" stands for Very
- Secure. Obviously this is not a guarantee, but a reflection
+ Secure. Obviously this is not a guarantee, but a reflection
that I have written the entire codebase with security in mind,
and carefully designed the program to be resilient to attack.
LICENSE: GPL2 or later with execption to link with OpenSSL
-WWW: http://vsftpd.beasts.org/
+WWW: https://security.appspot.com/vsftpd.html
--- vsftpd-3.0.0.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list