rpms/mailman/devel mailman-2.1.9-ctypefix.patch, NONE, 1.1 mailman-2.1.9-ctypo-new.patch, NONE, 1.1 mailman-2.1.9-header-folding.patch, NONE, 1.1 mailman-2.1.9-inotify.patch, NONE, 1.1 mailman-2.1.9-selinux.patch, NONE, 1.1 mailman.spec, 1.66, 1.67
Tomas Smetana (tsmetana)
fedora-extras-commits at redhat.com
Wed Oct 24 14:11:04 UTC 2007
Author: tsmetana
Update of /cvs/pkgs/rpms/mailman/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20464
Modified Files:
mailman.spec
Added Files:
mailman-2.1.9-ctypefix.patch mailman-2.1.9-ctypo-new.patch
mailman-2.1.9-header-folding.patch mailman-2.1.9-inotify.patch
mailman-2.1.9-selinux.patch
Log Message:
* Tue Oct 16 2007 Tomas Smetana <tsmetana at redhat.com> - 3:2.1.9-8
- fix #333011 - withlist crashes with NameError
- fix #350461 - init script prevents proper SELinux domain transitions
- fix #303061 - broken multipart mail headers
mailman-2.1.9-ctypefix.patch:
--- NEW FILE mailman-2.1.9-ctypefix.patch ---
--- mailman-2.1.9/bin/withlist.ctypefix 2007-10-16 08:42:38.000000000 +0200
+++ mailman-2.1.9/bin/withlist 2007-10-16 08:43:39.000000000 +0200
@@ -127,7 +127,10 @@
from Mailman import Errors
from Mailman import MailList
from Mailman import Utils
-from Mailman.i18n import C_
+from Mailman import i18n
+
+_ = i18n._
+C_ = i18n.C_
try:
True, False
mailman-2.1.9-ctypo-new.patch:
--- NEW FILE mailman-2.1.9-ctypo-new.patch ---
--- mailman-2.1.9/bin/change_pw.ctypo 2007-08-27 13:27:11.000000000 +0200
+++ mailman-2.1.9/bin/change_pw 2007-08-27 13:27:11.000000000 +0200
@@ -187,8 +187,8 @@
adminurl = mlist.GetScriptURL('admin', absolute=1)
msg = Message.UserNotification(
mlist.owner[:], Utils.get_site_email(),
- _('Your new %(listname)s list password'),
- _('''\
+ C_('Your new %(listname)s list password'),
+ C_('''\
The site administrator at %(hostname)s has changed the password for your
mailing list %(listname)s. It is now
--- mailman-2.1.9/bin/reset_pw.py.ctypo 2007-08-27 13:27:38.000000000 +0200
+++ mailman-2.1.9/bin/reset_pw.py 2007-08-27 13:28:02.000000000 +0200
@@ -38,7 +38,7 @@
import paths
from Mailman import Utils
-from Mailman.i18n import _
+from Mailman.i18n import _C
try:
@@ -74,13 +74,13 @@
listname = mlist.internal_name()
if verbose:
- print _('Changing passwords for list: %(listname)s')
+ print C_('Changing passwords for list: %(listname)s')
for member in mlist.getMembers():
randompw = Utils.MakeRandomPassword()
mlist.setMemberPassword(member, randompw)
if verbose:
- print _('New password for member %(member)40s: %(randompw)s')
+ print C_('New password for member %(member)40s: %(randompw)s')
mlist.Save()
--- mailman-2.1.9/bin/update.ctypo 2007-08-27 13:27:11.000000000 +0200
+++ mailman-2.1.9/bin/update 2007-08-27 13:27:11.000000000 +0200
@@ -445,7 +445,7 @@
except EnvironmentError, e:
if e.errno <> errno.ENOTDIR:
raise
- print _('Warning! Not a directory: %(dirpath)s')
+ print C_('Warning! Not a directory: %(dirpath)s')
@@ -528,7 +528,7 @@
msg = data = None
except EOFError:
# For some reason the pckfile was empty. Just delete it.
- print _('Warning! Deleting empty .pck file: %(pckfile)s')
+ print C_('Warning! Deleting empty .pck file: %(pckfile)s')
os.unlink(pckfile)
finally:
if msgfp:
--- mailman-2.1.9/bin/withlist.ctypo 2007-08-27 13:27:11.000000000 +0200
+++ mailman-2.1.9/bin/withlist 2007-08-27 13:27:11.000000000 +0200
@@ -127,7 +127,7 @@
from Mailman import Errors
from Mailman import MailList
from Mailman import Utils
-from Mailman.i18n import _
+from Mailman.i18n import C_
try:
True, False
@@ -286,7 +286,7 @@
namespace = globals().copy()
namespace.update(locals())
if dolist:
- ban = _("The variable `m' is the %(listname)s MailList instance")
+ ban = C_("The variable `m' is the %(listname)s MailList instance")
else:
ban = None
code.InteractiveConsole(namespace).interact(ban)
--- mailman-2.1.9/bin/newlist.ctypo 2007-08-27 13:27:11.000000000 +0200
+++ mailman-2.1.9/bin/newlist 2007-08-27 13:27:11.000000000 +0200
@@ -243,7 +243,7 @@
try:
msg = Message.UserNotification(
owner_mail, siteowner,
- _('Your new mailing list: %(listname)s'),
+ C_('Your new mailing list: %(listname)s'),
text, mlist.preferred_language)
msg.send(mlist)
finally:
--- mailman-2.1.9/bin/check_perms.ctypo 2007-08-27 13:27:11.000000000 +0200
+++ mailman-2.1.9/bin/check_perms 2007-08-27 13:27:11.000000000 +0200
@@ -213,7 +213,7 @@
# In addition, on a multiuser system you may want to hide the private
# archives so other users can't read them.
if mode & S_IXOTH:
- print _("""\
+ print C_("""\
Warning: Private archive directory is other-executable (o+x).
This could allow other users on your system to read private archives.
If you're on a shared multiuser system, you should consult the
--- mailman-2.1.9/Mailman/MTA/Postfix.py.ctypo 2007-08-27 13:27:11.000000000 +0200
+++ mailman-2.1.9/Mailman/MTA/Postfix.py 2007-08-27 13:27:11.000000000 +0200
@@ -351,9 +351,9 @@
if stat and (stat[ST_MODE] & targetmode) <> targetmode:
state.ERRORS += 1
octmode = oct(stat[ST_MODE])
- print _('%(dbfile)s permissions must be 066x (got %(octmode)s)'),
+ print C_('%(dbfile)s permissions must be 066x (got %(octmode)s)'),
if state.FIX:
- print _('(fixing)')
+ print C_('(fixing)')
os.chmod(dbfile, stat[ST_MODE] | targetmode)
else:
print
mailman-2.1.9-header-folding.patch:
--- NEW FILE mailman-2.1.9-header-folding.patch ---
Patch: 77_header_folding_in_attachments.patch
Author: Lionel Elie Mamane <lionel at mamane.lu>
Don't fold headers into message/rfc822 attachments.
This avoids breaking signatures.
Index: Mailman/Generator.py
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ Mailman/Generator.py 2006-08-15 15:14:57.000000000 +0800
@@ -0,0 +1,55 @@
+# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+# 2005 Lionel Elie Mamane <lionel at mamane.lu>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Author: Bernhard Reiter <bernhard at gnu.org>
+# Changed by Lionel Elie Mamane December 2005 from version on
+# http://ftp.intevation.de/users/bernhard/mailman/mailman-2.1.4-avoid-headerfolding-python21.diff
+# to use clone/children_maxheaderlen trick instead of _write_headers/mangle_from_
+
+"""Standard Mailman generator object.
+
+A subclass of email.Generator which only folds long headers
+in the top object level.
+This is needed because Mailman should leave the reveiced message parts alone.
+Otherwise is might change subparts over which a signature was calculated,
+breaking it while doing so.
+"""
+
+import email
+import email.Generator
+
+try:
+ True, False
+except NameError:
+ True = 1
+ False = 0
+
+
+class Generator(email.Generator.Generator):
+ """Generates output from a Message object tree, keeping signatures.
+
+ Headers will by default _not_ be folded in attachments.
+ """
+ def __init__(self, outfp, mangle_from_=False,
+ maxheaderlen=78, children_maxheaderlen=0):
+ email.Generator.Generator.__init__(self, outfp, mangle_from_=mangle_from_, maxheaderlen=maxheaderlen)
+ self.__children_maxheaderlen = children_maxheaderlen
+
+ def clone(self, fp):
+ """Clone this generator with maxheaderlen set for children"""
+ return self.__class__(fp, self._mangle_from_, self.__children_maxheaderlen, self.__children_maxheaderlen)
+
Index: Mailman/Mailbox.py
===================================================================
--- Mailman/Mailbox.py.orig 2006-08-15 15:12:10.000000000 +0800
+++ Mailman/Mailbox.py 2006-08-15 15:14:57.000000000 +0800
@@ -22,10 +22,10 @@
import email
from email.Parser import Parser
-from email.Generator import Generator
from email.Errors import MessageParseError
from Mailman import mm_cfg
+from Mailman.Generator import Generator
from Mailman.Message import Message
try:
@@ -65,7 +65,7 @@
# Seek to the last char of the mailbox
self.fp.seek(1, 2)
# Create a Generator instance to write the message to the file
- g = Generator(self.fp)
+ g = Generator(self.fp, mangle_from_=True)
g.flatten(msg, unixfrom=True)
# Add one more trailing newline for separation with the next message
# to be appended to the mbox.
Index: Mailman/Message.py
===================================================================
--- Mailman/Message.py.orig 2006-08-15 15:12:10.000000000 +0800
+++ Mailman/Message.py 2006-08-15 15:14:57.000000000 +0800
@@ -22,6 +22,8 @@
"""
import re
+from cStringIO import StringIO
+
import email
import email.Message
import email.Utils
@@ -32,6 +34,7 @@
from Mailman import mm_cfg
from Mailman import Utils
+from Mailman.Generator import Generator
COMMASPACE = ', '
@@ -199,6 +202,16 @@
except (UnicodeError, LookupError, ValueError):
return failobj
+ def as_string(self, unixfrom=False):
+ """Return entire formatted message as a string using Mailman.Generator.
+
+ Operates like email.Message.Message.as_string, only
+ using Mailman's Generator class. Only the top headers will get folded.
+ """
+ fp = StringIO()
+ g = Generator(fp)
+ g.flatten(self, unixfrom=unixfrom)
+ return fp.getvalue()
class UserNotification(Message):
mailman-2.1.9-inotify.patch:
--- NEW FILE mailman-2.1.9-inotify.patch ---
--- mailman-2.1.9/Mailman/Queue/Runner.py.inotify 2006-07-22 03:53:41.000000000 +0200
+++ mailman-2.1.9/Mailman/Queue/Runner.py 2007-08-27 15:37:43.000000000 +0200
@@ -34,12 +34,26 @@
import email.Errors
+
try:
True, False
except NameError:
True = 1
False = 0
+with_inotify = True
+try:
+ from pyinotify import WatchManager
+ from pyinotify import Notifier
+ from pyinotify import ProcessEvent
+ from pyinotify import EventsCodes
+
+ class RunnerEventHandler(ProcessEvent):
+ def process_IN_CREATE(self, event):
+ return
+
+except ImportError:
+ with_inotify = False
class Runner:
@@ -54,17 +68,27 @@
# Create the shunt switchboard
self._shunt = Switchboard(mm_cfg.SHUNTQUEUE_DIR)
self._stop = False
+ if with_inotify:
+ # Register inotify monitor
+ self._watchmanager = WatchManager()
+ self._eventprocessor = RunnerEventHandler()
+ self._notifier = Notifier(self._watchmanager, self._eventprocessor)
def __repr__(self):
return '<%s at %s>' % (self.__class__.__name__, id(self))
def stop(self):
+ if with_inotify:
+ self._notifier.stop()
self._stop = True
def run(self):
# Start the main loop for this queue runner.
try:
try:
+ if with_inotify:
+ # Watch for new files in QDIR
+ self._watchmanager.add_watch(self.QDIR, EventsCodes.IN_CREATE)
while True:
# Once through the loop that processes all the files in
# the queue directory.
@@ -247,7 +271,11 @@
"""
if filecnt or self.SLEEPTIME <= 0:
return
- time.sleep(self.SLEEPTIME)
+ if with_inotify:
+ while (not self._notifier.check_events()) and (not self._stop):
+ time.sleep(self.SLEEPTIME)
+ else:
+ time.sleep(self.SLEEPTIME)
def _shortcircuit(self):
"""Return a true value if the individual file processing loop should
mailman-2.1.9-selinux.patch:
--- NEW FILE mailman-2.1.9-selinux.patch ---
--- mailman-2.1.9/misc/mailman.in.selinux 2007-10-24 15:50:58.000000000 +0200
+++ mailman-2.1.9/misc/mailman.in 2007-10-24 15:52:25.000000000 +0200
@@ -32,7 +32,6 @@
# config: @prefix@/Mailman/mm_cfg.py
# pidfile: @PID_DIR@/master-qrunner.pid
-PYTHON=@PYTHON@
MAILMANHOME=@prefix@
MAILMANCTL=$MAILMANHOME/bin/mailmanctl
@@ -75,7 +74,7 @@
function start()
{
echo -n $"Starting $prog: "
- daemon $PYTHON $MAILMANCTL -s -q start
+ daemon $MAILMANCTL -s -q start
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
@@ -89,7 +88,7 @@
function stop()
{
echo -n $"Shutting down $prog: "
- daemon $PYTHON $MAILMANCTL -q stop
+ daemon $MAILMANCTL -q stop
RETVAL=$?
if [ $RETVAL -eq 0 ]
then
@@ -125,7 +124,7 @@
;;
'condrestart')
- $PYTHON $MAILMANCTL -q -u status
+ $MAILMANCTL -q -u status
retval=$?
if [ $retval -eq 0 ]
then
@@ -135,7 +134,7 @@
;;
'status')
- $PYTHON $MAILMANCTL -u status
+ $MAILMANCTL -u status
RETVAL=$?
;;
Index: mailman.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mailman/devel/mailman.spec,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- mailman.spec 22 Aug 2007 12:08:06 -0000 1.66
+++ mailman.spec 24 Oct 2007 14:10:31 -0000 1.67
@@ -1,7 +1,7 @@
Summary: Mailing list manager with built in Web access
Name: mailman
Version: 2.1.9
-Release: 7%{?dist}
+Release: 8%{?dist}
Epoch: 3
Group: Applications/Internet
#Source0: ftp://ftp.gnu.org/pub/gnu/mailman/mailman-%{version}.tgz
@@ -21,8 +21,13 @@
Patch7: mailman-init.patch
Patch8: mailman-archive-reply.patch
Patch9: mailman-2.1.9-LC_CTYPE.patch
-Patch10: mailman-2.1.9-ctypo.patch
+Patch10: mailman-2.1.9-ctypo-new.patch
Patch11: mailman-2.1.9-init-retval.patch
+# Disabled until included in upstream
+#Patch12: mailman-2.1.9-inotify.patch
+Patch13: mailman-2.1.9-ctypefix.patch
+Patch14: mailman-2.1.9-header-folding.patch
+Patch15: mailman-2.1.9-selinux.patch
License: GPLv2+
URL: http://www.list.org/
@@ -100,6 +105,10 @@
%patch9 -p1 -b .lctype
%patch10 -p1 -b .ctypo
%patch11 -p1 -b .retval
+#%patch12 -p1 -b .inotify
+%patch13 -p1 -b .ctypefix
+%patch14 -p0 -b .header
+%patch15 -p1 -b .selinux
#cp $RPM_SOURCE_DIR/mailman.INSTALL.REDHAT.in INSTALL.REDHAT.in
cp %{SOURCE5} INSTALL.REDHAT.in
@@ -338,6 +347,11 @@
%attr(0644,root,%{mmgroup}) %config(noreplace) %{mmdir}/cron/crontab.in
%changelog
+* Tue Oct 16 2007 Tomas Smetana <tsmetana at redhat.com> - 3:2.1.9-8
+- fix #333011 - withlist crashes with NameError
+- fix #350461 - init script prevents proper SELinux domain transitions
+- fix #303061 - broken multipart mail headers
+
* Wed Aug 22 2007 Tomas Smetana <tsmetana at redhat.com> - 3:2.1.9-7
- fix #242678 wrong init script
- fix #247160 INSTALL.REDHAT references non-existent README.POSTFIX file,
More information about the scm-commits
mailing list