ports/81211: Update port: mail/getmail to 4.3.9
Linh Pham
question+fbsdports at closedsrc.org
Wed May 18 18:00:29 UTC 2005
>Number: 81211
>Category: ports
>Synopsis: Update port: mail/getmail to 4.3.9
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Wed May 18 18:00:23 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Linh Pham
>Release: FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD q.internal.closedsrc.org 5.4-RELEASE FreeBSD 5.4-RELEASE #12: Wed May 11 07:34:21 PDT 2005 root at q.internal.closedsrc.org:/usr/obj/usr/src/sys/Q i386
>Description:
Update mail/getmail to 4.3.9. From CHANGELOG:
Version 4.3.9
18 May 2005
-for multidrop retrievers, change the way the envelope recipient header
field is parsed, to prevent odd values from being interpreted as multiple
addresses when they look like an 822-style address group. Thanks: "aal".
-try to avoid parsing message bodies, in case they're corrupt or invalid.
Thanks: Michael Gold.
I had to redo files/patch-messages.py and files/patch-retrieverbases.py
since the current version does not work against 4.3.9. I have only been able
to test the patches against Python 2.4, but the function call that breaks
without patching is email.Parser.HeaderParser as messages.py and
_retrieverbases.py do not import email.Parser (which works under Python
2.3).
>How-To-Repeat:
>Fix:
--- getmail-4.3.9.diff begins here ---
diff -ruN /usr/ports/mail/getmail/Makefile getmail/Makefile
--- /usr/ports/mail/getmail/Makefile Sat May 7 17:54:09 2005
+++ getmail/Makefile Wed May 18 09:57:01 2005
@@ -6,7 +6,7 @@
#
PORTNAME= getmail
-PORTVERSION= 4.3.8
+PORTVERSION= 4.3.9
CATEGORIES= mail python
MASTER_SITES= http://pyropus.ca/software/getmail/%SUBDIR%/
MASTER_SITE_SUBDIR= old-versions
diff -ruN /usr/ports/mail/getmail/distinfo getmail/distinfo
--- /usr/ports/mail/getmail/distinfo Sat May 7 17:54:09 2005
+++ getmail/distinfo Wed May 18 09:58:04 2005
@@ -1,2 +1,2 @@
-MD5 (getmail-4.3.8.tar.gz) = c4a41924a95fa8efc78f87a6d2248d57
-SIZE (getmail-4.3.8.tar.gz) = 133718
+MD5 (getmail-4.3.9.tar.gz) = 3689bbe74d116a53a6ae0d66a31cbdf5
+SIZE (getmail-4.3.9.tar.gz) = 134255
diff -ruN /usr/ports/mail/getmail/files/patch-message.py getmail/files/patch-message.py
--- /usr/ports/mail/getmail/files/patch-message.py Thu Mar 3 19:59:52 2005
+++ getmail/files/patch-message.py Wed May 18 10:42:14 2005
@@ -1,43 +1,19 @@
---- getmailcore/message.py.orig Mon Feb 21 15:57:08 2005
-+++ getmailcore/message.py Mon Feb 21 16:04:17 2005
-@@ -7,6 +7,7 @@
- 'Message',
- ]
-
-+import sys
- import os
- import time
+--- getmailcore/message.py.orig Wed May 18 09:28:26 2005
++++ getmailcore/message.py Wed May 18 10:41:19 2005
+@@ -12,6 +12,7 @@
import cStringIO
-@@ -86,20 +87,28 @@
- # of filters, etc, which should be saner.
- if fromlines:
- try:
-- self.__msg = email.message_from_string(os.linesep.join(
-- fromlines), strict=False)
-+ if sys.version_info < (2, 4):
-+ self.__msg = email.message_from_string(os.linesep.join(fromlines), strict=False)
-+ else:
-+ self.__msg = email.message_from_string(os.linesep.join(fromlines))
- except email.Errors.MessageError, o:
- self.__msg = corrupt_message(o, fromlines=fromlines)
- self.__raw = os.linesep.join(fromlines)
- elif fromstring:
- try:
-- self.__msg = email.message_from_string(fromstring, strict=False)
-+ if sys.version_info < (2, 4):
-+ self.__msg = email.message_from_string(fromstring, strict=False)
-+ else:
-+ self.__msg = email.message_from_string(fromstring)
- except email.Errors.MessageError, o:
- self.__msg = corrupt_message(o, fromstring=fromstring)
- self.__raw = fromstring
- elif fromfile:
- try:
-- self.__msg = email.message_from_file(fromfile, strict=False)
-+ if sys.version_info < (2, 4):
-+ self.__msg = email.message_from_file(fromfile, strict=False)
-+ else:
-+ self.__msg = email.message_from_file(fromfile)
- except email.Errors.MessageError, o:
- # Shouldn't happen
- self.__msg = corrupt_message(o, fromstring=fromfile.read())
+ import email
+ import email.Errors
++import email.Parser
+ import email.Utils
+ from email.Generator import Generator
+
+@@ -79,7 +80,7 @@
+ self.received_from = None
+ self.received_with = None
+ self.__raw = None
+- parser = email.Parser.HeaderParser(strict=False)
++ parser = email.Parser.HeaderParser()
+
+ # Message is instantiated with fromlines for POP3, fromstring for
+ # IMAP (both of which can be badly-corrupted or invalid, i.e. spam,
diff -ruN /usr/ports/mail/getmail/files/patch-retrieverbases.py getmail/files/patch-retrieverbases.py
--- /usr/ports/mail/getmail/files/patch-retrieverbases.py Thu Mar 3 19:59:52 2005
+++ getmail/files/patch-retrieverbases.py Wed May 18 10:42:24 2005
@@ -1,23 +1,19 @@
---- getmailcore/_retrieverbases.py.orig Mon Feb 21 15:57:08 2005
-+++ getmailcore/_retrieverbases.py Mon Feb 21 15:59:11 2005
-@@ -33,6 +33,7 @@
- 'RetrieverSkeleton',
- ]
-
-+import sys
- import os
- import socket
+--- getmailcore/_retrieverbases.py.orig Wed May 18 09:31:20 2005
++++ getmailcore/_retrieverbases.py Wed May 18 10:41:09 2005
+@@ -38,6 +38,7 @@
import time
-@@ -445,7 +446,11 @@
+ import getpass
+ import email
++import email.Parser
+ import poplib
+ import imaplib
+ import sets
+@@ -445,7 +446,7 @@
self.log.trace()
msgnum = self._getmsgnumbyid(msgid)
response, headerlist, octets = self.conn.top(msgnum, 0)
-- parser = email.Parser.Parser(strict=False)
-+ # 'strict' argument is deprecated in Python 2.4
-+ if sys.version_info < (2, 4):
-+ parser = email.Parser.Parser(strict=False)
-+ else:
-+ parser = email.Parser.Parser()
- return parser.parsestr(os.linesep.join(headerlist), headersonly=True)
+- parser = email.Parser.HeaderParser(strict=False)
++ parser = email.Parser.HeaderParser()
+ return parser.parsestr(os.linesep.join(headerlist))
def initialize(self):
--- getmail-4.3.9.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list