/[ddp]/manuals/trunk/developers-reference/pkgs.dbk
ViewVC logotype

Contents of /manuals/trunk/developers-reference/pkgs.dbk

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.5