rpms/mailman/devel mailman-2.1.11-cron.patch, NONE, 1.1 mailman-2.1.11-fhsinit.patch, NONE, 1.1 mailman-2.1.11-lctype.patch, NONE, 1.1 .cvsignore, 1.17, 1.18 mailman.spec, 1.70, 1.71 sources, 1.17, 1.18 mailman-2.1.10-LC_CTYPE.patch, 1.1, NONE mailman-2.1.10-cron.patch, 1.1, NONE mailman-2.1.9-init-retval.patch, 1.1, NONE
Tomas Smetana (tsmetana)
fedora-extras-commits at redhat.com
Wed Jul 23 08:40:48 UTC 2008
Author: tsmetana
Update of /cvs/pkgs/rpms/mailman/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3126
Modified Files:
.cvsignore mailman.spec sources
Added Files:
mailman-2.1.11-cron.patch mailman-2.1.11-fhsinit.patch
mailman-2.1.11-lctype.patch
Removed Files:
mailman-2.1.10-LC_CTYPE.patch mailman-2.1.10-cron.patch
mailman-2.1.9-init-retval.patch
Log Message:
* Tue Jul 22 2008 Tomas Smetana <tsmetana at redhat.com> - 3:2.1.11-1
- new upstream version
- fix #246978 - FHS compliant initscript
mailman-2.1.11-cron.patch:
--- NEW FILE mailman-2.1.11-cron.patch ---
diff -up mailman-2.1.11/misc/mailman.in.cron mailman-2.1.11/misc/mailman.in
--- mailman-2.1.11/misc/mailman.in.cron 2008-07-22 08:55:18.000000000 +0200
+++ mailman-2.1.11/misc/mailman.in 2008-07-22 08:55:18.000000000 +0200
@@ -24,18 +24,48 @@
# On Debian, type "update-rc.d mailman defaults"
# On RedHat, and derivatives, install with "chkconfig --add mailman"
#
-# chkconfig: 2345 98 12
+# chkconfig: - 98 12
# description: Mailman is the GNU Mailing List Manager, a program that \
# manages electronic mail discussion groups. For more \
# on GNU Mailman see http://www.list.org
# processname: mailmanctl
# config: @prefix@/Mailman/mm_cfg.py
-# pidfile: @prefix@/data/master-qrunner.pid
+# pidfile: @PID_DIR@/master-qrunner.pid
PYTHON=@PYTHON@
MAILMANHOME=@prefix@
MAILMANCTL=$MAILMANHOME/bin/mailmanctl
+# We used to install the mailman cron jobs when the mailman rpm was
+# installed, irrespective of whether mailman was actually being
+# run. Although the cron jobs didn't create any problems if someone
+# wasn't running mailman some users complained about the cron log file
+# filling up, resource usage, and power consumption since systems
+# wouldn't really idle. It really only makes sense to run the mailman
+# cron jobs if the mailman service is turned on and not just merely
+# having the rpm installed. This init.d script is an obvious place to
+# install or remove the cron jobs based on the service being enabled
+# or not.
+
+SRC_CRON_SCRIPT=$MAILMANHOME/cron/crontab.in
+DST_CRON_SCRIPT=/etc/cron.d/mailman
+
+function InstallCron()
+{
+ install -m644 -o root -g root $SRC_CRON_SCRIPT $DST_CRON_SCRIPT
+}
+
+function RemoveCron()
+{
+cat > $DST_CRON_SCRIPT <<EOF
+# DO NOT EDIT THIS FILE!
+#
+# Contents of this file managed by /etc/init.d/mailman
+# Master copy is @prefix@/cron/crontab.in
+# Consult that file for documentation
+EOF
+}
+
# Source function library.
. /etc/rc.d/init.d/functions
@@ -47,7 +77,11 @@ function start()
echo -n $"Starting $prog: "
daemon $PYTHON $MAILMANCTL -s -q start
RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
+ if [ $RETVAL -eq 0 ]
+ then
+ touch /var/lock/subsys/$prog
+ InstallCron
+ fi
echo
return $RETVAL
}
@@ -57,7 +91,11 @@ function stop()
echo -n $"Shutting down $prog: "
daemon $PYTHON $MAILMANCTL -q stop
RETVAL=$?
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
+ if [ $RETVAL -eq 0 ]
+ then
+ rm -f /var/lock/subsys/$prog
+ RemoveCron
+ fi
echo
return $RETVAL
}
@@ -101,5 +139,9 @@ case "$1" in
RETVAL=$?
;;
+*)
+ echo $"Usage: $prog {start|stop|restart|condrestart|status}"
+ ;;
+
esac
exit $RETVAL
diff -up mailman-2.1.11/cron/senddigests.cron mailman-2.1.11/cron/senddigests
--- mailman-2.1.11/cron/senddigests.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/senddigests 2008-07-22 08:59:23.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
#
diff -up mailman-2.1.11/cron/nightly_gzip.cron mailman-2.1.11/cron/nightly_gzip
--- mailman-2.1.11/cron/nightly_gzip.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/nightly_gzip 2008-07-22 08:55:18.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
diff -up mailman-2.1.11/cron/gate_news.cron mailman-2.1.11/cron/gate_news
--- mailman-2.1.11/cron/gate_news.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/gate_news 2008-07-22 08:55:18.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
diff -up mailman-2.1.11/cron/checkdbs.cron mailman-2.1.11/cron/checkdbs
--- mailman-2.1.11/cron/checkdbs.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/checkdbs 2008-07-22 08:55:18.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
diff -up mailman-2.1.11/cron/crontab.in.in.cron mailman-2.1.11/cron/crontab.in.in
--- mailman-2.1.11/cron/crontab.in.in.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/crontab.in.in 2008-07-22 08:55:18.000000000 +0200
@@ -1,27 +1,50 @@
+#
+# -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING --
+# ------------------ EDIT THE CORRECT FILE -------------------------
+#
+# This file is copied to /etc/cron.d/mailman from
+# @prefix@/cron/crontab.in when the mailman service is started via its
+# init.d script and the file /etc/cron.d/mailman is removed when the
+# service is stopped. Therefore any edits made directly to
+# /etc/cron.d/mailman will be lost anytime the mailman service
+# restarts.
+#
+# To make changes edit the master copy @prefix@/cron/crontab.in and then
+# restart the service to pick up the changes (/sbin/service mailman restart).
+#
+# The reason this is done this way is because the mailman cron jobs
+# should only be invoked if the mailman service is enabled and not
+# just as a consequence of installing the rpm as was the case
+# previously. The file /etc/cron.d/mailman cannot simply be linked to
+# the master copy in @prefix@/cron because for security reasons cron
+# will not process crontab files that are links or writeable by
+# anybody else but root, thus the file must be copied into /etc/cron.d
+# with the right ownership and permissions.
+#
# At 8AM every day, mail reminders to admins as to pending requests.
# They are less likely to ignore these reminders if they're mailed
# early in the morning, but of course, this is local time... ;)
-0 8 * * * @PYTHON@ -S @prefix@/cron/checkdbs
+0 8 * * * @MAILMAN_USER@ @prefix@/cron/checkdbs
#
# At 9AM, send notifications to disabled members that are due to be
# reminded to re-enable their accounts.
-0 9 * * * @PYTHON@ -S @prefix@/cron/disabled
+0 9 * * * @MAILMAN_USER@ @prefix@/cron/disabled
#
# Noon, mail digests for lists that do periodic as well as threshhold delivery.
-0 12 * * * @PYTHON@ -S @prefix@/cron/senddigests
+0 12 * * * @MAILMAN_USER@ @prefix@/cron/senddigests
#
# 5 AM on the first of each month, mail out password reminders.
-0 5 1 * * @PYTHON@ -S @prefix@/cron/mailpasswds
+0 5 1 * * @MAILMAN_USER@ @prefix@/cron/mailpasswds
#
# Every 5 mins, try to gate news to mail. You can comment this one out
# if you don't want to allow gating, or don't have any going on right now,
# or want to exclusively use a callback strategy instead of polling.
-0,5,10,15,20,25,30,35,40,45,50,55 * * * * @PYTHON@ -S @prefix@/cron/gate_news
+0,5,10,15,20,25,30,35,40,45,50,55 * * * * @MAILMAN_USER@ @prefix@/cron/gate_news
#
# At 3:27am every night, regenerate the gzip'd archive file. Only
# turn this on if the internal archiver is used and
# GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
-27 3 * * * @PYTHON@ -S @prefix@/cron/nightly_gzip
+27 3 * * * @MAILMAN_USER@ @prefix@/cron/nightly_gzip
#
# At 4:30AM daily, cull old entries from the 'bad' and 'shunt' queues.
30 4 * * * @PYTHON@ -S @prefix@/cron/cull_bad_shunt
diff -up mailman-2.1.11/cron/mailpasswds.cron mailman-2.1.11/cron/mailpasswds
--- mailman-2.1.11/cron/mailpasswds.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/mailpasswds 2008-07-22 08:55:18.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
#
diff -up mailman-2.1.11/cron/disabled.cron mailman-2.1.11/cron/disabled
--- mailman-2.1.11/cron/disabled.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/disabled 2008-07-22 08:55:18.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
#
diff -up mailman-2.1.11/cron/bumpdigests.cron mailman-2.1.11/cron/bumpdigests
--- mailman-2.1.11/cron/bumpdigests.cron 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/cron/bumpdigests 2008-07-22 08:55:18.000000000 +0200
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! @PYTHON@ -S
#
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
mailman-2.1.11-fhsinit.patch:
--- NEW FILE mailman-2.1.11-fhsinit.patch ---
diff -up mailman-2.1.11/misc/mailman.in.fhsinit mailman-2.1.11/misc/mailman.in
--- mailman-2.1.11/misc/mailman.in.fhsinit 2008-07-23 09:41:12.000000000 +0200
+++ mailman-2.1.11/misc/mailman.in 2008-07-23 09:42:45.000000000 +0200
@@ -31,6 +31,16 @@
# processname: mailmanctl
# config: @prefix@/Mailman/mm_cfg.py
# pidfile: @PID_DIR@/master-qrunner.pid
+### BEGIN INIT INFO
+# Provides: mailman
+# Required-Start: $local_fs $remote_fs $network $named
+# Should-Start: httpd
+# Required-Stop: $local_fs $remote_fs $network
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop Mailman
+# Description: Mailman is the GNU mailing list manager.
+### END INIT INFO
MAILMANHOME=@prefix@
MAILMANCTL=$MAILMANHOME/bin/mailmanctl
@@ -118,7 +128,7 @@ case "$1" in
RETVAL=$?
;;
-'restart')
+'restart'|'force-reload')
restart
RETVAL=$?
;;
@@ -139,7 +149,8 @@ case "$1" in
;;
*)
- echo $"Usage: $prog {start|stop|restart|condrestart|status}"
+ echo $"Usage: $prog {start|stop|restart|force-reload|condrestart|status}"
+ RETVAL=3
;;
esac
mailman-2.1.11-lctype.patch:
--- NEW FILE mailman-2.1.11-lctype.patch ---
diff -up mailman-2.1.11/bin/cleanarch.lctype mailman-2.1.11/bin/cleanarch
--- mailman-2.1.11/bin/cleanarch.lctype 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/bin/cleanarch 2008-07-22 09:01:21.000000000 +0200
@@ -53,7 +53,7 @@ import getopt
import mailbox
import paths
-from Mailman.i18n import _
+from Mailman.i18n import C_
cre = re.compile(mailbox.UnixMailbox._fromlinepattern)
@@ -69,7 +69,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -80,7 +80,7 @@ def escape_line(line, lineno, quiet, out
if output:
sys.stdout.write('>' + line)
if not quiet:
- print >> sys.stderr, _('Unix-From line changed: %(lineno)d')
+ print >> sys.stderr, C_('Unix-From line changed: %(lineno)d')
print >> sys.stderr, line[:-1]
@@ -108,7 +108,7 @@ def main():
try:
status = int(arg)
except ValueError:
- usage(1, _('Bad status number: %(arg)s'))
+ usage(1, C_('Bad status number: %(arg)s'))
if args:
usage(1)
@@ -164,7 +164,7 @@ def main():
print >> sys.stderr
statuscnt = 0
prevline = line
- print >> sys.stderr, _('%(messages)d messages found')
+ print >> sys.stderr, C_('%(messages)d messages found')
diff -up mailman-2.1.11/bin/arch.lctype mailman-2.1.11/bin/arch
--- mailman-2.1.11/bin/arch.lctype 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/bin/arch 2008-07-22 09:01:21.000000000 +0200
@@ -70,7 +70,7 @@ from Mailman.Archiver.HyperArch import H
from Mailman.LockFile import LockFile
from Mailman import i18n
-_ = i18n._
+C_ = i18n.C_
PROGRAM = sys.argv[0]
i18n.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE)
@@ -82,7 +82,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -122,7 +122,7 @@ def main():
# grok arguments
if len(args) < 1:
- usage(1, _('listname is required'))
+ usage(1, C_('listname is required'))
listname = args[0].lower().strip()
if len(args) < 2:
@@ -140,7 +140,7 @@ def main():
try:
mlist = MailList(listname)
except Errors.MMListError, e:
- usage(2, _('No such list "%(listname)s"\n%(e)s'))
+ usage(2, C_('No such list "%(listname)s"\n%(e)s'))
if mbox is None:
mbox = mlist.ArchiveFileName()
@@ -180,7 +180,7 @@ def main():
try:
fp = open(mbox)
except IOError, msg:
- usage(3, _('Cannot open mbox file %(mbox)s: %(msg)s'))
+ usage(3, C_('Cannot open mbox file %(mbox)s: %(msg)s'))
archiver = HyperArchive(mlist)
archiver.VERBOSE = verbose
diff -up mailman-2.1.11/bin/config_list.lctype mailman-2.1.11/bin/config_list
--- mailman-2.1.11/bin/config_list.lctype 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/bin/config_list 2008-07-22 09:01:21.000000000 +0200
@@ -76,6 +76,7 @@ from Mailman import Errors
from Mailman import i18n
_ = i18n._
+C_ = i18n.C_
NL = '\n'
nonasciipat = re.compile(r'[\x80-\xff]')
@@ -87,7 +88,7 @@ def usage(code, msg=''):
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -106,7 +107,7 @@ def do_output(listname, outfile):
try:
mlist = MailList.MailList(listname, lock=0)
except Errors.MMListError:
- usage(1, _('No such list: %(listname)s'))
+ usage(1, C_('No such list: %(listname)s'))
# Preamble for the config info. PEP263 charset and capture time.
language = mlist.preferred_language
charset = Utils.GetCharSet(language)
@@ -114,7 +115,7 @@ def do_output(listname, outfile):
if not charset:
charset = 'us-ascii'
when = time.ctime(time.time())
- print >> outfp, _('''\
+ print >> outfp, C_('''\
# -*- python -*-
# -*- coding: %(charset)s -*-
## "%(listname)s" mailing list configuration settings
@@ -140,7 +141,7 @@ def do_list_categories(mlist, k, subcat,
if info is None:
return
charset = Utils.GetCharSet(mlist.preferred_language)
- print >> outfp, '##', k.capitalize(), _('options')
+ print >> outfp, '##', k.capitalize(), C_('options')
print >> outfp, '#'
# First, massage the descripton text, which could have obnoxious
# leading whitespace on second and subsequent lines due to
@@ -199,7 +200,7 @@ def do_list_categories(mlist, k, subcat,
outfp.write('"""\n')
elif vtype in (mm_cfg.Radio, mm_cfg.Toggle):
print >> outfp, '#'
- print >> outfp, '#', _('legal values are:')
+ print >> outfp, '#', C_('legal values are:')
# TBD: This is disgusting, but it's special cased
# everywhere else anyway...
if varname == 'subscribe_policy' and \
@@ -253,7 +254,7 @@ def do_input(listname, infile, checkonly
try:
mlist = MailList.MailList(listname, lock=not checkonly)
except Errors.MMListError, e:
- usage(1, _('No such list "%(listname)s"\n%(e)s'))
+ usage(1, C_('No such list "%(listname)s"\n%(e)s'))
savelist = 0
guibyprop = getPropertyMap(mlist)
try:
@@ -266,16 +267,16 @@ def do_input(listname, infile, checkonly
if k in ('mlist', '__builtins__'):
continue
if not hasattr(mlist, k):
- print >> sys.stderr, _('attribute "%(k)s" ignored')
+ print >> sys.stderr, C_('attribute "%(k)s" ignored')
continue
if verbose:
- print >> sys.stderr, _('attribute "%(k)s" changed')
+ print >> sys.stderr, C_('attribute "%(k)s" changed')
missing = []
gui, wtype = guibyprop.get(k, (missing, missing))
if gui is missing:
# This isn't an official property of the list, but that's
# okay, we'll just restore it the old fashioned way
- print >> sys.stderr, _('Non-standard property restored: %(k)s')
+ print >> sys.stderr, C_('Non-standard property restored: %(k)s')
setattr(mlist, k, v)
else:
# BAW: This uses non-public methods. This logic taken from
@@ -283,9 +284,9 @@ def do_input(listname, infile, checkonly
try:
validval = gui._getValidValue(mlist, k, wtype, v)
except ValueError:
- print >> sys.stderr, _('Invalid value for property: %(k)s')
+ print >> sys.stderr, C_('Invalid value for property: %(k)s')
except Errors.EmailAddressError:
- print >> sys.stderr, _(
+ print >> sys.stderr, C_(
'Bad email address for option %(k)s: %(v)s')
else:
# BAW: Horrible hack, but then this is special cased
@@ -342,13 +343,13 @@ def main():
# sanity check
if infile is not None and outfile is not None:
- usage(1, _('Only one of -i or -o is allowed'))
+ usage(1, C_('Only one of -i or -o is allowed'))
[...2127 lines suppressed...]
@@ -127,7 +127,7 @@ def dolist(mlist, options):
digest = 0
else:
if not options.quiet:
- print _(' address not found:'), options.fromaddr
+ print C_(' address not found:'), options.fromaddr
return
# Check for banned to address.
pattern = mlist.GetBannedPattern(options.toaddr)
@@ -142,13 +142,13 @@ def dolist(mlist, options):
mlist.changeMemberAddress(options.fromaddr, options.toaddr,
not options.remove)
if not options.quiet:
- print _(' clone address added:'), options.toaddr
+ print C_(' clone address added:'), options.toaddr
except Errors.MMAlreadyAMember:
if not options.quiet:
- print _(' clone address is already a member:'), options.toaddr
+ print C_(' clone address is already a member:'), options.toaddr
if options.remove:
- print _(' original address removed:'), options.fromaddr
+ print C_(' original address removed:'), options.fromaddr
@@ -199,7 +199,7 @@ def main():
try:
Utils.ValidateEmail(toaddr)
except Errors.EmailAddressError:
- usage(1, _('Not a valid email address: %(toaddr)s'))
+ usage(1, C_('Not a valid email address: %(toaddr)s'))
lfromaddr = fromaddr.lower()
options.toaddr = toaddr
options.fromaddr = fromaddr
@@ -212,7 +212,7 @@ def main():
try:
mlist = MailList.MailList(listname)
except Errors.MMListError, e:
- print _('Error opening list "%(listname)s", skipping.\n%(e)s')
+ print C_('Error opening list "%(listname)s", skipping.\n%(e)s')
continue
try:
dolist(mlist, options)
diff -up mailman-2.1.11/Mailman/MTA/Postfix.py.lctype mailman-2.1.11/Mailman/MTA/Postfix.py
--- mailman-2.1.11/Mailman/MTA/Postfix.py.lctype 2008-07-22 09:01:21.000000000 +0200
+++ mailman-2.1.11/Mailman/MTA/Postfix.py 2008-07-22 09:01:21.000000000 +0200
@@ -27,7 +27,7 @@ from stat import *
from Mailman import mm_cfg
from Mailman import Utils
from Mailman import LockFile
-from Mailman.i18n import _
+from Mailman.i18n import C_
from Mailman.MTA.Utils import makealiases
from Mailman.Logging.Syslog import syslog
@@ -303,7 +303,7 @@ def checkperms(state):
targetmode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
for file in ALIASFILE, VIRTFILE:
if state.VERBOSE:
- print _('checking permissions on %(file)s')
+ print C_('checking permissions on %(file)s')
stat = None
try:
stat = os.stat(file)
@@ -313,9 +313,9 @@ def checkperms(state):
if stat and (stat[ST_MODE] & targetmode) <> targetmode:
state.ERRORS += 1
octmode = oct(stat[ST_MODE])
- print _('%(file)s permissions must be 066x (got %(octmode)s)'),
+ print C_('%(file)s permissions must be 066x (got %(octmode)s)'),
if state.FIX:
- print _('(fixing)')
+ print C_('(fixing)')
os.chmod(file, stat[ST_MODE] | targetmode)
else:
print
@@ -331,7 +331,7 @@ def checkperms(state):
raise
continue
if state.VERBOSE:
- print _('checking ownership of %(dbfile)s')
+ print C_('checking ownership of %(dbfile)s')
user = mm_cfg.MAILMAN_USER
ownerok = stat[ST_UID] == pwd.getpwnam(user)[2]
if not ownerok:
@@ -339,10 +339,10 @@ def checkperms(state):
owner = pwd.getpwuid(stat[ST_UID])[0]
except KeyError:
owner = 'uid %d' % stat[ST_UID]
- print _('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'),
+ print C_('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'),
state.ERRORS += 1
if state.FIX:
- print _('(fixing)')
+ print C_('(fixing)')
uid = pwd.getpwnam(user)[2]
gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
os.chown(dbfile, uid, gid)
diff -up mailman-2.1.11/Mailman/MTA/Manual.py.lctype mailman-2.1.11/Mailman/MTA/Manual.py
--- mailman-2.1.11/Mailman/MTA/Manual.py.lctype 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/Mailman/MTA/Manual.py 2008-07-22 09:01:21.000000000 +0200
@@ -25,7 +25,7 @@ from Mailman import mm_cfg
from Mailman import Message
from Mailman import Utils
from Mailman.Queue.sbcache import get_switchboard
-from Mailman.i18n import _
+from Mailman.i18n import _, C_
from Mailman.MTA.Utils import makealiases
try:
@@ -74,12 +74,12 @@ Here are the entries for the /etc/aliase
outfp = sfp
else:
if not quiet:
- print _("""\
+ print C_("""\
To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:
""")
- print _("""\
+ print C_("""\
## %(listname)s mailing list""")
outfp = sys.stdout
# Common path
@@ -120,7 +120,7 @@ Here are the entries in the /etc/aliases
""")
outfp = sfp
else:
- print _("""
+ print C_("""
To finish removing your mailing list, you must edit your /etc/aliases (or
equivalent) file by removing the following lines, and possibly running the
`newaliases' program:
diff -up mailman-2.1.11/Mailman/i18n.py.lctype mailman-2.1.11/Mailman/i18n.py
--- mailman-2.1.11/Mailman/i18n.py.lctype 2008-06-30 18:29:46.000000000 +0200
+++ mailman-2.1.11/Mailman/i18n.py 2008-07-22 09:01:21.000000000 +0200
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
+import locale
import sys
import time
import gettext
@@ -25,6 +26,15 @@ from Mailman.SafeDict import SafeDict
_translation = None
+
+def _get_ctype_charset():
+ old = locale.setlocale(locale.LC_CTYPE, '')
+ charset = locale.nl_langinfo(locale.CODESET)
+ locale.setlocale(locale.LC_CTYPE, old)
+ return charset
+
+_ctype_charset = _get_ctype_charset()
+
def set_language(language=None):
@@ -54,7 +64,7 @@ if _translation is None:
-def _(s):
+def _(s, frame = 1):
if s == '':
return s
assert s
@@ -70,7 +80,7 @@ def _(s):
# original string is 1) locals dictionary, 2) globals dictionary.
#
# First, get the frame of the caller
- frame = sys._getframe(1)
+ frame = sys._getframe(frame)
# A `safe' dictionary is used so we won't get an exception if there's a
# missing key in the dictionary.
dict = SafeDict(frame.f_globals.copy())
@@ -91,6 +101,19 @@ def _(s):
+def tolocale(s):
+ global _ctype_charset
+ if isinstance(s, UnicodeType):
+ return s
+ source = _translation.charset ()
+ if not source:
+ return s
+ return unicode(s, source, 'replace').encode(_ctype_charset, 'replace')
+
+def C_(s):
+ return tolocale(_(s, 2))
+
+
def ctime(date):
# Don't make these module globals since we have to do runtime translation
# of the strings anyway.
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/mailman/devel/.cvsignore,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- .cvsignore 13 May 2008 08:32:25 -0000 1.17
+++ .cvsignore 23 Jul 2008 08:40:04 -0000 1.18
@@ -1 +1 @@
-mailman-2.1.10.tgz
+mailman-2.1.11.tgz
Index: mailman.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mailman/devel/mailman.spec,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- mailman.spec 13 May 2008 08:32:26 -0000 1.70
+++ mailman.spec 23 Jul 2008 08:40:04 -0000 1.71
@@ -1,6 +1,6 @@
Summary: Mailing list manager with built in Web access
Name: mailman
-Version: 2.1.10
+Version: 2.1.11
Release: 1%{?dist}
Epoch: 3
Group: Applications/Internet
@@ -16,17 +16,17 @@
Patch1: mailman-2.1-multimail.patch
Patch2: mailman-2.1-build.patch
Patch3: mailman-2.1-mailmanctl-status.patch
-Patch4: mailman-2.1.10-cron.patch
+Patch4: mailman-2.1.11-cron.patch
Patch5: mailman-2.1.10-FHS.patch
Patch6: mailman-python-compile.patch
Patch7: mailman-2.1.10-archive-reply.patch
-Patch8: mailman-2.1.10-LC_CTYPE.patch
+Patch8: mailman-2.1.11-lctype.patch
Patch9: mailman-2.1.9-ctypo-new.patch
-Patch10: mailman-2.1.9-init-retval.patch
-Patch11: mailman-2.1.10-ctypefix.patch
-Patch12: mailman-2.1.9-header-folding.patch
-Patch13: mailman-2.1.9-selinux.patch
-Patch14: mailman-2.1.9-unicode.patch
+Patch10: mailman-2.1.10-ctypefix.patch
+Patch11: mailman-2.1.9-header-folding.patch
+Patch12: mailman-2.1.9-selinux.patch
+Patch13: mailman-2.1.9-unicode.patch
+Patch14: mailman-2.1.11-fhsinit.patch
License: GPLv2+
URL: http://www.list.org/
@@ -102,11 +102,11 @@
%patch7 -p1 -b .archive-in-reply-to
%patch8 -p1 -b .lctype
%patch9 -p1 -b .ctypo
-%patch10 -p1 -b .retval
-%patch11 -p1 -b .ctypefix
-%patch12 -p0 -b .header
-%patch13 -p1 -b .selinux
-%patch14 -p1 -b .unicode
+%patch10 -p1 -b .ctypefix
+%patch11 -p0 -b .header
+%patch12 -p1 -b .selinux
+%patch13 -p1 -b .unicode
+%patch14 -p1 -b .fhsinit
#cp $RPM_SOURCE_DIR/mailman.INSTALL.REDHAT.in INSTALL.REDHAT.in
cp %{SOURCE5} INSTALL.REDHAT.in
@@ -352,6 +352,10 @@
%attr(0644,root,%{mmgroup}) %config(noreplace) %{mmdir}/cron/crontab.in
%changelog
+* Tue Jul 22 2008 Tomas Smetana <tsmetana at redhat.com> - 3:2.1.11-1
+- new upstream version
+- fix #246978 - FHS compliant initscript
+
* Mon May 12 2008 Tomas Smetana <tsmetana at redhat.com> - 3:2.1.10-1
- new upstream version
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mailman/devel/sources,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- sources 13 May 2008 08:32:26 -0000 1.17
+++ sources 23 Jul 2008 08:40:04 -0000 1.18
@@ -1 +1 @@
-79157d337a29f716a3a1ff8b70501f8d mailman-2.1.10.tgz
+d9fd89f54c4743dbcb3b3eec8c6146d6 mailman-2.1.11.tgz
--- mailman-2.1.10-LC_CTYPE.patch DELETED ---
--- mailman-2.1.10-cron.patch DELETED ---
--- mailman-2.1.9-init-retval.patch DELETED ---
More information about the scm-commits
mailing list