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