ports/104429: mail/mailman: fix codec error on python 2.5
NIIMI Satoshi
sa2c at sa2c.net
Sun Oct 15 06:20:20 UTC 2006
>Number: 104429
>Category: ports
>Synopsis: mail/mailman: fix codec error on python 2.5
>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: Sun Oct 15 06:20:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: NIIMI Satoshi
>Release: FreeBSD 6.1-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD berkeley.l.sa2c.net 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #17: Sun Oct 1 13:00:54 JST 2006 root at berkeley.l.sa2c.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Mailman 2.1.9 does not work well with python 2.5 because bundled codec
is not compatible with python 2.5.
The fix is already there in svn[1], and can be applied for 2.1.9.
1: http://svn.sourceforge.net/viewvc/mailman/branches/Release_2_1-maint/mailman/misc/paths.py.in?view=log
>How-To-Repeat:
>Fix:
Please note to run "cvs add files/patch-misc::paths.py.in" before commit.
--- mailman.diff begins here ---
diff -uNr -x CVS /usr/ports/mail/mailman/Makefile ./Makefile
--- /usr/ports/mail/mailman/Makefile Wed Oct 11 22:13:33 2006
+++ ./Makefile Sun Oct 15 14:41:13 2006
@@ -7,6 +7,7 @@
PORTNAME= mailman
DISTVERSION= 2.1.9
+PORTREVISION= 1
CATEGORIES?= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
http://www.list.org/
@@ -25,7 +26,7 @@
HTDIG "htdig integration patches" off
HAS_CONFIGURE= yes
-USE_PYTHON= 2.4
+USE_PYTHON= yes
CONFIGURE_ARGS= --prefix=${MAILMANDIR} --with-python=${PYTHON_CMD} \
--with-username=${MM_USERNAME} \
--with-groupname=${MM_GROUPNAME} \
diff -uNr -x CVS /usr/ports/mail/mailman/files/patch-misc::paths.py.in ./files/patch-misc::paths.py.in
--- /usr/ports/mail/mailman/files/patch-misc::paths.py.in Thu Jan 1 09:00:00 1970
+++ ./files/patch-misc::paths.py.in Sun Oct 15 14:58:32 2006
@@ -0,0 +1,41 @@
+Index: misc/paths.py.in
+--- branches/Release_2_1-maint/mailman/misc/paths.py.in 2005/12/30 18:50:08 7694
++++ branches/Release_2_1-maint/mailman/misc/paths.py.in 2006/10/12 00:48:48 8056
+@@ -35,6 +35,19 @@
+ if exec_prefix == '${prefix}':
+ exec_prefix = prefix
+
++# Check if ja/ko codecs are available before changing path.
++try:
++ s = unicode('OK', 'iso-2022-jp')
++ jaok = True
++except LookupError:
++ jaok = False
++
++try:
++ s = unicode('OK', 'euc-kr')
++ kook = True
++except LookupError:
++ kook = False
++
+ # Hack the path to include the parent directory of the $prefix/Mailman package
+ # directory.
+ sys.path.insert(0, prefix)
+@@ -53,12 +66,14 @@
+ # In a normal interactive Python environment, the japanese.pth and korean.pth
+ # files would be imported automatically. But because we inhibit the importing
+ # of the site module, we need to be explicit about importing these codecs.
+-import japanese
++if not jaok:
++ import japanese
+ # As of KoreanCodecs 2.0.5, you had to do the second import to get the Korean
+ # codecs installed, however leave the first import in there in case an upgrade
+ # changes this.
+-import korean
+-import korean.aliases
++if not kook:
++ import korean
++ import korean.aliases
+ # Arabic and Hebrew (RFC-1556) encoding aliases. (temporary solution)
+ import encodings.aliases
+ encodings.aliases.aliases.update({
--- mailman.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list