chiark / gitweb /
rephrased and expanded the voting section a little bit
[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 independant entities -->
6   <!entity % commondata  SYSTEM "common.ent" > %commondata;
7
8   <!-- CVS revision of this document -->
9   <!entity cvs-rev "$Revision: 1.178 $">
10   <!-- if you are translating this document, please notate the CVS
11        revision of the developers reference here -->
12   <!--
13     <!entity cvs-en-rev "X.YY">
14     -->
15
16   <!--  -->
17   <!entity FIXME "<em>FIXME:</em>&nbsp;">
18
19 ]>
20 <debiandoc>
21   <book>
22       <title>Debian Developer's Reference
23
24       <author>Adam Di Carlo, current maintainer <email>aph@debian.org</email>
25       <author>Raphaël Hertzog, co-maintainer <email>hertzog@debian.org</email>
26       <author>Christian Schwarz <email>schwarz@debian.org</email>
27       <author>Ian Jackson <email>ijackson@gnu.ai.mit.edu</email>
28       <version>ver. &version;, &date-en;
29
30       <copyright>
31         <copyrightsummary>
32 copyright &copy; 1998&mdash;2003 Adam Di Carlo</copyrightsummary>
33         <copyrightsummary>
34 copyright &copy; 2002 Raphaël Hertzog</copyrightsummary>
35         <copyrightsummary>
36 copyright &copy; 1997, 1998 Christian Schwarz</copyrightsummary>
37         <p>
38 This manual is free software; you may redistribute it and/or modify it
39 under the terms of the GNU General Public License as published by the
40 Free Software Foundation; either version 2, or (at your option) any
41 later version.
42         <p>
43 This is distributed in the hope that it will be useful, but
44 <em>without any warranty</em>; without even the implied warranty of
45 merchantability or fitness for a particular purpose.  See the GNU
46 General Public License for more details.
47         <p>
48 A copy of the GNU General Public License is available as &file-GPL; in
49 the &debian-formal; distribution or on the World Wide Web at <url
50 id="&url-gpl;" name="the GNU web site">.  You can also obtain it by
51 writing to the &fsf-addr;.
52
53     <toc detail="sect1">
54
55     <chapt id="scope">Scope of This Document
56       <p>
57 The purpose of this document is to provide an overview of the
58 recommended procedures and the available resources for Debian
59 developers.
60
61 <!-- FIXME: rewrites -->
62       <p>
63 The procedures discussed within include how to become a maintainer
64 (<ref id="new-maintainer">); how to create new packages
65 (<ref id="newpackage">) and how to upload packages (<ref id="upload">);
66 how to handle bug reports (<ref id="bug-handling">); how to move,
67 remove, or orphan packages (<ref id="archive-manip">); how to port
68 packages (<ref id="porting">); and how and when to do interim
69 releases of other maintainers' packages (<ref id="nmu">).
70       <p>
71 The resources discussed in this reference include the mailing lists
72 (<ref id="mailing-lists">) and servers (<ref id="server-machines">); a
73 discussion of the structure of the Debian archive (<ref
74 id="archive">); explanation of the different servers which accept
75 package uploads (<ref id="upload-ftp-master">); and a discussion of
76 resources which can help maintainers with the quality of their
77 packages (<ref id="tools">).
78       <p>
79 It should be clear that this reference does not discuss the technical
80 details of the Debian package nor how to generate Debian packages.
81 Nor does this reference detail the standards to which Debian software
82 must comply.  All of such information can be found in the <url
83 id="&url-debian-policy;" name="Debian Policy Manual">.
84       <p>
85 Furthermore, this document is <em>not an expression of formal
86 policy</em>.  It contains documentation for the Debian system and
87 generally agreed-upon best practices.  Thus, it is what is called a
88 ``normative'' document.
89
90
91     <chapt id="new-maintainer">Applying to Become a Maintainer
92         
93       <sect id="getting-started">Getting started
94         <p>
95 So, you've read all the documentation, you've gone through the <url
96 id="&url-newmaint-guide;" name="Debian New Maintainers' Guide">,
97 understand what everything in the <package>hello</package> example
98 package is for, and you're about to Debianize your favorite piece of
99 software.  How do you actually become a Debian developer so that your
100 work can be incorporated into the Project?
101         <p>
102 Firstly, subscribe to &email-debian-devel; if you haven't already.
103 Send the word <tt>subscribe</tt> in the <em>Subject</em> of an email
104 to &email-debian-devel-req;.  In case of problems, contact the list
105 administrator at &email-listmaster;.  More information on available
106 mailing lists can be found in <ref id="mailing-lists">.
107 &email-debian-devel-announce; is another list which is mandatory
108 for anyone who wishes to follow Debian's development.
109         <p>
110 You should subscribe and lurk (that is, read without posting) for a
111 bit before doing any coding, and you should post about your intentions
112 to work on something to avoid duplicated effort.
113         <p>
114 Another good list to subscribe to is &email-debian-mentors;.  See <ref
115 id="mentors"> for details.  The IRC channel <tt>#debian</tt> can also be
116 helpful.
117
118         <p>
119 When you know how you want to contribute to &debian-formal;, you
120 should get in contact with existing Debian maintainers who are working
121 on similar tasks.  That way, you can learn from experienced developers.
122 For example, if you are interested in packaging existing software for
123 Debian you should try to get a sponsor.  A sponsor will work together
124 with you on your package and upload it to the Debian archive once they
125 are happy with the packaging work you have done.  You can find a sponsor
126 by mailing the &email-debian-mentors; mailing list, describing your
127 package and yourself and asking for a sponsor (see <ref id="sponsoring">
128 for more information on sponsoring).  On the other hand, if you are
129 interested in porting Debian to alternative architectures or kernels
130 you can subscribe to port specific mailing lists and ask there how to
131 get started.  Finally, if you are interested in documentation or
132 Quality Assurance (QA) work you can join maintainers already working on
133 these tasks and submit patches and improvements.
134  
135
136       <sect id="registering">Registering as a Debian developer
137         <p>
138 Before you decide to register with &debian-formal;, you will need to
139 read all the information available at the <url id="&url-newmaint;"
140 name="New Maintainer's Corner">.  It describes exactly the
141 preparations you have to do before you can register to become a Debian
142 developer.
143
144 For example, before you apply, you have to to read the <url
145 id="&url-social-contract;" name="Debian Social Contract">.
146 Registering as a developer means that you agree with and pledge to
147 uphold the Debian Social Contract; it is very important that
148 maintainers are in accord with the essential ideas behind
149 &debian-formal;.  Reading the <url id="&url-gnu-manifesto;" name="GNU
150 Manifesto"> would also be a good idea.
151         <p>
152 The process of registering as a developer is a process of verifying
153 your identity and intentions, and checking your technical skills.  As
154 the number of people working on &debian-formal; has grown to over
155 &number-of-maintainers; people and our systems are used in several
156 very important places we have to be careful about being compromised.
157 Therefore, we need to verify new maintainers before we can give them
158 accounts on our servers and let them upload packages.
159         <p>
160 Before you actually register you should have shown that you can do
161 competent work and will be a good contributor.  You can show this by
162 submitting patches through the Bug Tracking System or having a package
163 sponsored by an existing maintainer for a while.  Also, we expect that
164 contributors are interested in the whole project and not just in
165 maintaining their own packages.  If you can help other maintainers by
166 providing further information on a bug or even a patch, then do so!
167         <p>
168 Registration requires that you are familiar with Debian's philosophy
169 and technical documentation.  Furthermore, you need a GnuPG key which
170 has been signed by an existing Debian maintainer.  If your GnuPG key
171 is not signed yet, you should try to meet a Debian maintainer in
172 person to get your key signed.  There's a <url id="&url-gpg-coord;"
173 name="GnuPG Key Signing Coordination page"> which should help you find
174 a maintainer close to you (If you cannot find a Debian maintainer
175 close to you, there's an alternative way to pass the ID check.  You
176 can send in a photo ID signed with your GnuPG key.  Having your GnuPG
177 key signed is the preferred way, however.  See the
178 <url id="&url-newmaint-id;" name="identification page"> for more
179 information about these two options.)
180
181         <p>
182 If you do not have an OpenPGP key yet, generate one. Every developer
183 needs a OpenPGP key in order to sign and verify package uploads. You
184 should read the manual for the software you are using, since it has
185 much important information which is critical to its security.  Many
186 more security failures are due to human error than to software failure
187 or high-powered spy techniques.  See <ref id="key-maint"> for more
188 information on maintaining your public key.
189         <p>
190 Debian uses the <prgn>GNU Privacy Guard</prgn> (package
191 <package>gnupg</package> version 1 or better) as its baseline standard.
192 You can use some other implementation of OpenPGP as well.  Note that
193 OpenPGP is an open standard based on <url id="&url-rfc2440;" name="RFC
194 2440">.
195         <p>
196 The recommended public key algorithm for use in Debian development
197 work is DSA (sometimes call ``DSS'' or ``DH/ElGamal'').  Other key
198 types may be used however.  Your key length must be at least 1024
199 bits; there is no reason to use a smaller key, and doing so would be
200 much less secure.  Your key must be signed with at least your own user
201 ID; this prevents user ID tampering.  <prgn>gpg</prgn> does this
202 automatically.
203         <p>
204 If your public key isn't on public key servers such as &pgp-keyserv;,
205 please read the documentation available locally in &file-keyservs;.
206 That document contains instructions on how to put your key on the
207 public key servers.  The New Maintainer Group will put your public key
208 on the servers if it isn't already there.
209         <p>
210 Some countries restrict the use of cryptographic software by their
211 citizens.  This need not impede one's activities as a Debian package
212 maintainer however, as it may be perfectly legal to use cryptographic
213 products for authentication, rather than encryption purposes.
214 &debian-formal; does not require the use of cryptography <em>qua</em>
215 cryptography in any manner.  If you live in a country where use of
216 cryptography even for authentication is forbidden
217 then please contact us so we can make special arrangements.
218         <p>
219 To apply as a new maintainer, you need an existing Debian maintainer
220 to verify your application (an <em>advocate</em>).  After you have
221 contributed to Debian for a while, and you want to apply to become a
222 registered developer, an existing developer with whom you
223 have worked over the past months has to express his belief that you
224 can contribute to Debian successfully.
225         <p>
226 When you have found an advocate, have your GnuPG key signed and have
227 already contributed to Debian for a while, you're ready to apply.
228 You can simply register on our <url id="&url-newmaint-apply;"
229 name="application page">.  After you have signed up, your advocate
230 has to confirm your application.  When your advocate has completed
231 this step you will be assigned an Application Manager who will
232 go with you through the necessary steps of the New Maintainer process.
233 You can always check your status on the <url id="&url-newmaint-db;"
234 name="applications status board">.
235         <p>
236 For more details, please consult <url id="&url-newmaint;" name="New
237 Maintainer's Corner"> at the Debian web site.  Make sure that you
238 are familiar with the necessary steps of the New Maintainer process
239 before actually applying.  If you are well prepared, you can save
240 a lot of time later on.
241
242
243       <sect id="mentors">Debian mentors and sponsors
244         <p>
245 The mailing list &email-debian-mentors; has been set up for novice
246 maintainers who seek help with initial packaging and other
247 developer-related issues.  Every new developer is invited to subscribe
248 to that list (see <ref id="mailing-lists"> for details).
249         <p>
250 Those who prefer one-on-one help (e.g., via private email) should also
251 post to that list and an experienced developer will volunteer to help.
252         <p>
253 In addition, if you have some packages ready for inclusion in Debian,
254 but are waiting for your new maintainer application to go through, you
255 might be able find a sponsor to upload your package for you.  Sponsors
256 are people who are official Debian maintainers, and who are willing to
257 criticize and upload your packages for you.  Those who are seeking a
258 sponsor can request one at <url id="&url-sponsors;">.
259         <p>
260 If you wish to be a mentor and/or sponsor, more information is
261 available in <ref id="newmaint">.
262
263
264     <chapt id="developer-duties">Debian Developer's Duties
265
266       <sect id="user-maint">Maintaining your Debian information
267         <p>
268 There's a LDAP database containing information about all
269 developers, you can access it at <url id="&url-debian-db;">. You can
270 update your password (this password is propagated to most of the machines
271 that are accessible to you), your address, your country, the latitude and
272 longitude of the point where you live, phone and fax numbers, your
273 preferred shell, your IRC nickname, your web page and the email that
274 you're using as alias for your debian.org email. Most of the information
275 is not accessible to the public, for more details about this
276 database, please read its online documentation that you can find
277 at <url id="&url-debian-db-doc;">.
278         <p>
279 You have to keep the information available there up-to-date.
280
281       <sect id="key-maint">Maintaining your public key
282         <p>
283 Be very careful with your private keys.  Do not place them on any
284 public servers or multiuser machines, such as the Debian servers
285 (see <ref id="server-machines">).  Back your keys up; keep a copy offline.
286 Read the documentation that comes with your software; read the <url
287 id="&url-pgp-faq;" name="PGP FAQ">.
288         <p>
289 If you add signatures to your public key, or add user identities, you
290 can update the Debian key ring by sending your key to the key server at
291 <tt>&keyserver-host;</tt>.  If you need to add a completely new key,
292 or remove an old key, send mail to &email-debian-keyring;.  The same
293 key extraction routines discussed in <ref id="registering"> apply.
294         <p>
295 You can find a more in-depth discussion of Debian key maintenance in
296 the documentation of the <package>debian-keyring</package> package.
297
298
299        <sect id="voting">Voting
300         <p>
301 Even though Debian isn't really a democracy, we use a democratic
302 process to elect our leaders and to approve general resolutions.
303 These procedures are defined by the
304 <url id="&url-constitution;" name="Debian Constitution">.
305         <p>
306 Other than the yearly leader election, votes are not routinely held, and
307 they are not undertaken lightly. Each proposal is first discussed on
308 the &email-debian-vote; mailing list and it requires several endorsements
309 before the project secretary starts the voting procedure.
310         <p>
311 You don't have to track the pre-vote discussions, as the secretary will
312 issue several calls for votes on &email-debian-devel-announce; (and all
313 developers are expected to be subscribed to that list). Democracy doesn't
314 work well if people don't take part in the vote, which is why we encourage
315 all developers to vote. Voting is conducted via GPG-signed/encrypted emails
316 messages.
317         <p>
318 The list of all the proposals (past and current) is available on the
319 <url id="&url-vote;" name="Debian Voting Information"> page, along with
320 information on how to make, second and vote on proposals.
321
322       <sect id="inform-vacation">Going on vacation gracefully
323         <p>
324 Most developers take vacations, and usually this means that they can't
325 work for Debian and they can't be reached by email if any problem occurs.
326 The other developers need to know that you're on vacation so that they'll
327 do whatever is needed when such a problem occurs. Usually this means that
328 other developers are allowed to NMU (see <ref id="nmu">) your package if a
329 big problem (release critical bugs, security update, etc.) occurs while
330 you're on vacation.
331         <p>
332 In order to inform the other developers, there's two things that you should do.
333 First send a mail to &email-debian-private; giving the period of time when
334 you will be on vacation.  You can also give some special instructions on what to
335 do if any problem occurs. Be aware that some people don't care for vacation
336 notices and don't want to read them; you should prepend "[VAC] " to the
337 subject of your message so that it can be easily filtered.
338         <p>
339 Next you should update your information
340 available in the Debian LDAP database and mark yourself as ``on vacation''
341 (this information is only accessible to debian developers). Don't forget
342 to remove the ``on vacation'' flag when you come back!
343
344       <sect id="upstream-coordination">Coordination with upstream developers
345         <p>
346 A big part of your job as Debian maintainer will be to stay in contact
347 with the upstream developers.  Debian users will sometimes report bugs
348 to the Bug Tracking System that are not specific to Debian.  You
349 must forward these bug reports to the upstream developers so that
350 they can be fixed in a future release.  It's not your job to fix
351 non-Debian specific bugs.  However, if you are able to do so, you are
352 encouraged to contribute to upstream development of the package by
353 providing a fix for the bug.  Debian users and developers will often
354 submit patches to fix upstream bugs, and you should evaluate and
355 forward these patches upstream.
356         <p>
357 If you need to modify the upstream sources in order to build a policy
358 compliant package, then you should propose a nice fix to the upstream
359 developers which can be included there, so that you won't have to
360 modify the sources of the next upstream version. Whatever changes you
361 need, always try not to fork from the upstream sources.
362
363       <sect id="rc-bugs">Managing release-critical bugs
364         <p>
365 Generally you should deal with bug reports on your packages as described in
366 <ref id="bug-handling">. However, there's a special category of bugs that
367 you need to take care of -- the so-called release-critical bugs (RC bugs).
368 All bug reports that have severity <em>critical</em>, <em>grave</em> or
369 <em>serious</em> are considered to have an impact on whether the package can
370 be released in the next stable release of Debian.
371 Those bugs can delay the Debian release
372 and/or can justify the removal of a package at freeze time. That's why
373 these bugs need to be corrected as quickly as possible.
374         <p>
375 Developers who are part of the <url id="&url-debian-qa;"
376 name="Quality Assurance"> group are following all such bugs, and trying
377 to help whenever possible. If, for any reason, you aren't able fix an
378 RC bug in a package of yours within 2 weeks, you should either ask for help
379 by sending a mail to the Quality Assurance (QA) group
380 &email-debian-qa;, or explain your difficulties and present a plan to fix
381 them by sending a mail to the bug report. Otherwise, people
382 from the QA group may want to do a Non-Maintainer Upload (see
383 <ref id="nmu">) after trying to contact you (they might not wait as long as
384 usual before they do their NMU if they have seen no recent activity from you
385 in the BTS).
386
387
388       <sect>Retiring
389         <p>
390 If you choose to leave the Debian project, you should make sure you do
391 the following steps:
392 <enumlist>
393             <item>
394 Orphan all your packages, as described in <ref id="orphaning">.
395             <item>
396 Send an email about why you are leaving the project to
397 &email-debian-private;.
398             <item>
399 Notify the Debian key ring maintainers that you are leaving by
400 emailing to &email-debian-keyring;.
401 </enumlist>
402
403
404
405    <chapt id="resources">Resources for Debian Developers
406      <p>
407 In this chapter you will find a very brief road map of the Debian
408 mailing lists, the Debian machines
409 which may be available to you as a developer, and all the other
410 resources that are available to help you in your maintainer work.
411
412       <sect id="mailing-lists">Mailing lists
413         <p>
414 The mailing list server is at <tt>&lists-host;</tt>.
415         <p>
416 Online archives of mailing lists are available at <url
417 id="&url-lists-archives;">.
418
419         <sect1 id="core-devel-mailing-lists">Core development mailing lists
420         <p>
421 The core Debian mailing lists that developers should use are:
422 <list>
423   <item>&email-debian-devel-announce;, used to announce important things to
424         developers.
425         All developers are expected to be subscribed to this list.
426   </item>
427   <item>&email-debian-devel;, used to discuss various development related
428         technical issues.
429   </item>
430   <item>&email-debian-policy;, where the Debian Policy is discussed and
431         voted on.
432   </item>
433   <item>&email-debian-project;, used to discuss various non-technical
434         issues related to the project.
435   </item>
436 </list>
437         <p>
438 There are
439 other mailing lists available for a variety of special topics; see
440 <url id="&url-debian-lists-subscribe;"> for a list.
441
442         <sect1 id="mailing-lists-subunsub">Subscribing and unsubscribing
443         <p>
444 To subscribe to or unsubscribe from any of the Debian mailing lists, email
445 <tt>debian-<var>foo</var>-REQUEST@&lists-host;</tt>, where
446 <tt>debian-<var>foo</var></tt> is the name of the list, with the word
447 <tt>subscribe</tt> in the <em>Subject</em> to subscribe to the list or
448 <tt>unsubscribe</tt> to unsubscribe.
449         <p>
450 If you prefer to use a web page to subscribe to multiple mailing lists,
451 there's one at <url id="&url-debian-lists-subscribe;">.
452         <p>
453 You can download the current list of mailing lists and basic usage
454 instructions from <url id="&url-debian-lists-txt;">
455 or install the <package>doc-debian</package> package and have it
456 locally in &file-mail-lists;.
457
458         <sect1 id="mailing-lists-rules">Basic rules for use
459         <p>
460 When replying to messages on the mailing list, please do not send a
461 carbon copy (<tt>CC</tt>) to the original poster unless they explicitly
462 request to be copied.  Anyone who posts to a mailing list should read
463 it to see the responses.
464         <p>
465 Cross-posting (sending the same message to multiple lists) is discouraged.
466 As ever on the net, please trim down the quoting of articles you're
467 replying to.  In general, please adhere to the usual conventions for
468 posting messages. Please read the <url name="code of conduct"
469 id="&url-debian-lists;"> for more information.
470
471         <sect1 id="mailing-lists-special">Special lists
472         <p>
473 &email-debian-private; is a special mailing list for private
474 discussions amongst Debian developers.  It is meant to be used for
475 posts which for whatever reason should not be published publicly.
476 As such, it is a low volume list, and users are urged not to use
477 &email-debian-private; unless it is really necessary.  Moreover, do
478 <em>not</em> forward email from that list to anyone.  Archives of this
479 list are not available on the web for obvious reasons, but you can see
480 them using your shell account on <tt>lists.debian.org</tt> and looking
481 in the <file>~debian/archive/debian-private</file> directory.
482         <p>
483 &email-debian-email; is a special mailing list used as a grab-bag 
484 for Debian related correspondence such as contacting upstream authors
485 about licenses, bugs, etc. or discussing the project with others where it
486 might be useful to have the discussion archived somewhere.
487
488
489       <sect id="irc-channels">IRC channels
490         <p>
491 Several IRC channels are dedicated to Debian's development. They are mainly
492 hosted on the <url id="&url-openprojects;" name="freenode"> network
493 (previously known as Open Projects Network).
494 The <tt>irc.debian.org</tt> DNS entry is an alias to
495 <tt>irc.freenode.net</tt>.
496         <p>
497 The main channel for Debian in general is <em>#debian</em>. This is a large,
498 general-purpose channel where users can find recent news in the topic and
499 served by bots. <em>#debian</em> is for English speakers; there are also
500 <em>#debian.de</em>, <em>#debian-fr</em>, <em>#debian-br</em> and other
501 similarly named channels for speakers of other languages.
502         <p>
503 The main channel for Debian development is <em>#debian-devel</em>.
504 It is a very active channel since usually over 150 people are always
505 logged in. It's a channel for people who work
506 on Debian, it's not a support channel (there's <em>#debian</em> for that).
507 It is however open to anyone who wants to lurk (and learn). Its topic is
508 commonly full of interesting information for developers.
509         <p>
510 Since <em>#debian-devel</em> it's an open channel, you
511 should not speak there of issues that are discussed in
512 &email-debian-private;. There's another channel for this purpose,
513 it's called <em>#debian-private</em> and it's protected by a key.
514 This key is available in the archives of debian-private in
515 <file>master.debian.org:&file-debian-private-archive;</file>,
516 just <prgn>zgrep</prgn> for <em>#debian-private</em> in
517 all the files.
518         <p>
519 There are other additional channels dedicated to specific subjects.
520 <em>#debian-bugs</em> is used for coordinating bug squash parties.
521 <em>#debian-boot</em> is used to coordinate the work on the boot
522 floppies (i.e., the installer). <em>#debian-doc</em> is
523 occasionally used to talk about documentation, like the document you are
524 reading. Other channels are dedicated to an architecture or a set of
525 packages: <em>#debian-bsd</em>, <em>#debian-kde</em>, <em>#debian-jr</em>,
526 <em>#debian-edu</em>,
527 <em>#debian-sf</em> (SourceForge package), <em>#debian-oo</em> (OpenOffice
528 package) ...
529         <p>
530 Some non-English developers' channels exist as well, for example
531 <em>#debian-devel-fr</em> for
532 French speaking people interested in Debian's development.
533         <p>
534 Channels dedicated to Debian also exist on other IRC networks, notably on
535 the <url name="Open and free technology community (OFTC)"
536 id="http://www.oftc.net/"> IRC network.
537
538
539       <sect id="doc-rsrcs">Documentation
540         <p>
541 This document contains a lot of information very useful to Debian developers,
542 but it can not contain everything. Most of the other interesting documents
543 are linked from <url id="&url-devel-docs;" name="The Developers' Corner">.
544 Take the time to browse all the links, you will learn many more things.
545
546
547       <sect id="server-machines">Debian machines
548         <p>
549 Debian has several computers working as servers, most of which serve
550 critical functions in the Debian project. Most of the machines are used
551 for porting activities, and they all have a permanent connection to the
552 Internet.
553         <p>
554 Most of the machines are available for individual developers to use,
555 as long as the developers follow the rules set forth in the
556 <url name="Debian Machine Usage Policies" id="&url-dmup;">.
557         <p>
558 Generally speaking, you can use these machines for Debian-related purposes
559 as you see fit.  Please be kind to system administrators, and do not use
560 up tons and tons of disk space, network bandwidth, or CPU without first
561 getting the approval of the system administrators.  Usually these machines are run by
562 volunteers.
563         <p>
564 Please take care to protect your Debian passwords and SSH keys installed on
565 Debian machines. Avoid login or upload methods which send passwords over
566 the Internet in the clear, such as telnet, FTP, POP etc.
567         <p>
568 Please do not put any material that doesn't relate to Debian on the Debian
569 servers, unless you have prior permission.
570         <p>
571 The current list of Debian machines is available at
572 <url id="&url-devel-machines;">. That web page contains machine names,
573 contact information, information about who can log in, SSH keys etc.
574         <p>
575 If you have a problem with the operation of a Debian server, and you
576 think that the system operators need to be notified of this problem,
577 the Debian system administrator team is reachable at
578 <email>debian-admin@lists.debian.org</email>.
579         <p>
580 If you have a problem with a certain service, not related to the system
581 administration (such as packages to be removed from the archive,
582 suggestions for the web site, etc.),
583 generally you'll report a bug against a ``pseudo-package''.  See <ref
584 id="submit-bug"> for information on how to submit bugs.
585
586       <sect1 id="servers-bugs">The bugs server
587         <p>
588 <tt>bugs.debian.org</tt> is the canonical location for the Bug Tracking
589 System (BTS).  If you plan on doing some statistical analysis or
590 processing of Debian bugs, this would be the place to do it.  Please
591 describe your plans on &email-debian-devel; before implementing
592 anything, however, to reduce unnecessary duplication of effort or
593 wasted processing time.
594         <p>
595 All Debian developers have accounts on <tt>bugs.debian.org</tt>.
596
597       <sect1 id="servers-ftp-master">The ftp-master server
598         <p>
599 The <tt>ftp-master.debian.org</tt> server holds the canonical copy of the Debian
600 archive (excluding the non-US packages). Generally, package uploads
601 go to this server; see <ref id="upload">.
602         <p>
603 Problems with the Debian FTP archive generally need to be reported as
604 bugs against the <package>ftp.debian.org</package> pseudo-package or
605 an email to &email-ftpmaster;, but also see the procedures in
606 <ref id="archive-manip">.
607
608       <sect1 id="servers-non-us">The non-US server
609         <p>
610 The non-US server, <tt>non-us.debian.org</tt>,
611 holds the canonical copy of the non-US part of the Debian archive.
612 If you need to upload a package into one of the non-US sections, upload it
613 to this server; see <ref id="upload-non-us">.
614         <p>
615 Problems with the non-US package archive should generally be submitted as
616 bugs against the <package>nonus.debian.org</package> pseudo-package (notice
617 the lack of hyphen between "non" and "us" in the pseudo-package name
618 &mdash; that's for backwards compatibility). Remember to check whether or
619 not someone else has already reported the problem on the
620 <url id="http://bugs.debian.org/nonus.debian.org" name="Bug Tracking System">.
621
622       <sect1 id="servers-www">The www-master server
623         <p>
624 The main web server is <tt>www-master.debian.org</tt>.
625 It holds the official web pages, the face
626 of Debian for most newbies.
627         <p>
628 If you find a problem with the Debian web server, you should generally
629 submit a bug against the pseudo-package,
630 <package>www.debian.org</package>. Remember to check whether or not someone
631 else has already reported the problem on the
632 <url id="http://bugs.debian.org/www.debian.org" name="Bug Tracking System">.
633
634       <sect1 id="servers-people">The people web server
635         <p>
636 <tt>people.debian.org</tt> is the server used
637 for developers' own web pages about anything related to Debian.
638         <p>
639 If you have some Debian-specific information which you want to serve
640 on the web, you can do this by putting material in the
641 <file>public_html</file> directory under your home directory on
642 <tt>people.debian.org</tt>.
643 This will be accessible at the URL
644 <tt>http://people.debian.org/~<var>your-user-id</var>/</tt>.
645         <p>
646 You should only use this particular location because it will be backed up,
647 whereas on other hosts it won't.
648         <p>
649 Usually the only reason to use a different host is when you need to publish
650 materials subject to the U.S. export restrictions, in which case you can use
651 one of the other servers located outside the United States, such as the
652 aforementioned <tt>non-us.debian.org</tt>.
653         <p>
654 Send mail to &email-debian-devel; if you have any questions.
655
656       <sect1 id="servers-cvs">The CVS server
657         <p>
658 Our CVS server is located on <tt>cvs.debian.org</tt>.
659         <p>
660 If you need to use a publicly accessible CVS
661 server, for instance, to help coordinate work on a package between
662 many different developers, you can request a CVS area on the server.
663           <p>
664 Generally, <tt>cvs.debian.org</tt> offers a combination of local CVS
665 access, anonymous client-server read-only access, and full
666 client-server access through <prgn>ssh</prgn>.  Also, the CVS area can
667 be accessed read-only via the Web at <url id="&url-cvsweb;">.
668         <p>
669 To request a CVS area, send a request via email to
670 &email-debian-admin;.  Include the name of the requested CVS area,
671 the Debian account that should own the CVS root area, and why you need it.
672
673
674     <sect id="devel-db">The Developers Database
675         <p>
676 The Developers Database, at <url id="&url-debian-db;">, is an LDAP
677 directory for managing Debian developer attributes.  You can use this
678 resource to search the list of Debian developers.
679 Part of this information is also available through
680 the finger service on Debian servers, try
681 <prgn>finger yourlogin@db.debian.org</prgn> to see what it reports.
682         <p>
683 Developers can <url name="log into the database" id="&url-debian-db-login;">
684 to change their debian-private list subscription, their personal
685 information, to mark themselves on vacation, etc.
686 For more information on keeping your entry the developer database
687 up-to-date, please see <ref id="user-maint">.
688         <p>
689 One can also submit their SSH keys to be used for authorization on the
690 official Debian machines, and even add new *.debian.net DNS entries.
691 Those features are documented at <url id="&url-debian-db-mail-gw;">.
692
693
694     <sect id="archive">The Debian archive
695         <p>
696 The &debian-formal; distribution consists of a lot of packages
697 (<file>.deb</file>'s, currently around &number-of-pkgs;) and a few
698 additional files (such documentation and installation disk images).
699         <p>
700 Here is an example directory tree of a complete Debian archive:
701         <p>
702 &sample-dist-dirtree;
703         <p>
704 As you can see, the top-level directory contains two directories,
705 <file>dists/</file> and <file>pool/</file>. The latter is a &ldquo;pool&rdquo; in which the
706 packages actually are, and which is handled by the archive maintenance
707 database and the accompanying programs. The former contains the
708 distributions, <em>stable</em>, <em>testing</em> and <em>unstable</em>.
709 The <file>Packages</file> and <file>Sources</file> files in the
710 distribution subdirectories can reference files in the <file>pool/</file>
711 directory. The directory tree below each of the distributions is arranged
712 in an identical manner.  What we describe below for <em>stable</em> is
713 equally applicable to the <em>unstable</em> and <em>testing</em>
714 distributions. 
715         <p>
716 <file>dists/stable</file> contains three directories, namely <file>main</file>,
717 <file>contrib</file>, and <file>non-free</file>. 
718         <p>
719 In each of the areas, there is a directory for the source packages
720 (<file>source</file>) and a directory for each supported architecture
721 (<file>binary-i386</file>, <file>binary-m68k</file>, etc.).
722         <p>
723 The <file>main</file> area contains additional directories which holds
724 the disk images and some essential pieces of documentation required
725 for installing the Debian distribution on a specific architecture
726 (<file>disks-i386</file>, <file>disks-m68k</file>, etc.).
727
728
729       <sect1>Sections
730         <p>
731 The <em>main</em> section of the Debian archive is what makes up the
732 <strong>official &debian-formal; distribution</strong>.  The
733 <em>main</em> section is official because it fully complies with all
734 our guidelines.  The other two sections do not, to different degrees;
735 as such, they are <strong>not</strong> officially part of
736 &debian-formal;.
737         <p>
738 Every package in the main section must fully comply with the <url
739 id="&url-dfsg;" name="Debian Free Software Guidelines"> (DFSG) and
740 with all other policy requirements as described in the <url
741 id="&url-debian-policy;" name="Debian Policy Manual">.  The DFSG is
742 our definition of &ldquo;free software.&rdquo;  Check out the Debian Policy
743 Manual for details.
744         <p>
745 Packages in the <em>contrib</em> section have to comply with the DFSG,
746 but may fail other requirements.  For instance, they may depend on
747 non-free packages.
748         <p>
749 Packages which do not conform to the DFSG are placed in the
750 <em>non-free</em> section. These packages are not considered as part
751 of the Debian distribution, though we support their use, and we
752 provide infrastructure (such as our bug-tracking system and mailing
753 lists) for non-free software packages.
754         <p>
755 The <url id="&url-debian-policy;" name="Debian Policy Manual">
756 contains a more exact definition of the three sections. The above
757 discussion is just an introduction.
758         <p>
759 The separation of the three sections at the top-level of the archive
760 is important for all people who want to distribute Debian, either via
761 FTP servers on the Internet or on CD-ROMs: by distributing only the
762 <em>main</em> and <em>contrib</em> sections, one can avoid any legal
763 risks.  Some packages in the <em>non-free</em> section do not allow
764 commercial distribution, for example.
765         <p>
766 On the other hand, a CD-ROM vendor could easily check the individual
767 package licenses of the packages in <em>non-free</em> and include as
768 many on the CD-ROMs as he's allowed to. (Since this varies greatly from
769 vendor to vendor, this job can't be done by the Debian developers.)
770         <p>
771 Note also that the term "section" is also used to refer to categories
772 which simplify the organization and browsing of available packages, e.g.
773 <em>admin</em>, <em>net</em>, <em>utils</em> etc. Once upon a time, these
774 sections (subsections, rather) existed in the form of subdirectories within
775 the Debian archive. Nowadays, these exist only in the "Section" header
776 fields of packages.
777
778
779       <sect1>Architectures
780         <p>
781 In the first days, the Linux kernel was only available for the Intel
782 i386 (or greater) platforms, and so was Debian. But when Linux became
783 more and more popular, the kernel was ported to other architectures,
784 too.
785         <p>
786 The Linux 2.0 kernel supports Intel x86, DEC Alpha, SPARC, Motorola
787 680x0 (like Atari, Amiga and Macintoshes), MIPS, and PowerPC.  The
788 Linux 2.2 kernel supports even more architectures, including ARM and
789 UltraSPARC.  Since Linux supports these platforms, Debian decided that
790 it should, too.  Therefore, Debian has ports underway; in fact, we
791 also have ports underway to non-Linux kernel.  Aside from
792 <em>i386</em> (our name for Intel x86), there is <em>m68k</em>,
793 <em>alpha</em>, <em>powerpc</em>, <em>sparc</em>, <em>hurd-i386</em>,
794 <em>arm</em>, <em>ia64</em>, <em>hppa</em>, <em>s390</em>, <em>mips</em>,
795 <em>mipsel</em> and <em>sh</em> as of this writing.
796         <p>
797 &debian-formal; 1.3 is only available as <em>i386</em>.  Debian 2.0
798 shipped for <em>i386</em> and <em>m68k</em> architectures.  Debian 2.1
799 ships for the <em>i386</em>, <em>m68k</em>, <em>alpha</em>, and
800 <em>sparc</em> architectures.  Debian 2.2 added support for the
801 <em>powerpc</em> and <em>arm</em> architectures. Debian 3.0 adds
802 support of five new architectures: <em>ia64</em>, <em>hppa</em>,
803 <em>s390</em>, <em>mips</em> and <em>mipsel</em>.
804         <p>
805 Information for developers or uses about the specific ports are
806 available at the <url id="&url-debian-ports;" name="Debian Ports web
807 pages">.
808
809
810
811       <sect1>Packages
812         <p>
813 There are two types of Debian packages, namely <em>source</em> and
814 <em>binary</em> packages.
815         <p>
816 Source packages consist of either two or three files: a <file>.dsc</file>
817 file, and either a <file>.tar.gz</file> file or both an
818 <file>.orig.tar.gz</file> and a <file>.diff.gz</file> file.
819         <p>
820 If a package is developed specially for Debian and is not distributed
821 outside of Debian, there is just one <file>.tar.gz</file> file which
822 contains the sources of the program.  If a package is distributed
823 elsewhere too, the <file>.orig.tar.gz</file> file stores the so-called
824 <em>upstream source code</em>, that is the source code that's
825 distributed from the <em>upstream maintainer</em> (often the author of
826 the software). In this case, the <file>.diff.gz</file> contains the
827 changes made by the Debian maintainer.
828         <p>
829 The <file>.dsc</file> file lists all the files in the source package together
830 with checksums (<prgn>md5sums</prgn>) and some additional info about
831 the package (maintainer, version, etc.).
832
833
834       <sect1>Distribution directories
835         <p>
836 The directory system described in the previous chapter is itself
837 contained within <em>distribution directories</em>.  Each
838 distribution is actually contained in the <file>pool</file> directory in the
839 top-level of the Debian archive itself.
840         <p>
841 To summarize, the Debian archive has a root directory within an FTP
842 server.  For instance, at the mirror site,
843 <ftpsite>ftp.us.debian.org</ftpsite>, the Debian archive itself is
844 contained in <ftppath>/debian</ftppath>, which is a common location
845 (another is <file>/pub/debian</file>).
846         <p>
847 A distribution is comprised of Debian source and binary packages, and the
848 respective <file>Sources</file> and <file>Packages</file> index files, containing
849 the header information from all those packages. The former are kept in the
850 <file>pool/</file> directory, while the latter are kept in the <file>dists/</file>
851 directory of the archive (for backwards compatibility).
852
853
854         <sect2 id="sec-dists">Stable, testing, and unstable
855         <p>
856 There are always distributions called <em>stable</em> (residing in
857 <file>dists/stable</file>), one called <em>testing</em> (residing in
858 <file>dists/testing</file>), and one called <em>unstable</em> (residing in
859 <file>dists/unstable</file>). This reflects the development process of the
860 Debian project.
861         <p>
862 Active development is done in the <em>unstable</em> distribution
863 (that's why this distribution is sometimes called the <em>development
864 distribution</em>). Every Debian developer can update his or her
865 packages in this distribution at any time. Thus, the contents of this
866 distribution changes from day-to-day. Since no special effort is done
867 to make sure everything in this distribution is working properly, it is
868 sometimes literally unstable.
869         <p>
870 <ref id="testing"> is generated automatically by taking
871 packages from unstable if they satisfy certain criteria. Those
872 criteria should ensure a good quality for packages within testing.
873 The update to testing is launched each day after the
874 new packages have been installed.
875         <p>
876 After a period of development, once the release manager deems fit, the
877 <em>testing</em> distribution is frozen, meaning that the policies
878 which control how packages move from <em>unstable</em> to <em>testing</em> are
879 tightened.  Packages which are too buggy are removed.  No changes are
880 allowed into <em>testing</em> except for bug fixes.  After some time
881 has elapsed, depending on progress, the <em>testing</em> distribution
882 goes into a `deep freeze', when no changes are made to it except those
883 needed for the installation system.  This is called a &ldquo;test cycle&rdquo;,
884 and it can last up to two weeks. There can be several test cycles,
885 until the distribution is prepared for release, as decided by the
886 release manager.  At the end of the last test cycle, the
887 <em>testing</em> distribution is renamed to <em>stable</em>,
888 overriding the old <em>stable</em> distribution, which is removed at
889 that time (although it can be found at <tt>&archive-host;</tt>).
890         <p>
891 This development cycle is based on the assumption that the
892 <em>unstable</em> distribution becomes <em>stable</em> after passing a
893 period of being in <em>testing</em>.  Even once a distribution is
894 considered stable, a few bugs inevitably remain &mdash; that's why the
895 stable distribution is updated every now and then. However, these
896 updates are tested very carefully and have to be introduced into the
897 archive individually to reduce the risk of introducing new bugs.  You
898 can find proposed additions to <em>stable</em> in the
899 <file>proposed-updates</file> directory.  Those packages in
900 <file>proposed-updates</file> that pass muster are periodically moved as a
901 batch into the stable distribution and the revision level of the
902 stable distribution is incremented (e.g., &lsquo;3.0&rsquo; becomes
903 &lsquo;3.0r1&rsquo;, &lsquo;2.2r4&rsquo; becomes &lsquo;2.2r5&rsquo;, and
904 so forth).
905         <p>
906 Note that development under <em>unstable</em> continues during the
907 freeze period, since the <em>unstable</em> distribution remains in
908 place in parallel with <em>testing</em>.
909
910         <sect2>Experimental
911           <p>
912 The <em>experimental</em> distribution is a special distribution.
913 It is not a full distribution in the same sense as `stable' and
914 `unstable' are.  Instead, it is meant to be a temporary staging area
915 for highly experimental software where there's a good chance that the
916 software could break your system, or software that's just too unstable
917 even for the <em>unstable</em> distribution (but there is a reason to
918 package it nevertheless).  Users who download and install
919 packages from <em>experimental</em> are expected to have been duly
920 warned.  In short, all bets are off for the <em>experimental</em>
921 distribution.
922           <p>
923 If there is a chance that the software could do grave damage to a system,
924 it is likely to be better to put it into <em>experimental</em>.
925 For instance, an experimental compressed file system should probably go
926 into <em>experimental</em>.
927           <p>
928 Whenever there is a new upstream version of a package that introduces new
929 features but breaks a lot of old ones, it should either not be uploaded, or
930 be uploaded to <em>experimental</em>. A new, beta, version of some software
931 which uses completely different configuration can go into
932 <em>experimental</em>, at the maintainer's discretion. If you are working
933 on an incompatible or complex upgrade situation, you can also use
934 <em>experimental</em> as a staging area, so that testers can get early
935 access.
936           <p>
937 Some experimental software can still go into <em>unstable</em>, with a few
938 warnings in the description, but that isn't recommended because packages
939 from <em>unstable</em> are expected to propagate to <em>testing</em> and
940 thus to <em>stable</em>. You should not be afraid to use
941 <em>experimental</em> since it does not cause any pain to the ftpmasters,
942 the experimental packages are automatically removed once you upload
943 the package in <em>unstable</em> with a higher version number.
944           <p>
945 New software which isn't likely to damage your system can go directly into
946 <em>unstable</em>.
947           <p>
948 An alternative to <em>experimental</em> is to use your personal web space
949 on <tt>people.debian.org</tt>.
950
951
952       <sect1 id="codenames">Release code names
953         <p>
954 Every released Debian distribution has a <em>code name</em>: Debian
955 1.1 is called `buzz'; Debian 1.2, `rex'; Debian 1.3, `bo'; Debian 2.0,
956 `hamm'; Debian 2.1, `slink'; Debian 2.2, `potato'; and Debian 3.0, `woody'.  There is also
957 a ``pseudo-distribution'', called `sid', which is the current
958 `unstable' distribution; since packages are moved from `unstable' to
959 `testing' as they approach stability, `sid' itself is never released.
960 As well as the usual contents of a Debian distribution, `sid' contains
961 packages for architectures which are not yet officially supported or
962 released by Debian.  These architectures are planned to be integrated
963 into the mainstream distribution at some future date.
964         <p>
965 Since Debian has an open development model (i.e., everyone can
966 participate and follow the development) even the `unstable' and `testing'
967 distributions are distributed to the Internet through the Debian FTP and
968 HTTP server network. Thus, if we had called the directory which contains
969 the release candidate version `testing', then we would have to rename it
970 to `stable' when the version is released, which would cause all FTP
971 mirrors to re-retrieve the whole distribution (which is quite large).
972         <p>
973 On the other hand, if we called the distribution directories
974 <em>Debian-x.y</em> from the beginning, people would think that Debian
975 release <em>x.y</em> is available. (This happened in the past, where a
976 CD-ROM vendor built a Debian 1.0 CD-ROM based on a pre-1.0 development
977 version. That's the reason why the first official Debian release was
978 1.1, and not 1.0.)
979         <p>
980 Thus, the names of the distribution directories in the archive are
981 determined by their code names and not their release status (e.g.,
982 `slink').  These names stay the same during the development period and
983 after the release; symbolic links, which can be changed easily,
984 indicate the currently released stable distribution.  That's why the
985 real distribution directories use the <em>code names</em>, while
986 symbolic links for <em>stable</em>, <em>testing</em>, and
987 <em>unstable</em> point to the appropriate release directories.
988
989
990     <sect id="mirrors">Debian mirrors
991         <p>
992 The various download archives and the web site have several mirrors
993 available in order to relieve our canonical servers from heavy load.
994 In fact, some of the canonical servers aren't public, and instead a
995 first tier of mirrors balances the load. That way, users always access
996 the mirrors and get used to using them, which allows Debian to better
997 spread its bandwidth requirements over several servers and networks,
998 and basically makes users avoid hammering on one primary location.
999 Note that the first tier of mirrors is as up-to-date as it can be since
1000 they update when triggered from the internal sites (we call this
1001 "push mirroring").
1002         <p>
1003 All the information on Debian mirrors, including a list of the available
1004 public FTP/HTTP servers, can be found at <url id="&url-debian-mirrors;">.
1005 This useful page also includes information and tools which can be helpful if
1006 you are interested in setting up your own mirror, either for internal or
1007 public access.
1008         <p>
1009 Note that mirrors are generally run by third-parties who are
1010 interested in helping Debian.  As such, developers generally do not
1011 have accounts on these machines.
1012
1013
1014     <sect id="incoming-system">
1015         <heading>The Incoming system
1016         <p>
1017 The Incoming system is responsible of collecting updated packages and
1018 installing them in the Debian archive. It consists of a set of
1019 directories and scripts that are installed both on <tt>&ftp-master-host;</tt>
1020 and <tt>&non-us-host;</tt>.
1021         <p>
1022 Packages are uploaded by all the maintainers into a directory called
1023 <file>unchecked</file>. This directory is scanned every 15 minutes by
1024 the <prgn>katie</prgn> script, which verifies the integrity of the uploaded packages and the cryptographic
1025 signatures.  If the package is considered ready to be installed, it
1026 is moved into the <file>accepted</file> directory. If this is the first upload of
1027 the package, it is moved in the <file>new</file> directory, where it waits
1028 for an approval of the ftpmasters. If the package contains files to be installed
1029 "by-hand" it is moved in the <file>byhand</file> directory, where it waits
1030 for a manual installation by the ftpmasters. Otherwise, if any error has been detected,
1031 the package is refused and is moved in the <file>reject</file> directory.
1032         <p>
1033 Once the package is accepted the system sends a confirmation
1034 mail to the maintainer, closes all the bugs marked as fixed by the upload
1035 and the auto-builders may start recompiling it. The package is now publicly
1036 accessible at <url id="&url-incoming;"> (there is no
1037 such URL for packages in the non-US archive) until it is really installed
1038 in the Debian archive. This happens only once a day, the package
1039 is then removed from incoming and installed in the pool along with all
1040 the other packages. Once all the other updates (generating new
1041 <file>Packages</file> and <file>Sources</file> index files for example) have been
1042 made, a special script is called to ask all the primary mirrors to update
1043 themselves.
1044         <p>
1045 The archive maintenance software will also send the OpenPGP/GnuPG signed
1046 <file>.changes</file> file that you uploaded to the appropriate mailing
1047 lists. If a package is released with the <tt>Distribution:</tt> set to
1048 `stable', the announcement is sent to &email-debian-changes;.
1049 If a package is released with <tt>Distribution:</tt> set to `unstable'
1050 or `experimental', the announcement will be posted to
1051 &email-debian-devel-changes; instead.
1052         <p>
1053 All Debian developers have write access to the <file>unchecked</file>
1054 directory in order to upload their packages, they also have that access
1055 to the <file>reject</file> directory in order to remove their bad uploads
1056 or to move some files back in the <file>unchecked</file> directory. But
1057 all the other directories are only writable by the ftpmasters, that is
1058 why you can not remove an upload once it has been accepted.
1059
1060       <sect1 id="delayed-incoming">Delayed incoming
1061         <p>
1062 The <file>unchecked</file> directory has a special <file>DELAYED</file>
1063 subdirectory. It is itself subdivided in nine directories
1064 called <file>1-day</file> to <file>9-day</file>. Packages which are uploaded in
1065 one of those directories will be moved in the real unchecked
1066 directory after the corresponding number of days.
1067 This is done by a script that is run each day and which moves the
1068 packages between the directories. Those which are in "1-day" are
1069 installed in <file>unchecked</file> while the others are moved in the 
1070 adjacent directory (for example, a package in <file>5-day</file> will
1071 be moved in <file>4-day</file>). This feature is particularly useful
1072 for people who are doing non-maintainer uploads. Instead of
1073 waiting before uploading a NMU, it is uploaded as soon as it is
1074 ready but in one of those <file>DELAYED/<var>x</var>-day</file> directories.
1075 That leaves the corresponding number of days for the maintainer
1076 to react and upload another fix themselves if they are not
1077 completely satisfied with the NMU. Alternatively they can remove
1078 the NMU.
1079         <p>
1080 The use of that delayed feature can be simplified with a bit
1081 of integration with your upload tool.  For instance, if you use 
1082 <prgn>dupload</prgn> (see <ref id="dupload">), you can add this
1083 snippet to your configuration file:
1084 <example>
1085 $delay = ($ENV{DELAY} || 7);
1086 $cfg{'delayed'} = {
1087          fqdn => "&ftp-master-host;",
1088          login => "yourdebianlogin",
1089          incoming => "/org/ftp.debian.org/incoming/DELAYED/$delay-day/",
1090          dinstall_runs => 1,
1091          method => "scpb"
1092 };
1093 </example>
1094 Once you've made that change, <prgn>dupload</prgn> can be used to
1095 easily upload a package in one of the delayed directories:
1096 <example>DELAY=5 dupload --to delayed &lt;changes-file&gt;</example>
1097
1098
1099     <sect id="testing">
1100         <heading>The "testing" distribution</heading>
1101         <p>
1102 The scripts that update the <em>testing</em> distribution are run each day
1103 after the installation of the
1104 updated packages. They generate the <file>Packages</file> files for
1105 the <em>testing</em> distribution, but they do so in an intelligent manner
1106 trying to avoid any inconsistency and trying to use only
1107 non-buggy packages.
1108         <p>The inclusion of a package from <em>unstable</em> is conditional on the following:
1109 <list>
1110     <item>
1111 The package must have been available in <em>unstable</em> for several days;
1112 the precise number depends on the upload's urgency field. It
1113 is 10 days for low urgency, 5 days for medium urgency and 2 days for high
1114 urgency. Those delays may be doubled during a freeze;
1115     <item>
1116 It must have less release-critical bugs than the version available
1117 in <em>testing</em>;
1118     <item>
1119 It must be available on all architectures on which it has been
1120 previously built. <ref id="madison"> may be of interest to
1121 check that information;
1122     <item>
1123 It must not break any dependency of a package that is already available
1124 in <em>testing</em>;
1125     <item>
1126 The packages on which it depends must either be available in <em>testing</em>
1127 or they must be accepted into <em>testing</em> at the same time (and they will
1128 if they respect themselves all the criteria);
1129 </list>
1130         <p>
1131 To find out whether a package is progressing into testing or not, see the
1132 testing script output on the <url name="web page of the testing distribution"
1133 id="&url-testing-maint;">, or use the program <prgn>grep-excuses</prgn>
1134 which is in the <package>devscripts</package> package. This utility can
1135 easily be used in a <manref name="crontab" section="5"> to keep one
1136 informed of the progression of their packages into <em>testing</em>.
1137         <p>
1138 The <file>update_excuses</file> file does not always give the precise reason
1139 why the package is refused, one may have to find it on their own by looking
1140 what would break with the inclusion of the package. The <url
1141 id="&url-testing-maint;" name="testing web page"> gives some more information
1142 about the usual problems which may be causing such troubles.
1143         <p>
1144 Sometimes, some packages never enter <em>testing</em> because the set of
1145 inter-relationship is too complicated and can not be sorted out
1146 by the scripts. In that case, the release manager must be
1147 contacted, and he will force the inclusion of the packages.
1148         <p>
1149 In general, please refer to the <url name="testing web page"
1150 id="&url-testing-maint;"> for more information. It also includes
1151 answers to some of the frequently asked questions.
1152
1153
1154     <sect id="pkg-info">Package information
1155         <p>
1156
1157       <sect1 id="pkg-info-web">On the web
1158         <p>
1159 Each package has several dedicated web pages.
1160 <tt>http://&packages-host;/<var>package-name</var></tt>
1161 displays each version of the package
1162 available in the various distributions.  Each version links to a page
1163 which provides information, including the package description,
1164 the dependencies and package download links.
1165         <p>
1166 The bug tracking system track bugs for each package.  You can
1167 view the bugs of a given package at the URL
1168 <tt>http://&bugs-host;/<var>package-name</var></tt>.
1169
1170       <sect1 id="madison">The <prgn>madison</prgn> utility
1171         <p>
1172 <prgn>madison</prgn> is a command-line utility that is available
1173 on both <tt>&ftp-master-host;</tt> and <tt>&non-us-host;</tt>. It
1174 uses a single argument corresponding to a package name. In result
1175 it displays which version of the package is available for each
1176 architecture and distribution combination. An example will explain
1177 it better.
1178         <p>
1179 <example>
1180 $ madison libdbd-mysql-perl
1181 libdbd-mysql-perl |   1.2202-4 |        stable | source, alpha, arm, i386, m68k, powerpc, sparc
1182 libdbd-mysql-perl |   1.2216-2 |       testing | source, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc
1183 libdbd-mysql-perl | 1.2216-2.0.1 |       testing | alpha
1184 libdbd-mysql-perl |   1.2219-1 |      unstable | source, alpha, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc
1185 </example>
1186         <p>
1187 In this example, you can see that the version in <em>unstable</em> differs from
1188 the version in <em>testing</em> and that there has been a binary-only NMU of the
1189 package for the alpha architecture. Each time the package has been
1190 recompiled on most of the architectures.
1191
1192     <sect id="pkg-tracking-system">The Package Tracking System
1193         <p>
1194 The Package Tracking System (PTS) is basically a tool to track by mail
1195 the activity of a source package. You just have to subscribe
1196 to a source package to start getting the mails related to it. 
1197 You get the same mails as the maintainer. Each mail
1198 sent through the PTS is classified and associated to one of
1199 the keyword listed below. This will let you select the mails that
1200 you want to receive.
1201         <p>
1202 By default you will get:
1203 <taglist>
1204     <tag><tt>bts</tt>
1205     <item>
1206 All the bug reports and following discussions.
1207
1208     <tag><tt>bts-control</tt>
1209     <item>
1210 The control mails notifying a status change in one of the bugs.
1211     
1212     <tag><tt>upload-source</tt>
1213     <item>
1214 The confirmation mail from <prgn>katie</prgn> when an uploaded source
1215 package is accepted.
1216
1217     <tag><tt>katie-other</tt>
1218     <item>
1219 Other warning and error mails from <prgn>katie</prgn> (like the
1220 override disparity for the section or priority field).
1221
1222     <tag><tt>default</tt>
1223     <item>
1224 Any non-automatic mail sent to the PTS by people who wanted to
1225 contact the subscribers of the package.
1226
1227     <tag><tt>summary</tt>
1228     <item>
1229 In the future, you may receive regular summary mails to keep you
1230 informed of the package's status (bug statistics, porting overview,
1231 progression in <em>testing</em>, ...).
1232 </taglist>
1233         <p>
1234 You can also decide to receive some more information:
1235 <taglist>
1236     <tag><tt>upload-binary</tt>
1237     <item>
1238 The confirmation mail from <prgn>katie</prgn> when an uploaded binary
1239 package is accepted (to check that your package is recompiled for all
1240 architectures).
1241
1242     <tag><tt>cvs</tt>
1243     <item>
1244 CVS commits if the maintainer has setup a system to forward commit
1245 notification to the PTS.
1246
1247     <tag><tt>ddtp</tt>
1248     <item>
1249 Translations of descriptions or debconf templates
1250 submitted to the Debian Description Translation Project.
1251 </taglist>
1252
1253         <sect1 id="pts-commands">The PTS email interface
1254         <p>
1255 You can control your subscription(s) to the PTS by sending
1256 various commands to <email>pts@qa.debian.org</email>.
1257
1258 <taglist>
1259
1260 <tag><tt>subscribe &lt;srcpackage&gt; [&lt;email&gt;]</tt>
1261 <item>
1262   Subscribes <var>email</var> to communications related to the source package
1263   <var>srcpackage</var>. Sender address is used if the second argument is
1264   not present. If <var>srcpackage</var> is not a valid source package,
1265   you'll get a warning. However if it's a valid binary package, the PTS
1266   will subscribe you to the corresponding source package.
1267
1268 <tag><tt>unsubscribe &lt;srcpackage&gt; [&lt;email&gt;]</tt>
1269 <item>
1270   Removes a previous subscription to the source package <var>srcpackage</var>
1271   using the specified email address or the sender address if the second
1272   argument is left out. 
1273
1274 <tag><tt>which [&lt;email&gt;]</tt>
1275 <item>
1276   Lists all subscriptions for the sender or the email address optionally 
1277   specified.
1278
1279 <tag><tt>keyword [&lt;email&gt;]</tt>
1280 <item>
1281   Tells you the keywords that you are accepting. Each mail sent through
1282   the Package Tracking System is associated to a keyword and you receive
1283   only the mails associated to keywords that you are accepting. Here is
1284   the list of available keywords:
1285   <list>
1286   <item><tt>bts</tt>: mails coming from the Debian Bug Tracking System
1287   <item><tt>bts-control</tt>: reply to mails sent to
1288         <email>control@bugs.debian.org</email>
1289   <item><tt>summary</tt>: automatic summary mails about the state of a package
1290   <item><tt>cvs</tt>: notification of CVS commits
1291   <item><tt>ddtp</tt>: translations of descriptions and debconf templates
1292   <item><tt>upload-source</tt>: announce of a new source upload that
1293         has been accepted
1294   <item><tt>upload-binary</tt>: announce of a new binary-only upload (porting)
1295   <item><tt>katie-other</tt>: other mails from ftpmasters
1296         (override disparity, etc.)
1297   <item><tt>default</tt>: all the other mails (those which aren't "automatic")
1298   </list>
1299
1300 <tag><tt>keyword &lt;srcpackage&gt; [&lt;email&gt;]</tt>
1301 <item>
1302   Same as previous item but for the given source package since
1303   you may select a different set of keywords for each source package.
1304
1305 <tag><tt>keyword [&lt;email&gt;] {+|-|=} &lt;list of keywords&gt;</tt>
1306 <item>
1307   Accept (+) or refuse (-) mails associated to the given keyword(s).
1308   Define the list (=) of accepted keywords.
1309
1310 <tag><tt>keyword &lt;srcpackage&gt; [&lt;email&gt;] {+|-|=} &lt;list of keywords&gt;</tt>
1311 <item>
1312   Same as previous item but overrides the keywords list for the
1313   indicated source package.
1314   
1315 <tag><tt>quit | thanks | --</tt>
1316 <item>
1317   Stops processing commands. All following lines are ignored by
1318   the bot.
1319 </taglist>
1320
1321         <sect1 id="pts-mail-filtering">Filtering PTS mails
1322         <p>
1323 Once you are subscribed to a package, you will get the mails sent to
1324 <tt><var>srcpackage</var>@packages.qa.debian.org</tt>. Those mails
1325 have special headers appended to let you filter them in a special
1326 mailbox with <prgn>procmail</prgn>. The added headers are
1327 <tt>X-Loop</tt>, <tt>X-PTS-Package</tt>, <tt>X-PTS-Keyword</tt> and
1328 <tt>X-Unsubscribe</tt>.
1329         <p>
1330 Here is an example of added headers for a source upload notification
1331 on the <package>dpkg</package> package:
1332 <example>
1333 X-Loop: dpkg@&pts-host;
1334 X-PTS-Package: dpkg
1335 X-PTS-Keyword: upload-source
1336 X-Unsubscribe: echo 'unsubscribe dpkg' | mail pts@qa.debian.org
1337 </example>
1338
1339         <sect1 id="pts-cvs-commit">Forwarding CVS commits in the PTS
1340         <p>
1341 If you use a publicly accessible CVS repository for maintaining
1342 your Debian package you may want to forward the commit notification
1343 to the PTS so that the subscribers (possible co-maintainers) can
1344 closely follow the package's evolution.
1345         <p>
1346 It's very easy to setup. Once your CVS repository generates commit
1347 notifications, you just have to make sure it sends a copy of those mails
1348 to <tt><var>srcpackage</var>_cvs@&pts-host;</tt>. Only people who
1349 accepts the <em>cvs</em> keyword will receive the notifications.
1350
1351     <sect id="ddpo">Developer's packages overview
1352         <p>
1353 A QA (quality assurance) web portal is available at <url
1354             id="&url-ddpo;"> which displays a table listing all the packages
1355 of a single developer (including those where the party is listed as
1356 a co-maintainer). The table gives a good summary about the developer's 
1357 packages: number of bugs by severity, list of available versions in each
1358 distribution, testing status and much more including links to any other
1359 useful information.
1360         <p>
1361 It is a good idea to look up your own data regularly so that
1362 you don't forget any open bug, and so that you don't forget which
1363 packages are under your responsibility.
1364
1365
1366    <chapt id="pkgs">Managing Packages
1367         <p>
1368 This chapter contains information related to creating, uploading,
1369 maintaining, and porting packages.
1370
1371
1372     <sect id="newpackage">New packages
1373         <p>
1374 If you want to create a new package for the Debian distribution, you
1375 should first check the <url id="&url-wnpp;" name="Work-Needing and
1376 Prospective Packages (WNPP)"> list. Checking the WNPP list ensures that
1377 no one is already working on packaging that software, and that effort is
1378 not duplicated. Read the <url id="&url-wnpp;" name="WNPP web pages"> for
1379 more information.
1380         <p>
1381 Assuming no one else is already working on your prospective package,
1382 you must then submit a bug report (<ref id="submit-bug">) against the
1383 pseudo-package <package>wnpp</package> 
1384 describing your plan to create a new package, including, but not
1385 limiting yourself to, a description of the package, the license of the
1386 prospective package and the current URL where it can be downloaded
1387 from.
1388         <p>
1389 You should set the subject of the bug to ``ITP: <var>foo</var>
1390 -- <var>short description</var>'', substituting the name of the new
1391 package for <var>foo</var>.  The severity of the bug report must be set
1392 to <em>wishlist</em>. If you feel it's necessary, send a copy to
1393 &email-debian-devel; by putting the address in the <tt>X-Debbugs-CC:</tt> header
1394 of the message (no, don't use <tt>CC:</tt>, because that way the message's subject
1395 won't indicate the bug number).
1396         <p>
1397 Please include a <tt>Closes: bug#<var>nnnnn</var></tt> entry on the
1398 changelog of the new package in order for the bug report to be
1399 automatically closed once the new package is installed on the archive
1400 (<ref id="upload-bugfix">).
1401         <p>
1402 There are a number of reasons why we ask maintainers to announce their
1403 intentions:
1404           <list compact>
1405             <item>
1406 It helps the (potentially new) maintainer to tap into the experience
1407 of people on the list, and lets them know if anyone else is working
1408 on it already.
1409             <item>
1410 It lets other people thinking about working on the package know that
1411 there already is a volunteer, so efforts may be shared.
1412             <item>
1413 It lets the rest of the maintainers know more about the package than
1414 the one line description and the usual changelog entry ``Initial release''
1415 that gets posted to <tt>debian-devel-changes</tt>.
1416             <item>
1417 It is helpful to the people who live off unstable (and form our first
1418 line of testers).  We should encourage these people.
1419             <item>
1420 The announcements give maintainers and other interested parties a
1421 better feel of what is going on, and what is new, in the project.
1422           </list>
1423
1424
1425     <sect id="changelog-entries">Recording changes in the package
1426           <p>
1427 Changes that you make to the package need to be recorded in the
1428 <file>debian/changelog</file>.  These changes should provide a concise
1429 description of what was changed, why (if it's in doubt), and note if
1430 any bugs were closed.  They also record when the package was
1431 completed.  This file will be installed in
1432 <file>/usr/share/doc/<var>package</var>/changelog.Debian.gz</file>, or
1433 <file>/usr/share/doc/<var>package</var>/changelog.gz</file> for native
1434 packages.
1435           <p>
1436 The <file>debian/changelog</file> file conforms to a certain structure,
1437 with a number of different fields.  One field of note, the
1438 <em>distribution</em>, is described in <ref id="distribution">.  More
1439 information about the structure of this file can be found in
1440 the Debian Policy section titled "<file>debian/changelog</file>".
1441           <p>
1442 Changelog entries can be used to automatically close Debian bugs when
1443 the package is installed into the archive.  See <ref
1444 id="upload-bugfix">.
1445           <p>
1446 It is conventional that the changelog entry notating of a package that
1447 contains a new upstream version of the software looks like this:
1448 <example>
1449   * new upstream version
1450 </example>
1451           <p>
1452 There are tools to help you create entries and finalize the
1453 <file>changelog</file> for release &mdash; see <ref id="devscripts">
1454 and <ref id="dpkg-dev-el">.
1455           <p>
1456 See also <ref id="bpp-debian-changelog">.
1457
1458
1459     <sect id="sanitycheck">Testing the package
1460         <p>
1461 Before you upload your package, you should do basic testing on it.  At
1462 a minimum, you should try the following activities (you'll need to
1463 have an older version of the same Debian package around):
1464 <list>
1465               <item>
1466 Install the package and make sure the software works, or upgrade the
1467 package from an older version to your new version if a Debian package
1468 for it already exists.
1469               <item>
1470 Run <prgn>lintian</prgn> over the package.  You can run
1471 <prgn>lintian</prgn> as follows: <tt>lintian -v
1472 <var>package-version</var>.changes</tt>. This will check the source
1473 package as well as the binary package.  If you don't understand the
1474 output that <prgn>lintian</prgn> generates, try adding the <tt>-i</tt>
1475 switch, which will cause <prgn>lintian</prgn> to output a very verbose
1476 description of the problem.
1477                 <p>
1478 Normally, a package should <em>not</em> be uploaded if it causes lintian
1479 to emit errors (they will start with <tt>E</tt>).
1480                 <p>
1481 For more information on <prgn>lintian</prgn>, see <ref id="lintian">.
1482               <item>
1483 Optionally run <ref id="debdiff"> to analyze changes from an older version,
1484 if one exists.
1485               <item>
1486 Downgrade the package to the previous version (if one exists) &mdash; this
1487 tests the <file>postrm</file> and <file>prerm</file> scripts.
1488               <item>
1489 Remove the package, then reinstall it.
1490             </list>
1491
1492
1493     <sect id="sourcelayout">Layout of the source package
1494         <p>
1495 There are two types of Debian source packages:
1496         <list>
1497           <item>the so-called <em>native</em> packages, where there is no
1498                 distinction between the original sources and the patches
1499                 applied for Debian
1500           <item>the (more common) packages where there's an original source
1501                 tarball file accompanied by another file that contains the
1502                 patches applied for Debian
1503         </list>
1504         <p>
1505 For the native packages, the source package includes a Debian source control
1506 file (<tt>.dsc</tt>) and the source tarball (<tt>.tar.gz</tt>). A source
1507 package of a non-native package includes a Debian source control file, the
1508 original source tarball (<tt>.orig.tar.gz</tt>) and the Debian patches
1509 (<tt>.diff.gz</tt>).
1510         <p>
1511 Whether a package is native or not is determined when it is built by
1512 <manref name="dpkg-buildpackage" section="1">. The rest of this section
1513 relates only to non-native packages.
1514         <p>
1515 The first time a version is uploaded which corresponds to a particular
1516 upstream version, the original source tar file should be uploaded and
1517 included in the <file>.changes</file> file.  Subsequently, this very same
1518 tar file should be used to build the new diffs and <file>.dsc</file>
1519 files, and will not need to be re-uploaded.
1520         <p>
1521 By default, <prgn>dpkg-genchanges</prgn> and
1522 <prgn>dpkg-buildpackage</prgn> will include the original source tar
1523 file if and only if the Debian revision part of the source version
1524 number is 0 or 1, indicating a new upstream version.  This behavior
1525 may be modified by using <tt>-sa</tt> to always include it or
1526 <tt>-sd</tt> to always leave it out.
1527         <p>
1528 If no original source is included in the upload, the original
1529 source tar-file used by <prgn>dpkg-source</prgn> when constructing the
1530 <file>.dsc</file> file and diff to be uploaded <em>must</em> be
1531 byte-for-byte identical with the one already in the archive.
1532
1533
1534     <sect id="distribution">Picking a distribution
1535         <p>
1536 Each upload needs to specify which distribution the package is intended
1537 for. The package build process extracts this information from the first
1538 line of the <file>debian/changelog</file> file and places it in the
1539 <tt>Distribution</tt> field of the <tt>.changes</tt> file.
1540         <p>
1541 There are several possible values for this field: `stable', `unstable',
1542 `testing-proposed-updates' and `experimental'. Normally, packages are
1543 uploaded into <em>unstable</em>.
1544         <p>
1545 Actually, there are two other possible distributions: `stable-security' and
1546 `testing-security', but read <ref id="bug-security"> for more information on
1547 those.
1548         <p>
1549 It is technically possible to upload a package into several distributions
1550 at the same time but it usually doesn't make sense to use that feature
1551 because the dependencies of the package may vary with the distribution.
1552 In particular, it never makes sense to combine the <em>experimental</em>
1553 distribution with anything else.
1554
1555         <sect1 id="upload-stable">Uploads to <em>stable</em>
1556           <p>
1557 Uploading to <em>stable</em> means that the package will be placed into the
1558 <file>stable-proposed-updates</file> directory of the Debian archive for further
1559 testing before it is actually included in <em>stable</em>.
1560           <p>
1561 Extra care should be taken when uploading to <em>stable</em>. Basically, a
1562 package should only be uploaded to stable if one of the following happens:
1563 <list>
1564         <item>a security problem (e.g. a Debian security advisory)
1565         <item>a truly critical functionality problem
1566         <item>the package becomes uninstallable
1567         <item>a released architecture lacks the package
1568 </list>
1569           <p>
1570 It is discouraged to change anything else in the package that isn't
1571 important, because even trivial fixes can cause bugs later on. Uploading
1572 new upstream versions to fix security problems is deprecated; applying the
1573 specific patch from the new upstream version to the old one ("back-porting"
1574 the patch) is the right thing to do in most cases.
1575           <p>
1576 Packages uploaded to <em>stable</em> need to be compiled on systems running
1577 <em>stable</em>, so that their dependencies are limited to the libraries
1578 (and other packages) available in <em>stable</em>; for example, a package
1579 uploaded to <em>stable</em> that depends on a library package that only
1580 exists in unstable will be rejected. Making changes to dependencies of other
1581 packages (by messing with <tt>Provides</tt> or shlibs files), possibly making
1582 those other packages uninstallable, is strongly discouraged.
1583           <p>
1584 The Release Team (which can be reached at &email-debian-release;) will
1585 regularly evaluate the uploads in <em>stable-proposed-updates</em> and decide if
1586 your package can be included in <em>stable</em>. Please be clear (and
1587 verbose, if necessary) in your changelog entries for uploads to
1588 <em>stable</em>, because otherwise the package won't be considered for
1589 inclusion.
1590
1591         <sect1 id="upload-t-p-u">Uploads to <em>testing-proposed-updates</em>
1592           <p>
1593 The testing distribution is fed with packages from unstable according to the rules
1594 explained in <ref id="testing">. However, the release manager may stop the testing
1595 scripts when he wants to freeze the distribution. In that case, you may want to
1596 upload to <em>testing-proposed-updates</em> to provide fixed packages during the freeze.
1597           <p>
1598 Keep in mind that packages uploaded there are not automatically processed, they
1599 have to go through the hands of the release manager. So you'd better have a good
1600 reason to upload there. In order to know what a good reason is in the
1601 release manager's eyes, you should read the instructions that he regularly
1602 gives on &email-debian-devel-announce;.
1603           <p>
1604 You should not upload to <em>testing-proposed-updates</em> when you can update your
1605 packages through <em>unstable</em>. If you can't (for example because you have a
1606 newer development version in unstable), you may use it but it is recommended to ask
1607 the authorization of the release manager before.
1608
1609
1610     <sect id="upload">Uploading a package
1611
1612         <sect1 id="upload-ftp-master">Uploading to <tt>ftp-master</tt>
1613           <p>
1614 To upload a package, you need a personal account on
1615 <ftpsite>&ftp-master-host;</ftpsite>, which you should have as an
1616 official maintainer. If you use <prgn>scp</prgn> or <prgn>rsync</prgn>
1617 to transfer the files, place them into &us-upload-dir;;
1618 if you use anonymous FTP to upload, place them into
1619 &upload-queue;.
1620           <p>
1621 Please note that you should transfer
1622 the changes file last.  Otherwise, your upload may be rejected because the
1623 archive maintenance software will parse the changes file and see that not
1624 all files have been uploaded.  If you don't want to bother with transferring
1625 the changes file last, you can simply copy your files to a temporary
1626 directory on <tt>ftp-master</tt> and then move them to
1627 &us-upload-dir;.
1628           <p>
1629 <em>Note:</em> Do not upload to <tt>ftp-master</tt> cryptographic
1630 packages which belong to <em>contrib</em> or <em>non-free</em>. Uploads of
1631 such software should go to <tt>non-us</tt> (see <ref
1632 id="upload-non-us">). Furthermore packages containing code that is
1633 patent-restricted by the United States government can not be uploaded to
1634 <tt>ftp-master</tt>; depending on the case they may still be uploaded to
1635 <file>non-US/non-free</file> (it's in non-free because of distribution issues
1636 and not because of the license of the software). If you can't upload it to
1637 <tt>ftp-master</tt>, then neither can you upload it to the overseas upload
1638 queues on <tt>chiark</tt> or <tt>erlangen</tt>. If you are not sure
1639 whether U.S. patent controls or cryptographic controls apply to your
1640 package, post a message to &email-debian-devel; and ask.
1641           <p>
1642 You may also find the Debian packages <ref id="dupload"> or
1643 <ref id="dput"> useful
1644 when uploading packages.  These handy programs help automate the
1645 process of uploading packages into Debian.
1646           <p>
1647 After uploading your package, you can check how the archive
1648 maintenance software will process it by running <prgn>dinstall</prgn>
1649 on your changes file:
1650 <example>dinstall -n foo.changes</example>
1651           <p>
1652 Note that <prgn>dput</prgn> can do this for you automatically.
1653
1654         <sect1 id="upload-non-us">Uploading to <tt>non-US</tt>
1655           <p>
1656 As discussed above, export controlled software should not be uploaded
1657 to <tt>ftp-master</tt>.  Instead, upload the package to
1658 <ftpsite>non-us.debian.org</ftpsite>, placing the files in
1659 &non-us-upload-dir; (again, both <ref id="dupload"> and <ref
1660 id="dput"> can do this for you if invoked properly). By default,
1661 you can use the same account/password that works on
1662 <tt>ftp-master</tt>.  If you use anonymous FTP to upload, place the
1663 files into &upload-queue;.
1664           <p>
1665 You can check your upload the same way it's done on <tt>ftp-master</tt>,
1666 with:
1667 <example>dinstall -n foo.changes</example>
1668           <p>
1669 Note that U.S. residents or citizens are subject to restrictions on
1670 export of cryptographic software. As of this writing, U.S. citizens
1671 are allowed to export some cryptographic software, subject to
1672 notification rules by the U.S. Department of Commerce.  However, this
1673 restriction has been waived for software which is already available
1674 outside the U.S.  Therefore, any cryptographic software which belongs
1675 in the <em>main</em> section of the Debian archive and does not depend
1676 on any package outside of <em>main</em> (e.g., does not depend on
1677 anything in <em>non-US/main</em>) can be uploaded to <tt>ftp-master</tt>
1678 or its queues, described above.
1679           <p>
1680 Debian policy does not prevent upload to non-US by U.S. residents or
1681 citizens, but care should be taken in doing so. It is recommended that
1682 developers take all necessary steps to ensure that they are not
1683 breaking current US law by doing an upload to non-US, <em>including
1684 consulting a lawyer</em>.
1685           <p>
1686 For packages in <em>non-US/main</em>, <em>non-US/contrib</em>,
1687 developers should at least follow the <url id="&url-u.s.-export;"
1688 name="procedure outlined by the US Government">.  Maintainers of
1689 <em>non-US/non-free</em> packages should further consult the <url
1690 id="&url-notification-of-export;" name="rules on notification of
1691 export"> of non-free software.
1692           <p>
1693 This section is for information only and does not constitute legal
1694 advice. Again, it is strongly recommended that U.S. citizens and
1695 residents consult a lawyer before doing uploads to non-US.
1696
1697
1698         <sect1>Uploads via <tt>chiark</tt>
1699           <p>
1700 If you have a slow network connection to <tt>ftp-master</tt>, there are
1701 alternatives.  One is to upload files to <file>Incoming</file> via a
1702 upload queue in Europe on <tt>chiark</tt>. For details connect to
1703 <url id="&url-chiark-readme;">.
1704           <p>
1705 <em>Note:</em> Do not upload packages containing software that is
1706 export-controlled by the United States government to the queue on
1707 <tt>chiark</tt>.  Since this upload queue goes to <tt>ftp-master</tt>, the
1708 prescription found in <ref id="upload-ftp-master"> applies here as well.
1709           <p>
1710 The program <prgn>dupload</prgn> comes with support for uploading to
1711 <tt>chiark</tt>; please refer to the documentation that comes with the
1712 program for details.
1713
1714
1715         <sect1>Uploads via <tt>erlangen</tt>
1716           <p>
1717 Another upload queue is available in Germany: just upload the files
1718 via anonymous FTP to <url id="&url-upload-erlangen;">.
1719           <p>
1720 The upload must be a complete Debian upload, as you would put it into
1721 <tt>ftp-master</tt>'s <file>Incoming</file>, i.e., a <file>.changes</file> files
1722 along with the other files mentioned in the <file>.changes</file>. The
1723 queue daemon also checks that the <file>.changes</file> is correctly
1724 signed with GnuPG or OpenPGP by a Debian developer, so that no bogus files can find
1725 their way to <tt>ftp-master</tt> via this queue. Please also make sure that
1726 the <tt>Maintainer</tt> field in the <file>.changes</file> contains
1727 <em>your</em> e-mail address. The address found there is used for all
1728 replies, just as on <tt>ftp-master</tt>.
1729           <p>
1730 There's no need to move your files into a second directory after the
1731 upload, as on <tt>chiark</tt>. And, in any case, you should get a
1732 mail reply from the queue daemon explaining what happened to your
1733 upload. Hopefully it should have been moved to <tt>ftp-master</tt>, but in
1734 case of errors you're notified, too.
1735           <p>
1736 <em>Note:</em> Do not upload packages containing software that is
1737 export-controlled by the United States government to the queue on
1738 <tt>erlangen</tt>.  Since this upload queue goes to <tt>ftp-master</tt>, the
1739 prescription found in <ref id="upload-ftp-master"> applies here as well.
1740           <p>
1741 The program <prgn>dupload</prgn> comes with support for uploading to
1742 <tt>erlangen</tt>; please refer to the documentation that comes with
1743 the program for details.
1744
1745
1746         <sect1>Other upload queues
1747           <p>
1748 Another upload queue is available which is based in the US, and is a
1749 good backup when there are problems reaching <tt>ftp-master</tt>.  You can
1750 upload files, just as in <tt>erlangen</tt>, to <url
1751 id="&url-upload-samosa;">.
1752           <p>
1753 An upload queue is available in Japan: just upload the files via
1754 anonymous FTP to <url id="&url-upload-jp;">.
1755
1756
1757       <sect1 id="upload-notification">
1758         <heading>Notification that a new package has been installed</heading>
1759         <p>
1760 The Debian archive maintainers are responsible for handling package
1761 uploads.  For the most part, uploads are automatically handled on a
1762 daily basis by the archive maintenance tools, <prgn>katie</prgn>.
1763 Specifically, updates to existing packages to
1764 the `unstable' distribution are handled automatically. In other cases,
1765 notably new packages, placing the uploaded package into the
1766 distribution is handled manually. When uploads are handled manually,
1767 the change to the archive may take up to a month to occur. Please be
1768 patient.
1769         <p>
1770 In any case, you will receive an email notification indicating that the
1771 package has been added to the archive, which also indicates which bugs will
1772 be closed by the upload.  Please examine this notification carefully,
1773 checking if any bugs you meant to close didn't get triggered.
1774         <p>
1775 The installation notification also includes information on what
1776 section the package was inserted into.  If there is a disparity, you
1777 will receive a separate email notifying you of that.  Read on below.
1778         <p>
1779 Note also that if you upload via queues, the queue daemon software will
1780 also send you a notification by email.
1781
1782     <sect id="override-file">Determining section and priority of a package
1783         <p>
1784 The <file>debian/control</file> file's <tt>Section</tt> and
1785 <tt>Priority</tt> fields do not actually specify where the file will
1786 be placed in the archive, nor its priority.  In order to retain the
1787 overall integrity of the archive, it is the archive maintainers who
1788 have control over these fields.  The values in the
1789 <file>debian/control</file> file are actually just hints.
1790         <p>
1791 The archive maintainers keep track of the canonical sections and
1792 priorities for packages in the <em>override file</em>.  If there is a
1793 disparity between the <em>override file</em> and the package's fields
1794 as indicated in <file>debian/control</file>, then you will receive an
1795 email noting the divergence when the package is installed into the
1796 archive.  You can either correct your <file>debian/control</file> file
1797 for your next upload, or else you may wish to make a change in the
1798 <em>override file</em>.
1799         <p>
1800 To alter the actual section that a package is put in, you need to
1801 first make sure that the <file>debian/control</file> in your package
1802 is accurate.  Next, send an email &email-override; or submit a bug
1803 against <package>ftp.debian.org</package> requesting that the section
1804 or priority for your package be changed from the old section or
1805 priority to the new one.  Be sure to explain your reasoning.
1806         <p>
1807 For more information about <em>override files</em>, see <manref
1808 name="dpkg-scanpackages" section="8"> and
1809 <url id="&url-bts-devel;#maintincorrect">.
1810         <p>
1811 Note also that the term "section" is used for the separation of packages
1812 according to their licensing, e.g. <em>main</em>, <em>contrib</em> and
1813 <em>non-free</em>. This is described in another section, <ref id="archive">.
1814
1815
1816     <sect id="bug-handling">Handling package bugs
1817         <p>
1818 Often as a package maintainer, you find bugs in other packages or else
1819 have bugs reported to your packages which need to be reassigned.  The
1820 <url id="&url-bts-control;" name="BTS instructions"> can tell you how
1821 to do this.  Some information on filing bugs can be found in <ref
1822 id="submit-bug">.
1823
1824       <sect1>Monitoring bugs
1825         <p>
1826 If you want to be a good maintainer, you should periodically check the
1827 <url id="&url-bts;" name="Debian bug tracking system (BTS)"> for your
1828 packages.  The BTS contains all the open bugs against your packages.
1829 You can check them by browsing this page:
1830 <tt>http://&bugs-host;/<var>yourlogin</var>@debian.org</tt>.
1831         <p>
1832 Maintainers interact with the BTS via email addresses at
1833 <tt>&bugs-host;</tt>.  Documentation on available commands can be
1834 found at <url id="&url-bts;">, or, if you have installed the
1835 <package>doc-debian</package> package, you can look at the local files
1836 &file-bts-docs;.
1837         <p>
1838 Some find it useful to get periodic reports on open bugs.  You can add
1839 a cron job such as the following if you want to get a weekly email
1840 outlining all the open bugs against your packages:
1841 <example>
1842 # ask for weekly reports of bugs in my packages
1843 &cron-bug-report;
1844 </example>
1845 Replace <var>address</var> with your official Debian
1846 maintainer address.
1847
1848       <sect1 id="bug-answering">Responding to bugs
1849         <p>
1850 Make sure that any discussion you have about bugs are sent both to
1851 the original submitter of the bug, and the bug itself (e.g.,
1852 <email>123@bugs.debian.org</email>). If you're writing a new
1853 mail and you don't remember the submitter email address, you can
1854 use the <email>123-submitter@bugs.debian.org</email> email to
1855 contact the submitter <em>and</em> to record your mail within the
1856 bug log (that means you don't need to send a copy of the mail to
1857 <email>123@bugs.debian.org</email>).
1858         <p>
1859 Once you've dealt with a bug report (e.g. fixed it), mark it as
1860 <em>done</em> (close it) by sending an explanation message to
1861 <email>123-done@bugs.debian.org</email>. If you're fixing a bug by
1862 changing and uploading the package, you can automate bug closing as
1863 described in <ref id="upload-bugfix">.
1864         <p>
1865 You should <em>never</em> close bugs via the bug server <tt>close</tt>
1866 command sent to &email-bts-control;.  If you do so, the original
1867 submitter will not receive any information about why the bug was
1868 closed.
1869
1870       <sect1 id="bug-housekeeping">Bug housekeeping
1871         <p>
1872 As a package maintainer, you will often find bugs in other packages or
1873 have bugs reported against your packages which are actually bugs in
1874 other packages. The bug tracking system's features interesting to developers
1875 are described in the <url id="&url-bts-devel;" name="BTS documentation for
1876 Debian developers">. Operations such as reassigning, merging, and tagging
1877 bug reports are described in the <url id="&url-bts-control;" name="BTS
1878 control bot documentation">. This section contains
1879 some guidelines for managing your own bugs, based on the collective
1880 Debian developer experience.
1881         <p>
1882 Filing bugs for problems that  you find in other packages is one of
1883 the "civic obligations" of maintainership, see <ref id="submit-bug">
1884 for details. However, handling the bugs in your own packages is
1885 even more important.
1886         <p>
1887 Here's a list of steps that you may follow to handle a bug report:
1888 <enumlist>
1889     <item>
1890 Decide whether the report corresponds to a real bug or not. Sometimes
1891 users are just calling a program in the wrong way because they haven't
1892 read the documentation. If you diagnose this, just close the bug with
1893 enough information to let the user correct his problem (give pointers
1894 to the good documentation and so on). If the same report comes up
1895 again and again you may ask yourself if the documentation is good
1896 enough or if the program shouldn't detect its misuse in order to
1897 give an informative error message. This is an issue that may need
1898 to be brought to the upstream author.
1899     <p>
1900 If the bug submitter disagree with your decision to close the bug,
1901 they may reopen it until you find an agreement on how to handle it.
1902 If you don't find any, you may want to tag the bug <tt>wontfix</tt>
1903 to let people know that the bug exists but that it won't be corrected.
1904 If this situation is unacceptable, you (or the submitter) may want to
1905 require a decision of the technical committee by reassigning the bug
1906 to <package>tech-ctte</package> (you may use the clone command of
1907 the BTS if you wish to keep it reported against your package). Before
1908 doing so, please read the <url id="&url-tech-ctte;" name="recommended procedure">.
1909     <item>
1910 If the bug is real but it's caused by another package, just reassign
1911 the bug the right package. If you don't know which package it should
1912 be reassigned to, you may either ask for help on &email-debian-devel; or
1913 reassign it to <package>debian-policy</package> to let them decide which
1914 package is in fault.
1915     <p>
1916 Sometimes you also have to adjust the severity of the bug so that it
1917 matches our definition of the severity. That's because people tend to
1918 inflate the severity of bugs to make sure their bugs are fixed quickly.
1919 Some bugs may even be dropped to wishlist severity when the requested
1920 change is just cosmetic.
1921     <item>
1922 The bug submitter may have forgotten to provide some information, in that
1923 case you have to ask him the information required. You may use the
1924 <tt>moreinfo</tt> tag to mark the bug as such. Moreover if you can't
1925 reproduce the bug, you tag it <tt>unreproducible</tt>. Anyone who
1926 can reproduce the bug is then invited to provide more information
1927 on how to reproduce it. After a few months, if this information has not
1928 been sent by someone, the bug may be closed.
1929     <item>
1930 If the bug is related to the packaging, you just fix it. If you are not
1931 able to fix it yourself, then tag the bug as <tt>help</tt>. You can
1932 also ask for help on &email-debian-devel; or &email-debian-qa;. If it's an
1933 upstream problem, you have to forward it to the upstream author.
1934 Forwarding a bug is not enough, you have to check at each release if
1935 the bug has been fixed or not. If it has, you just close it, otherwise
1936 you have to remind the author about it. If you have the required skills
1937 you can prepare a patch that fixes the bug and that you send at the
1938 same time to the author. Make sure to send the patch in the BTS and to
1939 tag the bug as <tt>patch</tt>.
1940     <item>
1941 If you have fixed a bug in your local copy, or if a fix has been
1942 committed to the CVS repository, you may tag the bug as
1943 <tt>pending</tt> to let people know that the bug is corrected and that
1944 it will be closed with the next upload (add the <tt>closes:</tt> in
1945 the <file>changelog</file>). This is particularly useful if you
1946 are several developers working on the same package.
1947     <item>
1948 Once a corrected package is available in the <em>unstable</em>
1949 distribution, you can close the bug. This can be done automatically,
1950 read <ref id="upload-bugfix">.
1951 </enumlist>
1952
1953       <sect1 id="upload-bugfix">When bugs are closed by new uploads
1954         <p>
1955 If you fix a bug in your packages, it is your responsibility as the
1956 package maintainer to close the bug when it has been fixed.  However,
1957 you should not close the bug until the package which fixes the bug has
1958 been accepted into the Debian archive.  Therefore, once you get
1959 notification that your updated package has been installed into the
1960 archive, you can and should close the bug in the BTS.
1961         <p>
1962 However, it's possible to avoid having to manually close bugs after the
1963 upload -- just list the fixed bugs in your <file>debian/changelog</file>
1964 file, following a certain syntax, and the archive maintenance software
1965 will close the bugs for you. For example:
1966
1967 <example>
1968 acme-cannon (3.1415) unstable; urgency=low
1969
1970   * Frobbed with options (closes: Bug#98339)
1971   * Added safety to prevent operator dismemberment, closes: bug#98765,
1972     bug#98713, #98714.
1973   * Added man page. Closes: #98725.
1974 </example>
1975
1976 Technically speaking, the following Perl regular expression is what is
1977 used:
1978 <example>
1979   /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig
1980 </example>
1981
1982 The author prefers the <tt>closes: #<var>XXX</var></tt> syntax, as
1983 one of the most concise and easiest to integrate with the text of the
1984 <file>changelog</file>.
1985         <p>
1986 If you happen to mistype a bug number or forget one in the changelog file,
1987 don't hesitate to undo any damage the error caused. To reopen wrongly closed
1988 bugs, send an <tt>reopen <var>XXX</var></tt> command in the bug tracking
1989 system's control bot. To close any remaining bugs that were fixed by your
1990 upload, email the <file>.changes</file> file to
1991 <email>XXX-done@bugs.debian.org</email>, where <var>XXX</var> is your
1992 bug number.
1993         <p>
1994 Bear in mind that it is not obligatory to close bugs using the changelog
1995 like described above -- if you simply want to close bugs that don't have
1996 anything to do with an upload of yours, do it simply by emailing an
1997 explanation to <email>XXX-done@bugs.debian.org</email>.
1998 Do <strong>not</strong> close bugs in the changelog entry of a version
1999 if the said version of the package doesn't have anything to do with the bug.
2000           <p>
2001 For general information on what to put in the changelog files, please
2002 refer to <ref id="bpp-debian-changelog">.
2003
2004       <sect1 id="bug-security">Handling security-related bugs
2005         <p>
2006 Due to their sensitive nature, security-related bugs must be handled
2007 carefully.  The Debian Security Team exists to coordinate this
2008 activity, keeping track of outstanding security problems, helping
2009 maintainers with security problems or fix them themselves, sending
2010 security advisories, and maintaining security.debian.org.
2011
2012 <!-- information about the security database goes here once it's ready -->
2013 <!-- (mdz) -->
2014
2015         <sect2 id="bug-security-you">What to do when you learn of a
2016         security problem
2017           <p>
2018 When you become aware of a security-related bug in a Debian package,
2019 whether or not you are the maintainer, collect pertinent information
2020 about the problem, and promptly contact the security team at 
2021 &email-security-team;.
2022 Useful information includes, for example:
2023
2024 <list compact>
2025   <item>What versions of the package are known to be affected by the
2026   bug.  Check each version that is present in a supported Debian
2027   release, as well as testing and unstable.
2028
2029   <item>The nature of the fix, if any is available (patches are
2030   especially helpful)
2031
2032   <item>Any fixed packages that you have prepared yourself (send only
2033   the <tt>.diff.gz</tt> and <tt>.dsc</tt> files)
2034
2035   <item>Any information needed for the advisory (see <ref
2036   id="bug-security-advisories">)
2037
2038 </list>
2039
2040         <sect2 id="bug-security-confidentiality">Confidentiality
2041           <p>
2042 Unlike most other activities within Debian, information about security
2043 issues must sometimes be kept private for a time.  Whether this is the
2044 case depends on the nature of the problem and corresponding fix, and
2045 whether it is already a matter of public knowledge.
2046 <p>
2047 There are a few ways a developer can learn of a security problem:
2048
2049 <list compact>
2050     <item>he notices it on a public forum (mailing list, web site, etc.)
2051     <item>someone files a bug report
2052     <item>someone informs him via private email
2053 </list>
2054
2055  In the first two cases, the information is public and it is important
2056  to have a fix as soon as possible. In the last case, however, it
2057  might not be public information. In that case there are a few
2058  possible options for dealing with the problem:
2059
2060 <list>
2061   <item>if it is a trivial problem (like insecure temporary files)
2062   there is no need to keep the problem a secret and a fix should be
2063   made and released.
2064
2065   <item>if the problem is severe (remotely exploitable, possibility to
2066   gain root privileges) it is preferable to share the information with
2067   other vendors and coordinate a release. The security team keeps
2068   contacts with the various organizations and individuals and can take
2069   care of that.
2070 </list>
2071
2072 <p>
2073  In all cases if the person who reports the problem asks to not
2074  disclose the information that should be respected, with the obvious
2075  exception of informing the security team (make sure you tell the
2076  security team that the information can not be disclosed).
2077
2078 <p>
2079 Please note that if secrecy is needed you can also not upload a fix to
2080 unstable (or anywhere else), since the changelog and diff information
2081 for unstable is public.
2082
2083 <p>
2084 There are two reasons for releasing information even though secrecy is
2085 requested: the problem has been known for a while, or that the problem
2086 or exploit has become public.
2087
2088         <sect2 id="bug-security-advisories">Security Advisories
2089           <p>
2090 Security advisories are only issued for the current, released stable
2091 distribution, not for testing or unstable.  When released, advisories
2092 are sent to the &email-debian-security-announce;
2093 mailing list and posted on <url
2094 id="&url-debian-security-advisories;" name="the security web page">.
2095 Security advisories are written and posted by the security
2096 team. However they certainly do not mind if a maintainer can supply
2097 some of the information for them, or write part of the
2098 text. Information that should be in an advisory includes:
2099
2100 <list compact>
2101   <item>A description of the problem and its scope, including:
2102     <list>
2103        <item>The type of problem (privilege escalation, denial of
2104   service, etc.)
2105        <item>How it can be exploited
2106        <item>Whether it is remotely or locally exploitable
2107        <item>How the problem was fixed
2108     </list>
2109   <item>Version numbers of affected packages
2110   <item>Version numbers of fixed packages
2111   <item>Information on where to obtain the updated packages
2112   <item>References to upstream advisories, <url
2113   id="http://cve.mitre.org" name="CVE"> identifiers, and any other
2114   information useful in cross-referencing the vulnerability
2115 </list>
2116
2117          <sect2 id="bug-security-building">
2118             <heading>Preparing packages to address security issues</heading>
2119          <p>
2120 One way that you can assist the security team in their duties is to
2121 provide fixed packages suitable for a security advisory for the stable
2122 Debian release.
2123          <p>
2124  When an update is made to the stable release, care must be taken to
2125  avoid changing system behavior or introducing new bugs.  In order to
2126  do this, make as few changes as possible to fix the bug.  Users and
2127  administrators rely on the exact behavior of a release once it is
2128  made, so any change that is made might break someone's system.
2129  This is especially true of libraries: make sure you never change the
2130  API or ABI, no matter how small the change.
2131 <p>
2132 This means that moving to a new upstream version is not a good
2133 solution.  Instead, the relevant changes should be back-ported to the
2134 version present in the current stable Debian release. Generally,
2135 upstream maintainers are willing to help if needed.  If not, the
2136 Debian security team may be able to help.
2137 <p>
2138 In some cases, it is not possible to back-port a security fix, for
2139 example when large amounts of source code need to be modified or
2140 rewritten.  If this happens, it may be necessary to move to a new
2141 upstream version.  However, you must always coordinate that with the
2142 security team beforehand.
2143 <p>
2144 Related to this is another important guideline: always test your
2145 changes.  If you have an exploit available, try it and see if it
2146 indeed succeeds on the unpatched package and fails on the fixed
2147 package.  Test other, normal actions as well, as sometimes a security
2148 fix can break seemingly unrelated features in subtle ways.
2149 <p>
2150 Review and test your changes as much as possible.  Check the
2151 differences from the previous version repeatedly
2152 (<prgn>interdiff</prgn> from the <package>patchutils</package> package
2153 and <prgn>debdiff</prgn> from <package>devscripts</package> are useful
2154 tools for this, see <ref id="debdiff">).
2155 <p>
2156 When packaging the fix, keep the following points in mind:
2157
2158 <list>
2159     <item>Make sure you target the right distribution in your
2160     <file>debian/changelog</file>. For stable this is <tt>stable-security</tt> and for
2161     testing this is <tt>testing-security</tt>, and for the previous
2162     stable release, this is <tt>oldstable-security</tt>. Do not target
2163     <var>distribution</var>-proposed-updates!
2164
2165     <item>Make sure the version number is proper. It must be greater
2166     than the current package, but less than package versions in later
2167     distributions.  If in doubt, test it with <tt>dpkg
2168     --compare-versions</tt>.  For <em>testing</em>, there must be
2169     a higher version in <em>unstable</em>. If there is none yet (for example,
2170     if <em>testing</em> and <em>unstable</em> have the same version) you must upload a
2171     new version to unstable first.
2172
2173     <item>Do not make source-only uploads if your package has any
2174     binary-all packages (do not use the <tt>-S</tt> option to
2175     <prgn>dpkg-buildpackage</prgn>).  The <prgn>buildd</prgn> infrastructure will
2176     not build those. This point applies to normal package uploads as
2177     well.
2178
2179     <item>If the upstream source has been uploaded to
2180     security.debian.org before (by a previous security update), build
2181     the upload without the upstream source (<tt>dpkg-buildpackage
2182     -sd</tt>).  Otherwise, build with full source
2183     (<tt>dpkg-buildpackage -sa</tt>).
2184
2185     <item>Be sure to use the exact same <file>*.orig.tar.gz</file> as used in the
2186     normal archive, otherwise it is not possible to move the security
2187     fix into the main archives later.
2188
2189     <item>Be sure, when compiling a package, to compile on a clean
2190     system which only has packages installed from the distribution you
2191     are building for. If you do not have such a system yourself, you
2192     can use a debian.org machine (see <ref id="server-machines">)
2193     or setup a chroot (see <ref id="pbuilder"> and
2194     <ref id="debootstrap">).
2195 </list>
2196
2197       <sect2 id="bug-security-upload">Uploading the fixed package
2198 <p>
2199 <em>DO NOT</em> upload a package to the security upload queue without
2200 prior authorization from the security team.  If the package does not
2201 exactly meet the team's requirements, it will cause many problems and
2202 delays in dealing with the unwanted upload.
2203 <p>
2204 <em>DO NOT</em> upload your fix to proposed-updates without
2205 coordinating with the security team.  Packages from
2206 security.debian.org will be copied into the proposed-updates directory
2207 automatically.  If a package with the same or a higher version number
2208 is already installed into the archive, the security update will be
2209 rejected by the archive system.  That way, the stable distribution
2210 will end up without a security update for this package instead.
2211 <p>
2212 Once you have created and tested the new package and it has been
2213 approved by the security team, it needs to be uploaded so that it can
2214 be installed in the archives. For security uploads, the place to
2215 upload to is
2216 <tt>ftp://security.debian.org/pub/SecurityUploadQueue/</tt> .
2217
2218 <p>
2219 Once an upload to the security queue has been accepted, the package
2220 will automatically be rebuilt for all architectures and stored for
2221 verification by the security team.
2222
2223 <p>
2224 Uploads which are waiting for acceptance or verification are only
2225 accessible by the security team. This is necessary since there might
2226 be fixes for security problems that cannot be disclosed yet.
2227
2228 <p>
2229 If a member of the security team accepts a package, it will be
2230 installed on security.debian.org as well as the proper
2231 <var>distribution</var>-proposed-updates on ftp-master or in the non-US
2232 archive.
2233
2234
2235     <sect id="archive-manip">
2236       <heading>Moving, removing, renaming, adopting, and orphaning
2237       packages</heading>
2238       <p>
2239 Some archive manipulation operations are not automated in the Debian
2240 upload process.  These procedures should be manually followed by
2241 maintainers.  This chapter gives guidelines in what to do in these
2242 cases.
2243
2244       <sect1 id="moving-pkgs">Moving packages
2245         <p>
2246 Sometimes a package will change its section.  For instance, a
2247 package from the `non-free' section might be GPL'd in a later version,
2248 in which case, the package should be moved to `main' or
2249 `contrib'.<footnote> See the <url id="&url-debian-policy;"
2250 name="Debian Policy Manual"> for guidelines on what section a package
2251 belongs in.
2252           </footnote>
2253         <p>
2254 If you need to change the section for one of your packages, change the
2255 package control information to place the package in the desired
2256 section, and re-upload the package (see the <url id="&url-debian-policy;"
2257 name="Debian Policy Manual"> for details). If your new section is
2258 valid, it will be moved automatically. If it does not, then contact
2259 the ftpmasters in order to understand what happened.
2260         <p>
2261 If, on the other hand, you need to change the <em>subsection</em> of
2262 one of your packages (e.g., ``devel'', ``admin''), the procedure is
2263 slightly different.  Correct the subsection as found in the control
2264 file of the package, and re-upload that.  Also, you'll need to get the
2265 override file updated, as described in <ref id="override-file">.
2266
2267
2268       <sect1 id="removing-pkgs">Removing packages
2269         <p>
2270 If for some reason you want to completely remove a package (say, if it
2271 is an old compatibility library which is no longer required), you
2272 need to file a bug against <tt>ftp.debian.org</tt> asking that the
2273 package be removed.  Make sure you indicate which distribution the
2274 package should be removed from. Normally, you can only have packages
2275 removed from <em>unstable</em> and <em>experimental</em>.  Packages
2276 are not removed from <em>testing</em> directly. Rather, they will be
2277 removed automatically after the package has been removed from
2278 <em>unstable</em> and no package in <em>testing</em> depends on it.
2279         <p>
2280 You also have to detail the reasons justifying that request. This is to
2281 avoid unwanted removals and to keep a trace of why a package has been
2282 removed. For example, you can provide the name of the package that
2283 supersedes the one to be removed.
2284         <p>
2285 Usually you only ask the removal of a package maintained by yourself.
2286 If you want to remove another package, you have to get the approval
2287 of its last maintainer.
2288         <p>
2289 If in doubt concerning whether a package is disposable, email
2290 &email-debian-devel; asking for opinions.  Also of interest is the
2291 <prgn>apt-cache</prgn> program from the <package>apt</package>
2292 package.  When invoked as <tt>apt-cache showpkg
2293 <var>package</var></tt>, the program will show details for
2294 <var>package</var>, including reverse depends.
2295         <p>
2296 Once the package has been removed, the package's bugs should be handled.
2297 They should either be reassigned to another package in the case where
2298 the actual code has evolved into another package (e.g. <tt>libfoo12</tt>
2299 was removed because <tt>libfoo13</tt> supersedes it) or closed if the
2300 software is simply no more part of Debian.
2301
2302         <sect2>Removing packages from <file>Incoming</file>
2303           <p>
2304 In the past, it was possible to remove packages from <file>incoming</file>.
2305 However, with the introduction of the new incoming system, this is no longer
2306 possible.  Instead, you have to upload a new revision of your package with
2307 a higher version as the package you want to replace.  Both versions will be
2308 installed in the archive but only the higher version will actually be
2309 available in <em>unstable</em> since the previous version will immediately
2310 be replaced by the higher.  However, if you do proper testing of your
2311 packages, the need to replace a package should not occur too often anyway.
2312
2313       <sect1>Replacing or renaming packages
2314         <p>
2315 Sometimes you made a mistake naming the package and you need to rename
2316 it.  In this case, you need to follow a two-step process.  First, set
2317 your <file>debian/control</file> file to replace and conflict with the
2318 obsolete name of the package (see the <url id="&url-debian-policy;"
2319 name="Debian Policy Manual"> for details).  Once you've uploaded
2320 the package and the package has moved into the archive, file a bug
2321 against <tt>ftp.debian.org</tt> asking to remove the package with the
2322 obsolete name. Do not forget to properly reassign the package's bugs
2323 at the same time.
2324         <p>
2325 At other times, you may make a mistake in constructing your package and
2326 wish to replace it. The only way to do this is to increase the version
2327 number and upload a new version. The old version will be expired in
2328 the usual manner.  Note that this applies to each part of your package,
2329 including the sources: if you wish to replace the upstream source tarball
2330 of your package, you will need to upload it with a different version. An
2331 easy possibility is to replace <file>foo_1.00.orig.tar.gz</file> with
2332 <file>foo_1.00+0.orig.tar.gz</file>. This restriction gives each file
2333 on the ftp site a unique name, which helps to ensure consistency across the
2334 mirror network.
2335
2336       <sect1 id="orphaning">Orphaning a package
2337         <p>
2338 If you can no longer maintain a package, you need to inform the others
2339 about that, and see that the package is marked as orphaned.
2340 You should set the package maintainer to <tt>Debian QA Group
2341 &orphan-address;</tt> and submit a bug report
2342 against the pseudo package <package>wnpp</package>.  The bug report should be
2343 titled <tt>O: <var>package</var> -- <var>short description</var></tt>
2344 indicating that the package is now orphaned.  The severity of the bug
2345 should be set to <em>normal</em>. If you feel it's necessary, send a copy
2346 to &email-debian-devel; by putting the address in the X-Debbugs-CC: header
2347 of the message (no, don't use CC:, because that way the message's subject
2348 won't indicate the bug number).
2349         <p>
2350 If the package is especially crucial to Debian, you should instead submit
2351 a bug against <package>wnpp</package> and title it <tt>RFA: <var>package</var> --
2352 <var>short description</var></tt> and set its severity to
2353 <em>important</em>. <tt>RFA</tt> stands for <em>Request For Adoption</em>.
2354 Definitely copy the message to debian-devel in this case, as described
2355 above.
2356         <p>
2357 Read instructions on the <url id="&url-wnpp;" name="WNPP web pages">
2358 for more information.
2359
2360       <sect1 id="adopting">Adopting a package
2361         <p>
2362 A list of packages in need of a new maintainer is available at in the
2363 <url name="Work-Needing and Prospective Packages list (WNPP)"
2364 id="&url-wnpp;">. If you wish to take over maintenance of any of the
2365 packages listed in the WNPP, please take a look at the aforementioned
2366 page for information and procedures.
2367         <p>
2368 It is not OK to simply take over a package that you feel is neglected
2369 &mdash; that would be package hijacking.  You can, of course, contact the
2370 current maintainer and ask them if you may take over the package.
2371 If you have reason to believe a maintainer has gone AWOL
2372 (absent without leave), see <ref id="mia-qa">.
2373         <p>
2374 Generally, you may not take over the package without the assent of the
2375 current maintainer. Even if they ignore you, that is still not grounds to
2376 take over a package. Complaints about maintainers should be brought up on
2377 the developers' mailing list. If the discussion doesn't end with a positive
2378 conclusion, and the issue is of a technical nature, consider bringing it to
2379 the attention of the technical committee (see the <url name="technical
2380 committee web page" id="&url-tech-ctte;"> for more information).
2381         <p>
2382 If you take over an old package, you probably want to be listed as the
2383 package's official maintainer in the bug system. This will happen
2384 automatically once you upload a new version with an updated
2385 <tt>Maintainer:</tt> field, although it can take a few hours after the
2386 upload is done. If you do not expect to upload a new version for a while,
2387 you can use <ref id="pkg-tracking-system"> to get the bug reports. However,
2388 make sure that the old maintainer has no problem with the fact that
2389 they will continue to receive the bugs during that time.
2390
2391
2392     <sect id="porting">Porting and being ported
2393       <p>
2394 Debian supports an ever-increasing number of architectures.  Even if
2395 you are not a porter, and you don't use any architecture but one, it
2396 is part of your duty as a maintainer to be aware of issues of
2397 portability.  Therefore, even if you are not a porter, you should read
2398 most of this chapter.
2399       <p>
2400 Porting is the act of building Debian packages for architectures that
2401 is different from the original architecture of the package
2402 maintainer's binary package.  It is a unique and essential activity.
2403 In fact, porters do most of the actual compiling of Debian packages.
2404 For instance, for a single <em>i386</em> binary package, there must be
2405 a recompile for each architecture, which amounts to
2406 &number-of-arches; more builds.
2407
2408
2409       <sect1 id="kind-to-porters">Being kind to porters
2410         <p>
2411 Porters have a difficult and unique task, since they are required to
2412 deal with a large volume of packages.  Ideally, every source package
2413 should build right out of the box.  Unfortunately, this is often not
2414 the case.  This section contains a checklist of ``gotchas'' often
2415 committed by Debian maintainers &mdash; common problems which often stymie
2416 porters, and make their jobs unnecessarily difficult.
2417         <p>
2418 The first and most important watchword is to respond quickly to bug or
2419 issues raised by porters.  Please treat porters with courtesy, as if
2420 they were in fact co-maintainers of your package (which in a way, they
2421 are).  Please be tolerant of succinct or even unclear bug reports,
2422 doing your best to hunt down whatever the problem is.
2423         <p>
2424 By far, most of the problems encountered by porters are caused by
2425 <em>packaging bugs</em> in the source packages.  Here is a checklist
2426 of things you should check or be aware of.
2427
2428 <enumlist>
2429             <item>
2430 Make sure that your <tt>Build-Depends</tt> and
2431 <tt>Build-Depends-Indep</tt> settings in <file>debian/control</file>
2432 are set properly.  The best way to validate this is to use the
2433 <package>debootstrap</package> package to create an unstable chroot
2434 environment (see <ref id="debootstrap">).
2435 Within that chrooted environment, install the
2436 <package>build-essential</package> package and any package
2437 dependencies mentioned in <tt>Build-Depends</tt> and/or
2438 <tt>Build-Depends-Indep</tt>.  Finally, try building your package
2439 within that chrooted environment.  These steps can be automated
2440 by the use of the <prgn>pbuilder</prgn> program which is provided by
2441 the package of the same name (see <ref id="pbuilder">).
2442                 <p>
2443 If you can't set up a proper chroot, <prgn>dpkg-depcheck</prgn> may be
2444 of assistance (see <ref id="dpkg-depcheck">).
2445                 <p>
2446 See the <url id="&url-debian-policy;" name="Debian Policy
2447 Manual"> for instructions on setting build dependencies.
2448             <item>
2449 Don't set architecture to a value other than ``all'' or ``any'' unless
2450 you really mean it.  In too many cases, maintainers don't follow the
2451 instructions in the <url id="&url-debian-policy;" name="Debian Policy
2452 Manual">.  Setting your architecture to ``i386'' is usually incorrect.
2453             <item>
2454 Make sure your source package is correct.  Do <tt>dpkg-source -x
2455 <var>package</var>.dsc</tt> to make sure your source package unpacks
2456 properly.  Then, in there, try building your package from scratch with
2457 <prgn>dpkg-buildpackage</prgn>.
2458             <item>
2459 Make sure you don't ship your source package with the
2460 <file>debian/files</file> or <file>debian/substvars</file> files.
2461 They should be removed by the `clean' target of
2462 <file>debian/rules</file>.
2463             <item>
2464 Make sure you don't rely on locally installed or hacked configurations
2465 or programs.  For instance, you should never be calling programs in
2466 <file>/usr/local/bin</file> or the like.  Try not to rely on programs
2467 be setup in a special way.  Try building your package on another
2468 machine, even if it's the same architecture.
2469             <item>
2470 Don't depend on the package you're building already being installed (a
2471 sub-case of the above issue).
2472             <item>
2473 Don't rely on the compiler being a certain version, if possible.  If
2474 not, then make sure your build dependencies reflect the restrictions,
2475 although you are probably asking for trouble, since different
2476 architectures sometimes standardize on different compilers.
2477             <item>
2478 Make sure your debian/rules contains separate ``binary-arch'' and
2479 ``binary-indep'' targets, as the Debian Policy Manual requires.
2480 Make sure that both targets work independently, that is, that you can
2481 call the target without having called the other before. To test this,
2482 try to run <tt>dpkg-buildpackage -b</tt>.
2483           </enumlist>
2484
2485
2486       <sect1 id="porter-guidelines">Guidelines for porter uploads
2487         <p>
2488 If the package builds out of the box for the architecture to be ported
2489 to, you are in luck and your job is easy.  This section applies to
2490 that case; it describes how to build and upload your binary package so
2491 that it is properly installed into the archive.  If you do have to
2492 patch the package in order to get it to compile for the other
2493 architecture, you are actually doing a source NMU, so consult <ref
2494 id="nmu-guidelines"> instead.
2495         <p>
2496 For a porter upload, no changes are being made to the source.  You do
2497 not need to touch any of the files in the source package.  This
2498 includes <file>debian/changelog</file>.
2499         <p>
2500 The way to invoke <prgn>dpkg-buildpackage</prgn> is as
2501 <tt>dpkg-buildpackage -B -m<var>porter-email</var></tt>.  Of course,
2502 set <var>porter-email</var> to your email address.  This will do a
2503 binary-only build of only the architecture-dependent portions of the
2504 package, using the `binary-arch' target in <file>debian/rules</file>.
2505
2506         <sect2 id="binary-only-nmu">
2507           <heading>Recompilation or binary-only NMU</heading>
2508         <p>
2509 Sometimes the initial porter upload is problematic because the environment
2510 in which the package was built was not good enough (outdated or obsolete
2511 library, bad compiler, ...). Then you may just need to recompile it in
2512 an updated environment. However, you have to bump the version number in
2513 this case, so that the old bad package can be replaced in the Debian archive
2514 (<prgn>katie</prgn> refuses to install new packages if they don't have a
2515 version number greater than the currently available one).  Despite the
2516 required modification of the changelog, these are called binary-only NMUs
2517 &mdash; there is no need in this case to trigger all other architectures
2518 to consider themselves out of date or requiring recompilation.
2519         <p>
2520 Such recompilations require special ``magic'' version numbering, so that
2521 the archive maintenance tools recognize that, even though there is a
2522 new Debian version, there is no corresponding source update.  If you
2523 get this wrong, the archive maintainers will reject your upload (due
2524 to lack of corresponding source code).
2525         <p>
2526 The ``magic'' for a recompilation-only NMU is triggered by using the
2527 third-level number on the Debian part of the version.  For instance,
2528 if the latest version you are recompiling against was version
2529 ``2.9-3'', your NMU should carry a version of ``2.9-3.0.1''.  If the
2530 latest version was ``3.4-2.1'', your NMU should have a version number
2531 of ``3.4-2.1.1''.
2532
2533
2534         <sect2 id="source-nmu-when-porter">
2535           <heading>When to do a source NMU if you are a porter</heading>
2536           <p>
2537 Porters doing a source NMU generally follow the guidelines found in
2538 <ref id="nmu">, just like non-porters.  However, it is expected that
2539 the wait cycle for a porter's source NMU is smaller than for a
2540 non-porter, since porters have to cope with a large quantity of
2541 packages.
2542 Again, the situation varies depending on the distribution they are
2543 uploading to.
2544
2545 <!-- 
2546 FIXME: commented out until I can work out how to upload to testing directly
2547
2548   Crucial fixes (i.e., changes need to get a source
2549 package to compile for a released-targeted architecture) can be
2550 uploaded with <em>no</em> waiting period for the `frozen' distribution.
2551  -->
2552           <p>
2553 However, if you are a porter doing an NMU for `unstable', the above
2554 guidelines for porting should be followed, with two variations.
2555 Firstly, the acceptable waiting period &mdash; the time between when the
2556 bug is submitted to the BTS and when it is OK to do an NMU &mdash; is seven
2557 days for porters working on the unstable distribution.  This period
2558 can be shortened if the problem is critical and imposes hardship on
2559 the porting effort, at the discretion of the porter group.  (Remember,
2560 none of this is Policy, just mutually agreed upon guidelines.)
2561           <p>
2562 Secondly, porters doing source NMUs should make sure that the bug they
2563 submit to the BTS should be of severity `serious' or greater.  This
2564 ensures that a single source package can be used to compile every
2565 supported Debian architecture by release time.  It is very important
2566 that we have one version of the binary and source package for all
2567 architecture in order to comply with many licenses.
2568           <p>
2569 Porters should try to avoid patches which simply kludge around bugs in
2570 the current version of the compile environment, kernel, or libc.
2571 Sometimes such kludges can't be helped.  If you have to kludge around
2572 compilers bugs and the like, make sure you <tt>#ifdef</tt> your work
2573 properly; also, document your kludge so that people know to remove it
2574 once the external problems have been fixed.
2575           <p>
2576 Porters may also have an unofficial location where they can put the
2577 results of their work during the waiting period.  This helps others
2578 running the port have the benefit of the porter's work, even during
2579 the waiting period.  Of course, such locations have no official
2580 blessing or status, so buyer, beware.
2581
2582
2583       <sect1 id="porter-automation">
2584           <heading>Porting infrastructure and automation</heading>
2585           <p>
2586 There is infrastructure and several tools to help automate the package
2587 porting. This section contains a brief overview of this automation and
2588 porting to these tools; see the package documentation or references for
2589 full information.</p>
2590
2591           <sect2>
2592             <heading>Mailing lists and web pages</heading>
2593             <p>
2594 Web pages containing the status of each port can be found at <url
2595 id="&url-debian-ports;">.
2596             <p>
2597 Each port of Debian has a mailing list.  The list of porting mailing
2598 lists can be found at <url id="&url-debian-port-lists;">.  These lists
2599 are used to coordinate porters, and to connect the users of a given
2600 port with the porters.</p>
2601           </sect2>
2602
2603           <sect2>
2604             <heading>Porter tools</heading>
2605             <p>
2606 Descriptions of several porting tools can be found in <ref
2607 id="tools-porting">.</p>
2608           </sect2>
2609
2610           <sect2 id="buildd">
2611             <heading><package>buildd</package></heading>
2612             <p>
2613 The <package>buildd</package> system is used as a distributed,
2614 client-server build distribution system.  It is usually used in
2615 conjunction with <em>auto-builders</em>, which are ``slave'' hosts
2616 which simply check out and attempt to auto-build packages which need
2617 to be ported.  There is also an email interface to the system, which
2618 allows porters to ``check out'' a source package (usually one which
2619 cannot yet be auto-built) and work on it.
2620           <p>
2621 <package>buildd</package> is not yet available as a package; however,
2622 most porting efforts are either using it currently or planning to use
2623 it in the near future.  The actual automated builder is packaged as
2624 <package>sbuild</package>, see its description in <ref id="sbuild">.
2625 The complete <package>buildd</package> system also collects a number of as yet unpackaged
2626 components which are currently very useful and in use continually,
2627 such as <prgn>andrea</prgn> and
2628 <prgn>wanna-build</prgn>.
2629           <p>
2630 Some of the data produced by <package>buildd</package> which is
2631 generally useful to porters is available on the web at <url
2632 id="&url-buildd;">.  This data includes nightly updated information
2633 from <prgn>andrea</prgn> (source dependencies) and
2634 <package>quinn-diff</package> (packages needing recompilation).
2635           <p>
2636 We are quite proud of this system, since it has so
2637 many possible uses.  Independent development groups can use the system for
2638 different sub-flavors of Debian, which may or may not really be of
2639 general interest (for instance, a flavor of Debian built with <prgn>gcc</prgn>
2640 bounds checking).  It will also enable Debian to recompile entire
2641 distributions quickly.
2642           </sect2>
2643
2644
2645     <sect id="nmu">Non-Maintainer Uploads (NMUs)
2646       <p>
2647 Under certain circumstances it is necessary for someone other than the
2648 official package maintainer to make a release of a package.  This is
2649 called a non-maintainer upload, or NMU.
2650        <p>
2651 Debian porters, who compile packages for different architectures,
2652 occasionally do binary-only NMUs as part of their porting activity
2653 (see <ref id="porting">).  Another reason why NMUs are done is when a
2654 Debian developers needs to fix another developers' packages in order to
2655 address serious security problems or crippling bugs, especially during
2656 the freeze, or when the package maintainer is unable to release a fix
2657 in a timely fashion.
2658       <p>
2659 This chapter contains information providing guidelines for when and
2660 how NMUs should be done.  A fundamental distinction is made between
2661 source and binary-only NMUs, which is explained in the next section.
2662
2663       <sect1 id="nmu-terms">Terminology
2664         <p>
2665 There are two new terms used throughout this section: ``binary-only NMU''
2666 and ``source NMU''.  These terms are used with specific technical
2667 meaning throughout this document.  Both binary-only and source NMUs are
2668 similar, since they involve an upload of a package by a developer who
2669 is not the official maintainer of that package.  That is why it's a
2670 <em>non-maintainer</em> upload.
2671         <p>
2672 A source NMU is an upload of a package by a developer who is not the
2673 official maintainer, for the purposes of fixing a bug in the package.
2674 Source NMUs always involves changes to the source (even if it is just
2675 a change to <file>debian/changelog</file>).  This can be either a
2676 change to the upstream source, or a change to the Debian bits of the
2677 source.  Note, however, that source NMUs may also include
2678 architecture-dependent packages, as well as an updated Debian diff.
2679         <p>
2680 A binary-only NMU is a recompilation and upload of a binary package
2681 for a given architecture.  As such, it is usually part of a porting
2682 effort.  A binary-only NMU is a non-maintainer uploaded binary version
2683 of a package, with no source changes required.  There are many cases
2684 where porters must fix problems in the source in order to get them to
2685 compile for their target architecture; that would be considered a
2686 source NMU rather than a binary-only NMU.  As you can see, we don't
2687 distinguish in terminology between porter NMUs and non-porter NMUs.
2688         <p>
2689 Both classes of NMUs, source and binary-only, can be lumped by the
2690 term ``NMU''.  However, this often leads to confusion, since most
2691 people think ``source NMU'' when they think ``NMU''.  So it's best to
2692 be careful.  In this chapter, if we use the unqualified term ``NMU'',
2693 we refer to any type of non-maintainer upload NMUs, whether source and
2694 binary, or binary-only.
2695
2696
2697       <sect1 id="nmu-who">Who can do an NMU
2698         <p>
2699 Only official, registered Debian maintainers can do binary or source
2700 NMUs.  An official maintainer is someone who has their key in the
2701 Debian key ring.  Non-developers, however, are encouraged to download
2702 the source package and start hacking on it to fix problems; however,
2703 rather than doing an NMU, they should just submit worthwhile patches
2704 to the Bug Tracking System.  Maintainers almost always appreciate
2705 quality patches and bug reports.
2706
2707
2708       <sect1 id="nmu-when">When to do a source NMU
2709         <p>
2710 Guidelines for when to do a source NMU depend on the target
2711 distribution, i.e., stable, unstable, or experimental.  Porters have
2712 slightly different rules than non-porters, due to their unique
2713 circumstances (see <ref id="source-nmu-when-porter">).
2714         <p>
2715 When a security bug is detected, the security team may do an NMU.
2716 Please refer to <ref id="bug-security"> for more information.
2717         <p>
2718 During the release cycle (see <ref id="sec-dists">), NMUs which fix
2719 serious or higher severity bugs are encouraged and accepted.  Even
2720 during this window, however, you should endeavor to reach the current
2721 maintainer of the package; they might be just about to upload a fix
2722 for the problem.  As with any source NMU, the guidelines found in <ref
2723 id="nmu-guidelines"> need to be followed. Special exceptions are made
2724 for <ref id="qa-bsp">.
2725         <p>
2726 Uploading bug fixes to unstable by non-maintainers should only be done
2727 by following this protocol:
2728         <p>
2729 <list>
2730             <item>
2731 Make sure that the package's bugs that the NMU is meant to address are all
2732 filed in the Debian Bug Tracking System (BTS).
2733 If they are not, submit them immediately.
2734             <item>
2735 Wait a few days the response from the maintainer. If you don't get
2736 any response, you may want to help him by sending the patch that fixes
2737 the bug. Don't forget to tag the bug with the "patch" keyword.
2738             <item>
2739 Wait a few more days. If you still haven't got an answer from the
2740 maintainer, send him a mail announcing your intent to NMU the package.
2741 Prepare an NMU as described in <ref id="nmu-guidelines">, test it
2742 carefully on your machine (cf. <ref id="sanitycheck">).
2743 Double check that your patch doesn't have any unexpected side effects.
2744 Make sure your patch is as small and as non-disruptive as it can be.  
2745             <item>
2746 Upload your package to incoming in <file>DELAYED/7-day</file> (cf.
2747 <ref id="delayed-incoming">), send the final patch to the maintainer via
2748 the BTS, and explain to them that they have 7 days to react if they want
2749 to cancel the NMU.
2750             <item>
2751 Follow what happens, you're responsible for any bug that you introduced
2752 with your NMU. You should probably use <ref id="pkg-tracking-system"> (PTS)
2753 to stay informed of the state of the package after your NMU.
2754 </list>
2755         <p>
2756 At times, the release manager or an organized group of developers can
2757 announce a certain period of time in which the NMU rules are relaxed.
2758 This usually involves shortening the period during which one is to wait
2759 before uploading the fixes, and shortening the DELAYED period. It is
2760 important to notice that even in these so-called "bug squashing party"
2761 times, the NMU'er has to file bugs and contact the developer first,
2762 and act later.
2763
2764       <sect1 id="nmu-guidelines">How to do a source NMU
2765         <p>
2766 The following applies to porters insofar as they are playing the dual
2767 role of being both package bug-fixers and package porters.  If a
2768 porter has to change the Debian source archive, automatically their
2769 upload is a source NMU and is subject to its rules.  If a porter is
2770 simply uploading a recompiled binary package, the rules are different;
2771 see <ref id="porter-guidelines">.
2772         <p>
2773 First and foremost, it is critical that NMU patches to source should
2774 be as non-disruptive as possible.  Do not do housekeeping tasks, do
2775 not change the name of modules or files, do not move directories; in
2776 general, do not fix things which are not broken.  Keep the patch as
2777 small as possible.  If things bother you aesthetically, talk to the
2778 Debian maintainer, talk to the upstream maintainer, or submit a bug.
2779 However, aesthetic changes must <em>not</em> be made in a non-maintainer
2780 upload.
2781
2782
2783         <sect2 id="nmu-version">Source NMU version numbering
2784           <p>
2785 Whenever you have made a change to a package, no matter how trivial,
2786 the version number needs to change.  This enables our packing system
2787 to function.
2788           <p>
2789 If you are doing a non-maintainer upload (NMU), you should add a new
2790 minor version number to the <var>debian-revision</var> part of the
2791 version number (the portion after the last hyphen).  This extra minor
2792 number will start at `1'.  For example, consider the package `foo',
2793 which is at version 1.1-3.  In the archive, the source package control
2794 file would be <file>foo_1.1-3.dsc</file>.  The upstream version is
2795 `1.1' and the Debian revision is `3'.  The next NMU would add a new
2796 minor number `.1' to the Debian revision; the new source control file
2797 would be <file>foo_1.1-3.1.dsc</file>.
2798           <p>
2799 The Debian revision minor number is needed to avoid stealing one of
2800 the package maintainer's version numbers, which might disrupt their
2801 work.  It also has the benefit of making it visually clear that a
2802 package in the archive was not made by the official maintainer.
2803           <p>
2804 If there is no <var>debian-revision</var> component in the version
2805 number then one should be created, starting at `0.1'.  If it is
2806 absolutely necessary for someone other than the usual maintainer to
2807 make a release based on a new upstream version then the person making
2808 the release should start with the <var>debian-revision</var> value
2809 `0.1'.  The usual maintainer of a package should start their
2810 <var>debian-revision</var> numbering at `1'. 
2811
2812
2813         <sect2 id="nmu-changelog">
2814           <heading>Source NMUs must have a new changelog entry</heading>
2815           <p>
2816 A non-maintainer doing a source NMU must create a changelog entry,
2817 describing which bugs are fixed by the NMU, and generally why the NMU
2818 was required and what it fixed.  The changelog entry will have the
2819 non-maintainer's email address in the log entry and the NMU version
2820 number in it.
2821           <p>
2822 By convention, source NMU changelog entries start with the line
2823 <example>
2824   * Non-maintainer upload
2825 </example>
2826
2827
2828         <sect2 id="nmu-patch">Source NMUs and the Bug Tracking System
2829           <p>
2830 Maintainers other than the official package maintainer should make as
2831 few changes to the package as possible, and they should always send a
2832 patch as a unified context diff (<tt>diff -u</tt>) detailing their
2833 changes to the Bug Tracking System.
2834           <p>
2835 What if you are simply recompiling the package? If you just need to
2836 recompile it for a single architecture, then you may do a binary-only
2837 NMU as described in <ref id="binary-only-nmu"> which doesn't require any
2838 patch to be sent. If you want the package to be recompiled for all
2839 architectures, then you do a source NMU as usual and you will have to
2840 send a patch.
2841           <p>
2842 If the source NMU (non-maintainer upload) fixes some existing bugs,
2843 these bugs should be tagged <em>fixed</em> in the Bug Tracking
2844 System rather than closed.  By convention, only the official package
2845 maintainer or the original bug submitter are allowed to close bugs.
2846 Fortunately, Debian's archive system recognizes NMUs and thus marks
2847 the bugs fixed in the NMU appropriately if the person doing the NMU
2848 has listed all bugs in the changelog with the <tt>Closes:
2849 bug#<var>nnnnn</var></tt> syntax (see <ref id="upload-bugfix"> for
2850 more information describing how to close bugs via the changelog).
2851 Tagging the bugs <em>fixed</em> ensures that everyone knows that the
2852 bug was fixed in an NMU; however the bug is left open until the
2853 changes in the NMU are incorporated officially into the package by
2854 the official package maintainer.
2855           <p>
2856 Also, after doing an NMU, you have to open a new bug and include a
2857 patch showing all the changes you have made. Alternatively you can send
2858 that information to the existing bugs that are fixed by your NMU.
2859 The normal maintainer will either apply the patch or employ an alternate
2860 method of fixing the problem.  Sometimes bugs are fixed independently
2861 upstream, which is another good reason to back out an NMU's patch.
2862 If the maintainer decides not to apply the NMU's patch but to release a
2863 new version, the maintainer needs to ensure that the new upstream version
2864 really fixes each problem that was fixed in the non-maintainer release.
2865           <p>
2866 In addition, the normal maintainer should <em>always</em> retain the
2867 entry in the changelog file documenting the non-maintainer upload.
2868
2869
2870         <sect2 id="nmu-build">Building source NMUs
2871           <p>
2872 Source NMU packages are built normally.  Pick a distribution using the
2873 same rules as found in <ref id="distribution">, follow the other
2874 prescriptions in <ref id="upload">.
2875           <p>
2876 Make sure you do <em>not</em> change the value of the maintainer in
2877 the <file>debian/control</file> file.  Your name as given in the NMU entry of
2878 the <file>debian/changelog</file> file will be used for signing the
2879 changes file.
2880
2881       <sect1 id="ack-nmu">Acknowledging an NMU
2882         <p>
2883 If one of your packages has been NMU'ed, you have to incorporate the
2884 changes in your copy of the sources. This is easy, you just have
2885 to apply the patch that has been sent to you. Once this is done, you
2886 have to close the bugs that have been tagged fixed by the NMU. You
2887 can either close them manually by sending the required mails to the
2888 BTS or by adding the required <tt>closes: #nnnn</tt> in the changelog
2889 entry of your next upload.
2890         <p>
2891 In any case, you should not be upset by the NMU. An NMU is not a
2892 personal attack against the maintainer. It is a proof that
2893 someone cares enough about the package and that they were willing to help
2894 you in your work, so you should be thankful. You may also want to
2895 ask them if they would be interested to help you on a more frequent
2896 basis as co-maintainer or backup maintainer
2897 (see <ref id="collaborative-maint">).
2898
2899
2900     <sect id="collaborative-maint">
2901         <heading>Collaborative maintenance</heading>
2902         <p>
2903 "Collaborative maintenance" is a term describing the sharing of Debian
2904 package maintenance duties by several people.  This collaboration is
2905 almost always a good idea, since it generally results in higher quality and
2906 faster bug fix turnaround time.  It is strongly recommended that
2907 packages in which a priority of <tt>Standard</tt> or which are part of
2908 the base set have co-maintainers.</p>
2909         <p>
2910 Generally there is a primary maintainer and one or more
2911 co-maintainers.  The primary maintainer is the whose name is listed in
2912 the <tt>Maintainer</tt> field of the <file>debian/control</file> file.
2913 Co-maintainers are all the other maintainers.</p>
2914         <p>
2915 In its most basic form, the process of adding a new co-maintainer is
2916 quite easy:<list>
2917             <item>
2918               <p>
2919 Setup the co-maintainer with access to the sources you build the
2920 package from.  Generally this implies you are using a network-capable
2921 version control system, such as <prgn>CVS</prgn> or
2922 <prgn>Subversion</prgn>.</p>
2923             </item>
2924             <item>
2925               <p>
2926 Add the co-maintainer's correct maintainer name and address to the
2927 <tt>Uploaders</tt> field in the global part of the
2928 <file>debian/control</file> file.
2929 <example>
2930 Uploaders: John Buzz &lt;jbuzz@debian.org&gt;, Adam Rex &lt;arex@debian.org&gt;
2931 </example>
2932 </p>
2933             </item>
2934             <item>
2935               <p>
2936 Using the PTS (<ref id="pkg-tracking-system">), the co-maintainers
2937 should subscribe themselves to the appropriate source package.</p>
2938             </item>
2939           </list></p>
2940       </sect>
2941
2942
2943
2944   <chapt id="best-pkging-practices">
2945     <heading>Best Packaging Practices</heading>
2946     <p>
2947 Debian's quality is largely due to the <url id="&url-debian-policy;"
2948 name="Debian Policy">, which defines explicit baseline requirements
2949 which all Debian packages must fulfill.  Yet there is also a shared
2950 history of experience which goes beyond the Debian Policy, an
2951 accumulation of years of experience in packaging.  Many very
2952 talented people have created great tools, tools which help you, the
2953 Debian maintainer, create and maintain excellent packages.
2954     <p>
2955 This chapter provides some best practices for Debian developers.  All
2956 recommendations are merely that, and are not requirements or policy.
2957 These are just some subjective hints, advice and pointers collected
2958 from Debian developers.  Feel free to pick and choose whatever works
2959 best for you.
2960
2961     <sect id="bpp-debian-rules">
2962         <heading>Best practices for <file>debian/rules</file></heading>
2963         <p>
2964 The following recommendations apply to the <file>debian/rules</file>
2965 file.  Since <file>debian/rules</file> controls the build process and
2966 selects the files which go into the package (directly or indirectly),
2967 it's usually the file maintainers spend the most time on.
2968
2969         <sect1 id="helper-scripts">Helper scripts
2970         <p>
2971 The rationale for using helper scripts in <file>debian/rules</file> is
2972 that lets maintainers use and share common logic among many packages.
2973 Take for instance the question of installing menu entries: you need to
2974 put the file into <file>/usr/lib/menu</file>, and add commands to the
2975 maintainer scripts to register and unregister the menu entries.  Since
2976 this is a very common thing for packages to do, why should each
2977 maintainer rewrite all this on their own, sometimes with bugs?  Also,
2978 supposing the menu directory changed, every package would have to be
2979 changed.
2980         <p>
2981 Helper scripts take care of these issues.  Assuming you comply with
2982 the conventions expected by the helper script, the helper takes care
2983 of all the details.  Changes in policy can be made in the helper
2984 script, then packages just need to be rebuilt with the new version of
2985 the helper and no other changes.
2986         <p>
2987 <ref id="tools"> contains a couple of different helpers. The most
2988 common and best (in our opinion) helper system is
2989 <package>debhelper</package>.  Previous helper systems, such as
2990 <package>debmake</package>, were "monolithic": you couldn't pick and
2991 choose which part of the helper you found useful, but had to use the
2992 helper to do everything.  <package>debhelper</package>, however, is a
2993 number of separate little <prgn>dh_*</prgn> programs.  For instance,
2994 <prgn>dh_installman</prgn> installs and compresses man pages,
2995 <prgn>dh_installmenu</prgn> installs menu files, and so on.  Thus, it
2996 offers enough flexibility to be able to use the little helper scripts,
2997 where useful, in conjunction with hand-crafted commands in
2998 <file>debian/rules</file>.
2999         <p>
3000 You can get started with <package>debhelper</package> by reading
3001 <manref name="debhelper" section="1">, and looking at the examples
3002 that come with the package.  <prgn>dh_make</prgn>, from the
3003 <package>dh-make</package> package (see <ref id="dh-make">), can be
3004 used to convert a "vanilla" source package to a
3005 <package>debhelper</package>ized package.  This shortcut, though,
3006 should not convince you that you do not need to bother understanding
3007 the individual <prgn>dh_*</prgn> helpers.  If you are going to use a
3008 helper, you do need to take the time to learn to use that helper, to
3009 learn its expectations and behavior.
3010         <p>
3011 Some people feel that vanilla <file>debian/rules</file> files are
3012 better, since you don't have to learn the intricacies of any helper
3013 system.  This decision is completely up to you.  Use what works for
3014 you.  Many examples of vanilla <file>debian/rules</file> files are
3015 available at <url id="&url-rules-files;">.
3016
3017
3018         <sect1 id="multiple-patches">
3019           <heading>Separating your patches into multiple files</heading>
3020           <p>
3021 Big, complex packages may have many bugs that you need to deal with.
3022 If you correct a number of bug directly in the source, if you're not
3023 careful, it can get hard to differentiate the various patches that you
3024 applied.  It can get quite messy when you have to update the package
3025 to a new upstream version which integrates some of the fixes (but not
3026 all).  You can't take the total set of diffs (e.g., from
3027 <file>.diff.gz</file>) and work out which patch sets to back out as a
3028 unit as bugs are fixed upstream.
3029         <p>
3030 Unfortunately, the packaging system as such currently doesn't provide for
3031 separating the patches into several files. Nevertheless, there are ways to
3032 separate patches: the patch files are shipped within the Debian patch file
3033 (<file>.diff.gz</file>), usually within the <file>debian/</file> directory.
3034 The only difference is that they aren't applied immediately by dpkg-source,
3035 but by the <tt>build</tt> rule of <file>debian/rules</file>. Conversely,
3036 they are reverted in the <tt>clean</tt> rule.
3037         <p>
3038 <prgn>dbs</prgn> is one of the more popular approaches to this. It does all
3039 of the above, and provides a facility for creating new and updating old
3040 patches. See the package <package>dbs</package> for more information and
3041 <package>hello-dbs</package> for an example.
3042         <p>
3043 <prgn>dpatch</prgn> also provides these facilities, but it's intented to be
3044 even easier to use. See the package <package>dpatch</package> for
3045 documentation and examples (in <file>/usr/share/doc/dpatch</file>).
3046
3047
3048         <sect1 id="multiple-binary">Multiple binary packages
3049         <p>
3050 A single source package will often build several binary packages,
3051 either to provide several flavors of the same software (examples are
3052 the <package>vim-*</package> packages) or to make several small
3053 packages instead of a big one (e.g., if the user can install only the
3054 subset she needs, and thus save some disk space).
3055         <p>
3056 The second case can be easily managed in <file>debian/rules</file>.
3057 You just need to move the appropriate files from the build directory
3058 into the package's temporary trees.  You can do this using
3059 <prgn>install</prgn> (vanilla approach) or <prgn>dh_install</prgn>
3060 (from <package>debhelper</package>).  Be sure to check the different
3061 permutations of the various packages, ensuring that you have the
3062 inter-package dependencies set right in <file>debian/control</file>.
3063         <p>
3064 The first case is a bit more difficult since it involves multiple
3065 recompiles of the same software but with different configure
3066 options. The <package>vim</package> is an example of how to manage
3067 this using an hand-crafted <file>debian/rules</file> file.
3068
3069 <!-- &FIXME; Find a good debhelper example with multiple configure/make
3070      cycles -->
3071         </sect1>
3072       </sect>
3073
3074     <sect id="bpp-debian-maint-scripts">
3075         <heading>Best practices for maintainer scripts</heading>
3076         <p>
3077 Maintainer scripts include the files <file>debian/postinst</file>,
3078 <file>debian/preinst</file>, <file>debian/prerm</file> and
3079 <file>debian/postrm</file>.  These scripts take care of any package
3080 installation or deinstallation setup which isn't handled merely by the
3081 creation or removal of files and directories.  The following
3082 instructions supplement the <url id="&url-debian-policy;" name="Debian
3083 Policy">.
3084         <p>
3085 Maintainer scripts must be idempotent.  That means that you need to
3086 make sure nothing bad will happen if the script is called twice where
3087 it would usually be called once.
3088         <p>
3089 Standard input and output may be redirected (e.g. into pipes) for
3090 logging purposes, so don't rely on them being a tty.
3091         <p>
3092 All prompting or interactive configuration should be kept to a
3093 minimum.  When it is necessary, you should use the
3094 <package>debconf</package> package for the interface.  Remember that
3095 prompting in any case can only be in the <tt>configure</tt> stage of
3096 the <file>postinst</file> script.
3097         <p>
3098 Keep the maintainer scripts as simple as possible.  We suggest you use
3099 pure POSIX shell scripts.  Remember, if you do need any bash features,
3100 the maintainer script must have a bash sh-bang line.  POSIX shell or
3101 Bash are preferred to Perl, since they enable
3102 <package>debhelper</package> to easily add bits to the scripts.
3103         <p>
3104 If you change your maintainer scripts, be sure to test package
3105 removal, double installation, and purging.  Be sure that a purged
3106 package is completely gone, that is, it must remove any files created,
3107 directly or indirectly, in any maintainer script.
3108         <p>
3109 If you need to check for the existence of a command, you should use
3110 something like
3111 <example>if [ -x /usr/sbin/install-docs ]; then ...</example>
3112
3113 If you don't wish to hard-code the path of the command in your
3114 maintainer script, the following POSIX-compliant shell function may
3115 help:
3116
3117 &example-pathfind;
3118
3119 You can use this function to search <tt>$PATH</tt> for a command name,
3120 passed as an argument.  It returns true (zero) if the command was
3121 found, and false if not.  This is really the most portable way, since
3122 <tt>command -v</tt>, <prgn>type</prgn>, and <prgn>which</prgn> are not
3123 POSIX.
3124         <p>
3125 While <prgn>which</prgn> is an acceptable alternative, since
3126 it is from the required <package>debianutils</package> package, it's
3127 not on the root partition. That is, it's in <file>/usr/bin</file> rather
3128 than <file>/bin</file>, so one can't use it in scripts which are run
3129 before the <file>/usr</file> partition is mounted. Most scripts won't have
3130 this problem, though.
3131
3132
3133     <sect id="bpp-debian-control">
3134         <heading>Best practices for <file>debian/control</file></heading>
3135         <p>
3136 The following practices supplement the <url
3137             id="&url-debian-policy;ch-miscellaneous.html#s-descriptions"
3138             name="Policy on package descriptions">.</p>
3139
3140         <sect1 id="bpp-pkg-desc">
3141             <heading>Writing useful descriptions</heading>
3142             <p>
3143 The description of the package (as defined by the corresponding field
3144 in the <file>control</file> file) is the primary information available
3145 to the user about a package before they install it.  It should provide
3146 all the required information to let the user decide whether to install
3147 the package.
3148             <p>
3149 The following practices supplement the <url name="Policy on the descriptions
3150 of packages" id="&url-debian-policy;ch-miscellaneous.html#s-descriptions">.
3151             <p>
3152 The synopsis line (the short description) should primarily be concise.
3153 You may capitalize the first letter for aesthetics. It is customary to
3154 make the synopsis an appositive clause (not a full sentence) in which
3155 case there's no need to put a full stop (period) at the end.
3156             <p>
3157 The long description should, however, always consist of full sentences.
3158             <p>
3159 Since the first user impression is based on the description, be
3160 careful to avoid spelling and grammar mistakes. Ensure that you
3161 spell-check it.  <prgn>ispell</prgn> has a special <tt>-g</tt> option
3162 for <file>debian/control</file> files:
3163
3164 <example>ispell -d american -g debian/control</example>
3165
3166 If you want someone to proofread the description that you
3167 intend to use you may ask on &email-debian-l10n-english;.
3168         </sect1>
3169
3170         <sect1 id="bpp-upstream-info">
3171           <heading>Upstream home page</heading>
3172           <p>
3173 We recommend that you add the URL for the package's home page to the
3174 package description in <file>debian/control</file>.  This information
3175 should be added at the
3176 end of description, using the following format:
3177
3178 <example> .
3179   Homepage: http://some-project.some-place.org/</example>
3180
3181 Note the spaces prepending the line, which serves to break the lines
3182 correctly.  To see an example of how this displays, see <url
3183 id="&url-eg-desc-upstream-info;">.
3184           <p>
3185 If there is no home page for the software, this should naturally be
3186 left empty.
3187           <p>
3188 Note that we expect this field will eventually be replaced by a proper
3189 <file>debian/control</file> field understood by <prgn>dpkg</prgn> and
3190 <tt>&packages-host;</tt>.  If you don't want to bother migrating the
3191 home page from the description to this field, you should probably wait
3192 until that is available.</p>
3193         </sect1>
3194       </sect>
3195
3196 <!--
3197         <sect1 id="pkg-mgmt-cvs">Managing a package with CVS
3198         <p>
3199         &FIXME; presentation of cvs-buildpackage, updating sources
3200         via CVS (debian/rules refresh).
3201 -->
3202
3203
3204       <sect id="bpp-config-mgmt">
3205         <heading>Configuration management with <package>debconf</package></heading>
3206         
3207         <p>
3208 <package>Debconf</package> is a configuration management system which
3209 can be used by all the various packaging scripts
3210 (<file>postinst</file> mainly) to request feedback from the user
3211 concerning how to configure the package. Direct user interactions must
3212 now be avoided in favor of <package>debconf</package>
3213 interaction. This will enable non-interactive installations in the
3214 future.
3215         <p>
3216 Debconf is a great tool but it is often poorly used.   Many common mistakes
3217 are listed in the <manref name="debconf-devel" section="8"> man page. 
3218 It is something that you must read if you decide to use debconf.
3219       </sect>
3220
3221
3222       <sect id="bpp-i18n">
3223         <heading>Internationalization</heading>
3224
3225         <sect1 id="bpp-i18n-debconf">
3226           <heading>Handling debconf translations</heading>
3227           <p>
3228 Like porters, translators have a difficult task.  They work on many
3229 packages and must collaborate with many different
3230 maintainers. Moreover, most of the time, they are not native English
3231 speakers, so you may need to be particularly patient with them.
3232         <p>
3233 The goal of <package>debconf</package> was to make packages
3234 configuration easier for maintainers and for users.  Originally,
3235 translation of debconf templates was handled with
3236 <prgn>debconf-mergetemplate</prgn>.  However, that technique is now
3237 deprecated; the best way to accomplish <package>debconf</package>
3238 internationalization is by using the <package>po-debconf</package>
3239 package.  This method is easier both for maintainer and translators;
3240 transition scripts are provided.
3241         <p>
3242 Using <package>po-debconf</package>, the translation is stored in
3243 <file>po</file> files (drawing from <prgn>gettext</prgn> translation
3244 techniques).  Special template files contain the original messages and
3245 mark which fields are translatable.  When you change the value of a
3246 translatable field, by calling <prgn>debconf-updatepo</prgn>, the
3247 translation is marked as needing attention from the translators. Then,
3248 at build time, the <prgn>dh_installdebconf</prgn> program takes care
3249 of all the needed magic to add the template along with the up-to-date
3250 translations into the binary packages.  Refer to the <manref
3251 name="po-debconf" section="7"> manual page for details.
3252         </sect1>
3253
3254         <sect1 id="bpp-i18n-docs">
3255           <heading>Internationalized documentation</heading>
3256           <p>
3257 Internationalizing documentation is crucial for users, but a lot of
3258 labor.  There's no way to eliminate all that work, but you can make things
3259 easier for translators.
3260           <p>
3261 If you maintain documentation of any size, its easier for translators
3262 if they have access to a source control system.  That lets translators
3263 see the differences between two versions of the documentation, so, for
3264 instance, they can see what needs to be retranslated.  It is
3265 recommended that the translated documentation maintain a note about
3266 what source control revision the translation is based on.  An
3267 interesting system is provided by <url id="&url-i18n-doc-check;"
3268 name="doc-check"> in the <package>boot-floppies</package> package,
3269 which shows an overview of the translation status for any given
3270 language, using structured comments for the current revision of the
3271 file to be translated and, for a translated file, the revision of the
3272 original file the translation is based on.  You might wish to adapt
3273 and provide that in your CVS area.
3274           <p>
3275 If you maintain XML or SGML documentation, we suggest that you isolate
3276 any language-independent information and define those as entities in a
3277 separate file which is included by all the different
3278 translations. This makes it much easier, for instance, to keep URLs
3279 up-to-date across multiple files.
3280         </sect1>
3281       </sect>
3282
3283       <sect id="bpp-common-situations">
3284         <heading>Common packaging situations</heading>
3285
3286 <!--
3287         <sect1 id="bpp-kernel">Kernel modules/patches
3288         <p>
3289         &FIXME; Heavy use of kernel-package. provide files in
3290         /etc/modutils/ for module configuration.
3291 -->
3292
3293         <sect1 id="bpp-autotools">
3294           <heading>Packages using
3295           <prgn>autoconf</prgn>/<prgn>automake</prgn></heading>
3296           <p>
3297 Keeping <prgn>autoconf</prgn>'s <file>config.sub</file> and
3298 <file>config.guess</file> files up-to-date is critical for porters,
3299 especially on more volatile architectures.  Some very good packaging
3300 practices for any package using <prgn>autoconf</prgn> and/or
3301 <prgn>automake</prgn> have been synthesized in
3302 &file-bpp-autotools; from the <package>autotools-dev</package>
3303 package. You're strongly encouraged to read this file and
3304 to follow the given recommendations.
3305
3306
3307         <sect1 id="bpp-libraries">Libraries
3308         <p>
3309 Libraries are always difficult to package for various reasons. The policy
3310 imposes many constraints to ease their maintenance and to make sure
3311 upgrades are as simple as possible when a new upstream version comes out.
3312 A breakage in a library can result in dozens of dependent packages
3313 breaking.
3314         <p>
3315 Good practices for library packaging have been grouped in
3316 <url id="&url-libpkg-guide;" name="the library packaging guide">.
3317         
3318
3319         <sect1 id="bpp-docs">Documentation
3320            <p>
3321 Be sure to follow the <url id="&url-debian-policy;ch-docs.html"
3322             name="Policy on documentation">.</p>
3323           <p>
3324 If your package contains documentation built from XML or SGML, we
3325 recommend you not ship the XML or SGML source in the binary
3326 package(s).  If users want the source of the documentation, they
3327 should retrieve the source package.</p>
3328           <p>
3329 Policy specifies that documentation should be shipped in HTML format.
3330 We also recommend shipping documentation in PDF and plain text format if
3331 convenient and quality output is possible.  However, it is generally
3332 not appropriate to ship plain text versions of documentation whose source
3333 format is HTML.</p>
3334           <p>
3335 Major shipped manuals should register themselves with
3336 <package>doc-base</package> on installation.  See the
3337 <package>doc-base</package> package documentation for more
3338 information.</p>
3339
3340
3341         <sect1 id="bpp-other">Specific types of packages
3342         <p>
3343 Several specific types of packages have special sub-policies and
3344 corresponding packaging rules and practices:
3345 <list>
3346     <item>
3347 Perl related packages have a <url name="Perl policy"
3348 id="&url-perl-policy;">, some examples of packages following that
3349 policy are <package>libdbd-pg-perl</package> (binary perl module) or
3350 <package>libmldbm-perl</package> (arch independent perl module).
3351     <item>
3352 Python related packages have their python policy; see
3353 &file-python-policy; in the <package>python</package> package.
3354     <item>
3355 Emacs related packages have the <url id="&url-emacs-policy;"
3356 name="emacs policy">.
3357     <item>
3358 Java related packages have their <url id="&url-java-policy;"
3359 name="java policy">.
3360     <item>
3361 Ocaml related packages have their own policy, found in
3362 &file-ocaml-policy; from the <package>ocaml</package> package. A good
3363 example is the <package>camlzip</package> source package.
3364     <item>
3365 Packages providing XML or SGML DTDs should conform to the
3366 recommendations found in the <package>sgml-base-doc</package>
3367 package.
3368     <item>
3369 Lisp packages should register themselves with
3370 <package>common-lisp-controller</package>, about which see
3371 &file-lisp-controller;.
3372 </list>
3373         </sect1>
3374
3375 <!--
3376         <sect1 id="custom-config-files">Custom configuration files
3377         <p>
3378         &FIXME; speak of "ucf", explain solution with a template,
3379         explain conf.d directories
3380
3381         <sect1 id="config-with-db">Use of an external database
3382         <p>
3383         &FIXME; The software may require a database that you need to setup.
3384         But the database may be local or distant. Thus you can't depend
3385         on a database server but just on the corresponding library.
3386
3387         sympa may be an example package
3388 -->     
3389
3390         <sect1 id="bpp-archindepdata">Architecture-independent data
3391         <p>
3392         It is not uncommon to have a large amount of architecture-independent
3393         data packaged with a program. For example, collection of icons,
3394         wallpapers or other graphic files, or audio files. If the size of
3395         this data is negligible compared to the size of the remainder of the
3396         package, you can keep it all in the same package.
3397
3398         <p>
3399         However, if the size of the data is considerable, consider splitting
3400         it out into a separate, architecture-independent package
3401         ("_all.deb"). By doing this, you avoid needless duplication of the
3402         same data into eleven or more .debs per each architecture. While
3403         this adds some extra overhead into the Packages files, it can save a
3404         lot of disk space on Debian mirrors, and it also reduces processing
3405         time of Lintian or Linda when run over the entire Debian archive. 
3406         </sect1>
3407
3408       </sect>
3409
3410     <sect id="bpp-debian-changelog">
3411         <heading>Best practices for <file>debian/changelog</file></heading>
3412         <p>
3413 The following practices supplement the <url name="Policy on changelog
3414 files" id="&url-debian-policy;ch-docs.html#s-changelogs">.</p>
3415
3416         <sect1 id="bpp-changelog-do">
3417             <heading>Writing useful changelog entries</heading>
3418         <p>
3419 The changelog entry for a package revision documents changes in that
3420 revision, and only them. Concentrate on describing changes you did since
3421 the last version that are worth mentioning.
3422         <p>
3423 Focus on <em>what</em> was changed; who, how and when are usually less
3424 important. Having said that, remember to politely attribute people who have
3425 provided notable help in making the package (e.g. those who have sent in
3426 patches).
3427         <p>
3428 There's no need to elaborate the trivial and obvious changes. You can also
3429 aggregate several such changes in one entry. However, don't be overly terse
3430 if you have undertaken a major change. Be especially clear if there are
3431 changes that affect the behaviour of the program -- and for further
3432 explanations, use the <file>README.Debian</file> file.
3433         <p>
3434 Use common English language, one which the majority of viewers can
3435 understand. Avoid abbreviations, "tech-speak" and jargon when explaining
3436 changes that close bugs, especially if the said bugs were filed by users
3437 that did not strike you as particularly techically savvy. Also, be polite,
3438 don't swear.
3439         <p>
3440 It is customary to prefix changelog entries with the names of the files that
3441 were changed. There's no need to explicitely list each and every last one of
3442 the changed files, especially if the change was small or repetitive -- use
3443 wildcard characters wisely.
3444         <p>
3445 When referring to bugs, don't assume anything -- say what the problem was,
3446 how it was fixed, and append the "closes: #nnnnn" string.
3447 See <ref id="upload-bugfix"> for more information.
3448
3449         <sect1 id="bpp-changelog-dont">
3450             <heading>Common misconceptions about changelog entries</heading>
3451         <p>
3452 The changelog entries should <strong>not</strong> document generic packaging
3453 issues ("Hey, if you're looking for foo.conf, it's in /etc/blah/."), since
3454 administrators and users are supposed to be at least remotely acquainted
3455 with how such things are generally arranged on Debian systems. Do, however,
3456 mention if you change the location of a configuration file.
3457         <p>
3458 The only bugs closed with a changelog entry should be those that are
3459 actually fixed in the same package revision. Closing bugs unrelated bugs in
3460 the changelog is considered very bad practice. See <ref id="upload-bugfix">.
3461         <p>
3462 The changelog entries should <strong>not</strong> be used for random
3463 discussion with bug reporters ("I don't see segfaults when starting foo
3464 with option bar; send in more info.") or pleas for help ("The bug list
3465 on this package is huge, please lend me a hand."). Such things usually
3466 won't be noticed by their target audience, but will on the other hand
3467 annoy people who wish to read information about actual changes in the
3468 package. Please see <ref id="bug-answering"> for more information on
3469 how to use the bug tracking system.
3470         <p>
3471 It is an old tradition to acknowledge bugs fixed in non-maintainer uploads
3472 in the first changelog entry of the real maintainer. You don't have to
3473 follow it, though: if you are certain that you will include the changes from
3474 the NMU in your next release, you can simply close the bugs the normal way.
3475 It's usually polite to note that the bugs were fixed by another developer.
3476         <p>
3477 Changelogs shouldn't include general statements on life, the universe and
3478 everything ("Sorry this upload took me so long, but I caught the flu.").
3479 Exceptions can be made if the comment is funny ;-) Obviously, this is
3480 subjective, so it's likely best if it's kept out of technical documentation
3481 such as changelogs.
3482
3483         <sect2 id="bpp-changelog-dont-really-dont">
3484             <heading>Common errors in changelog entries</heading>
3485         <p>
3486 <example>
3487   * Fixed all outstanding bugs.
3488 </example>
3489         <p>
3490 This doesn't tell readers anything too useful, obviously. Don't do that(TM).
3491
3492 <example>
3493   * Applied patch from Jane Random.
3494 </example>
3495         <p>
3496 What was the patch about?
3497
3498 <example>
3499   * Late night install target overhaul.
3500 </example>
3501         <p>
3502 Overhaul which accomplished...? Is the mention of late night supposed to
3503 remind us that we shouldn't trust that code?
3504
3505 <example>
3506   * Fix vsync FU w/ ancient CRTs.
3507 </example>
3508         <p>
3509 Too many acronyms, and it's not overly clear what the fuckup (oops,
3510 a curse word!) was actually about, or how it was fixed.
3511
3512 <example>
3513   * This is not a bug. Closes: #nnnnnn
3514 </example>
3515         <p>
3516 First of all, there's absolutely no need to upload the package to convey
3517 this information. Use the bug tracking system! Secondly, there's no
3518 explanation as to why the report is not a bug.
3519
3520 <example>
3521   * Has been fixed for ages, but I forgot to close. Closes: #54321
3522 </example>
3523         <p>
3524 If for some reason you didn't mention the bug number in a previous changelog
3525 entry, there's no problem, just close the bug normally in the BTS. There's
3526 no need to touch the changelog file, presuming the description of the fix is
3527 already in (this applies to the fixes by the upstream authors/maintainers as
3528 well, you don't have to track bugs that they fixed ages ago in your
3529 changelog).
3530
3531 <example>
3532   * Closes: #12345, #12346, #15432
3533 </example>
3534         <p>
3535 Where's the description?! If you can't think of a descriptive message, start
3536 by inserting the title of each different bug.
3537
3538
3539
3540   <chapt id="beyond-pkging">
3541     <heading>Beyond Packaging</heading>
3542     <p>
3543 Debian is about a lot more than just packaging software and
3544 maintaining those packages.  This chapter contains information about 
3545 ways, often really critical ways, to contribute to Debian beyond
3546 simply creating and maintaining packages.
3547     <p>
3548 As a volunteer organization, Debian relies on the discretion of its
3549 members in choosing what they want to work on and in choosing
3550 the most critical thing to spend their time on.
3551
3552     <sect id="submit-bug">
3553         <heading>Bug reporting</heading>
3554         <p>
3555 We encourage you to file bugs as you find them in Debian packages.  In
3556 fact, Debian developers are often the first line testers.  Finding and
3557 reporting bugs in other developer's packages improves the quality of
3558 Debian.
3559         <p>
3560 Try to submit the bug from a normal user account at which you are
3561 likely to receive mail.  Do not submit bugs as root.
3562         <p>
3563 Make sure the bug is not already filed against a package.  Try to do a
3564 good job reporting a bug and redirecting it to the proper location.
3565 For extra credit, you can go through other packages, merging bugs
3566 which are reported more than once, or setting bug severities to
3567 `fixed' when they have already been fixed.  Note that when you are
3568 neither the bug submitter nor the package maintainer, you should
3569 not actually close the bug (unless you secure permission from the
3570 maintainer).
3571         <p>
3572 From time to time you may want to check what has been going on
3573 with the bug reports that you submitted. Take this opportunity to
3574 close those that you can't reproduce anymore. To find
3575 out all the bugs you submitted, you just have to visit
3576 <tt>http://&bugs-host;/from:&lt;your-email-addr&gt;</tt>.
3577
3578       <sect1 id="submit-many-bugs">Reporting lots of bugs at once
3579         <p>
3580 Reporting a great number of bugs for the same problem on a great
3581 number of different packages &mdash; i.e., more than 10 &mdash; is a deprecated
3582 practice.  Take all possible steps to avoid submitting bulk bugs at
3583 all.  For instance, if checking for the problem can be automated, add
3584 a new check to <package>lintian</package> so that an error or warning
3585 is emitted.
3586         <p>
3587 If you report more than 10 bugs on the same topic at once, it is
3588 recommended that you send a message to &email-debian-devel; describing
3589 your intention before submitting the report. This will allow other
3590 developers to verify that the bug is a real problem. In addition, it
3591 will help prevent a situation in which several maintainers start
3592 filing the same bug report simultaneously.
3593         <p>
3594 Note that when sending lots of bugs on the same subject, you should
3595 send the bug report to <email>maintonly@bugs.debian.org</email> so
3596 that the bug report is not forwarded to the bug distribution mailing
3597 list.
3598
3599
3600       <sect id="qa-effort">Quality Assurance effort
3601         
3602         <sect1 id="qa-daily-work">Daily work
3603         <p>
3604 Even though there is a dedicated group of people for Quality
3605 Assurance, QA duties are not reserved solely for them. You can
3606 participate in this effort by keeping your packages as bug-free as
3607 possible, and as lintian-clean (see <ref id="lintian">) as
3608 possible. If you do not find that possible, then you should consider
3609 orphaning some of your packages (see <ref
3610 id="orphaning">). Alternatively, you may ask the help of other people
3611 in order to catch up the backlog of bugs that you have (you can ask
3612 for help on &email-debian-qa; or &email-debian-devel;). At the same
3613 time, you can look for co-maintainers (see <ref id="collaborative-maint">).
3614         
3615         <sect1 id="qa-bsp">Bug squashing parties
3616         <p>
3617 From time to time the QA group organizes bug squashing parties to get rid of
3618 as many problems as possible. They are announced on &email-debian-devel-announce;
3619 and the announce explains what area will be focused on during the party:
3620 usually they focus on release critical bugs but it may happen that they
3621 decide to help finish a major upgrade going on (like a new perl version
3622 which requires recompilation of all the binary modules).
3623         <p>
3624 The rules for non-maintainer uploads differ during the parties because
3625 the announce of the party is considered like a prior notice for NMU. If
3626 you have packages that may be affected by the party (because they have
3627 release critical bugs for example), you should send an update to each of
3628 the corresponding bug to explain their current status and what you expect
3629 from the party. If you don't want an NMU, or if you're only interested in a
3630 patch, or if you will deal yourself with the bug, please explain that in
3631 the BTS.
3632         <p>
3633 People participating in the party have special rules for NMU, they can
3634 NMU without prior notice if they upload their NMU to
3635 DELAYED/3-day at least. All other NMU rules applies as usually, they
3636 should send the patch of the NMU in the BTS (in one of the open bugs
3637 fixed by the NMU or in a new bug tagged fixed). They should
3638 also respect the maintainer's wishes if he expressed some.
3639         <p>
3640 If someone doesn't feel confident with an NMU, he should just send a patch
3641 to the BTS. It's far better than a broken NMU.
3642
3643
3644     <sect id="contacting-maintainers">Contacting other maintainers
3645       <p>
3646 During your lifetime within Debian, you will have to contact other
3647 maintainers for various reasons. You may want to discuss a new
3648 way of cooperating between a set of related packages, or you may
3649 simply remind someone that a new upstream version is available
3650 and that you need it.
3651       <p>
3652 Looking up the email address of the maintainer for the package can be
3653 distracting. Fortunately, there is a simple email alias,
3654 <tt>&lt;package&gt;@&packages-host;</tt>, which provides a way to
3655 email the maintainer, whatever their individual email address (or
3656 addresses) may be.  Replace <tt>&lt;package&gt;</tt> with the name of
3657 a source or a binary package.
3658       <p>
3659 You may also be interested in contacting the persons who are
3660 subscribed to a given source package via <ref id="pkg-tracking-system">.
3661 You can do so by using the <tt>&lt;package-name&gt;@&pts-host;</tt>
3662 email address.
3663
3664
3665     <sect id="mia-qa">Dealing with inactive and/or unreachable maintainers
3666       <p>
3667 If you notice that a package is lacking maintenance, you should
3668 make sure that the maintainer is active and will continue to work on
3669 their packages. It is possible that they are not active any more, but
3670 haven't registered out of the system, so to speak. On the other hand,
3671 it is also possible that they just need a reminder.
3672       <p>
3673 The first step is to politely contact the maintainer, and wait for a
3674 response, for a reasonable time. It is quite hard to define "reasonable
3675 time", but it is important to take into account that real life is sometimes
3676 very hectic. One way to handle this would be send a reminder after two
3677 weeks.
3678       <p>
3679 If the maintainer doesn't reply within four weeks (a month), one can
3680 assume that a response will probably not happen. If that happens, you
3681 should investigate further, and try to gather as much useful information
3682 about the maintainer in question as possible. This includes:
3683       <p>
3684       <list>
3685         <item>The "echelon" information available through the 
3686               <url id="&url-debian-db;" name="developers' LDAP database">,
3687               which indicates when's the last time a developer has posted to
3688               a Debian mailing list. (This includes uploads via
3689               debian-*-changes lists.) Also, remember to check whether the
3690               maintainer is marked as "on vacation" in the database.
3691
3692         <item>The number of packages this maintainer is responsible for,
3693               and the condition of those packages. In particular, are there
3694               any RC bugs that have been open for ages? Furthermore, how
3695               many bugs are there in general? Another important piece of
3696               information is whether the packages have been NMUed, and if
3697               so, by whom?
3698
3699         <item>Is there any activity of the maintainer outside of Debian? 
3700               For example, they might have posted something recently to
3701               non-Debian mailing lists or news groups.
3702       </list>
3703       <p>
3704 One big problem are packages which were sponsored -- the maintainer is not
3705 an official Debian developer. The echelon information is not available for
3706 sponsored people, for example, so you need to find and contact the Debian
3707 developer who has actually uploaded the package. Given that they signed the
3708 package, they're responsible for the upload anyhow, and should know what
3709 happened to the person they sponsored.
3710       <p>
3711 It is also allowed to post a query to &email-debian-devel;, asking if anyone
3712 is aware of the whereabouts of the missing maintainer.
3713       <p>
3714 Once you have gathered all of this, you can contact &email-debian-qa;.
3715 People on this alias will use the information you provided in order to
3716 decide how to proceed. For example, they might orphan one or all of the
3717 packages of the maintainer. If a packages has been NMUed, they might prefer
3718 to contact the NMUer before orphaning the package -- perhaps the person who
3719 has done the NMU is interested in the package.
3720       <p>
3721 One last word: please remember to be polite. We are all volunteers and
3722 cannot dedicate all of our time to Debian. Also, you are not aware of the
3723 circumstances of the person who is involved. Perhaps they might be
3724 seriously ill or might even had died -- you do not know who may be on the
3725 receiving side -- imagine how a relative will feel if they read the e-mail
3726 of the deceased and find a very impolite, angry and accusing message!)
3727       <p>
3728 On the other hand, although we are volunteers, we do have a responsibility. 
3729 So you can stress the importance of the greater good -- if a maintainer does
3730 not have the time or interest anymore, they should "let go" and give the
3731 package to someone with more time.
3732
3733
3734     <sect id="newmaint">
3735       <heading>Interacting with prospective Debian developers</heading>
3736       <p>
3737 Debian's success depends on its ability to attract and retain new and
3738 talented volunteers.  If you are an experienced developer, we
3739 recommend that you get involved with the process of bringing in new
3740 developers.  This section describes how to help new prospective
3741 developers.
3742
3743
3744       <sect1 id="sponsoring">Sponsoring packages
3745         <p>
3746 Sponsoring a package means uploading a package for a maintainer who is not
3747 able to do it on their own, a new maintainer applicant. Sponsoring a package
3748 also means accepting responsibility for it.
3749         <p>
3750 If you wish to volunteer as a sponsor, you can sign up at <url
3751 id="&url-sponsors;">.
3752         <p>
3753 New maintainers usually have certain difficulties creating Debian packages
3754 &mdash; this is quite understandable. That is why the sponsor is there, to check
3755 the package and verify that it is good enough for inclusion in Debian.
3756 (Note that if the sponsored package is new, the ftpmasters will also have to
3757 inspect it before letting it in.)
3758         <p>
3759 Sponsoring merely by signing the upload or just recompiling is
3760 <strong>definitely not recommended</strong>. You need to build the source
3761 package just like you would build a package of your own. Remember that it
3762 doesn't matter that you left the prospective developer's name both in the
3763 changelog and the control file, the upload can still be traced to you.
3764         <p>
3765 If you are an application manager for a prospective developer, you can also
3766 be their sponsor. That way you can also verify how the applicant is
3767 handling the 'Tasks and Skills' part of their application.
3768
3769       <sect1>Managing sponsored packages
3770         <p>
3771 By uploading a sponsored package to Debian, you are certifying that
3772 the package meets minimum Debian standards.  That implies that you
3773 must build and test the package on your own system before uploading.
3774         <p>
3775 You can not simply upload a binary <file>.deb</file> from the sponsoree. In
3776 theory, you should only ask for the diff file and the location of the
3777 original source tarball, and then you should download the source and apply
3778 the diff yourself. In practice, you may want to use the source package
3779 built by your sponsoree. In that case, you have to check that they haven't
3780 altered the upstream files in the <file>.orig.tar.gz</file> file that
3781 they're providing.
3782         <p>
3783 Do not be afraid to write the sponsoree back and point out changes
3784 that need to be made.  It often takes several rounds of back-and-forth
3785 email before the package is in acceptable shape.  Being a sponsor
3786 means being a mentor.
3787         <p>
3788 Once the package meets Debian standards, build the package with
3789 <example>dpkg-buildpackage -us -uc</example> and sign it
3790 with <example>debsign -m"<var>FULLNAME</var> <var>email-addr</var>" <var>changes-file</var></example>
3791 before uploading it to the incoming directory.
3792         <p>
3793 The Maintainer field of the <file>control</file> file and the
3794 <file>changelog</file> should list the person who did the packaging, i.e., the
3795 sponsoree. The sponsoree will therefore get all the BTS mail about the
3796 package. 
3797         <p>
3798 If you prefer to leave a more evident trace of your sponsorship job, you
3799 can add a line stating it in the most recent changelog entry.
3800        <p>
3801 You are encouraged to keep tabs on the package you sponsor using 
3802 <ref id="pkg-tracking-system">.
3803
3804       <sect1>Advocating new developers
3805         <p>
3806 See the page about <url id="&url-newmaint-advocate;"
3807 name="advocating a prospective developer"> at the Debian web site.
3808
3809       <sect1>Handling new maintainer applications
3810         <p>
3811 Please see <url id="&url-newmaint-amchecklist;" name="Checklist for
3812 Application Managers"> at the Debian web site.
3813
3814
3815
3816     <appendix id="tools">Overview of Debian Maintainer Tools
3817       <p>
3818 This section contains a rough overview of the tools available to
3819 maintainers.  The following is by no means complete or definitive, but
3820 just a guide to some of the more popular tools.
3821       <p>
3822 Debian maintainer tools are meant to help convenience developers and 
3823 free their time for critical tasks.  As Larry Wall says, there's more
3824 than one way to do it.
3825       <p>
3826 Some people prefer to use high-level package maintenance tools and
3827 some do not.  Debian is officially agnostic on this issue; any tool
3828 which gets the job done is fine.  Therefore, this section is not meant
3829 to stipulate to anyone which tools they should use or how they should
3830 go about with their duties of maintainership.  Nor is it meant to
3831 endorse any particular tool to the exclusion of a competing tool.
3832       <p>
3833 Most of the descriptions of these packages come from the actual
3834 package descriptions themselves.  Further information can be found in
3835 the package documentation itself.  You can also see more info with the
3836 command <tt>apt-cache show &lt;package-name&gt;</tt>.</p>
3837
3838       <sect id="tools-core">
3839         <heading>Core tools</heading>
3840         <p>
3841 The following tools are pretty much required for any maintainer.</p>
3842
3843       <sect1 id="dpkg-dev">
3844         <heading><package>dpkg-dev</package>
3845         <p>
3846 <package>dpkg-dev</package> contains the tools (including
3847 <prgn>dpkg-source</prgn>) required to unpack, build and upload Debian
3848 source packages.  These utilities contain the fundamental, low-level
3849 functionality required to create and manipulated packages; as such,
3850 they are required for any Debian maintainer.
3851
3852       <sect1 id="debconf">
3853         <heading><package>debconf</package></heading>
3854         <p>
3855 <package>debconf</package> provides a consistent interface to
3856 configuring packages interactively.  It is user interface
3857 independent, allowing end-users to configure packages with a
3858 text-only interface, an HTML interface, or a dialog interface.  New
3859 interfaces can be added modularly.
3860         <p>
3861 You can find documentation for this package in the
3862 <package>debconf-doc</package> package.
3863         <p>
3864 Many feel that this system should be used for all packages requiring
3865 interactive configuration; see <ref id="bpp-config-mgmt">.
3866 <package>debconf</package> is not currently required by Debian Policy,
3867 but that may change in the future.
3868         </sect1>
3869
3870       <sect1 id="fakeroot">
3871         <heading><package>fakeroot</package>
3872         <p>
3873 <package>fakeroot</package> simulates root privileges.  This enables
3874 you to build packages without being root (packages usually want to
3875 install files with root ownership).  If you have
3876 <package>fakeroot</package> installed, you can build packages as a
3877 user: <tt>dpkg-buildpackage -rfakeroot</tt>.
3878         </sect1>
3879       </sect>
3880
3881       <sect id="tools-lint">
3882         <heading>Package lint tools</heading>
3883         <p>
3884 According to the Free On-line Dictionary of Computing (FOLDOC), `lint'
3885 is "a Unix C language processor which carries out more thorough checks
3886 on the code than is usual with C compilers."  Package lint tools help
3887 package maintainers by automatically finding common problems and
3888 policy violations with their packages.</p>
3889
3890         <sect1 id="lintian">
3891           <heading><package>lintian</package></heading>
3892           <p>
3893 <package>lintian</package> dissects Debian packages and emits
3894 information on bugs
3895 and policy violations. It contains automated checks for many aspects
3896 of Debian policy as well as some checks for common errors.
3897         <p>
3898 You should periodically get the newest <package>lintian</package> from
3899 `unstable' and check over all your packages. Notice that the <tt>-i</tt>
3900 option provides detailed explanations of what each error or warning means,
3901 what is its basis in Policy, and commonly how you can fix the problem.
3902         <p>
3903 Refer to <ref id="sanitycheck"> for more information on how and when
3904 to use Lintian.
3905         <p>
3906 You can also see a summary of all problems reported by Lintian on your
3907 packages at <url id="&url-lintian;">. Those reports contain the latest
3908 <prgn>lintian</prgn> output on the whole development distribution
3909 ("unstable").
3910         </sect1>
3911
3912         <sect1 id="linda">
3913           <heading><package>linda</package></heading>
3914           <p>
3915 <package>linda</package> is another package linter.  It is similar to
3916 <package>lintian</package> but has a different set of checks.  Its
3917 written in Python rather than Perl.</p>
3918         </sect1>
3919
3920         <sect1 id="debdiff">
3921           <heading><package>debdiff</package></heading>
3922           <p>
3923 <prgn>debdiff</prgn> (from the <package>devscripts</package> package)
3924 compares file lists and control files of two packages. It is a simple
3925 regression test, as it will help you notice if the number of binary
3926 packages has changed since the last upload, or if something's changed
3927 in the control file. Of course, some of the changes it reports will be
3928 all right, but it can help you prevent various accidents.
3929           <p>
3930 You can run it over a pair of binary packages:
3931 <example>
3932 debdiff package_1-1_arch.deb package_2-1_arch.deb
3933 </example>
3934           <p>
3935 Or even a pair of changes files:
3936 <example>
3937 debdiff package_1-1_arch.changes package_2-1_arch.changes
3938 </example>
3939           <p>
3940 For more information please see <manref name="debdiff" section="1">.
3941         </sect1>
3942
3943       </sect>
3944
3945
3946       <sect id="tools-helpers">
3947         <heading>Helpers for <file>debian/rules</file></heading>
3948         <p>
3949 Package building tools make the process of writing
3950 <file>debian/rules</file> files easier.  See <ref id="helper-scripts">
3951 for more information on why these might or might not be desired.
3952
3953         <sect1 id="debhelper">
3954           <heading><package>debhelper</package></heading>
3955         <p>
3956 <package>debhelper</package> is a collection of programs that can be
3957 used in <file>debian/rules</file> to automate common tasks related to
3958 building binary Debian packages. Programs are included to install
3959 various files into your package, compress files, fix file permissions,
3960 integrate your package with the Debian menu system.
3961         <p>
3962 Unlike some approaches, <package>debhelper</package> is broken into
3963 several small, granular commands which act in a consistent manner.  As
3964 such, it allows a greater granularity of control than some of the
3965 other "debian/rules tools".
3966         <p>
3967 There are a number of little <package>debhelper</package> add-on
3968 packages, too transient to document.  You can see the list of most of
3969 them by doing <tt>apt-cache search ^dh-</tt>.
3970         </sect1>
3971
3972         <sect1 id="debmake">
3973           <heading><package>debmake</package>
3974         <p>
3975 <package>debmake</package>, a pre-cursor to
3976 <package>debhelper</package>, is a less granular
3977 <file>debian/rules</file> assistant. It includes two main programs:
3978 <prgn>deb-make</prgn>, which can be used to help a maintainer convert
3979 a regular (non-Debian) source archive into a Debian source package;
3980 and <prgn>debstd</prgn>, which incorporates in one big shot the same
3981 sort of automated functions that one finds in
3982 <package>debhelper</package>.
3983         <p>
3984 The consensus is that <package>debmake</package> is now deprecated in
3985 favor of <package>debhelper</package>.  However, it's not a bug to use
3986 <package>debmake</package>.
3987         </sect1>
3988
3989         <sect1 id="dh-make">
3990           <heading><package>dh-make</package>
3991         <p>
3992 The <package/dh-make/ package contains <prgn/dh_make/, a program that
3993 creates a skeleton of files necessary to build a Debian package out of
3994 a source tree. As the name suggests, <prgn/dh_make/ is a rewrite of
3995 <package/debmake/ and its template files use dh_* programs from
3996 <package/debhelper/.
3997         <p>
3998 While the rules files generated by <prgn/dh_make/ are in general a
3999 sufficient basis for a working package, they are still just the groundwork:
4000 the burden still lies on the maintainer to finely tune the generated files
4001 and make the package entirely functional and Policy-compliant.
4002         </sect1>
4003
4004         <sect1 id="yada">
4005           <heading><package>yada</package>
4006         <p>
4007 <package>yada</package> is another packaging helper tool.  It uses a
4008 <file>debian/packages</file> file to auto-generate
4009 <file>debian/rules</file> and other necessary files in the
4010 <file>debian/</file> subdirectory.
4011         <p>
4012 Note that <package>yada</package> is called "essentially unmaintained"
4013 by it's own maintainer, Charles Briscoe-Smith.  As such, it can be
4014 considered deprecated.
4015         </sect1>
4016
4017         <sect1 id="equivs">
4018           <heading><package>equivs</package>
4019         <p>
4020 <package>equivs</package> is another package for making packages.  It
4021 is often suggested for local use if you need to make a package simply
4022 to fulfill dependencies.  It is also sometimes used when making
4023 ``meta-packages'', which are packages whose only purpose is to depend
4024 on other packages.</p>
4025         </sect1>
4026       </sect>
4027
4028
4029
4030       <sect id="tools-builders">
4031         <heading>Package builders</heading>
4032         <p>
4033 The following packages help with the package building process, general
4034 driving <prgn>dpkg-buildpackage</prgn> as well as handling supporting
4035 tasks.</p>
4036
4037         <sect1 id="cvs-buildpackage">
4038           <heading><package>cvs-buildpackage</package>
4039         <p>
4040 <package>cvs-buildpackage</package> provides the capability to inject
4041 or import Debian source packages into a CVS repository, build a Debian
4042 package from the CVS repository, and helps in integrating upstream
4043 changes into the repository.
4044         <p>
4045 These utilities provide an infrastructure to facilitate the use of CVS
4046 by Debian maintainers. This allows one to keep separate CVS branches
4047 of a package for <em>stable</em>, <em>unstable</em> and possibly
4048 <em>experimental</em> distributions, along with the other benefits of
4049 a version control system.
4050         </sect1>
4051
4052         <sect1 id="debootstrap">
4053           <heading><package>debootstrap</package></heading>
4054           <p>
4055 The <package>debootstrap</package> package and script allows you to
4056 "bootstrap" a Debian base system into any part of your file-system.
4057 By "base system", we mean the bare minimum of packages required to
4058 operate and install the rest of the system.
4059         <p>
4060 Having a system like this can be useful in many ways. For instance,
4061 you can <prgn>chroot</prgn> into it if you want to test your build
4062 depends.  Or, you can test how your package behaves when installed
4063 into a bare base system.  Chroot builders use this package, see below.
4064         </sect1>
4065
4066         <sect1 id="pbuilder">
4067           <heading><package>pbuilder</package></heading>
4068           <p>
4069 <package>pbuilder</package> constructs a chrooted system, and builds a
4070 package inside the chroot. It is very useful to check that a package's
4071 build-dependencies are correct, and to be sure that unnecessary and
4072 wrong build dependencies will not exist in the resulting package.</p>
4073           <p>
4074 A related package is <package>pbuilder-uml</package>, which goes even
4075 further build doing the build within User-mode-linux.</p>
4076         </sect1>
4077
4078       <sect1 id="sbuild">
4079         <heading><package>sbuild</package></heading>
4080           <p>
4081 <package>sbuild</package> is another automated builder.  It can use
4082 chrooted environments as well.  It can be used stand-alone, or as part
4083 of a networked, distributed build environment.  As the latter, it is
4084 part of the system used by porters to build binary packages for all
4085 the available architectures.  See <ref id="buildd"> for more
4086 information, and <url id="&url-buildd;"> to see the system in
4087 action.</p>
4088         </sect1>
4089       </sect>
4090
4091       <sect id="uploaders">
4092         <heading>Package uploaders</heading>
4093         <p>
4094 The following packages help automate or simplify the process of
4095 uploading packages into the official archive.</p>
4096
4097         <sect1 id="dupload">
4098           <heading><package>dupload</package></heading>
4099           <p>
4100 <package>dupload</package> is a package and a script to automatically
4101 upload Debian packages to the Debian archive, to log the upload, and
4102 to send mail about the upload of a package.  You can configure it for
4103 new upload locations or methods.
4104         </sect1>
4105
4106         <sect1 id="dput">
4107           <heading><package>dput</package></heading>
4108           <p>
4109 The <package>dput</package> package and script does much the same
4110 thing as <package>dupload</package>, but in a different way.  It has
4111 some features over <package>dupload</package>, such as the ability to
4112 check the GnuPG signature and checksums before uploading, and the
4113 possibility of running <prgn>dinstall</prgn> in dry-run mode after the
4114 upload.
4115         </sect1>
4116       </sect>
4117
4118       <sect id="tools-maint-automate">
4119         <heading>Maintenance automation</heading>
4120         <p>
4121 The following tools help automate different maintenance tasks, from
4122 adding changelog entries or signature lines, looking up bugs in Emacs,
4123 to making use of the newest and official use of
4124 <file>config.sub</file>.</p>
4125
4126         <sect1 id="devscripts">
4127           <heading><package>devscripts</package></heading>
4128           <p>
4129 <package>devscripts</package> is a package containing wrappers
4130 and tools which are very helpful for maintaining your Debian
4131 packages.  Example scripts include <prgn>debchange</prgn> and
4132 <prgn>dch</prgn>, which manipulate your <file>debian/changelog</file>
4133 file from the command-line, and <prgn>debuild</prgn>, which is a
4134 wrapper around <prgn>dpkg-buildpackage</prgn>. The <prgn>bts</prgn>
4135 utility is also very helpful to update the state of bug reports on the
4136 command line.  <prgn>uscan</prgn> can be used to watch for new upstream
4137 versions of your packages.  The <prgn>debrsign</prgn> can be used to
4138 remotely sign a package prior to upload, which is nice when the
4139 machine you build the package on is different from where your GPG keys
4140 are.</p>
4141           <p>
4142 See the <manref name="devscripts" section="1"> manual page for a
4143 complete list of available scripts.</p>
4144         </sect1>
4145
4146         <sect1 id="autotools-dev">
4147           <heading><package>autotools-dev</package></heading>
4148           <p>
4149 Contains best practices for people maintaining packages that use
4150 <prgn>autoconf</prgn> and/or <prgn>automake</prgn>.  Also contains
4151 canonical <file>config.sub</file> and <file>config.guess</file> files
4152 which are known to work on all Debian ports.</p>
4153         </sect1>
4154
4155         <sect1 id="dpkg-repack">
4156           <heading><package>dpkg-repack</package></heading>
4157           <p>
4158 <prgn>dpkg-repack</prgn> creates Debian package file out of a package
4159 that has already been installed. If any changes have been made to the
4160 package while it was unpacked (e.g., files in <file>/etc</file> were
4161 modified), the new package will inherit the changes.</p>
4162           <p>
4163 This utility can make it easy to copy packages from one computer to
4164 another, or to recreate packages that are installed on your system
4165 but no longer available elsewhere, or to store the current state of a
4166 package before you upgrade it.</p>
4167         </sect1>
4168
4169         <sect1 id="alien">
4170           <heading><package>alien</package></heading>
4171           <p>
4172 <prgn>alien</prgn> converts binary packages between various packaging
4173 formats, including Debian, RPM (RedHat), LSB (Linux Standard Base),
4174 Solaris and Slackware packages.</p>
4175         </sect1>
4176
4177         <sect1 id="debsums">
4178           <heading><package>debsums</package></heading>
4179           <p>
4180 <prgn>debsums</prgn> checks installed packages against their MD5 sums.
4181 Note that not all packages have MD5 sums, since they aren't required
4182 by Policy.</p>
4183         </sect1>
4184
4185         <sect1 id="dpkg-dev-el">
4186           <heading><package>dpkg-dev-el</package></heading>
4187           <p>
4188 <package>dpkg-dev-el</package> is an Emacs lisp package which provides
4189 assistance when editing some of the files in the <file>debian</file>
4190 directory of your package.  For instance, when editing
4191 <file>debian/changelog</file>, there are handy functions for
4192 finalizing a version and listing the package's current bugs.</p>
4193         </sect1>
4194
4195         <sect1 id="dpkg-depcheck">
4196           <heading><package>dpkg-depcheck</package></heading>
4197           <p>
4198 <prgn>dpkg-depcheck</prgn> (from the <package>devscripts</package> package)
4199 runs a command under <prgn>strace</prgn> to determine all the packages that
4200 were used by the said command.
4201           <p>
4202 For Debian packages, this is useful when you have to compose a
4203 <tt>Build-Depends</tt> line for your new package: running the build
4204 process through <prgn>dpkg-depcheck</prgn> will provide you with a
4205 good first approximation of the build-dependencies. For example:
4206 <example>
4207 dpkg-depcheck -b debian/rules build
4208 </example>
4209           <p>
4210 <prgn>dpkg-depcheck</prgn> can also be used to check for run-time
4211 dependencies, especially if your package uses exec(2) to run other
4212 programs.
4213           <p>
4214 For more information please see <manref name="dpkg-depcheck" section="1">.
4215         </sect1>
4216
4217       </sect>
4218
4219
4220       <sect id="tools-porting">
4221         <heading>Porting tools</heading>
4222         <p>
4223 The following tools are helpful for porters and for
4224 cross-compilation.</p>
4225
4226         <sect1 id="quinn-diff">
4227           <heading><package>quinn-diff</package>
4228           <p>
4229 <package>quinn-diff</package> is used to locate the differences from
4230 one architecture to another.  For instance, it could tell you which
4231 packages need to be ported for architecture <var>Y</var>, based on
4232 architecture <var>X</var>.
4233
4234         <sect1 id="dpkg-cross">
4235           <heading><package>dpkg-cross</package>
4236           <p>
4237 <package>dpkg-cross</package> is a tool for installing libraries and
4238 headers for cross-compiling in a way similar to
4239 <package>dpkg</package>. Furthermore, the functionality of
4240 <prgn>dpkg-buildpackage</prgn> and <prgn>dpkg-shlibdeps</prgn> is
4241 enhanced to support cross-compiling.
4242         </sect1>
4243
4244
4245       <sect id="tools-doc">
4246         <heading>Documentation and information</heading>
4247         <p>
4248 The following packages provide information for maintainers or help
4249 with building documentation.
4250
4251         <sect1 id="debiandoc-sgml">
4252           <heading><package>debiandoc-sgml</package></heading>
4253           <p>
4254 <package>debiandoc-sgml</package> provides the DebianDoc SGML DTD,
4255 which is commonly used for Debian documentation.  This manual, for
4256 instance, is written in DebianDoc.  It also provides scripts for
4257 building and styling the source to various output formats.</p>
4258           <p>
4259 Documentation for the DTD can be found in the
4260 <package>debiandoc-sgml-doc</package> package.</p>
4261         </sect1>
4262
4263         <sect1 id="debian-keyring">
4264           <heading><package>debian-keyring</package></heading>
4265           <p>
4266 Contains the public GPG and PGP keys of Debian developers.  See <ref
4267 id="key-maint"> and the package documentation for more
4268 information.</p>
4269         </sect1>
4270
4271         <sect1 id="debview">
4272           <heading><package>debview</package></heading>
4273           <p>
4274 <package>debview</package> provides an Emacs mode for viewing Debian
4275 binary packages.  This lets you examine a package without unpacking
4276 it.</p>
4277         </sect1>
4278       </sect>
4279
4280 <!-- FIXME: add the following
4281
4282 questionable:
4283   ucf
4284   dpkg-awk
4285   grep-dctrl
4286   d-shlibs
4287   wajig
4288   magpie
4289   apt-dpkg-ref
4290   apt-show-source
4291   apt-show-versions
4292   pdbv
4293   epm
4294   apt-src
4295   apt-build
4296
4297 rejected:
4298   debaux: too new, unmaintained?
4299   dh-make-perl: too new, unmaintained?
4300 -->
4301
4302     </appendix>
4303   </book>
4304 </debiandoc>
4305
4306 <!-- Keep this comment at the end of the file
4307 Local variables:
4308 mode: sgml
4309 sgml-omittag:t
4310 sgml-shorttag:t
4311 sgml-minimize-attributes:nil
4312 sgml-always-quote-attributes:t
4313 sgml-indent-step:2
4314 sgml-indent-data:nil
4315 sgml-parent-document:nil
4316 sgml-exposed-tags:nil
4317 sgml-declaration:nil
4318 sgml-local-catalogs:nil
4319 sgml-local-ecat-files:nil
4320 End:
4321 -->