Merge changes from emacs-23
[bpt/emacs.git] / admin / notes / bugtracker
1 NOTES ON THE EMACS BUG TRACKER -*- outline -*-
2
3 The Emacs Bug Tracker can be found at http://debbugs.gnu.org/
4
5 * Quick-start guide
6
7 This is 95% of all you will ever need to know.
8
9 ** How do I report a bug?
10 Use M-x report-emacs-bug, or send mail to bug-gnu-emacs@gnu.org.
11 If you want to Cc someone, use an "X-Debbugs-CC" header instead.
12
13 ** How do I comment on a bug?
14 Reply to a mail on the bug-gnu-emacs list in the normal way.
15 Or send a mail to 123@debbugs.gnu.org.
16
17 If the bug is old and closed, you may have to unarchive it first.
18 Send a mail to control@debbugs.gnu.org with
19 unarchive 123
20 on the first line of the body.
21
22 ** How do I close a bug?
23 Send a mail to 123-done@debbugs.gnu.org. In the body, explain
24 why the bug is being closed.
25
26 ** How do I set bug meta-data?
27 By mailing commands to control@debbugs.gnu.org. Place commands at the
28 start of the message body, one per line.
29
30 severity 123 serious|important|normal|minor|wishlist
31 tags 123 moreinfo|unreproducible|wontfix|patch
32
33 * More detailed information
34
35 For a list of all bugs, see http://debbugs.gnu.org/db/pa/lemacs.html
36 This is a static page, updated once a day. There is also a dynamic
37 list, generated on request. This accepts various options, eg to see
38 the most recent bugs:
39
40 http://debbugs.gnu.org/cgi/pkgreport.cgi?newest=100
41
42 Or follow the links on the front page http://debbugs.gnu.org .
43
44 ** How do I report a bug in Emacs now?
45 The same way as you always did. Send mail to bug-gnu-emacs@gnu.org,
46 or use M-x report-emacs-bug.
47
48 The only differences are:
49
50 i) Your report will be assigned a number and generate an automatic reply.
51
52 ii) Optionally, you can set some database parameters when you first
53 report a bug (see "Setting bug parameters" below).
54
55 iii) If you want to CC: someone, use X-Debbugs-CC: (this is important;
56 see below).
57
58 Once your report is filed and assigned a number, it is sent out to the
59 bug mailing list. In some cases, it may be appropriate to just file a
60 bug, without sending out a copy. To do this, send mail to
61 quiet@debbugs.gnu.org.
62
63 ** How do I reply to an existing bug report?
64 Reply to 123@debbugs.gnu.org, replacing 123 with the number
65 of the bug you are interested in. NB this only sends mail to the
66 bug-list, it does NOT (?) send a CC to the original bug submitter.
67 So you need to explicitly CC him/her (and anyone else you like).
68
69 (Many people think the submitter SHOULD be automatically subscribed
70 to subsequent discussion, but this does not seem to be implemented.
71 See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=37078)
72 See also http://debbugs.gnu.org/5439
73
74 Do NOT send a separate copy to the bug list address, since this may
75 generate a new report. The only time to send mail to the bug list
76 address is to create a new report.
77
78 Gnus users can add the following to message-dont-reply-to-names;
79 similarly with Rmail and rmail-dont-reply-to-names:
80
81 "\\(emacs-pretest-bug\\|bug-gnu-emacs\\|bug-\\(e\\|gnu\\)macs\\)@gnu\\.org\\|\
82 \\(submit\\|control\\|owner\\)@debbugs\\.gnu\\.org"
83
84 The "owner@debbugs.gnu.org" entry is there because it appears in the
85 "Resent-To" header. For a long time Rmail erroneously included such
86 headers in replies. If you correspond with an Rmail user on a bug,
87 these addresses may end up in the Cc. Mailing to them does nothing
88 but create duplicates and errors. (It is possible you might want to
89 have a dialog with the owner address, outside of normal bug
90 reporting.)
91
92 ** When reporting a bug, to send a Cc to another address
93 (e.g. bug-cc-mode@gnu.org), do NOT just use a Cc: header.
94 Instead, use "X-Debbugs-CC:". This ensures the Cc address will get a
95 mail with the bug report number in. If you do not do this, each reply
96 in the subsequent discussion will end up creating a new bug.
97 This is annoying.
98
99 (So annoying that a form of message-id tracking has been implemented
100 to hopefully stop this happening, but it is still better to use X-Debbugs-CC.)
101
102 If a new report contains X-Debbugs-CC in the input, this is
103 converted to a real Cc header in the output. (See Bug#1720).
104 It is also merged into the Resent-CC header (see below).
105
106 ** How does Debbugs send out mails?
107
108 The mails are sent out to the bug list by being resent. The From:
109 header is unchanged. In new reports only (at present), the To:
110 address is altered as follows. Any "bug-gnu-emacs",
111 "emacs-pretest-bug", or "submit@debbugs" address is replaced by
112 123@debbugs in the mail that gets sent out. (This also applies to any
113 Cc: header, though you should be using X-Debbugs-CC instead in new
114 reports). The original header is stored as X-Debbugs-Original-To, if
115 it was changed. Any X-Debbugs-CC is merged into the Cc.
116
117 Mails arriving at the bug list have the following Resent-* headers:
118
119 Resent-From: person who submitted the bug
120 Resent-To: owner@debbugs.gnu.org
121 Resent-CC: maintainer email address, plus any X-Debbugs-CC: entries
122
123 The "maintainer email address" is "bug-gnu-emacs@gnu.org" in most cases.
124
125 ** To not get acknowledgement mail from the tracker,
126 add an "X-Debbugs-No-Ack:" header (with any value). If you use Gnus,
127 you can add an element to gnus-posting-styles to do this automatically, eg:
128
129 ("gnu-emacs\\(-pretest\\)?-bug"
130 ("X-Debbugs-No-Ack" "yes"))
131
132 (adjust the regexp according to the name you use for the bug lists)
133
134 ** To record a bug in the tracker without sending mail to the bug list.
135 This can be useful to make a note of something discussed on
136 emacs-devel that needs fixing. In other words, this can be the
137 equivalent of adding something to FOR-RELEASE.
138
139 To: quiet@debbugs.gnu.org
140 [headers end]
141 Package: emacs
142 Version: 23.0.60
143 Severity: minor
144
145 Remember to fix FOO, as discussed on emacs-devel at http://... .
146
147 ** Not interested in tracker control messages (tags being set, etc)?
148 Discard mails matching:
149
150 ^X-GNU-PR-Message: (transcript|closed)
151
152 ** Not receiving messages in response to your control commands?
153 The messages debbugs sends out in response to control-server commands
154 always have headers To: your@email, and Cc: tracker@debbugs.gnu.org
155 (the latter is an alias for the emacs-bug-tracker mailing list).
156 These are also the addresses to which a copy of the response is sent.
157 (In general, there need not be any relation between the To: and Cc:
158 headers visible in a message and where debbugs actually sends it.)
159 If you used an X-Debbugs-No-Ack header, however, a copy is _not_ sent
160 to you, but the To: header is unchanged. If you are subscribed to the
161 emacs-bug-tracker mailing list and have duplicate suppression turned
162 on, the presence of your address in the To: header will cause Mailman
163 to not send you a list copy, because it thinks you have received a
164 direct copy. If you used X-Debbugs-No-Ack, this is not the case, and
165 you won't get any copy at all. If this bothers you, don't use both
166 X-Debbugs-No-Ack and Mailman duplicate suppression for the
167 emacs-bug-tracker mailing list, just pick one or the other.
168
169 ** How to avoid multiple copies of mails.
170 If you reply to reports in the normal way, this should work fine.
171 Basically, reply only to the numbered bug address (and any individual
172 people's addresses). Do not send mail direct to bug-gnu-emacs or
173 emacs-pretest-bug unless you are reporting a new bug.
174
175 ** To close bug #123 (for example), send mail
176
177 To: 123-done@debbugs.gnu.org
178
179 with a brief explanation in the body as to why the bug was closed.
180 There is no need to cc the address without the "-done" part or the
181 submitter; they get copies anyway so this will just result in more
182 duplicate mail.
183
184 ** Details of closing a bug.
185 (For information only)
186 Sending a mail to 123-done does the following:
187
188 1) Mark the bug as closed in the database.
189
190 2) Send a mail to the original submitter telling them that their bug
191 has been closed. This mail has a header:
192
193 X-GNU-PR-Message: they-closed 123
194
195 3) Send a mail to you and to the emacs-bug-tracker list confirming
196 that the bug has been closed. This mail has a header:
197
198 X-GNU-PR-Message: closed 123
199
200 4) Send a copy of your mail to the bug-gnu-emacs list in exactly the
201 same way as if you had sent mail to "123" (sans -done). This mail has
202 headers:
203
204 X-GNU-PR-Message: cc-closed 123
205 Mail-Followup-To: 123@debbugs.gnu.org, person-who-closed
206
207 (This is Emacs-specific. Normally the bug list gets the same mail as in 3).
208
209 ** Setting bug parameters.
210 There are two ways to set the parameters of bugs in the database
211 (tags, severity level, etc). When you report a new bug, you can
212 provide a "pseudo-header" at the start of the report, eg:
213
214 Package: emacs
215 Version: 23.0.60
216 Severity: minor
217
218 This can also include tags. Some things (e.g. submitter) don't seem to
219 work here.
220
221 Otherwise, send mail to the control server, control@debbugs.gnu.org.
222 At the start of the message body, supply the desired commands, one per
223 line:
224
225 command bug-number [arguments]
226 ...
227 quit|stop|thank|thanks|thankyou|thank you
228
229 The control server ignores anything after the last line above. So you
230 can place control commands at the beginning of a reply to a bug
231 report, and Bcc: the control server (note the commands have no effect
232 if you just send them to the bug-report number). Bcc: is better than Cc:
233 in case people use Reply-to-All in response.
234
235 Some useful control commands:
236
237 *** To reopen a closed bug:
238 reopen 123
239
240 *** Bugs can be tagged in various ways (eg wontfix, patch, etc).
241 The available tags are:
242 patch wontfix moreinfo unreproducible fixed notabug
243 See http://debbugs.gnu.org/Developer#tags
244 The list of tags can be prefixed with +, - or =, meaning to add (the
245 default), remove, or reset the tags. E.g.:
246
247 tags 123 + wontfix
248
249 ** URL shortcuts
250
251 http://debbugs.gnu.org/...
252
253 123 # given bug number
254 123;mbox=yes # mbox version of given bug
255 package # bugs in given package
256 from:submitter@email.address
257 severity:severity # all bugs of given severity
258 tag:tag # all bugs with given tag
259
260 ** Usertags
261
262 See <http://wiki.debian.org/bugs.debian.org/usertags>
263
264 "Usertags" are very similar to tags: a set of labels that can be added
265 to a bug. There are two differences between normal tags and user tags:
266
267 1) Anyone can define any valid usertag they like. In contrast, only a
268 limited, predefined set of normal tags are available (see above).
269
270 2) A usertag is associated with a specific email address.
271
272 You set usertags in the same way as tags, by talking to the control
273 server. One difference is that you can also specify the associated
274 email address. If you don't explicitly specify an address, then it
275 will use the one from which you send the control message. The address
276 must have the form of an email address (with an "@" sign and least 4
277 characters after the "@").
278
279 *** Setting usertags
280
281 a) In a control message:
282
283 user bug-gnu-emacs@gnu.org
284 usertags 1234 any-tag-you-like
285
286 This will add a usertag "any-tag-you-like" to bug 1234. The tag will
287 be associated with the address "bug-gnu-emacs@gnu.org". If you omit
288 the first line, the tag will be associated with your email address.
289
290 The syntax of the usertags command is the same as that of tags (eg wrt
291 the optional [=+-] argument).
292
293 b) In an initial submission, in the pseudo-header:
294
295 User: bug-gnu-emacs@gnu.org
296 Usertags: a-new-tag
297
298 Again, the "User" is optional.
299
300 *** Searching by usertags
301
302 The search interface is not as advanced as for normal tags. You need
303 to construct the relevant url yourself rather than just typing in a
304 search box. The only piece you really need to add is the "users"
305 portion, the rest has the same syntax as normal.
306
307 **** To browse bugs by usertag:
308 http://debbugs.gnu.org/cgi/pkgindex.cgi?indexon=users
309
310 **** To find all bugs usertagged by a given email address:
311
312 http://debbugs.gnu.org/cgi/pkgreport.cgi?users=bug-gnu-emacs@gnu.org
313
314 (Supposedly, the "users" field can be a comma-separated list of more
315 than one email address, but it does not seem to work for me.)
316
317 **** To find bugs tagged with a specific usertag:
318
319 This works just like a normal tags search, but with the addition of a
320 "users" field. Eg:
321
322 http://debbugs.gnu.org/cgi/pkgreport.cgi?users=bug-gnu-emacs@gnu.org;tag=calendar
323
324 *** To merge bugs:
325 Eg when bad replies create a bunch of new bugs for the same report.
326 Bugs must all be in the same state (e.g. same package(s) and severity
327 -- see `reassign' and `severity' below), but need not have the same
328 tags (tags are merged). E.g.:
329
330 merge 123 124 125 ...
331
332 Note that merging does not affect titles. In particular, a "retitle"
333 of merged bugs only affects individual bugs, not all of them.
334
335 *** Forcing a merge:
336 Like `merge', but bugs need not be in the same state. The packages
337 must still match though (see `reassign' below). The first one listed
338 is the master. E.g.:
339
340 forcemerge 123 124 125 ...
341
342 Note: you cannot merge with an archived bug - you must unarchive it first.
343
344 *** To unmerge bugs:
345 To disconnect a bug from all bugs it is merged with:
346
347 unmerge 123
348
349 This command accepts only one bug number.
350
351 *** To clone bugs:
352 Useful when one report refers to more than one bug.
353
354 clone 123 -1 [-2 ...]
355 retitle -1 second bug
356 retitle -2 third bug
357
358 The negative numbers provide a way to refer to the cloned bugs (which
359 will be assigned proper numbers).
360
361 NB you cannot clone a merged bug. You'd think that trying to do so
362 would just give you an unmerged copy of the specified bug number, but no:
363
364 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474742
365
366 You must unmerge, clone, then re-merge.
367
368 *** To set severity:
369 severity 123 critical|grave|serious|important|normal|minor|wishlist
370
371 See http://debbugs.gnu.org/Developer#severities for the meanings.
372
373 *** To set the owner of a bug:
374 owner 123 A Hacker <none@example.com>
375
376 The shorthand `!' means your own address.
377
378 *** To remove the owner of a bug:
379 noowner 123
380
381 *** To mark a bug as fixed in a particular version:
382 fixed 123 23.0.60
383
384 *** To remove a "fixed" mark:
385 notfixed 123 23.0.60
386
387 *** To assign or reassign a bug to a package or list of packages:
388 reassign 1234 emacs
389
390 ** To remove spam from the tracker, move it to the `spam' pseudo-package:
391 reassign 123 spam
392
393 ** To change the title of a bug:
394 retitle 123 Some New Title
395
396 ** To change the submitter address:
397 submitter 123 none@example.com
398
399 Note that it does not seem to work to specify "Submitter:" in the
400 pseudo-header when first reporting a bug.
401
402 ** How does archiving work?
403 You can still send mail to a bug after it is closed. After 28 days with
404 no activity, the bug is archived, at which point no more changes can
405 be made. If you try to send mail to the bug after that (or merge with
406 it), it will be rejected. To make any changes, you must unarchive it first:
407
408 unarchive 123
409
410 The bug will be re-archived after the next 28 day period of no activity.
411
412 ** The web-page with the list of bugs is slow to load
413
414 It's a function of the number of displayed bugs. You can speed things
415 up by only looking at the newest 100 bugs:
416 http://debbugs.gnu.org/cgi-bin/pkgreport.cgi?newest=100;package=emacs
417
418 Or use the static index:
419 http://debbugs.gnu.org/db/ix/full.html
420
421 ** What are those "mbox folder" links on the bug report pages?
422
423 "mbox folder" = messages as they arrived at the tracker
424
425 "status mbox" = as above, but with a fake message at the start
426 summarizing the bug status
427
428 "maintainer mbox" = messages as sent out from the tracker to the
429 maintainers (ie, bug-gnu-emacs). These have some changed headers
430 (Resent-*, Subject, etc).
431
432 ** What do the pkgreport.cgi sort options mean?
433
434 "normal" = by open/closed status, then severity, then tag, then bug number
435
436 "oldview" = as above, but without the tag part
437
438 "age" = as normal, but sort in decreasing order of last modification
439 time, rather than by increasing bug number
440
441 "raw" = ?
442
443 ** ChangeLog issues
444
445 *** When you fix a bug, it can be helpful to put the bug number in the
446 ChangeLog entry, for example:
447
448 * foo.el (foofunc): Fix the `foo' case. (Bug#123)
449
450 Then the relevant bug can be found for easy reference. If it's an
451 obvious fix (e.g. a typo), there's no need to clutter the log with the
452 bug number.
453
454 Similarly, when you close a bug, it can be helpful to include the
455 relevant ChangeLog entry in the message to the bug tracker, so people
456 can see exactly what the fix was.
457
458 *** bug-reference-mode
459
460 Activate `bug-reference-mode' in ChangeLogs to get clickable links to
461 the bug web-pages.
462
463 *** Debian stuff
464
465 http://lists.gnu.org/archive/html/emacs-devel/2009-11/msg00440.html
466
467 ** Bazaar stuff
468
469 *** You can use `bzr commit --fixes emacs:123' to mark that a commit fixes
470 Emacs bug 123. You will first need to add a line to your bazaar.conf:
471
472 bugtracker_emacs_url = http://debbugs.gnu.org/{id}
473
474 Note that all this does is add some metadata to the commit, it doesn't
475 actually mark the bug as closed in the tracker. There seems to be no
476 way to see this "metadata" with `bzr log', which is rather poor, but
477 it will show up as a link in a recent loggerhead installation, or with
478 some of the graphical frontends to bzr log.
479
480 ** Gnus-specific voodoo
481
482 *** Put point on a bug-number and try: M-x gnus-read-ephemeral-emacs-bug-group
483
484 *** If the above is not available:
485 (add-hook 'gnus-article-mode-hook
486 (lambda ()
487 (setq bug-reference-url-format "http://debbugs.gnu.org/%s")
488 (bug-reference-mode 1)))
489
490 and you can click on the bug number in the subject header.
491
492
493 * Technical Notes
494
495 The following are technical notes on how it works. These are just for
496 reference, you don't need to read these as a user of the system.
497
498 Getting mail from the Emacs bug list into the tracker requires the
499 assistance of sysadmin at gnu.org. The test tracker set-up was, I
500 think, [gnu.org #359140]:
501 http://lists.gnu.org/archive/html/savannah-hackers/2008-03/msg00074.html
502 http://lists.gnu.org/archive/html/savannah-hackers/2008-04/msg00034.html
503
504 ** The debbugs.gnu.org setup was handled in [gnu.org #510605].
505 There are two pieces (replace AT with @ in the following):
506
507 i) fencepost has an /etc/aliases entry:
508 emacs-pretest-bug: submit AT debbugs.gnu.org
509
510 ii) An exim router:
511 emacsbugs_router:
512 driver = redirect
513 senders = !Debian-debbugs AT debbugs.gnu.org
514 local_parts = bug-gnu-emacs
515 domains = gnu.org
516 data = submit AT debbugs.gnu.org
517
518 This says, for mail arriving at bug-gnu-emacs, only allow it through
519 to the list if it was sent from debbugs.gnu.org. Otherwise, send
520 it to the submit address at the bug-tracker.
521
522 FIXME There's probably an issue with the mail-news gateway here that
523 still needs to be addressed (bug#936).
524
525 ** fencepost's /etc/exim4/local_domains configuration needs a line
526 !debbugs.gnu.org adding [gnu.org #503532]. Otherwise people on
527 fencepost can't report bugs, since *.gnu.org addresses are assumed to
528 be handled locally on fencepost, unless otherwise specified.
529
530 ** All mail arriving at debbugs.gnu.org is first run through SpamAssassin.
531 Obvious spam is rejected, the rest is sent on to the moderated list
532 debbugs-submit. Approved mail is passed on to the tracker.
533 (Note this means that messages may appear out of sequence in the
534 tracker, since mail from whitelisted senders goes straight through.)
535
536 NOTE: An alternative to this would be to use listhelper AT nongnu.org
537 as a moderator address. Eg the emacs-bug-tracker list uses this.
538 It does basic spam processing on the moderator requests and
539 automatically rejects the obviously bogus ones. Someone still has to
540 accept the good ones though. The advantage of this would not be having
541 to run and tune our own spam filter. See
542 http://savannah.nongnu.org/projects/listhelper
543
544 An "X-Debbugs-Envelope-To" header is used to keep track of where the
545 mail was actually bound for:
546 http://lists.gnu.org/archive/html/emacs-devel/2009-11/msg01211.html
547
548 ** Mailing list recipient/sender filters.
549 The following mailman filters are useful to stop messages being
550 needlessly held for moderation:
551
552 *** debbugs-submit
553 (quiet|control|submit)@(debbugs\.gnu\.org|emacsbugs\.donarmstrong\.com)
554 [0-9]+(-done|-quiet|-subscribe)?@(debbugs\.gnu\.org|emacsbugs\.donarmstrong\.com)
555 (bug-gnu-emacs|emacs-pretest-bug|bug-(e|gnu)macs)@gnu\.org
556
557 bug-emacs and bug-gnumacs are lesser-used aliases from fencepost's
558 /etc/aliases file.
559
560 *** emacs-bug-tracker
561 sender: bug-gnu-emacs AT gnu.org
562 recipient: emacs-bug-tracker AT debbugs\.gnu\.org
563
564 The latter is because that is the address that debbugs actually sends to.
565 An /etc/aliases entry redirects it to the real emacs-bug-tracker address.
566
567 ** Recovering from moderation mistakes
568
569 All discarded messages are stored in /var/lib/mailman/spam.
570 If a non-spam message accidentally gets discarded, just do:
571
572 cat /var/lib/mailman/spam/not-really-spam.msg | /usr/lib/debbugs/receive
573 chown Debian-debbugs:Debian-debbugs /var/lib/debbugs/spool/incoming/*
574 ... check it works ...
575 mv /var/lib/mailman/spam/not-really-spam.msg /var/lib/mailman/not-spam/
576
577 Also check that the sender was not added to the auto-discard/reject list
578 in the debbugs-submit Mailman interface.
579
580 ** Administrivia
581
582 The debbugs-submit list should have the administrivia option off,
583 else it can by mistake filter out requests to subscribe to bugs.
584 But, this feature doesn't work anyway (see bug#5439).
585
586 ** How to test changes
587
588 Add an entry to /etc/debbugs/Maintainers like:
589
590 mytest my.email.address
591
592 Then if you do all your testing with 'Package: mytest', the resulting
593 mails should only go to your email address.