From owner-svn-ports-all@freebsd.org Thu Dec 27 16:59:24 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACAEE141ADB7; Thu, 27 Dec 2018 16:59:24 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5385E8360E; Thu, 27 Dec 2018 16:59:24 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E1EAE739; Thu, 27 Dec 2018 16:59:24 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBRGxOcW006964; Thu, 27 Dec 2018 16:59:24 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBRGxOhX006963; Thu, 27 Dec 2018 16:59:24 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201812271659.wBRGxOhX006963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Thu, 27 Dec 2018 16:59:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r488552 - head/ftp/vsftpd-ext X-SVN-Group: ports-head X-SVN-Commit-Author: amdmi3 X-SVN-Commit-Paths: head/ftp/vsftpd-ext X-SVN-Commit-Revision: 488552 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5385E8360E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2018 16:59:25 -0000 Author: amdmi3 Date: Thu Dec 27 16:59:23 2018 New Revision: 488552 URL: https://svnweb.freebsd.org/changeset/ports/488552 Log: - Fix build with SSL on 12.0 Vsftpd uses an ugly way of checking whether it needs to link libssl/libcrypto by grepping object file (!) for SSL_library_init (which may be or not be actually used depending on a define). This does not work if SSL_library_init is a macro which is the case with OpenSSL 1.1.0: /usr/include/openssl/ssl.h:# define SSL_library_init() OPENSSL_init_ssl(0, NULL) Because of this, on 12.0 the check always fails, OpenSSL libs are not linked, and the build fails with linker errors: /usr/bin/ld: error: undefined symbol: OPENSSL_init_ssl >>> referenced by ssl.c >>> ssl.o:(ssl_init) /usr/bin/ld: error: undefined symbol: TLS_server_method >>> referenced by ssl.c >>> ssl.o:(ssl_init) /usr/bin/ld: error: undefined symbol: SSL_CTX_new >>> referenced by ssl.c >>> ssl.o:(ssl_init) Since we know beforehand whether we need SSL, just replace the check with true if SSL is enabled. - While here, partially convert to options helpers Modified: head/ftp/vsftpd-ext/Makefile Modified: head/ftp/vsftpd-ext/Makefile ============================================================================== --- head/ftp/vsftpd-ext/Makefile Thu Dec 27 16:58:24 2018 (r488551) +++ head/ftp/vsftpd-ext/Makefile Thu Dec 27 16:59:23 2018 (r488552) @@ -53,6 +53,9 @@ CFLAGS+= -I${OPENSSLINC} LDFLAGS+= -L${OPENSSLLIB} .endif +post-patch-VSFTPD_SSL-on: + @${REINPLACE_CMD} -e 's|find_func SSL_library_init ssl.o|true|' ${WRKSRC}/vsf_findlibs.sh + do-configure: .if ${PORT_OPTIONS:MVSFTPD_SSL} && !defined(WITHOUT_SSL) ${REINPLACE_CMD} -e \ @@ -97,13 +100,13 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/vsftpd.conf.5 ${STAGEDIR}${PREFIX}/man/man5/ ${INSTALL_MAN} ${WRKSRC}/vsftpd.8 ${STAGEDIR}${PREFIX}/man/man8/ ${MKDIR} ${STAGEDIR}/var/ftp ${STAGEDIR}${PREFIX}/share/vsftpd/empty -.if ${PORT_OPTIONS:MDOCS} + +do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOCFILES:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}/ .for i in EXAMPLE SECURITY ${MKDIR} ${STAGEDIR}${DOCSDIR}/${i} ${CP} -p -R -L ${WRKSRC}/${i}/./ ${STAGEDIR}${DOCSDIR}/${i}/ .endfor -.endif .include