From owner-svn-ports-head@freebsd.org Tue Jun 21 06:14:43 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B7CA7B355; Tue, 21 Jun 2016 06:14:43 +0000 (UTC) (envelope-from brnrd@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 mx1.freebsd.org (Postfix) with ESMTPS id 015A11C70; Tue, 21 Jun 2016 06:14:42 +0000 (UTC) (envelope-from brnrd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5L6EgVT012839; Tue, 21 Jun 2016 06:14:42 GMT (envelope-from brnrd@FreeBSD.org) Received: (from brnrd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5L6EfIQ012835; Tue, 21 Jun 2016 06:14:41 GMT (envelope-from brnrd@FreeBSD.org) Message-Id: <201606210614.u5L6EfIQ012835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brnrd set sender to brnrd@FreeBSD.org using -f From: Bernard Spil Date: Tue, 21 Jun 2016 06:14:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r417187 - in head/mail/fetchmail: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 06:14:43 -0000 Author: brnrd Date: Tue Jun 21 06:14:41 2016 New Revision: 417187 URL: https://svnweb.freebsd.org/changeset/ports/417187 Log: mail/fetchmail: Fix build without SSLv3 - Fix build with OpenSSL 1.1 and LibreSSL - Stop using pkg-install/pkg-deinstall scripts - Use pkg-plist keywords - Use GSSAPI ports framework - Change X11, POP2 options to use options framework PR: 210130 Submitted by: freebsd-ports@charlieroot.de Reviewed by: Corey Halpin (maintainer) Approved by: Corey Halpin (maintainer) Added: head/mail/fetchmail/files/patch-fetchmail.c (contents, props changed) head/mail/fetchmail/files/patch-socket.c (contents, props changed) Deleted: head/mail/fetchmail/files/pkg-deinstall.in head/mail/fetchmail/files/pkg-install.in Modified: head/mail/fetchmail/Makefile head/mail/fetchmail/pkg-plist Modified: head/mail/fetchmail/Makefile ============================================================================== --- head/mail/fetchmail/Makefile Tue Jun 21 06:13:25 2016 (r417186) +++ head/mail/fetchmail/Makefile Tue Jun 21 06:14:41 2016 (r417187) @@ -3,7 +3,7 @@ PORTNAME= fetchmail PORTVERSION= 6.3.26 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail ipv6 MASTER_SITES= SF/${PORTNAME}/branch_6.3/ \ http://mandree.home.pages.de/${PORTNAME}/ @@ -16,7 +16,6 @@ LICENSE_COMB= dual RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss -# Note USERS can only contain a single word as parts below rely on that. USERS= ${PORTNAME} GROUPS= ${USERS} @@ -24,8 +23,7 @@ USES= cpe gmake shebangfix tar:xz SHEBANG_FILES= fetchmailconf.py USE_RC_SUBR= fetchmail -SUB_FILES= pkg-message pkg-install pkg-deinstall -SUB_LIST+= USERS=${USERS} GROUPS=${GROUPS} PORTNAME=${PORTNAME} +SUB_FILES= pkg-message GNU_CONFIGURE= yes USE_OPENSSL= yes @@ -36,60 +34,42 @@ CONFIGURE_ENV= ac_cv_have_decl_SSLv2_cli LDFLAGS+= -L${LOCALBASE}/lib -OPTIONS_DEFINE= X11 NLS NTLM GSSAPI POP2 DOCS -OPTIONS_DEFAULT= GSSAPI +OPTIONS_DEFINE= X11 NLS NTLM POP2 DOCS +OPTIONS_SINGLE= GSSAPI +OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE +OPTIONS_DEFAULT= GSSAPI_BASE OPTIONS_SUB= yes + +GSSAPI_BASE_USES= gssapi +GSSAPI_BASE_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} +GSSAPI_HEIMDAL_USES= gssapi:heimdal +GSSAPI_HEIMDAL_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} +GSSAPI_MIT_USES= gssapi:mit +GSSAPI_MIT_CONFIGURE_ON= --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} +GSSAPI_NONE_CONFIGURE_ON= --without-gssapi + X11_DESC= Python/Tkinter dependencies for ``fetchmailconf'' POP2_DESC= POP2 Protocol support[obsolete] NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls -NLS_CONFIGURE_ON= --enable-nls -NLS_CONFIGURE_OFF= --disable-nls - -PORTDOCS= FAQ FEATURES NEWS NOTES README README.SSL \ - design-notes.html fetchmail-FAQ.html fetchmail-features.html \ - esrs-design-notes.html -.include +NTLM_CONFIGURE_ENABLE= NTLM +NTLM_PORTDOCS= README.NTLM -# Pop2 is obsolete -.if ${PORT_OPTIONS:MPOP2} -CONFIGURE_ARGS+= --enable-POP2 -.endif +# POP2 is obsolete +POP2_CONFIGURE_ENABLE= POP2 -.if ${PORT_OPTIONS:MX11} -USES+= python -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter -PLIST_SUB+= NOX11="@comment " -.else -CONFIGURE_ARGS+= PYTHON=: -SUB_FILES+= fetchmailconf -PLIST_SUB+= NOX11="" -.endif +X11_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter +X11_USES= python +X11_CONFIGURE_OFF= PYTHON=: +X11_SUB_FILES_OFF= fetchmailconf -.if ${PORT_OPTIONS:MGSSAPI} -.if !defined(KRB5_HOME) -.if exists(${LOCALBASE}/lib/libkrb5.a) -KRB5_HOME= ${LOCALBASE} -.elif exists(/usr/lib/libkrb5.a) -KRB5_HOME= /usr -.endif -.endif - -.if defined(KRB5_HOME) && !exists(${KRB5_HOME}/lib/libkrb5.a) -BROKEN= KRB5_HOME is set but doesn\'t provide lib/libkrb5.a -.endif - -.if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libkrb5.a) -CONFIGURE_ARGS+= --with-gssapi=${KRB5_HOME} -.endif -.endif +PORTDOCS= FAQ FEATURES NEWS NOTES README README.SSL \ + design-notes.html fetchmail-FAQ.html fetchmail-features.html \ + esrs-design-notes.html -.if ${PORT_OPTIONS:MNTLM} -CONFIGURE_ARGS+= --enable-NTLM -PORTDOCS+= README.NTLM -.endif +#.include post-patch: .if !exists(/usr/lib/libcom_err.so) @@ -99,7 +79,8 @@ post-patch: post-build: @${MAKE_CMD} -C ${WRKSRC} check -post-install: +post-stage: + ${INSTALL} -d ${STAGEDIR}/var/run/fetchmail ${INSTALL_DATA} ${FILESDIR}/fetchmailrc.sample \ ${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample Added: head/mail/fetchmail/files/patch-fetchmail.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/fetchmail/files/patch-fetchmail.c Tue Jun 21 06:14:41 2016 (r417187) @@ -0,0 +1,26 @@ +--- fetchmail.c.orig 2013-04-23 20:00:45 UTC ++++ fetchmail.c +@@ -50,6 +50,10 @@ + #include + #include + ++#ifdef SSL_ENABLE ++#include ++#endif ++ + #ifndef ENETUNREACH + #define ENETUNREACH 128 /* Interactive doesn't know this */ + #endif /* ENETUNREACH */ +@@ -263,6 +267,12 @@ int main(int argc, char **argv) + #ifdef SSL_ENABLE + "+SSL" + #endif ++#ifdef OPENSSL_NO_SSL2 ++ "-SSLv2" ++#endif ++#ifdef OPENSSL_NO_SSL3_METHOD ++ "-SSLv3" ++#endif + #ifdef OPIE_ENABLE + "+OPIE" + #endif /* OPIE_ENABLE */ Added: head/mail/fetchmail/files/patch-socket.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/fetchmail/files/patch-socket.c Tue Jun 21 06:14:41 2016 (r417187) @@ -0,0 +1,24 @@ +--- socket.c.orig 2013-04-23 20:00:45 UTC ++++ socket.c +@@ -907,14 +907,19 @@ int SSLOpen(int sock, char *mycert, char + _ssl_context[sock] = NULL; + if(myproto) { + if(!strcasecmp("ssl2",myproto)) { +-#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0 ++#ifndef OPENSSL_NO_SSL2 + _ctx[sock] = SSL_CTX_new(SSLv2_client_method()); + #else +- report(stderr, GT_("Your operating system does not support SSLv2.\n")); ++ report(stderr, GT_("Your OpenSSL version does not support SSLv2.\n")); + return -1; + #endif + } else if(!strcasecmp("ssl3",myproto)) { ++#ifndef OPENSSL_NO_SSL3_METHOD + _ctx[sock] = SSL_CTX_new(SSLv3_client_method()); ++#else ++ report(stderr, GT_("Your OpenSSL version does not support SSLv3.\n")); ++ return -1; ++#endif + } else if(!strcasecmp("tls1",myproto)) { + _ctx[sock] = SSL_CTX_new(TLSv1_client_method()); + } else if (!strcasecmp("ssl23",myproto)) { Modified: head/mail/fetchmail/pkg-plist ============================================================================== --- head/mail/fetchmail/pkg-plist Tue Jun 21 06:13:25 2016 (r417186) +++ head/mail/fetchmail/pkg-plist Tue Jun 21 06:14:41 2016 (r417187) @@ -2,7 +2,7 @@ bin/fetchmail bin/fetchmailconf man/man1/fetchmail.1.gz man/man1/fetchmailconf.1.gz -%%NOX11%%libexec/fetchmailconf.py +%%X11%%libexec/fetchmailconf.py %%NLS%%share/locale/ca/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/cs/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/da/LC_MESSAGES/fetchmail.mo @@ -30,4 +30,5 @@ man/man1/fetchmailconf.1.gz %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.py %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyc %%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyo -@sample etc/fetchmailrc.sample +@sample(fetchmail,fetchmail,600) etc/fetchmailrc.sample +@dir(fetchmail,fetchmail,755) /var/run/fetchmail