chiark / gitweb /
small nitpicks
[developers-reference.git] / developers-reference.sgml
1 <!DOCTYPE debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN" [
2   <!-- include version information so we don't have to hard code it
3        within the document -->
4   <!ENTITY % versiondata SYSTEM "version.ent"> %versiondata;
5   <!-- common, language independent entities -->
6   <!ENTITY % commondata  SYSTEM "common.ent" > %commondata;
7
8   <!-- CVS revision of this document -->
9   <!ENTITY cvs-rev "$Revision: 1.250 $">
10
11   <!-- if you are translating this document, please notate the CVS
12        revision of the original developer's reference in cvs-en-rev -->
13   <!-- <!ENTITY cvs-en-rev "X.YZW"> -->
14
15   <!-- how to mark a section that needs more work -->
16   <!ENTITY FIXME "<em>FIXME:</em>&nbsp;">
17
18 ]>
19 <debiandoc>
20   <book>
21       <title>Debian Developer's Reference
22
23       <author>Developer's Reference Team &email-devel-ref;
24       <author>Andreas Barth
25       <author>Adam Di Carlo
26       <author>Raphaël Hertzog
27       <author>Christian Schwarz
28       <author>Ian Jackson
29       <version>ver. &version;, &date-en;
30
31       <copyright>
32         <copyrightsummary>
33 copyright &copy; 2004 Andreas Barth</copyrightsummary>
34         <copyrightsummary>
35 copyright &copy; 1998&mdash;2003 Adam Di Carlo</copyrightsummary>
36         <copyrightsummary>
37 copyright &copy; 2002&mdash;2003 Raphaël Hertzog</copyrightsummary>
38         <copyrightsummary>
39 copyright &copy; 1997, 1998 Christian Schwarz</copyrightsummary>
40         <p>
41 This manual is free software; you may redistribute it and/or modify it
42 under the terms of the GNU General Public License as published by the
43 Free Software Foundation; either version 2, or (at your option) any
44 later version.
45         <p>
46 This is distributed in the hope that it will be useful, but
47 <em>without any warranty</em>; without even the implied warranty of
48 merchantability or fitness for a particular purpose.  See the GNU
49 General Public License for more details.
50         <p>
51 A copy of the GNU General Public License is available as &file-GPL; in
52 the &debian-formal; distribution or on the World Wide Web at <url
53 id="&url-gpl;" name="the GNU web site">.  You can also obtain it by
54 writing to the &fsf-addr;.
55
56     <toc detail="sect1">
57
58     <chapt id="scope">Scope of This Document
59       <p>
60 The purpose of this document is to provide an overview of the
61 recommended procedures and the available resources for Debian
62 developers.
63
64 <!-- FIXME: rewrites -->
65       <p>
66 The procedures discussed within include how to become a maintainer
67 (<ref id="new-maintainer">); how to create new packages
68 (<ref id="newpackage">) and how to upload packages (<ref id="upload">);
69 how to handle bug reports (<ref id="bug-handling">); how to move,
70 remove, or orphan packages (<ref id="archive-manip">); how to port
71 packages (<ref id="porting">); and how and when to do interim
72 releases of other maintainers' packages (<ref id="nmu">).
73       <p>
74 The resources discussed in this reference include the mailing lists
75 (<ref id="mailing-lists">) and servers (<ref id="server-machines">); a
76 discussion of the structure of the Debian archive (<ref
77 id="archive">); explanation of the different servers which accept
78 package uploads (<ref id="upload-ftp-master">); and a discussion of
79 resources which can help maintainers with the quality of their
80 packages (<ref id="tools">).
81       <p>
82 It should be clear that this reference does not discuss the technical
83 details of Debian packages nor how to generate them.
84 Nor does this reference detail the standards to which Debian software
85 must comply.  All of such information can be found in the <url
86 id="&url-debian-policy;" name="Debian Policy Manual">.
87       <p>
88 Furthermore, this document is <em>not an expression of formal
89 policy</em>.  It contains documentation for the Debian system and
90 generally agreed-upon best practices.  Thus, it is not what is called a
91 ``normative'' document.
92
93
94     <chapt id="new-maintainer">Applying to Become a Maintainer
95         
96       <sect id="getting-started">Getting started
97         <p>
98 So, you've read all the documentation, you've gone through the <url
99 id="&url-newmaint-guide;" name="Debian New Maintainers' Guide">,
100 understand what everything in the <package>hello</package> example
101 package is for, and you're about to Debianize your favorite piece of
102 software.  How do you actually become a Debian developer so that your
103 work can be incorporated into the Project?
104         <p>
105 Firstly, subscribe to &email-debian-devel; if you haven't already.
106 Send the word <tt>subscribe</tt> in the <em>Subject</em> of an email
107 to &email-debian-devel-req;.  In case of problems, contact the list
108 administrator at &email-listmaster;.  More information on available
109 mailing lists can be found in <ref id="mailing-lists">.
110 &email-debian-devel-announce; is another list which is mandatory
111 for anyone who wishes to follow Debian's development.
112         <p>
113 You should subscribe and lurk (that is, read without posting) for a
114 bit before doing any coding, and you should post about your intentions
115 to work on something to avoid duplicated effort.
116         <p>
117 Another good list to subscribe to is &email-debian-mentors;.  See <ref
118 id="mentors"> for details.  The IRC channel <tt>#debian</tt> can also be
119 helpful; see <ref id="irc-channels">.
120
121         <p>
122 When you know how you want to contribute to &debian-formal;, you
123 should get in contact with existing Debian maintainers who are working
124 on similar tasks.  That way, you can learn from experienced developers.
125 For example, if you are interested in packaging existing software for
126 Debian, you should try to get a sponsor.  A sponsor will work together
127 with you on your package and upload it to the Debian archive once they
128 are happy with the packaging work you have done.  You can find a sponsor
129 by mailing the &email-debian-mentors; mailing list, describing your
130 package and yourself and asking for a sponsor (see <ref id="sponsoring">
131 and <url id="&url-mentors;"> for more information on sponsoring).
132 On the other hand, if you are
133 interested in porting Debian to alternative architectures or kernels
134 you can subscribe to port specific mailing lists and ask there how to
135 get started.  Finally, if you are interested in documentation or
136 Quality Assurance (QA) work you can join maintainers already working on
137 these tasks and submit patches and improvements.
138  
139
140       <sect id="registering">Registering as a Debian developer
141         <p>
142 Before you decide to register with &debian-formal;, you will need to
143 read all the information available at the <url id="&url-newmaint;"
144 name="New Maintainer's Corner">.  It describes exactly the
145 preparations you have to do before you can register to become a Debian
146 developer.
147
148 For example, before you apply, you have to read the <url
149 id="&url-social-contract;" name="Debian Social Contract">.
150 Registering as a developer means that you agree with and pledge to
151 uphold the Debian Social Contract; it is very important that
152 maintainers are in accord with the essential ideas behind
153 &debian-formal;.  Reading the <url id="&url-gnu-manifesto;" name="GNU
154 Manifesto"> would also be a good idea.
155         <p>
156 The process of registering as a developer is a process of verifying
157 your identity and intentions, and checking your technical skills.  As
158 the number of people working on &debian-formal; has grown to over
159 &number-of-maintainers; people and our systems are used in several
160 very important places, we have to be careful about being compromised.
161 Therefore, we need to verify new maintainers before we can give them
162 accounts on our servers and let them upload packages.
163         <p>
164 Before you actually register you should have shown that you can do
165 competent work and will be a good contributor.  You can show this by
166 submitting patches through the Bug Tracking System or having a package
167 sponsored by an existing maintainer for a while.  Also, we expect that
168 contributors are interested in the whole project and not just in
169 maintaining their own packages.  If you can help other maintainers by
170 providing further information on a bug or even a patch, then do so!
171         <p>
172 Registration requires that you are familiar with Debian's philosophy
173 and technical documentation.  Furthermore, you need a GnuPG key which
174 has been signed by an existing Debian maintainer.  If your GnuPG key
175 is not signed yet, you should try to meet a Debian maintainer in
176 person to get your key signed.  There's a <url id="&url-gpg-coord;"
177 name="GnuPG Key Signing Coordination page"> which should help you find
178 a maintainer close to you. (If you cannot find a Debian maintainer
179 close to you, there's an alternative way to pass the ID check.  You
180 can send in a photo ID signed with your GnuPG key.  Having your GnuPG
181 key signed is the preferred way, however.  See the
182 <url id="&url-newmaint-id;" name="identification page"> for more
183 information about these two options.)
184
185         <p>
186 If you do not have an OpenPGP key yet, generate one. Every developer
187 needs a OpenPGP key in order to sign and verify package uploads. You
188 should read the manual for the software you are using, since it has
189 much important information which is critical to its security.  Many
190 more security failures are due to human error than to software failure
191 or high-powered spy techniques.  See <ref id="key-maint"> for more
192 information on maintaining your public key.
193         <p>
194 Debian uses the <prgn>GNU Privacy Guard</prgn> (package
195 <package>gnupg</package> version 1 or better) as its baseline standard.
196 You can use some other implementation of OpenPGP as well.  Note that
197 OpenPGP is an open standard based on <url id="&url-rfc2440;" name="RFC
198 2440">.
199         <p>
200 <!-- FIXME: DSS is not exactly equivalent to DSA, is it? -->
201 The recommended public key algorithm for use in Debian development
202 work is DSA (sometimes called ``DSS'' or ``DH/ElGamal'').
203 Other key types may be used, however.  Your key length must be at least 1024
204 bits; there is no reason to use a smaller key, and doing so would be
205 much less secure.  Your key must be signed with at least your own user
206 ID; this prevents user ID tampering.  <prgn>gpg</prgn> does this
207 automatically.
208         <p>
209 If your public key isn't on public key servers such as &pgp-keyserv;,
210 please read the documentation available locally in &file-keyservs;.
211 That document contains instructions on how to put your key on the
212 public key servers.  The New Maintainer Group will put your public key
213 on the servers if it isn't already there.
214         <p>
215 Some countries restrict the use of cryptographic software by their
216 citizens.  This need not impede one's activities as a Debian package
217 maintainer however, as it may be perfectly legal to use cryptographic
218 products for authentication, rather than encryption purposes.
219 &debian-formal; does not require the use of cryptography <em>qua</em>
220 cryptography in any manner.  If you live in a country where use of
221 cryptography even for authentication is forbidden
222 then please contact us so we can make special arrangements.
223         <p>
224 To apply as a new maintainer, you need an existing Debian maintainer
225 to verify your application (an <em>advocate</em>).  After you have
226 contributed to Debian for a while, and you want to apply to become a
227 registered developer, an existing developer with whom you
228 have worked over the past months has to express their belief that you
229 can contribute to Debian successfully.
230         <p>
231 When you have found an advocate, have your GnuPG key signed and have
232 already contributed to Debian for a while, you're ready to apply.
233 You can simply register on our <url id="&url-newmaint-apply;"
234 name="application page">.  After you have signed up, your advocate
235 has to confirm your application.  When your advocate has completed
236 this step you will be assigned an Application Manager who will
237 go with you through the necessary steps of the New Maintainer process.
238 You can always check your status on the <url id="&url-newmaint-db;"
239 name="applications status board">.
240         <p>
241 For more details, please consult <url id="&url-newmaint;" name="New
242 Maintainer's Corner"> at the Debian web site.  Make sure that you
243 are familiar with the necessary steps of the New Maintainer process
244 before actually applying.  If you are well prepared, you can save
245 a lot of time later on.
246
247
248       <sect id="mentors">Debian mentors and sponsors
249         <p>
250 The mailing list &email-debian-mentors; has been set up for novice
251 maintainers who seek help with initial packaging and other
252 developer-related issues.  Every new developer is invited to subscribe
253 to that list (see <ref id="mailing-lists"> for details).
254         <p>
255 Those who prefer one-on-one help (e.g., via private email) should also
256 post to that list and an experienced developer will volunteer to help.
257         <p>
258 In addition, if you have some packages ready for inclusion in Debian,
259 but are waiting for your new maintainer application to go through, you
260 might be able find a sponsor to upload your package for you.  Sponsors
261 are people who are official Debian maintainers, and who are willing to
262 criticize and upload your packages for you.  Those who are seeking a
263 sponsor can request one at <url id="&url-sponsors;">. Please read the
264 inofficial debian-mentors FAQ at <url id="&url-mentors;"> first.
265         <p>
266 If you wish to be a mentor and/or sponsor, more information is
267 available in <ref id="newmaint">.
268
269
270     <chapt id="developer-duties">Debian Developer's Duties
271
272       <sect id="user-maint">Maintaining your Debian information
273         <p>
274 There's a LDAP database containing information about Debian developers at
275 <url id="&url-debian-db;">. You should enter your information there and
276 update it as it changes. Most notably, make sure that the address where your
277 debian.org email gets forwarded to is always up to date, as well as the
278 address where you get your debian-private subscription if you choose to
279 subscribe there.
280         <p>
281 For more information about the database, please see <ref id="devel-db">.
282
283
284
285       <sect id="key-maint">Maintaining your public key
286         <p>
287 Be very careful with your private keys.  Do not place them on any
288 public servers or multiuser machines, such as the Debian servers
289 (see <ref id="server-machines">).  Back your keys up; keep a copy offline.
290 Read the documentation that comes with your software; read the <url
291 id="&url-pgp-faq;" name="PGP FAQ">.
292         <p>
293 You need to ensure not only that your key is secure against being stolen,
294 but also that it is secure against being lost. Generate and make a copy
295 (best also in paper form) of your revocation certificate; this is needed if
296 your key is lost.
297         <p>
298 If you add signatures to your public key, or add user identities, you
299 can update the Debian key ring by sending your key to the key server at
300 <tt>&keyserver-host;</tt>.
301        <p>
302 If you need to add a completely new key or remove an old key, you need
303 to get the new key signed by another developer. After this, a mail
304 signed by another developer listing your account name, the keyids
305 of the old and of the new key and the reason should be send to
306 &email-debian-keyring;. If the old key is compromised or invalid, you
307 also have to add the revocation certificate. If there is no real
308 reason for a new key, the Keyring Maintainers will only accept it if
309 it's more secure and connected to the old key.
310        <p>
311 The same key extraction routines discussed in <ref id="registering">
312 apply. 
313         <p>
314 You can find a more in-depth discussion of Debian key maintenance in
315 the documentation of the <package>debian-keyring</package> package.
316
317
318        <sect id="voting">Voting
319         <p>
320 Even though Debian isn't really a democracy, we use a democratic
321 process to elect our leaders and to approve general resolutions.
322 These procedures are defined by the
323 <url id="&url-constitution;" name="Debian Constitution">.
324         <p>
325 Other than the yearly leader election, votes are not routinely held, and
326 they are not undertaken lightly. Each proposal is first discussed on
327 the &email-debian-vote; mailing list and it requires several endorsements
328 before the project secretary starts the voting procedure.
329         <p>
330 You don't have to track the pre-vote discussions, as the secretary will
331 issue several calls for votes on &email-debian-devel-announce; (and all
332 developers are expected to be subscribed to that list). Democracy doesn't
333 work well if people don't take part in the vote, which is why we encourage
334 all developers to vote. Voting is conducted via GPG-signed/encrypted emails
335 messages.
336         <p>
337 The list of all the proposals (past and current) is available on the
338 <url id="&url-vote;" name="Debian Voting Information"> page, along with
339 information on how to make, second and vote on proposals.
340
341
342       <sect id="inform-vacation">Going on vacation gracefully
343         <p>
344 It is common for developers to have periods of absence, whether those are
345 planned vacations or simply being buried in other work. The important thing
346 to notice is that the other developers need to know that you're on vacation
347 so that they can do whatever is needed if a problem occurs with your
348 packages or other duties in the project.
349         <p>
350 Usually this means that other developers are allowed to NMU (see
351 <ref id="nmu">) your package if a big problem (release critical bugs,
352 security update, etc.) occurs while you're on vacation. Sometimes it's
353 nothing as critical as that, but it's still appropriate to let the others
354 know that you're unavailable.
355         <p>
356 In order to inform the other developers, there are two things that you should do.
357 First send a mail to &email-debian-private; with "[VAC] " prepended to the
358 subject of your message<footnote>This is so that the message can be easily
359 filtered by people who don't want to read vacation notices.</footnote>
360 and state the period of time when you will be on vacation. You can also give
361 some special instructions on what to do if a problem occurs.
362         <p>
363 The other thing to do is to mark yourself as "on vacation" in the
364 <qref id="devel-db">Debian developers' LDAP database</qref> (this
365 information is only accessible to Debian developers).
366 Don't forget to remove the "on vacation" flag when you come back!
367
368
369       <sect id="upstream-coordination">Coordination with upstream developers
370         <p>
371 A big part of your job as Debian maintainer will be to stay in contact
372 with the upstream developers.  Debian users will sometimes report bugs
373 that are not specific to Debian to our bug tracking system.  You
374 have to forward these bug reports to the upstream developers so that
375 they can be fixed in a future upstream release.
376         <p>
377 While it's not your job to fix non-Debian specific bugs, you may freely
378 do so if you're able. When you make such fixes, be sure to pass them on
379 to the upstream maintainers as well. Debian users and developers will
380 sometimes submit patches to fix upstream bugs &mdash; you should evaluate
381 and forward these patches upstream.
382         <p>
383 If you need to modify the upstream sources in order to build a policy
384 compliant package, then you should propose a nice fix to the upstream
385 developers which can be included there, so that you won't have to
386 modify the sources of the next upstream version. Whatever changes you
387 need, always try not to fork from the upstream sources.
388
389
390       <sect id="rc-bugs">Managing release-critical bugs
391         <p>
392 Generally you should deal with bug reports on your packages as described in
393 <ref id="bug-handling">. However, there's a special category of bugs that
394 you need to take care of &mdash; the so-called release-critical bugs (RC bugs).
395 All bug reports that have severity <em>critical</em>, <em>grave</em> or
396 <em>serious</em> are considered to have an impact on whether the package can
397 be released in the next stable release of Debian.
398 Those bugs can delay the Debian release
399 and/or can justify the removal of a package at freeze time. That's why
400 these bugs need to be corrected as quickly as possible.
401         <p>
402 Developers who are part of the <url id="&url-debian-qa;"
403 name="Quality Assurance"> group are following all such bugs, and trying
404 to help whenever possible. If, for any reason, you aren't able fix an
405 RC bug in a package of yours within 2 weeks, you should either ask for help
406 by sending a mail to the Quality Assurance (QA) group
407 &email-debian-qa;, or explain your difficulties and present a plan to fix
408 them by sending a mail to the bug report. Otherwise, people
409 from the QA group may want to do a Non-Maintainer Upload (see
410 <ref id="nmu">) after trying to contact you (they might not wait as long as
411 usual before they do their NMU if they have seen no recent activity from you
412 in the BTS).
413
414
415       <sect>Retiring
416         <p>
417 If you choose to leave the Debian project, you should make sure you do
418 the following steps:
419 <enumlist>
420             <item>
421 Orphan all your packages, as described in <ref id="orphaning">.
422             <item>
423 Send an email about why you are leaving the project to
424 &email-debian-private;.
425             <item>
426 Notify the Debian key ring maintainers that you are leaving by
427 emailing to &email-debian-keyring;.
428 </enumlist>
429
430
431
432    <chapt id="resources">Resources for Debian Developers
433      <p>
434 In this chapter you will find a very brief road map of the Debian
435 mailing lists, the Debian machines
436 which may be available to you as a developer, and all the other
437 resources that are available to help you in your maintainer work.
438
439       <sect id="mailing-lists">Mailing lists
440         <p>
441 Much of the conversation between Debian developers (and users) is managed
442 through a wide array of mailing lists we host at
443 <tt><url id="http://&lists-host;/" name="&lists-host;"></tt>.
444 To find out more on how to subscribe or unsubscribe, how to post and how not
445 to post, where to find old posts and how to search them, how to contact the
446 list maintainers and see various other information about the mailing lists,
447 please read <url id="&url-debian-lists;">. This section will only cover
448 aspects of mailing lists that are of particular interest to developers.
449
450         <sect1 id="mailing-lists-rules">Basic rules for use
451         <p>
452 When replying to messages on the mailing list, please do not send a
453 carbon copy (<tt>CC</tt>) to the original poster unless they explicitly
454 request to be copied.  Anyone who posts to a mailing list should read
455 it to see the responses.
456         <p>
457 Cross-posting (sending the same message to multiple lists) is discouraged.
458 As ever on the net, please trim down the quoting of articles you're
459 replying to.  In general, please adhere to the usual conventions for
460 posting messages.
461         <p>
462 Please read the <url name="code of conduct" id="&url-debian-lists;#codeofconduct">
463 for more information.
464
465         <sect1 id="core-devel-mailing-lists">Core development mailing lists
466         <p>
467 The core Debian mailing lists that developers should use are:
468 <list>
469   <item>&email-debian-devel-announce;, used to announce important things to
470         developers.
471         All developers are expected to be subscribed to this list.
472   </item>
473   <item>&email-debian-devel;, used to discuss various development related
474         technical issues.
475   </item>
476   <item>&email-debian-policy;, where the Debian Policy is discussed and
477         voted on.
478   </item>
479   <item>&email-debian-project;, used to discuss various non-technical
480         issues related to the project.
481   </item>
482 </list>
483         <p>
484 There are other mailing lists available for a variety of special topics;
485 see <url id="http://&lists-host;/"> for a list.
486
487         <sect1 id="mailing-lists-special">Special lists
488         <p>
489 &email-debian-private; is a special mailing list for private
490 discussions amongst Debian developers.  It is meant to be used for
491 posts which for whatever reason should not be published publicly.
492 As such, it is a low volume list, and users are urged not to use
493 &email-debian-private; unless it is really necessary.  Moreover, do
494 <em>not</em> forward email from that list to anyone.  Archives of this
495 list are not available on the web for obvious reasons, but you can see
496 them using your shell account on <tt>lists.debian.org</tt> and looking
497 in the <file>~debian/archive/debian-private</file> directory.
498         <p>
499 &email-debian-email; is a special mailing list used as a grab-bag 
500 for Debian related correspondence such as contacting upstream authors
501 about licenses, bugs, etc. or discussing the project with others where it
502 might be useful to have the discussion archived somewhere.
503
504         <sect1 id="mailing-lists-new">Requesting new development-related lists
505         <p>
506 Before requesting a mailing list that relates to the development of a
507 package (or a small group of related packages), please consider if using
508 an alias (via a .forward-aliasname file on master.debian.org, which
509 translates into a reasonably nice <var>you-aliasname@debian.org</var>
510 address) or a self-managed mailing list on <qref id="alioth">Alioth</qref>
511 is more appropriate.
512         <p>
513 If you decide that a regular mailing list on lists.debian.org is really what
514 you want, go ahead and fill in a request, following <url name="the HOWTO"
515 id="&url-debian-lists-new;">.
516
517       <sect id="irc-channels">IRC channels
518         <p>
519 Several IRC channels are dedicated to Debian's development. They are mainly
520 hosted on the <url id="&url-openprojects;" name="freenode"> network
521 (previously known as Open Projects Network).
522 The <tt>irc.debian.org</tt> DNS entry is an alias to
523 <tt>irc.freenode.net</tt>.
524         <p>
525 The main channel for Debian in general is <em>#debian</em>. This is a large,
526 general-purpose channel where users can find recent news in the topic and
527 served by bots. <em>#debian</em> is for English speakers; there are also
528 <em>#debian.de</em>, <em>#debian-fr</em>, <em>#debian-br</em> and other
529 similarly named channels for speakers of other languages.
530         <p>
531 The main channel for Debian development is <em>#debian-devel</em>.
532 It is a very active channel since usually over 150 people are always
533 logged in. It's a channel for people who work
534 on Debian, it's not a support channel (there's <em>#debian</em> for that).
535 It is however open to anyone who wants to lurk (and learn). Its topic is
536 commonly full of interesting information for developers.
537         <p>
538 Since <em>#debian-devel</em> is an open channel, you
539 should not speak there of issues that are discussed in
540 &email-debian-private;. There's another channel for this purpose,
541 it's called <em>#debian-private</em> and it's protected by a key.
542 This key is available in the archives of debian-private in
543 <file>master.debian.org:&file-debian-private-archive;</file>,
544 just <prgn>zgrep</prgn> for <em>#debian-private</em> in
545 all the files.
546         <p>
547 There are other additional channels dedicated to specific subjects.
548 <em>#debian-bugs</em> is used for coordinating bug squash parties.
549 <em>#debian-boot</em> is used to coordinate the work on the boot
550 floppies (i.e., the installer).
551 <!-- FIXME: is boot-floppies an anachronism, or still the channel name? -->
552 <em>#debian-doc</em> is
553 occasionally used to talk about documentation, like the document you are
554 reading. Other channels are dedicated to an architecture or a set of
555 packages: <em>#debian-bsd</em>, <em>#debian-kde</em>, <em>#debian-jr</em>,
556 <em>#debian-edu</em>,
557 <em>#debian-sf</em> (SourceForge package), <em>#debian-oo</em> (OpenOffice
558 package) ...
559         <p>
560 Some non-English developers' channels exist as well, for example
561 <em>#debian-devel-fr</em> for
562 French speaking people interested in Debian's development.
563         <p>
564 Channels dedicated to Debian also exist on other IRC networks, notably on
565 the <url name="Open and free technology community (OFTC)"
566 id="http://www.oftc.net/"> IRC network.
567
568
569       <sect id="doc-rsrcs">Documentation
570         <p>
571 This document contains a lot of information
572 which is useful to Debian developers,
573 but it cannot contain everything. Most of the other interesting documents
574 are linked from <url id="&url-devel-docs;" name="The Developers' Corner">.
575 Take the time to browse all the links, you will learn many more things.
576
577
578       <sect id="server-machines">Debian machines
579         <p>
580 Debian has several computers working as servers, most of which serve
581 critical functions in the Debian project. Most of the machines are used
582 for porting activities, and they all have a permanent connection to the
583 Internet.
584         <p>
585 Most of the machines are available for individual developers to use,
586 as long as the developers follow the rules set forth in the
587 <url name="Debian Machine Usage Policies" id="&url-dmup;">.
588         <p>
589 Generally speaking, you can use these machines for Debian-related purposes
590 as you see fit.  Please be kind to system administrators, and do not use
591 up tons and tons of disk space, network bandwidth, or CPU without first
592 getting the approval of the system administrators.  Usually these machines are run by
593 volunteers.
594         <p>
595 Please take care to protect your Debian passwords and SSH keys installed on
596 Debian machines. Avoid login or upload methods which send passwords over
597 the Internet in the clear, such as telnet, FTP, POP etc.
598         <p>
599 Please do not put any material that doesn't relate to Debian on the Debian
600 servers, unless you have prior permission.
601         <p>
602 The current list of Debian machines is available at
603 <url id="&url-devel-machines;">. That web page contains machine names,
604 contact information, information about who can log in, SSH keys etc.
605         <p>
606 If you have a problem with the operation of a Debian server, and you
607 think that the system operators need to be notified of this problem,
608 the Debian system administrator team is reachable at
609 <email>debian-admin@lists.debian.org</email>.
610         <p>
611 If you have a problem with a certain service, not related to the system
612 administration (such as packages to be removed from the archive,
613 suggestions for the web site, etc.),
614 generally you'll report a bug against a ``pseudo-package''.  See <ref
615 id="submit-bug"> for information on how to submit bugs.
616         <p>
617 Some of the core servers are restricted, but the information from there
618 is mirrored to another server.
619
620       <sect1 id="servers-bugs">The bugs server
621         <p>
622 <tt>&bugs-host;</tt> is the canonical location for the Bug Tracking
623 System (BTS).
624         <p>
625 It is restricted; a mirror is available on <tt>merkel</tt>.
626         <p>
627 If you plan on doing some statistical analysis or
628 processing of Debian bugs, this would be the place to do it.  Please
629 describe your plans on &email-debian-devel; before implementing
630 anything, however, to reduce unnecessary duplication of effort or
631 wasted processing time.
632
633       <sect1 id="servers-ftp-master">The ftp-master server
634         <p>
635 The <tt>ftp-master.debian.org</tt> server holds the canonical copy of the Debian
636 archive (excluding the non-US packages). Generally, package uploads
637 go to this server; see <ref id="upload">.
638         <p>
639 It is restricted; a mirror is available on <tt>merkel</tt>.
640         <p>
641 Problems with the Debian FTP archive generally need to be reported as
642 bugs against the <package>ftp.debian.org</package> pseudo-package or
643 an email to &email-ftpmaster;, but also see the procedures in
644 <ref id="archive-manip">.
645
646       <sect1 id="servers-non-us">The non-US server
647         <p>
648 The non-US server, <tt>non-us.debian.org</tt>,
649 holds the canonical copy of the non-US part of the Debian archive.
650 If you need to upload a package into one of the non-US sections, upload it
651 to this server; see <ref id="upload-non-us">.
652         <p>
653 Problems with the non-US package archive should generally be submitted as
654 bugs against the <package>nonus.debian.org</package> pseudo-package (notice
655 the lack of hyphen between "non" and "us" in the pseudo-package name
656 &mdash; that's for backwards compatibility). Remember to check whether or
657 not someone else has already reported the problem to the
658 <url id="http://&bugs-host;/nonus.debian.org" name="Bug Tracking System">.
659
660       <sect1 id="servers-www">The www-master server
661         <p>
662 The main web server is <tt>www-master.debian.org</tt>.
663 It holds the official web pages, the face
664 of Debian for most newbies.
665         <p>
666 If you find a problem with the Debian web server, you should generally
667 submit a bug against the pseudo-package,
668 <package>www.debian.org</package>. Remember to check whether or not someone
669 else has already reported the problem to the
670 <url id="http://&bugs-host;/www.debian.org" name="Bug Tracking System">.
671
672       <sect1 id="servers-people">The people web server
673         <p>
674 <tt>people.debian.org</tt> is the server used
675 for developers' own web pages about anything related to Debian.
676         <p>
677 If you have some Debian-specific information which you want to serve
678 on the web, you can do this by putting material in the
679 <file>public_html</file> directory under your home directory on
680 <tt>people.debian.org</tt>.
681 This will be accessible at the URL
682 <tt>http://people.debian.org/~<var>your-user-id</var>/</tt>.
683         <p>
684 You should only use this particular location because it will be backed up,
685 whereas on other hosts it won't.
686         <p>
687 Usually the only reason to use a different host is when you need to publish
688 materials subject to the U.S. export restrictions, in which case you can use
689 one of the other servers located outside the United States, such as the
690 aforementioned <tt>non-us.debian.org</tt>.
691         <p>
692 Send mail to &email-debian-devel; if you have any questions.
693
694       <sect1 id="servers-cvs">The CVS server
695 <!-- TODO: document svn.debian.org, arch.debian.org also -->
696         <p>
697 Our CVS server is located on <tt>cvs.debian.org</tt>.
698         <p>
699 If you need to use a publicly accessible CVS
700 server, for instance, to help coordinate work on a package between
701 many different developers, you can request a CVS area on the server.
702           <p>
703 Generally, <tt>cvs.debian.org</tt> offers a combination of local CVS
704 access, anonymous client-server read-only access, and full
705 client-server access through <prgn>ssh</prgn>.  Also, the CVS area can
706 be accessed read-only via the Web at <url id="&url-cvsweb;">.
707         <p>
708 To request a CVS area, send a request via email to
709 &email-debian-admin;.  Include the name of the requested CVS area,
710 the Debian account that should own the CVS root area, and why you need it.
711
712       <sect1 id="dchroot">chroots to different distributions
713         <p>
714 On some machines, there are chroots to different distributions available.
715 You can use them like
716
717 <example>
718 vore% dchroot unstable
719 Executing shell in chroot: /org/vore.debian.org/chroots/user/unstable
720 </example>
721
722 In all chroots, the normal user home directories are available.
723 You can find out which chroots are available via
724 <tt>&url-devel-machines;</tt>.
725
726
727     <sect id="devel-db">The Developers Database
728         <p>
729 The Developers Database, at <url id="&url-debian-db;">, is an LDAP
730 directory for managing Debian developer attributes.  You can use this
731 resource to search the list of Debian developers.
732 Part of this information is also available through
733 the finger service on Debian servers, try
734 <prgn>finger yourlogin@db.debian.org</prgn> to see what it reports.
735         <p>
736 Developers can <url name="log into the database" id="&url-debian-db-login;">
737 to change various information about themselves, such as:
738 <list>
739         <item>forwarding address for your debian.org email
740         <item>subscription to debian-private
741         <item>whether you are on vacation
742         <item>personal information such as your address, country,
743               the latitude and longitude of the place where you live
744               for use in <url name="the world map of Debian developers"
745               id="&url-worldmap;">, phone and fax numbers, IRC nickname
746               and web page
747         <item>password and preferred shell on Debian Project machines
748 </list>
749         <p>
750 Most of the information is not accessible to the public, naturally.
751 For more information please read the online documentation that you can find
752 at <url id="&url-debian-db-doc;">.
753         <p>
754 Developers can also submit their SSH keys to be used for authorization on the
755 official Debian machines, and even add new *.debian.net DNS entries.
756 Those features are documented at <url id="&url-debian-db-mail-gw;">.
757
758
759     <sect id="archive">The Debian archive
760         <p>
761 The &debian-formal; distribution consists of a lot of packages
762 (<file>.deb</file>'s, currently around &number-of-pkgs;) and a few
763 additional files (such as documentation and installation disk images).
764         <p>
765 Here is an example directory tree of a complete Debian archive:
766         <p>
767 &sample-dist-dirtree;
768         <p>
769 As you can see, the top-level directory contains two directories,
770 <file>dists/</file> and <file>pool/</file>. The latter is a &ldquo;pool&rdquo; in which the
771 packages actually are, and which is handled by the archive maintenance
772 database and the accompanying programs. The former contains the
773 distributions, <em>stable</em>, <em>testing</em> and <em>unstable</em>.
774 The <file>Packages</file> and <file>Sources</file> files in the
775 distribution subdirectories can reference files in the <file>pool/</file>
776 directory. The directory tree below each of the distributions is arranged
777 in an identical manner.  What we describe below for <em>stable</em> is
778 equally applicable to the <em>unstable</em> and <em>testing</em>
779 distributions. 
780         <p>
781 <file>dists/stable</file> contains three directories, namely <file>main</file>,
782 <file>contrib</file>, and <file>non-free</file>. 
783         <p>
784 In each of the areas, there is a directory for the source packages
785 (<file>source</file>) and a directory for each supported architecture
786 (<file>binary-i386</file>, <file>binary-m68k</file>, etc.).
787         <p>
788 The <file>main</file> area contains additional directories which hold
789 the disk images and some essential pieces of documentation required
790 for installing the Debian distribution on a specific architecture
791 (<file>disks-i386</file>, <file>disks-m68k</file>, etc.).
792
793
794       <sect1 id="archive-sections">Sections
795         <p>
796 The <em>main</em> section of the Debian archive is what makes up the
797 <strong>official &debian-formal; distribution</strong>.  The
798 <em>main</em> section is official because it fully complies with all
799 our guidelines.  The other two sections do not, to different degrees;
800 as such, they are <strong>not</strong> officially part of
801 &debian-formal;.
802         <p>
803 Every package in the main section must fully comply with the <url
804 id="&url-dfsg;" name="Debian Free Software Guidelines"> (DFSG) and
805 with all other policy requirements as described in the <url
806 id="&url-debian-policy;" name="Debian Policy Manual">.  The DFSG is
807 our definition of &ldquo;free software.&rdquo;  Check out the Debian Policy
808 Manual for details.
809         <p>
810 Packages in the <em>contrib</em> section have to comply with the DFSG,
811 but may fail other requirements.  For instance, they may depend on
812 non-free packages.
813         <p>
814 Packages which do not conform to the DFSG are placed in the
815 <em>non-free</em> section. These packages are not considered as part
816 of the Debian distribution, though we support their use, and we
817 provide infrastructure (such as our bug-tracking system and mailing
818 lists) for non-free software packages.
819         <p>
820 The <url id="&url-debian-policy;" name="Debian Policy Manual">
821 contains a more exact definition of the three sections. The above
822 discussion is just an introduction.
823         <p>
824 The separation of the three sections at the top-level of the archive
825 is important for all people who want to distribute Debian, either via
826 FTP servers on the Internet or on CD-ROMs: by distributing only the
827 <em>main</em> and <em>contrib</em> sections, one can avoid any legal
828 risks.  Some packages in the <em>non-free</em> section do not allow
829 commercial distribution, for example.
830         <p>
831 On the other hand, a CD-ROM vendor could easily check the individual
832 package licenses of the packages in <em>non-free</em> and include as
833 many on the CD-ROMs as he's allowed to. (Since this varies greatly from
834 vendor to vendor, this job can't be done by the Debian developers.)
835         <p>
836 Note that the term "section" is also used to refer to categories
837 which simplify the organization and browsing of available packages, e.g.
838 <em>admin</em>, <em>net</em>, <em>utils</em> etc. Once upon a time, these
839 sections (subsections, rather) existed in the form of subdirectories within
840 the Debian archive. Nowadays, these exist only in the "Section" header
841 fields of packages.
842
843
844       <sect1>Architectures
845         <p>
846 In the first days, the Linux kernel was only available for the Intel
847 i386 (or greater) platforms, and so was Debian. But when Linux became
848 more and more popular, the kernel was ported to other architectures,
849 too.
850         <p>
851 The Linux 2.0 kernel supports Intel x86, DEC Alpha, SPARC, Motorola
852 680x0 (like Atari, Amiga and Macintoshes), MIPS, and PowerPC.  The
853 Linux 2.2 kernel supports even more architectures, including ARM and
854 UltraSPARC.  Since Linux supports these platforms, Debian decided that
855 it should, too.  Therefore, Debian has ports underway; in fact, we
856 also have ports underway to non-Linux kernels.  Aside from
857 <em>i386</em> (our name for Intel x86), there is <em>m68k</em>,
858 <em>alpha</em>, <em>powerpc</em>, <em>sparc</em>, <em>hurd-i386</em>,
859 <em>arm</em>, <em>ia64</em>, <em>hppa</em>, <em>s390</em>, <em>mips</em>,
860 <em>mipsel</em> and <em>sh</em> as of this writing.
861         <p>
862 &debian-formal; 1.3 is only available as <em>i386</em>.  Debian 2.0
863 shipped for <em>i386</em> and <em>m68k</em> architectures.  Debian 2.1
864 ships for the <em>i386</em>, <em>m68k</em>, <em>alpha</em>, and
865 <em>sparc</em> architectures.  Debian 2.2 added support for the
866 <em>powerpc</em> and <em>arm</em> architectures. Debian 3.0 added
867 support of five new architectures: <em>ia64</em>, <em>hppa</em>,
868 <em>s390</em>, <em>mips</em> and <em>mipsel</em>.
869         <p>
870 Information for developers and users about the specific ports are
871 available at the <url id="&url-debian-ports;" name="Debian Ports web
872 pages">.
873
874
875
876       <sect1>Packages
877         <p>
878 There are two types of Debian packages, namely <em>source</em> and
879 <em>binary</em> packages.
880         <p>
881 Source packages consist of either two or three files: a <file>.dsc</file>
882 file, and either a <file>.tar.gz</file> file or both an
883 <file>.orig.tar.gz</file> and a <file>.diff.gz</file> file.
884         <p>
885 If a package is developed specially for Debian and is not distributed
886 outside of Debian, there is just one <file>.tar.gz</file> file which
887 contains the sources of the program.  If a package is distributed
888 elsewhere too, the <file>.orig.tar.gz</file> file stores the so-called
889 <em>upstream source code</em>, that is the source code that's
890 distributed from the <em>upstream maintainer</em> (often the author of
891 the software). In this case, the <file>.diff.gz</file> contains the
892 changes made by the Debian maintainer.
893         <p>
894 The <file>.dsc</file> file lists all the files in the source package together
895 with checksums (<prgn>md5sums</prgn>) and some additional info about
896 the package (maintainer, version, etc.).
897
898
899       <sect1>Distributions
900         <p>
901 The directory system described in the previous chapter is itself
902 contained within <em>distribution directories</em>.  Each
903 distribution is actually contained in the <file>pool</file> directory in the
904 top-level of the Debian archive itself.
905         <p>
906 To summarize, the Debian archive has a root directory within an FTP
907 server.  For instance, at the mirror site,
908 <ftpsite>ftp.us.debian.org</ftpsite>, the Debian archive itself is
909 contained in <ftppath>/debian</ftppath>, which is a common location
910 (another is <file>/pub/debian</file>).
911         <p>
912 A distribution comprises Debian source and binary packages, and the
913 respective <file>Sources</file> and <file>Packages</file> index files, containing
914 the header information from all those packages. The former are kept in the
915 <file>pool/</file> directory, while the latter are kept in the <file>dists/</file>
916 directory of the archive (for backwards compatibility).
917
918
919         <sect2 id="sec-dists">Stable, testing, and unstable
920         <p>
921 There are always distributions called <em>stable</em> (residing in
922 <file>dists/stable</file>), <em>testing</em> (residing in
923 <file>dists/testing</file>), and <em>unstable</em> (residing in
924 <file>dists/unstable</file>). This reflects the development process of the
925 Debian project.
926         <p>
927 Active development is done in the <em>unstable</em> distribution
928 (that's why this distribution is sometimes called the <em>development
929 distribution</em>). Every Debian developer can update his or her
930 packages in this distribution at any time. Thus, the contents of this
931 distribution change from day to day. Since no special effort is made
932 to make sure everything in this distribution is working properly, it is
933 sometimes literally unstable.
934         <p>
935 The <qref id="testing">"testing"</qref> distribution is generated
936 automatically by taking
937 packages from unstable if they satisfy certain criteria. Those
938 criteria should ensure a good quality for packages within testing.
939 The update to testing is launched each day after the
940 new packages have been installed. See <ref id="testing">.
941         <p>
942 After a period of development, once the release manager deems fit, the
943 <em>testing</em> distribution is frozen, meaning that the policies
944 which control how packages move from <em>unstable</em> to <em>testing</em> are
945 tightened.  Packages which are too buggy are removed.  No changes are
946 allowed into <em>testing</em> except for bug fixes.  After some time
947 has elapsed, depending on progress, the <em>testing</em> distribution
948 goes into a `deep freeze', when no changes are made to it except those
949 needed for the installation system.  This is called a &ldquo;test cycle&rdquo;,
950 and it can last up to two weeks. There can be several test cycles,
951 until the distribution is prepared for release, as decided by the
952 release manager.  At the end of the last test cycle, the
953 <em>testing</em> distribution is renamed to <em>stable</em>,
954 overriding the old <em>stable</em> distribution, which is removed at
955 that time (although it can be found at <tt>&archive-host;</tt>).
956         <p>
957 This development cycle is based on the assumption that the
958 <em>unstable</em> distribution becomes <em>stable</em> after passing a
959 period of being in <em>testing</em>.  Even once a distribution is
960 considered stable, a few bugs inevitably remain &mdash; that's why the
961 stable distribution is updated every now and then. However, these
962 updates are tested very carefully and have to be introduced into the
963 archive individually to reduce the risk of introducing new bugs.  You
964 can find proposed additions to <em>stable</em> in the
965 <file>proposed-updates</file> directory.  Those packages in
966 <file>proposed-updates</file> that pass muster are periodically moved as a
967 batch into the stable distribution and the revision level of the
968 stable distribution is incremented (e.g., &lsquo;3.0&rsquo; becomes
969 &lsquo;3.0r1&rsquo;, &lsquo;2.2r4&rsquo; becomes &lsquo;2.2r5&rsquo;, and
970 so forth).
971         <p>
972 Note that development under <em>unstable</em> continues during the
973 freeze period, since the <em>unstable</em> distribution remains in
974 place in parallel with <em>testing</em>.
975
976     <sect2>
977         <heading>More information about the testing distribution</heading>
978         <p>
979 Packages are usually installed into the `testing' distribution after they
980 have undergone some degree of testing in unstable.
981         <p>
982 For more details, please see the <qref id="testing">information about the
983 testing distribution</qref>.
984
985         <sect2 id="experimental">Experimental
986           <p>
987 The <em>experimental</em> distribution is a special distribution.
988 It is not a full distribution in the same sense as `stable' and
989 `unstable' are.  Instead, it is meant to be a temporary staging area
990 for highly experimental software where there's a good chance that the
991 software could break your system, or software that's just too unstable
992 even for the <em>unstable</em> distribution (but there is a reason to
993 package it nevertheless).  Users who download and install
994 packages from <em>experimental</em> are expected to have been duly
995 warned.  In short, all bets are off for the <em>experimental</em>
996 distribution.
997           <p>
998 These are the <manref name="sources.list" section="5"> lines for
999 <em>experimental</em>:
1000 <example>
1001 deb http://ftp.<var>xy</var>.debian.org/debian/ ../project/experimental main
1002 deb-src http://ftp.<var>xy</var>.debian.org/debian/ ../project/experimental main
1003 </example>
1004           <p>
1005 If there is a chance that the software could do grave damage to a system,
1006 it is likely to be better to put it into <em>experimental</em>.
1007 For instance, an experimental compressed file system should probably go
1008 into <em>experimental</em>.
1009           <p>
1010 Whenever there is a new upstream version of a package that introduces new
1011 features but breaks a lot of old ones, it should either not be uploaded, or
1012 be uploaded to <em>experimental</em>. A new, beta, version of some software
1013 which uses a completely different configuration can go into
1014 <em>experimental</em>, at the maintainer's discretion. If you are working
1015 on an incompatible or complex upgrade situation, you can also use
1016 <em>experimental</em> as a staging area, so that testers can get early
1017 access.
1018           <p>
1019 Some experimental software can still go into <em>unstable</em>, with a few
1020 warnings in the description, but that isn't recommended because packages
1021 from <em>unstable</em> are expected to propagate to <em>testing</em> and
1022 thus to <em>stable</em>. You should not be afraid to use
1023 <em>experimental</em> since it does not cause any pain to the ftpmasters,
1024 the experimental packages are automatically removed once you upload
1025 the package in <em>unstable</em> with a higher version number.
1026           <p>
1027 New software which isn't likely to damage your system can go directly into
1028 <em>unstable</em>.
1029           <p>
1030 An alternative to <em>experimental</em> is to use your personal web space
1031 on <tt>people.debian.org</tt>.
1032           <p>
1033 When uploading to unstable a package which had bugs fixed in experimental,
1034 please consider using the option <tt>-v</tt> to <prgn>dpkg-buildpackage</prgn>
1035 to finally get them closed.
1036
1037       <sect1 id="codenames">Release code names
1038         <p>
1039 Every released Debian distribution has a <em>code name</em>: Debian
1040 1.1 is called `buzz'; Debian 1.2, `rex'; Debian 1.3, `bo'; Debian 2.0,
1041 `hamm'; Debian 2.1, `slink'; Debian 2.2, `potato'; and Debian 3.0, `woody'.  There is also
1042 a ``pseudo-distribution'', called `sid', which is the current
1043 `unstable' distribution; since packages are moved from `unstable' to
1044 `testing' as they approach stability, `sid' itself is never released.
1045 As well as the usual contents of a Debian distribution, `sid' contains
1046 packages for architectures which are not yet officially supported or
1047 released by Debian.  These architectures are planned to be integrated
1048 into the mainstream distribution at some future date.
1049         <p>
1050 Since Debian has an open development model (i.e., everyone can
1051 participate and follow the development) even the `unstable' and `testing'
1052 distributions are distributed to the Internet through the Debian FTP and
1053 HTTP server network. Thus, if we had called the directory which contains
1054 the release candidate version `testing', then we would have to rename it
1055 to `stable' when the version is released, which would cause all FTP
1056 mirrors to re-retrieve the whole distribution (which is quite large).
1057         <p>
1058 On the other hand, if we called the distribution directories
1059 <em>Debian-x.y</em> from the beginning, people would think that Debian
1060 release <em>x.y</em> is available. (This happened in the past, where a
1061 CD-ROM vendor built a Debian 1.0 CD-ROM based on a pre-1.0 development
1062 version. That's the reason why the first official Debian release was
1063 1.1, and not 1.0.)
1064         <p>
1065 Thus, the names of the distribution directories in the archive are
1066 determined by their code names and not their release status (e.g.,
1067 `slink').  These names stay the same during the development period and
1068 after the release; symbolic links, which can be changed easily,
1069 indicate the currently released stable distribution.  That's why the
1070 real distribution directories use the <em>code names</em>, while
1071 symbolic links for <em>stable</em>, <em>testing</em>, and
1072 <em>unstable</em> point to the appropriate release directories.
1073
1074
1075     <sect id="mirrors">Debian mirrors
1076         <p>
1077 The various download archives and the web site have several mirrors
1078 available in order to relieve our canonical servers from heavy load.
1079 In fact, some of the canonical servers aren't public &mdash; a first tier
1080 of mirrors balances the load instead. That way, users always access
1081 the mirrors and get used to using them, which allows Debian to better
1082 spread its bandwidth requirements over several servers and networks,
1083 and basically makes users avoid hammering on one primary location.
1084 Note that the first tier of mirrors is as up-to-date as it can be since
1085 they update when triggered from the internal sites (we call this
1086 "push mirroring").
1087         <p>
1088 All the information on Debian mirrors, including a list of the available
1089 public FTP/HTTP servers, can be found at <url id="&url-debian-mirrors;">.
1090 This useful page also includes information and tools which can be helpful if
1091 you are interested in setting up your own mirror, either for internal or
1092 public access.
1093         <p>
1094 Note that mirrors are generally run by third-parties who are
1095 interested in helping Debian.  As such, developers generally do not
1096 have accounts on these machines.
1097
1098
1099     <sect id="incoming-system">
1100         <heading>The Incoming system
1101         <p>
1102 The Incoming system is responsible for collecting updated packages and
1103 installing them in the Debian archive. It consists of a set of
1104 directories and scripts that are installed both on <tt>&ftp-master-host;</tt>
1105 and <tt>&non-us-host;</tt>.
1106         <p>
1107 Packages are uploaded by all the maintainers into a directory called
1108 <file>unchecked</file>. This directory is scanned every 15 minutes by
1109 the <prgn>katie</prgn> script, which verifies the integrity of the uploaded
1110 packages and their cryptographic signatures.
1111 If the package is considered ready to be installed, it
1112 is moved into the <file>accepted</file> directory. If this is the first upload of
1113 the package, it is moved to the <file>new</file> directory, where it waits
1114 for approval by the ftpmasters. If the package contains files to be installed
1115 "by hand" it is moved to the <file>byhand</file> directory, where it waits
1116 for manual installation by the ftpmasters. Otherwise, if any error has been detected,
1117 the package is refused and is moved to the <file>reject</file> directory.
1118         <p>
1119 Once the package is accepted, the system sends a confirmation
1120 mail to the maintainer and closes all the bugs marked as fixed by the upload,
1121 and the auto-builders may start recompiling it. The package is now publicly
1122 accessible at <url id="&url-incoming;"> (there is no
1123 such URL for packages in the non-US archive) until it is really installed
1124 in the Debian archive. This happens only once a day, the package
1125 is then removed from incoming and installed in the pool along with all
1126 the other packages. Once all the other updates (generating new
1127 <file>Packages</file> and <file>Sources</file> index files for example) have been
1128 made, a special script is called to ask all the primary mirrors to update
1129 themselves.
1130         <p>
1131 The archive maintenance software will also send the OpenPGP/GnuPG signed
1132 <file>.changes</file> file that you uploaded to the appropriate mailing
1133 lists. If a package is released with the <tt>Distribution:</tt> set to
1134 `stable', the announcement is sent to &email-debian-changes;.
1135 If a package is released with <tt>Distribution:</tt> set to `unstable'
1136 or `experimental', the announcement will be posted to
1137 &email-debian-devel-changes; instead.
1138         <p>
1139 All Debian developers have write access to the <file>unchecked</file>
1140 directory in order to upload their packages; they also have that access
1141 to the <file>reject</file> directory in order to remove their bad uploads
1142 or to move some files back to the <file>unchecked</file> directory. But
1143 all the other directories are only writable by the ftpmasters, which is
1144 why you cannot remove an upload once it has been accepted.
1145
1146       <sect1 id="delayed-incoming-broken">Delayed incoming
1147         <p>
1148 <em>Note:</em> This description here is currently not working, because
1149 ftp-master is restricted. Please see <ref id="delayed-incoming"> for
1150 the currently working way.
1151         <p>
1152 The <file>unchecked</file> directory has a special <file>DELAYED</file>
1153 subdirectory. It is itself subdivided in nine directories
1154 called <file>1-day</file> to <file>9-day</file>. Packages which are uploaded to
1155 one of those directories will be moved to the real unchecked
1156 directory after the corresponding number of days.
1157 This is done by a script which is run each day and which moves the
1158 packages between the directories. Those which are in "1-day" are
1159 installed in <file>unchecked</file> while the others are moved to the 
1160 adjacent directory (for example, a package in <file>5-day</file> will
1161 be moved to <file>4-day</file>). This feature is particularly useful
1162 for people who are doing non-maintainer uploads. Instead of
1163 waiting before uploading a NMU, it is uploaded as soon as it is
1164 ready, but to one of those <file>DELAYED/<var>x</var>-day</file> directories.
1165 That leaves the corresponding number of days for the maintainer
1166 to react and upload another fix themselves if they are not
1167 completely satisfied with the NMU. Alternatively they can remove
1168 the NMU.
1169         <p>
1170 The use of that delayed feature can be simplified with a bit
1171 of integration with your upload tool.  For instance, if you use 
1172 <prgn>dupload</prgn> (see <ref id="dupload">), you can add this
1173 snippet to your configuration file:
1174 <example>
1175 $delay = ($ENV{DELAY} || 7);
1176 $cfg{'delayed'} = {
1177          fqdn => "&ftp-master-host;",
1178          login => "yourdebianlogin",
1179          incoming => "/org/ftp.debian.org/incoming/DELAYED/$delay-day/",
1180          dinstall_runs => 1,
1181          method => "scpb"
1182 };
1183 </example>
1184 Once you've made that change, <prgn>dupload</prgn> can be used to
1185 easily upload a package in one of the delayed directories:
1186 <example>DELAY=5 dupload --to delayed &lt;changes-file&gt;</example>
1187
1188
1189
1190     <sect id="pkg-info">Package information
1191         <p>
1192
1193       <sect1 id="pkg-info-web">On the web
1194         <p>
1195 Each package has several dedicated web pages.
1196 <tt>http://&packages-host;/<var>package-name</var></tt>
1197 displays each version of the package
1198 available in the various distributions.  Each version links to a page
1199 which provides information, including the package description,
1200 the dependencies, and package download links.
1201         <p>
1202 The bug tracking system tracks bugs for each package.
1203 You can view the bugs of a given package at the URL
1204 <tt>http://&bugs-host;/<var>package-name</var></tt>.
1205
1206       <sect1 id="madison">The <prgn>madison</prgn> utility
1207         <p>
1208 <prgn>madison</prgn> is a command-line utility that is available
1209 on both <tt>&ftp-master-host;</tt> and <tt>&non-us-host;</tt>. It
1210 uses a single argument corresponding to a package name. In result
1211 it displays which version of the package is available for each
1212 architecture and distribution combination. An example will explain
1213 it better.
1214         <p>
1215 <example>
1216 $ madison libdbd-mysql-perl
1217 libdbd-mysql-perl |   1.2202-4 |        stable | source, alpha, arm, i386, m68k, powerpc, sparc
1218 libdbd-mysql-perl |   1.2216-2 |       testing | source, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc
1219 libdbd-mysql-perl | 1.2216-2.0.1 |       testing | alpha
1220 libdbd-mysql-perl |   1.2219-1 |      unstable | source, alpha, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc
1221 </example>
1222         <p>
1223 In this example, you can see that the version in <em>unstable</em> differs from
1224 the version in <em>testing</em> and that there has been a binary-only NMU of the
1225 package for the alpha architecture. Each version of the package has been
1226 recompiled on most of the architectures.
1227
1228     <sect id="pkg-tracking-system">The Package Tracking System
1229         <p>
1230 The Package Tracking System (PTS) is an email-based tool to track
1231 the activity of a source package. This really means that you can
1232 get the same emails that the package maintainer gets, simply by
1233 subscribing to the package in the PTS.
1234         <p>
1235 Each email sent through the PTS is classified under one of
1236 the keywords listed below. This will let you select the mails that
1237 you want to receive.
1238         <p>
1239 By default you will get:
1240 <taglist>
1241     <tag><tt>bts</tt>
1242     <item>
1243 All the bug reports and following discussions.
1244
1245     <tag><tt>bts-control</tt>
1246     <item>
1247 The email notifications from <email>control@bugs.debian.org</email>
1248 about bug report status changes.
1249     
1250     <tag><tt>upload-source</tt>
1251     <item>
1252 The email notification from <prgn>katie</prgn> when an uploaded source
1253 package is accepted.
1254
1255     <tag><tt>katie-other</tt>
1256     <item>
1257 Other warning and error emails from <prgn>katie</prgn> (such as an
1258 override disparity for the section and/or the priority field).
1259
1260     <tag><tt>default</tt>
1261     <item>
1262 Any non-automatic email sent to the PTS by people who wanted to
1263 contact the subscribers of the package. This can be done by sending mail
1264 to <tt><var>sourcepackage</var>@&pts-host;</tt>. In order to prevent spam,
1265 all messages sent to these addresses must contain the <tt>X-PTS-Approved</tt>
1266 header with a non-empty value.
1267
1268     <tag><tt>summary</tt>
1269     <item>
1270 (This is a planned expansion.)
1271 The regular summary emails about the package's status (bug statistics,
1272 porting overview, progression in <em>testing</em>, ...).
1273 </taglist>
1274
1275         <p>
1276 You can also decide to receive additional information:
1277 <taglist>
1278     <tag><tt>upload-binary</tt>
1279     <item>
1280 The email notification from <prgn>katie</prgn> when an uploaded binary
1281 package is accepted. In other words, whenever a build daemon or a porter
1282 uploads your package for another architecture, you can get an email to
1283 track how your package gets recompiled for all architectures.
1284
1285     <tag><tt>cvs</tt>
1286     <item>
1287 CVS commit notifications, if the package has a CVS repository and the
1288 maintainer has set up forwarding commit notifications to the PTS.
1289
1290     <tag><tt>ddtp</tt>
1291     <item>
1292 Translations of descriptions or debconf templates
1293 submitted to the Debian Description Translation Project.
1294 </taglist>
1295
1296         <sect1 id="pts-commands">The PTS email interface
1297         <p>
1298 You can control your subscription(s) to the PTS by sending
1299 various commands to <email>pts@qa.debian.org</email>.
1300
1301 <taglist>
1302
1303 <tag><tt>subscribe &lt;sourcepackage&gt; [&lt;email&gt;]</tt>
1304 <item>
1305   Subscribes <var>email</var> to communications related to the source package
1306   <var>sourcepackage</var>. Sender address is used if the second argument is
1307   not present. If <var>sourcepackage</var> is not a valid source package,
1308   you'll get a warning. However if it's a valid binary package, the PTS
1309   will subscribe you to the corresponding source package.
1310
1311 <tag><tt>unsubscribe &lt;sourcepackage&gt; [&lt;email&gt;]</tt>
1312 <item>
1313   Removes a previous subscription to the source package <var>sourcepackage</var>
1314   using the specified email address or the sender address if the second
1315   argument is left out. 
1316
1317 <tag><tt>which [&lt;email&gt;]</tt>
1318 <item>
1319   Lists all subscriptions for the sender or the email address optionally 
1320   specified.
1321
1322 <tag><tt>keyword [&lt;email&gt;]</tt>
1323 <item>
1324   Tells you the keywords that you are accepting.
1325   For an explanation of keywords, <qref id="pkg-tracking-system">see
1326   above</qref>. Here's a quick summary:
1327   <list>
1328   <item><tt>bts</tt>: mails coming from the Debian Bug Tracking System
1329   <item><tt>bts-control</tt>: reply to mails sent to &email-bts-control;
1330   <item><tt>summary</tt>: automatic summary mails about the state of a package
1331   <item><tt>cvs</tt>: notification of CVS commits
1332   <item><tt>ddtp</tt>: translations of descriptions and debconf templates
1333   <item><tt>upload-source</tt>: announce of a new source upload that
1334         has been accepted
1335   <item><tt>upload-binary</tt>: announce of a new binary-only upload (porting)
1336   <item><tt>katie-other</tt>: other mails from ftpmasters
1337         (override disparity, etc.)
1338   <item><tt>default</tt>: all the other mails (those which aren't "automatic")
1339   </list>
1340
1341 <tag><tt>keyword &lt;sourcepackage&gt; [&lt;email&gt;]</tt>
1342 <item>
1343   Same as the previous item but for the given source package, since
1344   you may select a different set of keywords for each source package.
1345
1346 <tag><tt>keyword [&lt;email&gt;] {+|-|=} &lt;list of keywords&gt;</tt>
1347 <item>
1348   Accept (+) or refuse (-) mails classified under the given keyword(s).
1349   Define the list (=) of accepted keywords.
1350
1351 <tag><tt>keyword &lt;sourcepackage&gt; [&lt;email&gt;] {+|-|=} &lt;list of keywords&gt;</tt>
1352 <item>
1353   Same as previous item but overrides the keywords list for the
1354   indicated source package.
1355   
1356 <tag><tt>quit | thanks | --</tt>
1357 <item>
1358   Stops processing commands. All following lines are ignored by
1359   the bot.
1360 </taglist>
1361
1362         <sect1 id="pts-mail-filtering">Filtering PTS mails
1363         <p>
1364 Once you are subscribed to a package, you will get the mails sent to
1365 <tt><var>sourcepackage</var>@packages.qa.debian.org</tt>. Those mails
1366 have special headers appended to let you filter them in a special
1367 mailbox (e.g. with <prgn>procmail</prgn>). The added headers are
1368 <tt>X-Loop</tt>, <tt>X-PTS-Package</tt>, <tt>X-PTS-Keyword</tt> and
1369 <tt>X-Unsubscribe</tt>.
1370         <p>
1371 Here is an example of added headers for a source upload notification
1372 on the <package>dpkg</package> package:
1373 <example>
1374 X-Loop: dpkg@&pts-host;
1375 X-PTS-Package: dpkg
1376 X-PTS-Keyword: upload-source
1377 X-Unsubscribe: echo 'unsubscribe dpkg' | mail pts@qa.debian.org
1378 </example>
1379
1380         <sect1 id="pts-cvs-commit">Forwarding CVS commits in the PTS
1381         <p>
1382 If you use a publicly accessible CVS repository for maintaining
1383 your Debian package, you may want to forward the commit notification
1384 to the PTS so that the subscribers (and possible co-maintainers) can
1385 closely follow the package's evolution.
1386         <p>
1387 Once you set up the CVS repository to generate commit notifications,
1388 you just have to make sure it sends a copy of those mails
1389 to <tt><var>sourcepackage</var>_cvs@&pts-host;</tt>. Only the people
1390 who accept the <em>cvs</em> keyword will receive these notifications.
1391
1392         <sect1 id="pts-web">The PTS web interface
1393         <p>
1394 The PTS has a web interface at <url id="http://&pts-host;/"> that puts
1395 together a lot of information about each source package. It features many useful
1396 links (BTS, QA stats, contact information, DDTP translation status,
1397 buildd logs) and gathers much more information from various places
1398 (30 latest changelog entries, testing status, ...). It's a very useful
1399 tool if you want to know what's going on with a specific source
1400 package. Furthermore there's a form that allows easy subscription to
1401 the PTS via email.
1402         <p>
1403 You can jump directly to the web page concerning a specific source package
1404 with a URL like <tt>http://&pts-host;/<var>sourcepackage</var></tt>.
1405         <p>
1406 This web interface has been designed like a portal for the development of
1407 packages: you can add custom content on your packages' pages. You can
1408 add "static information" (news items that are meant to stay available
1409 indefinitely) and news items in the "latest news" section.
1410         <p>
1411 Static news items can be used to indicate:
1412 <list>
1413 <item>the availability of a project hosted on <qref id="alioth">Alioth</qref> for co-maintaining the package
1414 <item>a link to the upstream web site
1415 <item>a link to the upstream bug tracker
1416 <item>the existence of an IRC channel dedicated to the software
1417 <item>any other available resource that could be useful in the maintenance of the package
1418 </list>
1419 Usual news items may be used to announce that:
1420 <list>
1421 <item>beta packages are available for testing
1422 <item>final packages are expected for next week
1423 <item>the packaging is about to be redone from scratch
1424 <item>backports are available
1425 <item>the maintainer is on vacation (if they wish to publish this information)
1426 <item>a NMU is being worked on
1427 <item>something important will affect the package
1428 </list>
1429         <p>
1430 Both kinds of news are generated in a similar manner: you just have to send
1431 an email either to <email>pts-static-news@qa.debian.org</email> or to
1432 <email>pts-news@qa.debian.org</email>. The mail should indicate which
1433 package is concerned by having the name of the source package in a
1434 <tt>X-PTS-Package</tt> mail header or in a <tt>Package</tt> pseudo-header (like the
1435 BTS reports). If a URL is available in the <tt>X-PTS-Url</tt> mail header or in
1436 the <tt>Url</tt> pseudo-header, then the result is a link to that URL instead
1437 of a complete news item.
1438         <p>
1439 Here are a few examples of valid mails used to generate news items in
1440 the PTS. The first one adds a link to the cvsweb interface of debian-cd
1441 in the "Static information" section:
1442 <example>
1443 From: Raphael Hertzog &lt;hertzog@debian.org&gt;
1444 To: pts-static-news@qa.debian.org
1445 Subject: Browse debian-cd CVS repository with cvsweb
1446
1447 Package: debian-cd
1448 Url: http://cvs.debian.org/debian-cd/
1449 </example>
1450         <p>
1451 The second one is an announcement sent to a mailing list which is also sent
1452 to the PTS so that it is published on the PTS web page of the package. Note the
1453 use of the BCC field to avoid answers sent to the PTS by mistake.
1454 <example>
1455 From: Raphael Hertzog &lt;hertzog@debian.org&gt;
1456 To: debian-gtk-gnome@lists.debian.org
1457 Bcc: pts-news@qa.debian.org
1458 Subject: Galeon 2.0 backported for woody
1459 X-PTS-Package: galeon
1460
1461 Hello gnomers!
1462
1463 I'm glad to announce that galeon has been backported for woody. You'll find
1464 everything here:
1465 ...
1466 </example>
1467         <p>
1468 Think twice before adding a news item to the PTS because you won't be able
1469 to remove it later and you wan't be able to edit it either. The only thing
1470 that you can do is send a second news item that will deprecate the
1471 information contained in the previous one.
1472
1473     <sect id="ddpo">Developer's packages overview
1474         <p>
1475 A QA (quality assurance) web portal is available at <url
1476             id="&url-ddpo;"> which displays a table listing all the packages
1477 of a single developer (including those where the party is listed as
1478 a co-maintainer). The table gives a good summary about the developer's 
1479 packages: number of bugs by severity, list of available versions in each
1480 distribution, testing status and much more including links to any other
1481 useful information.
1482         <p>
1483 It is a good idea to look up your own data regularly so that
1484 you don't forget any open bug, and so that you don't forget which
1485 packages are under your responsibility.
1486
1487     <sect id="alioth">Debian *Forge: Alioth
1488         <p>
1489 Alioth is a fairly new Debian service, based on a slightly modified version
1490 of the GForge software (which evolved from SourceForge). This software
1491 offers developers access to easy-to-use tools such as bug trackers, patch
1492 manager, project/task managers, file hosting services, mailing lists, CVS
1493 repositories etc. All these tools are managed via a web interface.
1494         <p>
1495 It is intended to provide facilities to free software projects backed or led
1496 by Debian, facilitate contributions from external developers to projects
1497 started by Debian, and help projects whose goals are the promotion of Debian
1498 or its derivatives.
1499         <p>
1500 For more information please visit <url id="&url-alioth;">.
1501
1502
1503    <chapt id="pkgs">Managing Packages
1504         <p>
1505 This chapter contains information related to creating, uploading,
1506 maintaining, and porting packages.
1507
1508
1509     <sect id="newpackage">New packages
1510         <p>
1511 If you want to create a new package for the Debian distribution, you
1512 should first check the <url id="&url-wnpp;" name="Work-Needing and
1513 Prospective Packages (WNPP)"> list. Checking the WNPP list ensures that
1514 no one is already working on packaging that software, and that effort is
1515 not duplicated. Read the <url id="&url-wnpp;" name="WNPP web pages"> for
1516 more information.
1517         <p>
1518 Assuming no one else is already working on your prospective package,
1519 you must then submit a bug report (<ref id="submit-bug">) against the
1520 pseudo-package <package>wnpp</package> 
1521 describing your plan to create a new package, including, but not
1522 limiting yourself to, a description of the package, the license of the
1523 prospective package, and the current URL where it can be downloaded
1524 from.
1525         <p>
1526 You should set the subject of the bug to ``ITP: <var>foo</var>
1527 -- <var>short description</var>'', substituting the name of the new
1528 package for <var>foo</var>.  The severity of the bug report must be set
1529 to <em>wishlist</em>. If you feel it's necessary, send a copy to
1530 &email-debian-devel; by putting the address in the <tt>X-Debbugs-CC:</tt> header
1531 of the message (no, don't use <tt>CC:</tt>, because that way the message's subject
1532 won't indicate the bug number).
1533         <p>
1534 Please include a <tt>Closes: bug#<var>nnnnn</var></tt> entry in the
1535 changelog of the new package in order for the bug report to be
1536 automatically closed once the new package is installed in the archive
1537 (see <ref id="upload-bugfix">).
1538         <p>
1539 There are a number of reasons why we ask maintainers to announce their
1540 intentions:
1541           <list compact>
1542             <item>
1543 It helps the (potentially new) maintainer to tap into the experience
1544 of people on the list, and lets them know if anyone else is working
1545 on it already.
1546             <item>
1547 It lets other people thinking about working on the package know that
1548 there already is a volunteer, so efforts may be shared.
1549             <item>
1550 It lets the rest of the maintainers know more about the package than
1551 the one line description and the usual changelog entry ``Initial release''
1552 that gets posted to <tt>debian-devel-changes</tt>.
1553             <item>
1554 It is helpful to the people who live off unstable (and form our first
1555 line of testers).  We should encourage these people.
1556             <item>
1557 The announcements give maintainers and other interested parties a
1558 better feel of what is going on, and what is new, in the project.
1559           </list>
1560
1561
1562     <sect id="changelog-entries">Recording changes in the package
1563           <p>
1564 Changes that you make to the package need to be recorded in the
1565 <file>debian/changelog</file>.  These changes should provide a concise
1566 description of what was changed, why (if it's in doubt), and note if
1567 any bugs were closed.  They also record when the package was
1568 completed.  This file will be installed in
1569 <file>/usr/share/doc/<var>package</var>/changelog.Debian.gz</file>, or
1570 <file>/usr/share/doc/<var>package</var>/changelog.gz</file> for native
1571 packages.
1572           <p>
1573 The <file>debian/changelog</file> file conforms to a certain structure,
1574 with a number of different fields.  One field of note, the
1575 <em>distribution</em>, is described in <ref id="distribution">.  More
1576 information about the structure of this file can be found in
1577 the Debian Policy section titled "<file>debian/changelog</file>".
1578           <p>
1579 Changelog entries can be used to automatically close Debian bugs when
1580 the package is installed into the archive.  See <ref
1581 id="upload-bugfix">.
1582           <p>
1583 It is conventional that the changelog entry of a package that
1584 contains a new upstream version of the software looks like this:
1585 <example>
1586   * new upstream version
1587 </example>
1588           <p>
1589 There are tools to help you create entries and finalize the
1590 <file>changelog</file> for release &mdash; see <ref id="devscripts">
1591 and <ref id="dpkg-dev-el">.
1592           <p>
1593 See also <ref id="bpp-debian-changelog">.
1594
1595
1596     <sect id="sanitycheck">Testing the package
1597         <p>
1598 Before you upload your package, you should do basic testing on it.  At
1599 a minimum, you should try the following activities (you'll need to
1600 have an older version of the same Debian package around):
1601 <list>
1602               <item>
1603 Install the package and make sure the software works, or upgrade the
1604 package from an older version to your new version if a Debian package
1605 for it already exists.
1606               <item>
1607 Run <prgn>lintian</prgn> over the package.  You can run
1608 <prgn>lintian</prgn> as follows: <tt>lintian -v
1609 <var>package-version</var>.changes</tt>. This will check the source
1610 package as well as the binary package.  If you don't understand the
1611 output that <prgn>lintian</prgn> generates, try adding the <tt>-i</tt>
1612 switch, which will cause <prgn>lintian</prgn> to output a very verbose
1613 description of the problem.
1614                 <p>
1615 Normally, a package should <em>not</em> be uploaded if it causes lintian
1616 to emit errors (they will start with <tt>E</tt>).
1617                 <p>
1618 For more information on <prgn>lintian</prgn>, see <ref id="lintian">.
1619               <item>
1620 Optionally run <ref id="debdiff"> to analyze changes from an older version,
1621 if one exists.
1622               <item>
1623 Downgrade the package to the previous version (if one exists) &mdash; this
1624 tests the <file>postrm</file> and <file>prerm</file> scripts.
1625               <item>
1626 Remove the package, then reinstall it.
1627             </list>
1628
1629
1630     <sect id="sourcelayout">Layout of the source package
1631         <p>
1632 There are two types of Debian source packages:
1633         <list>
1634           <item>the so-called <em>native</em> packages, where there is no
1635                 distinction between the original sources and the patches
1636                 applied for Debian
1637           <item>the (more common) packages where there's an original source
1638                 tarball file accompanied by another file that contains the
1639                 patches applied for Debian
1640         </list>
1641         <p>
1642 For the native packages, the source package includes a Debian source control
1643 file (<tt>.dsc</tt>) and the source tarball (<tt>.tar.gz</tt>). A source
1644 package of a non-native package includes a Debian source control file, the
1645 original source tarball (<tt>.orig.tar.gz</tt>) and the Debian patches
1646 (<tt>.diff.gz</tt>).
1647         <p>
1648 Whether a package is native or not is determined when it is built by
1649 <manref name="dpkg-buildpackage" section="1">. The rest of this section
1650 relates only to non-native packages.
1651         <p>
1652 The first time a version is uploaded which corresponds to a particular
1653 upstream version, the original source tar file should be uploaded and
1654 included in the <file>.changes</file> file.  Subsequently, this very same
1655 tar file should be used to build the new diffs and <file>.dsc</file>
1656 files, and will not need to be re-uploaded.
1657         <p>
1658 By default, <prgn>dpkg-genchanges</prgn> and
1659 <prgn>dpkg-buildpackage</prgn> will include the original source tar
1660 file if and only if the Debian revision part of the source version
1661 number is 0 or 1, indicating a new upstream version.  This behavior
1662 may be modified by using <tt>-sa</tt> to always include it or
1663 <tt>-sd</tt> to always leave it out.
1664         <p>
1665 If no original source is included in the upload, the original
1666 source tar-file used by <prgn>dpkg-source</prgn> when constructing the
1667 <file>.dsc</file> file and diff to be uploaded <em>must</em> be
1668 byte-for-byte identical with the one already in the archive.
1669
1670
1671     <sect id="distribution">Picking a distribution
1672         <p>
1673 Each upload needs to specify which distribution the package is intended
1674 for. The package build process extracts this information from the first
1675 line of the <file>debian/changelog</file> file and places it in the
1676 <tt>Distribution</tt> field of the <tt>.changes</tt> file.
1677         <p>
1678 There are several possible values for this field: `stable', `unstable',
1679 `testing-proposed-updates' and `experimental'. Normally, packages are
1680 uploaded into <em>unstable</em>.
1681         <p>
1682 Actually, there are two other possible distributions: `stable-security' and
1683 `testing-security', but read <ref id="bug-security"> for more information on
1684 those.
1685         <p>
1686 It is not possible to upload a package into several distributions
1687 at the same time.
1688
1689         <sect1 id="upload-stable">
1690           <heading>Special case: uploads to the <em>stable</em> distribution</heading>
1691           <p>
1692 Uploading to <em>stable</em> means that the package will be placed into the
1693 <file>stable-proposed-updates</file> directory of the Debian archive for further
1694 testing before it is actually included in <em>stable</em>.
1695           <p>
1696 Extra care should be taken when uploading to <em>stable</em>. Basically, a
1697 package should only be uploaded to stable if one of the following happens:
1698 <list>
1699         <item>a truly critical functionality problem
1700         <item>the package becomes uninstallable
1701         <item>a released architecture lacks the package
1702 </list>
1703 <p>
1704 In the past, uploads to <em>stable</em> were used to address security
1705 problems as well.  However, this practice is deprecated, as uploads
1706 used for Debian security advisories are automatically copied to the
1707 appropriate <file>proposed-updates</file> archive when the advisory is
1708 released.  See <ref id="bug-security"> for detailed information on
1709 handling security problems.
1710           <p>
1711 Changing anything else in the package that isn't important is discouraged,
1712 because even trivial fixes can cause bugs later on.
1713           <p>
1714 Packages uploaded to <em>stable</em> need to be compiled on systems running
1715 <em>stable</em>, so that their dependencies are limited to the libraries
1716 (and other packages) available in <em>stable</em>; for example, a package
1717 uploaded to <em>stable</em> that depends on a library package that only
1718 exists in unstable will be rejected. Making changes to dependencies of other
1719 packages (by messing with <tt>Provides</tt> or shlibs files), possibly making
1720 those other packages uninstallable, is strongly discouraged.
1721           <p>
1722 The Release Team (which can be reached at &email-debian-release;) will
1723 regularly evaluate the uploads in <em>stable-proposed-updates</em> and decide if
1724 your package can be included in <em>stable</em>. Please be clear (and
1725 verbose, if necessary) in your changelog entries for uploads to
1726 <em>stable</em>, because otherwise the package won't be considered for
1727 inclusion.
1728           <p>
1729 It's best practice to speak with the stable release manager <em>before</em>
1730 uploading to <em>stable</em>/<em>stable-proposed-updates</em>, so that the
1731 uploaded package fits the needs of the next point release.
1732
1733         <sect1 id="upload-t-p-u">
1734           <heading>Special case: uploads to <em>testing/testing-proposed-updates</em></heading>
1735           <p>
1736 Please see the information in the <qref id="t-p-u">testing section</qref> for details.
1737
1738
1739     <sect id="upload">Uploading a package
1740
1741         <sect1 id="upload-ftp-master">Uploading to <tt>ftp-master</tt>
1742           <p>
1743 To upload a package, you should upload the files (including the signed
1744 changes and dsc-file) with anonymous ftp to
1745 <ftpsite>&ftp-master-host;</ftpsite> in the directory &upload-queue;.
1746 To get the files processed there, they need to be signed with a key in the
1747 debian keyring.
1748           <p>
1749 Please note that you should transfer
1750 the changes file last.  Otherwise, your upload may be rejected because the
1751 archive maintenance software will parse the changes file and see that not
1752 all files have been uploaded.
1753           <p>
1754 <!-- FIXME: is this still topical? Explain the rationale? -->
1755 <em>Note:</em> Do not upload to <tt>ftp-master</tt> cryptographic
1756 packages which belong to <em>contrib</em> or <em>non-free</em>. Uploads of
1757 such software should go to <tt>non-us</tt> (see <ref
1758 id="upload-non-us">). Furthermore packages containing code that is
1759 patent-restricted by the United States government cannot be uploaded to
1760 <tt>ftp-master</tt>; depending on the case they may still be uploaded to
1761 <file>non-US/non-free</file> (it's in non-free because of distribution issues
1762 and not because of the license of the software). If you can't upload it to
1763 <tt>ftp-master</tt>, then neither can you upload it to backup
1764 queues that finally also end up on <tt>ftp-master</tt>. If you are not sure
1765 whether U.S. patent controls or cryptographic controls apply to your
1766 package, post a message to &email-debian-devel; and ask.
1767           <p>
1768 You may also find the Debian packages <ref id="dupload"> or
1769 <ref id="dput"> useful
1770 when uploading packages. These handy programs help automate the
1771 process of uploading packages into Debian.
1772           <p>
1773 For removing packages, please see the README file in that ftp directory,
1774 and the Debian package <ref id="dcut">.
1775
1776         <sect1 id="upload-non-us">Uploading to <tt>non-US</tt>
1777           <p>
1778 <em>Note:</em> non-us is currently not processed any more.
1779           <p>
1780 As discussed above, export controlled software should not be uploaded
1781 to <tt>ftp-master</tt>.  Instead, upload the package with anonymous FTP
1782 to <ftpsite>non-us.debian.org</ftpsite>, placing the files in
1783 &upload-queue; (again, both <ref id="dupload"> and <ref
1784 id="dput"> can do this for you if invoked properly).
1785           <p>
1786 Note that U.S. residents or citizens are subject to restrictions on
1787 export of cryptographic software. As of this writing, U.S. citizens
1788 are allowed to export some cryptographic software, subject to
1789 notification rules by the U.S. Department of Commerce.  However, this
1790 restriction has been waived for software which is already available
1791 outside the U.S.  Therefore, any cryptographic software which belongs
1792 in the <em>main</em> section of the Debian archive and does not depend
1793 on any package outside of <em>main</em> (e.g., does not depend on
1794 anything in <em>non-US/main</em>) can be uploaded to <tt>ftp-master</tt>
1795 or its queues, described above.
1796           <p>
1797 Debian policy does not prevent upload to non-US by U.S. residents or
1798 citizens, but care should be taken in doing so. It is recommended that
1799 developers take all necessary steps to ensure that they are not
1800 breaking current US law by doing an upload to non-US, <em>including
1801 consulting a lawyer</em>.
1802           <p>
1803 For packages in <em>non-US/main</em>, <em>non-US/contrib</em>,
1804 developers should at least follow the <url id="&url-u.s.-export;"
1805 name="procedure outlined by the US Government">.  Maintainers of
1806 <em>non-US/non-free</em> packages should further consult the <url
1807 id="&url-notification-of-export;" name="rules on notification of
1808 export"> of non-free software.
1809           <p>
1810 This section is for information only and does not constitute legal
1811 advice. Again, it is strongly recommended that U.S. citizens and
1812 residents consult a lawyer before doing uploads to non-US.
1813
1814
1815         <sect1 id="delayed-incoming">Delayed uploads
1816           <p>
1817 Delayed uploads are done for the moment via the delayed queue at
1818 gluck. The upload-directory is
1819 <ftpsite>gluck:~tfheen/DELAYED/[012345678]-day</ftpsite>.
1820 0-day is uploaded approximately one hour before dinstall runs.
1821           <p>
1822 With a fairly recent dput, this section
1823 <example>
1824 [tfheen_delayed]
1825 method = scp
1826 fqdn = gluck.debian.org
1827 incoming = ~tfheen
1828 </example>
1829 in ~/.dput.cf should work fine for uploading to the DELAYED queue.
1830           <p>
1831 <em>Note:</em>
1832 Since this upload queue goes to <tt>ftp-master</tt>, the
1833 prescription found in <ref id="upload-ftp-master"> applies here as well.
1834
1835         <sect1>Security uploads
1836           <p>
1837 Do NOT upload a package to the security upload queue (oldstable-security,
1838 stable-security, etc.) without prior authorization from the security
1839 team. If the package does not exactly meet the team's requirements, it
1840 will cause many problems and delays in dealing with the unwanted upload.
1841 For details, please see section <ref id="bug-security">.
1842
1843         <sect1>Other upload queues
1844           <p>
1845 The scp queues on ftp-master, non-us, and security are mostly unusable
1846 due to the login restrictions on those hosts.
1847           <p>
1848 The anonymous queues on ftp.uni-erlangen.de and ftp.uk.debian.org are
1849 currently down. Work is underway to resurrect those. 
1850           <p>
1851 The queues on master.debian.org, samosa.debian.org, master.debian.or.jp,
1852 and ftp.chiark.greenend.org.uk are down permanently, and will not be
1853 resurrected. The queue in Japan will be replaced with a new queue on
1854 hp.debian.or.jp some day.
1855           <p>
1856 For the time being, the anonymous ftp queue on auric.debian.org (the
1857 former ftp-master) works, but it is deprecated and will be removed at
1858 some point in the future.
1859
1860       <sect1 id="upload-notification">
1861         <heading>Notification that a new package has been installed</heading>
1862         <p>
1863 The Debian archive maintainers are responsible for handling package
1864 uploads.  For the most part, uploads are automatically handled on a
1865 daily basis by the archive maintenance tools, <prgn>katie</prgn>.
1866 Specifically, updates to existing packages to
1867 the `unstable' distribution are handled automatically. In other cases,
1868 notably new packages, placing the uploaded package into the
1869 distribution is handled manually. When uploads are handled manually,
1870 the change to the archive may take up to a month to occur. Please be
1871 patient.
1872         <p>
1873 In any case, you will receive an email notification indicating that the
1874 package has been added to the archive, which also indicates which bugs will
1875 be closed by the upload.  Please examine this notification carefully,
1876 checking if any bugs you meant to close didn't get triggered.
1877         <p>
1878 The installation notification also includes information on what
1879 section the package was inserted into.  If there is a disparity, you
1880 will receive a separate email notifying you of that.  Read on below.
1881         <p>
1882 Note that if you upload via queues, the queue daemon software will
1883 also send you a notification by email.
1884
1885     <sect id="override-file">Specifying the package section, subsection and priority
1886         <p>
1887 The <file>debian/control</file> file's <tt>Section</tt> and
1888 <tt>Priority</tt> fields do not actually specify where the file will
1889 be placed in the archive, nor its priority.  In order to retain the
1890 overall integrity of the archive, it is the archive maintainers who
1891 have control over these fields.  The values in the
1892 <file>debian/control</file> file are actually just hints.
1893         <p>
1894 The archive maintainers keep track of the canonical sections and
1895 priorities for packages in the <em>override file</em>.  If there is a
1896 disparity between the <em>override file</em> and the package's fields
1897 as indicated in <file>debian/control</file>, then you will receive an
1898 email noting the divergence when the package is installed into the
1899 archive.  You can either correct your <file>debian/control</file> file
1900 for your next upload, or else you may wish to make a change in the
1901 <em>override file</em>.
1902         <p>
1903 To alter the actual section that a package is put in, you need to
1904 first make sure that the <file>debian/control</file> in your package
1905 is accurate.  Next, send an email &email-override; or submit a bug
1906 against <package>ftp.debian.org</package> requesting that the section
1907 or priority for your package be changed from the old section or
1908 priority to the new one.  Be sure to explain your reasoning.
1909         <p>
1910 For more information about <em>override files</em>, see <manref
1911 name="dpkg-scanpackages" section="8"> and
1912 <url id="&url-bts-devel;#maintincorrect">.
1913         <p>
1914 Note that the <tt>Section</tt> field describes both the section as
1915 well as the subsection, which are described in <ref
1916 id="archive-sections">.  If the section is "main", it should be
1917 omitted.  The list of allowable subsections can be found in <url
1918 id="&url-debian-policy;ch-archive.html#s-subsections">.
1919
1920
1921     <sect id="bug-handling">Handling bugs
1922         <p>
1923 Every developer has to be able to work with the Debian <url name="bug
1924 tracking system" id="&url-bts;">. This includes knowing how to file bug
1925 reports properly (see <ref id="submit-bug">), how to update them and
1926 reorder them, and how to process and close them.
1927         <p>
1928 The bug tracking system's features are described
1929 in the <url id="&url-bts-devel;" name="BTS documentation for developers">.
1930 This includes closing bugs, sending followup messages, assigning severities
1931 and tags, marking bugs as forwarded, and other issues.
1932         <p>
1933 Operations such as reassigning bugs to other packages, merging separate
1934 bug reports about the same issue, or reopening bugs when they are
1935 prematurely closed, are handled using the so-called control mail server.
1936 All of the commands available in this server are described in the
1937 <url id="&url-bts-control;" name="BTS control server documentation">.
1938
1939       <sect1 id="bug-monitoring">Monitoring bugs
1940         <p>
1941 If you want to be a good maintainer, you should periodically check the
1942 <url id="&url-bts;" name="Debian bug tracking system (BTS)"> for your
1943 packages.  The BTS contains all the open bugs against your packages.
1944 You can check them by browsing this page:
1945 <tt>http://&bugs-host;/<var>yourlogin</var>@debian.org</tt>.
1946         <p>
1947 Maintainers interact with the BTS via email addresses at
1948 <tt>&bugs-host;</tt>.  Documentation on available commands can be
1949 found at <url id="&url-bts;">, or, if you have installed the
1950 <package>doc-debian</package> package, you can look at the local files
1951 &file-bts-docs;.
1952         <p>
1953 Some find it useful to get periodic reports on open bugs.  You can add
1954 a cron job such as the following if you want to get a weekly email
1955 outlining all the open bugs against your packages:
1956 <example>
1957 # ask for weekly reports of bugs in my packages
1958 &cron-bug-report;
1959 </example>
1960 Replace <var>address</var> with your official Debian
1961 maintainer address.
1962
1963       <sect1 id="bug-answering">Responding to bugs
1964         <p>
1965 When responding to bugs, make sure that any discussion you have about
1966 bugs is sent both to the original submitter of the bug, and to the bug
1967 itself (e.g., <email>123@&bugs-host;</email>). If you're writing a new
1968 mail and you don't remember the submitter email address, you can
1969 use the <email>123-submitter@&bugs-host;</email> email to
1970 contact the submitter <em>and</em> to record your mail within the
1971 bug log (that means you don't need to send a copy of the mail to
1972 <email>123@&bugs-host;</email>).
1973         <p>
1974 If you get a bug which mentions "FTBFS", that means "Fails to build
1975 from source".  Porters frequently use this acronym.
1976         <p>
1977 Once you've dealt with a bug report (e.g. fixed it), mark it as
1978 <em>done</em> (close it) by sending an explanation message to
1979 <email>123-done@&bugs-host;</email>. If you're fixing a bug by
1980 changing and uploading the package, you can automate bug closing as
1981 described in <ref id="upload-bugfix">.
1982         <p>
1983 You should <em>never</em> close bugs via the bug server <tt>close</tt>
1984 command sent to &email-bts-control;.  If you do so, the original
1985 submitter will not receive any information about why the bug was
1986 closed.
1987
1988       <sect1 id="bug-housekeeping">Bug housekeeping
1989         <p>
1990 As a package maintainer, you will often find bugs in other packages or
1991 have bugs reported against your packages which are actually bugs in
1992 other packages. The bug tracking system's features
1993 are described in the <url id="&url-bts-devel;" name="BTS documentation for
1994 Debian developers">. Operations such as reassigning, merging, and tagging
1995 bug reports are described in the <url id="&url-bts-control;" name="BTS
1996 control server documentation">. This section contains
1997 some guidelines for managing your own bugs, based on the collective
1998 Debian developer experience.
1999         <p>
2000 Filing bugs for problems that you find in other packages is one of
2001 the "civic obligations" of maintainership, see <ref id="submit-bug">
2002 for details. However, handling the bugs in your own packages is
2003 even more important.
2004         <p>
2005 Here's a list of steps that you may follow to handle a bug report:
2006 <enumlist>
2007     <item>
2008 Decide whether the report corresponds to a real bug or not. Sometimes
2009 users are just calling a program in the wrong way because they haven't
2010 read the documentation. If you diagnose this, just close the bug with
2011 enough information to let the user correct their problem (give pointers
2012 to the good documentation and so on). If the same report comes up
2013 again and again you may ask yourself if the documentation is good
2014 enough or if the program shouldn't detect its misuse in order to
2015 give an informative error message. This is an issue that may need
2016 to be brought up with the upstream author.
2017     <p>
2018 If the bug submitter disagrees with your decision to close the bug,
2019 they may reopen it until you find an agreement on how to handle it.
2020 If you don't find any, you may want to tag the bug <tt>wontfix</tt>
2021 to let people know that the bug exists but that it won't be corrected.
2022 If this situation is unacceptable, you (or the submitter) may want to
2023 require a decision of the technical committee by reassigning the bug
2024 to <package>tech-ctte</package> (you may use the clone command of
2025 the BTS if you wish to keep it reported against your package). Before
2026 doing so, please read the <url id="&url-tech-ctte;" name="recommended procedure">.
2027     <item>
2028 If the bug is real but it's caused by another package, just reassign
2029 the bug to the right package. If you don't know which package it should
2030 be reassigned to, you should ask for help on
2031 <qref id="irc-channels">IRC</qref> or on &email-debian-devel;.
2032     <p>
2033 Sometimes you also have to adjust the severity of the bug so that it
2034 matches our definition of the severity. That's because people tend to
2035 inflate the severity of bugs to make sure their bugs are fixed quickly.
2036 Some bugs may even be dropped to wishlist severity when the requested
2037 change is just cosmetic.
2038     <item>
2039 The bug submitter may have forgotten to provide some information, in which
2040 case you have to ask them the required information. You may use the
2041 <tt>moreinfo</tt> tag to mark the bug as such. Moreover if you can't
2042 reproduce the bug, you tag it <tt>unreproducible</tt>. Anyone who
2043 can reproduce the bug is then invited to provide more information
2044 on how to reproduce it. After a few months, if this information has not
2045 been sent by someone, the bug may be closed.
2046     <item>
2047 If the bug is related to the packaging, you just fix it. If you are not
2048 able to fix it yourself, then tag the bug as <tt>help</tt>. You can
2049 also ask for help on &email-debian-devel; or &email-debian-qa;. If it's an
2050 upstream problem, you have to forward it to the upstream author.
2051 Forwarding a bug is not enough, you have to check at each release if
2052 the bug has been fixed or not. If it has, you just close it, otherwise
2053 you have to remind the author about it. If you have the required skills
2054 you can prepare a patch that fixes the bug and that you send at the
2055 same time to the author. Make sure to send the patch to the BTS and to
2056 tag the bug as <tt>patch</tt>.
2057     <item>
2058 If you have fixed a bug in your local copy, or if a fix has been
2059 committed to the CVS repository, you may tag the bug as
2060 <tt>pending</tt> to let people know that the bug is corrected and that
2061 it will be closed with the next upload (add the <tt>closes:</tt> in
2062 the <file>changelog</file>). This is particularly useful if you
2063 are several developers working on the same package.
2064     <item>
2065 Once a corrected package is available in the <em>unstable</em>
2066 distribution, you can close the bug. This can be done automatically,
2067 read <ref id="upload-bugfix">.
2068 </enumlist>
2069
2070       <sect1 id="upload-bugfix">When bugs are closed by new uploads
2071         <p>
2072 As bugs and problems are fixed your packages, it is your
2073 responsibility as the package maintainer to close the bug.  However,
2074 you should not close the bug until the package which fixes the bug has
2075 been accepted into the Debian archive.  Therefore, once you get
2076 notification that your updated package has been installed into the
2077 archive, you can and should close the bug in the BTS.
2078         <p>
2079 However, it's possible to avoid having to manually close bugs after the
2080 upload &mdash; just list the fixed bugs in your <file>debian/changelog</file>
2081 file, following a certain syntax, and the archive maintenance software
2082 will close the bugs for you. For example:
2083
2084 <example>
2085 acme-cannon (3.1415) unstable; urgency=low
2086
2087   * Frobbed with options (closes: Bug#98339)
2088   * Added safety to prevent operator dismemberment, closes: bug#98765,
2089     bug#98713, #98714.
2090   * Added man page. Closes: #98725.
2091 </example>
2092
2093 Technically speaking, the following Perl regular expression describes
2094 how bug closing changelogs are identified:
2095 <example>
2096   /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig
2097 </example>
2098
2099 We prefer the <tt>closes: #<var>XXX</var></tt> syntax, as it is the
2100 most concise entry and the easiest to integrate with the text of the
2101 <file>changelog</file>.
2102         <p>
2103 If you happen to mistype a bug number or forget a bug in the changelog
2104 entries, don't hesitate to undo any damage the error caused. To reopen
2105 wrongly closed bugs, send an <tt>reopen <var>XXX</var></tt> command to
2106 the bug tracking system's control address, &email-bts-control;.  To
2107 close any remaining bugs that were fixed by your upload, email the
2108 <file>.changes</file> file to <email>XXX-done@&bugs-host;</email>,
2109 where <var>XXX</var> is your bug number.
2110         <p>
2111 Bear in mind that it is not obligatory to close bugs using the
2112 changelog as described above.  If you simply want to close bugs that
2113 don't have anything to do with an upload you made, do it by emailing
2114 an explanation to <email>XXX-done@&bugs-host;</email>.  Do
2115 <strong>not</strong> close bugs in the changelog entry of a version if
2116 the changes in that version of the package don't have any bearing on
2117 the bug.
2118           <p>
2119 For general information on how to write your changelog entries, see
2120 <ref id="bpp-debian-changelog">.
2121
2122
2123       <sect1 id="bug-security">Handling security-related bugs
2124         <p>
2125 Due to their sensitive nature, security-related bugs must be handled
2126 carefully.  The Debian Security Team exists to coordinate this
2127 activity, keeping track of outstanding security problems, helping
2128 maintainers with security problems or fix them themselves, sending
2129 security advisories, and maintaining security.debian.org.
2130
2131 <!-- information about the security database goes here once it's ready -->
2132 <!-- (mdz) -->
2133
2134 <p>
2135 When you become aware of a security-related bug in a Debian package,
2136 whether or not you are the maintainer, collect pertinent information
2137 about the problem, and promptly contact the security team at
2138 &email-security-team; as soon as possible.  <strong>DO NOT UPLOAD</strong> any
2139 packages for stable; the security team will do that.
2140
2141 Useful information includes, for example:
2142
2143 <list compact>
2144   <item>What versions of the package are known to be affected by the
2145   bug.  Check each version that is present in a supported Debian
2146   release, as well as testing and unstable.
2147
2148   <item>The nature of the fix, if any is available (patches are
2149   especially helpful)
2150
2151   <item>Any fixed packages that you have prepared yourself (send only
2152   the <tt>.diff.gz</tt> and <tt>.dsc</tt> files and read <ref
2153   id="bug-security-building"> first)
2154
2155   <item>Any assistance you can provide to help with testing (exploits,
2156   regression testing, etc.)
2157
2158   <item>Any information needed for the advisory (see <ref
2159   id="bug-security-advisories">)
2160
2161 </list>
2162
2163         <sect2 id="bug-security-confidentiality">Confidentiality
2164           <p>
2165 Unlike most other activities within Debian, information about security
2166 issues must sometimes be kept private for a time.
2167 This allows software distributors to coordinate their disclosure in
2168 order to minimize their users' exposure.  Whether this is the
2169 case depends on the nature of the problem and corresponding fix, and
2170 whether it is already a matter of public knowledge.
2171
2172 <p>
2173 There are a few ways a developer can learn of a security problem:
2174
2175 <list compact>
2176     <item>he notices it on a public forum (mailing list, web site, etc.)
2177     <item>someone files a bug report
2178     <item>someone informs them via private email
2179 </list>
2180
2181  In the first two cases, the information is public and it is important
2182  to have a fix as soon as possible. In the last case, however, it
2183  might not be public information. In that case there are a few
2184  possible options for dealing with the problem:
2185
2186 <list>
2187   <item>If the security exposure is minor, there is sometimes no need
2188   to keep the problem a secret and a fix should be made and released.
2189
2190   <item>If the problem is severe, it is preferable to share the
2191   information with
2192   other vendors and coordinate a release. The security team keeps
2193   contacts with the various organizations and individuals and can take
2194   care of that.
2195 </list>
2196
2197 <p>
2198  In all cases if the person who reports the problem asks that it not
2199  be disclosed, such requests should be honored, with the obvious
2200  exception of informing the security team in order that a fix may be
2201  produced for a stable release of Debian.  When sending confidential
2202  information to the security team, be sure to mention this fact.
2203
2204 <p>
2205 Please note that if secrecy is needed you may not upload a fix to
2206 unstable (or anywhere else, such as a public CVS repository).  It is
2207 not sufficient to obfuscate the details of the change, as the code
2208 itself is public, and can (and will) be examined by the general public.
2209
2210 <p>
2211 There are two reasons for releasing information even though secrecy is
2212 requested: the problem has been known for a while, or the problem
2213 or exploit has become public.
2214
2215         <sect2 id="bug-security-advisories">Security Advisories
2216           <p>
2217 Security advisories are only issued for the current, released stable
2218 distribution, and <em>not</em> for testing or unstable.  When released,
2219 advisories
2220 are sent to the &email-debian-security-announce;
2221
2222 mailing list and posted on <url
2223 id="&url-debian-security-advisories;" name="the security web page">.
2224 Security advisories are written and posted by the security
2225 team. However they certainly do not mind if a
2226 maintainer can supply some of the information for them, or write part
2227 of the text. Information that should be in an advisory includes:
2228
2229 <list compact>
2230   <item>A description of the problem and its scope, including:
2231     <list>
2232        <item>The type of problem (privilege escalation, denial of
2233   service, etc.)
2234        <item>What privileges may be gained, and by whom (if any)
2235        <item>How it can be exploited
2236        <item>Whether it is remotely or locally exploitable
2237        <item>How the problem was fixed
2238     </list>
2239
2240   This information allows users to assess the threat to their systems.
2241
2242   <item>Version numbers of affected packages
2243   <item>Version numbers of fixed packages
2244   <item>Information on where to obtain the updated packages
2245   (usually from the Debian security archive)
2246   <item>References to upstream advisories, <url
2247   id="http://cve.mitre.org" name="CVE"> identifiers, and any other
2248   information useful in cross-referencing the vulnerability
2249 </list>
2250
2251          <sect2 id="bug-security-building">
2252             <heading>Preparing packages to address security issues</heading>
2253          <p>
2254 One way that you can assist the security team in their duties is to
2255 provide them with fixed packages suitable for a security advisory for
2256 the stable
2257 Debian release.
2258          <p>
2259  When an update is made to the stable release, care must be taken to
2260  avoid changing system behavior or introducing new bugs.  In order to
2261  do this, make as few changes as possible to fix the bug.  Users and
2262  administrators rely on the exact behavior of a release once it is
2263  made, so any change that is made might break someone's system.  This
2264  is especially true of libraries: make sure you never change the API or
2265  ABI, no matter how small the change.
2266 <p>
2267 This means that moving to a new upstream version is not a good
2268 solution.  Instead, the relevant changes should be back-ported to the
2269 version present in the current stable Debian release. Generally,
2270 upstream maintainers are willing to help if needed.  If not, the
2271 Debian security team may be able to help.
2272 <p>
2273 In some cases, it is not possible to back-port a security fix, for
2274 example when large amounts of source code need to be modified or
2275 rewritten.  If this happens, it may be necessary to move to a new
2276 upstream version.  However, this is only done in extreme situations,
2277 and you must always coordinate that with the security team beforehand.
2278 <p>
2279 Related to this is another important guideline: always test your
2280 changes.  If you have an exploit available, try it and see if it
2281 indeed succeeds on the unpatched package and fails on the fixed
2282 package.  Test other, normal actions as well, as sometimes a security
2283 fix can break seemingly unrelated features in subtle ways.
2284 <p>
2285 Do <strong>NOT</strong> include any changes in your package which are
2286 not directly related to fixing the vulnerability.  These will only
2287 need to be reverted, and this wastes time.  If there are other bugs in
2288 your package that you would like to fix, make an upload to
2289 proposed-updates in the usual way, after the security advisory is
2290 issued.  The security update mechanism is not a means for introducing
2291 changes to your package which would otherwise be rejected from the
2292 stable release, so please do not attempt to do this.
2293 <p>
2294 Review and test your changes as much as possible.  Check the
2295 differences from the previous version repeatedly
2296 (<prgn>interdiff</prgn> from the <package>patchutils</package> package
2297 and <prgn>debdiff</prgn> from <package>devscripts</package> are useful
2298 tools for this, see <ref id="debdiff">).
2299 <p>
2300 Be sure to verify the following items:
2301
2302 <list>
2303     <item>Target the right distribution in your
2304     <file>debian/changelog</file>. For stable this is <tt>stable-security</tt> and for
2305     testing this is <tt>testing-security</tt>, and for the previous
2306     stable release, this is <tt>oldstable-security</tt>. Do not target
2307     <var>distribution</var>-proposed-updates or <tt>stable</tt>!
2308
2309     <item>The upload should have urgency=high.
2310
2311     <item>Make descriptive, meaningful changelog entries.  Others will
2312     rely on them to determine whether a particular bug was fixed.
2313     Always include an external reference, preferably a CVE
2314     identifier, so that it can be cross-referenced.  Include the same
2315     information in the changelog for unstable, so that it is clear that
2316     the same bug was fixed, as this is very helpful when verifying
2317     that the bug is fixed in the next stable release.  If a CVE
2318     identifier has not yet been assigned, the security team will
2319     request one so that it can be included in the package and in the advisory.
2320
2321     <item>Make sure the version number is proper. It must be greater
2322     than the current package, but less than package versions in later
2323     distributions.  If in doubt, test it with <tt>dpkg
2324     --compare-versions</tt>.  Be careful not to re-use a version
2325     number that you have already used for a previous upload.  For
2326     <em>testing</em>, there must be
2327     a higher version in <em>unstable</em>. If there is none yet (for example,
2328     if <em>testing</em> and <em>unstable</em> have the same version) you must upload a
2329     new version to unstable first.
2330
2331     <item>Do not make source-only uploads if your package has any
2332     binary-all packages (do not use the <tt>-S</tt> option to
2333     <prgn>dpkg-buildpackage</prgn>).  The <prgn>buildd</prgn> infrastructure will
2334     not build those. This point applies to normal package uploads as
2335     well.
2336
2337     <item>Unless the upstream source has been uploaded to
2338     security.debian.org before (by a previous security update), build
2339     the upload with full upstream source (<tt>dpkg-buildpackage
2340     -sa</tt>).  If there has been a previous upload to
2341     security.debian.org with the same upstream version, you may upload
2342     without upstream source (<tt>dpkg-buildpackage -sd</tt>).
2343
2344     <item>Be sure to use the exact same <file>*.orig.tar.gz</file> as used in the
2345     normal archive, otherwise it is not possible to move the security
2346     fix into the main archives later.
2347
2348     <item>Build the package on a clean
2349     system which only has packages installed from the distribution you
2350     are building for. If you do not have such a system yourself, you
2351     can use a debian.org machine (see <ref id="server-machines">)
2352     or setup a chroot (see <ref id="pbuilder"> and
2353     <ref id="debootstrap">).
2354 </list>
2355
2356       <sect2 id="bug-security-upload">Uploading the fixed package
2357 <p>
2358 Do <strong>NOT</strong> upload a package to the security upload queue
2359 (oldstable-security, stable-security, etc.) without
2360 prior authorization from the security team.  If the package does not
2361 exactly meet the team's requirements, it will cause many problems and
2362 delays in dealing with the unwanted upload.
2363 <p>
2364 Do <strong>NOT</strong> upload your fix to proposed-updates without
2365 coordinating with the security team.  Packages from
2366 security.debian.org will be copied into the proposed-updates directory
2367 automatically.  If a package with the same or a higher version number
2368 is already installed into the archive, the security update will be
2369 rejected by the archive system.  That way, the stable distribution
2370 will end up without a security update for this package instead.
2371 <p>
2372 Once you have created and tested the new package and it has been
2373 approved by the security team, it needs to be uploaded so that it can
2374 be installed in the archives. For security uploads, the place to
2375 upload to is
2376 <tt>ftp://security.debian.org/pub/SecurityUploadQueue/</tt> .
2377
2378 <p>
2379 Once an upload to the security queue has been accepted, the package
2380 will automatically be rebuilt for all architectures and stored for
2381 verification by the security team.
2382
2383 <p>
2384 Uploads which are waiting for acceptance or verification are only
2385 accessible by the security team. This is necessary since there might
2386 be fixes for security problems that cannot be disclosed yet.
2387
2388 <p>
2389 If a member of the security team accepts a package, it will be
2390 installed on security.debian.org as well as the proper
2391 <var>distribution</var>-proposed-updates on ftp-master or in the non-US
2392 archive.
2393
2394     <sect id="archive-manip">
2395       <heading>Moving, removing, renaming, adopting, and orphaning
2396       packages</heading>
2397       <p>
2398 Some archive manipulation operations are not automated in the Debian
2399 upload process.  These procedures should be manually followed by
2400 maintainers.  This chapter gives guidelines in what to do in these
2401 cases.
2402
2403       <sect1 id="moving-pkgs">Moving packages
2404         <p>
2405 Sometimes a package will change its section.  For instance, a
2406 package from the `non-free' section might be GPL'd in a later version,
2407 in which case the package should be moved to `main' or
2408 `contrib'.<footnote> See the <url id="&url-debian-policy;"
2409 name="Debian Policy Manual"> for guidelines on what section a package
2410 belongs in.
2411           </footnote>
2412         <p>
2413 If you need to change the section for one of your packages, change the
2414 package control information to place the package in the desired
2415 section, and re-upload the package (see the <url id="&url-debian-policy;"
2416 name="Debian Policy Manual"> for details). If your new section is
2417 valid, it will be moved automatically. If it does not, then contact
2418 the ftpmasters in order to understand what happened.
2419         <p>
2420 If, on the other hand, you need to change the <em>subsection</em> of
2421 one of your packages (e.g., ``devel'', ``admin''), the procedure is
2422 slightly different.  Correct the subsection as found in the control
2423 file of the package, and re-upload that.  Also, you'll need to get the
2424 override file updated, as described in <ref id="override-file">.
2425
2426
2427       <sect1 id="removing-pkgs">Removing packages
2428         <p>
2429 If for some reason you want to completely remove a package (say, if it
2430 is an old compatibility library which is no longer required), you
2431 need to file a bug against <tt>ftp.debian.org</tt> asking that the
2432 package be removed.  Make sure you indicate which distribution the
2433 package should be removed from. Normally, you can only have packages
2434 removed from <em>unstable</em> and <em>experimental</em>.  Packages
2435 are not removed from <em>testing</em> directly. Rather, they will be
2436 removed automatically after the package has been removed from
2437 <em>unstable</em> and no package in <em>testing</em> depends on it.
2438         <p>
2439 You also have to detail the reasons justifying that request. This is to
2440 avoid unwanted removals and to keep a trace of why a package has been
2441 removed. For example, you can provide the name of the package that
2442 supersedes the one to be removed.
2443         <p>
2444 Usually you only ask for the removal of a package maintained by yourself.
2445 If you want to remove another package, you have to get the approval
2446 of its maintainer.
2447         <p>
2448 If in doubt concerning whether a package is disposable, email
2449 &email-debian-devel; asking for opinions.  Also of interest is the
2450 <prgn>apt-cache</prgn> program from the <package>apt</package>
2451 package.  When invoked as <tt>apt-cache showpkg
2452 <var>package</var></tt>, the program will show details for
2453 <var>package</var>, including reverse depends.
2454 Removal of orphaned packages is discussed on &email-debian-qa;.
2455         <p>
2456 Once the package has been removed, the package's bugs should be handled.
2457 They should either be reassigned to another package in the case where
2458 the actual code has evolved into another package (e.g. <tt>libfoo12</tt>
2459 was removed because <tt>libfoo13</tt> supersedes it) or closed if the
2460 software is simply no more part of Debian.
2461
2462         <sect2>Removing packages from <file>Incoming</file>
2463           <p>
2464 In the past, it was possible to remove packages from <file>incoming</file>.
2465 However, with the introduction of the new incoming system, this is no longer
2466 possible.  Instead, you have to upload a new revision of your package with
2467 a higher version than the package you want to replace.  Both versions will be
2468 installed in the archive but only the higher version will actually be
2469 available in <em>unstable</em> since the previous version will immediately
2470 be replaced by the higher.  However, if you do proper testing of your
2471 packages, the need to replace a package should not occur too often anyway.
2472
2473       <sect1>Replacing or renaming packages
2474         <p>
2475 When you make a mistake naming your package, you should follow a two-step
2476 process to rename it. First, set
2477 your <file>debian/control</file> file to replace and conflict with the
2478 obsolete name of the package (see the <url id="&url-debian-policy;"
2479 name="Debian Policy Manual"> for details).  Once you've uploaded
2480 the package and the package has moved into the archive, file a bug
2481 against <tt>ftp.debian.org</tt> asking to remove the package with the
2482 obsolete name. Do not forget to properly reassign the package's bugs
2483 at the same time.
2484         <p>
2485 At other times, you may make a mistake in constructing your package and
2486 wish to replace it. The only way to do this is to increase the version
2487 number and upload a new version. The old version will be expired in
2488 the usual manner.  Note that this applies to each part of your package,
2489 including the sources: if you wish to replace the upstream source tarball
2490 of your package, you will need to upload it with a different version. An
2491 easy possibility is to replace <file>foo_1.00.orig.tar.gz</file> with
2492 <file>foo_1.00+0.orig.tar.gz</file>. This restriction gives each file
2493 on the ftp site a unique name, which helps to ensure consistency across the
2494 mirror network.
2495
2496       <sect1 id="orphaning">Orphaning a package
2497         <p>
2498 If you can no longer maintain a package, you need to inform the others
2499 about that, and see that the package is marked as orphaned.
2500 You should set the package maintainer to <tt>Debian QA Group
2501 &orphan-address;</tt> and submit a bug report
2502 against the pseudo package <package>wnpp</package>.  The bug report should be
2503 titled <tt>O: <var>package</var> -- <var>short description</var></tt>
2504 indicating that the package is now orphaned.  The severity of the bug
2505 should be set to <em>normal</em>; if the package has a priority of standard
2506 or higher, it should be set to important.
2507 If you feel it's necessary, send a copy
2508 to &email-debian-devel; by putting the address in the X-Debbugs-CC: header
2509 of the message (no, don't use CC:, because that way the message's subject
2510 won't indicate the bug number).
2511         <p>
2512 If you just intend to give the package away, but you can keep maintainership
2513 for the moment, then you should instead submit
2514 a bug against <package>wnpp</package> and title it <tt>RFA: <var>package</var> --
2515 <var>short description</var></tt>.
2516 <tt>RFA</tt> stands for <em>Request For Adoption</em>.
2517         <p>
2518 More information is on the <url id="&url-wnpp;" name="WNPP web pages">.
2519
2520       <sect1 id="adopting">Adopting a package
2521         <p>
2522 A list of packages in need of a new maintainer is available at in the
2523 <url name="Work-Needing and Prospective Packages list (WNPP)"
2524 id="&url-wnpp;">. If you wish to take over maintenance of any of the
2525 packages listed in the WNPP, please take a look at the aforementioned
2526 page for information and procedures.
2527         <p>
2528 It is not OK to simply take over a package that you feel is neglected
2529 &mdash; that would be package hijacking.  You can, of course, contact the
2530 current maintainer and ask them if you may take over the package.
2531 If you have reason to believe a maintainer has gone AWOL
2532 (absent without leave), see <ref id="mia-qa">.
2533         <p>
2534 Generally, you may not take over the package without the assent of the
2535 current maintainer. Even if they ignore you, that is still not grounds to
2536 take over a package. Complaints about maintainers should be brought up on
2537 the developers' mailing list. If the discussion doesn't end with a positive
2538 conclusion, and the issue is of a technical nature, consider bringing it to
2539 the attention of the technical committee (see the <url name="technical
2540 committee web page" id="&url-tech-ctte;"> for more information).
2541         <p>
2542 If you take over an old package, you probably want to be listed as the
2543 package's official maintainer in the bug system. This will happen
2544 automatically once you upload a new version with an updated
2545 <tt>Maintainer:</tt> field, although it can take a few hours after the
2546 upload is done. If you do not expect to upload a new version for a while,
2547 you can use <ref id="pkg-tracking-system"> to get the bug reports. However,
2548 make sure that the old maintainer has no problem with the fact that
2549 they will continue to receive the bugs during that time.
2550
2551
2552     <sect id="porting">Porting and being ported
2553       <p>
2554 Debian supports an ever-increasing number of architectures.  Even if
2555 you are not a porter, and you don't use any architecture but one, it
2556 is part of your duty as a maintainer to be aware of issues of
2557 portability.  Therefore, even if you are not a porter, you should read
2558 most of this chapter.
2559       <p>
2560 Porting is the act of building Debian packages for architectures that
2561 are different from the original architecture of the package
2562 maintainer's binary package.  It is a unique and essential activity.
2563 In fact, porters do most of the actual compiling of Debian packages.
2564 For instance, for a single <em>i386</em> binary package, there must be
2565 a recompile for each architecture, which amounts to
2566 &number-of-arches; more builds.
2567
2568
2569       <sect1 id="kind-to-porters">Being kind to porters
2570         <p>
2571 Porters have a difficult and unique task, since they are required to
2572 deal with a large volume of packages.  Ideally, every source package
2573 should build right out of the box.  Unfortunately, this is often not
2574 the case.  This section contains a checklist of ``gotchas'' often
2575 committed by Debian maintainers &mdash; common problems which often stymie
2576 porters, and make their jobs unnecessarily difficult.
2577         <p>
2578 The first and most important thing is to respond quickly to bug or
2579 issues raised by porters.  Please treat porters with courtesy, as if
2580 they were in fact co-maintainers of your package (which, in a way, they
2581 are).  Please be tolerant of succinct or even unclear bug reports;
2582 do your best to hunt down whatever the problem is.
2583         <p>
2584 By far, most of the problems encountered by porters are caused by
2585 <em>packaging bugs</em> in the source packages.  Here is a checklist
2586 of things you should check or be aware of.
2587
2588 <enumlist>
2589             <item>
2590 Make sure that your <tt>Build-Depends</tt> and
2591 <tt>Build-Depends-Indep</tt> settings in <file>debian/control</file>
2592 are set properly.  The best way to validate this is to use the
2593 <package>debootstrap</package> package to create an unstable chroot
2594 environment (see <ref id="debootstrap">).
2595 Within that chrooted environment, install the
2596 <package>build-essential</package> package and any package
2597 dependencies mentioned in <tt>Build-Depends</tt> and/or
2598 <tt>Build-Depends-Indep</tt>.  Finally, try building your package
2599 within that chrooted environment.  These steps can be automated
2600 by the use of the <prgn>pbuilder</prgn> program which is provided by
2601 the package of the same name (see <ref id="pbuilder">).
2602                 <p>
2603 If you can't set up a proper chroot, <prgn>dpkg-depcheck</prgn> may be
2604 of assistance (see <ref id="dpkg-depcheck">).
2605                 <p>
2606 See the <url id="&url-debian-policy;" name="Debian Policy
2607 Manual"> for instructions on setting build dependencies.
2608             <item>
2609 Don't set architecture to a value other than ``all'' or ``any'' unless
2610 you really mean it.  In too many cases, maintainers don't follow the
2611 instructions in the <url id="&url-debian-policy;" name="Debian Policy
2612 Manual">.  Setting your architecture to ``i386'' is usually incorrect.
2613             <item>
2614 Make sure your source package is correct.  Do <tt>dpkg-source -x
2615 <var>package</var>.dsc</tt> to make sure your source package unpacks
2616 properly.  Then, in there, try building your package from scratch with
2617 <prgn>dpkg-buildpackage</prgn>.
2618             <item>
2619 Make sure you don't ship your source package with the
2620 <file>debian/files</file> or <file>debian/substvars</file> files.
2621 They should be removed by the `clean' target of
2622 <file>debian/rules</file>.
2623             <item>
2624 Make sure you don't rely on locally installed or hacked configurations
2625 or programs.  For instance, you should never be calling programs in
2626 <file>/usr/local/bin</file> or the like.  Try not to rely on programs
2627 being setup in a special way.  Try building your package on another
2628 machine, even if it's the same architecture.
2629             <item>
2630 Don't depend on the package you're building being installed already (a
2631 sub-case of the above issue).
2632             <item>
2633 Don't rely on the compiler being a certain version, if possible.  If
2634 not, then make sure your build dependencies reflect the restrictions,
2635 although you are probably asking for trouble, since different
2636 architectures sometimes standardize on different compilers.
2637             <item>
2638 Make sure your debian/rules contains separate ``binary-arch'' and
2639 ``binary-indep'' targets, as the Debian Policy Manual requires.
2640 Make sure that both targets work independently, that is, that you can
2641 call the target without having called the other before. To test this,
2642 try to run <tt>dpkg-buildpackage -B</tt>.
2643           </enumlist>
2644
2645
2646       <sect1 id="porter-guidelines">Guidelines for porter uploads
2647         <p>
2648 If the package builds out of the box for the architecture to be ported
2649 to, you are in luck and your job is easy.  This section applies to
2650 that case; it describes how to build and upload your binary package so
2651 that it is properly installed into the archive.  If you do have to
2652 patch the package in order to get it to compile for the other
2653 architecture, you are actually doing a source NMU, so consult <ref
2654 id="nmu-guidelines"> instead.
2655         <p>
2656 For a porter upload, no changes are being made to the source.  You do
2657 not need to touch any of the files in the source package.  This
2658 includes <file>debian/changelog</file>.
2659         <p>
2660 The way to invoke <prgn>dpkg-buildpackage</prgn> is as
2661 <tt>dpkg-buildpackage -B -m<var>porter-email</var></tt>.  Of course,
2662 set <var>porter-email</var> to your email address.  This will do a
2663 binary-only build of only the architecture-dependent portions of the
2664 package, using the `binary-arch' target in <file>debian/rules</file>.
2665         <p>
2666 If you are working on a Debian machine for your porting efforts and you
2667 need to sign your upload locally for its acceptance in the archive, you
2668 can run <prgn>debsign</prgn> on your <file>.changes</file> file to have
2669 it signed conveniently, or use the remote signing mode of <prgn>dpkg-sig</prgn>.
2670
2671
2672         <sect2 id="binary-only-nmu">
2673           <heading>Recompilation or binary-only NMU</heading>
2674         <p>
2675 Sometimes the initial porter upload is problematic because the environment
2676 in which the package was built was not good enough (outdated or obsolete
2677 library, bad compiler, ...). Then you may just need to recompile it in
2678 an updated environment. However, you have to bump the version number in
2679 this case, so that the old bad package can be replaced in the Debian archive
2680 (<prgn>katie</prgn> refuses to install new packages if they don't have a
2681 version number greater than the currently available one).
2682         <p>
2683 You have to make sure that your binary-only NMU doesn't render the package
2684 uninstallable. This could happen when a source package generates
2685 arch-dependent and arch-independent packages that depend on each other via
2686 $(Source-Version).
2687         <p>
2688 Despite the
2689 required modification of the changelog, these are called binary-only NMUs
2690 &mdash; there is no need in this case to trigger all other architectures
2691 to consider themselves out of date or requiring recompilation.
2692         <p>
2693 Such recompilations require special ``magic'' version numbering, so that
2694 the archive maintenance tools recognize that, even though there is a
2695 new Debian version, there is no corresponding source update.  If you
2696 get this wrong, the archive maintainers will reject your upload (due
2697 to lack of corresponding source code).
2698         <p>
2699 The ``magic'' for a recompilation-only NMU is triggered by using the
2700 third-level number on the Debian part of the version.  For instance,
2701 if the latest version you are recompiling against was version
2702 ``2.9-3'', your NMU should carry a version of ``2.9-3.0.1''.  If the
2703 latest version was ``3.4-2.1'', your NMU should have a version number
2704 of ``3.4-2.1.1''.
2705         <p>
2706 Similar to initial porter uploads, the correct way of invoking
2707 <prgn>dpkg-buildpackage</prgn> is <tt>dpkg-buildpackage -B</tt> to only
2708 build the architecture-dependent parts of the package.
2709
2710
2711         <sect2 id="source-nmu-when-porter">
2712           <heading>When to do a source NMU if you are a porter</heading>
2713           <p>
2714 Porters doing a source NMU generally follow the guidelines found in
2715 <ref id="nmu">, just like non-porters.  However, it is expected that
2716 the wait cycle for a porter's source NMU is smaller than for a
2717 non-porter, since porters have to cope with a large quantity of
2718 packages.
2719 Again, the situation varies depending on the distribution they are
2720 uploading to. It also varies whether the architecture is a candidate
2721 for inclusion into the next stable release; the release managers
2722 decide and announce which architectures are candidates.
2723           <p>
2724 If you are a porter doing an NMU for `unstable', the above
2725 guidelines for porting should be followed, with two variations.
2726 Firstly, the acceptable waiting period &mdash; the time between when the
2727 bug is submitted to the BTS and when it is OK to do an NMU &mdash; is seven
2728 days for porters working on the unstable distribution.  This period
2729 can be shortened if the problem is critical and imposes hardship on
2730 the porting effort, at the discretion of the porter group.  (Remember,
2731 none of this is Policy, just mutually agreed upon guidelines.)
2732 For uploads to stable or testing, please coordinate with the appropriate
2733 release team first.
2734           <p>
2735 Secondly, porters doing source NMUs should make sure that the bug they
2736 submit to the BTS should be of severity `serious' or greater.  This
2737 ensures that a single source package can be used to compile every
2738 supported Debian architecture by release time.  It is very important
2739 that we have one version of the binary and source package for all
2740 architecture in order to comply with many licenses.
2741           <p>
2742 Porters should try to avoid patches which simply kludge around bugs in
2743 the current version of the compile environment, kernel, or libc.
2744 Sometimes such kludges can't be helped.  If you have to kludge around
2745 compiler bugs and the like, make sure you <tt>#ifdef</tt> your work
2746 properly; also, document your kludge so that people know to remove it
2747 once the external problems have been fixed.
2748           <p>
2749 Porters may also have an unofficial location where they can put the
2750 results of their work during the waiting period.  This helps others
2751 running the port have the benefit of the porter's work, even during
2752 the waiting period.  Of course, such locations have no official
2753 blessing or status, so buyer beware.
2754
2755
2756       <sect1 id="porter-automation">
2757           <heading>Porting infrastructure and automation</heading>
2758           <p>
2759 There is infrastructure and several tools to help automate the package
2760 porting. This section contains a brief overview of this automation and
2761 porting to these tools; see the package documentation or references for
2762 full information.</p>
2763
2764           <sect2>
2765             <heading>Mailing lists and web pages</heading>
2766             <p>
2767 Web pages containing the status of each port can be found at <url
2768 id="&url-debian-ports;">.
2769             <p>
2770 Each port of Debian has a mailing list.  The list of porting mailing
2771 lists can be found at <url id="&url-debian-port-lists;">.  These lists
2772 are used to coordinate porters, and to connect the users of a given
2773 port with the porters.</p>
2774           </sect2>
2775
2776           <sect2>
2777             <heading>Porter tools</heading>
2778             <p>
2779 Descriptions of several porting tools can be found in <ref
2780 id="tools-porting">.</p>
2781           </sect2>
2782
2783           <sect2 id="buildd">
2784             <heading><package>buildd</package></heading>
2785             <p>
2786 The <package>buildd</package> system is used as a distributed,
2787 client-server build distribution system.  It is usually used in
2788 conjunction with <em>auto-builders</em>, which are ``slave'' hosts
2789 which simply check out and attempt to auto-build packages which need
2790 to be ported.  There is also an email interface to the system, which
2791 allows porters to ``check out'' a source package (usually one which
2792 cannot yet be auto-built) and work on it.
2793           <p>
2794 <package>buildd</package> is not yet available as a package; however,
2795 most porting efforts are either using it currently or planning to use
2796 it in the near future.  The actual automated builder is packaged as
2797 <package>sbuild</package>, see its description in <ref id="sbuild">.
2798 The complete <package>buildd</package> system also collects a number of as yet unpackaged
2799 components which are currently very useful and in use continually,
2800 such as <prgn>andrea</prgn> and
2801 <prgn>wanna-build</prgn>.
2802           <p>
2803 Some of the data produced by <package>buildd</package> which is
2804 generally useful to porters is available on the web at <url
2805 id="&url-buildd;">.  This data includes nightly updated information
2806 from <prgn>andrea</prgn> (source dependencies) and
2807 <package>quinn-diff</package> (packages needing recompilation).
2808           <p>
2809 We are quite proud of this system, since it has so
2810 many possible uses.  Independent development groups can use the system for
2811 different sub-flavors of Debian, which may or may not really be of
2812 general interest (for instance, a flavor of Debian built with <prgn>gcc</prgn>
2813 bounds checking).  It will also enable Debian to recompile entire
2814 distributions quickly.
2815           </sect2>
2816
2817
2818     <sect id="nmu">Non-Maintainer Uploads (NMUs)
2819       <p>
2820 Under certain circumstances it is necessary for someone other than the
2821 official package maintainer to make a release of a package. This is
2822 called a non-maintainer upload, or NMU.
2823        <p>
2824 This section handles only source NMUs, i.e. NMUs which upload a new
2825 version of the package. For binary-only NMUs by porters or QA members,
2826 please see <ref id="binary-only-nmu">.
2827 If a buildd builds and uploads a package,
2828 that too is strictly speaking a binary NMU.
2829 See <ref id="buildd"> for some more information.
2830         <p>
2831 The main reason why NMUs are done is when a
2832 developer needs to fix another developer's packages in order to
2833 address serious problems or crippling bugs
2834 or when the package maintainer is unable to release a fix
2835 in a timely fashion.
2836         <p>
2837 First and foremost, it is critical that NMU patches to source should
2838 be as non-disruptive as possible.  Do not do housekeeping tasks, do
2839 not change the name of modules or files, do not move directories; in
2840 general, do not fix things which are not broken.  Keep the patch as
2841 small as possible.  If things bother you aesthetically, talk to the
2842 Debian maintainer, talk to the upstream maintainer, or submit a bug.
2843 However, aesthetic changes must <em>not</em> be made in a non-maintainer
2844 upload.
2845         <p>
2846 And please remember the Hippocratic Oath: "Above all, do no harm."
2847 It is better if a package has an grave bug open, than if a not working
2848 patch was applied, and the bug is only hidden now but not resolved.
2849
2850
2851       <sect1 id="nmu-guidelines">How to do a NMU
2852         <p>
2853 NMUs which fix important, serious or higher severity bugs are encouraged
2854 and accepted.
2855 You should endeavor to reach the current maintainer of the package; they
2856 might be just about to upload a fix for the problem, or have a better
2857 solution present.
2858         <p>
2859 NMUs should be made to assist a package's maintainer in resolving bugs.
2860 Maintainers should be thankful for that help, and NMUers should respect
2861 the decisions of maintainers, and try to personally help the maintainer by
2862 their work.
2863         <p>
2864 A NMU should follow all conventions, written down in this section.
2865 For an upload to testing or unstable, this order of steps is recommended:
2866         <p>
2867 <list>
2868             <item>
2869 Make sure that the package's bugs that the NMU is meant to address are all
2870 filed in the Debian Bug Tracking System (BTS).
2871 If they are not, submit them immediately.
2872             <item>
2873 Wait a few days for the response from the maintainer. If you don't get
2874 any response, you may want to help them by sending the patch that fixes
2875 the bug. Don't forget to tag the bug with the "patch" keyword.
2876             <item>
2877 Wait a few more days. If you still haven't got an answer from the
2878 maintainer, send them a mail announcing your intent to NMU the package.
2879 Prepare an NMU as described in this section, and test it
2880 carefully on your machine (cf. <ref id="sanitycheck">).
2881 Double check that your patch doesn't have any unexpected side effects.
2882 Make sure your patch is as small and as non-disruptive as it can be.  
2883             <item>
2884 Upload your package to incoming in <file>DELAYED/7-day</file> (cf.
2885 <ref id="delayed-incoming">), send the final patch to the maintainer via
2886 the BTS, and explain to them that they have 7 days to react if they want
2887 to cancel the NMU.
2888             <item>
2889 Follow what happens, you're responsible for any bug that you introduced
2890 with your NMU. You should probably use <ref id="pkg-tracking-system"> (PTS)
2891 to stay informed of the state of the package after your NMU.
2892 </list>
2893         <p>
2894 At times, the release manager or an organized group of developers can
2895 announce a certain period of time in which the NMU rules are relaxed.
2896 This usually involves shortening the period during which one is to wait
2897 before uploading the fixes, and shortening the DELAYED period. It is
2898 important to notice that even in these so-called "bug squashing party"
2899 times, the NMU'er has to file bugs and contact the developer first,
2900 and act later.
2901 Please see <ref id="qa-bsp"> for details.
2902         <p>
2903 For the testing distribution, the rules may be changed by the release
2904 managers. Please take additional care, and acknowledge that the usual way
2905 for a package to enter testing is through unstable.
2906         <p>
2907 For the stable distribution, please take extra care. Of course, the release
2908 managers may also change the rules here. Please verify before upload that
2909 all your changes are OK for inclusion into the next stable release by the
2910 release manager.
2911         <p>
2912 When a security bug is detected, the security team may do an NMU, using
2913 their own rules. Please refer to <ref id="bug-security"> for more
2914 information.
2915         <p>
2916 For the differences for Porters NMUs, please see 
2917 <ref id="source-nmu-when-porter">.
2918         <p>
2919 Of course, it is always possible to agree on special rules with a maintainer
2920 (like the maintainer asking "please upload this fix directly for me, and no
2921 diff required").
2922
2923
2924         <sect1 id="nmu-version">NMU version numbering
2925           <p>
2926 Whenever you have made a change to a package, no matter how trivial,
2927 the version number needs to change.  This enables our packing system
2928 to function.
2929           <p>
2930 If you are doing a non-maintainer upload (NMU), you should add a new
2931 minor version number to the <var>debian-revision</var> part of the
2932 version number (the portion after the last hyphen).  This extra minor
2933 number will start at `1'.  For example, consider the package `foo',
2934 which is at version 1.1-3.  In the archive, the source package control
2935 file would be <file>foo_1.1-3.dsc</file>.  The upstream version is
2936 `1.1' and the Debian revision is `3'.  The next NMU would add a new
2937 minor number `.1' to the Debian revision; the new source control file
2938 would be <file>foo_1.1-3.1.dsc</file>.
2939           <p>
2940 The Debian revision minor number is needed to avoid stealing one of
2941 the package maintainer's version numbers, which might disrupt their
2942 work.  It also has the benefit of making it visually clear that a
2943 package in the archive was not made by the official maintainer.
2944           <p>
2945 If there is no <var>debian-revision</var> component in the version
2946 number then one should be created, starting at `0.1'.  If it is
2947 absolutely necessary for someone other than the usual maintainer to
2948 make a release based on a new upstream version then the person making
2949 the release should start with the <var>debian-revision</var> value
2950 `0.1'.  The usual maintainer of a package should start their
2951 <var>debian-revision</var> numbering at `1'. 
2952         <p>
2953 If you upload a package to testing or stable, sometimes, you need to
2954 "fork" the version number tree. For this, version numbers like
2955 1.1-3sarge0.1 could be used.
2956
2957
2958         <sect1 id="nmu-changelog">
2959           <heading>Source NMUs must have a new changelog entry</heading>
2960           <p>
2961 A non-maintainer doing a source NMU must create a changelog entry,
2962 describing which bugs are fixed by the NMU, and generally why the NMU
2963 was required and what it fixed.  The changelog entry will have the
2964 non-maintainer's email address in the log entry and the NMU version
2965 number in it.
2966           <p>
2967 By convention, source NMU changelog entries start with the line
2968 <example>
2969   * Non-maintainer upload
2970 </example>
2971
2972
2973         <sect1 id="nmu-patch">Source NMUs and the Bug Tracking System
2974           <p>
2975 Maintainers other than the official package maintainer should make as
2976 few changes to the package as possible, and they should always send a
2977 patch as a unified context diff (<tt>diff -u</tt>) detailing their
2978 changes to the Bug Tracking System.
2979           <p>
2980 What if you are simply recompiling the package? If you just need to
2981 recompile it for a single architecture, then you may do a binary-only
2982 NMU as described in <ref id="binary-only-nmu"> which doesn't require any
2983 patch to be sent. If you want the package to be recompiled for all
2984 architectures, then you do a source NMU as usual and you will have to
2985 send a patch.
2986           <p>
2987 If the source NMU (non-maintainer upload) fixes some existing bugs,
2988 these bugs should be tagged <em>fixed</em> in the Bug Tracking
2989 System rather than closed.  By convention, only the official package
2990 maintainer or the original bug submitter close bugs.
2991 Fortunately, Debian's archive system recognizes NMUs and thus marks
2992 the bugs fixed in the NMU appropriately if the person doing the NMU
2993 has listed all bugs in the changelog with the <tt>Closes:
2994 bug#<var>nnnnn</var></tt> syntax (see <ref id="upload-bugfix"> for
2995 more information describing how to close bugs via the changelog).
2996 Tagging the bugs <em>fixed</em> ensures that everyone knows that the
2997 bug was fixed in an NMU; however the bug is left open until the
2998 changes in the NMU are incorporated officially into the package by
2999 the official package maintainer.
3000           <p>
3001 Also, after doing an NMU, you have to send
3002 that information to the existing bugs that are fixed by your NMU,
3003 including the unified diff.
3004 Alternatively you can open a new bug and include a
3005 patch showing all the changes you have made.
3006 The normal maintainer will either apply the patch or employ an alternate
3007 method of fixing the problem.  Sometimes bugs are fixed independently
3008 upstream, which is another good reason to back out an NMU's patch.
3009 If the maintainer decides not to apply the NMU's patch but to release a
3010 new version, the maintainer needs to ensure that the new upstream version
3011 really fixes each problem that was fixed in the non-maintainer release.
3012           <p>
3013 In addition, the normal maintainer should <em>always</em> retain the
3014 entry in the changelog file documenting the non-maintainer upload.
3015
3016
3017         <sect1 id="nmu-build">Building source NMUs
3018           <p>
3019 Source NMU packages are built normally.  Pick a distribution using the
3020 same rules as found in <ref id="distribution">, follow the other
3021 prescriptions in <ref id="upload">.
3022           <p>
3023 Make sure you do <em>not</em> change the value of the maintainer in
3024 the <file>debian/control</file> file.  Your name as given in the NMU entry of
3025 the <file>debian/changelog</file> file will be used for signing the
3026 changes file.
3027
3028       <sect1 id="ack-nmu">Acknowledging an NMU
3029         <p>
3030 If one of your packages has been NMU'ed, you have to incorporate the
3031 changes in your copy of the sources. This is easy, you just have
3032 to apply the patch that has been sent to you. Once this is done, you
3033 have to close the bugs that have been tagged fixed by the NMU. The easiest
3034 way is to use the <tt>-v</tt> option of <prgn>dpkg-buildpackage</prgn>,
3035 as this allows you to include just all changes since your last maintainer
3036 upload. Alternativly, you
3037 can close them manually by sending the required mails to the
3038 BTS or by adding the required <tt>closes: #nnnn</tt> in the changelog
3039 entry of your next upload.
3040         <p>
3041 In any case, you should not be upset by the NMU. An NMU is not a
3042 personal attack against the maintainer. It is a proof that
3043 someone cares enough about the package and that they were willing to help
3044 you in your work, so you should be thankful. You may also want to
3045 ask them if they would be interested in helping you on a more frequent
3046 basis as co-maintainer or backup maintainer
3047 (see <ref id="collaborative-maint">).
3048
3049       <sect1 id="nmu-vs-qa">NMU vs QA uploads
3050         <p>
3051 Unless you know the maintainer is still active, it is wise to check the
3052 package to see if it has been orphaned.  The current list of orphaned
3053 packages which haven't had their maintainer set correctly is available at
3054 <url id="&url-debian-qa-orphaned;">.  If you perform an NMU on an
3055 improperly orphaned package, please set the maintainer to ``Debian QA Group
3056 &lt;packages@qa.debian.org&gt;''. Also, the bugs are closed in that case,
3057 and not only marked fixed.
3058
3059       <sect1 id="nmu-who">Who can do an NMU
3060         <p>
3061 Only official, registered Debian maintainers can do binary or source
3062 NMUs.  An official maintainer is someone who has their key in the
3063 Debian key ring.  Non-developers, however, are encouraged to download
3064 the source package and start hacking on it to fix problems; however,
3065 rather than doing an NMU, they should just submit worthwhile patches
3066 to the Bug Tracking System.  Maintainers almost always appreciate
3067 quality patches and bug reports.
3068
3069       <sect1 id="nmu-terms">Terminology
3070         <p>
3071 There are two new terms used throughout this section: ``binary-only NMU''
3072 and ``source NMU''.  These terms are used with specific technical
3073 meaning throughout this document.  Both binary-only and source NMUs are
3074 similar, since they involve an upload of a package by a developer who
3075 is not the official maintainer of that package.  That is why it's a
3076 <em>non-maintainer</em> upload.
3077         <p>
3078 A source NMU is an upload of a package by a developer who is not the
3079 official maintainer, for the purposes of fixing a bug in the package.
3080 Source NMUs always involves changes to the source (even if it is just
3081 a change to <file>debian/changelog</file>).  This can be either a
3082 change to the upstream source, or a change to the Debian bits of the
3083 source.  Note, however, that source NMUs may also include
3084 architecture-dependent packages, as well as an updated Debian diff.
3085         <p>
3086 A binary-only NMU is a recompilation and upload of a binary package
3087 for a given architecture.  As such, it is usually part of a porting
3088 effort.  A binary-only NMU is a non-maintainer uploaded binary version
3089 of a package, with no source changes required.  There are many cases
3090 where porters must fix problems in the source in order to get them to
3091 compile for their target architecture; that would be considered a
3092 source NMU rather than a binary-only NMU.  As you can see, we don't
3093 distinguish in terminology between porter NMUs and non-porter NMUs.
3094         <p>
3095 Both classes of NMUs, source and binary-only, can be lumped by the
3096 term ``NMU''.  However, this often leads to confusion, since most
3097 people think ``source NMU'' when they think ``NMU''.  So it's best to
3098 be careful: always use ``binary NMU'' or ``binNMU'' for binary-only
3099 NMUs.
3100
3101
3102     <sect id="collaborative-maint">
3103         <heading>Collaborative maintenance</heading>
3104         <p>
3105 "Collaborative maintenance" is a term describing the sharing of Debian
3106 package maintenance duties by several people.  This collaboration is
3107 almost always a good idea, since it generally results in higher quality and
3108 faster bug fix turnaround time.  It is strongly recommended that
3109 packages with a priority of <tt>Standard</tt> or which are part of
3110 the base set have co-maintainers.</p>
3111         <p>
3112 Generally there is a primary maintainer and one or more
3113 co-maintainers.  The primary maintainer is the person whose name is listed in
3114 the <tt>Maintainer</tt> field of the <file>debian/control</file> file.
3115 Co-maintainers are all the other maintainers.</p>
3116         <p>
3117 In its most basic form, the process of adding a new co-maintainer is
3118 quite easy:
3119 <list>
3120             <item>
3121               <p>
3122 Setup the co-maintainer with access to the sources you build the
3123 package from.  Generally this implies you are using a network-capable
3124 version control system, such as <prgn>CVS</prgn> or
3125 <prgn>Subversion</prgn>.</p>
3126             </item>
3127             <item>
3128               <p>
3129 Add the co-maintainer's correct maintainer name and address to the
3130 <tt>Uploaders</tt> field in the global part of the
3131 <file>debian/control</file> file.
3132 <example>
3133 Uploaders: John Buzz &lt;jbuzz@debian.org&gt;, Adam Rex &lt;arex@debian.org&gt;
3134 </example>
3135 </p>
3136             </item>
3137             <item>
3138               <p>
3139 Using the PTS (<ref id="pkg-tracking-system">), the co-maintainers
3140 should subscribe themselves to the appropriate source package.</p>
3141             </item>
3142           </list></p>
3143         <p>
3144 Collaborative maintenance can often be further eased with the use of
3145 tools on Alioth (see <ref id="alioth">).
3146       </sect>
3147
3148     <sect id="testing">
3149         <heading>The testing distribution</heading>
3150         <p>
3151         <sect1 id="testing-basics">
3152         <heading>Basics</heading>
3153         <p>
3154 Packages are usually installed into the `testing' distribution after they
3155 have undergone some degree of testing in unstable.
3156         <p>
3157 They must be in sync on all architectures and
3158 mustn't have dependencies that make them uninstallable; they also have to
3159 have generally no known release-critical bugs at the time they're
3160 installed into testing.
3161 This way, `testing' should always be close to being a release candidate.
3162 Please see below for details.
3163         <sect1 id="testing-unstable">
3164         <heading>Updates from unstable</heading>
3165         <p>
3166 The scripts that update the <em>testing</em> distribution are run each
3167 day after the installation of the updated packages. They generate the
3168 <file>Packages</file> files for the <em>testing</em> distribution, but
3169 they do so in an intelligent manner; they try to avoid any inconsistency
3170 and to use only non-buggy packages.
3171         <p>
3172 The inclusion of a package from <em>unstable</em> is conditional on
3173 the following:
3174 <list>
3175     <item>
3176 The package must have been available in <em>unstable</em> for 2, 5 or 10
3177 days, depending on the urgency (high, medium or low).
3178 Please note that the urgency is sticky, meaning that the highest
3179 urgency uploaded since the previous testing transition is taken into account.
3180 Those delays may be doubled during a freeze, or testing transitions may be
3181 switched off altogether;
3182     <item>
3183 It must have fewer release-critical bugs than the version currently available
3184 in <em>testing</em>;
3185     <item>
3186 It must be available on all architectures on which it has previously
3187 been built in unstable. <ref id="madison"> may be of interest to
3188 check that information;
3189     <item>
3190 It must not break any dependency of a package which is already available
3191 in <em>testing</em>;
3192     <item>
3193 The packages on which it depends must either be available in <em>testing</em>
3194 or they must be accepted into <em>testing</em> at the same time (and they will
3195 if they fulfill all the necessary criteria);
3196 </list>
3197         <p>
3198 To find out whether a package is progressing into testing or not, see the
3199 testing script output on the <url name="web page of the testing distribution"
3200 id="&url-testing-maint;">, or use the program <prgn>grep-excuses</prgn>
3201 which is in the <package>devscripts</package> package. This utility can
3202 easily be used in a <manref name="crontab" section="5"> to keep yourself
3203 informed of the progression of your packages into <em>testing</em>.
3204         <p>
3205 The <file>update_excuses</file> file does not always give the precise reason
3206 why the package is refused; you may have to find it on your own by looking
3207 for what would break with the inclusion of the package. The
3208 <url id="&url-testing-maint;" name="testing web page"> gives some more
3209 information about the usual problems which may be causing such troubles.
3210         <p>
3211 Sometimes, some packages never enter <em>testing</em> because the set of
3212 inter-relationship is too complicated and cannot be sorted out
3213 by the scripts. See below for details.
3214         <p>
3215 Some further dependency analysis is shown on
3216 <url id="http://bjorn.haxx.se/debian/"> &mdash; but be warned,
3217 this page also shows build dependencies which
3218 are not considered by britney.
3219
3220         <sect2 id="outdated">
3221         <heading>out-of-date</heading>
3222         <p>
3223 <!-- FIXME: better rename this file than document rampant professionalism? -->
3224 For the testing migration script, "outdated" means: There are different
3225 versions in unstable for the release architectures (except for the
3226 architectures in fuckedarches; fuckedarches is a list of architectures
3227 that don't keep up (in update_out.py), but currently, it's empty).
3228 "outdated" has nothing whatsoever to do with the architectures this package
3229 has in testing.
3230         <p>
3231 Consider this example:
3232         <p>
3233         <example>
3234 foo      | alpha | arm 
3235 ---------+-------+----
3236 testing  |   1   |  -
3237 unstable |   1   |  2
3238 </example>
3239         <p>
3240 The package is out of date on alpha in unstable, and will not go to
3241 testing. And removing foo from testing would not help at all, the package
3242 is still out of date on alpha, and will not propagate to testing.
3243         <p>
3244 However, if ftp-master removes a package in unstable (here on arm):
3245         <p>
3246         <example>
3247 foo      | alpha | arm | hurd-i386
3248 ---------+-------+-----+----------
3249 testing  |   1   |  1  |    -
3250 unstable |   2   |  -  |    1
3251         </example>
3252         <p>
3253 In this case, the package is up to date on all release architectures in
3254 unstable (and the extra hurd-i386 doesn't matter, as it's not a release
3255 architecture).
3256         <p>
3257 Sometimes, the question is raised if it is possible to allow packages in
3258 that are not yet built on all architectures: No. Just plainly no. (Except
3259 if you maintain glibc or so.)
3260
3261         <sect2 id="removals">
3262         <heading>Removals from testing</heading>
3263         <p>
3264 Sometimes, a package is removed to allow another package in: This happens
3265 only to allow <em>another</em> package to go in if it's ready in every other
3266 sense. Suppose e.g. that <em>a</em> conflicts with the new version of
3267 <em>b</em>; then <em>a</em> may be removed to allow <em>b</em> in.
3268         <p>
3269 Of course, there is another reason to remove a package from testing: It's
3270 just too buggy (and having a single RC-bug is enough to be in this state).
3271
3272         <sect2 id="circular">
3273         <heading>circular dependencies</heading>
3274         <p>
3275 A situation which is not handled very well by britney is if package <em>a</em>
3276 depends on the new version of package <em>b</em>, and vice versa.
3277         <p>
3278 An example of this is:
3279         <p>
3280         <example>
3281   | testing         |  unstable
3282 --+-----------------+------------
3283 a | 1; depends: b=1 |  2; depends: b=2
3284 b | 1; depends: a=1 |  2; depends: a=2
3285         </example>
3286         <p>
3287 Neither package <em>a</em> nor package <em>b</em> is considered for update.
3288         <p>
3289 Currently, this requires some manual hinting from the release team.
3290 Please contact them by sending mail to &email-debian-release; if this
3291 happens to one of your packages.
3292
3293
3294         <sect2>
3295         <heading>influence of package in testing</heading>
3296         <p>
3297 Generally, there is nothing that the status of a package in testing means
3298 for transition of the next version from unstable to testing, with two
3299 exceptions: If the RC-bugginess of the package goes down, it may go in
3300 even if it is still RC-buggy. The second exception is if the version
3301 of the package in testing is out of sync on the different arches: Then
3302 any arch might just upgrade to the version of the source package;
3303 however, this can happen only if the package was previously forced
3304 through, the arch is in fuckedarches, or there was no binary package of that
3305 arch present in unstable at all during the testing migration.
3306         <p>
3307 In summary this means: The only influence that a package being in testing
3308 has on a new version of the same package is that the new version might
3309 go in easier.
3310
3311         <sect2 id="details">
3312         <heading>details</heading>
3313         <p>
3314 If you are interested in details, this is how britney works:
3315         <p>
3316 The packages are looked at to determine whether they are valid
3317 candidates. This gives the "update excuses". The most common reasons
3318 why a package is not considered are too young, RC-bugginess, and out of
3319 date on some arches. For this part, the release managers have hammers
3320 of any size to force britney to consider a package. (Also, the base
3321 freeze is coded in that part of britney.) (There is a similar thing
3322 for binary-only updates, but this is not described here. If you're
3323 interested in that, please peruse the code.)
3324         <p>
3325 Now, the more complex part happens: Britney tries to update testing with
3326 the valid candidates; first, each package alone, and then larger and even
3327 larger sets of packages together. Each try is accepted if unstable is not
3328 more uninstallable after the update than before. (Before and after this part,
3329 some hints are processed; but as only release masters can hint, this is
3330 probably not so important for you.)
3331         <p>
3332 If you want to see more details, you can look it up on
3333 merkel:/org/ftp.debian.org/testing/update_out/ (or there in
3334 ~aba/testing/update_out to see a setup with a smaller packages file). Via
3335 web, it's at <url
3336 id="http://ftp-master.debian.org/testing/update_out_code/">
3337         <p>
3338 The hints are available via <url
3339 id="http://ftp-master.debian.org/testing/hints/">.
3340
3341
3342         <sect1 id="t-p-u">
3343           <heading>Direct updates to testing</heading>
3344           <p>
3345 The testing distribution is fed with packages from unstable according to the rules
3346 explained above. However, in some cases, it is necessary to upload
3347 packages built only for testing. For that, you may want to
3348 upload to <em>testing-proposed-updates</em>.
3349           <p>
3350 Keep in mind that packages uploaded there are not automatically processed, they
3351 have to go through the hands of the release manager. So you'd better have a good
3352 reason to upload there. In order to know what a good reason is in the
3353 release managers' eyes, you should read the instructions that they regularly
3354 give on &email-debian-devel-announce;.
3355           <p>
3356 You should not upload to <em>testing-proposed-updates</em> when you can update your
3357 packages through <em>unstable</em>. If you can't (for example because you have a
3358 newer development version in unstable), you may use this facility,
3359 but it is recommended that you ask for authorization from
3360 the release manager first.
3361 Even if a package is
3362 frozen, updates through unstable are possible, if the upload via unstable
3363 does not pull in any new dependencies.
3364           <p>
3365 Version numbers are usually selected by adding the codename of the testing
3366 distribution and a running number, like 1.2sarge1 for the first upload
3367 through testing-proposed-updates of package version 1.2.
3368         <p>
3369 Please make sure you didn't miss any of these items in your upload:
3370 <list>
3371 <item> Make sure that your package really needs to go through
3372 <em>testing-proposed-updates</em>, and can't go through unstable;
3373 <item> Make sure that you included only the minimal amount of changes;
3374 <item> Make sure that you included an appropriate explanation in the
3375 changelog;
3376 <item> Make sure that you've written <em>testing</em> or
3377 <em>testing-proposed-updates</em> into your target distribution;
3378 <item> Make sure that you've built and tested your package in
3379 <em>testing</em>, not in <em>unstable</em>;
3380 <item> Make sure that your version number is higher than the version in
3381 <em>testing</em> and <em>testing-proposed-updates</em>, and lower than in
3382 <em>unstable</em>;
3383 <item> After uploading and successful build on all platforms, contact the
3384 release team at &email-debian-release; and ask them to approve your upload.
3385 </list>
3386
3387
3388         <sect1 id="faq">
3389         <heading>Frequently asked questions</heading>
3390           <p>
3391
3392         <sect2 id="rc">
3393         <heading>What are release-critical bugs, and how do they get counted?</heading>
3394           <p>
3395 All bugs of some higher severities are by default considered release-critical; currently, these are critical, grave, and serious bugs.
3396           <p>
3397 Such bugs are presumed to have an impact on the chances that the package will be released with the stable release of Debian: in general, if a package has open release-critical bugs filed on it, it won't get into "testing", and consequently won't be released in "stable".
3398           <p>
3399 The unstable bug count are all release-critical bugs
3400 without either any release-tag (such as potato, woody) or with release-tag sid;
3401 also, only if they are neither fixed nor set to sarge-ignore.
3402 The "testing" bug count for a package is considered to be roughly
3403 the bug count of unstable count at the last point
3404 when the "testing" version equalled the "unstable" version.
3405         <p>
3406 This will change post-sarge, as soon as we have versions in the bug tracking system.
3407
3408
3409         <sect2>
3410         <heading>How could installing a package into "testing" possibly break other packages?</heading>
3411           <p>
3412 The structure of the distribution archives is such that they can only contain one version of a package; a package is defined by its name. So when the source package acmefoo is installed into "testing", along with its binary packages acme-foo-bin, acme-bar-bin, libacme-foo1 and libacme-foo-dev, the old version is removed.
3413           <p>
3414 However, the old version may have provided a binary package with an old soname of a library, such as libacme-foo0. Removing the old acmefoo will remove libacme-foo0, which will break any packages which depend on it.
3415           <p>
3416 Evidently, this mainly affects packages which provide changing sets of binary packages in different versions (in turn, mainly libraries). However, it will also affect packages upon which versioned dependencies have been declared of the ==, <=, or << varieties.
3417           <p>
3418 When the set of binary packages provided by a source package change in this way, all the packages that depended on the old binaries will have to be updated to depend on the new binaries instead. Because installing such a source package into "testing" breaks all the packages that depended on it in "testing", some care has to be taken now: all the depending packages must be updated and ready to be installed themselves so that they won't be broken, and, once everything is ready, manual intervention by the release manager or an assistant is normally required.
3419           <p>
3420 If you are having problems with complicated groups of packages like this, contact debian-devel or debian-release for help.
3421       </sect>
3422
3423   <chapt id="best-pkging-practices">
3424     <heading>Best Packaging Practices</heading>
3425     <p>
3426 Debian's quality is largely due to the <url id="&url-debian-policy;"
3427 name="Debian Policy">, which defines explicit baseline requirements
3428 which all Debian packages must fulfill.  Yet there is also a shared
3429 history of experience which goes beyond the Debian Policy, an
3430 accumulation of years of experience in packaging.  Many very
3431 talented people have created great tools, tools which help you, the
3432 Debian maintainer, create and maintain excellent packages.
3433     <p>
3434 This chapter provides some best practices for Debian developers.  All
3435 recommendations are merely that, and are not requirements or policy.
3436 These are just some subjective hints, advice and pointers collected
3437 from Debian developers.  Feel free to pick and choose whatever works
3438 best for you.
3439
3440     <sect id="bpp-debian-rules">
3441         <heading>Best practices for <file>debian/rules</file></heading>
3442         <p>
3443 The following recommendations apply to the <file>debian/rules</file>
3444 file.  Since <file>debian/rules</file> controls the build process and
3445 selects the files which go into the package (directly or indirectly),
3446 it's usually the file maintainers spend the most time on.
3447
3448         <sect1 id="helper-scripts">Helper scripts
3449         <p>
3450 The rationale for using helper scripts in <file>debian/rules</file> is
3451 that lets maintainers use and share common logic among many packages.
3452 Take for instance the question of installing menu entries: you need to
3453 put the file into <file>/usr/lib/menu</file>, and add commands to the
3454 maintainer scripts to register and unregister the menu entries.  Since
3455 this is a very common thing for packages to do, why should each
3456 maintainer rewrite all this on their own, sometimes with bugs?  Also,
3457 supposing the menu directory changed, every package would have to be
3458 changed.
3459         <p>
3460 Helper scripts take care of these issues.  Assuming you comply with
3461 the conventions expected by the helper script, the helper takes care
3462 of all the details.  Changes in policy can be made in the helper
3463 script; then packages just need to be rebuilt with the new version of
3464 the helper and no other changes.
3465         <p>
3466 <ref id="tools"> contains a couple of different helpers. The most
3467 common and best (in our opinion) helper system is
3468 <package>debhelper</package>.  Previous helper systems, such as
3469 <package>debmake</package>, were "monolithic": you couldn't pick and
3470 choose which part of the helper you found useful, but had to use the
3471 helper to do everything.  <package>debhelper</package>, however, is a
3472 number of separate little <prgn>dh_*</prgn> programs.  For instance,
3473 <prgn>dh_installman</prgn> installs and compresses man pages,
3474 <prgn>dh_installmenu</prgn> installs menu files, and so on.  Thus, it
3475 offers enough flexibility to be able to use the little helper scripts,
3476 where useful, in conjunction with hand-crafted commands in
3477 <file>debian/rules</file>.
3478         <p>
3479 You can get started with <package>debhelper</package> by reading
3480 <manref name="debhelper" section="1">, and looking at the examples
3481 that come with the package.  <prgn>dh_make</prgn>, from the
3482 <package>dh-make</package> package (see <ref id="dh-make">), can be
3483 used to convert a "vanilla" source package to a
3484 <package>debhelper</package>ized package.  This shortcut, though,
3485 should not convince you that you do not need to bother understanding
3486 the individual <prgn>dh_*</prgn> helpers.  If you are going to use a
3487 helper, you do need to take the time to learn to use that helper, to
3488 learn its expectations and behavior.
3489         <p>
3490 Some people feel that vanilla <file>debian/rules</file> files are
3491 better, since you don't have to learn the intricacies of any helper
3492 system.  This decision is completely up to you.  Use what works for
3493 you.  Many examples of vanilla <file>debian/rules</file> files are
3494 available at <url id="&url-rules-files;">.
3495
3496
3497         <sect1 id="multiple-patches">
3498           <heading>Separating your patches into multiple files</heading>
3499           <p>
3500 Big, complex packages may have many bugs that you need to deal with.
3501 If you correct a number of bugs directly in the source, and you're not
3502 careful, it can get hard to differentiate the various patches that you
3503 applied.  It can get quite messy when you have to update the package
3504 to a new upstream version which integrates some of the fixes (but not
3505 all).  You can't take the total set of diffs (e.g., from
3506 <file>.diff.gz</file>) and work out which patch sets to back out as a
3507 unit as bugs are fixed upstream.
3508         <p>
3509 Unfortunately, the packaging system as such currently doesn't provide for
3510 separating the patches into several files. Nevertheless, there are ways to
3511 separate patches: the patch files are shipped within the Debian patch file
3512 (<file>.diff.gz</file>), usually within the <file>debian/</file> directory.
3513 The only difference is that they aren't applied immediately by dpkg-source,
3514 but by the <tt>build</tt> rule of <file>debian/rules</file>. Conversely,
3515 they are reverted in the <tt>clean</tt> rule.
3516         <p>
3517 <prgn>dbs</prgn> is one of the more popular approaches to this. It does all
3518 of the above, and provides a facility for creating new and updating old
3519 patches. See the package <package>dbs</package> for more information and
3520 <package>hello-dbs</package> for an example.
3521         <p>
3522 <prgn>dpatch</prgn> also provides these facilities, but it's intented to be
3523 even easier to use. See the package <package>dpatch</package> for
3524 documentation and examples (in <file>/usr/share/doc/dpatch</file>).
3525
3526
3527         <sect1 id="multiple-binary">Multiple binary packages
3528         <p>
3529 A single source package will often build several binary packages,
3530 either to provide several flavors of the same software (e.g.,
3531 the <package>vim</package> source package) or to make several small
3532 packages instead of a big one (e.g., if the user can install only the
3533 subset she needs, and thus save some disk space).
3534         <p>
3535 The second case can be easily managed in <file>debian/rules</file>.
3536 You just need to move the appropriate files from the build directory
3537 into the package's temporary trees.  You can do this using
3538 <prgn>install</prgn> or <prgn>dh_install</prgn>
3539 from <package>debhelper</package>.  Be sure to check the different
3540 permutations of the various packages, ensuring that you have the
3541 inter-package dependencies set right in <file>debian/control</file>.
3542         <p>
3543 The first case is a bit more difficult since it involves multiple
3544 recompiles of the same software but with different configuration
3545 options. The <package>vim</package> source package is an example of how to manage
3546 this using an hand-crafted <file>debian/rules</file> file.
3547
3548 <!-- &FIXME; Find a good debhelper example with multiple configure/make
3549      cycles -->
3550         </sect1>
3551       </sect>
3552
3553
3554       <sect id="bpp-debian-control">
3555         <heading>Best practices for <file>debian/control</file></heading>
3556         <p>
3557 The following practices are relevant to the
3558 <file>debian/control</file> file.  They supplement the <url
3559 id="&url-debian-policy;ch-binary.html#s-descriptions"
3560 name="Policy on package descriptions">.
3561         <p>
3562 The description of the package, as defined by the corresponding field
3563 in the <file>control</file> file, contains both the package synopsis
3564 and the long description for the package.  <ref id="bpp-desc-basics">
3565 describes common guidelines for both parts of the package description.
3566 Following that, <ref id="bpp-pkg-synopsis"> provides guidelines
3567 specific to the synopsis, and <ref id="bpp-pkg-desc"> contains
3568 guidelines specific to the description.
3569
3570         <sect1 id="bpp-desc-basics">
3571           <heading>General guidelines for package descriptions</heading>
3572           <p>
3573 The package description should be written for the average likely user,
3574 the average person who will use and benefit from the package.  For
3575 instance, development packages are for developers, and can be
3576 technical in their language.  More general-purpose applications, such
3577 as editors, should be written for a less technical user.
3578           <p>
3579 Our review of package descriptions lead us to conclude that most
3580 package descriptions are technical, that is, are not written to make
3581 sense for non-technical users.  Unless your package really is only for
3582 technical users, this is a problem.
3583           <p>
3584 How do you write for non-technical users?  Avoid jargon.  Avoid
3585 referring to other applications or frameworks that the user might not
3586 be familiar with &mdash; "GNOME" or "KDE" is fine, since users are
3587 probably familiar with these terms, but "GTK+" is
3588 probably not.  Try not to assume any knowledge at all.  If you must
3589 use technical terms, introduce them.
3590             <p>
3591 Be objective.  Package descriptions are not the place for advocating
3592 your package, no matter how much you love it.  Remember that the
3593 reader may not care about the same things you care about.
3594           <p>
3595 References to the names of any other software packages, protocol names,
3596 standards, or specifications should use their canonical forms, if one
3597 exists.  For example, use "X Window System", "X11", or "X"; not "X
3598 Windows", "X-Windows", or "X Window". Use "GTK+", not "GTK" or "gtk".
3599 Use "GNOME", not "Gnome".  Use "PostScript", not "Postscript" or
3600 "postscript".
3601           <p>
3602 If you are having problems writing your description, you may wish to
3603 send it along to &email-debian-l10n-english; and request feedback.
3604         </sect1>
3605
3606
3607         <sect1 id="bpp-pkg-synopsis">
3608           <heading>The package synopsis, or short description</heading>
3609             <p>
3610 The synopsis line (the short description) should be concise.  It
3611 must not repeat the package's name (this is policy).
3612             <p>
3613 It's a good idea to think of the synopsis as an appositive clause, not
3614 a full sentence.  An appositive clause is defined in WordNet as a
3615 grammatical relation between a word and a noun phrase that follows,
3616 e.g., "Rudolph the red-nosed reindeer".  The appositive clause here is
3617 "red-nosed reindeer".  Since the synopsis is a clause, rather than a
3618 full sentence, we recommend that it neither start with a capital nor
3619 end with a full stop (period).  It should also not begin with an
3620 article, either definite ("the") or indefinite ("a" or "an").
3621             <p>
3622 It might help to imagine that the synopsis is combined with the
3623 package name in the following way:
3624
3625 <example><var>package-name</var> is a <var>synopsis</var>.</example>
3626
3627 Alternatively, it might make sense to think of it as
3628
3629 <example><var>package-name</var> is <var>synopsis</var>.</example>
3630
3631 or, if the package name itself is a plural (such as
3632 "developers-tools")
3633
3634 <example><var>package-name</var> are <var>synopsis</var>.</example>
3635
3636 This way of forming a sentence from the package name and synopsis
3637 should be considered as a heuristic and not a strict rule.  There are
3638 some cases where it doesn't make sense to try to form a sentence.
3639         </sect1>
3640
3641         <sect1 id="bpp-pkg-desc">
3642           <heading>The long description</heading>
3643             <p>
3644 The long description is the primary information available to the user
3645 about a package before they install it.  It should provide all the
3646 information needed to let the user decide whether to install the
3647 package.  Assume that the user has already read the package synopsis.
3648             <p>
3649 The long description should consist of full and complete sentences.
3650             <p>
3651 The first paragraph of the long description should answer the
3652 following questions: what does the package do?  what task does it help
3653 the user accomplish?  It is important to describe this in a
3654 non-technical way, unless of course the audience for the package is
3655 necessarily technical.
3656             <p>
3657 The following paragraphs should answer the following questions: Why do
3658 I as a user need this package?  What other features does the package
3659 have?  What outstanding features and deficiencies are there compared
3660 to other packages (e.g., "if you need X, use Y instead")?  Is this
3661 package related to other packages in some way that is not handled by
3662 the package manager (e.g., "this is the client for the foo server")?
3663             <p>
3664 Be careful to avoid spelling and grammar mistakes. Ensure that you
3665 spell-check it.  <prgn>ispell</prgn> has a special <tt>-g</tt> option
3666 for <file>debian/control</file> files:
3667
3668 <example>ispell -d american -g debian/control</example>
3669             <p>
3670 Users usually expect these questions to be answered in the package
3671 description:
3672         <list>
3673         <item>
3674 What does the package do? If it is an add-on to another package,
3675 then the short description of the package we are an add-on to
3676 should be put in here.
3677         <item>
3678 Why should I want this package?  This is related to the above,
3679 but not the same (this is a mail user agent; this is cool, fast,
3680 interfaces with PGP and LDAP and IMAP, has features X, Y, and Z).
3681         <item>
3682 If this package should not be installed directly, but is pulled in
3683 by another package, this should be mentioned.
3684         <item>
3685 If the package is experimental, or there are other reasons it
3686 should not be used, if there are other packages that should be
3687 used instead, it should be here as well.
3688         <item>
3689 How is this package different from the competition? Is it a better
3690 implementation? more features? different features? Why should I
3691 choose this package.
3692 <!-- FIXME: what's this?
3693 (the second questions is about the class of packages, and
3694 this about this particular package, if you have information related to both).
3695 -->
3696         </list>
3697
3698         </sect1>
3699
3700
3701         <sect1 id="bpp-upstream-info">
3702           <heading>Upstream home page</heading>
3703           <p>
3704 We recommend that you add the URL for the package's home page to the
3705 package description in <file>debian/control</file>.  This information
3706 should be added at the
3707 end of description, using the following format:
3708
3709 <example> .
3710   Homepage: http://some-project.some-place.org/</example>
3711
3712 Note the spaces prepending the line, which serves to break the lines
3713 correctly.  To see an example of how this displays, see <url
3714 id="&url-eg-desc-upstream-info;">.
3715           <p>
3716 If there is no home page for the software, this should naturally be
3717 left out.
3718           <p>
3719 Note that we expect this field will eventually be replaced by a proper
3720 <file>debian/control</file> field understood by <prgn>dpkg</prgn> and
3721 <tt>&packages-host;</tt>.  If you don't want to bother migrating the
3722 home page from the description to this field, you should probably wait
3723 until that is available.</p>
3724         </sect1>
3725       </sect>
3726
3727
3728       <sect id="bpp-debian-changelog">
3729         <heading>Best practices for <file>debian/changelog</file></heading>
3730         <p>
3731 The following practices supplement the <url name="Policy on changelog
3732 files" id="&url-debian-policy;ch-docs.html#s-changelogs">.</p>
3733
3734         <sect1 id="bpp-changelog-do">
3735           <heading>Writing useful changelog entries</heading>
3736           <p>
3737 The changelog entry for a package revision documents changes in that
3738 revision, and only them. Concentrate on describing significant and
3739 user-visible changes that were made since the last version.
3740           <p>
3741 Focus on <em>what</em> was changed &mdash; who, how and when are
3742 usually less important.  Having said that, remember to politely
3743 attribute people who have provided notable help in making the package
3744 (e.g., those who have sent in patches).
3745           <p>
3746 There's no need to elaborate the trivial and obvious changes. You can
3747 also aggregate several changes in one entry.  On the other hand, don't
3748 be overly terse if you have undertaken a major change.  Be especially
3749 clear if there are changes that affect the behaviour of the program.
3750 For further explanations, use the <file>README.Debian</file> file.
3751           <p>
3752 Use common English so that the majority of readers can comprehend it.
3753 Avoid abbreviations, "tech-speak" and jargon when explaining changes
3754 that close bugs, especially for bugs filed by users that did not
3755 strike you as particularly technically savvy.  Be polite, don't swear.
3756           <p>
3757 It is sometimes desirable to prefix changelog entries with the names
3758 of the files that were changed.  However, there's no need to
3759 explicitly list each and every last one of the changed files,
3760 especially if the change was small or repetitive.  You may use
3761 wildcards.
3762           <p>
3763 When referring to bugs, don't assume anything.  Say what the problem
3764 was, how it was fixed, and append the "closes: #nnnnn" string.  See
3765 <ref id="upload-bugfix"> for more information.
3766
3767
3768         <sect1 id="bpp-changelog-misconceptions">
3769           <heading>Common misconceptions about changelog entries</heading>
3770           <p>
3771 The changelog entries should <strong>not</strong> document generic
3772 packaging issues ("Hey, if you're looking for foo.conf, it's in
3773 /etc/blah/."), since administrators and users are supposed to be at
3774 least remotely acquainted with how such things are generally arranged
3775 on Debian systems.  Do, however, mention if you change the location of
3776 a configuration file.
3777           <p>
3778 The only bugs closed with a changelog entry should be those that are
3779 actually fixed in the same package revision.  Closing unrelated bugs
3780 in the changelog is bad practice. See <ref id="upload-bugfix">.
3781           <p>
3782 The changelog entries should <strong>not</strong> be used for random
3783 discussion with bug reporters ("I don't see segfaults when starting
3784 foo with option bar; send in more info"), general statements on life,
3785 the universe and everything ("sorry this upload took me so long, but I
3786 caught the flu"), or pleas for help ("the bug list on this package is
3787 huge, please lend me a hand").  Such things usually won't be noticed
3788 by their target audience, but may annoy people who wish to read
3789 information about actual changes in the package.  See <ref
3790 id="bug-answering"> for more information on how to use the bug
3791 tracking system.
3792           <p>
3793 It is an old tradition to acknowledge bugs fixed in non-maintainer
3794 uploads in the first changelog entry of the proper maintainer upload,
3795 for instance, in a changelog entry like this:
3796 <example>
3797   * Maintainer upload, closes: #42345, #44484, #42444.
3798 </example>
3799 This will close the NMU bugs tagged "fixed" when the package makes
3800 it into the archive. The bug for the fact that an NMU was done can be
3801 closed the same way. Of course, it's also perfectly acceptable to
3802 close NMU-fixed bugs by other means; see <ref id="bug-answering">.
3803         </sect1>
3804
3805         <sect1 id="bpp-changelog-errors">
3806           <heading>Common errors in changelog entries</heading>
3807           <p>
3808 The following examples demonstrate some common errors or example of
3809 bad style in changelog entries.
3810
3811           <p>
3812 <example>
3813   * Fixed all outstanding bugs.
3814 </example>
3815 This doesn't tell readers anything too useful, obviously.
3816
3817           <p>
3818 <example>
3819   * Applied patch from Jane Random.
3820 </example>
3821 What was the patch about?
3822
3823             <p>
3824 <example>
3825   * Late night install target overhaul.
3826 </example>
3827 Overhaul which accomplished what?  Is the mention of late night
3828 supposed to remind us that we shouldn't trust that code?
3829
3830             <p>
3831 <example>
3832   * Fix vsync FU w/ ancient CRTs.
3833 </example>
3834 Too many acronyms, and it's not overly clear what the, uh, fsckup (oops,
3835 a curse word!) was actually about, or how it was fixed.
3836
3837             <p>
3838 <example>
3839   * This is not a bug, closes: #nnnnnn.
3840 </example>
3841 First of all, there's absolutely no need to upload the package to
3842 convey this information; instead, use the bug tracking system.
3843 Secondly, there's no explanation as to why the report is not a bug.
3844
3845             <p>
3846 <example>
3847   * Has been fixed for ages, but I forgot to close; closes: #54321.
3848 </example>
3849 If for some reason you didn't mention the bug number in a previous changelog
3850 entry, there's no problem, just close the bug normally in the BTS. There's
3851 no need to touch the changelog file, presuming the description of the fix is
3852 already in (this applies to the fixes by the upstream authors/maintainers as
3853 well, you don't have to track bugs that they fixed ages ago in your
3854 changelog).
3855
3856             <p>
3857 <example>
3858   * Closes: #12345, #12346, #15432
3859 </example>
3860 Where's the description?  If you can't think of a descriptive message,
3861 start by inserting the title of each different bug.
3862         </sect1>
3863         
3864         <sect1 id="bpp-news-debian">
3865           <heading>Supplementing changelogs with NEWS.Debian files</heading>
3866           <p>
3867 Important news about changes in a package can also be put in NEWS.Debian
3868 files. The news will be displayed by tools like apt-listchanges, before
3869 all the rest of the changelogs. This is the preferred means to let the user
3870 know about significant changes in a package. It is better than using
3871 debconf notes since it is less annoying and the user can go back and refer
3872 to the NEWS.Debian file after the install. And it's better than listing
3873 major changes in README.Debian, since the user can easily miss such notes.
3874           <p>
3875 The file format is the same as a debian changelog file, but leave off
3876 the asterisks and describe each news item with a full paragraph when
3877 necessary rather than the more concise summaries that would go in a
3878 changelog. It's a good idea to run your file through dpkg-parsechangelog to
3879 check its formatting as it will not be automatically checked during build
3880 as the changelog is. Here is an example of a real NEWS.Debian file:
3881 <example>
3882 cron (3.0pl1-74) unstable; urgency=low
3883
3884     The checksecurity script is no longer included with the cron package:
3885     it now has its own package, "checksecurity". If you liked the
3886     functionality provided with that script, please install the new
3887     package.
3888
3889  -- Steve Greenland &lt;stevegr@debian.org&gt;  Sat,  6 Sep 2003 17:15:03 -0500
3890 </example>
3891           <p>
3892 The NEWS.Debian file is installed as
3893 /usr/share/doc/&lt;package&gt;/NEWS.Debian.gz. It is compressed, and
3894 always has that name even in Debian native packages. If you use debhelper,
3895 dh_installchangelogs will install debian/NEWS files for you.
3896           <p>
3897 Unlike changelog files, you need not update NEWS.Debian files with every
3898 release. Only update them if you have something particularly newsworthy
3899 that user should know about. If you have no news at all, there's no need
3900 to ship a NEWS.Debian file in your package. No news is good news!
3901       </sect>
3902
3903 <!--
3904         <sect1 id="pkg-mgmt-cvs">Managing a package with CVS
3905         <p>
3906         &FIXME; presentation of cvs-buildpackage, updating sources
3907         via CVS (debian/rules refresh).
3908         <url id="http://www.debian.org/devel/cvs_packages">
3909 -->
3910
3911
3912       <sect id="bpp-debian-maint-scripts">
3913         <heading>Best practices for maintainer scripts</heading>
3914         <p>
3915 Maintainer scripts include the files <file>debian/postinst</file>,
3916 <file>debian/preinst</file>, <file>debian/prerm</file> and
3917 <file>debian/postrm</file>.  These scripts take care of any package
3918 installation or deinstallation setup which isn't handled merely by the
3919 creation or removal of files and directories.  The following
3920 instructions supplement the <url id="&url-debian-policy;" name="Debian
3921 Policy">.
3922         <p>
3923 Maintainer scripts must be idempotent.  That means that you need to
3924 make sure nothing bad will happen if the script is called twice where
3925 it would usually be called once.
3926         <p>
3927 Standard input and output may be redirected (e.g. into pipes) for
3928 logging purposes, so don't rely on them being a tty.
3929         <p>
3930 All prompting or interactive configuration should be kept to a
3931 minimum.  When it is necessary, you should use the
3932 <package>debconf</package> package for the interface.  Remember that
3933 prompting in any case can only be in the <tt>configure</tt> stage of
3934 the <file>postinst</file> script.
3935         <p>
3936 Keep the maintainer scripts as simple as possible.  We suggest you use
3937 pure POSIX shell scripts.  Remember, if you do need any bash features,
3938 the maintainer script must have a bash shebang line.  POSIX shell or
3939 Bash are preferred to Perl, since they enable
3940 <package>debhelper</package> to easily add bits to the scripts.
3941         <p>
3942 If you change your maintainer scripts, be sure to test package
3943 removal, double installation, and purging.  Be sure that a purged
3944 package is completely gone, that is, it must remove any files created,
3945 directly or indirectly, in any maintainer script.
3946         <p>
3947 If you need to check for the existence of a command, you should use
3948 something like
3949 <example>if [ -x /usr/sbin/install-docs ]; then ...</example>
3950
3951 If you don't wish to hard-code the path of a command in your
3952 maintainer script, the following POSIX-compliant shell function may
3953 help:
3954
3955 &example-pathfind;
3956
3957 You can use this function to search <tt>$PATH</tt> for a command name,
3958 passed as an argument.  It returns true (zero) if the command was
3959 found, and false if not.  This is really the most portable way, since
3960 <tt>command -v</tt>, <prgn>type</prgn>, and <prgn>which</prgn> are not
3961 POSIX.
3962         <p>
3963 While <prgn>which</prgn> is an acceptable alternative, since
3964 it is from the required <package>debianutils</package> package, it's
3965 not on the root partition. That is, it's in <file>/usr/bin</file> rather
3966 than <file>/bin</file>, so one can't use it in scripts which are run
3967 before the <file>/usr</file> partition is mounted. Most scripts won't have
3968 this problem, though.
3969       </sect>
3970
3971
3972       <sect id="bpp-config-mgmt">
3973         <heading>Configuration management with <package>debconf</package></heading>
3974         <p>
3975 <package>Debconf</package> is a configuration management system which
3976 can be used by all the various packaging scripts
3977 (<file>postinst</file> mainly) to request feedback from the user
3978 concerning how to configure the package. Direct user interactions must
3979 now be avoided in favor of <package>debconf</package>
3980 interaction. This will enable non-interactive installations in the
3981 future.
3982         <p>
3983 Debconf is a great tool but it is often poorly used.   Many common mistakes
3984 are listed in the <manref name="debconf-devel" section="7"> man page. 
3985 It is something that you must read if you decide to use debconf.
3986 Also, we document some best practices here.
3987         <p>
3988 These guidelines include some writing style and typography
3989 recommendations, general considerations about debconf usage as well as
3990 more specific recommendations for some parts of the distribution (for
3991 instance, the installation system).
3992
3993         <sect1>Do not abuse debconf
3994         <p>
3995 Since debconf appeared in Debian, it has been widely abused and
3996 several criticisms received by the Debian distribution come from
3997 debconf abuse with the need of answering a wide bunch of questions
3998 before getting any little thing installed.
3999         <p>
4000 Keep usage notes to what they belong: the NEWS.Debian, or
4001 README.Debian file. Only use notes for important notes which may
4002 directly affect the package usability. Remember that notes will always
4003 block the install until confirmed or bother the user by email.
4004         <p>
4005 Carefully choose the questions priorities in maintainer scripts. See
4006 <manref name="debconf-devel" section="7"> for details about priorities.
4007 Most questions should use medium and low priorities.
4008
4009         <sect1>General recommendations for authors and translators
4010         <p>
4011         <sect2>Write correct English
4012         <p>
4013 Most Debian package maintainers are not native English speakers. So,
4014 writing properly phrased templates may not be easy for them.
4015         <p>
4016 Please use (and abuse) debian-l10n-english@lists.debian.org mailing
4017 list. Have your templates proofread.
4018         <p>
4019 Badly written templates give a poor image of your package, of your
4020 work...or even of Debian itself.
4021         <p>
4022 Avoid technical jargon as much as possible. If some terms sound common
4023 to you, they may be impossible to understand for others. If you cannot
4024 avoid them, try to explain them (use the extended description). When
4025 doing so, try to balance between verbosity and simplicity.
4026
4027         <sect2>Be kind to translators
4028         <p>
4029 Debconf templates may be translated. Debconf, along with its sister
4030 package po-debconf offers a simple framework for getting
4031 templates translated by translation teams or even individuals.
4032         <p>
4033 Please use gettext-based templates. Install po-debconf on your
4034 development system and read its documentation ("man po-debconf" is a
4035 good start).
4036         <p>
4037 Avoid changing templates too often. Changing templates text induces
4038 more work to translators which will get their translation "fuzzied". If
4039 you plan changes to your original templates, please contact
4040 translators. Most active translators are very reactive and getting
4041 their work included along with your modified templates will save you
4042 additional uploads. If you use gettext-based templates, the
4043 translator's name and e-mail addresses are mentioned in the po files
4044 headers.
4045         <p>
4046 If in doubt, you may also contact the translation team for a given
4047 language (debian-l10n-xxxxx@lists.debian.org), or the
4048 debian-i18n@lists.debian.org mailing list.
4049
4050         <sect2>Do not make assumptions about interfaces
4051         <p>
4052 Templates text should not make reference to widgets belonging to some
4053 debconf interfaces. Sentences like "If you answer Yes..." have no
4054 meaning for users of graphical interfaces which use checkboxes for
4055 boolean questions.
4056         <p>
4057 More generally speaking, try to avoid referring to user actions.
4058 Just give facts.
4059
4060         <sect2>Do not use first person
4061         <p>
4062 You should avoid the use of first person ("I will do this..." or "We
4063 recommend..."). The computer is not a person and the Debconf tempaltes
4064 do not speak for the Debian developers. You should use neutral
4065 construction and often the passive form. Those of you who already
4066 wrote scientific publications, just write your templates like you
4067 would write a scientific paper.
4068
4069         <sect2>Be gender neutral
4070         <p>
4071 The world is made of men and women. Please use gender-neutral
4072 constructions in your writing. This is not Political Correctness, this
4073 is showing respect to all humanity.
4074
4075
4076         <sect1>Templates fields definition
4077         <p>
4078 This part gives some information which is mostly taken from the
4079 <manref name="debconf-devel" section="7"> manual page.
4080
4081         <sect2>Type
4082         <p>
4083
4084         <sect3>string:
4085         <p>
4086 Results in a free-form input field that the user can type  any string into.
4087
4088         <sect3>password:
4089         <p>
4090 Prompts the user for a password. Use this with caution; be aware that
4091 the password the user enters will be written to debconf's
4092 database. You should probably clean that value out of the database as
4093 soon as is possible.
4094
4095         <sect3>boolean:
4096         <p>
4097 A true/false choice. Remember: true/false, NOT YES/NO...
4098
4099         <sect3>select:
4100         <p>
4101 A choice between one of a number of values. The choices must be
4102 specified in a field named 'Choices'.  Separate the possible values
4103 with commas and spaces, like this: Choices: yes, no, maybe
4104
4105         <sect3>multiselect:
4106         <p>
4107 Like the select data type, except the user can choose any number of
4108
4109         items from the choices list (or chose none of them).
4110
4111         <sect3>note:
4112         <p>
4113 Rather than being a question per se, this datatype indicates a note
4114 that can be displayed to the user. It should be used only for
4115 important notes that the user really should see, since debconf will go
4116 to great pains to make sure the user sees it; halting the install for
4117 them to press a key, and even mailing the note to them in some
4118 cases.
4119
4120         <sect3>text:
4121         <p>
4122 This type is now considered obsolete: don't use it.
4123
4124         <sect3>error:
4125         <p>
4126 <strong>THIS TEMPLATE TYPE IS NOT HANDLED BY DEBCONF YET.</strong>
4127         <p>
4128 It has been added to cdebconf, the C version of debconf, first used in
4129 the Debian Installer.
4130         <p>
4131 Please do not use it unless debconf supports it.
4132         <p>
4133 This type is designed to handle error message. It is mostly similar to
4134 the "note" type. Frontends may present it differently (for instance,
4135 the dialog frontend of cdebconf draws a red screen instead of the
4136 usual blue one).
4137
4138
4139         <sect2>Description: short and extended description
4140         <p>
4141 Templates descriptions have two parts: short and extended. The short 
4142 description is in the "Description:" line of the template.
4143         <p>
4144 The short description should be kept short (50 characters or so) so
4145 that it may be accomodated by most debconf interfaces. Keeping it
4146 short also helps translators, as usually translations tend to end up
4147 being longer than the original.
4148         <p>
4149 The short description should be able to stand on its own. Some
4150 interfaces do not show the long description by default, or only if the
4151 user explicitely asks for it or even do not show it at all. Avoid
4152 things like "What do you want to do?"
4153         <p>
4154 The short description does not necessarily have to be a full
4155 sentence. This is part of the "keep it short and efficient"
4156 recommendation.
4157         <p>
4158 The extended description should not repeat the short description word
4159 for word. If you can't think up a long description, then first, think
4160 some more.  Post to debian-devel. Ask for help. Take a writing class!
4161 That extended description is important. If after all that you still
4162 can't come up with anything, leave it blank.
4163         <p>
4164 The extended description should use complete sentences. Paragraphs
4165 should be kept short for improved readability. Do not mix two ideas
4166 in the same paragraph but rather use another paragraph.
4167         <p>
4168 Don't be too verbose. Some debconf interfaces cannot deal very well
4169 with descriptions of more than about 20 lines, so try to keep it below
4170 this limit.
4171         <p>
4172 For specific rules depending on templates type (string, boolean,
4173 etc.), please read below.
4174
4175         <sect2>Choices
4176         <p>
4177 This field should be used for Select and Multiselect types. It
4178 contains the possible choices which will be presented to users. These
4179 choices should be separated by commas.
4180
4181
4182         <sect2>Default
4183         <p>
4184 This field is optional. It contains the default answer for string,
4185 select and multiselect templates. For multiselect templates, it may
4186 contain a comma-separated list of choices.
4187
4188         <sect1>Templates fields specific style guide
4189         <p>
4190
4191         <sect2>Type field
4192         <p>
4193 No specific indication except: use the appropriate type by referring
4194 to the previous section.
4195
4196         <sect2>Description field
4197         <p>
4198 Below are specific instructions for properly writing the Description
4199 (short and extended) depending on the template type.
4200
4201         <sect3>String/password templates
4202         <p>
4203 <list>
4204 <item> The short description is a prompt and NOT a title. Avoid
4205     question style prompts ("IP Address?") in favour of
4206     "opened" prompts ("IP address:").
4207     The use of colons is recommended.
4208
4209 <item> The extended description is a complement to the short description.
4210     In the extended part, explain what is being asked, rather than ask
4211     the same question again using longer words. Use complete sentences.
4212     Terse writing style is strongly discouraged.
4213 </list>
4214
4215         <sect3>Boolean templates
4216         <p>
4217 <list>
4218 <item> The short description should be phrased in the form of a question
4219     which should be kept short and should generally end with a question
4220     mark. Terse writing style is permitted and even encouraged if the
4221     question is rather long (remember that translations are often longer
4222     than original versions)
4223
4224 <item> The extended description should NOT include a question. 
4225
4226 <item> Again, please avoid referring to specific interface widgets. A common
4227     mistake for such templates is "if you answer Yes"-type
4228     constructions.
4229 </list>
4230
4231         <sect3>Select/Multiselect
4232         <p>
4233 <list>
4234 <item> The short description is a prompt and NOT a title. Do NOT use useless
4235     "Please choose..." constructions. Users are clever enough to figure
4236     out they have to choose something...:)
4237
4238 <item> The extended description will complete the short description. It may
4239     refer to the available choices. It may also mention that the user
4240     may choose more than one of the available choices, if the template
4241     is a multiselect one (although the interface often makes this
4242     clear).
4243 </list>
4244
4245         <sect3>Notes
4246         <p>
4247 <list>
4248 <item> The short description should be considered to be a *title*. 
4249
4250 <item> The extended description is what will be displayed as a more detailed
4251     explanation of the note. Phrases, no terse writing style.
4252
4253 <item> DO NOT ABUSE DEBCONF. Notes are the most common way to abuse
4254     debconf. As written in debconf-devel manual page: it's best to use them
4255     only for warning about very serious problems. The NEWS.Debian or
4256     README.Debian files are the appropriate location for a lot of notes.
4257     If, by reading this, you consider converting your Note type templates
4258     to entries in NEWS/Debian or README.Debian, plus consider keeping existing
4259     translations for the future.
4260 </list>
4261
4262
4263         <sect2>Choices field
4264         <p>
4265 If the Choices are likely to change often, please consider using the
4266 "__Choices" trick. This will split each individual choice into a
4267 single string, which will considerably help translators for doing
4268 their work.
4269
4270         <sect2>Default field
4271         <p>
4272 If the default value, for a "select" template, is likely to vary
4273 depending on the user language (for instance, if the choice is a
4274 language choice), please use the "_DefaultChoice" trick.
4275         <p>
4276 This special field allow translators to put the most appropriate
4277 choice according to their own language. It will become the default
4278 choice when their language is used while your own mentioned Default
4279 Choice will be used chan using English.
4280         <p>
4281 Example, taken from the geneweb package templates:
4282 <example>
4283 Template: geneweb/lang
4284 Type: select
4285 __Choices: Afrikaans (af), Bulgarian (bg), Catalan (ca), Chinese (zh), Czech (cs), Danish (da), Dutch (nl), English (en), Esperanto (eo), Estonian (et), Finnish (fi), French (fr), German (de), Hebrew (he), Icelandic (is), Italian (it), Latvian (lv), Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Spanish (es), Swedish (sv)
4286 # This is the default choice. Translators may put their own language here
4287 # instead of the default.
4288 # WARNING : you MUST use the ENGLISH FORM of your language
4289 # For instance, the french translator will need to put "French (fr)" here.
4290 _DefaultChoice: English (en)[ translators, please see comment in PO files]
4291 _Description: Geneweb default language:
4292 </example>
4293         <p>
4294 Note the use of brackets which allow internal comments in debconf
4295 fields.  Also note the use of comments which will show up in files the
4296 translators will work with.
4297         <p>
4298 The comments are needed as the DefaultChoice trick is a bit
4299 confusing: the translators may put their own choice
4300
4301         <sect2>Default field
4302         <p>
4303 Do NOT use empty default field. If you don't want to use default
4304 values, do not use Default at all.
4305         <p>
4306 If you use po-debconf (and you SHOULD, see 2.2), consider making this
4307 field translatable, if you think it may be translated.
4308         <p>
4309 If the default value may vary depending on language/country (for
4310 instance the default value for a language choice), consider using the
4311 special "_DefaultChoice" type documented in <manref name="po-debconf" section="7">).
4312       </sect>
4313
4314
4315       <sect id="bpp-i18n">
4316         <heading>Internationalization</heading>
4317
4318         <sect1 id="bpp-i18n-debconf">
4319           <heading>Handling debconf translations</heading>
4320           <p>
4321 Like porters, translators have a difficult task.  They work on many
4322 packages and must collaborate with many different
4323 maintainers. Moreover, most of the time, they are not native English
4324 speakers, so you may need to be particularly patient with them.
4325         <p>
4326 The goal of <package>debconf</package> was to make packages
4327 configuration easier for maintainers and for users.  Originally,
4328 translation of debconf templates was handled with
4329 <prgn>debconf-mergetemplate</prgn>.  However, that technique is now
4330 deprecated; the best way to accomplish <package>debconf</package>
4331 internationalization is by using the <package>po-debconf</package>
4332 package.  This method is easier both for maintainer and translators;
4333 transition scripts are provided.
4334         <p>
4335 Using <package>po-debconf</package>, the translation is stored in
4336 <file>po</file> files (drawing from <prgn>gettext</prgn> translation
4337 techniques).  Special template files contain the original messages and
4338 mark which fields are translatable.  When you change the value of a
4339 translatable field, by calling <prgn>debconf-updatepo</prgn>, the
4340 translation is marked as needing attention from the translators. Then,
4341 at build time, the <prgn>dh_installdebconf</prgn> program takes care
4342 of all the needed magic to add the template along with the up-to-date
4343 translations into the binary packages.  Refer to the <manref
4344 name="po-debconf" section="7"> manual page for details.
4345         </sect1>
4346
4347         <sect1 id="bpp-i18n-docs">
4348           <heading>Internationalized documentation</heading>
4349           <p>
4350 Internationalizing documentation is crucial for users, but a lot of
4351 labor.  There's no way to eliminate all that work, but you can make things
4352 easier for translators.
4353           <p>
4354 If you maintain documentation of any size, its easier for translators
4355 if they have access to a source control system.  That lets translators
4356 see the differences between two versions of the documentation, so, for
4357 instance, they can see what needs to be retranslated.  It is
4358 recommended that the translated documentation maintain a note about
4359 what source control revision the translation is based on.  An
4360 interesting system is provided by <url id="&url-i18n-doc-check;"
4361 name="doc-check"> in the <package>boot-floppies</package> package,
4362 which shows an overview of the translation status for any given
4363 language, using structured comments for the current revision of the
4364 file to be translated and, for a translated file, the revision of the
4365 original file the translation is based on.  You might wish to adapt
4366 and provide that in your CVS area.
4367           <p>
4368 If you maintain XML or SGML documentation, we suggest that you isolate
4369 any language-independent information and define those as entities in a
4370 separate file which is included by all the different
4371 translations. This makes it much easier, for instance, to keep URLs
4372 up to date across multiple files.
4373         </sect1>
4374       </sect>
4375
4376       <sect id="bpp-common-situations">
4377         <heading>Common packaging situations</heading>
4378
4379 <!--
4380         <sect1 id="bpp-kernel">Kernel modules/patches
4381         <p>
4382         &FIXME; Heavy use of kernel-package. provide files in
4383         /etc/modutils/ for module configuration.
4384 -->
4385
4386         <sect1 id="bpp-autotools">
4387           <heading>Packages using
4388           <prgn>autoconf</prgn>/<prgn>automake</prgn></heading>
4389           <p>
4390 Keeping <prgn>autoconf</prgn>'s <file>config.sub</file> and
4391 <file>config.guess</file> files up to date is critical for porters,
4392 especially on more volatile architectures.  Some very good packaging
4393 practices for any package using <prgn>autoconf</prgn> and/or
4394 <prgn>automake</prgn> have been synthesized in
4395 &file-bpp-autotools; from the <package>autotools-dev</package>
4396 package. You're strongly encouraged to read this file and
4397 to follow the given recommendations.
4398
4399
4400         <sect1 id="bpp-libraries">Libraries
4401         <p>
4402 Libraries are always difficult to package for various reasons. The policy
4403 imposes many constraints to ease their maintenance and to make sure
4404 upgrades are as simple as possible when a new upstream version comes out.
4405 Breakage in a library can result in dozens of dependent packages
4406 breaking.
4407         <p>
4408 Good practices for library packaging have been grouped in
4409 <url id="&url-libpkg-guide;" name="the library packaging guide">.
4410         
4411
4412         <sect1 id="bpp-docs">Documentation
4413            <p>
4414 Be sure to follow the <url id="&url-debian-policy;ch-docs.html"
4415             name="Policy on documentation">.</p>
4416           <p>
4417 If your package contains documentation built from XML or SGML, we
4418 recommend you not ship the XML or SGML source in the binary
4419 package(s).  If users want the source of the documentation, they
4420 should retrieve the source package.</p>
4421           <p>
4422 Policy specifies that documentation should be shipped in HTML format.
4423 We also recommend shipping documentation in PDF and plain text format if
4424 convenient and quality output is possible.  However, it is generally
4425 not appropriate to ship plain text versions of documentation whose source
4426 format is HTML.</p>
4427           <p>
4428 Major shipped manuals should register themselves with
4429 <package>doc-base</package> on installation.  See the
4430 <package>doc-base</package> package documentation for more
4431 information.</p>
4432
4433
4434         <sect1 id="bpp-other">Specific types of packages
4435         <p>
4436 Several specific types of packages have special sub-policies and
4437 corresponding packaging rules and practices:
4438 <list>
4439     <item>
4440 Perl related packages have a <url name="Perl policy"
4441 id="&url-perl-policy;">, some examples of packages following that
4442 policy are <package>libdbd-pg-perl</package> (binary perl module) or
4443 <package>libmldbm-perl</package> (arch independent perl module).
4444     <item>
4445 Python related packages have their python policy; see
4446 &file-python-policy; in the <package>python</package> package.
4447     <item>
4448 Emacs related packages have the <url id="&url-emacs-policy;"
4449 name="emacs policy">.
4450     <item>
4451 Java related packages have their <url id="&url-java-policy;"
4452 name="java policy">.
4453     <item>
4454 Ocaml related packages have their own policy, found in
4455 &file-ocaml-policy; from the <package>ocaml</package> package. A good
4456 example is the <package>camlzip</package> source package.
4457     <item>
4458 Packages providing XML or SGML DTDs should conform to the
4459 recommendations found in the <package>sgml-base-doc</package>
4460 package.
4461     <item>
4462 Lisp packages should register themselves with
4463 <package>common-lisp-controller</package>, about which see
4464 &file-lisp-controller;.
4465 <!-- TODO: mozilla extension policy, once that becomes available -->
4466 </list>
4467         </sect1>
4468
4469 <!--
4470         <sect1 id="custom-config-files">Custom configuration files
4471         <p>
4472         &FIXME; speak of "ucf", explain solution with a template,
4473         explain conf.d directories
4474
4475         <sect1 id="config-with-db">Use of an external database
4476         <p>
4477         &FIXME; The software may require a database that you need to setup.
4478         But the database may be local or distant. Thus you can't depend
4479         on a database server but just on the corresponding library.
4480
4481         sympa may be an example package
4482 -->     
4483
4484         <sect1 id="bpp-archindepdata">
4485           <heading>Architecture-independent data</heading>
4486           <p>
4487 It is not uncommon to have a large amount of architecture-independent
4488 data packaged with a program.  For example, audio files, a collection
4489 of icons, wallpaper patterns, or other graphic files.  If the size of
4490 this data is negligible compared to the size of the rest of the
4491 package, it's probably best to keep it all in a single package.
4492           <p>
4493 However, if the size of the data is considerable, consider splitting
4494 it out into a separate, architecture-independent package ("_all.deb").
4495 By doing this, you avoid needless duplication of the same data into
4496 eleven or more .debs, one per each architecture.  While this
4497 adds some extra overhead into the <file>Packages</file> files, it
4498 saves a lot of disk space on Debian mirrors.  Separating out
4499 architecture-independent data also reduces processing time of
4500 <prgn>lintian</prgn> or <prgn>linda</prgn> (see <ref id="tools-lint">)
4501 when run over the entire Debian archive.
4502         </sect1>
4503
4504
4505         <sect1 id="bpp-locale">
4506           <heading>Needing a certain locale during build</heading>
4507           <p>
4508 If you need a certain locale during build, you can create a temporary
4509 file via this trick:
4510         <p>
4511 If you set LOCPATH to the equivalent of /usr/lib/locale, and LC_ALL to
4512 the name of the locale you generate, you should get what you want
4513 without being root.  Something like this:
4514
4515 <example>
4516 LOCALE_PATH=debian/tmpdir/usr/lib/locale
4517 LOCALE_NAME=en_IN
4518 LOCALE_CHARSET=UTF-8
4519
4520 mkdir -p $LOCALE_PATH
4521 localedef -i "$LOCALE_NAME.$LOCALE_CHARSET" -f "$LOCALE_CHARSET" "$LOCALE_PATH/$LOCALE_NAME.$LOCALE_CHARSET"
4522
4523 # Using the locale
4524 LOCPATH=$LOCALE_PATH LC_ALL=$LOCALE_NAME.$LOCALE_CHARSET date
4525 </example>
4526         </sect1>
4527
4528         <sect1 id="bpp-transition">
4529           <heading>Make transition packages deborphan compliant</heading>
4530           <p>
4531 Deborphan is a program for helping users to detect which packages can safely be
4532 removed from the system, i.e. the ones that have no packages depending on
4533 them. The default operation is to search only within the libs and oldlibs
4534 sections, to hunt down unused libraries. But when passed the right argument,
4535 it tries to catch other useless packages. 
4536           <p>
4537 For example, with --guess-dummy, deborphan tries to search all transitional packages
4538 which were needed for upgrade but which can now safely be removed. For that,
4539 it looks for the string "dummy" or "transitional" in their short
4540 description.
4541           <p>
4542 So, when you are creating such a package, please make sure to add this text
4543 to your short description. If you are looking for examples, just run: 
4544   <example>apt-cache search .|grep dummy</example> or
4545   <example>apt-cache search .|grep transitional</example>.
4546         </sect1>
4547
4548       </sect>
4549     </chapt>
4550
4551
4552   <chapt id="beyond-pkging">
4553     <heading>Beyond Packaging</heading>
4554     <p>
4555 Debian is about a lot more than just packaging software and
4556 maintaining those packages.  This chapter contains information about 
4557 ways, often really critical ways, to contribute to Debian beyond
4558 simply creating and maintaining packages.
4559     <p>
4560 As a volunteer organization, Debian relies on the discretion of its
4561 members in choosing what they want to work on and in choosing
4562 the most critical thing to spend their time on.
4563
4564     <sect id="submit-bug">
4565       <heading>Bug reporting</heading>
4566         <p>
4567 We encourage you to file bugs as you find them in Debian packages.  In
4568 fact, Debian developers are often the first line testers.  Finding and
4569 reporting bugs in other developers' packages improves the quality of
4570 Debian.
4571         <p>
4572 Read the <url name="instructions for reporting bugs"
4573 id="&url-bts-report;"> in the Debian <url name="bug tracking system"
4574 id="&url-bts;">.
4575         <p>
4576 Try to submit the bug from a normal user account at which you are
4577 likely to receive mail, so that people can reach you if they need
4578 further information about the bug.  Do not submit bugs as root.
4579         <p>
4580 You can use a tool like <manref name="reportbug" section="1"> to
4581 submit bugs. It can automate and generally ease the process.
4582         <p>
4583 Make sure the bug is not already filed against a package.
4584 Each package has a bug list easily reachable at
4585 <tt>http://&bugs-host;/<var>packagename</var></tt>
4586 Utilities like <manref name="querybts" section="1"> can also
4587 provide you with this information (and <prgn>reportbug</prgn>
4588 will usually invoke <prgn>querybts</prgn> before sending, too).
4589         <p>
4590 Try to direct your bugs to the proper location. When for example
4591 your bug is about a package which overwrites files from another package,
4592 check the bug lists for <em>both</em> of those packages in order to
4593 avoid filing duplicate bug reports.
4594         <p>
4595 For extra credit, you can go through other packages, merging bugs
4596 which are reported more than once, or tagging bugs `fixed'
4597 when they have already been fixed.  Note that when you are
4598 neither the bug submitter nor the package maintainer, you should
4599 not actually close the bug (unless you secure permission from the
4600 maintainer).
4601         <p>
4602 From time to time you may want to check what has been going on
4603 with the bug reports that you submitted. Take this opportunity to
4604 close those that you can't reproduce anymore. To find
4605 out all the bugs you submitted, you just have to visit
4606 <tt>http://&bugs-host;/from:<var>&lt;your-email-addr&gt;</var></tt>.
4607
4608       <sect1 id="submit-many-bugs">Reporting lots of bugs at once
4609         <p>
4610 Reporting a great number of bugs for the same problem on a great
4611 number of different packages &mdash; i.e., more than 10 &mdash; is a deprecated
4612 practice.  Take all possible steps to avoid submitting bulk bugs at
4613 all.  For instance, if checking for the problem can be automated, add
4614 a new check to <package>lintian</package> so that an error or warning
4615 is emitted.
4616         <p>
4617 If you report more than 10 bugs on the same topic at once, it is
4618 recommended that you send a message to &email-debian-devel; describing
4619 your intention before submitting the report. This will allow other
4620 developers to verify that the bug is a real problem. In addition, it
4621 will help prevent a situation in which several maintainers start
4622 filing the same bug report simultaneously.
4623         <p>
4624 Note that when sending lots of bugs on the same subject, you should
4625 send the bug report to <email>maintonly@&bugs-host;</email> so
4626 that the bug report is not forwarded to the bug distribution mailing
4627 list.
4628
4629
4630       <sect id="qa-effort">Quality Assurance effort
4631         
4632         <sect1 id="qa-daily-work">Daily work
4633         <p>
4634 Even though there is a dedicated group of people for Quality
4635 Assurance, QA duties are not reserved solely for them. You can
4636 participate in this effort by keeping your packages as bug-free as
4637 possible, and as lintian-clean (see <ref id="lintian">) as
4638 possible. If you do not find that possible, then you should consider
4639 orphaning some of your packages (see <ref
4640 id="orphaning">). Alternatively, you may ask the help of other people
4641 in order to catch up with the backlog of bugs that you have (you can ask
4642 for help on &email-debian-qa; or &email-debian-devel;). At the same
4643 time, you can look for co-maintainers (see <ref id="collaborative-maint">).
4644         
4645         <sect1 id="qa-bsp">Bug squashing parties
4646         <p>
4647 From time to time the QA group organizes bug squashing parties to get rid of
4648 as many problems as possible. They are announced on &email-debian-devel-announce;
4649 and the announcement explains which area will be the focus of the party:
4650 usually they focus on release critical bugs but it may happen that they
4651 decide to help finish a major upgrade (like a new perl version
4652 which requires recompilation of all the binary modules).
4653         <p>
4654 The rules for non-maintainer uploads differ during the parties because
4655 the announcement of the party is considered prior notice for NMU. If
4656 you have packages that may be affected by the party (because they have
4657 release critical bugs for example), you should send an update to each of
4658 the corresponding bug to explain their current status and what you expect
4659 from the party. If you don't want an NMU, or if you're only interested in a
4660 patch, or if you will deal yourself with the bug, please explain that in
4661 the BTS.
4662         <p>
4663 People participating in the party have special rules for NMU, they can
4664 NMU without prior notice if they upload their NMU to
4665 DELAYED/3-day at least. All other NMU rules apply as usually; they
4666 should send the patch of the NMU to the BTS (to one of the open bugs
4667 fixed by the NMU, or to a new bug, tagged fixed). They should
4668 also respect any particular wishes of the maintainer.
4669         <p>
4670 If you don't feel confident about doing an NMU, just send a patch
4671 to the BTS. It's far better than a broken NMU.
4672
4673
4674     <sect id="contacting-maintainers">Contacting other maintainers
4675       <p>
4676 During your lifetime within Debian, you will have to contact other
4677 maintainers for various reasons. You may want to discuss a new
4678 way of cooperating between a set of related packages, or you may
4679 simply remind someone that a new upstream version is available
4680 and that you need it.
4681       <p>
4682 Looking up the email address of the maintainer for the package can be
4683 distracting. Fortunately, there is a simple email alias,
4684 <tt>&lt;package&gt;@&packages-host;</tt>, which provides a way to
4685 email the maintainer, whatever their individual email address (or
4686 addresses) may be.  Replace <tt>&lt;package&gt;</tt> with the name of
4687 a source or a binary package.
4688       <p>
4689 You may also be interested in contacting the persons who are
4690 subscribed to a given source package via <ref id="pkg-tracking-system">.
4691 You can do so by using the <tt>&lt;package-name&gt;@&pts-host;</tt>
4692 email address.
4693 <!-- FIXME: moo@packages.d.o is easily confused with moo@packages.qa.d.o -->
4694
4695     <sect id="mia-qa">Dealing with inactive and/or unreachable maintainers
4696       <p>
4697 If you notice that a package is lacking maintenance, you should
4698 make sure that the maintainer is active and will continue to work on
4699 their packages. It is possible that they are not active any more, but
4700 haven't registered out of the system, so to speak. On the other hand,
4701 it is also possible that they just need a reminder.
4702       <p>
4703 There is a simple system (the MIA database) in which information about
4704 maintainers who are deemed Missing In Action are recorded.  When a member of the
4705 QA group contacts an inactive maintainer or finds more information about
4706 one, this is recorded in the MIA database.  This system is available
4707 in /org/qa.debian.org/mia on the host qa.debian.org, and can be queried
4708 with a tool known as <prgn>mia-history</prgn>.  By default,
4709 <prgn>mia-history</prgn> shows information about every person it knows
4710 about, but it accepts regular expressions as arguments which it uses to
4711 match user names.  <example>mia-history --help</example> shows which
4712 arguments are accepted.  If you find that no information has been recorded
4713 about an inactive maintainer already, or that you can add more information,
4714 you should generally proceed as follows.
4715       <p>
4716 The first step is to politely contact the maintainer, and wait for a
4717 response for a reasonable time. It is quite hard to define "reasonable
4718 time", but it is important to take into account that real life is sometimes
4719 very hectic. One way to handle this would be to send a reminder after two
4720 weeks.
4721       <p>
4722 If the maintainer doesn't reply within four weeks (a month), one can
4723 assume that a response will probably not happen. If that happens, you
4724 should investigate further, and try to gather as much useful information
4725 about the maintainer in question as possible. This includes:
4726       <p>
4727       <list>
4728         <item>The "echelon" information available through the 
4729               <url id="&url-debian-db;" name="developers' LDAP database">,
4730               which indicates when the developer last has posted to
4731               a Debian mailing list. (This includes uploads via
4732               debian-*-changes lists.) Also, remember to check whether the
4733               maintainer is marked as "on vacation" in the database.
4734
4735         <item>The number of packages this maintainer is responsible for,
4736               and the condition of those packages. In particular, are there
4737               any RC bugs that have been open for ages? Furthermore, how
4738               many bugs are there in general? Another important piece of
4739               information is whether the packages have been NMUed, and if
4740               so, by whom.
4741
4742         <item>Is there any activity of the maintainer outside of Debian? 
4743               For example, they might have posted something recently to
4744               non-Debian mailing lists or news groups.
4745       </list>
4746       <p>
4747 One big problem are packages which were sponsored &mdash; the maintainer is not
4748 an official Debian developer. The echelon information is not available for
4749 sponsored people, for example, so you need to find and contact the Debian
4750 developer who has actually uploaded the package. Given that they signed the
4751 package, they're responsible for the upload anyhow, and should know what
4752 happened to the person they sponsored.
4753       <p>
4754 It is also allowed to post a query to &email-debian-devel;, asking if anyone
4755 is aware of the whereabouts of the missing maintainer.
4756       <p>
4757 Once you have gathered all of this, you can contact &email-debian-qa;.
4758 People on this alias will use the information you provided in order to
4759 decide how to proceed. For example, they might orphan one or all of the
4760 packages of the maintainer. If a packages has been NMUed, they might prefer
4761 to contact the NMUer before orphaning the package &mdash; perhaps the person who
4762 has done the NMU is interested in the package.
4763       <p>
4764 One last word: please remember to be polite. We are all volunteers and
4765 cannot dedicate all of our time to Debian. Also, you are not aware of the
4766 circumstances of the person who is involved. Perhaps they might be
4767 seriously ill or might even had died &mdash; you do not know who may be on the
4768 receiving side. Imagine how a relative will feel if they read the e-mail
4769 of the deceased and find a very impolite, angry and accusing message!)
4770       <p>
4771 On the other hand, although we are volunteers, we do have a responsibility. 
4772 So you can stress the importance of the greater good &mdash; if a maintainer does
4773 not have the time or interest anymore, they should "let go" and give the
4774 package to someone with more time.
4775
4776
4777     <sect id="newmaint">
4778       <heading>Interacting with prospective Debian developers</heading>
4779       <p>
4780 Debian's success depends on its ability to attract and retain new and
4781 talented volunteers.  If you are an experienced developer, we
4782 recommend that you get involved with the process of bringing in new
4783 developers.  This section describes how to help new prospective
4784 developers.
4785
4786
4787       <sect1 id="sponsoring">Sponsoring packages
4788         <p>
4789 Sponsoring a package means uploading a package for a maintainer who is not
4790 able to do it on their own, a new maintainer applicant. Sponsoring a package
4791 also means accepting responsibility for it.
4792         <p>
4793 If you wish to volunteer as a sponsor, you can sign up at <url
4794 id="&url-sponsors;">.
4795         <p>
4796 New maintainers usually have certain difficulties creating Debian packages
4797 &mdash; this is quite understandable. That is why the sponsor is there, to check
4798 the package and verify that it is good enough for inclusion in Debian.
4799 (Note that if the sponsored package is new, the ftpmasters will also have to
4800 inspect it before letting it in.)
4801         <p>
4802 Sponsoring merely by signing the upload or just recompiling is
4803 <strong>definitely not recommended</strong>. You need to build the source
4804 package just like you would build a package of your own. Remember that it
4805 doesn't matter that you left the prospective developer's name both in the
4806 changelog and the control file, the upload can still be traced to you.
4807         <p>
4808 If you are an application manager for a prospective developer, you can also
4809 be their sponsor. That way you can also verify how the applicant is
4810 handling the 'Tasks and Skills' part of their application.
4811
4812       <sect1>Managing sponsored packages
4813         <p>
4814 By uploading a sponsored package to Debian, you are certifying that
4815 the package meets minimum Debian standards.  That implies that you
4816 must build and test the package on your own system before uploading.
4817         <p>
4818 You cannot simply upload a binary <file>.deb</file> from the sponsoree. In
4819 theory, you should only ask for the diff file and the location of the
4820 original source tarball, and then you should download the source and apply
4821 the diff yourself. In practice, you may want to use the source package
4822 built by your sponsoree. In that case, you have to check that they haven't
4823 altered the upstream files in the <file>.orig.tar.gz</file> file that
4824 they're providing.
4825         <p>
4826 Do not be afraid to write the sponsoree back and point out changes
4827 that need to be made.  It often takes several rounds of back-and-forth
4828 email before the package is in acceptable shape.  Being a sponsor
4829 means being a mentor.
4830         <p>
4831 Once the package meets Debian standards, build and sign it with                           
4832 <example>dpkg-buildpackage -k<var>KEY-ID</var></example>                                  
4833 before uploading it to the incoming directory. Of course, you can also
4834 use any part of your <var>KEY-ID</var>, as long as it's unique in your
4835 secret keyring.
4836         <p>
4837 The Maintainer field of the <file>control</file> file and the
4838 <file>changelog</file> should list the person who did the packaging, i.e., the
4839 sponsoree. The sponsoree will therefore get all the BTS mail about the
4840 package. 
4841         <p>
4842 If you prefer to leave a more evident trace of your sponsorship job, you
4843 can add a line stating it in the most recent changelog entry.
4844        <p>
4845 You are encouraged to keep tabs on the package you sponsor using 
4846 <ref id="pkg-tracking-system">.
4847
4848       <sect1>Advocating new developers
4849         <p>
4850 See the page about <url id="&url-newmaint-advocate;"
4851 name="advocating a prospective developer"> at the Debian web site.
4852
4853       <sect1>Handling new maintainer applications
4854         <p>
4855 Please see <url id="&url-newmaint-amchecklist;" name="Checklist for
4856 Application Managers"> at the Debian web site.
4857
4858
4859     <chapt id="l10n">Internationalizing, translating, being internationalized
4860     and being translated
4861       <p>
4862 Debian supports an ever-increasing number of natural languages. Even if you are
4863 a native English speaker and do not speak any other language, it is part of your
4864 duty as a maintainer to be aware of issues of internationalization (abbreviated
4865 i18n because there are 18 letters between the 'i' and the 'n' in
4866 internationalization). Therefore, even if you are ok with English-only
4867 programs, you should read most of this chapter.
4868       <p>
4869 According to <url id="http://www.debian.org/doc/manuals/intro-i18n/"
4870 name="Introduction to i18n"> from Tomohiro KUBOTA, "I18N (internationalization)
4871 means modification of a software or related technologies so that a software can
4872 potentially handle multiple languages, customs, and so on in the world." while
4873 "L10N (localization) means implementation of a specific language for an already
4874 internationalized software."
4875       <p>
4876 l10n and i18n are interconnected, but the difficulties related to each of them are very
4877 different. It's not really difficult to allow a program to change the language
4878 in which texts are displayed based on user settings, but it is very time
4879 consuming to actually translate these messages. On the other hand, setting the
4880 character encoding is trivial, but adapting the code to use several character
4881 encodings is a really hard problem.
4882       <p>
4883 Setting aside the i18n problems, where no general guideline can be given, there is
4884 actually no central infrastructure for l10n within Debian which could be
4885 compared to the dbuild mechanism for porting. So most of the work has to be
4886 done manually.
4887
4888
4889         <sect id="l10n-handling">How translations are handled within Debian
4890           <p>
4891 Handling translation of the texts contained in a package is still a manual
4892 task, and the process depends on the kind of text you want to see translated.
4893           <p>
4894 For program messages, the gettext infrastructure is used most of the time.
4895 Most of the time, the translation is handled upstream within projects like the
4896 <url id="http://www.iro.umontreal.ca/contrib/po/HTML/" name="Free Translation
4897 Project">, the <url id="http://developer.gnome.org/projects/gtp/" name="Gnome
4898 translation Project"> or the <url id="http://i18n.kde.org/" name="KDE one">.
4899 The only centralized resource within Debian is the <url
4900 id="http://www.debian.org/intl/l10n/" name="Central Debian translation
4901 statistics">, where you can find some statistics about the translation files
4902 found in the actual packages, but no real infrastructure to ease the translation
4903 process.
4904           <p>
4905 An effort to translate the package descriptions started long ago, even if very
4906 little support is offered by the tools to actually use them (i.e., only APT can use
4907 them, when configured correctly). Maintainers don't need to do
4908 anything special to support translated package descriptions;
4909 translators should use the <url id="http://ddtp.debian.org/"
4910 name="DDTP">.
4911           <p>
4912 For debconf templates, maintainers should use the po-debconf package to ease the
4913 work of translators, who could use the DDTP to do their work (but the French and
4914 Brazilian teams don't). Some statistics can be found both on the DDTP site
4915 (about what is actually translated), and on the <url
4916 id="http://www.debian.org/intl/l10n/" name="Central Debian translation
4917 statistics"> site (about what is integrated in the packages). 
4918           <p>
4919 For web pages, each l10n team has access to the relevant CVS, and the statistics
4920 are available from the Central Debian translation statistics site.
4921           <p>
4922 For general documentation about Debian, the process is more or less the same
4923 than for the web pages (the translators have access to the CVS), but there are
4924 no statistics pages.
4925           <p>
4926 For package-specific documentation (man pages, info documents, other formats),
4927 almost everything remains to be done.
4928         <p>
4929 Most notably, the KDE project handles
4930 translation of its documentation in the same way as its program messages.
4931         <p>
4932 There is an effort to handle Debian-specific man pages
4933 within a <url
4934 id="http://cvs.debian.org/manpages/?cvsroot=debian-doc" name="specific CVS
4935 repository">.
4936
4937
4938         <sect id="l10n-faqm">I18N &amp; L10N FAQ for maintainers
4939           <p>
4940 This is a list of problems that maintainers may face concerning i18n and l10n.
4941 While reading this, keep in mind that there is no real consensus on these
4942 points within Debian, and that this is only advice. If you have a better idea
4943 for a given problem, or if you disagree on some points, feel free to provide
4944 your feedback, so that this document can be enhanced.
4945
4946           <sect1 id="l10n-faqm-tr">How to get a given text translated
4947             <p>
4948 To translate package descriptions or debconf templates, you have nothing to do;
4949 the DDTP infrastructure will dispatch the material to translate to volunteers
4950 with no need for interaction from your part.
4951             <p>
4952 For all other material (gettext files, man pages, or other documentation), the
4953 best solution is to put your text somewhere on the Internet, and ask on debian-i18n
4954 for a translation in different languages. Some translation team members are
4955 subscribed to this list, and they will take care of the translation and of the
4956 reviewing process. Once they are done, you will get your translated document from them
4957 in your mailbox.
4958
4959           <sect1 id="l10n-faqm-rev">How to get a given translation reviewed
4960             <p>
4961 From time to time, individuals translate some texts in your package
4962 and will ask you for inclusion of the translation in the package. This can become problematic if
4963 you are not fluent in the given language. It is a good idea to send the
4964 document to the corresponding l10n mailing list, asking for a review. Once it
4965 has been done, you should feel more confident in the quality of the
4966 translation, and feel safe to include it in your package.
4967
4968           <sect1 id="l10n-faqm-update">How to get a given translation updated
4969             <p>
4970 If you have some translations of a given text lying around, each time you
4971 update the original, you should ask the previous translator to update
4972 the translation with your new changes.
4973 Keep in mind that this task takes time; at least one week to get
4974 the update reviewed and all. 
4975             <p>
4976 If the translator is unresponsive, you may ask for help on the corresponding
4977 l10n mailing list. If everything fails, don't forget to put a warning in the
4978 translated document, stating that the translation is somehow outdated, and that
4979 the reader should refer to the original document if possible. 
4980             <p>
4981 Avoid removing a translation completely because it is outdated. Old
4982 documentation is often better than no documentation at all for non-English
4983 speakers.
4984
4985           <sect1 id="l10n-faqm-bug">How to handle a bug report concerning a translation
4986             <p>
4987 The best solution may be to mark the bug as "forwarded to upstream", and
4988 forward it to both the previous translator and his/her team (using the
4989 corresponding debian-l10n-XXX mailing list).
4990 <!-- TODO: add the i18n tag to the bug? -->
4991
4992         <sect id="l10n-faqtr">I18N &amp; L10N FAQ for translators
4993           <p>
4994 While reading this, please keep in mind that there is no general procedure
4995 within Debian concerning these points, and that in any case, you should
4996 collaborate with your team and the package maintainer.
4997
4998           <sect1 id="l10n-faqtr-help">How to help the translation effort
4999             <p>
5000 Choose what you want to translate, make sure that nobody is already working on
5001 it (using your debian-l10n-XXX mailing list), translate it, get it reviewed by
5002 other native speakers on your l10n mailing list, and provide it to the
5003 maintainer of the package (see next point).
5004
5005           <sect1 id="l10n-faqtr-inc">How to provide a translation for inclusion in a package
5006             <p>
5007 Make sure your translation is correct (asking for review on your l10n mailing
5008 list) before providing it for inclusion. It will save time for everyone, and
5009 avoid the chaos resulting in having several versions of the same document in
5010 bug reports.
5011             <p>
5012 The best solution is to fill a regular bug containing the translation against
5013 the package. Make sure to use the 'PATCH' tag, and to not use a severity higher
5014 than 'wishlist', since the lack of translation never prevented a program from
5015 running.
5016
5017         <sect id="l10n-best">Best current practice concerning l10n
5018           <p>
5019 <list>
5020     <item>
5021 As a maintainer, never edit the translations in any way (even to reformat the
5022 layout) without asking to the corresponding l10n mailing list. You risk for
5023 example to break the encoding of the file by doing so. Moreover, what you
5024 consider as an error can be right (or even needed) in the given language.
5025     <item>
5026 As a translator, if you find an error in the original text, make sure to report
5027 it. Translators are often the most attentive readers of a given text, and if
5028 they don't report the errors they find, nobody will.
5029     <item>
5030 In any case, remember that the major issue with l10n is that it requires
5031 several people to cooperate, and that it is very easy to start a flamewar about
5032 small problems because of misunderstandings. So if you have problems with your
5033 interlocutor, ask for help on the corresponding l10n mailing list, on
5034 debian-i18n, or even on debian-devel (but beware, l10n discussions very often
5035 become flamewars on that list :)
5036     <item>
5037 In any case, cooperation can only be achieved with <strong>mutual respect</strong>.
5038 </list>
5039
5040
5041     <appendix id="tools">Overview of Debian Maintainer Tools
5042       <p>
5043 This section contains a rough overview of the tools available to
5044 maintainers.  The following is by no means complete or definitive, but
5045 just a guide to some of the more popular tools.
5046       <p>
5047 Debian maintainer tools are meant to aid developers and 
5048 free their time for critical tasks.  As Larry Wall says, there's more
5049 than one way to do it.
5050       <p>
5051 Some people prefer to use high-level package maintenance tools and
5052 some do not.  Debian is officially agnostic on this issue; any tool
5053 which gets the job done is fine.  Therefore, this section is not meant
5054 to stipulate to anyone which tools they should use or how they should
5055 go about their duties of maintainership.  Nor is it meant to
5056 endorse any particular tool to the exclusion of a competing tool.
5057       <p>
5058 Most of the descriptions of these packages come from the actual
5059 package descriptions themselves.  Further information can be found in
5060 the package documentation itself.  You can also see more info with the
5061 command <tt>apt-cache show &lt;package-name&gt;</tt>.</p>
5062
5063       <sect id="tools-core">
5064         <heading>Core tools</heading>
5065         <p>
5066 The following tools are pretty much required for any maintainer.</p>
5067
5068       <sect1 id="dpkg-dev">
5069         <heading><package>dpkg-dev</package>
5070         <p>
5071 <package>dpkg-dev</package> contains the tools (including
5072 <prgn>dpkg-source</prgn>) required to unpack, build, and upload Debian
5073 source packages.  These utilities contain the fundamental, low-level
5074 functionality required to create and manipulate packages; as such,
5075 they are essential for any Debian maintainer.
5076
5077       <sect1 id="debconf">
5078         <heading><package>debconf</package></heading>
5079         <p>
5080 <package>debconf</package> provides a consistent interface to
5081 configuring packages interactively.  It is user interface
5082 independent, allowing end-users to configure packages with a
5083 text-only interface, an HTML interface, or a dialog interface.  New
5084 interfaces can be added as modules.
5085         <p>
5086 You can find documentation for this package in the
5087 <package>debconf-doc</package> package.
5088         <p>
5089 Many feel that this system should be used for all packages which require
5090 interactive configuration; see <ref id="bpp-config-mgmt">.
5091 <package>debconf</package> is not currently required by Debian Policy,
5092 but that may change in the future.
5093         </sect1>
5094
5095       <sect1 id="fakeroot">
5096         <heading><package>fakeroot</package>
5097         <p>
5098 <package>fakeroot</package> simulates root privileges.  This enables
5099 you to build packages without being root (packages usually want to
5100 install files with root ownership).  If you have
5101 <package>fakeroot</package> installed, you can build packages as a
5102 regular user: <tt>dpkg-buildpackage -rfakeroot</tt>.
5103         </sect1>
5104       </sect>
5105
5106       <sect id="tools-lint">
5107         <heading>Package lint tools</heading>
5108         <p>
5109 According to the Free On-line Dictionary of Computing (FOLDOC), `lint'
5110 is "a Unix C language processor which carries out more thorough checks
5111 on the code than is usual with C compilers."  Package lint tools help
5112 package maintainers by automatically finding common problems and
5113 policy violations in their packages.</p>
5114
5115         <sect1 id="lintian">
5116           <heading><package>lintian</package></heading>
5117           <p>
5118 <package>lintian</package> dissects Debian packages and emits
5119 information about bugs
5120 and policy violations. It contains automated checks for many aspects
5121 of Debian policy as well as some checks for common errors.
5122         <p>
5123 You should periodically get the newest <package>lintian</package> from
5124 `unstable' and check over all your packages. Notice that the <tt>-i</tt>
5125 option provides detailed explanations of what each error or warning means,
5126 what its basis in Policy is, and commonly how you can fix the problem.
5127         <p>
5128 Refer to <ref id="sanitycheck"> for more information on how and when
5129 to use Lintian.
5130         <p>
5131 You can also see a summary of all problems reported by Lintian on your
5132 packages at <url id="&url-lintian;">. These reports contain the latest
5133 <prgn>lintian</prgn> output for the whole development distribution
5134 ("unstable").
5135         </sect1>
5136
5137         <sect1 id="linda">
5138           <heading><package>linda</package></heading>
5139           <p>
5140 <package>linda</package> is another package linter.  It is similar to
5141 <package>lintian</package> but has a different set of checks.  Its
5142 written in Python rather than Perl.</p>
5143         </sect1>
5144
5145         <sect1 id="debdiff">
5146           <heading><package>debdiff</package></heading>
5147           <p>
5148 <prgn>debdiff</prgn> (from the <package>devscripts</package> package, <ref id="devscripts">)
5149 compares file lists and control files of two packages. It is a simple
5150 regression test, as it will help you notice if the number of binary
5151 packages has changed since the last upload, or if something has changed
5152 in the control file. Of course, some of the changes it reports will be
5153 all right, but it can help you prevent various accidents.
5154           <p>
5155 You can run it over a pair of binary packages:
5156 <example>
5157 debdiff package_1-1_arch.deb package_2-1_arch.deb
5158 </example>
5159           <p>
5160 Or even a pair of changes files:
5161 <example>
5162 debdiff package_1-1_arch.changes package_2-1_arch.changes
5163 </example>
5164           <p>
5165 For more information please see <manref name="debdiff" section="1">.
5166         </sect1>
5167
5168       </sect>
5169
5170
5171       <sect id="tools-helpers">
5172         <heading>Helpers for <file>debian/rules</file></heading>
5173         <p>
5174 Package building tools make the process of writing
5175 <file>debian/rules</file> files easier.  See <ref id="helper-scripts">
5176 for more information about why these might or might not be desired.
5177
5178         <sect1 id="debhelper">
5179           <heading><package>debhelper</package></heading>
5180         <p>
5181 <package>debhelper</package> is a collection of programs which can be
5182 used in <file>debian/rules</file> to automate common tasks related to
5183 building binary Debian packages. <package>debhelper</package> includes
5184 programs to install
5185 various files into your package, compress files, fix file permissions,
5186 and integrate your package with the Debian menu system.
5187         <p>
5188 Unlike some approaches, <package>debhelper</package> is broken into
5189 several small, simple commands which act in a consistent manner.  As
5190 such, it allows more fine-grained control than some of the
5191 other "debian/rules tools".
5192         <p>
5193 There are a number of little <package>debhelper</package> add-on
5194 packages, too transient to document.  You can see the list of most of
5195 them by doing <tt>apt-cache search ^dh-</tt>.
5196         </sect1>
5197
5198         <sect1 id="debmake">
5199           <heading><package>debmake</package>
5200         <p>
5201 <package>debmake</package>, a precursor to
5202 <package>debhelper</package>, is a more coarse-grained
5203 <file>debian/rules</file> assistant. It includes two main programs:
5204 <prgn>deb-make</prgn>, which can be used to help a maintainer convert
5205 a regular (non-Debian) source archive into a Debian source package;
5206 and <prgn>debstd</prgn>, which incorporates in one big shot the same
5207 sort of automated functions that one finds in
5208 <package>debhelper</package>.
5209         <p>
5210 The consensus is that <package>debmake</package> is now deprecated in
5211 favor of <package>debhelper</package>.  However, it's not a bug to use
5212 <package>debmake</package>.
5213         </sect1>
5214
5215         <sect1 id="dh-make">
5216           <heading><package>dh-make</package>
5217         <p>
5218 The <package/dh-make/ package contains <prgn/dh_make/, a program that
5219 creates a skeleton of files necessary to build a Debian package out of
5220 a source tree. As the name suggests, <prgn/dh_make/ is a rewrite of
5221 <package/debmake/ and its template files use dh_* programs from
5222 <package/debhelper/.
5223         <p>
5224 While the rules files generated by <prgn/dh_make/ are in general a
5225 sufficient basis for a working package, they are still just the groundwork:
5226 the burden still lies on the maintainer to finely tune the generated files
5227 and make the package entirely functional and Policy-compliant.
5228         </sect1>
5229
5230         <sect1 id="yada">
5231           <heading><package>yada</package>
5232         <p>
5233 <package>yada</package> is another packaging helper tool.  It uses a
5234 <file>debian/packages</file> file to auto-generate
5235 <file>debian/rules</file> and other necessary files in the
5236 <file>debian/</file> subdirectory. The <file>debian/packages</file> file
5237 contains instruction to build packages and there is no need to create any
5238 <file>Makefile</file> files.  There is possibility to
5239 use macro engine similar to the one used in SPECS files from RPM
5240 source packages.</p>
5241         <p>
5242 For more informations see
5243 <tt><url id="http://yada.alioth.debian.org/" name="YADA site"></tt>.</p>
5244         </sect1>
5245
5246         <sect1 id="equivs">
5247           <heading><package>equivs</package>
5248         <p>
5249 <package>equivs</package> is another package for making packages.  It
5250 is often suggested for local use if you need to make a package simply
5251 to fulfill dependencies.  It is also sometimes used when making
5252 ``meta-packages'', which are packages whose only purpose is to depend
5253 on other packages.</p>
5254         </sect1>
5255       </sect>
5256
5257
5258
5259       <sect id="tools-builders">
5260         <heading>Package builders</heading>
5261         <p>
5262 The following packages help with the package building process, general
5263 driving <prgn>dpkg-buildpackage</prgn> as well as handling supporting
5264 tasks.</p>
5265
5266         <sect1 id="cvs-buildpackage">
5267           <heading><package>cvs-buildpackage</package>
5268         <p>
5269 <package>cvs-buildpackage</package> provides the capability to inject
5270 or import Debian source packages into a CVS repository, build a Debian
5271 package from the CVS repository, and helps in integrating upstream
5272 changes into the repository.
5273         <p>
5274 These utilities provide an infrastructure to facilitate the use of CVS
5275 by Debian maintainers. This allows one to keep separate CVS branches
5276 of a package for <em>stable</em>, <em>unstable</em> and possibly
5277 <em>experimental</em> distributions, along with the other benefits of
5278 a version control system.
5279         </sect1>
5280
5281         <sect1 id="debootstrap">
5282           <heading><package>debootstrap</package></heading>
5283           <p>
5284 The <package>debootstrap</package> package and script allows you to
5285 "bootstrap" a Debian base system into any part of your filesystem.
5286 By "base system", we mean the bare minimum of packages required to
5287 operate and install the rest of the system.
5288         <p>
5289 Having a system like this can be useful in many ways. For instance,
5290 you can <prgn>chroot</prgn> into it if you want to test your build
5291 dependencies.  Or you can test how your package behaves when installed
5292 into a bare base system.  Chroot builders use this package; see below.
5293         </sect1>
5294
5295         <sect1 id="pbuilder">
5296           <heading><package>pbuilder</package></heading>
5297           <p>
5298 <package>pbuilder</package> constructs a chrooted system, and builds a
5299 package inside the chroot. It is very useful to check that a package's
5300 build-dependencies are correct, and to be sure that unnecessary and
5301 wrong build dependencies will not exist in the resulting package.</p>
5302           <p>
5303 A related package is <package>pbuilder-uml</package>, which goes even
5304 further by doing the build within a User Mode Linux environment.</p>
5305         </sect1>
5306
5307       <sect1 id="sbuild">
5308         <heading><package>sbuild</package></heading>
5309           <p>
5310 <package>sbuild</package> is another automated builder.  It can use
5311 chrooted environments as well.  It can be used stand-alone, or as part
5312 of a networked, distributed build environment.  As the latter, it is
5313 part of the system used by porters to build binary packages for all
5314 the available architectures.  See <ref id="buildd"> for more
5315 information, and <url id="&url-buildd;"> to see the system in
5316 action.</p>
5317         </sect1>
5318       </sect>
5319
5320       <sect id="uploaders">
5321         <heading>Package uploaders</heading>
5322         <p>
5323 The following packages help automate or simplify the process of
5324 uploading packages into the official archive.</p>
5325
5326         <sect1 id="dupload">
5327           <heading><package>dupload</package></heading>
5328           <p>
5329 <package>dupload</package> is a package and a script to automatically
5330 upload Debian packages to the Debian archive, to log the upload, and
5331 to send mail about the upload of a package.  You can configure it for
5332 new upload locations or methods.
5333         </sect1>
5334
5335         <sect1 id="dput">
5336           <heading><package>dput</package></heading>
5337           <p>
5338 The <package>dput</package> package and script does much the same
5339 thing as <package>dupload</package>, but in a different way.  It has
5340 some features over <package>dupload</package>, such as the ability to
5341 check the GnuPG signature and checksums before uploading, and the
5342 possibility of running <prgn>dinstall</prgn> in dry-run mode after the
5343 upload.
5344         </sect1>
5345         <sect1 id="dcut">
5346           <heading><package>dcut</package></heading>
5347           <p>
5348 The <package>dcut</package> script (part of the package <ref id="dput">)
5349 helps in removing files from the ftp upload directory.
5350         </sect1>
5351       </sect>
5352
5353       <sect id="tools-maint-automate">
5354         <heading>Maintenance automation</heading>
5355         <p>
5356 The following tools help automate different maintenance tasks, from
5357 adding changelog entries or signature lines and looking up bugs in Emacs
5358 to making use of the newest and official
5359 <file>config.sub</file>.</p>
5360
5361         <sect1 id="devscripts">
5362           <heading><package>devscripts</package></heading>
5363           <p>
5364 <package>devscripts</package> is a package containing wrappers
5365 and tools which are very helpful for maintaining your Debian
5366 packages.  Example scripts include <prgn>debchange</prgn> and
5367 <prgn>dch</prgn>, which manipulate your <file>debian/changelog</file>
5368 file from the command-line, and <prgn>debuild</prgn>, which is a
5369 wrapper around <prgn>dpkg-buildpackage</prgn>. The <prgn>bts</prgn>
5370 utility is also very helpful to update the state of bug reports on the
5371 command line.  <prgn>uscan</prgn> can be used to watch for new upstream
5372 versions of your packages.  <prgn>debrsign</prgn> can be used to
5373 remotely sign a package prior to upload, which is nice when the
5374 machine you build the package on is different from where your GPG keys
5375 are.</p>
5376           <p>
5377 See the <manref name="devscripts" section="1"> manual page for a
5378 complete list of available scripts.</p>
5379         </sect1>
5380
5381         <sect1 id="autotools-dev">
5382           <heading><package>autotools-dev</package></heading>
5383           <p>
5384 <package>autotools-dev</package>
5385 contains best practices for people who maintain packages which use
5386 <prgn>autoconf</prgn> and/or <prgn>automake</prgn>.  Also contains
5387 canonical <file>config.sub</file> and <file>config.guess</file> files
5388 which are known to work on all Debian ports.</p>
5389         </sect1>
5390
5391         <sect1 id="dpkg-repack">
5392           <heading><package>dpkg-repack</package></heading>
5393           <p>
5394 <prgn>dpkg-repack</prgn> creates Debian package file out of a package
5395 that has already been installed. If any changes have been made to the
5396 package while it was unpacked (e.g., files in <file>/etc</file> were
5397 modified), the new package will inherit the changes.</p>
5398           <p>
5399 This utility can make it easy to copy packages from one computer to
5400 another, or to recreate packages which are installed on your system
5401 but no longer available elsewhere, or to save the current state of a
5402 package before you upgrade it.</p>
5403         </sect1>
5404
5405         <sect1 id="alien">
5406           <heading><package>alien</package></heading>
5407           <p>
5408 <prgn>alien</prgn> converts binary packages between various packaging
5409 formats, including Debian, RPM (RedHat), LSB (Linux Standard Base),
5410 Solaris, and Slackware packages.</p>
5411         </sect1>
5412
5413         <sect1 id="debsums">
5414           <heading><package>debsums</package></heading>
5415           <p>
5416 <prgn>debsums</prgn> checks installed packages against their MD5 sums.
5417 Note that not all packages have MD5 sums, since they aren't required
5418 by Policy.</p>
5419         </sect1>
5420
5421         <sect1 id="dpkg-dev-el">
5422           <heading><package>dpkg-dev-el</package></heading>
5423           <p>
5424 <package>dpkg-dev-el</package> is an Emacs lisp package which provides
5425 assistance when editing some of the files in the <file>debian</file>
5426 directory of your package.  For instance,
5427 there are handy functions for
5428 listing a package's current bugs,
5429 and for finalizing the latest entry in a
5430 <file>debian/changelog</file> file.
5431         </sect1>
5432
5433         <sect1 id="dpkg-depcheck">
5434           <heading><package>dpkg-depcheck</package></heading>
5435           <p>
5436 <prgn>dpkg-depcheck</prgn> (from the <package>devscripts</package> 
5437 package, <ref id="devscripts">)
5438 runs a command under <prgn>strace</prgn> to determine all the packages that
5439 were used by the said command.
5440           <p>
5441 For Debian packages, this is useful when you have to compose a
5442 <tt>Build-Depends</tt> line for your new package: running the build
5443 process through <prgn>dpkg-depcheck</prgn> will provide you with a
5444 good first approximation of the build-dependencies. For example:
5445 <example>
5446 dpkg-depcheck -b debian/rules build
5447 </example>
5448           <p>
5449 <prgn>dpkg-depcheck</prgn> can also be used to check for run-time
5450 dependencies, especially if your package uses exec(2) to run other
5451 programs.
5452           <p>
5453 For more information please see <manref name="dpkg-depcheck" section="1">.
5454         </sect1>
5455
5456       </sect>
5457
5458
5459       <sect id="tools-porting">
5460         <heading>Porting tools</heading>
5461         <p>
5462 The following tools are helpful for porters and for
5463 cross-compilation.</p>
5464
5465         <sect1 id="quinn-diff">
5466           <heading><package>quinn-diff</package>
5467           <p>
5468 <package>quinn-diff</package> is used to locate the differences from
5469 one architecture to another.  For instance, it could tell you which
5470 packages need to be ported for architecture <var>Y</var>, based on
5471 architecture <var>X</var>.
5472
5473         <sect1 id="dpkg-cross">
5474           <heading><package>dpkg-cross</package>
5475           <p>
5476 <package>dpkg-cross</package> is a tool for installing libraries and
5477 headers for cross-compiling in a way similar to
5478 <package>dpkg</package>. Furthermore, the functionality of
5479 <prgn>dpkg-buildpackage</prgn> and <prgn>dpkg-shlibdeps</prgn> is
5480 enhanced to support cross-compiling.
5481         </sect1>
5482
5483
5484       <sect id="tools-doc">
5485         <heading>Documentation and information</heading>
5486         <p>
5487 The following packages provide information for maintainers or help
5488 with building documentation.
5489
5490         <sect1 id="debiandoc-sgml">
5491           <heading><package>debiandoc-sgml</package></heading>
5492           <p>
5493 <package>debiandoc-sgml</package> provides the DebianDoc SGML DTD,
5494 which is commonly used for Debian documentation.  This manual, for
5495 instance, is written in DebianDoc.  It also provides scripts for
5496 building and styling the source to various output formats.</p>
5497           <p>
5498 Documentation for the DTD can be found in the
5499 <package>debiandoc-sgml-doc</package> package.</p>
5500         </sect1>
5501
5502         <sect1 id="debian-keyring">
5503           <heading><package>debian-keyring</package></heading>
5504           <p>
5505 Contains the public GPG and PGP keys of Debian developers.  See <ref
5506 id="key-maint"> and the package documentation for more
5507 information.</p>
5508         </sect1>
5509
5510         <sect1 id="debview">
5511           <heading><package>debview</package></heading>
5512           <p>
5513 <package>debview</package> provides an Emacs mode for viewing Debian
5514 binary packages.  This lets you examine a package without unpacking
5515 it.</p>
5516         </sect1>
5517       </sect>
5518
5519 <!-- FIXME: add the following
5520
5521 questionable:
5522   dbs (referred to above)
5523   dpatch (referred to above)
5524   debarchiver
5525   ucf
5526   dpkg-awk
5527   grep-dctrl
5528   d-shlibs
5529   wajig
5530   magpie
5531   apt-dpkg-ref
5532   apt-show-source
5533   apt-show-versions
5534   pdbv
5535   epm
5536   apt-src
5537   apt-build
5538
5539 rejected:
5540   debaux: too new, unmaintained?
5541   dh-make-perl: too new, unmaintained?
5542 -->
5543
5544     </appendix>
5545   </book>
5546 </debiandoc>
5547
5548 <!-- Keep this comment at the end of the file
5549 Local variables:
5550 mode: sgml
5551 sgml-omittag:t
5552 sgml-shorttag:t
5553 sgml-minimize-attributes:nil
5554 sgml-always-quote-attributes:t
5555 sgml-indent-step:2
5556 sgml-indent-data:nil
5557 sgml-parent-document:nil
5558 sgml-exposed-tags:nil
5559 sgml-declaration:nil
5560 sgml-local-catalogs:nil
5561 sgml-local-ecat-files:nil
5562 End:
5563 -->