Skip site navigation (1)Skip section navigation (2)
Date:      10 Jun 2008 15:49:42 +0200
From:      Johannes 5 Joemann <joemann@beefree.free.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        joemann@beefree.free.de
Subject:   ports/124449: [patch] mail/mailman apply Mailman_2.1.10.patch to fix subscription by mail
Message-ID:  <20080610134942.75921.qmail@beefree.free.de>
Resent-Message-ID: <200806101500.m5AF032N065280@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         124449
>Category:       ports
>Synopsis:       [patch] mail/mailman apply Mailman_2.1.10.patch to fix subscription by mail
>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 Jun 10 15:00:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Johannes 5 Joemann
>Release:        FreeBSD 6.3-STABLE amd64
>Organization:
FREE!
>Environment:
System: FreeBSD list.server 6.3-STABLE FreeBSD 6.3-STABLE #0: Sat Feb 23 19:55:15 CET 2008     joemann@list.server:/usr/obj/usr/src/sys/LIST  amd64

>Description:
The original release of Mailman 2.1.10 is broken, cf.
<http://sourceforge.net/forum/forum.php?forum_id=816465>:
"The file Mailman_2.1.10.patch has been added to the 2.1.10 release. 
The patches in this file fix the problem of some email subscribe
requests being shunted. They also change preservation of certain
unprocessable queue entries to be conditional upon
QRUNNER_SAVE_BAD_MESSAGES and change the place where they are saved
from the 'shunt' queue to the 'bad' queue. 
All sites that have installed Mailman 2.1.10 and accept email
subscribe requests should install this patch."

The attached patch adds the official Mailman_2.1.10.patch to the
port. Unfortunately, this interferes with the htdig related
patches' use of
PATCH_DIST_STRIP=	-p1
Therefore the htdig patches are made additional DISTFILES and
EXTRA_PATCHES. To make them applicable, they are uncompressed and
"stripped" in a conditional pre-patch target. (Maybe someone comes
up with a more elegant solution ...)

The attached patch successfully fixed subscription by mail on two
mailman installations at our site. Also the patched port builds
and installs with WITH_HTDIG enabled, but we don't have the
resources to test such an installation.

BTW, the GNU master sites I checked have the Mailman tarballs and
the Mailman_2.1.10.patch file, whereas www.list.org no longer
seems to hold distfiles. So the attached patch replaces
http://www.list.org/ with ${MASTER_SITE_GNU} in MASTER_SITES.

>How-To-Repeat:
Install ports/mail/mailman version 2.1.10 (Makefile rev. 1.76).
Send mail to a subscription address. Check your MTAs logfile if
that mail is delivered to Mailman. Then look at Mailman's error
log (~mailman/log/error), where the programming error in
cmd_subscribe.py becomes visible:

Jun 09 22:08:46 2008 (14788) Uncaught runner exception: 'NoneType' object has no attribute 'lower'
Jun 09 22:08:46 2008 (14788) Traceback (most recent call last):
  File "/usr/local/mailman/Mailman/Queue/Runner.py", line 114, in _oneloop
    self._onefile(msg, msgdata)
  File "/usr/local/mailman/Mailman/Queue/Runner.py", line 185, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/usr/local/mailman/Mailman/Queue/CommandRunner.py", line 241, in _dispose
    res.do_command('join')
  File "/usr/local/mailman/Mailman/Queue/CommandRunner.py", line 139, in do_command
    return handler.process(self, args)
  File "/usr/local/mailman/Mailman/Commands/cmd_subscribe.py", line 74, in process
    if digest is None and password.lower() in ('digest', 'nodigest'):
AttributeError: 'NoneType' object has no attribute 'lower'

Jun 09 22:08:46 2008 (14788) SHUNTING: 1213042125.8710649+8ba81e802bc95edc62b166d448963af3c0da3dd4

>Fix:

--- mailman.patch.20080604 begins here ---
--- Makefile	Tue May 27 19:54:48 2008
+++ Makefile	Wed Jun  4 17:49:22 2008
@@ -7,12 +7,18 @@
 
 PORTNAME=	mailman
 DISTVERSION=	2.1.10
+PORTREVISION=	1
 CATEGORIES?=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE} \
-		http://www.list.org/
+		${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	mailman
-EXTRACT_SUFX=	.tgz
+DISTFILES=	${PORTNAME}-${DISTVERSION}.tgz
 DIST_SUBDIR=	mailman
+EXTRACT_ONLY=	${PORTNAME}-${DISTVERSION}.tgz
+
+PATCH_SITES=	${MASTER_SITES}
+PATCH_SITE_SUBDIR=	${MASTER_SITE_SUBDIR}
+PATCHFILES=	Mailman_${DISTVERSION}.patch
 
 MAINTAINER?=	jmelo@FreeBSD.org
 COMMENT?=	A mailing list manager (MLM) with a user-friendly web front-end
@@ -109,11 +115,14 @@
 .endif
 
 .if defined(WITH_HTDIG)
-PATCH_SITES+=	http://www.openinfo.co.uk/mm/patches/444879/:patch1 \
+MASTER_SITES+=	http://www.openinfo.co.uk/mm/patches/444879/:patch1 \
 		http://www.openinfo.co.uk/mm/patches/444884/:patch2
-PATCHFILES+=	indexing-2.1.10-0.1.patch.gz:patch1 \
+DISTFILES+=	indexing-2.1.10-0.1.patch.gz:patch1 \
 		htdig-2.1.10-0.1.patch.gz:patch2
-PATCH_DIST_STRIP=	-p1
+HTDIG_PATCHES=	indexing-2.1.10-0.1.patch htdig-2.1.10-0.1.patch
+.for p in ${HTDIG_PATCHES}
+EXTRA_PATCHES+=	${WRKDIR}/${p}
+.endfor
 PKGNAMESUFFIX+=	-with-htdig
 RUN_DEPENDS+=	htdig:${PORTSDIR}/textproc/htdig
 PLIST_SUB+=	SUB_HTDIG=""
@@ -132,6 +141,16 @@
 	@${ECHO} "CGI_GID=www		The group name or id under which your web server executes CGI scripts."
 	@${ECHO} "IMGDIR=www/icons	Icon images will be installed in ${PREFIX}/${IMGDIR}."
 	@${ECHO} ""
+
+.if defined(WITH_HTDIG)
+pre-patch:
+.for p in ${HTDIG_PATCHES}
+	${GUNZIP_CMD} -c ${DISTDIR}/${DIST_SUBDIR}/${p}.gz > ${WRKDIR}/${p}
+	@${REINPLACE_CMD} -E \
+	-e 's#^(---|\+\+\+) (mailman-${DISTVERSION}-[^/]*/)#\1 #' \
+	${WRKDIR}/${p}
+.endfor
+.endif
 
 post-patch:
 	@${REINPLACE_CMD} -e 's#%%LOCALBASE%%#${LOCALBASE}#g' \
--- distinfo	Tue May 27 19:54:48 2008
+++ distinfo	Wed Jun  4 15:22:46 2008
@@ -1,6 +1,9 @@
 MD5 (mailman/mailman-2.1.10.tgz) = 79157d337a29f716a3a1ff8b70501f8d
 SHA256 (mailman/mailman-2.1.10.tgz) = 19f8fd0b8447fc88da412a186aeaa2af3f7cdd5f5c06c12d5eaddb3a1b15e97f
 SIZE (mailman/mailman-2.1.10.tgz) = 7969072
+MD5 (mailman/Mailman_2.1.10.patch) = 9b57887d5cc07954a25b02bf3aeb73d3
+SHA256 (mailman/Mailman_2.1.10.patch) = 0539340ea941d8965d461e499e8b6e8c2c9e175a36eb6b77776b219fe0a95404
+SIZE (mailman/Mailman_2.1.10.patch) = 3083
 MD5 (mailman/htdig-2.1.10-0.1.patch.gz) = e9da94f2b00af99f952c32c21cb73c02
 SHA256 (mailman/htdig-2.1.10-0.1.patch.gz) = 98ecc7bbe6424dce66fd2c8bef5af14d529f2066c0c8375e6ca649330aa532f1
 SIZE (mailman/htdig-2.1.10-0.1.patch.gz) = 61328
--- mailman.patch.20080604 ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080610134942.75921.qmail>