chiark / gitweb /
Removed a space at end of line po4a is warning about (msgfmt -cv doesn't)
[developers-reference.git] / pkgs.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="pkgs">
7 <title>Managing Packages</title>
8 <para>
9 This chapter contains information related to creating, uploading, maintaining,
10 and porting packages.
11 </para>
12 <section id="newpackage">
13 <title>New packages</title>
14 <para>
15 If you want to create a new package for the Debian distribution, you should
16 first check the <ulink url="&url-wnpp;">Work-Needing and
17 Prospective Packages (WNPP)</ulink> list.  Checking the WNPP list ensures that
18 no one is already working on packaging that software, and that effort is not
19 duplicated.  Read the <ulink url="&url-wnpp;">WNPP web
20 pages</ulink> for more information.
21 </para>
22 <para>
23 Assuming no one else is already working on your prospective package, you must
24 then submit a bug report (<xref linkend="submit-bug"/> ) against the
25 pseudo-package <systemitem role="package">wnpp</systemitem> describing your
26 plan to create a new package, including, but not limiting yourself to, a
27 description of the package, the license of the prospective package, and the
28 current URL where it can be downloaded from.
29 </para>
30 <para>
31 You should set the subject of the bug to <literal>ITP: 
32 <replaceable>foo</replaceable> -- <replaceable>short
33 description</replaceable></literal>, substituting the name of the new
34 package for <replaceable>foo</replaceable>. 
35 The severity of the bug report must be set to <literal>wishlist</literal>.
36 Please send a copy to &email-debian-devel; by using the X-Debbugs-CC
37 header (don't use CC:, because that way the message's subject won't
38 indicate the bug number). If you are packaging so many new packages (>10)
39 that notifying the mailing list in seperate messages is too disruptive,
40 do send a summary after filing the bugs to the debian-devel list instead.
41 This will inform the other developers about upcoming packages and will
42 allow a review of your description and package name.
43 </para>
44 <para>
45 Please include a <literal>Closes:
46 bug#<replaceable>nnnnn</replaceable></literal> entry in the changelog of the
47 new package in order for the bug report to be automatically closed once the new
48 package is installed in the archive (see <xref linkend="upload-bugfix"/> ).
49 </para>
50 <para>
51 When closing security bugs include CVE numbers as well as the Closes: #nnnnn.
52 This is useful for the security team to track vulnerabilities.  If an upload is
53 made to fix the bug before the advisory ID is known, it is encouraged to modify
54 the historical changelog entry with the next upload.  Even in this case, please
55 include all available pointers to background information in the original
56 changelog entry.
57 </para>
58 <para>
59 There are a number of reasons why we ask maintainers to announce their
60 intentions:
61 </para>
62 <itemizedlist>
63 <listitem>
64 <para>
65 It helps the (potentially new) maintainer to tap into the experience of people
66 on the list, and lets them know if anyone else is working on it already.
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 It lets other people thinking about working on the package know that there
72 already is a volunteer, so efforts may be shared.
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 It lets the rest of the maintainers know more about the package than the one
78 line description and the usual changelog entry ``Initial release'' that gets
79 posted to &email-debian-devel-changes;.
80 </para>
81 </listitem>
82 <listitem>
83 <para>
84 It is helpful to the people who live off <literal>unstable</literal> (and form
85 our first line of testers).  We should encourage these people.
86 </para>
87 </listitem>
88 <listitem>
89 <para>
90 The announcements give maintainers and other interested parties a better feel
91 of what is going on, and what is new, in the project.
92 </para>
93 </listitem>
94 </itemizedlist>
95 <para>
96 Please see <ulink url="http://&ftp-master-host;/REJECT-FAQ.html"></ulink>
97 for common rejection reasons for a new package.
98 </para>
99 </section>
100
101 <section id="changelog-entries">
102 <title>Recording changes in the package</title>
103 <para>
104 Changes that you make to the package need to be recorded in the
105 <filename>debian/changelog</filename>.  These changes should provide a concise
106 description of what was changed, why (if it's in doubt), and note if any bugs
107 were closed.  They also record when the package was completed.  This file will
108 be installed in
109 <filename>/usr/share/doc/<replaceable>package</replaceable>/changelog.Debian.gz</filename>,
110 or
111 <filename>/usr/share/doc/<replaceable>package</replaceable>/changelog.gz</filename>
112 for native packages.
113 </para>
114 <para>
115 The <filename>debian/changelog</filename> file conforms to a certain structure,
116 with a number of different fields.  One field of note, the
117 <literal>distribution</literal>, is described in <xref
118 linkend="distribution"/> .  More information about the structure of this file
119 can be found in the Debian Policy section titled
120 <filename>debian/changelog</filename>.
121 </para>
122 <para>
123 Changelog entries can be used to automatically close Debian bugs when the
124 package is installed into the archive.  See <xref linkend="upload-bugfix"/> .
125 </para>
126 <para>
127 It is conventional that the changelog entry of a package that contains a new
128 upstream version of the software looks like this:
129 </para>
130 <screen>
131   * new upstream version
132 </screen>
133 <para>
134 There are tools to help you create entries and finalize the
135 <filename>changelog</filename> for release — see <xref linkend="devscripts"/>
136 and <xref linkend="dpkg-dev-el"/> .
137 </para>
138 <para>
139 See also <xref linkend="bpp-debian-changelog"/> .
140 </para>
141 </section>
142
143 <section id="sanitycheck">
144 <title>Testing the package</title>
145 <para>
146 Before you upload your package, you should do basic testing on it.  At a
147 minimum, you should try the following activities (you'll need to have an older
148 version of the same Debian package around):
149 </para>
150 <itemizedlist>
151 <listitem>
152 <para>
153 Install the package and make sure the software works, or upgrade the package
154 from an older version to your new version if a Debian package for it already
155 exists.
156 </para>
157 </listitem>
158 <listitem>
159 <para>
160 Run <command>lintian</command> over the package.  You can run
161 <command>lintian</command> as follows: <literal>lintian -v
162 <replaceable>package-version</replaceable>.changes</literal>.  This will check
163 the source package as well as the binary package.  If you don't understand the
164 output that <command>lintian</command> generates, try adding the
165 <literal>-i</literal> switch, which will cause <command>lintian</command> to
166 output a very verbose description of the problem.
167 </para>
168 <para>
169 Normally, a package should <emphasis>not</emphasis> be uploaded if it causes
170 lintian to emit errors (they will start with <literal>E</literal>).
171 </para>
172 <para>
173 For more information on <command>lintian</command>, see <xref
174 linkend="lintian"/> .
175 </para>
176 </listitem>
177 <listitem>
178 <para>
179 Optionally run <xref linkend="debdiff"/> to analyze changes from an older
180 version, if one exists.
181 </para>
182 </listitem>
183 <listitem>
184 <para>
185 Downgrade the package to the previous version (if one exists) — this tests
186 the <filename>postrm</filename> and <filename>prerm</filename> scripts.
187 </para>
188 </listitem>
189 <listitem>
190 <para>
191 Remove the package, then reinstall it.
192 </para>
193 </listitem>
194 <listitem>
195 <para>
196 Copy the source package in a different directory and try unpacking it and
197 rebuilding it.  This tests if the package relies on existing files outside of
198 it, or if it relies on permissions being preserved on the files shipped inside
199 the .diff.gz file.
200 </para>
201 </listitem>
202 </itemizedlist>
203 </section>
204
205 <section id="sourcelayout">
206 <title>Layout of the source package</title>
207 <para>
208 There are two types of Debian source packages:
209 </para>
210 <itemizedlist>
211 <listitem>
212 <para>
213 the so-called <literal>native</literal> packages, where there is no
214 distinction between the original sources and the patches applied for Debian
215 </para>
216 </listitem>
217 <listitem>
218 <para>
219 the (more common) packages where there's an original source tarball file
220 accompanied by another file that contains the patches applied for Debian
221 </para>
222 </listitem>
223 </itemizedlist>
224 <para>
225 For the native packages, the source package includes a Debian source control
226 file (<literal>.dsc</literal>) and the source tarball
227 (<literal>.tar.gz</literal>).  A source package of a non-native package
228 includes a Debian source control file, the original source tarball
229 (<literal>.orig.tar.gz</literal>) and the Debian patches
230 (<literal>.diff.gz</literal>).
231 </para>
232 <para>
233 Whether a package is native or not is determined when it is built by
234 <citerefentry> <refentrytitle>dpkg-buildpackage</refentrytitle>
235 <manvolnum>1</manvolnum> </citerefentry>.  The rest of this section relates
236 only to non-native packages.
237 </para>
238 <para>
239 The first time a version is uploaded which corresponds to a particular upstream
240 version, the original source tar file should be uploaded and included in the
241 <filename>.changes</filename> file.  Subsequently, this very same tar file
242 should be used to build the new diffs and <filename>.dsc</filename> files, and
243 will not need to be re-uploaded.
244 </para>
245 <para>
246 By default, <command>dpkg-genchanges</command> and
247 <command>dpkg-buildpackage</command> will include the original source tar file
248 if and only if the Debian revision part of the source version number is 0 or 1,
249 indicating a new upstream version.  This behavior may be modified by using
250 <literal>-sa</literal> to always include it or <literal>-sd</literal> to always
251 leave it out.
252 </para>
253 <para>
254 If no original source is included in the upload, the original source tar-file
255 used by <command>dpkg-source</command> when constructing the
256 <filename>.dsc</filename> file and diff to be uploaded
257 <emphasis>must</emphasis> be byte-for-byte identical with the one already in
258 the archive.
259 </para>
260 <para>
261 Please notice that, in non-native packages, permissions on files that are not
262 present in the .orig.tar.gz will not be preserved, as diff does not store file
263 permissions in the patch.
264 </para>
265 </section>
266
267 <section id="distribution">
268 <title>Picking a distribution</title>
269 <para>
270 Each upload needs to specify which distribution the package is intended for.
271 The package build process extracts this information from the first line of the
272 <filename>debian/changelog</filename> file and places it in the
273 <literal>Distribution</literal> field of the <literal>.changes</literal> file.
274 </para>
275 <para>
276 There are several possible values for this field: <literal>stable</literal>,
277 <literal>unstable</literal>, <literal>testing-proposed-updates</literal> and
278 <literal>experimental</literal>.  Normally, packages are uploaded into
279 <literal>unstable</literal>.
280 </para>
281 <para>
282 Actually, there are two other possible distributions: <literal>stable-security
283 </literal> and <literal>testing-security</literal>, but read 
284 <xref linkend="bug-security"/> for more information on those.
285 </para>
286 <para>
287 It is not possible to upload a package into several distributions at the same
288 time.
289 </para>
290 <section id="upload-stable">
291 <title>Special case: uploads to the <literal>stable</literal> and 
292 <literal>oldstable</literal> distributions</title>
293 <para>
294 Uploading to <literal>stable</literal> means that the package will transfered
295 to the <literal>proposed-updates-new</literal> queue for review by the stable
296 release managers, and if approved will be installed in
297 <filename>stable-proposed-updates</filename> directory of the Debian archive.
298 From there, it will be included in <literal>stable</literal> with the next
299 point release.
300 </para>
301 <para>
302 To ensure that your upload will be accepted, you should discuss the changes
303 with the stable release team before you upload. For that, send a mail to
304 the &email-debian-release; mailing list, including the patch you want to
305 apply to the package version currently in <literal>stable</literal>. Always
306 be verbose and detailed in your changelog entries for uploads to the
307 <literal>stable</literal> distribution.
308 </para>
309 <para>
310 Extra care should be taken when uploading to <literal>stable</literal>.
311 Basically, a package should only be uploaded to <literal>stable</literal> if
312 one of the following happens:
313 </para>
314 <itemizedlist>
315 <listitem>
316 <para>
317 a truly critical functionality problem
318 </para>
319 </listitem>
320 <listitem>
321 <para>
322 the package becomes uninstallable
323 </para>
324 </listitem>
325 <listitem>
326 <para>
327 a released architecture lacks the package
328 </para>
329 </listitem>
330 </itemizedlist>
331 <para>
332 In the past, uploads to <literal>stable</literal> were used to address
333 security problems as well.  However, this practice is deprecated, as uploads
334 used for Debian security advisories are automatically copied to the appropriate
335 <filename>proposed-updates</filename> archive when the advisory is released.
336 See <xref linkend="bug-security"/> for detailed information on handling
337 security problems. If the security teams deems the problem to be too
338 benign to be fixed through a <literal>DSA</literal>, the stable release
339 managers are usually willing to include your fix nonetheless in a regular
340 upload to <literal>stable</literal>.
341 </para>
342 <para>
343 Changing anything else in the package that isn't important is discouraged,
344 because even trivial fixes can cause bugs later on.
345 </para>
346 <para>
347 Packages uploaded to <literal>stable</literal> need to be compiled on systems
348 running <literal>stable</literal>, so that their dependencies are limited to
349 the libraries (and other packages) available in <literal>stable</literal>;
350 for example, a package uploaded to <literal>stable</literal> that depends on
351 a library package that only exists in <literal>unstable</literal> will be 
352 rejected.  Making changes to dependencies of other packages (by messing with
353 <literal>Provides</literal> or <literal>shlibs</literal> files), possibly 
354 making those other packages uninstallable, is strongly discouraged.
355 </para>
356 <para>
357 Uploads to the <literal>oldstable</literal> distributions are possible as
358 long as it hasn't been archived. The same rules as for <literal>stable
359 </literal> apply.
360 </para>
361 </section>
362
363 <section id="upload-t-p-u">
364 <title>Special case: uploads to <literal>testing/testing-proposed-updates</literal></title>
365 <para>
366 Please see the information in the <link linkend="t-p-u">testing
367 section</link> for details.
368 </para>
369 </section>
370
371 </section>
372
373 <section id="upload">
374 <title>Uploading a package</title>
375 <section id="upload-ftp-master">
376 <title>Uploading to <literal>ftp-master</literal></title>
377 <para>
378 To upload a package, you should upload the files (including the signed changes
379 and dsc-file) with anonymous ftp to <literal>&ftp-master-host;</literal> in
380 the directory <ulink
381 url="ftp://&ftp-master-host;&upload-queue;">&upload-queue;</ulink>.
382 To get the files processed there, they need to be signed with a key in the
383 Debian Developers keyring or the Debian Maintainers keyring
384 (see <ulink url="&url-wiki-dm;"></ulink>).
385 </para>
386 <para>
387 Please note that you should transfer the changes file last.  Otherwise, your
388 upload may be rejected because the archive maintenance software will parse the
389 changes file and see that not all files have been uploaded.
390 </para>
391 <para>
392 You may also find the Debian packages <xref linkend="dupload"/> or <xref
393 linkend="dput"/> useful when uploading packages.  These handy programs help
394 automate the process of uploading packages into Debian.
395 </para>
396 <para>
397 For removing packages, please see the README file in that ftp directory, and
398 the Debian package <xref linkend="dcut"/> .
399 </para>
400 </section>
401
402 <section id="delayed-incoming">
403 <title>Delayed uploads</title>
404 <para>
405 Delayed uploads are done for the moment via the delayed queue at <literal>gluck
406 </literal>. The upload-directory is 
407 <literal>gluck:~tfheen/DELAYED/[012345678]-day</literal>. 0-day is uploaded
408 multiple times per day to <literal>&ftp-master-host;</literal>.
409 </para>
410 <para>
411 With a fairly recent dput, this section
412 </para>
413 <screen>
414 [tfheen_delayed]
415 method = scp
416 fqdn = gluck.debian.org
417 incoming = ~tfheen
418 </screen>
419 <para>
420 in <filename>~/.dput.cf</filename> should work fine for uploading to the
421 <literal>DELAYED</literal> queue.
422 </para>
423 <para>
424 <emphasis>Note:</emphasis> Since this upload queue goes to
425 <literal>&ftp-master-host;</literal>, the prescription found in <xref
426 linkend="upload-ftp-master"/> applies here as well.
427 </para>
428 </section>
429
430 <section id="s5.6.4">
431 <title>Security uploads</title>
432 <para>
433 Do <emphasis role="strong">NOT</emphasis> upload a package to the security
434 upload queue (<literal>oldstable-security</literal>, <literal>stable-security
435 </literal>, etc.) without prior authorization from the security team.  If the
436 package does not exactly meet the team's requirements, it will cause many
437 problems and delays in dealing with the unwanted upload.  For details, please
438 see section <xref linkend="bug-security"/> .
439 </para>
440 </section>
441
442 <section id="s5.6.5">
443 <title>Other upload queues</title>
444 <para>
445 The scp queues on <literal>&ftp-master-host;</literal>, and <literal>
446 security.debian.org</literal> are mostly unusable due to the login restrictions
447 on those hosts.
448 </para>
449 <para>
450 The anonymous queues on ftp.uni-erlangen.de and ftp.uk.debian.org are currently
451 down.  Work is underway to resurrect them.
452 </para>
453 <para>
454 The queues on master.debian.org, samosa.debian.org, master.debian.or.jp, and
455 ftp.chiark.greenend.org.uk are down permanently, and will not be resurrected.
456 The queue in Japan will be replaced with a new queue on hp.debian.or.jp some
457 day.
458 </para>
459 </section>
460
461 <section id="upload-notification">
462 <title>Notification that a new package has been installed</title>
463 <para>
464 The Debian archive maintainers are responsible for handling package uploads.
465 For the most part, uploads are automatically handled on a daily basis by the
466 archive maintenance tools, <command>katie</command>.  Specifically, updates to
467 existing packages to the <literal>unstable</literal> distribution are handled
468 automatically.  In other cases, notably new packages, placing the uploaded 
469 package into the distribution is handled manually.  When uploads are handled
470 manually, the change to the archive may take up to a month to occur.  Please
471 be patient.
472 </para>
473 <para>
474 In any case, you will receive an email notification indicating that the package
475 has been added to the archive, which also indicates which bugs will be closed
476 by the upload.  Please examine this notification carefully, checking if any
477 bugs you meant to close didn't get triggered.
478 </para>
479 <para>
480 The installation notification also includes information on what section the
481 package was inserted into.  If there is a disparity, you will receive a
482 separate email notifying you of that.  Read on below.
483 </para>
484 <para>
485 Note that if you upload via queues, the queue daemon software will also send
486 you a notification by email.
487 </para>
488 </section>
489
490 </section>
491
492 <section id="override-file">
493 <title>Specifying the package section, subsection and priority</title>
494 <para>
495 The <filename>debian/control</filename> file's <literal>Section</literal> and
496 <literal>Priority</literal> fields do not actually specify where the file will
497 be placed in the archive, nor its priority.  In order to retain the overall
498 integrity of the archive, it is the archive maintainers who have control over
499 these fields.  The values in the <filename>debian/control</filename> file are
500 actually just hints.
501 </para>
502 <para>
503 The archive maintainers keep track of the canonical sections and priorities for
504 packages in the <literal>override file</literal>.  If there is a disparity
505 between the <literal>override file</literal> and the package's fields as
506 indicated in <filename>debian/control</filename>, then you will receive an
507 email noting the divergence when the package is installed into the archive.
508 You can either correct your <filename>debian/control</filename> file for your
509 next upload, or else you may wish to make a change in the <literal>override
510 file</literal>.
511 </para>
512 <para>
513 To alter the actual section that a package is put in, you need to first make
514 sure that the <filename>debian/control</filename> file in your package is
515 accurate.  Next, send an email &email-override; or submit a
516 bug against <systemitem role="package">ftp.debian.org</systemitem> requesting
517 that the section or priority for your package be changed from the old section
518 or priority to the new one.  Be sure to explain your reasoning.
519 </para>
520 <para>
521 For more information about <literal>override files</literal>, see
522 <citerefentry> <refentrytitle>dpkg-scanpackages</refentrytitle>
523 <manvolnum>1</manvolnum> </citerefentry> and <ulink
524 url="&url-bts-devel;#maintincorrect"></ulink>.
525 </para>
526 <para>
527 Note that the <literal>Section</literal> field describes both the section as
528 well as the subsection, which are described in <xref
529 linkend="archive-sections"/> .  If the section is main, it should be omitted.
530 The list of allowable subsections can be found in <ulink
531 url="&url-debian-policy;ch-archive.html#s-subsections"></ulink>.
532 </para>
533 </section>
534
535 <section id="bug-handling">
536 <title>Handling bugs</title>
537 <para>
538 Every developer has to be able to work with the Debian <ulink
539 url="&url-bts;">bug tracking system</ulink>.  This includes
540 knowing how to file bug reports properly (see <xref linkend="submit-bug"/> ),
541 how to update them and reorder them, and how to process and close them.
542 </para>
543 <para>
544 The bug tracking system's features are described in the <ulink
545 url="&url-bts-devel;">BTS documentation for
546 developers</ulink>.  This includes closing bugs, sending followup messages,
547 assigning severities and tags, marking bugs as forwarded, and other issues.
548 </para>
549 <para>
550 Operations such as reassigning bugs to other packages, merging separate bug
551 reports about the same issue, or reopening bugs when they are prematurely
552 closed, are handled using the so-called control mail server.  All of the
553 commands available on this server are described in the <ulink
554 url="&url-bts-control;">BTS control server
555 documentation</ulink>.
556 </para>
557 <section id="bug-monitoring">
558 <title>Monitoring bugs</title>
559 <para>
560 If you want to be a good maintainer, you should periodically check the <ulink
561 url="&url-bts;">Debian bug tracking system (BTS)</ulink> for
562 your packages.  The BTS contains all the open bugs against your packages.  You
563 can check them by browsing this page:
564 <literal>http://&bugs-host;/<replaceable>yourlogin</replaceable>@debian.org</literal>.
565 </para>
566 <para>
567 Maintainers interact with the BTS via email addresses at
568 <literal>&bugs-host;</literal>.  Documentation on available
569 commands can be found at <ulink url="&url-bts;"></ulink>, or,
570 if you have installed the <systemitem role="package">doc-debian</systemitem>
571 package, you can look at the local files &file-bts-docs;.
572 </para>
573 <para>
574 Some find it useful to get periodic reports on open bugs.  You can add a cron
575 job such as the following if you want to get a weekly email outlining all the
576 open bugs against your packages:
577 </para>
578 <screen>
579 # ask for weekly reports of bugs in my packages
580 &cron-bug-report;
581 </screen>
582 <para>
583 Replace <replaceable>address</replaceable> with your official Debian maintainer
584 address.
585 </para>
586 </section>
587
588 <section id="bug-answering">
589 <title>Responding to bugs</title>
590 <para>
591 When responding to bugs, make sure that any discussion you have about bugs is
592 sent both to the original submitter of the bug, and to the bug itself (e.g.,
593 <email>123@&bugs-host;</email>).  If you're writing a new mail and you
594 don't remember the submitter email address, you can use the
595 <email>123-submitter@&bugs-host;</email> email to contact the submitter
596 <emphasis>and</emphasis> to record your mail within the bug log (that means you
597 don't need to send a copy of the mail to <email>123@&bugs-host;</email>).
598 </para>
599 <para>
600 If you get a bug which mentions FTBFS, this means Fails to build from source.
601 Porters frequently use this acronym.
602 </para>
603 <para>
604 Once you've dealt with a bug report (e.g.  fixed it), mark it as
605 <literal>done</literal> (close it) by sending an explanation message to
606 <email>123-done@&bugs-host;</email>.  If you're fixing a bug by changing
607 and uploading the package, you can automate bug closing as described in <xref
608 linkend="upload-bugfix"/> .
609 </para>
610 <para>
611 You should <emphasis>never</emphasis> close bugs via the bug server
612 <literal>close</literal> command sent to &email-bts-control;.
613 If you do so, the original submitter will not receive any information about why
614 the bug was closed.
615 </para>
616 </section>
617
618 <section id="bug-housekeeping">
619 <title>Bug housekeeping</title>
620 <para>
621 As a package maintainer, you will often find bugs in other packages or have
622 bugs reported against your packages which are actually bugs in other packages.
623 The bug tracking system's features are described in the <ulink
624 url="&url-bts-devel;">BTS documentation for Debian
625 developers</ulink>.  Operations such as reassigning, merging, and tagging bug
626 reports are described in the <ulink
627 url="&url-bts-control;">BTS control server
628 documentation</ulink>.  This section contains some guidelines for managing your
629 own bugs, based on the collective Debian developer experience.
630 </para>
631 <para>
632 Filing bugs for problems that you find in other packages is one of the civic
633 obligations of maintainership, see <xref linkend="submit-bug"/> for details.
634 However, handling the bugs in your own packages is even more important.
635 </para>
636 <para>
637 Here's a list of steps that you may follow to handle a bug report:
638 </para>
639 <orderedlist numeration="arabic">
640 <listitem>
641 <para>
642 Decide whether the report corresponds to a real bug or not.  Sometimes users
643 are just calling a program in the wrong way because they haven't read the
644 documentation.  If you diagnose this, just close the bug with enough
645 information to let the user correct their problem (give pointers to the good
646 documentation and so on).  If the same report comes up again and again you may
647 ask yourself if the documentation is good enough or if the program shouldn't
648 detect its misuse in order to give an informative error message.  This is an
649 issue that may need to be brought up with the upstream author.
650 </para>
651 <para>
652 If the bug submitter disagrees with your decision to close the bug, they may
653 reopen it until you find an agreement on how to handle it.  If you don't find
654 any, you may want to tag the bug <literal>wontfix</literal> to let people know
655 that the bug exists but that it won't be corrected.  If this situation is
656 unacceptable, you (or the submitter) may want to require a decision of the
657 technical committee by reassigning the bug to <systemitem
658 role="package">tech-ctte</systemitem> (you may use the clone command of the BTS
659 if you wish to keep it reported against your package).  Before doing so, please
660 read the <ulink url="&url-tech-ctte;">recommended
661 procedure</ulink>.
662 </para>
663 </listitem>
664 <listitem>
665 <para>
666 If the bug is real but it's caused by another package, just reassign the bug to
667 the right package.  If you don't know which package it should be reassigned to,
668 you should ask for help on <link linkend="irc-channels">IRC</link> or
669 on &email-debian-devel;.  Please inform the maintainer(s) of the package
670 you reassign the bug to, for example by Cc:ing the message that does the
671 reassign to <email>packagename@packages.debian.org</email> and explaining
672 your reasons in that mail. Please note that a simple reassignment is
673 <emphasis>not</emphasis> e-mailed to the maintainers of the package
674 being reassigned to, so they won't know about it until they look at
675 a bug overview for their packages.
676 </para>
677 <para>
678 If the bug affects the operation of your package, please consider
679 cloning the bug and reassigning the clone to the package that really
680 causes the behavior. Otherwise, the bug will not be shown in your
681 package's bug list, possibly causing users to report the same bug over
682 and over again. You should block "your" bug with the reassigned, cloned
683 bug to document the relationship.
684 </para>
685 </listitem>
686 <listitem>
687 <para>
688 Sometimes you also have to adjust the severity of the bug so that it matches
689 our definition of the severity.  That's because people tend to inflate the
690 severity of bugs to make sure their bugs are fixed quickly.  Some bugs may even
691 be dropped to wishlist severity when the requested change is just cosmetic.
692 </para>
693 </listitem>
694 <listitem>
695 <para>
696 If the bug is real but the same problem has already been reported by someone
697 else, then the two relevant bug reports should be merged into one using the
698 merge command of the BTS.  In this way, when the bug is fixed, all of the
699 submitters will be informed of this.  (Note, however, that emails sent to one
700 bug report's submitter won't automatically be sent to the other report's
701 submitter.) For more details on the technicalities of the merge command and its
702 relative, the unmerge command, see the BTS control server documentation.
703 </para>
704 </listitem>
705 <listitem>
706 <para>
707 The bug submitter may have forgotten to provide some information, in which case
708 you have to ask them for the required information.  You may use the
709 <literal>moreinfo</literal> tag to mark the bug as such.  Moreover if you can't
710 reproduce the bug, you tag it <literal>unreproducible</literal>.  Anyone who
711 can reproduce the bug is then invited to provide more information on how to
712 reproduce it.  After a few months, if this information has not been sent by
713 someone, the bug may be closed.
714 </para>
715 </listitem>
716 <listitem>
717 <para>
718 If the bug is related to the packaging, you just fix it.  If you are not able
719 to fix it yourself, then tag the bug as <literal>help</literal>.  You can also
720 ask for help on &email-debian-devel; or
721 &email-debian-qa;.  If it's an upstream problem, you have to
722 forward it to the upstream author.  Forwarding a bug is not enough, you have to
723 check at each release if the bug has been fixed or not.  If it has, you just
724 close it, otherwise you have to remind the author about it.  If you have the
725 required skills you can prepare a patch that fixes the bug and send it to the
726 author at the same time.  Make sure to send the patch to the BTS and to tag the
727 bug as <literal>patch</literal>.
728 </para>
729 </listitem>
730 <listitem>
731 <para>
732 If you have fixed a bug in your local copy, or if a fix has been committed to
733 the CVS repository, you may tag the bug as <literal>pending</literal> to let
734 people know that the bug is corrected and that it will be closed with the next
735 upload (add the <literal>closes:</literal> in the
736 <filename>changelog</filename>).  This is particularly useful if you are
737 several developers working on the same package.
738 </para>
739 </listitem>
740 <listitem>
741 <para>
742 Once a corrected package is available in the archive, the bug should be
743 closed indicating the version in which it was fixed. This can be done
744 automatically, read <xref linkend="upload-bugfix"/>.
745 </para>
746 </listitem>
747 </orderedlist>
748 </section>
749
750 <section id="upload-bugfix">
751 <title>When bugs are closed by new uploads</title>
752 <para>
753 As bugs and problems are fixed in your packages, it is your responsibility as
754 the package maintainer to close these bugs.  However, you should not close a
755 bug until the package which fixes the bug has been accepted into the Debian
756 archive.  Therefore, once you get notification that your updated package has
757 been installed into the archive, you can and should close the bug in the BTS.
758 Also, the bug should be closed with the correct version.
759 </para>
760 <para>
761 However, it's possible to avoid having to manually close bugs after the upload
762 — just list the fixed bugs in your <filename>debian/changelog</filename>
763 file, following a certain syntax, and the archive maintenance software will
764 close the bugs for you.  For example:
765 </para>
766 <screen>
767 acme-cannon (3.1415) unstable; urgency=low
768
769   * Frobbed with options (closes: Bug#98339)
770   * Added safety to prevent operator dismemberment, closes: bug#98765,
771     bug#98713, #98714.
772   * Added man page. Closes: #98725.
773 </screen>
774 <para>
775 Technically speaking, the following Perl regular expression describes how bug
776 closing changelogs are identified:
777 </para>
778 <screen>
779   /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig
780 </screen>
781 <para>
782 We prefer the <literal>closes: #<replaceable>XXX</replaceable></literal>
783 syntax, as it is the most concise entry and the easiest to integrate with the
784 text of the <filename>changelog</filename>.  Unless specified different by the
785 <replaceable>-v</replaceable>-switch to <command>dpkg-buildpackage</command>,
786 only the bugs closed in the most recent changelog entry are closed (basically,
787 exactly the bugs mentioned in the changelog-part in the
788 <filename>.changes</filename> file are closed).
789 </para>
790 <para>
791 Historically, uploads identified as <link linkend="nmu">Non-maintainer
792 upload (NMU)</link> were tagged <literal>fixed</literal> instead of being
793 closed, but that practice was ceased with the advent of version-tracking.  The
794 same applied to the tag <literal>fixed-in-experimental</literal>.
795 </para>
796 <para>
797 If you happen to mistype a bug number or forget a bug in the changelog entries,
798 don't hesitate to undo any damage the error caused.  To reopen wrongly closed
799 bugs, send a <literal>reopen <replaceable>XXX</replaceable></literal> command
800 to the bug tracking system's control address,
801 &email-bts-control;.  To close any remaining bugs that were
802 fixed by your upload, email the <filename>.changes</filename> file to
803 <email>XXX-done@&bugs-host;</email>, where <replaceable>XXX</replaceable>
804 is the bug number, and put Version: YYY and an empty line as the first two
805 lines of the body of the email, where <replaceable>YYY</replaceable> is the
806 first version where the bug has been fixed.
807 </para>
808 <para>
809 Bear in mind that it is not obligatory to close bugs using the changelog as
810 described above.  If you simply want to close bugs that don't have anything to
811 do with an upload you made, do it by emailing an explanation to
812 <email>XXX-done@&bugs-host;</email>.  Do <emphasis
813 role="strong">not</emphasis> close bugs in the changelog entry of a version if
814 the changes in that version of the package don't have any bearing on the bug.
815 </para>
816 <para>
817 For general information on how to write your changelog entries, see <xref
818 linkend="bpp-debian-changelog"/> .
819 </para>
820 </section>
821
822 <section id="bug-security">
823 <title>Handling security-related bugs</title>
824 <para>
825 Due to their sensitive nature, security-related bugs must be handled carefully.
826 The Debian Security Team exists to coordinate this activity, keeping track of
827 outstanding security problems, helping maintainers with security problems or
828 fixing them themselves, sending security advisories, and maintaining
829 <literal>security.debian.org</literal>.
830 </para>
831 <!-- information about the security database goes here once it's ready -->
832 <!-- (mdz) -->
833 <para>
834 When you become aware of a security-related bug in a Debian package, whether or
835 not you are the maintainer, collect pertinent information about the problem,
836 and promptly contact the security team at
837 &email-security-team; as soon as possible.  <emphasis
838 role="strong">DO NOT UPLOAD</emphasis> any packages for <literal>stable</literal>;
839  the security team will do that.  Useful information includes, for example:
840 </para>
841 <itemizedlist>
842 <listitem>
843 <para>
844 Which versions of the package are known to be affected by the bug.  Check each
845 version that is present in a supported Debian release, as well as 
846 <literal>testing</literal> and <literal>unstable</literal>.
847 </para>
848 </listitem>
849 <listitem>
850 <para>
851 The nature of the fix, if any is available (patches are especially helpful)
852 </para>
853 </listitem>
854 <listitem>
855 <para>
856 Any fixed packages that you have prepared yourself (send only the
857 <literal>.diff.gz</literal> and <literal>.dsc</literal> files and read <xref
858 linkend="bug-security-building"/> first)
859 </para>
860 </listitem>
861 <listitem>
862 <para>
863 Any assistance you can provide to help with testing (exploits, regression
864 testing, etc.)
865 </para>
866 </listitem>
867 <listitem>
868 <para>
869 Any information needed for the advisory (see <xref
870 linkend="bug-security-advisories"/> )
871 </para>
872 </listitem>
873 </itemizedlist>
874 <section id="bug-security-confidentiality">
875 <title>Confidentiality</title>
876 <para>
877 Unlike most other activities within Debian, information about security issues
878 must sometimes be kept private for a time.  This allows software distributors
879 to coordinate their disclosure in order to minimize their users' exposure.
880 Whether this is the case depends on the nature of the problem and corresponding
881 fix, and whether it is already a matter of public knowledge.
882 </para>
883 <para>
884 There are several ways developers can learn of a security problem:
885 </para>
886 <itemizedlist>
887 <listitem>
888 <para>
889 they notice it on a public forum (mailing list, web site, etc.)
890 </para>
891 </listitem>
892 <listitem>
893 <para>
894 someone files a bug report
895 </para>
896 </listitem>
897 <listitem>
898 <para>
899 someone informs them via private email
900 </para>
901 </listitem>
902 </itemizedlist>
903 <para>
904 In the first two cases, the information is public and it is important to have a
905 fix as soon as possible.  In the last case, however, it might not be public
906 information.  In that case there are a few possible options for dealing with
907 the problem:
908 </para>
909 <itemizedlist>
910 <listitem>
911 <para>
912 If the security exposure is minor, there is sometimes no need to keep the
913 problem a secret and a fix should be made and released.
914 </para>
915 </listitem>
916 <listitem>
917 <para>
918 If the problem is severe, it is preferable to share the information with other
919 vendors and coordinate a release.  The security team keeps in contact with the
920 various organizations and individuals and can take care of that.
921 </para>
922 </listitem>
923 </itemizedlist>
924 <para>
925 In all cases if the person who reports the problem asks that it not be
926 disclosed, such requests should be honored, with the obvious exception of
927 informing the security team in order that a fix may be produced for a stable
928 release of Debian.  When sending confidential information to the security team,
929 be sure to mention this fact.
930 </para>
931 <para>
932 Please note that if secrecy is needed you may not upload a fix to 
933 <literal>unstable</literal> (or
934 anywhere else, such as a public CVS repository).  It is not sufficient to
935 obfuscate the details of the change, as the code itself is public, and can (and
936 will) be examined by the general public.
937 </para>
938 <para>
939 There are two reasons for releasing information even though secrecy is
940 requested: the problem has been known for a while, or the problem or exploit
941 has become public.
942 </para>
943 </section>
944
945 <section id="bug-security-advisories">
946 <title>Security Advisories</title>
947 <para>
948 Security advisories are only issued for the current, released stable
949 distribution, and <emphasis>not</emphasis> for <literal>testing</literal>
950 or <literal>unstable</literal>.  When released, advisories are sent to the
951 &email-debian-security-announce; mailing list and posted on
952 <ulink url="&url-debian-security-advisories;">the security web
953 page</ulink>.  Security advisories are written and posted by the security team.
954 However they certainly do not mind if a maintainer can supply some of the
955 information for them, or write part of the text.  Information that should be in
956 an advisory includes:
957 </para>
958 <itemizedlist>
959 <listitem>
960 <para>
961 A description of the problem and its scope, including:
962 </para>
963 <itemizedlist>
964 <listitem>
965 <para>
966 The type of problem (privilege escalation, denial of service, etc.)
967 </para>
968 </listitem>
969 <listitem>
970 <para>
971 What privileges may be gained, and by whom (if any)
972 </para>
973 </listitem>
974 <listitem>
975 <para>
976 How it can be exploited
977 </para>
978 </listitem>
979 <listitem>
980 <para>
981 Whether it is remotely or locally exploitable
982 </para>
983 </listitem>
984 <listitem>
985 <para>
986 How the problem was fixed
987 </para>
988 </listitem>
989 </itemizedlist>
990 <para>
991 This information allows users to assess the threat to their systems.
992 </para>
993 </listitem>
994 <listitem>
995 <para>
996 Version numbers of affected packages
997 </para>
998 </listitem>
999 <listitem>
1000 <para>
1001 Version numbers of fixed packages
1002 </para>
1003 </listitem>
1004 <listitem>
1005 <para>
1006 Information on where to obtain the updated packages (usually from the Debian
1007 security archive)
1008 </para>
1009 </listitem>
1010 <listitem>
1011 <para>
1012 References to upstream advisories, <ulink
1013 url="http://cve.mitre.org">CVE</ulink> identifiers, and any other information
1014 useful in cross-referencing the vulnerability
1015 </para>
1016 </listitem>
1017 </itemizedlist>
1018 </section>
1019
1020 <section id="bug-security-building">
1021 <title>Preparing packages to address security issues</title>
1022 <para>
1023 One way that you can assist the security team in their duties is to provide
1024 them with fixed packages suitable for a security advisory for the stable Debian
1025 release.
1026 </para>
1027 <para>
1028 When an update is made to the stable release, care must be taken to avoid
1029 changing system behavior or introducing new bugs.  In order to do this, make as
1030 few changes as possible to fix the bug.  Users and administrators rely on the
1031 exact behavior of a release once it is made, so any change that is made might
1032 break someone's system.  This is especially true of libraries: make sure you
1033 never change the API or ABI, no matter how small the change.
1034 </para>
1035 <para>
1036 This means that moving to a new upstream version is not a good solution.
1037 Instead, the relevant changes should be back-ported to the version present in
1038 the current stable Debian release.  Generally, upstream maintainers are willing
1039 to help if needed.  If not, the Debian security team may be able to help.
1040 </para>
1041 <para>
1042 In some cases, it is not possible to back-port a security fix, for example when
1043 large amounts of source code need to be modified or rewritten.  If this
1044 happens, it may be necessary to move to a new upstream version.  However, this
1045 is only done in extreme situations, and you must always coordinate that with
1046 the security team beforehand.
1047 </para>
1048 <para>
1049 Related to this is another important guideline: always test your changes.  If
1050 you have an exploit available, try it and see if it indeed succeeds on the
1051 unpatched package and fails on the fixed package.  Test other, normal actions
1052 as well, as sometimes a security fix can break seemingly unrelated features in
1053 subtle ways.
1054 </para>
1055 <para>
1056 Do <emphasis role="strong">NOT</emphasis> include any changes in your package
1057 which are not directly related to fixing the vulnerability.  These will only
1058 need to be reverted, and this wastes time.  If there are other bugs in your
1059 package that you would like to fix, make an upload to proposed-updates in the
1060 usual way, after the security advisory is issued.  The security update
1061 mechanism is not a means for introducing changes to your package which would
1062 otherwise be rejected from the stable release, so please do not attempt to do
1063 this.
1064 </para>
1065 <para>
1066 Review and test your changes as much as possible.  Check the differences from
1067 the previous version repeatedly (<command>interdiff</command> from the
1068 <systemitem role="package">patchutils</systemitem> package and
1069 <command>debdiff</command> from <systemitem
1070 role="package">devscripts</systemitem> are useful tools for this, see <xref
1071 linkend="debdiff"/> ).
1072 </para>
1073 <para>
1074 Be sure to verify the following items:
1075 </para>
1076 <itemizedlist>
1077 <listitem>
1078 <para>
1079 Target the right distribution in your <filename>debian/changelog</filename>.
1080 For <literal>stable</literal> this is <literal>stable-security</literal> and
1081 for testing this is <literal>testing-security</literal>, and for the previous
1082 stable release, this is <literal>oldstable-security</literal>.  Do not target
1083 <replaceable>distribution</replaceable><literal>-proposed-updates</literal> or
1084 <literal>stable</literal>!
1085 </para>
1086 </listitem>
1087 <listitem>
1088 <para>
1089 The upload should have urgency=high.
1090 </para>
1091 </listitem>
1092 <listitem>
1093 <para>
1094 Make descriptive, meaningful changelog entries.  Others will rely on them to
1095 determine whether a particular bug was fixed.  Always include an external
1096 reference, preferably a CVE identifier, so that it can be cross-referenced.
1097 Include the same information in the changelog for <literal>unstable</literal>,
1098 so that it is clear
1099 that the same bug was fixed, as this is very helpful when verifying that the
1100 bug is fixed in the next stable release.  If a CVE identifier has not yet been
1101 assigned, the security team will request one so that it can be included in the
1102 package and in the advisory.
1103 </para>
1104 </listitem>
1105 <listitem>
1106 <para>
1107 Make sure the version number is proper.  It must be greater than the current
1108 package, but less than package versions in later distributions.  If in doubt,
1109 test it with <literal>dpkg --compare-versions</literal>.  Be careful not to
1110 re-use a version number that you have already used for a previous upload.  For
1111 <literal>testing</literal>, there must be a higher version in
1112 <literal>unstable</literal>.  If there is none yet (for example, if
1113 <literal>testing</literal> and <literal>unstable</literal> have the same
1114 version) you must upload a new version to <literal>unstable</literal> first.
1115 </para>
1116 </listitem>
1117 <listitem>
1118 <para>
1119 Do not make source-only uploads if your package has any binary-all packages (do
1120 not use the <literal>-S</literal> option to
1121 <command>dpkg-buildpackage</command>).  The <command>buildd</command>
1122 infrastructure will not build those.  This point applies to normal package
1123 uploads as well.
1124 </para>
1125 </listitem>
1126 <listitem>
1127 <para>
1128 Unless the upstream source has been uploaded to <literal>security.debian.org
1129 </literal> before (by a previous security update), build the upload with full
1130 upstream source (<literal>dpkg-buildpackage -sa</literal>).  If there has been
1131 a previous upload to <literal>security.debian.org</literal> with the same
1132 upstream version, you may upload without upstream source (<literal>
1133 dpkg-buildpackage -sd</literal>).
1134 </para>
1135 </listitem>
1136 <listitem>
1137 <para>
1138 Be sure to use the exact same <filename>*.orig.tar.gz</filename> as used in the
1139 normal archive, otherwise it is not possible to move the security fix into the
1140 main archives later.
1141 </para>
1142 </listitem>
1143 <listitem>
1144 <para>
1145 Build the package on a clean system which only has packages installed from the
1146 distribution you are building for.  If you do not have such a system yourself,
1147 you can use a debian.org machine (see <xref linkend="server-machines"/> ) or
1148 setup a chroot (see <xref linkend="pbuilder"/> and <xref
1149 linkend="debootstrap"/> ).
1150 </para>
1151 </listitem>
1152 </itemizedlist>
1153 </section>
1154
1155 <section id="bug-security-upload">
1156 <title>Uploading the fixed package</title>
1157 <para>
1158 Do <emphasis role="strong">NOT</emphasis> upload a package to the security
1159 upload queue (<literal>oldstable-security</literal>, <literal>stable-security
1160 </literal>, etc.) without prior authorization from the security team.  If the
1161 package does not exactly meet the team's requirements, it will cause many 
1162 problems and delays in dealing with the unwanted upload.
1163 </para>
1164 <para>
1165 Do <emphasis role="strong">NOT</emphasis> upload your fix to <literal>
1166 proposed-updates</literal> without coordinating with the security team.  
1167 Packages from <literal>security.debian.org</literal> will be copied into
1168 the <literal>proposed-updates</literal> directory automatically.  If a package
1169 with the same or a higher version number is already installed into the archive,
1170 the security update will be rejected by the archive system.  That way, the
1171 stable distribution will end up without a security update for this package
1172 instead.
1173 </para>
1174 <para>
1175 Once you have created and tested the new package and it has been approved by
1176 the security team, it needs to be uploaded so that it can be installed in the
1177 archives.  For security uploads, the place to upload to is
1178 <literal>ftp://security-master.debian.org/pub/SecurityUploadQueue/</literal> .
1179 </para>
1180 <para>
1181 Once an upload to the security queue has been accepted, the package will
1182 automatically be rebuilt for all architectures and stored for verification by
1183 the security team.
1184 </para>
1185 <para>
1186 Uploads which are waiting for acceptance or verification are only accessible by
1187 the security team.  This is necessary since there might be fixes for security
1188 problems that cannot be disclosed yet.
1189 </para>
1190 <para>
1191 If a member of the security team accepts a package, it will be installed on
1192 <literal>security.debian.org</literal> as well as proposed for the proper
1193 <replaceable>distribution</replaceable><literal>-proposed-updates</literal>
1194 on <literal>&ftp-master-host;</literal>.
1195 </para>
1196 </section>
1197
1198 </section>
1199
1200 </section>
1201
1202 <section id="archive-manip">
1203 <title>Moving, removing, renaming, adopting, and orphaning packages</title>
1204 <para>
1205 Some archive manipulation operations are not automated in the Debian upload
1206 process.  These procedures should be manually followed by maintainers.  This
1207 chapter gives guidelines on what to do in these cases.
1208 </para>
1209 <section id="moving-pkgs">
1210 <title>Moving packages</title>
1211 <para>
1212 Sometimes a package will change its section.  For instance, a package from the
1213 `non-free' section might be GPL'd in a later version, in which case the package
1214 should be moved to `main' or `contrib'.<footnote><para> See the <ulink
1215 url="&url-debian-policy;">Debian Policy Manual</ulink> for
1216 guidelines on what section a package belongs in.  </para> </footnote>
1217 </para>
1218 <para>
1219 If you need to change the section for one of your packages, change the package
1220 control information to place the package in the desired section, and re-upload
1221 the package (see the <ulink
1222 url="&url-debian-policy;">Debian Policy Manual</ulink> for
1223 details).  You must ensure that you include the
1224 <filename>.orig.tar.gz</filename> in your upload (even if you are not uploading
1225 a new upstream version), or it will not appear in the new section together with
1226 the rest of the package.  If your new section is valid, it will be moved
1227 automatically.  If it does not, then contact the ftpmasters in order to
1228 understand what happened.
1229 </para>
1230 <para>
1231 If, on the other hand, you need to change the <literal>subsection</literal>
1232 of one of your packages (e.g., ``devel'', ``admin''), the procedure is slightly
1233 different.  Correct the subsection as found in the control file of the package,
1234 and re-upload that.  Also, you'll need to get the override file updated, as
1235 described in <xref linkend="override-file"/> .
1236 </para>
1237 </section>
1238
1239 <section id="removing-pkgs">
1240 <title>Removing packages</title>
1241 <para>
1242 If for some reason you want to completely remove a package (say, if it is an
1243 old compatibility library which is no longer required), you need to file a bug
1244 against <literal>ftp.debian.org</literal> asking that the package be removed;
1245 as all bugs, this bug should normally have normal severity.
1246 The bug title should be in the form <literal>RM: <replaceable>package
1247 </replaceable> <replaceable>[architecture list]</replaceable> -- 
1248 <replaceable>reason</replaceable></literal>, where <replaceable>package</replaceable>
1249 is the package to be removed and <replaceable>reason</replaceable> is a
1250 short summary of the reason for the removal request. 
1251 <replaceable>[architecture list]</replaceable> is optional and only needed
1252 if the removal request only applies to some architectures, not all. Note
1253 that the <command>reportbug</command> will create a title conforming
1254 to these rules when you use it to report a bug against the <literal>
1255 ftp.debian.org</literal> pseudo-package.
1256 </para>
1257
1258 <para>
1259 If you want to remove a package you maintain, you should note this in
1260 the bug title by prepending <literal>ROM</literal> (Request Of Maintainer).
1261 There are several other standard acronyms used in the reasoning for a package
1262 removal, see <ulink url="http://&ftp-master-host;/removals.html"></ulink>
1263 for a complete list. That page also provides a convenient overview of
1264 pending removal requests.
1265 </para>
1266
1267 <para>
1268 Note that removals can only be done for the <literal>unstable
1269 </literal>, <literal>experimental</literal> and <literal>stable
1270 </literal> distribution.  Packages are not removed from 
1271 <literal>testing</literal> directly.  Rather, they will be removed
1272 automatically after the package has been removed from
1273 <literal>unstable</literal> and no package in <literal>testing
1274 </literal> depends on it.
1275 </para>
1276 <para>
1277 There is one exception when an explicit removal request is not necessary: If a
1278 (source or binary) package is an orphan, it will be removed semi-automatically.
1279 For a binary-package, this means if there is no longer any source package
1280 producing this binary package; if the binary package is just no longer produced
1281 on some architectures, a removal request is still necessary.  For a
1282 source-package, this means that all binary packages it refers to have been
1283 taken over by another source package.
1284 </para>
1285 <para>
1286 In your removal request, you have to detail the reasons justifying the request.
1287 This is to avoid unwanted removals and to keep a trace of why a package has
1288 been removed.  For example, you can provide the name of the package that
1289 supersedes the one to be removed.
1290 </para>
1291 <para>
1292 Usually you only ask for the removal of a package maintained by yourself.  If
1293 you want to remove another package, you have to get the approval of its
1294 maintainer. Should the package be orphaned and thus have no maintainer,
1295 you should first discuss the removal request on &email-debian-qa;. If
1296 there is a consensus that the package should be removed, you should
1297 reassign and retitle the <literal>O:</literal> bug filed against the
1298 <literal>wnpp</literal> package instead of filing a new bug as
1299 removal request.
1300 </para>
1301 <para>
1302 Further information relating to these and other package removal related topics
1303 may be found at <ulink url="http://wiki.debian.org/ftpmaster_Removals"></ulink>
1304 and <ulink url="&url-debian-qa;howto-remove.html"></ulink>.
1305 </para>
1306 <para>
1307 If in doubt concerning whether a package is disposable, email
1308 &email-debian-devel; asking for opinions.  Also of interest is
1309 the <command>apt-cache</command> program from the <systemitem
1310 role="package">apt</systemitem> package.  When invoked as <literal>apt-cache
1311 showpkg <replaceable>package</replaceable></literal>, the program will show
1312 details for <replaceable>package</replaceable>, including reverse depends.
1313 Other useful programs include <literal>apt-cache rdepends</literal>,
1314 <command>apt-rdepends</command>, <command>build-rdeps</command> (in the
1315 <systemitem role="package">devscripts</systemitem> package) and
1316 <command>grep-dctrl</command>.  Removal of
1317 orphaned packages is discussed on &email-debian-qa;.
1318 </para>
1319 <para>
1320 Once the package has been removed, the package's bugs should be handled.  They
1321 should either be reassigned to another package in the case where the actual
1322 code has evolved into another package (e.g.  <literal>libfoo12</literal> was
1323 removed because <literal>libfoo13</literal> supersedes it) or closed if the
1324 software is simply no longer part of Debian.
1325 </para>
1326 <section id="s5.9.2.1">
1327 <title>Removing packages from <filename>Incoming</filename></title>
1328 <para>
1329 In the past, it was possible to remove packages from
1330 <filename>incoming</filename>.  However, with the introduction of the new
1331 incoming system, this is no longer possible.  Instead, you have to upload a new
1332 revision of your package with a higher version than the package you want to
1333 replace.  Both versions will be installed in the archive but only the higher
1334 version will actually be available in <literal>unstable</literal> since the
1335 previous version will immediately be replaced by the higher.  However, if you
1336 do proper testing of your packages, the need to replace a package should not
1337 occur too often anyway.
1338 </para>
1339 </section>
1340
1341 </section>
1342
1343 <section id="s5.9.3">
1344 <title>Replacing or renaming packages</title>
1345 <para>
1346 When the upstream maintainers for one of your packages chose to
1347 rename their software (or you made a mistake naming your package),
1348 you should follow a two-step process to rename it. In the first
1349 step, change the <filename>debian/control</filename> file to
1350 reflect the new name and to replace, provide and conflict with the
1351 obsolete package name (see the <ulink url="&url-debian-policy;">
1352 Debian Policy Manual</ulink> for details).  Please note that you
1353 should only add a <literal>Provides</literal> relation if all
1354 packages depending on the obsolete package name continue to work
1355 after the renaming. Once you've uploaded the package and the package
1356 has moved into the archive, file a bug against <literal>
1357 ftp.debian.org</literal> asking to remove the package with the
1358 obsolete name (see <xref linkend="removing-pkgs"/>).  Do not forget
1359 to properly reassign the package's bugs at the same time.
1360 </para>
1361 <para>
1362 At other times, you may make a mistake in constructing your package and wish to
1363 replace it.  The only way to do this is to increase the version number and
1364 upload a new version.  The old version will be expired in the usual manner.
1365 Note that this applies to each part of your package, including the sources: if
1366 you wish to replace the upstream source tarball of your package, you will need
1367 to upload it with a different version.  An easy possibility is to replace
1368 <filename>foo_1.00.orig.tar.gz</filename> with
1369 <filename>foo_1.00+0.orig.tar.gz</filename>.  This restriction gives each file
1370 on the ftp site a unique name, which helps to ensure consistency across the
1371 mirror network.
1372 </para>
1373 </section>
1374
1375 <section id="orphaning">
1376 <title>Orphaning a package</title>
1377 <para>
1378 If you can no longer maintain a package, you need to inform others, and see
1379 that the package is marked as orphaned.  You should set the package maintainer
1380 to <literal>Debian QA Group &orphan-address;</literal> and
1381 submit a bug report against the pseudo package <systemitem
1382 role="package">wnpp</systemitem>.  The bug report should be titled <literal>O:
1383 <replaceable>package</replaceable> -- <replaceable>short
1384 description</replaceable></literal> indicating that the package is now
1385 orphaned.  The severity of the bug should be set to
1386 <literal>normal</literal>; if the package has a priority of standard or
1387 higher, it should be set to important.  If you feel it's necessary, send a copy
1388 to &email-debian-devel; by putting the address in the
1389 X-Debbugs-CC: header of the message (no, don't use CC:, because that way the
1390 message's subject won't indicate the bug number).
1391 </para>
1392 <para>
1393 If you just intend to give the package away, but you can keep maintainership
1394 for the moment, then you should instead submit a bug against <systemitem
1395 role="package">wnpp</systemitem> and title it <literal>RFA:
1396 <replaceable>package</replaceable> -- <replaceable>short
1397 description</replaceable></literal>.  <literal>RFA</literal> stands for
1398 <literal>Request For Adoption</literal>.
1399 </para>
1400 <para>
1401 More information is on the <ulink url="&url-wnpp;">WNPP
1402 web pages</ulink>.
1403 </para>
1404 </section>
1405
1406 <section id="adopting">
1407 <title>Adopting a package</title>
1408 <para>
1409 A list of packages in need of a new maintainer is available in the <ulink
1410 url="&url-wnpp;">Work-Needing and Prospective Packages
1411 list (WNPP)</ulink>.  If you wish to take over maintenance of any of the
1412 packages listed in the WNPP, please take a look at the aforementioned page for
1413 information and procedures.
1414 </para>
1415 <para>
1416 It is not OK to simply take over a package that you feel is neglected — that
1417 would be package hijacking.  You can, of course, contact the current maintainer
1418 and ask them if you may take over the package.  If you have reason to believe a
1419 maintainer has gone AWOL (absent without leave), see <xref linkend="mia-qa"/> .
1420 </para>
1421 <para>
1422 Generally, you may not take over the package without the assent of the current
1423 maintainer.  Even if they ignore you, that is still not grounds to take over a
1424 package.  Complaints about maintainers should be brought up on the developers'
1425 mailing list.  If the discussion doesn't end with a positive conclusion, and
1426 the issue is of a technical nature, consider bringing it to the attention of
1427 the technical committee (see the <ulink
1428 url="&url-tech-ctte;">technical committee web page</ulink> for
1429 more information).
1430 </para>
1431 <para>
1432 If you take over an old package, you probably want to be listed as the
1433 package's official maintainer in the bug system.  This will happen
1434 automatically once you upload a new version with an updated
1435 <literal>Maintainer:</literal> field, although it can take a few hours after
1436 the upload is done.  If you do not expect to upload a new version for a while,
1437 you can use <xref linkend="pkg-tracking-system"/> to get the bug reports.
1438 However, make sure that the old maintainer has no problem with the fact that
1439 they will continue to receive the bugs during that time.
1440 </para>
1441 </section>
1442
1443 </section>
1444
1445 <section id="porting">
1446 <title>Porting and being ported</title>
1447 <para>
1448 Debian supports an ever-increasing number of architectures.  Even if you are
1449 not a porter, and you don't use any architecture but one, it is part of your
1450 duty as a maintainer to be aware of issues of portability.  Therefore, even if
1451 you are not a porter, you should read most of this chapter.
1452 </para>
1453 <para>
1454 Porting is the act of building Debian packages for architectures that are
1455 different from the original architecture of the package maintainer's binary
1456 package.  It is a unique and essential activity.  In fact, porters do most of
1457 the actual compiling of Debian packages.  For instance, when a maintainer
1458 uploads a (portable) source packages with binaries for the <literal>i386
1459 </literal> architecture, it will be built for each of the other architectures,
1460 amounting to &number-of-arches; more builds.
1461 </para>
1462 <section id="kind-to-porters">
1463 <title>Being kind to porters</title>
1464 <para>
1465 Porters have a difficult and unique task, since they are required to deal with
1466 a large volume of packages.  Ideally, every source package should build right
1467 out of the box.  Unfortunately, this is often not the case.  This section
1468 contains a checklist of ``gotchas'' often committed by Debian maintainers —
1469 common problems which often stymie porters, and make their jobs unnecessarily
1470 difficult.
1471 </para>
1472 <para>
1473 The first and most important thing is to respond quickly to bug or issues
1474 raised by porters.  Please treat porters with courtesy, as if they were in fact
1475 co-maintainers of your package (which, in a way, they are).  Please be tolerant
1476 of succinct or even unclear bug reports; do your best to hunt down whatever the
1477 problem is.
1478 </para>
1479 <para>
1480 By far, most of the problems encountered by porters are caused by
1481 <emphasis>packaging bugs</emphasis> in the source packages.  Here is a
1482 checklist of things you should check or be aware of.
1483 </para>
1484 <orderedlist numeration="arabic">
1485 <listitem>
1486 <para>
1487 Make sure that your <literal>Build-Depends</literal> and
1488 <literal>Build-Depends-Indep</literal> settings in
1489 <filename>debian/control</filename> are set properly.  The best way to validate
1490 this is to use the <systemitem role="package">debootstrap</systemitem> package
1491 to create an <literal>unstable</literal> chroot environment (see <xref
1492 linkend="debootstrap"/> ).
1493 Within that chrooted environment, install the <systemitem
1494 role="package">build-essential</systemitem> package and any package
1495 dependencies mentioned in <literal>Build-Depends</literal> and/or
1496 <literal>Build-Depends-Indep</literal>.  Finally, try building your package
1497 within that chrooted environment.  These steps can be automated by the use of
1498 the <command>pbuilder</command> program which is provided by the package of the
1499 same name (see <xref linkend="pbuilder"/> ).
1500 </para>
1501 <para>
1502 If you can't set up a proper chroot, <command>dpkg-depcheck</command> may be of
1503 assistance (see <xref linkend="dpkg-depcheck"/> ).
1504 </para>
1505 <para>
1506 See the <ulink url="&url-debian-policy;">Debian Policy
1507 Manual</ulink> for instructions on setting build dependencies.
1508 </para>
1509 </listitem>
1510 <listitem>
1511 <para>
1512 Don't set architecture to a value other than <literal>all</literal> or 
1513 <literal>any</literal> unless you really mean it.  In too many cases,
1514 maintainers don't follow the instructions in the <ulink 
1515 url="&url-debian-policy;">Debian Policy Manual</ulink>.  Setting your
1516 architecture to only one architecture (such as <literal>i386</literal>
1517 or <literal>amd64</literal>) is usually incorrect.
1518 </para>
1519 </listitem>
1520 <listitem>
1521 <para>
1522 Make sure your source package is correct.  Do <literal>dpkg-source -x
1523 <replaceable>package</replaceable>.dsc</literal> to make sure your source
1524 package unpacks properly.  Then, in there, try building your package from
1525 scratch with <command>dpkg-buildpackage</command>.
1526 </para>
1527 </listitem>
1528 <listitem>
1529 <para>
1530 Make sure you don't ship your source package with the
1531 <filename>debian/files</filename> or <filename>debian/substvars</filename>
1532 files.  They should be removed by the <literal>clean</literal> target of
1533 <filename>debian/rules</filename>.
1534 </para>
1535 </listitem>
1536 <listitem>
1537 <para>
1538 Make sure you don't rely on locally installed or hacked configurations or
1539 programs.  For instance, you should never be calling programs in
1540 <filename>/usr/local/bin</filename> or the like.  Try not to rely on programs
1541 being setup in a special way.  Try building your package on another machine,
1542 even if it's the same architecture.
1543 </para>
1544 </listitem>
1545 <listitem>
1546 <para>
1547 Don't depend on the package you're building being installed already (a sub-case
1548 of the above issue). There are, of course, exceptions to this rule, but be
1549 aware that any case like this needs manual bootstrapping and cannot be done
1550 by automated package builders.
1551 </para>
1552 </listitem>
1553 <listitem>
1554 <para>
1555 Don't rely on the compiler being a certain version, if possible.  If not, then
1556 make sure your build dependencies reflect the restrictions, although you are
1557 probably asking for trouble, since different architectures sometimes
1558 standardize on different compilers.
1559 </para>
1560 </listitem>
1561 <listitem>
1562 <para>
1563 Make sure your debian/rules contains separate <literal>binary-arch</literal>
1564 and <literal>binary-indep</literal> targets, as the Debian Policy Manual 
1565 requires.  Make sure that both targets work independently, that is, that you
1566 can call the target without having called the other before.  To test this,
1567 try to run <command>dpkg-buildpackage -B</command>.
1568 </para>
1569 </listitem>
1570 </orderedlist>
1571 </section>
1572
1573 <section id="porter-guidelines">
1574 <title>Guidelines for porter uploads</title>
1575 <para>
1576 If the package builds out of the box for the architecture to be ported to, you
1577 are in luck and your job is easy.  This section applies to that case; it
1578 describes how to build and upload your binary package so that it is properly
1579 installed into the archive.  If you do have to patch the package in order to
1580 get it to compile for the other architecture, you are actually doing a source
1581 NMU, so consult <xref linkend="nmu-guidelines"/> instead.
1582 </para>
1583 <para>
1584 For a porter upload, no changes are being made to the source.  You do not need
1585 to touch any of the files in the source package.  This includes
1586 <filename>debian/changelog</filename>.
1587 </para>
1588 <para>
1589 The way to invoke <command>dpkg-buildpackage</command> is as
1590 <literal>dpkg-buildpackage -B
1591 -m<replaceable>porter-email</replaceable></literal>.  Of course, set
1592 <replaceable>porter-email</replaceable> to your email address.  This will do a
1593 binary-only build of only the architecture-dependent portions of the package,
1594 using the <literal>binary-arch</literal> target in <filename>debian/rules
1595 </filename>.
1596 </para>
1597 <para>
1598 If you are working on a Debian machine for your porting efforts and you need to
1599 sign your upload locally for its acceptance in the archive, you can run
1600 <command>debsign</command> on your <filename>.changes</filename> file to have
1601 it signed conveniently, or use the remote signing mode of
1602 <command>dpkg-sig</command>.
1603 </para>
1604 <section id="binary-only-nmu">
1605 <title>Recompilation or binary-only NMU</title>
1606 <para>
1607 Sometimes the initial porter upload is problematic because the environment in
1608 which the package was built was not good enough (outdated or obsolete library,
1609 bad compiler, ...).  Then you may just need to recompile it in an updated
1610 environment.  However, you have to bump the version number in this case, so
1611 that the old bad package can be replaced in the Debian archive
1612 (<command>dak</command> refuses to install new packages if they don't have a
1613 version number greater than the currently available one).
1614 </para>
1615 <para>
1616 You have to make sure that your binary-only NMU doesn't render the package
1617 uninstallable.  This could happen when a source package generates
1618 arch-dependent and arch-independent packages that have inter-dependencies
1619 generated using dpkg's substitution variable <literal>$(Source-Version)
1620 </literal>.
1621 </para>
1622 <para>
1623 Despite the required modification of the changelog, these are called
1624 binary-only NMUs — there is no need in this case to trigger all other
1625 architectures to consider themselves out of date or requiring recompilation.
1626 </para>
1627 <para>
1628 Such recompilations require special ``magic'' version numbering, so that the
1629 archive maintenance tools recognize that, even though there is a new Debian
1630 version, there is no corresponding source update.  If you get this wrong, the
1631 archive maintainers will reject your upload (due to lack of corresponding
1632 source code).
1633 </para>
1634 <para>
1635 The ``magic'' for a recompilation-only NMU is triggered by using a suffix
1636 appended to the package version number, following the form <literal>
1637 b<replaceable>number</replaceable></literal>.
1638 For instance, if the latest version you are recompiling against was version
1639 <literal>2.9-3</literal>, your binary-only NMU should carry a version of 
1640 <literal>2.9-3+b1</literal>.  If the latest version was <literal>3.4+b1
1641 </literal> (i.e, a native package with a previous recompilation NMU), your
1642 binary-only NMU should have a version number of <literal>3.4+b2</literal>.
1643 <footnote><para> In the past, such NMUs used the third-level number on the 
1644 Debian part of the revision to denote their recompilation-only status;
1645 however, this syntax was ambiguous with native packages and did not allow
1646 proper ordering of recompile-only NMUs, source NMUs, and security NMUs on
1647 the same package, and has therefore been abandoned in favor of this new syntax.
1648 </para> </footnote>
1649 </para>
1650 <para>
1651 Similar to initial porter uploads, the correct way of invoking
1652 <command>dpkg-buildpackage</command> is <literal>dpkg-buildpackage -B</literal>
1653 to only build the architecture-dependent parts of the package.
1654 </para>
1655 </section>
1656
1657 <section id="source-nmu-when-porter">
1658 <title>When to do a source NMU if you are a porter</title>
1659 <para>
1660 Porters doing a source NMU generally follow the guidelines found in <xref
1661 linkend="nmu"/> , just like non-porters.  However, it is expected that the wait
1662 cycle for a porter's source NMU is smaller than for a non-porter, since porters
1663 have to cope with a large quantity of packages.  Again, the situation varies
1664 depending on the distribution they are uploading to.  It also varies whether
1665 the architecture is a candidate for inclusion into the next stable release; the
1666 release managers decide and announce which architectures are candidates.
1667 </para>
1668 <para>
1669 If you are a porter doing an NMU for <literal>unstable</literal>, the above 
1670 guidelines for porting should be followed, with two variations.  Firstly, the
1671 acceptable waiting period — the time between when the bug is submitted to
1672 the BTS and when it is OK to do an NMU — is seven days for porters working
1673 on the <literal>unstable</literal> distribution.  This period can be shortened
1674 if the problem is critical and imposes hardship on the porting effort, at the
1675 discretion of the porter group.  (Remember, none of this is Policy, just
1676 mutually agreed upon guidelines.) For uploads to <literal>stable</literal> or
1677 <literal>testing </literal>, please coordinate with the appropriate release
1678 team first.
1679 </para>
1680 <para>
1681 Secondly, porters doing source NMUs should make sure that the bug they submit
1682 to the BTS should be of severity <literal>serious</literal> or greater.  This
1683 ensures that a single source package can be used to compile every supported 
1684 Debian architecture by release time.  It is very important that we have one
1685 version of the binary and source package for all architectures in order to
1686 comply with many licenses.
1687 </para>
1688 <para>
1689 Porters should try to avoid patches which simply kludge around bugs in the
1690 current version of the compile environment, kernel, or libc.  Sometimes such
1691 kludges can't be helped.  If you have to kludge around compiler bugs and the
1692 like, make sure you <literal>#ifdef</literal> your work properly; also,
1693 document your kludge so that people know to remove it once the external
1694 problems have been fixed.
1695 </para>
1696 <para>
1697 Porters may also have an unofficial location where they can put the results of
1698 their work during the waiting period.  This helps others running the port have
1699 the benefit of the porter's work, even during the waiting period.  Of course,
1700 such locations have no official blessing or status, so buyer beware.
1701 </para>
1702 </section>
1703
1704 </section>
1705
1706 <section id="porter-automation">
1707 <title>Porting infrastructure and automation</title>
1708 <para>
1709 There is infrastructure and several tools to help automate package porting.
1710 This section contains a brief overview of this automation and porting to these
1711 tools; see the package documentation or references for full information.
1712 </para>
1713 <section id="s5.10.3.1">
1714 <title>Mailing lists and web pages</title>
1715 <para>
1716 Web pages containing the status of each port can be found at <ulink
1717 url="&url-debian-ports;"></ulink>.
1718 </para>
1719 <para>
1720 Each port of Debian has a mailing list.  The list of porting mailing lists can
1721 be found at <ulink url="&url-debian-port-lists;"></ulink>.  These
1722 lists are used to coordinate porters, and to connect the users of a given port
1723 with the porters.
1724 </para>
1725 </section>
1726
1727 <section id="s5.10.3.2">
1728 <title>Porter tools</title>
1729 <para>
1730 Descriptions of several porting tools can be found in <xref
1731 linkend="tools-porting"/> .
1732 </para>
1733 </section>
1734
1735 <section id="wanna-build">
1736 <title><systemitem role="package">wanna-build</systemitem></title>
1737 <para>
1738 The <systemitem role="package">wanna-build</systemitem> system is used as a
1739 distributed, client-server build distribution system.  It is usually used in
1740 conjunction with build daemons running the <systemitem role="package">buildd
1741 </systemitem> program. <literal>Build daemons</literal> are ``slave'' hosts
1742 which contact the central <systemitem role="package"> wanna-build</systemitem>
1743 system to receive a list of packages that need to be built.
1744 </para>
1745 <para>
1746 <systemitem role="package">wanna-build</systemitem> is not yet available as a
1747 package; however, all Debian porting efforts are using it for automated
1748 package building.  The tool used to do the actual package builds, <systemitem
1749 role="package">sbuild</systemitem> is available as a package, see its 
1750 description in <xref linkend="sbuild"/> .  Please note that the packaged
1751 version is not the same as the one used on build daemons, but it is close
1752 enough to reproduce problems. 
1753 </para>
1754 <para>
1755 Most of the data produced by <systemitem role="package">wanna-build
1756 </systemitem> which is generally useful to porters is available on the
1757 web at <ulink url="&url-buildd;"></ulink>.  This data includes nightly
1758 updated statistics, queueing information and logs for build attempts.
1759 </para>
1760 <para>
1761 We are quite proud of this system, since it has so many possible uses.
1762 Independent development groups can use the system for different sub-flavors of
1763 Debian, which may or may not really be of general interest (for instance, a
1764 flavor of Debian built with <command>gcc</command> bounds checking).  It will
1765 also enable Debian to recompile entire distributions quickly.
1766 </para>
1767 <para>
1768 The buildds admins of each arch can be contacted at the mail address
1769 <literal><replaceable>arch</replaceable>@buildd.debian.org</literal>.
1770 </para>
1771 </section>
1772
1773 </section>
1774
1775 <section id="packages-arch-specific">
1776 <title>When your package is <emphasis>not</emphasis> portable</title>
1777 <para>
1778 Some packages still have issues with building and/or working on some of the
1779 architectures supported by Debian, and cannot be ported at all, or not within a
1780 reasonable amount of time.  An example is a package that is SVGA-specific (only
1781 available for <literal>i386</literal> and <literal>amd64</literal>), or uses
1782 other hardware-specific features not supported on all architectures.
1783 </para>
1784 <para>
1785 In order to prevent broken packages from being uploaded to the archive, and
1786 wasting buildd time, you need to do a few things:
1787 </para>
1788 <itemizedlist>
1789 <listitem>
1790 <para>
1791 First, make sure your package <emphasis>does</emphasis> fail to build on
1792 architectures that it cannot support.  There are a few ways to achieve this.
1793 The preferred way is to have a small testsuite during build time that will test
1794 the functionality, and fail if it doesn't work.  This is a good idea anyway, as
1795 this will prevent (some) broken uploads on all architectures, and also will
1796 allow the package to build as soon as the required functionality is available.
1797 </para>
1798 <para>
1799 Additionally, if you believe the list of supported architectures is pretty
1800 constant, you should change <literal>any</literal> to a list of supported
1801 architectures in <filename>debian/control</filename>.  This way, the build will
1802 fail also, and indicate this to a human reader without actually trying.
1803 </para>
1804 </listitem>
1805 <listitem>
1806 <para>
1807 In order to prevent autobuilders from needlessly trying to build your package,
1808 it must be included in <filename>packages-arch-specific</filename>, a list used
1809 by the <command>wanna-build</command> script.  The current version is available
1810 as <ulink
1811 url="&url-cvsweb;srcdep/Packages-arch-specific?cvsroot=dak"></ulink>;
1812 please see the top of the file for whom to contact for changes.
1813 </para>
1814 </listitem>
1815 </itemizedlist>
1816 <para>
1817 Please note that it is insufficient to only add your package to
1818 Packages-arch-specific without making it fail to build on unsupported
1819 architectures: A porter or any other person trying to build your package might
1820 accidently upload it without noticing it doesn't work.  If in the past some
1821 binary packages were uploaded on unsupported architectures, request their
1822 removal by filing a bug against <systemitem
1823 role="package">ftp.debian.org</systemitem>
1824 </para>
1825 </section>
1826
1827 </section>
1828
1829 <section id="nmu">
1830 <title>Non-Maintainer Uploads (NMUs)</title>
1831 <para>
1832 Under certain circumstances it is necessary for someone other than the official
1833 package maintainer to make a release of a package.  This is called a
1834 non-maintainer upload, or NMU.
1835 </para>
1836 <para>
1837 This section handles only source NMUs, i.e.  NMUs which upload a new version of
1838 the package.  For binary-only NMUs by porters or QA members, please see <xref
1839 linkend="binary-only-nmu"/> .  If a buildd builds and uploads a package, that
1840 too is strictly speaking a binary NMU.  See <xref linkend="wanna-build"/> for
1841 some more information.
1842 </para>
1843 <para>
1844 The main reason why NMUs are done is when a developer needs to fix another
1845 developer's package in order to address serious problems or crippling bugs or
1846 when the package maintainer is unable to release a fix in a timely fashion.
1847 </para>
1848 <para>
1849 First and foremost, it is critical that NMU patches to source should be as
1850 non-disruptive as possible.  Do not do housekeeping tasks, do not change the
1851 name of modules or files, do not move directories; in general, do not fix
1852 things which are not broken.  Keep the patch as small as possible.  If things
1853 bother you aesthetically, talk to the Debian maintainer, talk to the upstream
1854 maintainer, or submit a bug.  However, aesthetic changes must
1855 <emphasis>not</emphasis> be made in a non-maintainer upload.
1856 </para>
1857 <para>
1858 And please remember the Hippocratic Oath: Above all, do no harm.  It is better
1859 to leave a package with an open grave bug than applying a non-functional patch,
1860 or one that hides the bug instead of resolving it.
1861 </para>
1862 <section id="nmu-guidelines">
1863 <title>How to do a NMU</title>
1864 <para>
1865 NMUs which fix important, serious or higher severity bugs are encouraged and
1866 accepted.  You should endeavor to reach the current maintainer of the package;
1867 they might be just about to upload a fix for the problem, or have a better
1868 solution.
1869 </para>
1870 <para>
1871 NMUs should be made to assist a package's maintainer in resolving bugs.
1872 Maintainers should be thankful for that help, and NMUers should respect the
1873 decisions of maintainers, and try to personally help the maintainer by their
1874 work.
1875 </para>
1876 <para>
1877 A NMU should follow all conventions, written down in this section.  For an
1878 upload to <literal>testing</literal> or <literal>unstable</literal>, this
1879 order of steps is recommended:
1880 </para>
1881 <itemizedlist>
1882 <listitem>
1883 <para>
1884 Make sure that the package's bugs that the NMU is meant to address are all
1885 filed in the Debian Bug Tracking System (BTS).  If they are not, submit them
1886 immediately.
1887 </para>
1888 </listitem>
1889 <listitem>
1890 <para>
1891 Wait a few days for the response from the maintainer.  If you don't get any
1892 response, you may want to help them by sending the patch that fixes the bug.
1893 Don't forget to tag the bug with the patch keyword.
1894 </para>
1895 </listitem>
1896 <listitem>
1897 <para>
1898 Wait a few more days.  If you still haven't got an answer from the maintainer,
1899 send them a mail announcing your intent to NMU the package.  Prepare an NMU as
1900 described in this section, and test it carefully on your machine (cf.  <xref
1901 linkend="sanitycheck"/> ).  Double check that your patch doesn't have any
1902 unexpected side effects.  Make sure your patch is as small and as
1903 non-disruptive as it can be.
1904 </para>
1905 </listitem>
1906 <listitem>
1907 <para>
1908 Upload your package to incoming in <filename>DELAYED/7-day</filename> (cf.
1909 <xref linkend="delayed-incoming"/> ), send the final patch to the maintainer
1910 via the BTS, and explain to them that they have 7 days to react if they want to
1911 cancel the NMU.
1912 </para>
1913 </listitem>
1914 <listitem>
1915 <para>
1916 Follow what happens, you're responsible for any bug that you introduced with
1917 your NMU.  You should probably use <xref linkend="pkg-tracking-system"/> (PTS)
1918 to stay informed of the state of the package after your NMU.
1919 </para>
1920 </listitem>
1921 </itemizedlist>
1922 <para>
1923 At times, the release manager or an organized group of developers can announce
1924 a certain period of time in which the NMU rules are relaxed.  This usually
1925 involves shortening the period during which one is to wait before uploading the
1926 fixes, and shortening the DELAYED period.  It is important to notice that even
1927 in these so-called bug squashing party times, the NMU'er has to file bugs and
1928 contact the developer first, and act later.  Please see <xref
1929 linkend="qa-bsp"/> for details.
1930 </para>
1931 <para>
1932 For the <literal>testing</literal> distribution, the rules may be changed by
1933 the release managers.  Please take additional care, and acknowledge that the 
1934 usual way for a package to enter <literal>testing</literal> is through 
1935 <literal>unstable</literal>.
1936 </para>
1937 <para>
1938 For the stable distribution, please take extra care.  Of course, the release
1939 managers may also change the rules here.  Please verify before you upload that
1940 all your changes are OK for inclusion into the next stable release by the
1941 release manager.
1942 </para>
1943 <para>
1944 When a security bug is detected, the security team may do an NMU, using their
1945 own rules.  Please refer to <xref linkend="bug-security"/> for more
1946 information.
1947 </para>
1948 <para>
1949 For the differences for Porters NMUs, please see <xref
1950 linkend="source-nmu-when-porter"/> .
1951 </para>
1952 <para>
1953 Of course, it is always possible to agree on special rules with a maintainer
1954 (like the maintainer asking please upload this fix directly for me, and no diff
1955 required).
1956 </para>
1957 </section>
1958
1959 <section id="nmu-version">
1960 <title>NMU version numbering</title>
1961 <para>
1962 Whenever you have made a change to a package, no matter how trivial, the
1963 version number needs to change.  This enables our packing system to function.
1964 </para>
1965 <para>
1966 If you are doing a non-maintainer upload (NMU), you should add a new minor
1967 version number to the <replaceable>debian-revision</replaceable> part of the
1968 version number (the portion after the last hyphen).  This extra minor number
1969 will start at `1'.  For example, consider the package `foo', which is at
1970 version 1.1-3.  In the archive, the source package control file would be
1971 <filename>foo_1.1-3.dsc</filename>.  The upstream version is `1.1' and the
1972 Debian revision is `3'.  The next NMU would add a new minor number `.1' to the
1973 Debian revision; the new source control file would be
1974 <filename>foo_1.1-3.1.dsc</filename>.
1975 </para>
1976 <para>
1977 The Debian revision minor number is needed to avoid stealing one of the package
1978 maintainer's version numbers, which might disrupt their work.  It also has the
1979 benefit of making it visually clear that a package in the archive was not made
1980 by the official maintainer.
1981 </para>
1982 <para>
1983 If there is no <replaceable>debian-revision</replaceable> component in the
1984 version number then one should be created, starting at `0.1' (but in case of a
1985 debian native package still upload it as native package).  If it is absolutely
1986 necessary for someone other than the usual maintainer to make a release based
1987 on a new upstream version then the person making the release should start with
1988 the <replaceable>debian-revision</replaceable> value `0.1'.  The usual
1989 maintainer of a package should start their
1990 <replaceable>debian-revision</replaceable> numbering at `1'.
1991 </para>
1992 <para>
1993 If you upload a package to <literal>testing</literal> or <literal>stable
1994 </literal>, sometimes, you need to fork the version number tree.  For this,
1995 version numbers like 1.1-3sarge0.1 could be used.
1996 </para>
1997 </section>
1998
1999 <section id="nmu-changelog">
2000 <title>Source NMUs must have a new changelog entry</title>
2001 <para>
2002 Anyone who is doing a source NMU must create a changelog entry, describing
2003 which bugs are fixed by the NMU, and generally why the NMU was required and
2004 what it fixed.  The changelog entry will have the email address of the person
2005 who uploaded it in the log entry and the NMU version number in it.
2006 </para>
2007 <para>
2008 By convention, source NMU changelog entries start with the line
2009 </para>
2010 <screen>
2011   * Non-maintainer upload
2012 </screen>
2013 </section>
2014
2015 <section id="nmu-patch">
2016 <title>Source NMUs and the Bug Tracking System</title>
2017 <para>
2018 Maintainers other than the official package maintainer should make as few
2019 changes to the package as possible, and they should always send a patch as a
2020 unified context diff (<literal>diff -u</literal>) detailing their changes to
2021 the Bug Tracking System.
2022 </para>
2023 <para>
2024 What if you are simply recompiling the package?  If you just need to recompile
2025 it for a single architecture, then you may do a binary-only NMU as described in
2026 <xref linkend="binary-only-nmu"/> which doesn't require any patch to be sent.
2027 If you want the package to be recompiled for all architectures, then you do a
2028 source NMU as usual and you will have to send a patch.
2029 </para>
2030 <para>
2031 Bugs fixed by source NMUs used to be tagged fixed instead of closed, but since
2032 version tracking is in place, such bugs are now also closed with the NMU
2033 version.
2034 </para>
2035 <para>
2036 Also, after doing an NMU, you have to send the information to the existing bugs
2037 that are fixed by your NMU, including the unified diff.  Historically, it was
2038 custom to open a new bug and include a patch showing all the changes you have
2039 made.  The normal maintainer will either apply the patch or employ an alternate
2040 method of fixing the problem.  Sometimes bugs are fixed independently upstream,
2041 which is another good reason to back out an NMU's patch.  If the maintainer
2042 decides not to apply the NMU's patch but to release a new version, the
2043 maintainer needs to ensure that the new upstream version really fixes each
2044 problem that was fixed in the non-maintainer release.
2045 </para>
2046 <para>
2047 In addition, the normal maintainer should <emphasis>always</emphasis> retain
2048 the entry in the changelog file documenting the non-maintainer upload -- and of
2049 course, also keep the changes.  If you revert some of the changes, please
2050 reopen the relevant bug reports.
2051 </para>
2052 </section>
2053
2054 <section id="nmu-build">
2055 <title>Building source NMUs</title>
2056 <para>
2057 Source NMU packages are built normally.  Pick a distribution using the same
2058 rules as found in <xref linkend="distribution"/> , follow the other
2059 instructions in <xref linkend="upload"/> .
2060 </para>
2061 <para>
2062 Make sure you do <emphasis>not</emphasis> change the value of the maintainer in
2063 the <filename>debian/control</filename> file.  Your name as given in the NMU
2064 entry of the <filename>debian/changelog</filename> file will be used for
2065 signing the changes file.
2066 </para>
2067 </section>
2068
2069 <section id="ack-nmu">
2070 <title>Acknowledging an NMU</title>
2071 <para>
2072 If one of your packages has been NMU'ed, you have to incorporate the changes in
2073 your copy of the sources.  This is easy, you just have to apply the patch that
2074 has been sent to you.  Once this is done, you have to close the bugs that have
2075 been tagged fixed by the NMU.  The easiest way is to use the
2076 <literal>-v</literal> option of <command>dpkg-buildpackage</command>, as this
2077 allows you to include just all changes since your last maintainer upload.
2078 Alternatively, you can close them manually by sending the required mails to the
2079 BTS or by adding the required <literal>closes: #nnnn</literal> in the changelog
2080 entry of your next upload.
2081 </para>
2082 <para>
2083 In any case, you should not be upset by the NMU.  An NMU is not a personal
2084 attack against the maintainer.  It is a proof that someone cares enough about
2085 the package that they were willing to help you in your work, so you should be
2086 thankful.  You may also want to ask them if they would be interested in helping
2087 you on a more frequent basis as co-maintainer or backup maintainer (see <xref
2088 linkend="collaborative-maint"/> ).
2089 </para>
2090 </section>
2091
2092 <section id="nmu-vs-qa">
2093 <title>NMU vs QA uploads</title>
2094 <para>
2095 Unless you know the maintainer is still active, it is wise to check the package
2096 to see if it has been orphaned.  The current list of orphaned packages which
2097 haven't had their maintainer set correctly is available at <ulink
2098 url="&url-debian-qa-orphaned;"></ulink>.  If you perform an NMU on an
2099 improperly orphaned package, please set the maintainer to <literal>Debian QA Group
2100 &lt;packages@qa.debian.org&gt;</literal>.
2101 </para>
2102 </section>
2103
2104 <section id="nmu-who">
2105 <title>Who can do an NMU</title>
2106 <para>
2107 Only official, registered Debian Developers can do binary or source NMUs.  A
2108 Debian Developer is someone who has their key in the Debian key ring.
2109 Non-developers, however, are encouraged to download the source package and
2110 start hacking on it to fix problems; however, rather than doing an NMU, they
2111 should just submit worthwhile patches to the Bug Tracking System.  Maintainers
2112 almost always appreciate quality patches and bug reports.
2113 </para>
2114 </section>
2115
2116 <section id="nmu-terms">
2117 <title>Terminology</title>
2118 <para>
2119 There are two new terms used throughout this section: ``binary-only NMU'' and
2120 ``source NMU''.  These terms are used with specific technical meaning
2121 throughout this document.  Both binary-only and source NMUs are similar, since
2122 they involve an upload of a package by a developer who is not the official
2123 maintainer of that package.  That is why it's a
2124 <literal>non-maintainer</literal> upload.
2125 </para>
2126 <para>
2127 A source NMU is an upload of a package by a developer who is not the official
2128 maintainer, for the purposes of fixing a bug in the package.  Source NMUs
2129 always involves changes to the source (even if it is just a change to
2130 <filename>debian/changelog</filename>).  This can be either a change to the
2131 upstream source, or a change to the Debian bits of the source.  Note, however,
2132 that source NMUs may also include architecture-dependent packages, as well as
2133 an updated Debian diff.
2134 </para>
2135 <para>
2136 A binary-only NMU is a recompilation and upload of a binary package for a given
2137 architecture.  As such, it is usually part of a porting effort.  A binary-only
2138 NMU is a non-maintainer uploaded binary version of a package, with no source
2139 changes required.  There are many cases where porters must fix problems in the
2140 source in order to get them to compile for their target architecture; that
2141 would be considered a source NMU rather than a binary-only NMU.  As you can
2142 see, we don't distinguish in terminology between porter NMUs and non-porter
2143 NMUs.
2144 </para>
2145 <para>
2146 Both classes of NMUs, source and binary-only, can be lumped under the term
2147 ``NMU''.  However, this often leads to confusion, since most people think
2148 ``source NMU'' when they think ``NMU''.  So it's best to be careful: always use
2149 ``binary NMU'' or ``binNMU'' for binary-only NMUs.
2150 </para>
2151 </section>
2152
2153 </section>
2154
2155 <section id="collaborative-maint">
2156 <title>Collaborative maintenance</title>
2157 <para>
2158 Collaborative maintenance is a term describing the sharing of Debian package
2159 maintenance duties by several people.  This collaboration is almost always a
2160 good idea, since it generally results in higher quality and faster bug fix
2161 turnaround times.  It is strongly recommended that packages with a priority of
2162 <literal>Standard</literal> or which are part of the base set have
2163 co-maintainers.
2164 </para>
2165 <para>
2166 Generally there is a primary maintainer and one or more co-maintainers.  The
2167 primary maintainer is the person whose name is listed in the
2168 <literal>Maintainer</literal> field of the <filename>debian/control</filename>
2169 file.  Co-maintainers are all the other maintainers,
2170 usually listed in the <literal>Uploaders</literal> field of the
2171 <filename>debian/control</filename> file.
2172 </para>
2173 <para>
2174 In its most basic form, the process of adding a new co-maintainer is quite
2175 easy:
2176 </para>
2177 <itemizedlist>
2178 <listitem>
2179 <para>
2180 Setup the co-maintainer with access to the sources you build the package from.
2181 Generally this implies you are using a network-capable version control system,
2182 such as <command>CVS</command> or <command>Subversion</command>.  Alioth (see
2183 <xref linkend="alioth"/> ) provides such tools, amongst others.
2184 </para>
2185 </listitem>
2186 <listitem>
2187 <para>
2188 Add the co-maintainer's correct maintainer name and address to the
2189 <literal>Uploaders</literal> field in the first paragraph of the
2190 <filename>debian/control</filename> file.
2191 </para>
2192 <screen>
2193 Uploaders: John Buzz &lt;jbuzz@debian.org&gt;, Adam Rex &lt;arex@debian.org&gt;
2194 </screen>
2195 </listitem>
2196 <listitem>
2197 <para>
2198 Using the PTS (<xref linkend="pkg-tracking-system"/> ), the co-maintainers
2199 should subscribe themselves to the appropriate source package.
2200 </para>
2201 </listitem>
2202 </itemizedlist>
2203 <para>
2204 Another form of collaborative maintenance is team maintenance, which is
2205 recommended if you maintain several packages with the same group of developers.
2206 In that case, the Maintainer and Uploaders field of each package must be
2207 managed with care.  It is recommended to choose between one of the two
2208 following schemes:
2209 </para>
2210 <orderedlist numeration="arabic">
2211 <listitem>
2212 <para>
2213 Put the team member mainly responsible for the package in the Maintainer field.
2214 In the Uploaders, put the mailing list address, and the team members who care
2215 for the package.
2216 </para>
2217 </listitem>
2218 <listitem>
2219 <para>
2220 Put the mailing list address in the Maintainer field.  In the Uploaders field,
2221 put the team members who care for the package.  In this case, you must make
2222 sure the mailing list accept bug reports without any human interaction (like
2223 moderation for non-subscribers).
2224 </para>
2225 </listitem>
2226 </orderedlist>
2227 <para>
2228 In any case, it is a bad idea to automatically put all team members in the
2229 Uploaders field.  It clutters the Developer's Package Overview listing (see
2230 <xref linkend="ddpo"/> ) with packages one doesn't really care for, and creates
2231 a false sense of good maintenance.
2232 </para>
2233 </section>
2234
2235 <section id="testing">
2236 <title>The testing distribution</title>
2237 <section id="testing-basics">
2238 <title>Basics</title>
2239 <para>
2240 Packages are usually installed into the <literal>testing</literal> distribution
2241 after they have undergone some degree of <literal>testing</literal> in
2242 <literal>unstable</literal>.
2243 </para>
2244 <para>
2245 They must be in sync on all architectures and mustn't have dependencies that
2246 make them uninstallable; they also have to have generally no known
2247 release-critical bugs at the time they're installed into <literal>testing
2248 </literal>.  This way, <literal>testing</literal> should always be close to
2249 being a release candidate.  Please see below for details.
2250 </para>
2251 </section>
2252
2253 <section id="testing-unstable">
2254 <title>Updates from unstable</title>
2255 <para>
2256 The scripts that update the <literal>testing</literal> distribution are run
2257 twice each day, right after the installation of the updated packages; these
2258 scripts are called <literal>britney</literal>.  They generate the
2259 <filename>Packages</filename> files for the <literal>testing</literal>
2260 distribution, but they do so in an intelligent manner; they try to avoid any
2261 inconsistency and to use only non-buggy packages.
2262 </para>
2263 <para>
2264 The inclusion of a package from <literal>unstable</literal> is conditional on
2265 the following:
2266 </para>
2267 <itemizedlist>
2268 <listitem>
2269 <para>
2270 The package must have been available in <literal>unstable</literal> for 2, 5
2271 or 10 days, depending on the urgency (high, medium or low).  Please note that
2272 the urgency is sticky, meaning that the highest urgency uploaded since the
2273 previous <literal>testing</literal> transition is taken into account.  Those
2274 delays may be doubled during a freeze, or <literal>testing</literal> 
2275 transitions may be switched off altogether;
2276 </para>
2277 </listitem>
2278 <listitem>
2279 <para>
2280 It must not have new release-critical bugs (RC bugs affecting the version
2281 available in <literal>unstable</literal>, but not affecting the version in 
2282 <literal>testing</literal>);
2283 </para>
2284 </listitem>
2285 <listitem>
2286 <para>
2287 It must be available on all architectures on which it has previously been built
2288 in <literal>unstable</literal>.  <xref linkend="dak ls"/> may be of interest
2289 to check that information;
2290 </para>
2291 </listitem>
2292 <listitem>
2293 <para>
2294 It must not break any dependency of a package which is already available in
2295 <literal>testing</literal>;
2296 </para>
2297 </listitem>
2298 <listitem>
2299 <para>
2300 The packages on which it depends must either be available in
2301 <literal>testing</literal> or they must be accepted into
2302 <literal>testing</literal> at the same time (and they will be if they fulfill
2303 all the necessary criteria);
2304 </para>
2305 </listitem>
2306 </itemizedlist>
2307 <para>
2308 To find out whether a package is progressing into <literal>testing</literal>
2309 or not, see the <literal>testing</literal> script output on the <ulink
2310 url="&url-testing-maint;">web page of the testing
2311 distribution</ulink>, or use the program <command>grep-excuses</command> which
2312 is in the <systemitem role="package">devscripts</systemitem> package.  This
2313 utility can easily be used in a <citerefentry>
2314 <refentrytitle>crontab</refentrytitle> <manvolnum>5</manvolnum> </citerefentry>
2315 to keep yourself informed of the progression of your packages into
2316 <literal>testing</literal>.
2317 </para>
2318 <para>
2319 The <filename>update_excuses</filename> file does not always give the precise
2320 reason why the package is refused; you may have to find it on your own by
2321 looking for what would break with the inclusion of the package.  The <ulink
2322 url="&url-testing-maint;">testing web page</ulink> gives some
2323 more information about the usual problems which may be causing such troubles.
2324 </para>
2325 <para>
2326 Sometimes, some packages never enter <literal>testing</literal> because the
2327 set of inter-relationship is too complicated and cannot be sorted out by the
2328 scripts.  See below for details.
2329 </para>
2330 <para>
2331 Some further dependency analysis is shown on <ulink
2332 url="http://release.debian.org/migration/"></ulink> — but be warned, this page also
2333 shows build dependencies which are not considered by britney.
2334 </para>
2335 <section id="outdated">
2336 <title>out-of-date</title>
2337 <para>
2338 <!-- FIXME: better rename this file than document rampant professionalism? -->
2339 For the <literal>testing</literal> migration script, outdated means: There are
2340 different versions in <literal>unstable</literal> for the release architectures
2341 (except for the architectures in fuckedarches; fuckedarches is a list of
2342 architectures that don't keep up (in <filename>update_out.py</filename>), but
2343 currently, it's empty).  outdated has nothing whatsoever to do with the 
2344 architectures this package has in <literal>testing</literal>.
2345 </para>
2346 <para>
2347 Consider this example:
2348 </para>
2349 <informaltable pgwide="1">
2350 <tgroup cols="3">
2351 <thead>
2352 <row>
2353 <entry></entry>
2354 <entry>alpha</entry>
2355 <entry>arm</entry>
2356 </row>
2357 </thead>
2358 <tbody>
2359 <row>
2360 <entry>testing</entry>
2361 <entry>1</entry>
2362 <entry>-</entry>
2363 </row>
2364 <row>
2365 <entry>unstable</entry>
2366 <entry>1</entry>
2367 <entry>2</entry>
2368 </row>
2369 </tbody>
2370 </tgroup>
2371 </informaltable>
2372 <para>
2373 The package is out of date on alpha in <literal>unstable</literal>, and will
2374 not go to <literal>testing</literal>. Removing the package would not help at all, the
2375 package is still out of date on <literal>alpha</literal>, and will not 
2376 propagate to testing.
2377 </para>
2378 <para>
2379 However, if ftp-master removes a package in <literal>unstable</literal> (here
2380 on <literal>arm</literal>):
2381 </para>
2382 <informaltable pgwide="1">
2383 <tgroup cols="4">
2384 <thead>
2385 <row>
2386 <entry></entry>
2387 <entry>alpha</entry>
2388 <entry>arm</entry>
2389 <entry>hurd-i386</entry>
2390 </row>
2391 </thead>
2392 <tbody>
2393 <row>
2394 <entry>testing</entry>
2395 <entry>1</entry>
2396 <entry>1</entry>
2397 <entry>-</entry>
2398 </row>
2399 <row>
2400 <entry>unstable</entry>
2401 <entry>2</entry>
2402 <entry>-</entry>
2403 <entry>1</entry>
2404 </row>
2405 </tbody>
2406 </tgroup>
2407 </informaltable>
2408 <para>
2409 In this case, the package is up to date on all release architectures in
2410 <literal>unstable</literal> (and the extra <literal>hurd-i386</literal> 
2411 doesn't matter, as it's not a release architecture).
2412 </para>
2413 <para>
2414 Sometimes, the question is raised if it is possible to allow packages in that
2415 are not yet built on all architectures: No.  Just plainly no.  (Except if you
2416 maintain glibc or so.)
2417 </para>
2418 </section>
2419
2420 <section id="removals">
2421 <title>Removals from testing</title>
2422 <para>
2423 Sometimes, a package is removed to allow another package in: This happens only
2424 to allow <emphasis>another</emphasis> package to go in if it's ready in every
2425 other sense.  Suppose e.g.  that <literal>a</literal> cannot be installed
2426 with the new version of <literal>b</literal>; then <literal>a</literal> may
2427 be removed to allow <literal>b</literal> in.
2428 </para>
2429 <para>
2430 Of course, there is another reason to remove a package from <literal>testing
2431 </literal>: It's just too buggy (and having a single RC-bug is enough to be
2432 in this state).
2433 </para>
2434 <para>
2435 Furthermore, if a package has been removed from <literal>unstable</literal>,
2436 and no package in <literal>testing</literal> depends on it any more, then it
2437 will automatically be removed.
2438 </para>
2439 </section>
2440
2441 <section id="circular">
2442 <title>circular dependencies</title>
2443 <para>
2444 A situation which is not handled very well by britney is if package
2445 <literal>a</literal> depends on the new version of package
2446 <literal>b</literal>, and vice versa.
2447 </para>
2448 <para>
2449 An example of this is:
2450 </para>
2451 <informaltable pgwide="1">
2452 <tgroup cols="3">
2453 <thead>
2454 <row>
2455 <entry></entry>
2456 <entry>testing</entry>
2457 <entry>unstable</entry>
2458 </row>
2459 </thead>
2460 <tbody>
2461 <row>
2462 <entry>a</entry>
2463 <entry>1; depends: b=1</entry>
2464 <entry>2; depends: b=2</entry>
2465 </row>
2466 <row>
2467 <entry>b</entry>
2468 <entry>1; depends: a=1</entry>
2469 <entry>2; depends: a=2</entry>
2470 </row>
2471 </tbody>
2472 </tgroup>
2473 </informaltable>
2474 <para>
2475 Neither package <literal>a</literal> nor package <literal>b</literal> is
2476 considered for update.
2477 </para>
2478 <para>
2479 Currently, this requires some manual hinting from the release team.  Please
2480 contact them by sending mail to &email-debian-release; if this
2481 happens to one of your packages.
2482 </para>
2483 </section>
2484
2485 <section id="s5.13.2.4">
2486 <title>influence of package in testing</title>
2487 <para>
2488 Generally, there is nothing that the status of a package in <literal>testing
2489 </literal> means for transition of the next version from <literal>unstable
2490 </literal> to <literal>testing</literal>, with two exceptions:
2491 If the RC-bugginess of the package goes down, it may go in even if it is still
2492 RC-buggy.  The second exception is if the version of the package in <literal>
2493 testing</literal> is out of sync on the different arches: Then any arch might
2494 just upgrade to the version of the source package; however, this can happen
2495 only if the package was previously forced through, the arch is in fuckedarches,
2496 or there was no binary package of that arch present in <literal>unstable
2497 </literal> at all during the <literal>testing</literal> migration.
2498 </para>
2499 <para>
2500 In summary this means: The only influence that a package being in <literal>
2501 testing</literal> has on a new version of the same package is that the new
2502 version might go in easier.
2503 </para>
2504 </section>
2505
2506 <section id="details">
2507 <title>details</title>
2508 <para>
2509 If you are interested in details, this is how britney works:
2510 </para>
2511 <para>
2512 The packages are looked at to determine whether they are valid candidates.
2513 This gives the update excuses.  The most common reasons why a package is not
2514 considered are too young, RC-bugginess, and out of date on some arches.  For
2515 this part of britney, the release managers have hammers of various sizes to
2516 force britney to consider a package.  (Also, the base freeze is coded in that
2517 part of britney.) (There is a similar thing for binary-only updates, but this
2518 is not described here.  If you're interested in that, please peruse the code.)
2519 </para>
2520 <para>
2521 Now, the more complex part happens: Britney tries to update <literal>testing
2522 </literal> with the valid candidates. For that, britney tries to add each
2523 valid candidate to the testing distribution. If the number of uninstallable
2524 packages in <literal>testing</literal> doesn't increase, the package is
2525 accepted. From that point on, the accepted package is considered to be part
2526 of <literal>testing</literal>, such that all subsequent installability
2527 tests include this package.  Hints from the release team are processed
2528 before or after this main run, depending on the exact type.
2529 </para>
2530 <para>
2531 If you want to see more details, you can look it up on
2532 <filename>merkel:/org/&ftp-debian-org;/testing/update_out/</filename> (or
2533 in <filename>merkel:~aba/testing/update_out</filename> to see a setup with
2534 a smaller packages file).  Via web, it's at <ulink
2535 url="http://&ftp-master-host;/testing/update_out_code/"></ulink>
2536 </para>
2537 <para>
2538 The hints are available via <ulink
2539 url="http://&ftp-master-host;/testing/hints/"></ulink>.
2540 </para>
2541 </section>
2542
2543 </section>
2544
2545 <section id="t-p-u">
2546 <title>Direct updates to testing</title>
2547 <para>
2548 The <literal>testing</literal> distribution is fed with packages from 
2549 <literal>unstable</literal> according to the rules explained above.  However,
2550 in some cases, it is necessary to upload packages built only for <literal>
2551 testing</literal>.  For that, you may want to upload to <literal>
2552 testing-proposed-updates</literal>.
2553 </para>
2554 <para>
2555 Keep in mind that packages uploaded there are not automatically processed, they
2556 have to go through the hands of the release manager.  So you'd better have a
2557 good reason to upload there.  In order to know what a good reason is in the
2558 release managers' eyes, you should read the instructions that they regularly
2559 give on &email-debian-devel-announce;.
2560 </para>
2561 <para>
2562 You should not upload to <literal>testing-proposed-updates</literal> when you
2563 can update your packages through <literal>unstable</literal>.  If you can't
2564 (for example because you have a newer development version in <literal>unstable
2565 </literal>), you may use this facility, but it is recommended that you ask for
2566 authorization from the release manager first.  Even if a package is frozen,
2567 updates through <literal>unstable</literal> are possible, if the upload via
2568 <literal>unstable</literal> does not pull in any new dependencies.
2569 </para>
2570 <para>
2571 Version numbers are usually selected by adding the codename of the 
2572 <literal>testing</literal> distribution and a running number, like 
2573 <literal>1.2sarge1</literal> for the first upload through
2574 <literal>testing-proposed-updates</literal> of package version 
2575 <literal>1.2</literal>.
2576 </para>
2577 <para>
2578 Please make sure you didn't miss any of these items in your upload:
2579 </para>
2580 <itemizedlist>
2581 <listitem>
2582 <para>
2583 Make sure that your package really needs to go through
2584 <literal>testing-proposed-updates</literal>, and can't go through <literal>
2585 unstable</literal>;
2586 </para>
2587 </listitem>
2588 <listitem>
2589 <para>
2590 Make sure that you included only the minimal amount of changes;
2591 </para>
2592 </listitem>
2593 <listitem>
2594 <para>
2595 Make sure that you included an appropriate explanation in the changelog;
2596 </para>
2597 </listitem>
2598 <listitem>
2599 <para>
2600 Make sure that you've written <literal>testing</literal> or
2601 <literal>testing-proposed-updates</literal> into your target distribution;
2602 </para>
2603 </listitem>
2604 <listitem>
2605 <para>
2606 Make sure that you've built and tested your package in
2607 <literal>testing</literal>, not in <literal>unstable</literal>;
2608 </para>
2609 </listitem>
2610 <listitem>
2611 <para>
2612 Make sure that your version number is higher than the version in
2613 <literal>testing</literal> and <literal>testing-proposed-updates</literal>,
2614 and lower than in <literal>unstable</literal>;
2615 </para>
2616 </listitem>
2617 <listitem>
2618 <para>
2619 After uploading and successful build on all platforms, contact the release team
2620 at &email-debian-release; and ask them to approve your upload.
2621 </para>
2622 </listitem>
2623 </itemizedlist>
2624 </section>
2625
2626 <section id="faq">
2627 <title>Frequently asked questions</title>
2628 <section id="rc">
2629 <title>What are release-critical bugs, and how do they get counted?</title>
2630 <para>
2631 All bugs of some higher severities are by default considered release-critical;
2632 currently, these are <literal>critical</literal>, <literal>grave</literal> and
2633 <literal>serious</literal> bugs.
2634 </para>
2635 <para>
2636 Such bugs are presumed to have an impact on the chances that the package will
2637 be released with the <literal>stable</literal> release of Debian: in general,
2638 if a package has open release-critical bugs filed on it, it won't get into 
2639 <literal>testing</literal>, and consequently won't be released in <literal>
2640 stable</literal>.
2641 </para>
2642 <para>
2643 The <literal>unstable</literal> bug count are all release-critical bugs which
2644 are marked to apply to <replaceable>package</replaceable>/<replaceable>version
2645 </replaceable> combinations that are available in unstable for a release
2646 architecture. The <literal>testing</literal> bug count is defined analogously.
2647 </para>
2648 </section>
2649
2650 <section id="s5.13.4.2">
2651 <title>How could installing a package into <literal>testing</literal> possibly
2652 break other packages?</title>
2653 <para>
2654 The structure of the distribution archives is such that they can only contain
2655 one version of a package; a package is defined by its name.  So when the source
2656 package <literal>acmefoo</literal> is installed into <literal>testing</literal>,
2657 along with its binary packages <literal>acme-foo-bin</literal>, <literal>
2658 acme-bar-bin</literal>, <literal>libacme-foo1</literal> and <literal>
2659 libacme-foo-dev</literal>, the old version is removed.
2660 </para>
2661 <para>
2662 However, the old version may have provided a binary package with an old soname
2663 of a library, such as <literal>libacme-foo0</literal>.  Removing the old 
2664 <literal>acmefoo</literal> will remove <literal>libacme-foo0</literal>, which
2665 will break any packages which depend on it.
2666 </para>
2667 <para>
2668 Evidently, this mainly affects packages which provide changing sets of binary
2669 packages in different versions (in turn, mainly libraries).  However, it will
2670 also affect packages upon which versioned dependencies have been declared of
2671 the ==, &lt;=, or &lt;&lt; varieties.
2672 </para>
2673 <para>
2674 When the set of binary packages provided by a source package change in this
2675 way, all the packages that depended on the old binaries will have to be updated
2676 to depend on the new binaries instead.  Because installing such a source
2677 package into <literal>testing</literal> breaks all the packages that depended on
2678 it in <literal>testing</literal>,
2679 some care has to be taken now: all the depending packages must be updated and
2680 ready to be installed themselves so that they won't be broken, and, once
2681 everything is ready, manual intervention by the release manager or an assistant
2682 is normally required.
2683 </para>
2684 <para>
2685 If you are having problems with complicated groups of packages like this,
2686 contact &email-debian-devel; or &email-debian-release; for help.
2687 </para>
2688 </section>
2689
2690 </section>
2691
2692 </section>
2693
2694 </chapter>
2695