Bug 174345

Summary: [PATCH] mail/fetchmail: update to 6.3.23
Product: Ports & Packages Reporter: Matthias Andree <mandree>
Component: Individual Port(s)Assignee: Marcelo Araujo <araujo>
Status: Closed FIXED    
Severity: Affects Only Me CC: chalpin
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
fetchmail-6.3.23.patch none

Description Matthias Andree freebsd_committer freebsd_triage 2012-12-10 22:00:01 UTC
- Update to 6.3.23

Port maintainer (chalpin@cs.wisc.edu) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: update, diff: ports)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-12-10 22:00:36 UTC
Maintainer of mail/fetchmail,

Please note that PR ports/174345 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/174345

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-12-10 22:00:37 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Corey Halpin 2012-12-11 01:58:11 UTC
  Approve.

~crh
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-12-11 03:38:58 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Marcelo Araujo freebsd_committer freebsd_triage 2012-12-11 11:09:39 UTC
Responsible Changed
From-To: freebsd-ports-bugs->araujo

I'll take it.
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2012-12-14 00:38:32 UTC
State Changed
From-To: open->suspended

Please do not upgrade to 6.3.23 - there is a regression, and there are 
queued memory leak fixes queued for a future 6.3.24 release. IFF you 
want to upgrade, check 
http://gitorious.org/fetchmail/fetchmail/commits/legacy_63 for 
post-6.3.23 fixes and take them.
Comment 7 Matthias Andree freebsd_committer freebsd_triage 2012-12-14 02:07:37 UTC
Am 14.12.2012 02:51, schrieb Corey Halpin:
>   Attached is a revised patch which incorporates the changes Matthias 
> indicated.


Hi Corey,

thanks for the prompt follow-up.

I am not yet sure if that will be 6.3.24, or if there will be more
changes. I suggest leaving configure.ac alone (remove that part of the
patch), and possibly force PORTREVISION=1 just to make clear this isn't
6.3.23.

Best regards
Matthias
Comment 8 Marcelo Araujo freebsd_committer freebsd_triage 2012-12-14 02:11:55 UTC
State Changed
From-To: suspended->feedback

The patch does not apply clean. Please double check with the latest 
revision from SVN.
Comment 9 Marcelo Araujo freebsd_committer freebsd_triage 2012-12-14 02:45:05 UTC
State Changed
From-To: feedback->open

Feedback received.
Comment 10 Marcelo Araujo freebsd_committer freebsd_triage 2012-12-17 03:23:53 UTC
State Changed
From-To: open->feedback

Please, verify the download path, I cannot do "make fetch" all mirrors 
seems to be broken.
Comment 11 takefu 2012-12-18 08:45:02 UTC
fix OptionsNG

It is the same as the difference immediately before things except Makefile.


--- fetchmail-6.3.23_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/mail/fetchmail/Makefile ./Makefile
--- /usr/ports/mail/fetchmail/Makefile	2012-11-17 14:59:03.000000000 +0900
+++ ./Makefile	2012-12-18 17:07:13.000000000 +0900
@@ -1,7 +1,4 @@
-# New ports collection makefile for:	fetchmail
-# Date created:		25 Feb 2000
-# Whom:			Ville Eerola <ve@sci.fi>
-#
+# Created: Ville Eerola <ve@sci.fi>
 # $FreeBSD: ports/mail/fetchmail/Makefile,v 1.224 2012/11/17 05:59:03 svnexp Exp $
 #
 # NOTE:  The fetchmailconf program (an interactive program for
@@ -11,7 +8,8 @@
 # want fetchmailconf to work, define the X11 option.

 PORTNAME=	fetchmail
-PORTVERSION=	6.3.22
+PORTVERSION=	6.3.23
+PORTREVISION=	1
 CATEGORIES=	mail ipv6
 MASTER_SITES=	BERLIOS/${PORTNAME}/ \
 		SF/${PORTNAME}/branch_6.3/ \
@@ -23,9 +21,14 @@

 RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:${PORTSDIR}/security/ca_root_nss

+OPTIONS_DEFINE=	X11 NLS NTLM GSSAPI
+OPTIONS_DEFAULT=NLS GSSAPI
+
 # Note USERS can only contain a single word as parts below rely on that.
 USERS=		${PORTNAME}
 GROUPS=		${USERS}
+BASEDIR?=	# None. portlint compliance
+NULLDIR?=	# None. portlint compliance

 USE_RC_SUBR=	fetchmail
 FETCHMAILRC=	${PREFIX}/etc/fetchmailrc
@@ -45,14 +48,9 @@
 MAN1=		fetchmail.1
 MLINKS=		fetchmail.1 fetchmailconf.1

-OPTIONS=	X11	"Python/Tkinter dependencies for fetchmailconf" off \
-		NLS	"National language support (NLS)."		on \
-		NTLM	"Build in support for NTLM/MSN authentication." off \
-		GSSAPI	"Build GSSAPI/Kerberos 5 support" 		on
-
 .include <bsd.port.options.mk>

-.if defined(WITH_X11)
+.if ${PORT_OPTIONS:MX11}
 USE_PYTHON=	yes
 RUN_DEPENDS+=	${LOCALBASE}/lib/${PYTHON_VERSION}/site-packages/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter
 .endif
@@ -60,30 +58,30 @@
 .include <bsd.port.pre.mk>

 # Pop2 is obsolete
-.if defined(WITH_POP2)
+.if ${PORT_OPTIONS:MPOP2}
 CONFIGURE_ARGS+=--enable-POP2
 .endif

-CONFIGURE_ARGS+=	--with-ssl=${OPENSSLBASE}
+CONFIGURE_ARGS+=--with-ssl=${OPENSSLBASE}

 DOCS=		FAQ FEATURES NEWS NOTES README README.SSL \
 		design-notes.html fetchmail-FAQ.html fetchmail-features.html \
 		esrs-design-notes.html

-.if !defined(WITHOUT_NLS)
-CONFIGURE_ARGS+=	--enable-nls
-PLIST_SUB+=		NLS=""
-USE_GETTEXT=		yes
+.if ${PORT_OPTIONS:MNLS}
+CONFIGURE_ARGS+=--enable-nls
+PLIST_SUB+=	NLS=""
+USE_GETTEXT=	yes
 .else
-CONFIGURE_ARGS+=	--disable-nls
-PLIST_SUB+=		NLS="@comment "
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB+=	NLS="@comment "
 .endif

 .if !defined(KRB5_HOME)
 .if exists(${LOCALBASE}/lib/libkrb5.a)
 KRB5_HOME=	${LOCALBASE}
 .elif exists(/usr/lib/libkrb5.a)
-KRB5_HOME=	/usr
+KRB5_HOME=	${NULLDIR}/usr
 .endif
 .endif

@@ -91,14 +89,14 @@
 BROKEN=		KRB5_HOME is set but doesn't provide lib/libkrb5.a
 .endif

-.if defined(WITH_GSSAPI)
+.if ${PORT_OPTIONS:MGSSAPI}
 .if defined(KRB5_HOME) && exists(${KRB5_HOME}/lib/libkrb5.a)
-CONFIGURE_ARGS += --with-gssapi=${KRB5_HOME}
+CONFIGURE_ARGS+=--with-gssapi=${KRB5_HOME}
 .endif
 .endif

-.if defined(WITH_NTLM)
-CONFIGURE_ARGS += --enable-NTLM
+.if ${PORT_OPTIONS:MNTLM}
+CONFIGURE_ARGS+=--enable-NTLM
 DOCS+=		README.NTLM
 PLIST_SUB+=	NTLMDOCS="%%PORTDOCS%%"
 .else
@@ -110,13 +108,13 @@
 		${WRKSRC}/fetchmailconf.py
 	@${CP} ${FILESDIR}/fetchmailconf ${WRKDIR}/fetchmailconf
 	@${REINPLACE_CMD} -e "s,@LOCALBASE@,${LOCALBASE},g" \
-		 ${WRKDIR}/fetchmailconf
+		${WRKDIR}/fetchmailconf

 post-build:
 	@cd ${WRKSRC} && ${MAKE} check

 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${INSTALL} -d -m 555 -o ${DOCOWN} -g ${DOCGRP} ${DOCSDIR}
 	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
 .endif
@@ -124,8 +122,8 @@
 	${INSTALL_SCRIPT} ${WRKDIR}/fetchmailconf ${PREFIX}/bin
 	${INSTALL_SCRIPT} ${WRKSRC}/fetchmailconf.py ${PREFIX}/libexec

-	${MKDIR} -m 0755 "/var/run/${PORTNAME}"
-	${CHOWN} "${USERS}:${GROUPS}" "/var/run/${PORTNAME}"
+	${MKDIR} -m 0755 "${BASEDIR}/var/run/${PORTNAME}"
+	${CHOWN} "${USERS}:${GROUPS}" "${BASEDIR}/var/run/${PORTNAME}"
 	${INSTALL} -m 644 -o ${USERS} -g ${GROUPS} ${FILESDIR}/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc.sample
 	if [ ! -f ${PREFIX}/etc/fetchmailrc ]; then \
 		${CP} -p ${PREFIX}/etc/fetchmailrc.sample ${PREFIX}/etc/fetchmailrc ; \
diff -ruN --exclude=CVS /usr/ports/mail/fetchmail/distinfo ./distinfo
--- /usr/ports/mail/fetchmail/distinfo	2012-08-30 15:24:48.000000000 +0900
+++ ./distinfo	2012-12-18 16:17:28.000000000 +0900
@@ -1,2 +1,2 @@
-SHA256 (fetchmail-6.3.22.tar.xz) = 9ab51a851f79e16258f068e791c39e3e378a99927f70c9635132f4295d70b1a4
-SIZE (fetchmail-6.3.22.tar.xz) = 1260296
+SHA256 (fetchmail-6.3.23.tar.xz) = 9e1d3203905150d8b3a4bd1294e2a5c23013938deefab7f5adf8c0d9ae15d482
+SIZE (fetchmail-6.3.23.tar.xz) = 1263416
diff -ruN --exclude=CVS /usr/ports/mail/fetchmail/files/patch-fix_6.3.23_memory_leak ./files/patch-fix_6.3.23_memory_leak
--- /usr/ports/mail/fetchmail/files/patch-fix_6.3.23_memory_leak	1970-01-01 09:00:00.000000000 +0900
+++ ./files/patch-fix_6.3.23_memory_leak	2012-12-18 16:17:28.000000000 +0900
@@ -0,0 +1,143 @@
+diff -ruN fetchmail-6.3.23/NEWS fetchmail-6.3.23-patched/NEWS
+--- fetchmail-6.3.23/NEWS	2012-12-10 14:59:46.000000000 -0600
++++ fetchmail-6.3.23-patched/NEWS	2012-12-13 19:03:50.000000000 -0600
+@@ -56,12 +56,50 @@
+
+ --------------------------------------------------------------------------------
+
+-fetchmail-6.3.23 (released 2012-12-10, 26106 LoC):
++fetchmail-6.3.24 (not yet released):
+
+ # NOTE THAT THE RELEASE OF FUTURE FETCHMAIL 6.3.X VERSIONS IS UNCLEAR.
+ Should a 7.0 release be made earlier, chances are that the 6.3.X branch
+ is abandoned and its changes be folded into the 7.0 release, with changes
+-after 6.3.22 not available on their own in a newer 6.3.X release.
++after 6.3.24 not available on their own in a newer 6.3.X release.
++
++# CRITICAL AND REGRESSION FIXES
++* Plug a memory leak in OpenSSL's certificate verification callback.
++  This would affect fetchmail configurations running with SSL in daemon mode
++  more than one-shot runs.
++  Reported by Erik Thiele, and pinned by Dominik Heeg,
++  fixes Debian Bug #688015.
++  This bug was introduced into fetchmail 6.2.9 (committed 2005-10-29)
++  when support for subjectAltName was added through a patch by Roland
++  Stigge, submitted as Debian Bug#201113.
++
++* The --logfile option now works again outside daemon mode, reported by Heinz
++  Diehl. The documentation that I had been reading was inconsistent with the
++  code, and only parts of the manual page claimed that --logfile was only
++  effective in daemon mode.
++
++# KNOWN BUGS AND WORKAROUNDS
++  (This section floats upwards through the NEWS file so it stays with the
++  current release information)
++* Fetchmail does not handle messages without Message-ID header well
++  (See sourceforge.net bug #780933)
++* BSMTP is mostly untested and errors can cause corrupt output.
++* Sun Workshop 6 (SPARC) is known to miscompile the configuration file lexer in
++  64-bit mode.  Either compile 32-bit code or use GCC to compile 64-bit
++  fetchmail.  Note that fetchmail doesn't take advantage of 64-bit code,
++  so compiling 32-bit SPARC code should not cause any difficulties.
++* Fetchmail does not track pending deletes across crashes.
++* The command line interface is sometimes a bit stubborn, for instance,
++  fetchmail -s doesn't work with a daemon running.
++* Linux systems may return duplicates of an IP address in some circumstances if
++  no or no global IPv6 addresses are configured.
++  (No workaround. Ubuntu Bug#582585, Novell Bug#606980.)
++* Kerberos 5 may be broken, particularly on Heimdal, and provide bogus error
++  messages. This will not be fixed, because the maintainer has no Kerberos 5
++  server to test against. Use GSSAPI.
++
++
++fetchmail-6.3.23 (released 2012-12-10, 26106 LoC):
+
+ # REGRESSION FIXES
+ * Fix compilation with OpenSSL implementations before 0.9.8m that lack
+@@ -94,26 +132,6 @@
+ [sv] Swedish, by Göran Uddeborg
+ [vi] Vietnamese, Trần Ngá»c Quân
+
+-# KNOWN BUGS AND WORKAROUNDS
+-  (This section floats upwards through the NEWS file so it stays with the
+-  current release information)
+-* Fetchmail does not handle messages without Message-ID header well
+-  (See sourceforge.net bug #780933)
+-* BSMTP is mostly untested and errors can cause corrupt output.
+-* Sun Workshop 6 (SPARC) is known to miscompile the configuration file lexer in
+-  64-bit mode.  Either compile 32-bit code or use GCC to compile 64-bit
+-  fetchmail.  Note that fetchmail doesn't take advantage of 64-bit code,
+-  so compiling 32-bit SPARC code should not cause any difficulties.
+-* Fetchmail does not track pending deletes across crashes.
+-* The command line interface is sometimes a bit stubborn, for instance,
+-  fetchmail -s doesn't work with a daemon running.
+-* Linux systems may return duplicates of an IP address in some circumstances if
+-  no or no global IPv6 addresses are configured.
+-  (No workaround. Ubuntu Bug#582585, Novell Bug#606980.)
+-* Kerberos 5 may be broken, particularly on Heimdal, and provide bogus error
+-  messages. This will not be fixed, because the maintainer has no Kerberos 5
+-  server to test against. Use GSSAPI.
+-
+
+ fetchmail-6.3.22 (released 2012-08-29, 26077 LoC):
+
+diff -ruN fetchmail-6.3.23/fetchmail.c fetchmail-6.3.23-patched/fetchmail.c
+--- fetchmail-6.3.23/fetchmail.c	2012-11-21 16:37:05.000000000 -0600
++++ fetchmail-6.3.23-patched/fetchmail.c	2012-12-13 19:03:39.000000000 -0600
+@@ -310,25 +310,27 @@
+     if (run.logfile) {
+ 	/* nodetach -> turn off logfile option */
+ 	if (nodetach) {
+-	    if (outlevel >= O_DEBUG) { fprintf(stderr, GT_("The nodetach option is in effect, ignoring logfile option.\n")); }
++	    if (outlevel >= O_NORMAL) { fprintf(stderr, GT_("The nodetach option is in effect, ignoring logfile option.\n")); }
+ 	    xfree(run.logfile);
+ 	}
+
++#if 0
+ 	/* not in daemon mode -> turn off logfile option */
+ 	if (0 == run.poll_interval) {
+-	    if (outlevel >= O_DEBUG) { fprintf(stderr, GT_("Not running in daemon mode, ignoring logfile option.\n")); }
++	    if (outlevel >= O_NORMAL) { fprintf(stderr, GT_("Not running in daemon mode, ignoring logfile option.\n")); }
+ 	    xfree(run.logfile);
+ 	}
++#endif
+
+ 	/* log file not writable -> turn off logfile option */
+ 	if (run.logfile && 0 != access(run.logfile, F_OK)) {
+-	    if (outlevel >= O_DEBUG) { fprintf(stderr, GT_("Logfile \"%s\" does not exist, ignoring logfile option.\n"), run.logfile); }
++	    if (outlevel >= O_NORMAL) { fprintf(stderr, GT_("Logfile \"%s\" does not exist, ignoring logfile option.\n"), run.logfile); }
+ 	    xfree(run.logfile);
+ 	}
+
+ 	/* log file not writable -> turn off logfile option */
+ 	if (run.logfile && 0 != access(run.logfile, W_OK)) {
+-	    if (outlevel >= O_DEBUG) { fprintf(stderr, GT_("Logfile \"%s\" is not writable, aborting.\n"), run.logfile); }
++	    fprintf(stderr, GT_("Logfile \"%s\" is not writable, aborting.\n"), run.logfile);
+ 	    xfree(run.logfile);
+ 	    exit(PS_UNDEFINED);
+ 	}
+diff -ruN fetchmail-6.3.23/fetchmail.man fetchmail-6.3.23-patched/fetchmail.man
+--- fetchmail-6.3.23/fetchmail.man	2012-12-05 16:14:06.000000000 -0600
++++ fetchmail-6.3.23-patched/fetchmail.man	2012-12-13 19:32:57.000000000 -0600
+@@ -2230,8 +2230,7 @@
+ There are some global option statements: 'set logfile'
+ followed by a string sets the same global specified by \-\-logfile.  A
+ command-line \-\-logfile option will override this. Note that \-\-logfile is
+-only effective if fetchmail detaches itself from the terminal, is in
+-daemon mode, and if the
++only effective if fetchmail detaches itself from the terminal and the
+ logfile already exists before fetchmail is run, and it overrides
+ \-\-syslog in this case.  Also,
+ \&'set daemon' sets the poll interval as \-\-daemon does.  This can be
+diff -ruN fetchmail-6.3.23/socket.c fetchmail-6.3.23-patched/socket.c
+--- fetchmail-6.3.23/socket.c	2012-11-21 16:37:05.000000000 -0600
++++ fetchmail-6.3.23-patched/socket.c	2012-12-13 19:03:43.000000000 -0600
+@@ -689,7 +689,7 @@
+ 							}
+ 						}
+ 					}
+-					sk_GENERAL_NAME_free(gens);
++					GENERAL_NAMES_free(gens);
+ 				}
+ 				if (name_match(p1, p2)) {
+ 					matched
\ No newline at end of file
--- fetchmail-6.3.23_1.patch ends here ---

--
Comment 12 Matthias Andree freebsd_committer freebsd_triage 2012-12-23 17:13:22 UTC
Note that I have released 6.3.24 today.
Comment 13 Matthias Andree freebsd_committer freebsd_triage 2012-12-31 11:24:44 UTC
State Changed
From-To: feedback->open

araujo, please re-check download capability and remove ibiblio/metalab 
mirrors. berlios/sourceforge should have been fine for a couple of days; 
there had been issues with full disks on sf.net a few days ago
Comment 14 Corey Halpin 2013-01-06 19:14:33 UTC
  Can ports/174345 be closed and marked superseded by ports/174873 ?

  Thank you.

~crh
Comment 15 Matthias Andree freebsd_committer freebsd_triage 2013-01-06 19:41:16 UTC
State Changed
From-To: open->closed

superseded by ports/174873, at port maintainer's request
Comment 16 Matthias Andree freebsd_committer freebsd_triage 2013-01-06 19:41:32 UTC
Am 06.01.2013 20:14, schrieb Corey Halpin:
>   Can ports/174345 be closed and marked superseded by ports/174873 ?


Done. Thank you.