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