Sun, 29 May 2011 16:29:06 +0200
Update, correct, improve build configuration and packaging logic.
Update to new version of vendor software, bump copyright date, remove implicit
gcc dependency, add comments for Trolltech bug tracking, correct enforced
dynamic library linkage, and install mysterious process stub binary.
michael@7 | 1 | Index: Mailman/Archiver/pipermail.py |
michael@7 | 2 | --- Mailman/Archiver/pipermail.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 3 | +++ Mailman/Archiver/pipermail.py 2008-07-01 20:48:10 +0200 |
michael@7 | 4 | @@ -122,9 +122,9 @@ |
michael@7 | 5 | parentID = article.parentID |
michael@7 | 6 | if parentID is not None and self.articleIndex.has_key(parentID): |
michael@7 | 7 | parent = self.getArticle(archive, parentID) |
michael@7 | 8 | - myThreadKey = parent.threadKey + article.date + '-' |
michael@7 | 9 | + myThreadKey = parent.threadKey + article.date + '/' + article.msgid + '-' |
michael@7 | 10 | else: |
michael@7 | 11 | - myThreadKey = article.date + '-' |
michael@7 | 12 | + myThreadKey = article.date + '/' + article.msgid + '-' |
michael@7 | 13 | article.threadKey = myThreadKey |
michael@7 | 14 | key = myThreadKey, article.msgid |
michael@7 | 15 | self.setThreadKey(archive, key, article.msgid) |
michael@7 | 16 | @@ -418,7 +418,7 @@ |
michael@7 | 17 | else: |
michael@7 | 18 | parent = self.database.getArticle(self.archive, |
michael@7 | 19 | article.parentID) |
michael@7 | 20 | - article.threadKey = parent.threadKey+article.date+'-' |
michael@7 | 21 | + article.threadKey = parent.threadKey + article.date + '/' + article.msgid + '-' |
michael@7 | 22 | self.database.setThreadKey(self.archive, |
michael@7 | 23 | (article.threadKey, article.msgid), |
michael@7 | 24 | msgid) |
michael@7 | 25 | @@ -632,9 +632,9 @@ |
michael@7 | 26 | article.parentID = parentID = self.get_parent_info(arch, article) |
michael@7 | 27 | if parentID: |
michael@7 | 28 | parent = self.database.getArticle(arch, parentID) |
michael@7 | 29 | - article.threadKey = parent.threadKey + article.date + '-' |
michael@7 | 30 | + article.threadKey = parent.threadKey + article.date + '/' + article.msgid + '-' |
michael@7 | 31 | else: |
michael@7 | 32 | - article.threadKey = article.date + '-' |
michael@7 | 33 | + article.threadKey = article.date + '/' + article.msgid + '-' |
michael@7 | 34 | key = article.threadKey, article.msgid |
michael@7 | 35 | |
michael@7 | 36 | self.database.setThreadKey(arch, key, article.msgid) |
michael@7 | 37 | Index: Mailman/Commands/cmd_subscribe.py |
michael@7 | 38 | --- Mailman/Commands/cmd_subscribe.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 39 | +++ Mailman/Commands/cmd_subscribe.py 2008-07-01 20:48:10 +0200 |
michael@7 | 40 | @@ -84,6 +84,7 @@ |
michael@7 | 41 | if password is None: |
michael@7 | 42 | password = Utils.MakeRandomPassword() |
michael@7 | 43 | if address is None: |
michael@7 | 44 | + h = None |
michael@7 | 45 | realname, address = parseaddr(res.msg['from']) |
michael@7 | 46 | if not address: |
michael@7 | 47 | # Fall back to the sender address |
michael@7 | 48 | Index: Mailman/HTMLFormatter.py |
michael@7 | 49 | --- Mailman/HTMLFormatter.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 50 | +++ Mailman/HTMLFormatter.py 2008-07-01 20:48:10 +0200 |
michael@7 | 51 | @@ -44,7 +44,7 @@ |
michael@7 | 52 | realname = self.real_name |
michael@7 | 53 | hostname = self.host_name |
michael@7 | 54 | listinfo_link = Link(self.GetScriptURL('listinfo'), realname).Format() |
michael@7 | 55 | - owner_link = Link('mailto:' + self.GetOwnerEmail(), ownertext).Format() |
michael@7 | 56 | + owner_link = Link('mailto:' + self.GetOwnerEmail(), realname + '-owner').Format() |
michael@7 | 57 | innertext = _('%(listinfo_link)s list run by %(owner_link)s') |
michael@7 | 58 | return Container( |
michael@7 | 59 | '<hr>', |
michael@7 | 60 | Index: Mailman/Handlers/Decorate.py |
michael@7 | 61 | --- Mailman/Handlers/Decorate.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 62 | +++ Mailman/Handlers/Decorate.py 2008-07-01 20:48:10 +0200 |
michael@7 | 63 | @@ -197,6 +197,7 @@ |
michael@7 | 64 | del msg['content-transfer-encoding'] |
michael@7 | 65 | del msg['content-disposition'] |
michael@7 | 66 | msg['Content-Type'] = 'multipart/mixed' |
michael@7 | 67 | + msg['Mime-version'] = '1.0' |
michael@7 | 68 | |
michael@7 | 69 | |
michael@7 | 70 | |
michael@7 | 71 | Index: Mailman/Handlers/Scrubber.py |
michael@7 | 72 | --- Mailman/Handlers/Scrubber.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 73 | +++ Mailman/Handlers/Scrubber.py 2008-07-01 20:48:10 +0200 |
michael@7 | 74 | @@ -385,6 +385,8 @@ |
michael@7 | 75 | t = unicode(t, 'ascii', 'replace') |
michael@7 | 76 | try: |
michael@7 | 77 | # Should use HTML-Escape, or try generalizing to UTF-8 |
michael@7 | 78 | + if len(charset) == 0: |
michael@7 | 79 | + charset = 'us-ascii' |
michael@7 | 80 | t = t.encode(charset, 'replace') |
michael@7 | 81 | except (UnicodeError, LookupError, ValueError, |
michael@7 | 82 | AssertionError): |
michael@7 | 83 | Index: Mailman/Queue/OutgoingRunner.py |
michael@7 | 84 | --- Mailman/Queue/OutgoingRunner.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 85 | +++ Mailman/Queue/OutgoingRunner.py 2008-07-01 20:48:10 +0200 |
michael@7 | 86 | @@ -89,6 +89,7 @@ |
michael@7 | 87 | syslog('error', 'Cannot connect to SMTP server %s on port %s', |
michael@7 | 88 | mm_cfg.SMTPHOST, port) |
michael@7 | 89 | self.__logged = True |
michael@7 | 90 | + self._snooze(0) |
michael@7 | 91 | return True |
michael@7 | 92 | except Errors.SomeRecipientsFailed, e: |
michael@7 | 93 | # Handle local rejects of probe messages differently. |
michael@7 | 94 | Index: Mailman/htmlformat.py |
michael@7 | 95 | --- Mailman/htmlformat.py.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 96 | +++ Mailman/htmlformat.py 2008-07-01 20:48:10 +0200 |
michael@7 | 97 | @@ -300,7 +300,8 @@ |
michael@7 | 98 | charset = 'us-ascii' |
michael@7 | 99 | if self.language: |
michael@7 | 100 | charset = Utils.GetCharSet(self.language) |
michael@7 | 101 | - output = ['Content-Type: text/html; charset=%s\n' % charset] |
michael@7 | 102 | + output = ['Content-Type: text/html; charset=%s' % charset] |
michael@7 | 103 | + output.append('Cache-control: no-cache\n') |
michael@7 | 104 | if not self.suppress_head: |
michael@7 | 105 | kws.setdefault('bgcolor', self.bgcolor) |
michael@7 | 106 | tab = ' ' * indent |
michael@7 | 107 | Index: bin/check_perms |
michael@7 | 108 | --- bin/check_perms.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 109 | +++ bin/check_perms 2008-07-01 20:48:10 +0200 |
michael@7 | 110 | @@ -82,7 +82,7 @@ |
michael@7 | 111 | return os.stat(path)[ST_MODE] |
michael@7 | 112 | |
michael@7 | 113 | def statgidmode(path): |
michael@7 | 114 | - stat = os.stat(path) |
michael@7 | 115 | + stat = os.lstat(path) |
michael@7 | 116 | return stat[ST_MODE], stat[ST_GID] |
michael@7 | 117 | |
michael@7 | 118 | seen = {} |
michael@7 | 119 | Index: bin/config_list |
michael@7 | 120 | --- bin/config_list.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 121 | +++ bin/config_list 2008-07-01 20:48:10 +0200 |
michael@7 | 122 | @@ -307,6 +307,11 @@ |
michael@7 | 123 | in mm_cfg.OPTINFO.items() |
michael@7 | 124 | if validval & bitval] |
michael@7 | 125 | gui._setValue(mlist, k, validval, fakedoc) |
michael@7 | 126 | + # Ugly hack, but seems to be needed since |
michael@7 | 127 | + # new_member_options isn't really a number in gui. |
michael@7 | 128 | + # -- tfheen, 2003-12-06 |
michael@7 | 129 | + if k == "new_member_options": |
michael@7 | 130 | + mlist.new_member_options = validval |
michael@7 | 131 | # BAW: when to do gui._postValidate()??? |
michael@7 | 132 | finally: |
michael@7 | 133 | if savelist and not checkonly: |
michael@7 | 134 | Index: bin/mailmanctl |
michael@7 | 135 | --- bin/mailmanctl.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 136 | +++ bin/mailmanctl 2008-07-01 20:48:10 +0200 |
michael@7 | 137 | @@ -417,6 +417,13 @@ |
michael@7 | 138 | # won't be opening any terminal devices, don't do the ultra-paranoid |
michael@7 | 139 | # suggestion of doing a second fork after the setsid() call. |
michael@7 | 140 | os.setsid() |
michael@7 | 141 | + |
michael@7 | 142 | + # Be sure to close any open std{in,out,err} |
michael@7 | 143 | + devnull = os.open('/dev/null', 0) |
michael@7 | 144 | + os.dup2(devnull, 0) |
michael@7 | 145 | + os.dup2(devnull, 1) |
michael@7 | 146 | + os.dup2(devnull, 2) |
michael@7 | 147 | + |
michael@7 | 148 | # Instead of cd'ing to root, cd to the Mailman installation home |
michael@7 | 149 | os.chdir(mm_cfg.PREFIX) |
michael@7 | 150 | # Set our file mode creation umask |
michael@7 | 151 | Index: bin/newlist |
michael@7 | 152 | --- bin/newlist.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 153 | +++ bin/newlist 2008-07-01 20:48:10 +0200 |
michael@7 | 154 | @@ -87,6 +87,9 @@ |
michael@7 | 155 | defined in your Defaults.py file or overridden by settings in mm_cfg.py). |
michael@7 | 156 | |
michael@7 | 157 | Note that listnames are forced to lowercase. |
michael@7 | 158 | + |
michael@7 | 159 | +The list admin address need to be a fully-qualified address, like |
michael@7 | 160 | +owner@example.com, not just owner. |
michael@7 | 161 | """ |
michael@7 | 162 | |
michael@7 | 163 | import sys |
michael@7 | 164 | @@ -94,6 +97,7 @@ |
michael@7 | 165 | import getpass |
michael@7 | 166 | import getopt |
michael@7 | 167 | import sha |
michael@7 | 168 | +import grp |
michael@7 | 169 | |
michael@7 | 170 | import paths |
michael@7 | 171 | from Mailman import mm_cfg |
michael@7 | 172 | @@ -122,6 +126,9 @@ |
michael@7 | 173 | |
michael@7 | 174 | |
michael@7 | 175 | def main(): |
michael@7 | 176 | + gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2] |
michael@7 | 177 | + if os.getgid() != mm_cfg.MAILMAN_GROUP: |
michael@7 | 178 | + os.setgid(gid) |
michael@7 | 179 | try: |
michael@7 | 180 | opts, args = getopt.getopt(sys.argv[1:], 'hql:u:e:', |
michael@7 | 181 | ['help', 'quiet', 'language=', |
michael@7 | 182 | @@ -203,7 +210,7 @@ |
michael@7 | 183 | except Errors.BadListNameError, s: |
michael@7 | 184 | usage(1, _('Illegal list name: %(s)s')) |
michael@7 | 185 | except Errors.EmailAddressError, s: |
michael@7 | 186 | - usage(1, _('Bad owner email address: %(s)s')) |
michael@7 | 187 | + usage(1, _('Bad owner email address: %(s)s. Owner addresses need to be fully-qualified names, like "owner@example.com", not just "owner".')) |
michael@7 | 188 | except Errors.MMListAlreadyExistsError: |
michael@7 | 189 | usage(1, _('List already exists: %(listname)s')) |
michael@7 | 190 | |
michael@7 | 191 | Index: bin/update |
michael@7 | 192 | --- bin/update.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 193 | +++ bin/update 2008-07-01 20:48:10 +0200 |
michael@7 | 194 | @@ -552,9 +552,11 @@ |
michael@7 | 195 | file20 = os.path.join(mm_cfg.DATA_DIR, 'pending_subscriptions.db') |
michael@7 | 196 | file214 = os.path.join(mm_cfg.DATA_DIR, 'pending.pck') |
michael@7 | 197 | db = None |
michael@7 | 198 | + ver = None |
michael@7 | 199 | # Try to load the Mailman 2.0 file |
michael@7 | 200 | try: |
michael@7 | 201 | fp = open(file20) |
michael@7 | 202 | + ver = "20" |
michael@7 | 203 | except IOError, e: |
michael@7 | 204 | if e.errno <> errno.ENOENT: raise |
michael@7 | 205 | else: |
michael@7 | 206 | @@ -566,6 +568,7 @@ |
michael@7 | 207 | # Try to load the Mailman 2.1.x where x < 5, file |
michael@7 | 208 | try: |
michael@7 | 209 | fp = open(file214) |
michael@7 | 210 | + ver = "214" |
michael@7 | 211 | except IOError, e: |
michael@7 | 212 | if e.errno <> errno.ENOENT: raise |
michael@7 | 213 | else: |
michael@7 | 214 | @@ -599,8 +602,12 @@ |
michael@7 | 215 | # data[0] is the address being unsubscribed |
michael@7 | 216 | addrops_by_address.setdefault(data[0], []).append((key, val)) |
michael@7 | 217 | elif op == Pending.SUBSCRIPTION: |
michael@7 | 218 | - # data[0] is a UserDesc object |
michael@7 | 219 | - addr = data[0].address |
michael@7 | 220 | + if ver == "20": |
michael@7 | 221 | + # data is tuple (emailaddr, password, digest) |
michael@7 | 222 | + addr = data[0] |
michael@7 | 223 | + else: |
michael@7 | 224 | + # data[0] is a UserDesc object |
michael@7 | 225 | + addr = data[0].address |
michael@7 | 226 | subs_by_address.setdefault(addr, []).append((key, val)) |
michael@7 | 227 | elif op == Pending.RE_ENABLE: |
michael@7 | 228 | # data[0] is the mailing list's internal name |
michael@7 | 229 | Index: scripts/driver |
michael@7 | 230 | --- scripts/driver.orig 2008-06-30 18:29:46 +0200 |
michael@7 | 231 | +++ scripts/driver 2008-07-01 20:48:10 +0200 |
michael@7 | 232 | @@ -95,6 +95,15 @@ |
michael@7 | 233 | module = getattr(pkg, scriptname) |
michael@7 | 234 | main = getattr(module, 'main') |
michael@7 | 235 | try: |
michael@7 | 236 | + import os |
michael@7 | 237 | + request_method = os.environ.get('REQUEST_METHOD') |
michael@7 | 238 | + if not request_method in ['GET', 'POST', 'HEAD']: |
michael@7 | 239 | + print "Status: 405 Method not allowed" |
michael@7 | 240 | + print "Content-type: text/plain" |
michael@7 | 241 | |
michael@7 | 242 | + print "The method is not allowed" |
michael@7 | 243 | + sys.exit() |
michael@7 | 244 | + |
michael@7 | 245 | try: |
michael@7 | 246 | sys.stderr = logger |
michael@7 | 247 | sys.stdout = tempstdout |