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