[mailman] fix #773188 - fix typo in reset_pw.py causing it to not work

Jan Kaluža jkaluza at fedoraproject.org
Wed Jan 11 08:07:23 UTC 2012


commit 8686a2b7408203904fc3e92e39d4f197eab151c3
Author: Jan Kaluza <hanzz.k at gmail.com>
Date:   Wed Jan 11 09:03:05 2012 +0100

    fix #773188 - fix typo in reset_pw.py causing it to not work

 mailman-2.1.9-ctypo-new.patch |  143 ++++++++++++++++++++++++++++++-----------
 mailman.spec                  |    5 +-
 2 files changed, 109 insertions(+), 39 deletions(-)
---
diff --git a/mailman-2.1.9-ctypo-new.patch b/mailman-2.1.9-ctypo-new.patch
index d9b50ee..7f8d3d9 100644
--- a/mailman-2.1.9-ctypo-new.patch
+++ b/mailman-2.1.9-ctypo-new.patch
@@ -1,7 +1,24 @@
-diff -ruN mailman-2.1.12-a/bin/change_pw mailman-2.1.12-b/bin/change_pw
---- mailman-2.1.12-a/bin/change_pw	2009-02-23 22:23:35.000000000 +0100
-+++ mailman-2.1.12-b/bin/change_pw	2009-07-28 12:19:50.000000000 +0200
-@@ -186,8 +186,8 @@
+diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py
+index c4f21e4..0a8395b 100644
+--- a/Mailman/MTA/Postfix.py
++++ b/Mailman/MTA/Postfix.py
+@@ -362,9 +362,9 @@ def checkperms(state):
+         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
+diff --git a/bin/change_pw b/bin/change_pw
+index 35be13d..b9a36de 100644
+--- a/bin/change_pw
++++ b/bin/change_pw
+@@ -187,8 +187,8 @@ def main():
                  adminurl = mlist.GetScriptURL('admin', absolute=1)
                  msg = Message.UserNotification(
                      mlist.owner[:], Utils.get_site_email(),
@@ -12,10 +29,11 @@ diff -ruN mailman-2.1.12-a/bin/change_pw mailman-2.1.12-b/bin/change_pw
  The site administrator at %(hostname)s has changed the password for your
  mailing list %(listname)s.  It is now
  
-diff -ruN mailman-2.1.12-a/bin/check_perms mailman-2.1.12-b/bin/check_perms
---- mailman-2.1.12-a/bin/check_perms	2009-07-28 12:19:49.000000000 +0200
-+++ mailman-2.1.12-b/bin/check_perms	2009-07-28 12:19:50.000000000 +0200
-@@ -221,7 +221,7 @@
+diff --git a/bin/check_perms b/bin/check_perms
+index f0c6795..5ef3306 100755
+--- a/bin/check_perms
++++ b/bin/check_perms
+@@ -221,7 +221,7 @@ def checkarchives():
      # 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:
@@ -24,10 +42,50 @@ diff -ruN mailman-2.1.12-a/bin/check_perms mailman-2.1.12-b/bin/check_perms
  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
-diff -ruN mailman-2.1.12-a/bin/newlist mailman-2.1.12-b/bin/newlist
---- mailman-2.1.12-a/bin/newlist	2009-02-23 22:23:35.000000000 +0100
-+++ mailman-2.1.12-b/bin/newlist	2009-07-28 12:19:50.000000000 +0200
-@@ -246,7 +246,7 @@
+diff --git a/bin/clone_member b/bin/clone_member
+index d9ff224..b262aab 100755
+--- a/bin/clone_member
++++ b/bin/clone_member
+@@ -133,7 +133,7 @@ def dolist(mlist, options):
+     pattern = mlist.GetBannedPattern(options.toaddr)
+     if pattern:
+         if not options.quiet:
+-            print '   ', _('Banned address (matched %(pattern)s)')
++            print '   ', C_('Banned address (matched %(pattern)s)')
+         return
+ 
+     # Now change the membership address
+diff --git a/bin/fix_url.py b/bin/fix_url.py
+index 6523ce2..d4840be 100644
+--- a/bin/fix_url.py
++++ b/bin/fix_url.py
+@@ -72,7 +72,7 @@ def fix_url(mlist, *args):
+     # Make sure list is locked.
+     if not mlist.Locked():
+         if verbose:
+-            print _('Locking list')
++            print C_('Locking list')
+         mlist.Lock()
+     if urlhost:
+         web_page_url = mm_cfg.DEFAULT_URL_PATTERN % urlhost
+diff --git a/bin/genaliases b/bin/genaliases
+index 29e5b5a..d6b9f07 100644
+--- a/bin/genaliases
++++ b/bin/genaliases
+@@ -81,7 +81,7 @@ def main():
+ 
+     if not mm_cfg.MTA:
+         mta = repr(mm_cfg.MTA)
+-        usage(2, _(
++        usage(2, C_(
+             "genaliases can't do anything useful with mm_cfg.MTA = %(mta)s."
+              ))
+ 
+diff --git a/bin/newlist b/bin/newlist
+index 7000396..e52f340 100755
+--- a/bin/newlist
++++ b/bin/newlist
+@@ -248,7 +248,7 @@ def main():
          try:
              msg = Message.UserNotification(
                  owner_mail, siteowner,
@@ -36,19 +94,29 @@ diff -ruN mailman-2.1.12-a/bin/newlist mailman-2.1.12-b/bin/newlist
                  text, mlist.preferred_language)
              msg.send(mlist)
          finally:
-diff -ruN mailman-2.1.12-a/bin/reset_pw.py mailman-2.1.12-b/bin/reset_pw.py
---- mailman-2.1.12-a/bin/reset_pw.py	2009-02-23 22:23:35.000000000 +0100
-+++ mailman-2.1.12-b/bin/reset_pw.py	2009-07-28 12:19:50.000000000 +0200
-@@ -38,7 +38,7 @@
+diff --git a/bin/reset_pw.py b/bin/reset_pw.py
+index e829aef..b71d532 100644
+--- a/bin/reset_pw.py
++++ b/bin/reset_pw.py
+@@ -38,7 +38,7 @@ import getopt
  
  import paths
  from Mailman import Utils
 -from Mailman.i18n import _
-+from Mailman.i18n import _C
++from Mailman.i18n import C_
  
  
  try:
-@@ -74,13 +74,13 @@
+@@ -54,7 +54,7 @@ def usage(code, msg=''):
+         fd = sys.stderr
+     else:
+         fd = sys.stdout
+-    print >> fd, _(__doc__.replace('%', '%%'))
++    print >> fd, C_(__doc__.replace('%', '%%'))
+     if msg:
+         print >> fd, msg
+     sys.exit(code)
+@@ -74,13 +74,13 @@ def reset_pw(mlist, *args):
  
      listname = mlist.internal_name()
      if verbose:
@@ -64,10 +132,24 @@ diff -ruN mailman-2.1.12-a/bin/reset_pw.py mailman-2.1.12-b/bin/reset_pw.py
  
      mlist.Save()
  
-diff -ruN mailman-2.1.12-a/bin/update mailman-2.1.12-b/bin/update
---- mailman-2.1.12-a/bin/update	2009-02-23 22:23:35.000000000 +0100
-+++ mailman-2.1.12-b/bin/update	2009-07-28 12:19:50.000000000 +0200
-@@ -455,7 +455,7 @@
+diff --git a/bin/sync_members b/bin/sync_members
+index d302243..26a5e58 100755
+--- a/bin/sync_members
++++ b/bin/sync_members
+@@ -261,7 +261,7 @@ def main():
+             except Errors.MMAlreadyAMember:
+                 pass
+             except Errors.MembershipIsBanned, pattern:
+-                print ('%s:' % addr), _('Banned address (matched %(pattern)s)')
++                print ('%s:' % addr), C_('Banned address (matched %(pattern)s)')
+ 
+         for laddr, addr in addrs.items():
+             # Should be a member, otherwise our test above is broken
+diff --git a/bin/update b/bin/update
+index 0ac5ffe..b584342 100755
+--- a/bin/update
++++ b/bin/update
+@@ -452,7 +452,7 @@ def update_qfiles():
          except EnvironmentError, e:
              if e.errno <> errno.ENOTDIR:
                  raise
@@ -76,7 +158,7 @@ diff -ruN mailman-2.1.12-a/bin/update mailman-2.1.12-b/bin/update
  
  
  
-@@ -538,7 +538,7 @@
+@@ -541,7 +541,7 @@ def dequeue(filebase):
                  msg = data = None
          except EOFError:
              # For some reason the pckfile was empty.  Just delete it.
@@ -85,18 +167,3 @@ diff -ruN mailman-2.1.12-a/bin/update mailman-2.1.12-b/bin/update
              os.unlink(pckfile)
      finally:
          if msgfp:
-diff -ruN mailman-2.1.12-a/Mailman/MTA/Postfix.py mailman-2.1.12-b/Mailman/MTA/Postfix.py
---- mailman-2.1.12-a/Mailman/MTA/Postfix.py	2009-07-28 12:19:49.000000000 +0200
-+++ mailman-2.1.12-b/Mailman/MTA/Postfix.py	2009-07-28 12:19:50.000000000 +0200
-@@ -356,9 +356,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
diff --git a/mailman.spec b/mailman.spec
index e89c65d..8a9de07 100644
--- a/mailman.spec
+++ b/mailman.spec
@@ -1,7 +1,7 @@
 Summary: Mailing list manager with built in Web access
 Name: mailman
 Version: 2.1.14
-Release: 11%{?dist}
+Release: 12%{?dist}
 Epoch: 3
 Group: Applications/Internet
 Source0: ftp://ftp.gnu.org/pub/gnu/mailman/mailman-%{version}.tgz
@@ -542,6 +542,9 @@ exit 0
 %attr(2770,%{cgiuser},%{mmgroup}) %{archivesdir}/private
 
 %changelog
+* Wed Jan 11 2012 Jan Kaluza <jkaluza at redhat.com> - 3:2.1.14-12
+- fix #773188 - fix typo in reset_pw.py causing it to not work
+
 * Thu Dec 15 2011 Jan Kaluza <jkaluza at redhat.com> - 3:2.1.14-11
 - fix #754898 - decode subjects
 


More information about the scm-commits mailing list