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