rpms/mailman/devel mailman-2.1.9-LC_CTYPE.patch, NONE, 1.1 mailman.spec, 1.63, 1.64
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Jan 29 14:18:27 UTC 2007
- Previous message (by thread): rpms/netpbm/FC-6 netpbm.spec,1.83,1.84
- Next message (by thread): rpms/xdelta/devel xdelta-1.1.4-glib2.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 xdelta.spec, 1.23, 1.24 xdelta-1.1.3-allocbug.patch, 1.1, NONE xdelta-1.1.3-freegen.patch, 1.1, NONE xdelta-1.1.3-gcc4.patch, 1.1, NONE xdelta-1.1.3-glib2.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: harald
Update of /cvs/dist/rpms/mailman/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19626
Modified Files:
mailman.spec
Added Files:
mailman-2.1.9-LC_CTYPE.patch
Log Message:
- mailman-2.1.9-LC_CTYPE.patch added (bug #132495)
- Resolves: rhbz#132495
mailman-2.1.9-LC_CTYPE.patch:
Mailman/MTA/Manual.py | 8 ++--
Mailman/MTA/Postfix.py | 14 +++----
Mailman/i18n.py | 27 +++++++++++++-
bin/add_members | 17 ++++-----
bin/arch | 10 ++---
bin/b4b5-archfix | 4 +-
bin/change_pw | 13 +++----
bin/check_db | 12 +++---
bin/check_perms | 82 ++++++++++++++++++++++----------------------
bin/cleanarch | 10 ++---
bin/clone_member | 24 ++++++-------
bin/config_list | 29 ++++++++-------
bin/convert.py | 6 +--
bin/discard | 12 +++---
bin/dumpdb | 16 ++++----
bin/find_member | 14 +++----
bin/fix_url.py | 10 ++---
bin/genaliases | 4 +-
bin/inject | 10 ++---
bin/list_admins | 8 ++--
bin/list_lists | 10 ++---
bin/list_members | 12 +++---
bin/list_owners | 4 +-
bin/mailmanctl | 40 ++++++++++-----------
bin/mmsitepass | 20 +++++-----
bin/newlist | 23 ++++++------
bin/qrunner | 10 ++---
bin/rb-archfix | 4 +-
bin/remove_members | 12 +++---
bin/rmlist | 28 +++++++--------
bin/show_qfiles | 4 +-
bin/sync_members | 34 +++++++++---------
bin/transcheck | 4 +-
bin/unshunt | 6 +--
bin/update | 90 ++++++++++++++++++++++++-------------------------
bin/version | 4 +-
bin/withlist | 22 +++++------
37 files changed, 342 insertions(+), 315 deletions(-)
--- NEW FILE mailman-2.1.9-LC_CTYPE.patch ---
Nur in mailman-2.1.9-new: autom4te.cache.
diff -ur mailman-2.1.9/bin/add_members mailman-2.1.9-new/bin/add_members
--- mailman-2.1.9/bin/add_members 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.9-new/bin/add_members 2007-01-29 14:29:46.000000000 +0100
@@ -81,6 +81,7 @@
from Mailman import i18n
_ = i18n._
+C_ = i18n.C_
@@ -89,7 +90,7 @@
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(status)
@@ -116,7 +117,7 @@
self.__outfp = outfp
def write(self, msg):
- sys.stdout.write(msg)
+ sys.stdout.write(i18n.tolocale(msg))
self.__outfp.write(msg)
@@ -188,26 +189,26 @@
elif arg.lower()[0] == 'n':
send_welcome_msg = 0
else:
- usage(1, _('Bad argument to -w/--welcome-msg: %(arg)s'))
+ usage(1, C_('Bad argument to -w/--welcome-msg: %(arg)s'))
elif opt in ('-a', '--admin-notify'):
if arg.lower()[0] == 'y':
admin_notif = 1
elif arg.lower()[0] == 'n':
admin_notif = 0
else:
- usage(1, _('Bad argument to -a/--admin-notify: %(arg)s'))
+ usage(1, C_('Bad argument to -a/--admin-notify: %(arg)s'))
if dfile is None and nfile is None:
usage(1)
if dfile == "-" and nfile == "-":
- usage(1, _('Cannot read both digest and normal members '
- 'from standard input.'))
+ usage(1, C_('Cannot read both digest and normal members '
+ 'from standard input.'))
try:
mlist = MailList.MailList(listname)
except Errors.MMUnknownListError:
- usage(1, _('No such list: %(listname)s'))
+ usage(1, C_('No such list: %(listname)s'))
# Set up defaults
if send_welcome_msg is None:
@@ -227,7 +228,7 @@
nmembers = readfile(nfile)
if not dmembers and not nmembers:
- usage(0, _('Nothing to do.'))
+ usage(0, C_('Nothing to do.'))
s = StringIO()
i18n.set_language(mlist.preferred_language)
diff -ur mailman-2.1.9/bin/arch mailman-2.1.9-new/bin/arch
--- mailman-2.1.9/bin/arch 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.9-new/bin/arch 2007-01-29 14:29:46.000000000 +0100
@@ -70,7 +70,7 @@
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 @@
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 @@
# 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 @@
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 @@
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
Nur in mailman-2.1.9-new/bin: arch.orig.
diff -ur mailman-2.1.9/bin/b4b5-archfix mailman-2.1.9-new/bin/b4b5-archfix
--- mailman-2.1.9/bin/b4b5-archfix 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.9-new/bin/b4b5-archfix 2007-01-29 14:29:46.000000000 +0100
@@ -44,7 +44,7 @@
# Required to get the right classes for unpickling
import paths
-from Mailman.i18n import _
+from Mailman.i18n import C_
PROGRAM = sys.argv[0]
@@ -55,7 +55,7 @@
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
diff -ur mailman-2.1.9/bin/change_pw mailman-2.1.9-new/bin/change_pw
--- mailman-2.1.9/bin/change_pw 2005-08-27 03:40:17.000000000 +0200
+++ mailman-2.1.9-new/bin/change_pw 2007-01-29 14:32:07.000000000 +0100
@@ -77,6 +77,7 @@
from Mailman import i18n
_ = i18n._
+C_ = i18n.C_
SPACE = ' '
@@ -87,7 +88,7 @@
fd = sys.stderr
else:
fd = sys.stdout
- print >> fd, _(__doc__)
+ print >> fd, C_(__doc__)
if msg:
print >> fd, msg
sys.exit(code)
@@ -103,7 +104,7 @@
try:
mlist = MailList.MailList(listname, lock=0)
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'))
_listcache[listname] = mlist
return mlist
@@ -141,11 +142,11 @@
if args:
strargs = SPACE.join(args)
- usage(1, _('Bad arguments: %(strargs)s'))
+ usage(1, C_('Bad arguments: %(strargs)s'))
if password is not None:
if not password:
- usage(1, _('Empty list passwords are not allowed'))
+ usage(1, C_('Empty list passwords are not allowed'))
shapassword = sha.new(password).hexdigest()
if domains:
@@ -155,7 +156,7 @@
listnames[name] = 1
if not listnames:
- print >> sys.stderr, _('Nothing to do.')
+ print >> sys.stderr, C_('Nothing to do.')
sys.exit(0)
# Set the password on the lists
@@ -177,7 +178,7 @@
mlist.Unlock()
# Notification
- print _('New %(listname)s password: %(notifypassword)s')
+ print C_('New %(listname)s password: %(notifypassword)s')
[...2145 lines suppressed...]
except Errors.MMUnknownListError:
- print >> sys.stderr, _('Unknown list: %(listname)s')
+ print >> sys.stderr, C_('Unknown list: %(listname)s')
m = None
# try to import the module and run the callable
@@ -233,7 +233,7 @@
all = True
if len(args) < 1 and not all:
- warning = _('No list name supplied.')
+ warning = C_('No list name supplied.')
if interact:
# Let them keep going
print warning
@@ -242,7 +242,7 @@
usage(1, warning)
if all and not run:
- usage(1, _('--all requires --run'))
+ usage(1, C_('--all requires --run'))
# The default for interact is 1 unless -r was given
if interact is None:
@@ -262,10 +262,10 @@
module = run[:i]
callable = run[i+1:]
if VERBOSE:
- print >> sys.stderr, _('Importing %(module)s...')
+ print >> sys.stderr, C_('Importing %(module)s...')
mod = __import__(module)
if VERBOSE:
- print >> sys.stderr, _('Running %(module)s.%(callable)s()...')
+ print >> sys.stderr, C_('Running %(module)s.%(callable)s()...')
func = getattr(mod, callable)
if all:
diff -ur mailman-2.1.9/Mailman/i18n.py mailman-2.1.9-new/Mailman/i18n.py
--- mailman-2.1.9/Mailman/i18n.py 2006-02-23 07:25:29.000000000 +0100
+++ mailman-2.1.9-new/Mailman/i18n.py 2007-01-29 14:29:45.000000000 +0100
@@ -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 @@
_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 @@
-def _(s):
+def _(s, frame = 1):
if s == '':
return s
assert s
@@ -70,7 +80,7 @@
# 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 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.
Nur in mailman-2.1.9-new/Mailman: i18n.py.orig.
Nur in mailman-2.1.9-new/Mailman/Logging: Makefile.
Nur in mailman-2.1.9-new/Mailman: Makefile.
Nur in mailman-2.1.9-new/Mailman: mm_cfg.py.dist.
Nur in mailman-2.1.9-new/Mailman/MTA: Makefile.
diff -ur mailman-2.1.9/Mailman/MTA/Manual.py mailman-2.1.9-new/Mailman/MTA/Manual.py
--- mailman-2.1.9/Mailman/MTA/Manual.py 2005-12-30 19:50:08.000000000 +0100
+++ mailman-2.1.9-new/Mailman/MTA/Manual.py 2007-01-29 14:29:45.000000000 +0100
@@ -25,7 +25,7 @@
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 @@
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 @@
""")
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:
Nur in mailman-2.1.9-new/Mailman/MTA: Manual.py.orig.
diff -ur mailman-2.1.9/Mailman/MTA/Postfix.py mailman-2.1.9-new/Mailman/MTA/Postfix.py
--- mailman-2.1.9/Mailman/MTA/Postfix.py 2007-01-29 14:37:43.000000000 +0100
+++ mailman-2.1.9-new/Mailman/MTA/Postfix.py 2007-01-29 14:35:09.000000000 +0100
@@ -27,7 +27,7 @@
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 @@
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 @@
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 @@
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 @@
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)
Index: mailman.spec
===================================================================
RCS file: /cvs/dist/rpms/mailman/devel/mailman.spec,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- mailman.spec 23 Jan 2007 13:55:57 -0000 1.63
+++ mailman.spec 29 Jan 2007 14:18:25 -0000 1.64
@@ -1,7 +1,7 @@
Summary: Mailing list manager with built in Web access.
Name: mailman
Version: 2.1.9
-Release: 4
+Release: 5
Epoch: 3
Group: Applications/Internet
#Source0: ftp://ftp.gnu.org/pub/gnu/mailman/mailman-%{version}.tgz
@@ -20,6 +20,7 @@
Patch6: mailman-python-compile.patch
Patch7: mailman-init.patch
Patch8: mailman-archive-reply.patch
+Patch9: mailman-2.1.9-LC_CTYPE.patch
License: GPL
URL: http://www.list.org/
@@ -94,6 +95,7 @@
%patch6 -p1 -b .python-compile
%patch7 -p1 -b .inithelp
%patch8 -p1 -b .archive-in-reply-to
+%patch9 -p1 -b .lctype
cp $RPM_SOURCE_DIR/mailman.INSTALL.REDHAT.in INSTALL.REDHAT.in
@@ -326,6 +328,10 @@
%attr(0644,root,%{mmgroup}) %config(noreplace) %{mmdir}/cron/crontab.in
%changelog
+* Mon Jan 29 2007 Harald Hoyer <harald at redhat.com> - 3:2.1.9-5
+- mailman-2.1.9-LC_CTYPE.patch added (bug #132495)
+- Resolves: rhbz#132495
+
* Tue Jan 23 2007 Florian La Roche <laroche at redhat.com>
- add fix from rhbz#219054: usage output mentions "status" option
- Previous message (by thread): rpms/netpbm/FC-6 netpbm.spec,1.83,1.84
- Next message (by thread): rpms/xdelta/devel xdelta-1.1.4-glib2.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 sources, 1.3, 1.4 xdelta.spec, 1.23, 1.24 xdelta-1.1.3-allocbug.patch, 1.1, NONE xdelta-1.1.3-freegen.patch, 1.1, NONE xdelta-1.1.3-gcc4.patch, 1.1, NONE xdelta-1.1.3-glib2.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list