chiark / gitweb /
update Japanese translation
[developers-reference.git] / beyond-pkging.dbk
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3     "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4   <!ENTITY % commondata SYSTEM "common.ent" > %commondata;
5 ]>
6 <chapter id="beyond-pkging">
7 <title>Beyond Packaging</title>
8 <para>
9 Debian is about a lot more than just packaging software and maintaining those
10 packages.  This chapter contains information about ways, often really critical
11 ways, to contribute to Debian beyond simply creating and maintaining packages.
12 </para>
13 <para>
14 As a volunteer organization, Debian relies on the discretion of its members in
15 choosing what they want to work on and in choosing the most critical thing to
16 spend their time on.
17 </para>
18 <section id="submit-bug">
19 <title>Bug reporting</title>
20 <para>
21 We encourage you to file bugs as you find them in Debian packages.  In fact,
22 Debian developers are often the first line testers.  Finding and reporting bugs
23 in other developers' packages improves the quality of Debian.
24 </para>
25 <para>
26 Read the <ulink url="&url-bts-report;">instructions for
27 reporting bugs</ulink> in the Debian <ulink
28 url="&url-bts;">bug tracking system</ulink>.
29 </para>
30 <para>
31 Try to submit the bug from a normal user account at which you are likely to
32 receive mail, so that people can reach you if they need further information
33 about the bug.  Do not submit bugs as root.
34 </para>
35 <para>
36 You can use a tool like <citerefentry> <refentrytitle>reportbug</refentrytitle>
37 <manvolnum>1</manvolnum> </citerefentry> to submit bugs.  It can automate and
38 generally ease the process.
39 </para>
40 <para>
41 Make sure the bug is not already filed against a package.  Each package has a
42 bug list easily reachable at
43 <literal>http://&bugs-host;/<replaceable>packagename</replaceable></literal>.
44 Utilities like <citerefentry> <refentrytitle>querybts</refentrytitle>
45 <manvolnum>1</manvolnum> </citerefentry> can also provide you with this
46 information (and <command>reportbug</command> will usually invoke
47 <command>querybts</command> before sending, too).
48 </para>
49 <para>
50 Try to direct your bugs to the proper location.  When for example your bug is
51 about a package which overwrites files from another package, check the bug
52 lists for <emphasis>both</emphasis> of those packages in order to avoid filing
53 duplicate bug reports.
54 </para>
55 <para>
56 For extra credit, you can go through other packages, merging bugs which are
57 reported more than once, or tagging bugs `fixed' when they have already been
58 fixed.  Note that when you are neither the bug submitter nor the package
59 maintainer, you should not actually close the bug (unless you secure permission
60 from the maintainer).
61 </para>
62 <para>
63 From time to time you may want to check what has been going on with the bug
64 reports that you submitted.  Take this opportunity to close those that you
65 can't reproduce anymore.  To find out all the bugs you submitted, you just have
66 to visit
67 <literal>http://&bugs-host;/from:<replaceable>your-email-addr</replaceable></literal>.
68 </para>
69 <section id="submit-many-bugs">
70 <title>Reporting lots of bugs at once (mass bug filing)</title>
71 <para>
72 Reporting a great number of bugs for the same problem on a great number of
73 different packages — i.e., more than 10 — is a deprecated practice.  Take
74 all possible steps to avoid submitting bulk bugs at all.  For instance, if
75 checking for the problem can be automated, add a new check to <systemitem
76 role="package">lintian</systemitem> so that an error or warning is emitted.
77 </para>
78 <para>
79 If you report more than 10 bugs on the same topic at once, it is recommended
80 that you send a message to &email-debian-devel; describing
81 your intention before submitting the report, and mentioning the fact in the
82 subject of your mail.  This will allow other developers to verify that the bug
83 is a real problem.  In addition, it will help prevent a situation in which
84 several maintainers start filing the same bug report simultaneously.
85 </para>
86 <para>
87 Please use the programs <command>dd-list</command> and if appropriate
88 <command>whodepends</command> (from the package <systemitem role="package">devscripts</systemitem>) to generate a list
89 of all affected packages, and include the output in your mail to
90 &email-debian-devel;.
91 </para>
92 <para>
93 Note that when sending lots of bugs on the same subject, you should send the
94 bug report to <email>maintonly@&bugs-host;</email> so that the bug report
95 is not forwarded to the bug distribution mailing list.
96 </para>
97 <section id="usertags">
98 <title>Usertags</title>
99 <para>
100 You may wish to use BTS usertags when submitting bugs across a number of
101 packages. Usertags are similar to normal tags such as 'patch' and 'wishlist'
102 but differ in that they are user-defined and occupy a namespace that is
103 unique to a particular user. This allows multiple sets of developers to
104 'usertag' the same bug in different ways without conflicting.
105 </para>
106 <para>
107 To add usertags when filing bugs, specify the <literal>User</literal> and
108 <literal>Usertags</literal> pseudo-headers:
109 </para>
110 <screen>
111 To: submit@bugs.debian.org
112 Subject: <replaceable>title-of-bug</replaceable>
113
114 Package: <replaceable>pkgname</replaceable>
115 <replaceable>[ ... ]</replaceable>
116 User: <replaceable>email-addr</replaceable>
117 Usertags: <replaceable>tag-name [ tag-name ... ]</replaceable>
118
119 <replaceable>description-of-bug ...</replaceable>
120 </screen>
121 <para>
122 Note that tags are seperated by spaces and cannot contain underscores. If you
123 are filing bugs for a particular group or team it is recommended that you
124 set the <literal>User</literal> to an appropriate mailing list after describing
125 your intention there.
126 </para>
127 <para>
128 To view bugs tagged with a specific usertag, visit
129 <literal>http://&bugs-host;/cgi-bin/pkgreport.cgi?users=<replaceable>email-addr</replaceable>&amp;tag=<replaceable>tag-name</replaceable></literal>.
130 </para>
131 </section>
132 </section>
133
134 </section>
135
136 <section id="qa-effort">
137 <title>Quality Assurance effort</title>
138 <section id="qa-daily-work">
139 <title>Daily work</title>
140 <para>
141 Even though there is a dedicated group of people for Quality Assurance, QA
142 duties are not reserved solely for them.  You can participate in this effort by
143 keeping your packages as bug-free as possible, and as lintian-clean (see <xref
144 linkend="lintian"/>) as possible.  If you do not find that possible, then you
145 should consider orphaning some of your packages (see <xref
146 linkend="orphaning"/>).  Alternatively, you may ask the help of other people
147 in order to catch up with the backlog of bugs that you have (you can ask for
148 help on &email-debian-qa; or
149 &email-debian-devel;).  At the same time, you can look for
150 co-maintainers (see <xref linkend="collaborative-maint"/>).
151 </para>
152 </section>
153
154 <section id="qa-bsp">
155 <title>Bug squashing parties</title>
156 <para>
157 From time to time the QA group organizes bug squashing parties to get rid of as
158 many problems as possible.  They are announced on
159 &email-debian-devel-announce; and the announcement explains
160 which area will be the focus of the party: usually they focus on release
161 critical bugs but it may happen that they decide to help finish a major upgrade
162 (like a new <command>perl</command> version which requires recompilation of all
163 the binary modules).
164 </para>
165 <para>
166 The rules for non-maintainer uploads differ during the parties because the
167 announcement of the party is considered prior notice for NMU.  If you have
168 packages that may be affected by the party (because they have release critical
169 bugs for example), you should send an update to each of the corresponding bug
170 to explain their current status and what you expect from the party.  If you
171 don't want an NMU, or if you're only interested in a patch, or if you will deal
172 yourself with the bug, please explain that in the BTS.
173 </para>
174 <para>
175 People participating in the party have special rules for NMU, they can NMU
176 without prior notice if they upload their NMU to DELAYED/3-day at least.  All
177 other NMU rules apply as usually; they should send the patch of the NMU to the
178 BTS (to one of the open bugs fixed by the NMU, or to a new bug, tagged fixed).
179 They should also respect any particular wishes of the maintainer.
180 </para>
181 <para>
182 If you don't feel confident about doing an NMU, just send a patch to the BTS.
183 It's far better than a broken NMU.
184 </para>
185 </section>
186
187 </section>
188
189 <section id="contacting-maintainers">
190 <title>Contacting other maintainers</title>
191 <para>
192 During your lifetime within Debian, you will have to contact other maintainers
193 for various reasons.  You may want to discuss a new way of cooperating between
194 a set of related packages, or you may simply remind someone that a new upstream
195 version is available and that you need it.
196 </para>
197 <para>
198 Looking up the email address of the maintainer for the package can be
199 distracting.  Fortunately, there is a simple email alias,
200 <literal><replaceable>package</replaceable>@&packages-host;</literal>, which provides a way to
201 email the maintainer, whatever their individual email address (or addresses)
202 may be.  Replace <replaceable>package</replaceable> with the name of a source
203 or a binary package.
204 </para>
205 <para>
206 You may also be interested in contacting the persons who are subscribed to a
207 given source package via <xref linkend="pkg-tracking-system"/>.  You can do so
208 by using the <literal><replaceable>package</replaceable>@&pts-host;</literal> email
209 address.
210 </para>
211 <!-- FIXME: moo@packages.d.o is easily confused with moo@packages.qa.d.o -->
212 </section>
213
214 <section id="mia-qa">
215 <title>Dealing with inactive and/or unreachable maintainers</title>
216 <para>
217 If you notice that a package is lacking maintenance, you should make sure that
218 the maintainer is active and will continue to work on their packages.  It is
219 possible that they are not active any more, but haven't registered out of the
220 system, so to speak.  On the other hand, it is also possible that they just
221 need a reminder.
222 </para>
223 <para>
224 There is a simple system (the MIA database) in which information about
225 maintainers who are deemed Missing In Action is recorded.  When a member of the
226 QA group contacts an inactive maintainer or finds more information about one,
227 this is recorded in the MIA database.  This system is available in
228 <filename>/org/qa.debian.org/mia</filename> on the host <literal>qa.debian.org</literal>,
229 and can be queried with the <command>mia-query</command> tool.
230 Use <command>mia-query --help</command> to see how to query the database.
231 If you find that no information has been recorded about an inactive maintainer yet,
232 or that you can add more information, you should generally proceed as follows.
233 </para>
234 <para>
235 The first step is to politely contact the maintainer, and wait a reasonable
236 time for a response.  It is quite hard to define reasonable time, but it is
237 important to take into account that real life is sometimes very hectic.  One
238 way to handle this would be to send a reminder after two weeks.
239 </para>
240 <para>
241 If the maintainer doesn't reply within four weeks (a month), one can assume
242 that a response will probably not happen.  If that happens, you should
243 investigate further, and try to gather as much useful information about the
244 maintainer in question as possible.  This includes:
245 </para>
246 <itemizedlist>
247 <listitem>
248 <para>
249 The <literal>echelon</literal> information available through the <ulink
250 url="&url-debian-db;">developers' LDAP database</ulink>, which indicates
251 when the developer last posted to a Debian mailing list.  (This includes
252 mails about uploads distributed via the &email-debian-devel-changes; list.)
253 Also, remember to check whether the maintainer is marked as on vacation in
254 the database.
255 </para>
256 </listitem>
257 <listitem>
258 <para>
259 The number of packages this maintainer is responsible for, and the condition of
260 those packages.  In particular, are there any RC bugs that have been open for
261 ages?  Furthermore, how many bugs are there in general?  Another important
262 piece of information is whether the packages have been NMUed, and if so, by
263 whom.
264 </para>
265 </listitem>
266 <listitem>
267 <para>
268 Is there any activity of the maintainer outside of Debian?  For example, they
269 might have posted something recently to non-Debian mailing lists or news
270 groups.
271 </para>
272 </listitem>
273 </itemizedlist>
274 <para>
275 A bit of a problem are packages which were sponsored — the maintainer is not
276 an official Debian developer.  The <literal>echelon</literal> information is not
277 available for sponsored people, for example, so you need to find and contact the
278 Debian developer who has actually uploaded the package.  Given that they signed
279 the package, they're responsible for the upload anyhow, and are likely to know
280 what happened to the person they sponsored.
281 </para>
282 <para>
283 It is also allowed to post a query to &email-debian-devel;,
284 asking if anyone is aware of the whereabouts of the missing maintainer.  Please
285 Cc: the person in question.
286 </para>
287 <para>
288 Once you have gathered all of this, you can contact
289 &email-mia;.  People on this alias will use the
290 information you provide in order to decide how to proceed.  For example, they
291 might orphan one or all of the packages of the maintainer.  If a package has
292 been NMUed, they might prefer to contact the NMUer before orphaning the package
293 — perhaps the person who has done the NMU is interested in the package.
294 </para>
295 <para>
296 One last word: please remember to be polite.  We are all volunteers and cannot
297 dedicate all of our time to Debian.  Also, you are not aware of the
298 circumstances of the person who is involved.  Perhaps they might be seriously
299 ill or might even have died — you do not know who may be on the receiving
300 side.  Imagine how a relative will feel if they read the e-mail of the deceased
301 and find a very impolite, angry and accusing message!
302 </para>
303 <para>
304 On the other hand, although we are volunteers, we do have a responsibility.  So
305 you can stress the importance of the greater good — if a maintainer does not
306 have the time or interest anymore, they should let go and give the package to
307 someone with more time.
308 </para>
309 <para>
310 If you are interested in working in the MIA team, please have a look at the
311 <filename>README</filename> file in <filename>/org/qa.debian.org/mia</filename> on
312 <literal>qa.debian.org</literal> where the technical details and the MIA procedures are
313 documented and contact &email-mia;.
314 </para>
315 </section>
316
317 <section id="newmaint">
318 <title>Interacting with prospective Debian developers</title>
319 <para>
320 Debian's success depends on its ability to attract and retain new and talented
321 volunteers.  If you are an experienced developer, we recommend that you get
322 involved with the process of bringing in new developers.  This section
323 describes how to help new prospective developers.
324 </para>
325 <section id="sponsoring">
326 <title>Sponsoring packages</title>
327 <para>
328 Sponsoring a package means uploading a package for a maintainer who is not able
329 to do it on their own. It's not a trivial matter, the sponsor must verify
330 the packaging and ensure that it is of the high level of quality that
331 Debian strives to have.
332 </para>
333 <para>
334 Debian Developers can sponsor packages. Debian Maintainers can't. 
335 </para>
336 <para>
337 The process of sponsoring a package is:
338 <orderedlist numeration="arabic">
339 <listitem>
340 <para>The maintainer prepares a source package (<filename>.dsc</filename>) and puts it online
341 somewhere (like on <ulink url="http://mentors.debian.net/cgi-bin/welcome">mentors.debian.net</ulink>) or even better, provides
342 a link to a public VCS repository (see <xref linkend="servers-vcs"/>) where
343 the package is maintained.</para>
344 </listitem>
345 <listitem>
346 <para>The sponsor downloads (or checkouts) the source package.</para>
347 </listitem>
348 <listitem>
349 <para>The sponsor reviews the source package. If she finds issues, she
350 informs the maintainer and asks her to provide a fixed version (the
351 process starts over at step 1).</para>
352 </listitem>
353 <listitem>
354 <para>The sponsor could not find any remaining problem. She builds the
355 package, signs it, and uploads it to Debian.</para>
356 </listitem>
357 </orderedlist>
358 </para>
359 <para>
360 Before delving in the details of how to sponsor a package, you should
361 ask yourself whether adding the proposed package is beneficial to Debian.
362 </para>
363 <para>
364 There's no simple rule to answer this question, it can depend on many
365 factors: is the upstream codebase mature and not full of security holes?
366 Are there pre-existing packages that can do the same task and how do they
367 compare to this new package? Has the new package been requested by users
368 and how large is the user base? How active are the upstream developers?
369 </para>
370 <para>
371 You should also ensure that the prospective maintainer is going
372 to be a good maintainer. Does she already have some experience with other
373 packages? If yes, is she doing a good job with them (check out some bugs)?
374 Is she familiar with the package and its programming language?
375 Does she have the skills needed for this package? If not, is she able
376 to learn them?
377 </para>
378 <para>
379 It's also a good idea to know where she stands towards Debian: does
380 she agree with Debian's philosophy and does she intend to join Debian?
381 Given how easy it is to become a Debian Maintainer, you might want
382 to only sponsor people who plan to join. That way you know from the start
383 that you won't have to act as a sponsor indefinitely.
384 </para>
385 <section id="sponsoring-new-package">
386 <title>Sponsoring a new package</title>
387 <para>
388 New maintainers usually have certain difficulties creating Debian packages —
389 this is quite understandable. They will do mistakes. That's why sponsoring
390 a brand new package into Debian requires a thorough review of the Debian
391 packaging. Sometimes several iterations will be needed until the package
392 is good enough to be uploaded to Debian. Thus being a sponsor implies being
393 a mentor.
394 </para>
395 <para>
396 Don't ever sponsor a new package without reviewing it. The review
397 of new packages done by ftpmasters mainly ensures that the software
398 is really free. Of course, it happens that they stumble on packaging
399 problems but they really should not. It's your task to ensure that
400 the uploaded package complies with the Debian Free Software Guidelines and
401 is of good quality.
402 </para>
403 <para>
404 Building the package and testing the software is part of the review, but
405 it's also not enough. The rest of this section contains a non-exhaustive
406 list of points to check in your review.
407 <footnote>
408 <para>
409 You can find more checks in the wiki where several developers share their own
410 <ulink url="http://wiki.debian.org/SponsorChecklist">sponsorship checklists</ulink>.
411 </para>
412 </footnote>
413 </para>
414 <itemizedlist>
415 <listitem>
416 <para>Verify that the upstream tarball provided is the same that has been
417 distributed by the upstream author (when the sources are repackaged for
418 Debian, generate the modified tarball yourself).</para>
419 </listitem>
420 <listitem>
421 <para>Run <command>lintian</command> (see <xref linkend="lintian"/>). It will catch many common
422 problems. Be sure to verify that any <command>lintian</command> overrides setup by the
423 maintainer is fully justified.</para>
424 </listitem>
425 <listitem>
426 <para>Run <command>licensecheck</command> (part of <xref linkend="devscripts"/>) and verify that
427 <filename>debian/copyright</filename> seems correct and complete. Look for
428 license problems (like files with “All rights reserved”
429 headers, or with a non-DFSG compliant license). <command>grep -ri</command>
430 is your friend for this task.</para>
431 </listitem>
432 <listitem>
433 <para>Build the package with <command>pbuilder</command> (or any similar tool, see <xref
434 linkend="pbuilder"/>) to ensure that the build-dependencies are
435 complete.</para>
436 </listitem>
437 <listitem>
438 <para>Proofread <filename>debian/control</filename>: does it follow the
439 best practices (see <xref linkend="bpp-debian-control"/>)? Are the dependencies
440 complete?</para>
441 </listitem>
442 <listitem>
443 <para>Proofread <filename>debian/rules</filename>: does it follow the
444 best practices (see <xref linkend="bpp-debian-rules"/>)? Do you see some
445 possible improvements?</para>
446 </listitem>
447 <listitem>
448 <para>Proofread the maintainer scripts (<filename>preinst</filename>,
449 <filename>postinst</filename>, <filename>prerm</filename>,
450 <filename>postrm</filename>, <filename>config</filename>): will the
451 <filename>preinst</filename>/<filename>postrm</filename> work when the dependencies are not
452 installed? Are all the scripts idempotent (i.e. can you run them multiple
453 times without consequences)?</para>
454 </listitem>
455 <listitem>
456 <para>Review any change to upstream files (either in <filename>.diff.gz</filename>, or in
457 <filename>debian/patches/</filename> or directly embedded in the <filename>debian</filename>
458 tarball for binary files). Are they justified? Are they properly
459 documented (with <ulink url="&url-dep3;">DEP-3</ulink> for patches)?</para>
460 </listitem>
461 <listitem>
462 <para>For every file, ask yourself why the file is there and whether it's
463 the right way to achieve the desired result. Is the maintainer following
464 the best packaging practices (see <xref
465 linkend="best-pkging-practices"/>)?</para>
466 </listitem>
467 <listitem>
468 <para>Build the packages, install them and try the software. Ensure you can
469 remove and purge the packages. Maybe test them with <command>piuparts</command>.
470 </para>
471 </listitem>
472 </itemizedlist>
473 <para>
474 If the audit did not reveal any problem, you can build the package and
475 upload it to Debian. Remember that even if you're not the maintainer,
476 the sponsor is still responsible of what he uploaded to Debian. That's
477 why you're encouraged to keep up with the package through the
478 <xref linkend="pkg-tracking-system"/>.
479 </para>
480 <para>
481 Note that you should not need to modify the source package to put your name
482 in the <filename>changelog</filename> or in the <filename>control</filename> file. The <literal>Maintainer</literal>
483 field of the <filename>control</filename> file and the
484 <filename>changelog</filename> should list the person who did the
485 packaging, i.e. the sponsoree. That way she will get all the BTS mail.
486 </para>
487 <para>Instead you should instruct <command>dpkg-buildpackage</command> to use your key for
488 the signature. You do that with the <literal>-k</literal> option:</para>
489 <screen>
490 dpkg-buildpackage -k<replaceable>KEY-ID</replaceable>
491 </screen>
492 <para>If you use <command>debuild</command> and <command>debsign</command>, you can even configure it permanently
493 in <filename>~/.devscripts</filename>:</para>
494 <programlisting>
495 DEBSIGN_KEYID=<replaceable>KEY-ID</replaceable>
496 </programlisting>
497 </section>
498
499 <section id="sponsoring-update">
500 <title>Sponsoring an update of an existing package</title>
501 <para>
502 You will usually assume that the package has already gone through a full
503 review. So instead of doing it again, you will carefully analyze the
504 difference between the current version and the new version prepared by the
505 maintainer. If you have not done the initial review yourself, you might
506 still want to have a more deeper look just in case the initial reviewer
507 was sloppy.
508 </para>
509 <para>
510 To be able to analyze the difference you need both versions. Download the
511 current version of the source package (with <command>apt-get source</command>)
512 and rebuild it (or download the current binary packages with
513 <command>aptitude download</command>). Download the source package to sponsor
514 (usually with <command>dget</command>).
515 </para>
516 <para>
517 Read the new changelog entry, it should tell you what to expect during the
518 review. The main tool you will use is <command>debdiff</command> (provide by
519 the <systemitem role="package">devscripts</systemitem> package), you can run it with two source packages (<filename>.dsc</filename>
520 files), or two binary packages, or two <filename>.changes</filename> files (it will then
521 compare all the binary packages listed in the <filename>.changes</filename>).
522 </para>
523 <para>
524 If you compare the source packages (excluding upstream files in the case
525 of a new upstream version, for example by filtering the output of <command>debdiff</command>
526 with <command>filterdiff -i '*/debian/*'</command>), you must understand all the
527 changes you see and they should be properly documented in the Debian
528 changelog.
529 </para>
530 <para>
531 If everything is fine, build the package and compare the binary packages
532 to verify that the changes on the source package have no unexpected
533 consequences (like some files dropped by mistake, missing dependencies,
534 etc.).
535 </para>
536 <para>
537 You might want to check out the Package Tracking System (see <xref
538 linkend="pkg-tracking-system"/>) to verify if the
539 maintainer has not missed something important. Maybe there are translations
540 updates sitting in the BTS that could have been integrated. Maybe the package
541 has been NMUed and the maintainer forgot to integrate the changes from the
542 NMU in his package. Maybe there's a release critical bug that he has left
543 unhandled and that's blocking migration to <literal>testing</literal>. Whatever. If you find
544 something that she could have done (better), it's time to tell her so that
545 she can improve for next time, and so that she has a better understanding
546 of her responsibilities.
547 </para>
548 <para>
549 If you have found no major problem, upload the new version. Otherwise
550 ask the maintainer to provide you a fixed version.
551 </para>
552 </section>
553 </section>
554
555 <section id="advocating-new-developers">
556 <title>Advocating new developers</title>
557 <para>
558 See the page about <ulink
559 url="&url-newmaint-advocate;">advocating a prospective
560 developer</ulink> at the Debian web site.
561 </para>
562 </section>
563
564 <section id="become-application-manager">
565 <title>Handling new maintainer applications</title>
566 <para>
567 Please see <ulink url="&url-newmaint-amchecklist;">Checklist
568 for Application Managers</ulink> at the Debian web site.
569 </para>
570 </section>
571
572 </section>
573
574 </chapter>
575