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