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