diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2019-01-20 19:25:07 +0800 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2019-01-20 19:25:07 +0800 |
commit | f7cd8bfb78a2ae011e17dbdc0d7c0b1e6eb3e653 (patch) | |
tree | d80d3a39788dbcfa89ba41aa7e03e22aac5ee243 /mail | |
parent | a2f29160777b0c53e9b4a1fb2a48c13a42ea161f (diff) | |
download | freebsd-ports-gnome-f7cd8bfb78a2ae011e17dbdc0d7c0b1e6eb3e653.tar.gz freebsd-ports-gnome-f7cd8bfb78a2ae011e17dbdc0d7c0b1e6eb3e653.tar.zst freebsd-ports-gnome-f7cd8bfb78a2ae011e17dbdc0d7c0b1e6eb3e653.zip |
mail/fetchmail depends overhaul, new fetchmailconf port
* Bring back SNI (server name indication) support for TLS connections,
lost in 6.3.26_10 (PORTREVISION=10) as a regression over _9.
Pointy hat: mandree@
* Drop the X11 option, remove the Python dependency, and create a new
mail/fetchmailconf slave port/package that installs the fetchmailconf
configurator. Note that the _DEPENDS of the ports reflects a technical
dependence (fetchmailconf needs fetchmail), and we cannot keep an
X11 option that depends on fetchmailconf, since that would create
a circular dependency, which we must avoid.
* Patch configure instead of configure.ac with Cy's Kerberos fix, drop
autoreconf from USES, and add a new configure check directly to set
HAVE_DECL_SSLV3_CLIENT_METHOD to cover the various TLS providers
(currently five, base, openssl, openssl111, libressl, libressl-devel)
* Add -Wl,--as-needed to LDFLAGS so as not to pull in unneeded .so
libraries, for instance, libcom_err when compiling under GSSAPI_NONE.
* Bump PORTREVISION.
Very fruitful and nice collaboration with and
Approved by: chalpin@cs.wisc.edu (maintainer)
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/fetchmail/Makefile | 68 | ||||
-rw-r--r-- | mail/fetchmail/files/patch-SNI-Gitlab-9b8b634 | 39 | ||||
-rw-r--r-- | mail/fetchmail/files/patch-configure | 53 | ||||
-rw-r--r-- | mail/fetchmail/files/patch-configure.ac | 24 | ||||
-rw-r--r-- | mail/fetchmail/pkg-plist | 6 | ||||
-rw-r--r-- | mail/fetchmailconf/Makefile | 37 | ||||
-rw-r--r-- | mail/fetchmailconf/distinfo | 7 | ||||
-rw-r--r-- | mail/fetchmailconf/files/fetchmailconf.in | 22 | ||||
-rw-r--r-- | mail/fetchmailconf/pkg-descr | 14 | ||||
-rw-r--r-- | mail/fetchmailconf/pkg-plist | 6 |
11 files changed, 208 insertions, 69 deletions
diff --git a/mail/Makefile b/mail/Makefile index f943fe7e36d9..1d088b6fd415 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -131,6 +131,7 @@ SUBDIR += fastforward SUBDIR += fdm SUBDIR += fetchmail + SUBDIR += fetchmailconf SUBDIR += filtermail SUBDIR += findmaildirs SUBDIR += geary diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile index 654cdfd2bc39..36fdf7194c0e 100644 --- a/mail/fetchmail/Makefile +++ b/mail/fetchmail/Makefile @@ -1,43 +1,48 @@ # Created by: Ville Eerola <ve@sci.fi> # $FreeBSD$ -PORTNAME= fetchmail +PORTNAME?= fetchmail PORTVERSION= 6.3.26 -PORTREVISION= 10 +PORTREVISION?= 11 CATEGORIES= mail ipv6 MASTER_SITES= SF/${PORTNAME}/branch_6.3/ \ http://mandree.home.pages.de/${PORTNAME}/ -PATCH_SITES= https://src.fedoraproject.org/rpms/fetchmail/raw/master/f/:fedora -PATCHFILES= fetchmail-6.3.26-ssl-backport.patch:-p1:fedora - +PATCH_SITES= https://src.fedoraproject.org/rpms/fetchmail/raw/master/f/:fedora +PATCHFILES= fetchmail-6.3.26-ssl-backport.patch:-p1:fedora MAINTAINER= chalpin@cs.wisc.edu -COMMENT= Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR +COMMENT?= Batch mail retrieval utility for IMAP/POP3/ETRN/ODMR LICENSE= GPLv2 LGPL21 LICENSE_COMB= dual +.if empty(MASTERDIR) RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss USERS= ${PORTNAME} GROUPS= ${USERS} -USES= autoreconf:build cpe gmake python shebangfix tar:xz ssl -SHEBANG_FILES= fetchmailconf.py +USES= cpe gmake tar:xz ssl USE_RC_SUBR= fetchmail SUB_FILES= pkg-message GNU_CONFIGURE= yes + +# the added PYTHON=: suppresses python builds, +# see ../../mail/fetchmailconf/ for the configuration tool CONFIGURE_ARGS= --enable-opie --enable-RPA --enable-SDPS \ --without-hesiod --enable-fallback=no \ - --with-ssl=${OPENSSLBASE} + --with-ssl=${OPENSSLBASE} PYTHON=: +# In case the user had an SSL-v2-capable SSL build, disable it: CONFIGURE_ENV= ac_cv_have_decl_SSLv2_client_method=no -LDFLAGS+= -L${LOCALBASE}/lib +# -Wl,--as-needed suppresses unneeded library references, +# for instance, libcom_err.so on GSSAPI_NONE builds: +LDFLAGS+= -L${LOCALBASE}/lib -Wl,--as-needed -OPTIONS_DEFINE= X11 NLS NTLM POP2 DOCS +OPTIONS_DEFINE= NLS NTLM POP2 DOCS OPTIONS_SINGLE= GSSAPI OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE OPTIONS_DEFAULT= GSSAPI_BASE @@ -51,8 +56,7 @@ GSSAPI_MIT_USES= gssapi:mit GSSAPI_MIT_CONFIGURE_ON= --with-kerberos5=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} GSSAPI_NONE_CONFIGURE_ON= --without-gssapi -X11_DESC= Python/Tkinter dependencies for ``fetchmailconf'' -POP2_DESC= POP2 Protocol support[obsolete] +POP2_DESC= POP2 Protocol support [obsolete] NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls @@ -63,51 +67,37 @@ NTLM_PORTDOCS= README.NTLM # POP2 is obsolete POP2_CONFIGURE_ENABLE= POP2 -X11_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR} -X11_CONFIGURE_OFF= PYTHON=: -X11_SUB_FILES_OFF= fetchmailconf - PORTDOCS= FAQ FEATURES NEWS NOTES README README.SSL \ design-notes.html fetchmail-FAQ.html fetchmail-features.html \ esrs-design-notes.html -#.include <bsd.port.options.mk> - post-patch: .if !exists(/usr/lib/libcom_err.so) @${REINPLACE_CMD} -e "s,-lcom_err,,g" ${WRKSRC}/configure .endif -# This is a workaround for a ports framework bug: -# As of r489889 on 2019-01-10, -# USES=autoreconf does not seem to get along with disabling the NLS option, -# because this would not install gettext-tools, omitting autopoint, -# however the configure.ac requests GETTEXT, so autoreconf will barf. -# Pulling in gettext-tools unconditionally (even with NLS off) would -# be excess and confuse users, so is not an option. -# Thus we set USES=autoreconf:build and run autoreconf by ourselves, -# overriding AUTOPOINT=true. -# -pre-configure-NLS-on: - (cd ${WRKSRC} && ${LOCALBASE}/bin/autoreconf -f -i) -# -pre-configure-NLS-off: - (cd ${WRKSRC} && ${SETENV} AUTOPOINT=${TRUE} ${LOCALBASE}/bin/autoreconf -f -i) +.endif + +# this avoids rebuilding the autotools rigs, i. e. USES+=autoreconf. +# It will clobber the AC_CHECK_DECLS([SSLv3_client_method],,,[#include <openssl/ssl.h>]) +# so we've put that into files/patch-configure as well: +pre-configure: + @${TOUCH} -d 2010-01-01T00:00:00 ${WRKSRC}/configure.ac +.if empty(MASTERDIR) post-build: - @${MAKE_CMD} -C ${WRKSRC} check + ${MAKE_CMD} -C ${WRKSRC} check post-install: ${INSTALL} -d ${STAGEDIR}/var/run/fetchmail ${INSTALL_DATA} ${FILESDIR}/fetchmailrc.sample \ ${STAGEDIR}${PREFIX}/etc/fetchmailrc.sample + ${RM} ${STAGEDIR}${PREFIX}/bin/fetchmailconf + ${RM} ${STAGEDIR}${PREFIX}/man/man1/fetchmailconf.1* post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} -post-install-X11-off: - ${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${STAGEDIR}${PREFIX}/bin - ${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${STAGEDIR}${PREFIX}/libexec - +.endif .include <bsd.port.mk> diff --git a/mail/fetchmail/files/patch-SNI-Gitlab-9b8b634 b/mail/fetchmail/files/patch-SNI-Gitlab-9b8b634 new file mode 100644 index 000000000000..db96b4208bf8 --- /dev/null +++ b/mail/fetchmail/files/patch-SNI-Gitlab-9b8b634 @@ -0,0 +1,39 @@ +Line numbers and --- line adapted. + +From 9b8b634312f169fab872f3580c2febe5af031615 Mon Sep 17 00:00:00 2001 +From: Matthias Andree <matthias.andree@gmx.de> +Date: Sat, 11 Feb 2017 19:39:56 +0100 +Subject: [PATCH] TLS: set hostname for SNI. + +--- + socket.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/socket.c b/socket.c +index aec319e3..17d60cbd 100644 +--- ./socket.c ++++ b/socket.c +@@ -1029,6 +1029,20 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck + _verify_ok = 1; + _prev_err = -1; + ++ /* ++ * Support SNI, some servers (googlemail) appear to require it. ++ */ ++ { ++ long r; ++ r = SSL_set_tlsext_host_name(_ssl_context[sock], servercname); ++ ++ if (0 == r) { ++ /* handle error */ ++ report(stderr, GT_("Warning: SSL_set_tlsext_host_name(%p, \"%s\") failed (code %#lx), trying to continue.\n"), _ssl_context[sock], servercname, r); ++ ERR_print_errors_fp(stderr); ++ } ++ } ++ + if( mycert || mykey ) { + + /* Ok... He has a certificate file defined, so lets declare it. If +-- +2.18.1 + diff --git a/mail/fetchmail/files/patch-configure b/mail/fetchmail/files/patch-configure new file mode 100644 index 000000000000..0ff6ec96d00a --- /dev/null +++ b/mail/fetchmail/files/patch-configure @@ -0,0 +1,53 @@ +--- configure.orig 2013-04-23 21:36:55 UTC ++++ configure +@@ -9552,11 +9552,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char krb5_des_string_to_key (); ++char krb5int_des_string_to_key (); + int + main () + { +-return krb5_des_string_to_key (); ++return krb5int_des_string_to_key (); + ; + return 0; + } +@@ -9591,11 +9591,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + #ifdef __cplusplus + extern "C" + #endif +-char krb5_des_string_to_key (); ++char krb5int_des_string_to_key (); + int + main () + { +-return krb5_des_string_to_key (); ++return krb5int_des_string_to_key (); + ; + return 0; + } +@@ -10131,6 +10131,22 @@ fi + + cat >>confdefs.h <<_ACEOF + #define HAVE_DECL_SSLV2_CLIENT_METHOD $ac_have_decl ++_ACEOF ++ ++ ;; ++esac ++ ++case "$LIBS" in *-lssl*) ++ ac_fn_c_check_decl "$LINENO" "SSLv3_client_method" "ac_cv_have_decl_SSLv3_client_method" "#include <openssl/ssl.h> ++" ++if test "x$ac_cv_have_decl_SSLv3_client_method" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_SSLV3_CLIENT_METHOD $ac_have_decl + _ACEOF + + ;; diff --git a/mail/fetchmail/files/patch-configure.ac b/mail/fetchmail/files/patch-configure.ac deleted file mode 100644 index a84e3216616d..000000000000 --- a/mail/fetchmail/files/patch-configure.ac +++ /dev/null @@ -1,24 +0,0 @@ ---- configure.ac.orig 2013-04-23 20:51:10 UTC -+++ configure.ac -@@ -19,7 +19,7 @@ AC_CANONICAL_HOST - dnl automake options are in Makefile.am - AC_PREREQ(2.60) - dnl 2.60 required for AC_USE_SYSTEM_EXTENSIONS --AM_INIT_AUTOMAKE([silent-rules -Wall]) -+AM_INIT_AUTOMAKE([silent-rules subdir-objects serial-tests]) - AM_SILENT_RULES - - dnl python is optional -@@ -601,10 +601,10 @@ else - AC_MSG_RESULT([found]) - ac_krblibs="-lcom_err" - AC_CHECK_LIB(crypto, -- krb5_des_string_to_key, -+ krb5int_des_string_to_key, - libk5crypto=-lcrypto, - AC_CHECK_LIB(k5crypto, -- krb5_des_string_to_key, -+ krb5int_des_string_to_key, - libk5crypto=-lk5crypto, - AC_MSG_ERROR([Kerberos 5 DES libraries not found]), - ${LDFLAGS} ${ac_krblibs}), diff --git a/mail/fetchmail/pkg-plist b/mail/fetchmail/pkg-plist index 9847065c1b54..bc4ed089b974 100644 --- a/mail/fetchmail/pkg-plist +++ b/mail/fetchmail/pkg-plist @@ -1,8 +1,5 @@ bin/fetchmail -bin/fetchmailconf man/man1/fetchmail.1.gz -man/man1/fetchmailconf.1.gz -%%NO_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 @@ -27,8 +24,5 @@ man/man1/fetchmailconf.1.gz %%NLS%%share/locale/tr/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/vi/LC_MESSAGES/fetchmail.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/fetchmail.mo -%%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.py -%%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyc -%%X11%%%%PYTHON_SITELIBDIR%%/fetchmailconf.pyo @sample(fetchmail,fetchmail,600) etc/fetchmailrc.sample @dir(fetchmail,fetchmail,755) /var/run/fetchmail diff --git a/mail/fetchmailconf/Makefile b/mail/fetchmailconf/Makefile new file mode 100644 index 000000000000..d557ae69eebb --- /dev/null +++ b/mail/fetchmailconf/Makefile @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTNAME= fetchmailconf +PORTREVISION= 0 +DISTNAME= fetchmail-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} + +MAINTAINER= chalpin@cs.wisc.edu +COMMENT= Python-based GUI to configure fetchmail + +LICENSE= GPLv2 LGPL21 +LICENSE_COMB= dual + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tkinter>=0:x11-toolkits/py-tkinter@${PY_FLAVOR} \ + fetchmail>=${PORTVERSION}:mail/fetchmail + +USES= python shebangfix tar:xz + +FILESDIR= ${.CURDIR}/files + +SHEBANG_FILES= fetchmailconf.py +SUB_FILES= fetchmailconf +PLIST= ${.CURDIR}/pkg-plist +NO_ARCH= yes + +GNU_CONFIGURE= yes + +TARGET= fetchmailconf +INSTALL_TARGET= install-data-am install-nodist_binSCRIPTS install-man + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${STAGEDIR}${PREFIX}/libexec + ${RM} ${STAGEDIR}${PREFIX}/man/man1/fetchmail.1* + +MASTERDIR= ${.CURDIR}/../fetchmail + +.include "${MASTERDIR}/Makefile" diff --git a/mail/fetchmailconf/distinfo b/mail/fetchmailconf/distinfo new file mode 100644 index 000000000000..b0080b347c89 --- /dev/null +++ b/mail/fetchmailconf/distinfo @@ -0,0 +1,7 @@ +TIMESTAMP = 1546191531 +SHA256 (fetchmail-6.3.26.tar.xz) = 79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 +SIZE (fetchmail-6.3.26.tar.xz) = 1283816 +SHA256 (9b8b634.patch) = b0a9f7e28e7e6a5a16669832ad7a7a7dca47b435ce446ef10bd0421deea4a848 +SIZE (9b8b634.patch) = 1023 +SHA256 (fetchmail-6.3.26-ssl-backport.patch) = a34b1a6becf731e2ef029a1c5ee3a82a7bbb1e2487b6f3be15bbb4e7dc8b500d +SIZE (fetchmail-6.3.26-ssl-backport.patch) = 31596 diff --git a/mail/fetchmailconf/files/fetchmailconf.in b/mail/fetchmailconf/files/fetchmailconf.in new file mode 100644 index 000000000000..32bb008144cd --- /dev/null +++ b/mail/fetchmailconf/files/fetchmailconf.in @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Wrapper for the real fetchmailconf. Checks whether Python and Tkinter are +# installed, and runs the real fetchmailconf or alerts the user, as appropriate. +# +# $FreeBSD$ + +LOCALBASE=%%LOCALBASE%% + +if [ -x $LOCALBASE/bin/python ] ; then + PYTHON_VERSION=python$(${LOCALBASE}/bin/python -c 'import sys; print sys.version[:3]' 2>/dev/null) + if [ -e ${LOCALBASE}/lib/${PYTHON_VERSION}/lib-dynload/_tkinter.so ]; then + exec ${LOCALBASE}/libexec/fetchmailconf.py "$@" + fi +fi +cat <<EOF +The fetchmailconf program requires Python with Tkinter, which does +not appear to be installed on this system. Python can be found in +the FreeBSD Ports Collection in lang/python, and Tkinter for Python +can be found in x11-toolkits/py-tkinter. +EOF +exit 1 diff --git a/mail/fetchmailconf/pkg-descr b/mail/fetchmailconf/pkg-descr new file mode 100644 index 000000000000..970903ce3ffc --- /dev/null +++ b/mail/fetchmailconf/pkg-descr @@ -0,0 +1,14 @@ +Fetchmail is a full-featured IMAP/POP2/POP3/APOP/KPOP/ETRN/ODMR client with +easy configuration, daemon mode, forwarding via SMTP or local MDA, and +superior reply handling. It is used to handle intermittent email connections +by acting as a coupling that seamlessly batch forwards fetched mail from your +mail server to your local delivery system, allowing you to read it with your +favourite mail user agent. Fetchmail also includes useful spam filtering and +multi-user functions. + +A typical use of fetchmail is to connect to your ISP's POP3 server, +downloading your mail into the INBOX on your local computer. You may then +read the mail, offline if you want, using pine, mutt, or any standard mail +user agent. + +WWW: http://www.fetchmail.info/ diff --git a/mail/fetchmailconf/pkg-plist b/mail/fetchmailconf/pkg-plist new file mode 100644 index 000000000000..901917414c2d --- /dev/null +++ b/mail/fetchmailconf/pkg-plist @@ -0,0 +1,6 @@ +bin/fetchmailconf +libexec/fetchmailconf.py +man/man1/fetchmailconf.1.gz +%%PYTHON_SITELIBDIR%%/fetchmailconf.py +%%PYTHON_SITELIBDIR%%/fetchmailconf.pyc +%%PYTHON_SITELIBDIR%%/fetchmailconf.pyo |