/[ddp]/manuals/trunk/maint-guide/maint-guide.en.dbk
ViewVC logotype

Diff of /manuals/trunk/maint-guide/maint-guide.en.dbk

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8612 by osamu, Thu Mar 31 17:06:46 2011 UTC revision 8706 by osamu, Thu Apr 21 16:17:35 2011 UTC
# Line 2  Line 2 
2  <!-- -*- DocBook -*- -->  <!-- -*- DocBook -*- -->
3  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
5    <!ENTITY % trans    SYSTEM "po4a/maint-guide.en.ent">   %trans;
6  <!ENTITY % common   SYSTEM "common.ent">   %common;  <!ENTITY % common   SYSTEM "common.ent">   %common;
7  <!ENTITY % version  SYSTEM "version.ent">  %version;  <!ENTITY % version  SYSTEM "version.ent">  %version;
8  ]>  ]>
9  <book lang="en">  <book lang="en">
10  <!-- This is UTF-8 encoded. -->  <!-- This is UTF-8 encoded. -->
11  <title>Debian New Maintainers' Guide</title>  <!--
12  <bookinfo>  This is reorganized to make this document robust for translation
13  <authorgroup>  when some externally referenced information changes.
 <author> <personname> <firstname>Josip</firstname> <surname>Rodin</surname> </personname> <email>joy-mg@debian.org</email> <contrib>(original contents)</contrib> </author>  
 <author> <personname> <firstname>Osamu</firstname> <surname>Aoki</surname> </personname> <email>osamu@debian.org</email> <contrib>(updated contents)</contrib> </author>  
   
14    
15    If you want to add extra contents to this document, please do so by
16     * adding tag like &othercredit; in English and provide it for each language.
17     * add extra content within msgstr but within <footnote>...</footnote>
18    Please note there will be content checker to match tags of msgid and msgstr.
19    The second rule is a way to get exception to this rule.
20    
21    Please try to correct something in translation.  If you think contents needs fix,
22    Let's fix it in the root cause.
23    
24  <!-- BEGIN: Add othercredit for translator via po4a/maint-guide.*.patch -->  Please understand to keep this document focused.  Not everything you think important
25  <!-- END: Add othercredit for translator via po4a/maint-guide.*.patch -->  for new maintainer should be written down.  Something social needs to be elsewhere.
26  <!-- dummy -->  Some thing should be left to the practice.  Something needs to be left for exercise
27  <!-- dummy -->  for people to check official documentations.
28    -->
29    <title>Debian New Maintainers' Guide</title>
30    <bookinfo>
31    <authorgroup>
32    <!-- do not use firstname and surname tags it braks Japanese.  The same with othercredit -->
33    <author> <personname>Josip Rodin</personname> <email>joy-mg@debian.org</email> <contrib>original contents</contrib> </author>
34    <author> <personname>Osamu Aoki</personname> <email>osamu@debian.org</email> <contrib>updated contents</contrib> </author>
35    <!-- translator credits in po4a/translator.*.ent -->
36    &othercredit;
37  </authorgroup>  </authorgroup>
38  <releaseinfo>version &docversion;</releaseinfo>  <releaseinfo>version &docversion;</releaseinfo>
39  <pubdate>&docisodate;</pubdate>  <pubdate>&docisodate;</pubdate>
# Line 35  version 2 or higher. Line 49  version 2 or higher.
49  <para>  <para>
50  This document was made using with these two documents as examples:  This document was made using with these two documents as examples:
51  </para>  </para>
52    <itemizedlist>
53    <listitem>
54  <para>  <para>
55  Making a Debian Package (AKA the Debmake Manual), copyright © 1997 Jaldhar  Making a Debian Package (AKA the Debmake Manual), copyright © 1997 Jaldhar
56  Vyas.  Vyas.
57  </para>  </para>
58    </listitem>
59    <listitem>
60  <para>  <para>
61  The New-Maintainer's Debian Packaging Howto, copyright © 1997 Will Lowe.  The New-Maintainer's Debian Packaging Howto, copyright © 1997 Will Lowe.
62  </para>  </para>
63    </listitem>
64    </itemizedlist>
65  </legalnotice>  </legalnotice>
66  <!-- toc -->  <!-- toc -->
67  </bookinfo>  </bookinfo>
68  <chapter id="start"><title>Getting started The Right Way</title>  <chapter id="start"><title>Getting started The Right Way</title>
69  <para>  <para>
70  This document tries to describe building of a Debian package to the common  This document tries to describe the building of a Debian package to ordinary
71  Debian user, and the prospectus developer.  It uses pretty common language, and  Debian users and prospective developers.  It uses fairly non-technical language, and
72  it's well covered with working examples.  There is an old Roman saying,  it's well covered with working examples.  There is an old Latin saying:
73  <emphasis>Longum iter est per preaecepta, breve et efficax per  <emphasis>Longum iter est per praecepta, breve et efficax per
74  exempla!</emphasis> (It's a long way by the rules, but short and efficient with  exempla</emphasis> (It's a long way by the rules, but short and efficient with
75  examples!).  examples).
76  </para>  </para>
77  <para>  <para>
78  This document has been updated for the Debian <literal>squeeze</literal>  This document has been updated for the Debian <literal>&base-release;</literal>
79  release.  <footnote><para> The document assumes you are using the  release.
80  <literal>squeeze</literal> system.  If you need to follow this text in the  <footnote><para> The document assumes you are using a
81  <literal>lenny</literal> system, you must install backported <systemitem role="package">dpkg</systemitem> and <systemitem role="package">debhelper</systemitem> packages, at least.  </para> </footnote>  <literal>&base-release;</literal> or newer system.  If you need to follow this
82    text in an older system (including an older Ubuntu system etc.), you must
83    install backported <systemitem role="package">dpkg</systemitem> and
84    <systemitem role="package">debhelper</systemitem> packages, at least.
85    </para> </footnote>
86  </para>  </para>
87  <para>  <para>
88  One of the things that makes Debian such a top-notch distribution is its  One of the things that makes Debian such a top-notch distribution is its
89  package system.  While there is a vast quantity of software already in the  package system.  While there is a vast quantity of software already in the
90  Debian format, sometimes you need to install software that isn't.  You may be  Debian format, sometimes you need to install software that isn't.  You may be
91  wondering how you can make your own packages and perhaps you think it is a very  wondering how you can make your own packages; and perhaps you think it is a very
92  difficult task.  Well, if you are a real novice on Linux, it is hard, but if  difficult task.  Well, if you are a real novice on Linux, it is hard, but if
93  you were rookie, you wouldn't be reading this doc now.  :-) You do need to know  you were a rookie, you wouldn't be reading this document now&nbsp;:-)
94  a little about Unix programming but you certainly don't need to be a wizard.  You do need to know a little about Unix programming but you certainly
95    don't need to be a wizard.
96    <footnote><para>
97    You can learn about the basic handling of a Debian system from the
98    <ulink url="&debref;">Debian Reference</ulink>.  It contains some pointers to
99    learn about Unix programming, too.
100    </para></footnote>
101  </para>  </para>
102  <para>  <para>
103  One thing is certain, though: to properly create and maintain Debian packages  One thing is certain, though: to properly create and maintain Debian packages
104  you need many hours.  Make no mistake, for our system to work the maintainers  takes many hours.  Make no mistake, for our system to work the maintainers
105  need to be both technically competent and diligent.  need to be both technically competent and diligent.
106  </para>  </para>
107  <para>  <para>
108  This document will explain every little (at first maybe irrelevant) step, and  This document will explain every little (at first maybe irrelevant) step, and
109  help you create that first package, and to gain some experience in building  help you create that first package, and to gain some experience in building
110  next releases of that and maybe other packages later on.  the next releases of that and maybe other packages later on.
111  </para>  </para>
112  <para>  <para>
113  If you need some help on packaging, please read <xref linkend="helpme"/> .  If you need some help on packaging, please read <xref linkend="helpme"/>.
114  </para>  </para>
115  <para>  <para>
116  Newer versions of this document should always be available online at <ulink url="http://www.debian.org/doc/maint-guide/">http://www.debian.org/doc/maint-guide/</ulink>  Newer versions of this document should always be available online at
117  and in the <systemitem role="package">maint-guide</systemitem> package.  <ulink url="&maint-guide;"/> and in the
118    <systemitem role="package">maint-guide</systemitem> package.
119    The translations may be available in packages such as
120    <systemitem role="package">maint-guide-es</systemitem>.
121    Please note that this documentation may be slightly outdated.
122  </para>  </para>
123  <!--  <section id="socialdynamism"><title>Social dynamics of Debian</title>
124   Translation in [[this language]] is also available in the  <para>
125  <systemitem role="package">maint-guide-xy</systemitem> package.  Here are some observations of Debian's social dynamics, presented in the hope
126  -->  that it will prepare you for interactions with Debian.
127    </para>
128    <itemizedlist>
129    <listitem><para>We all are volunteers.</para>
130        <itemizedlist>
131        <listitem><para>You cannot impose on others what to do.</para></listitem>
132        <listitem><para>You should be motivated to do things by yourself.</para></listitem>
133        </itemizedlist></listitem>
134    <listitem><para>Friendly cooperation is the driving force.</para>
135        <itemizedlist>
136        <listitem><para>Your contribution should not overstrain others.</para></listitem>
137        <listitem><para>Your contribution is valuable only when others appreciate it.</para></listitem>
138        </itemizedlist></listitem>
139    <listitem><para>Debian is not your school where you get automatic attention of teachers.</para>
140        <itemizedlist>
141        <listitem><para>You should be able to learn many things by yourself.</para></listitem>
142        <listitem><para>Attention from other volunteers is a very scarce resource.</para></listitem>
143        </itemizedlist></listitem>
144    <listitem><para>Debian is constantly improving.</para>
145        <itemizedlist>
146        <listitem><para>You are expected to make high quality packages.</para></listitem>
147        <listitem><para>You should adapt yourself to change.</para></listitem>
148        </itemizedlist></listitem>
149    </itemizedlist>
150    <para>
151    There are several types of people interacting around Debian with different
152    roles.
153    </para>
154    <itemizedlist>
155    <listitem>
156    <para>
157    <emphasis role="strong">upstream author</emphasis>: the person who made the
158    original program.
159    </para>
160    </listitem>
161    <listitem>
162    <para>
163    <emphasis role="strong">upstream maintainer</emphasis>: the person who
164    currently maintains the program.
165    </para>
166    </listitem>
167    <listitem>
168    <para>
169    <emphasis role="strong">maintainer</emphasis>: the person making the Debian
170    package of the program.
171    </para>
172    </listitem>
173    <listitem>
174    <para>
175    <emphasis role="strong">sponsor</emphasis>: a person who helps maintainers to
176    upload packages to the official Debian package archive (after checking their
177    contents).
178    </para>
179    </listitem>
180    <listitem>
181    <para>
182    <emphasis role="strong">mentor</emphasis>: a person who helps novice
183    maintainers with packaging etc.
184    </para>
185    </listitem>
186    <listitem>
187    <para>
188    <emphasis role="strong">Debian Developer</emphasis> (DD): a member of
189    the Debian project with full upload rights to the official Debian package
190    archive.
191    </para>
192    </listitem>
193    <listitem>
194    <para>
195    <emphasis role="strong">Debian Maintainer</emphasis> (DM): a person with
196    limited upload rights to the official Debian package archive.
197    </para>
198    </listitem>
199    </itemizedlist>
200    <para>
201    Please note that you cannot become an official
202    <emphasis role="strong">Debian Developer</emphasis> (DD) overnight, because it
203    takes more than technical skill.  Please do not be discouraged by this.  If it
204    is useful to others, you can still upload your package either as a
205    <emphasis role="strong">maintainer</emphasis> through a
206    <emphasis role="strong">sponsor</emphasis> or as a
207    <emphasis role="strong">Debian Maintainer</emphasis>.
208    </para>
209    <para>
210    Please note that you do not need to create any new package to become an
211    official Debian Developer.  Contributing to the existing packages can provide a
212    path to becoming an official Debian Developer too.  There are many packages
213    waiting for good maintainers (see <xref linkend="choose"/>).
214    </para>
215    <para>
216    Since we focus only on technical aspects of packaging in this document,
217    please refer to the following to learn how Debian functions and how you can get involved.
218    </para>
219    <itemizedlist>
220    <listitem><para><ulink url="&logiciellibre;">Debian: 17 years of Free Software, "do-ocracy", and democracy</ulink> (Introductory slides) </para> </listitem>
221    <listitem><para><ulink url="&debianorghelp;">How can you help Debian?</ulink> (official) </para> </listitem>
222    <listitem><para><ulink url="&debianfaqhelp;">The Debian GNU/Linux FAQ, Chapter 13 - 'Contributing to the Debian Project'</ulink> (semi-official) </para> </listitem>
223    <listitem><para><ulink url="&debianwikihelp;">Debian Wiki, HelpDebian</ulink> (supplemental) </para> </listitem>
224    <listitem><para><ulink url="&nm-do;">Debian New Maintainer site</ulink> (official) </para> </listitem>
225    <listitem><para><ulink url="&debianmentorfaq;">Debian Mentors FAQ</ulink> (supplemental) </para> </listitem>
226    </itemizedlist>
227    </section>
228  <section id="needprogs"><title>Programs you need for development</title>  <section id="needprogs"><title>Programs you need for development</title>
229  <para>  <para>
230  Before you start anything, you should make sure that you have properly  Before you start anything, you should make sure that you have properly
# Line 101  doesn't contain any packages marked <lit Line 236  doesn't contain any packages marked <lit
236  The following packages come with the standard Debian installation, so you  The following packages come with the standard Debian installation, so you
237  probably have them already (along with any additional packages they depend on).  probably have them already (along with any additional packages they depend on).
238  Still, you should check it with <literal>aptitude show  Still, you should check it with <literal>aptitude show
239  <replaceable>package</replaceable></literal>.  <replaceable>package</replaceable></literal>
240    or with <literal>dpkg -s <replaceable>package</replaceable></literal>.
241  </para>  </para>
242  <para>  <para>
243  The most important package to install on your development system is the  The most important package to install on your development system is the
244  <systemitem role="package">build-essential</systemitem> package.  Once you try  <systemitem role="package">build-essential</systemitem> package.  Once you try
245  to install it, it will <emphasis>pull in</emphasis> other packages required to  to install that, it will <emphasis>pull in</emphasis> other packages required to
246  have a basic build environment.  have a basic build environment.
247  </para>  </para>
248  <para>  <para>
249  For some types of packages, that is all you will require, however there is  For some types of packages, that is all you will require; however, there is
250  another set of packages that while not essential for all package builds are  another set of packages that while not essential for all package builds are
251  useful to have install or may be required by your package:  useful to have installed or may be required by your package:
252  </para>  </para>
253  <itemizedlist>  <itemizedlist>
254  <listitem>  <listitem>
255  <para>  <para>
256  <systemitem role="package">file</systemitem> - this handy program can determine  <systemitem role="package">autoconf</systemitem>, <systemitem
257  what type a file is.  (see <citerefentry> <refentrytitle>file</refentrytitle>  role="package">automake</systemitem>, and <systemitem
258  <manvolnum>1</manvolnum> </citerefentry>)  role="package">autotools-dev</systemitem> - many newer programs use configure
259  </para>  scripts and <filename>Makefile</filename> files preprocessed with the help of
260  </listitem>  programs like these (see <literal>info autoconf</literal>, <literal>info
261  <listitem>  automake</literal>).  <systemitem role="package">autotools-dev</systemitem>
262  <para>  keeps up-to-date versions of certain auto files and has documentation about the
263  <systemitem role="package">patch</systemitem> - this very useful utility will  best way to use those files.
 take a file containing a difference listing (produced by the  
 <command>diff</command> program) and apply it to the original file, producing a  
 patched version.  (see <citerefentry> <refentrytitle>patch</refentrytitle>  
 <manvolnum>1</manvolnum> </citerefentry>)  
264  </para>  </para>
265  </listitem>  </listitem>
266  <listitem>  <listitem>
267  <para>  <para>
268  <systemitem role="package">perl</systemitem> - Perl is one of the most used  <systemitem role="package">debhelper</systemitem> and
269  interpreted scripting languages on today's Unix-like systems, often referred to  <systemitem role="package">dh-make</systemitem> -
270  as Unix's Swiss Army Chainsaw.  (see <citerefentry>  <systemitem role="package">dh-make</systemitem> is necessary to create
271  <refentrytitle>perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)  the skeleton of our example package, and it will use some of the
272    <systemitem role="package">debhelper</systemitem> tools for creating
273    packages.  They are not essential for this purpose, but are
274    <emphasis>highly</emphasis> recommended for new maintainers.  It makes
275    the whole process very much easier to start, and to control afterwards.
276    (See <citerefentry> <refentrytitle>dh_make</refentrytitle>
277    <manvolnum>1</manvolnum> </citerefentry>, <citerefentry>
278    <refentrytitle>debhelper</refentrytitle> <manvolnum>1</manvolnum>
279    </citerefentry>.) <footnote><para> There are also some more specialized
280    but similar packages such as
281    <systemitem role="package">dh-make-perl</systemitem>,
282    <systemitem role="package">dh-make-php</systemitem>, etc.  </para>
283    </footnote>
284  </para>  </para>
285  </listitem>  </listitem>
286  <listitem>  <listitem>
287  <para>  <para>
288  <systemitem role="package">python</systemitem> - Python is another of the most  <systemitem role="package">devscripts</systemitem> - this package contains some
289  used interpreted scripting languages on the Debian system that combines  useful scripts that can be helpful for maintainers, but they are also
290  remarkable power with very clear syntax.  (see <citerefentry>  not necessary for building packages.  Packages recommended and suggested
291  <refentrytitle>python</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)  by this package are worth looking into.  (See <ulink url="&devscripts-readme;"/>.)
292  </para>  </para>
293  </listitem>  </listitem>
294  <listitem>  <listitem>
295  <para>  <para>
296  <systemitem role="package">autoconf</systemitem>, <systemitem role="package">automake</systemitem> and <systemitem role="package">autotools-dev</systemitem> - many newer programs use configure  <systemitem role="package">fakeroot</systemitem> - this utility lets you
297  scripts and <filename>Makefile</filename> files preprocessed with help of  emulate being root which is necessary for some parts of the build process.
298  programs like these.  (see <literal>info autoconf</literal>, <literal>info  (See <citerefentry> <refentrytitle>fakeroot</refentrytitle>
299  automake</literal>).  The <systemitem role="package">autotools-dev</systemitem>  <manvolnum>1</manvolnum> </citerefentry>.)
 keeps up-to-date versions of certain auto files and has documentation about the  
 best way to use those files.  
300  </para>  </para>
301  </listitem>  </listitem>
302  <listitem>  <listitem>
303  <para>  <para>
304  <systemitem role="package">dh-make</systemitem> and <systemitem role="package">debhelper</systemitem> - <systemitem role="package">dh-make</systemitem> is necessary to create the skeleton of our  <systemitem role="package">file</systemitem> - this handy program can determine
305  example package, and it will use some of the <systemitem role="package">debhelper</systemitem> tools for creating packages.  They are  what type a file is.  (See <citerefentry> <refentrytitle>file</refentrytitle>
306  not essential for creation of packages, but are <emphasis>highly</emphasis>  <manvolnum>1</manvolnum> </citerefentry>.)
 recommended for new maintainers.  It makes the whole process very much easier  
 to start, and control afterwards.  (see <citerefentry>  
 <refentrytitle>dh_make</refentrytitle> <manvolnum>1</manvolnum>  
 </citerefentry>, <citerefentry> <refentrytitle>debhelper</refentrytitle>  
 <manvolnum>1</manvolnum> </citerefentry>,  
 <filename>/usr/share/doc/debhelper/README</filename>) <footnote><para> There  
 are few similar but specialized packages such as <systemitem role="package">dh-make-perl</systemitem>, <systemitem role="package">dh-make-php</systemitem>, etc.  </para> </footnote>  
307  </para>  </para>
308  </listitem>  </listitem>
309  <listitem>  <listitem>
310  <para>  <para>
311  <systemitem role="package">devscripts</systemitem> - this package contains some  <systemitem role="package">gfortran</systemitem> - the GNU Fortran 95 compiler,
312  nice and useful scripts that can be helpful to the maintainers, but they are  necessary if your program is written in Fortran.  (See <citerefentry>
313  also not necessary for building packages.  Packages recommended and suggested  <refentrytitle>gfortran</refentrytitle> <manvolnum>1</manvolnum>
314  by this package are worth looking into.  (see  </citerefentry>.)
 <filename>/usr/share/doc/devscripts/README.gz</filename>)  
315  </para>  </para>
316  </listitem>  </listitem>
317  <listitem>  <listitem>
318  <para>  <para>
319  <systemitem role="package">fakeroot</systemitem> - this utility lets you  <systemitem role="package">git</systemitem> - this package provides a popular
320  emulate being root which is necessary for some parts of the build process.  version control system designed to handle very large projects with speed and
321  (see <citerefentry> <refentrytitle>fakeroot</refentrytitle>  efficiency; it is used for many high profile open source projects, most notably
322  <manvolnum>1</manvolnum> </citerefentry>)  the Linux kernel.  (See <citerefentry> <refentrytitle>git</refentrytitle>
323    <manvolnum>1</manvolnum> </citerefentry>,
324    <ulink url="&git-doc;">git Manual</ulink>.)
325  </para>  </para>
326  </listitem>  </listitem>
327  <listitem>  <listitem>
# Line 193  emulate being root which is necessary fo Line 329  emulate being root which is necessary fo
329  <systemitem role="package">gnupg</systemitem> - a tool that enables you to  <systemitem role="package">gnupg</systemitem> - a tool that enables you to
330  digitally <emphasis>sign</emphasis> packages.  This is especially important if  digitally <emphasis>sign</emphasis> packages.  This is especially important if
331  you want to distribute it to other people, and you will certainly be doing that  you want to distribute it to other people, and you will certainly be doing that
332  when your work gets included in the Debian distribution.  (see <citerefentry>  when your work gets included in the Debian distribution.  (See <citerefentry>
333  <refentrytitle>gpg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>)  <refentrytitle>gpg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
 </para>  
 </listitem>  
 <listitem>  
 <para>  
 <systemitem role="package">gfortran</systemitem> - the GNU Fortran 95 compiler,  
 necessary if your program is written in Fortran.  (see <citerefentry>  
 <refentrytitle>gfortran</refentrytitle> <manvolnum>1</manvolnum>  
 </citerefentry>)  
334  </para>  </para>
335  </listitem>  </listitem>
336  <listitem>  <listitem>
# Line 210  necessary if your program is written in Line 338  necessary if your program is written in
338  <systemitem role="package">gpc</systemitem> - the GNU Pascal compiler,  <systemitem role="package">gpc</systemitem> - the GNU Pascal compiler,
339  necessary if your program is written in Pascal.  Worthy of note here is  necessary if your program is written in Pascal.  Worthy of note here is
340  <systemitem role="package">fp-compiler</systemitem>, the Free Pascal Compiler,  <systemitem role="package">fp-compiler</systemitem>, the Free Pascal Compiler,
341  which is also good at this task.  (see <citerefentry>  which is also good at this task.  (See <citerefentry>
342  <refentrytitle>gpc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>,  <refentrytitle>gpc</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>,
343  <citerefentry> <refentrytitle>ppc386</refentrytitle> <manvolnum>1</manvolnum>  <citerefentry> <refentrytitle>ppc386</refentrytitle>
344  </citerefentry>)  <manvolnum>1</manvolnum> </citerefentry>.)
 </para>  
 </listitem>  
 <listitem>  
 <para>  
 <systemitem role="package">xutils-dev</systemitem> - some programs, usually  
 those made for X11, also use these programs to generate  
 <filename>Makefile</filename> files from sets of macro functions.  (see  
 <citerefentry> <refentrytitle>imake</refentrytitle> <manvolnum>1</manvolnum>  
 </citerefentry>, <citerefentry> <refentrytitle>xmkmf</refentrytitle>  
 <manvolnum>1</manvolnum> </citerefentry>)  
345  </para>  </para>
346  </listitem>  </listitem>
347  <listitem>  <listitem>
348  <para>  <para>
349  <systemitem role="package">lintian</systemitem> - this is the Debian package  <systemitem role="package">lintian</systemitem> - this is the Debian package
350  checker that can let you know of any common mistakes after you build the  checker, which can let you know of any common mistakes after you build the
351  package, and explains the errors found.  (see <citerefentry>  package, and explains the errors found.  (See <citerefentry>
352  <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum>  <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum>
353  </citerefentry>,  </citerefentry>,
354  <filename>/usr/share/doc/lintian/lintian.html/index.html</filename>)  <ulink url="&lintian-doc;">Lintian User's Manual</ulink>.)
355  </para>  </para>
356  </listitem>  </listitem>
357  <listitem>  <listitem>
358  <para>  <para>
359  <systemitem role="package">pbuilder</systemitem> - this package contains  <systemitem role="package">patch</systemitem> - this very useful utility will
360  programs which are used for creating and maintaining <command>chroot</command>  take a file containing a difference listing (produced by the
361  environment.  Building Debian package in this <command>chroot</command>  <command>diff</command> program) and apply it to the original file, producing a
362  environment verifies the proper build dependency and avoid FTBFS (Fails To  patched version.  (See <citerefentry> <refentrytitle>patch</refentrytitle>
363  Build From Source) bugs.  (see <citerefentry>  <manvolnum>1</manvolnum> </citerefentry>.)
 <refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum>  
 </citerefentry> and <citerefentry> <refentrytitle>pdebuild</refentrytitle>  
 <manvolnum>1</manvolnum> </citerefentry>)  
364  </para>  </para>
365  </listitem>  </listitem>
366  <listitem>  <listitem>
# Line 257  utilities to work with patches such as t Line 372  utilities to work with patches such as t
372  </listitem>  </listitem>
373  <listitem>  <listitem>
374  <para>  <para>
375  <systemitem role="package">quilt</systemitem> - this package helps you to  <systemitem role="package">pbuilder</systemitem> - this package contains
376  manage a series of patches by keeping track of the changes each of them makes.  programs which are used for creating and maintaining <command>chroot</command>
377  They are logically organized as a stack, and you can apply (=push), un-apply  environment.  Building Debian package in this <command>chroot</command>
378  (=pop), refresh them easily by traveling into the stack.  (see <citerefentry>  environment verifies the proper build dependency and avoid FTBFS (Fails To
379  <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>,  Build From Source) bugs.  (see <citerefentry>
380  <filename>/usr/share/doc/quilt/README.Debian</filename>)  <refentrytitle>pbuilder</refentrytitle> <manvolnum>8</manvolnum>
381  </para>  </citerefentry> and <citerefentry> <refentrytitle>pdebuild</refentrytitle>
382  </listitem>  <manvolnum>1</manvolnum> </citerefentry>)
 <listitem>  
 <para>  
 <systemitem role="package">git</systemitem> - this package provides popular  
 version control system designed to handle very large projects with speed and  
 efficiency; it is used for many high profile open source projects, most notably  
 the Linux kernel.  (see <citerefentry> <refentrytitle>git</refentrytitle>  
 <manvolnum>1</manvolnum> </citerefentry>,  
 <filename>/usr/share/doc/git-doc/index.html</filename>)  
383  </para>  </para>
384  </listitem>  </listitem>
 </itemizedlist>  
 <para>  
 The following is the <emphasis>very important</emphasis> documentation which  
 you should read along with this document:  
 </para>  
 <itemizedlist>  
385  <listitem>  <listitem>
386  <para>  <para>
387  <systemitem role="package">debian-policy</systemitem> - the <ulink url="http://www.debian.org/doc/devel-manuals#policy">Debian Policy  <systemitem role="package">perl</systemitem> - Perl is one of the most used
388  Manual</ulink> includes explanations of the structure and contents of the  interpreted scripting languages on today's Unix-like systems, often referred to
389  Debian archive, several OS design issues, the Filesystem Hierarchy Standard  as Unix's Swiss Army Chainsaw. (See <citerefentry>
390  (which says where each file and directory should be) etc.  For you, the most  <refentrytitle>perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
 important thing is that it describes requirements that each package must  
 satisfy to be included in the distribution (see  
 <filename>&debian-policy;</filename>).  
391  </para>  </para>
392  </listitem>  </listitem>
393  <listitem>  <listitem>
394  <para>  <para>
395  <systemitem role="package">developers-reference</systemitem> - the <ulink url="http://www.debian.org/doc/devel-manuals#devref">Debian Developer's  <systemitem role="package">python</systemitem> - Python is another of the most
396  Reference</ulink> describes all matters not specifically about the technical  used interpreted scripting languages on the Debian system, combining
397  details of packaging, like the structure of the archive, how to rename, orphan,  remarkable power with very clear syntax. (See <citerefentry>
398  pick up packages, how to do NMUs, how to manage bugs, best packaging practices,  <refentrytitle>python</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.)
 when and where to upload etc.  (see  
 <filename>&developers-reference;</filename>).  
399  </para>  </para>
400  </listitem>  </listitem>
401  <listitem>  <listitem>
402  <para>  <para>
403  <ulink url="http://www.lrde.epita.fr/~adl/autotools.html">Autotools  <systemitem role="package">quilt</systemitem> - this package helps you to
404  Tutorial</ulink> provides very good tutorial for <ulink url="http://en.wikipedia.org/wiki/GNU_build_system">the GNU Build System known  manage large numbers of patches by keeping track of the changes each patch
405  as the GNU Autotools</ulink> whose most important components are Autoconf,  makes. Patches can be applied, un-applied, refreshed, and more.  (See
406  Automake, Libtool, and gettext.  <citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum></citerefentry>,
407    <ulink url="&quilt-pdf;">quilt.pdf</ulink>.)
408  </para>  </para>
409  </listitem>  </listitem>
410  <listitem>  <listitem>
411  <para>  <para>
412  <systemitem role="package">gnu-standards</systemitem> - this package contains  <systemitem role="package">xutils-dev</systemitem> - some programs, usually
413  two pieces of documentation from the GNU project: <ulink url="http://www.gnu.org/prep/standards/html_node/index.html">GNU Coding  those made for X11, also use these programs to generate
414  Standards</ulink>, and <ulink url="http://www.gnu.org/prep/maintain/html_node/index.html">Information for  <filename>Makefile</filename> files from sets of macro functions.  (See
415  Maintainers of GNU Software</ulink>.  Although Debian does not require these to  <citerefentry> <refentrytitle>imake</refentrytitle> <manvolnum>1</manvolnum>
416  be followed, these are still helpful as guidelines and common sense.  (see  </citerefentry>, <citerefentry> <refentrytitle>xmkmf</refentrytitle>
417  <filename>/usr/share/doc/gnu-standards/standards.html</filename> and  <manvolnum>1</manvolnum> </citerefentry>.)
 <filename>/usr/share/doc/gnu-standards/maintain.html</filename>).  
418  </para>  </para>
419  </listitem>  </listitem>
420  </itemizedlist>  </itemizedlist>
421  <para>  <para>
 If this document contradicts with what the Debian Policy Manual and Debian  
 Developer's Reference describes, they are correct.  Please file a bug report on  
 the <systemitem role="package">maint-guide</systemitem> package.  
 </para>  
 <para>  
422  The short descriptions that are given above only serve to introduce you to what  The short descriptions that are given above only serve to introduce you to what
423  each package does.  Before continuing please thoroughly read the documentation  each package does.  Before continuing please thoroughly read the documentation
424  of each program, at least, for the standard usage.  It may seem like heavy  of each program, at least, for the standard usage.  It may seem like heavy
425  going now, but later on you'll be <emphasis>very</emphasis> glad you read it.  going now, but later on you'll be <emphasis>very</emphasis> glad you read it.
426  </para>  </para>
427    <para>
428    If you have specific questions later, I would suggest re-reading the documents
429    mentioned above.  Since this is a tutorial, I have intentionally skipped
430    details and provided only pointers to keep it simple.
431    </para>
432  </section>  </section>
433  <section id="terminology"><title>Basic terminology</title>  <section id="needdocs"><title>Documentation needed for development</title>
434  <para>  <para>
435  There are two types of packages.  The following is the <emphasis>very important</emphasis> documentation which
436    you should read along with this document:
437  </para>  </para>
438  <itemizedlist>  <itemizedlist>
439  <listitem>  <listitem>
440  <para>  <para>
441  <emphasis role="strong">source package</emphasis>: A source package is a set of  <ulink url="&autotools-tutorial;">Autotools
442  files which contain code and data which you can compile and process into  Tutorial</ulink> provides a very good tutorial for <ulink url="&gnu-build-system;">the GNU Build System known
443  execution programs and formatted documents.  It usually comes as a combination  as the GNU Autotools</ulink> whose most important components are Autoconf,
444  of <filename>*.orig.tar.gz</filename>, <filename>*.debian.tar.gz</filename> (or  Automake, Libtool, and gettext.
 <filename>*.diff.gz</filename>), and <filename>*.dsc</filename>.  Some other  
 archive and compression methods may be used, too.  
445  </para>  </para>
446  </listitem>  </listitem>
447  <listitem>  <listitem>
448  <para>  <para>
449  <emphasis role="strong">binary package</emphasis>: A binary package contains  <systemitem role="package">debian-policy</systemitem> - the <ulink url="&debian-policy;">Debian Policy
450  execution programs and formatted documents.  It usually comes as  Manual</ulink> includes explanations of the structure and contents of the
451  <filename>*.deb</filename> for the normal Debian system and as  Debian archive, several OS design issues, the <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink>
452  <filename>*.udeb</filename> for the Debian Installer.  (FHS, which says where each file and directory should be), etc.  For you, the most
453    important thing is that it describes requirements that each package must
454    satisfy to be included in the distribution (see the local copies of
455    <ulink url="&policy-pdf;">policy.pdf</ulink> and <ulink url="&fhs-pdf;">fhs-2.3.pdf</ulink>).
456  </para>  </para>
457  </listitem>  </listitem>
 </itemizedlist>  
 <para>  
 Don't mix terms like source of the program and the source package of the  
 program!  
 </para>  
 <para>  
 There are several role names used around Debian.  
 </para>  
 <itemizedlist>  
458  <listitem>  <listitem>
459  <para>  <para>
460  <emphasis role="strong">upstream author</emphasis>: The person who made the  <systemitem role="package">developers-reference</systemitem>
461  original program.  - the <ulink url="&developers-reference;">Debian Developer's Reference</ulink>
462    describes all matters not specifically about the technical
463    details of packaging, like the structure of the archive, how to rename, orphan,
464    or adopt packages, how to do NMUs, how to manage bugs, best packaging practices,
465    when and where to upload etc.  (See the local copy of
466    <ulink url="&developers-refpdf;">developers-reference.pdf</ulink>.)
467  </para>  </para>
468  </listitem>  </listitem>
469  <listitem>  <listitem>
470  <para>  <para>
471  <emphasis role="strong">upstream maintainer</emphasis>: The person who  <systemitem role="package">gnu-standards</systemitem> - this package contains
472  currently maintains the program.  two pieces of documentation from the GNU project:
473    <ulink url="&gnu-standard;">GNU Coding Standards</ulink>, and
474    <ulink url="&gnu-maintainer;">Information for Maintainers of GNU Software</ulink>.
475    Although Debian does not require these to
476    be followed, these are still helpful as guidelines and common sense.
477    (See the local copies of
478    <ulink url="&gnu-standard-pdf;">standards.pdf</ulink> and
479    <ulink url="&gnu-maintainer-pdf;">maintain.pdf</ulink>.)
480  </para>  </para>
481  </listitem>  </listitem>
482    </itemizedlist>
483    <para>
484    If this document contradicts any of the documents mentioned above, they
485    are correct.  Please file a bug report on the
486    <systemitem role="package">maint-guide</systemitem> package using
487    <command>reportbug</command>.
488    </para>
489    </section>
490    <section id="helpme"><title>Where to ask for help</title>
491    <para>
492    Before you decide to ask your question in some public place, please read the fine documentation.
493    </para>
494    <itemizedlist>
495  <listitem>  <listitem>
496  <para>  <para>
497  <emphasis role="strong">maintainer</emphasis>: The person who makes Debian  files in <filename>/usr/share/doc/<replaceable>package</replaceable></filename> for all pertinent packages
 package of the program.  
498  </para>  </para>
499  </listitem>  </listitem>
500  <listitem>  <listitem>
501  <para>  <para>
502  <emphasis role="strong">sponsor</emphasis>: The person who helps maintainers to  contents of <literal><command>man</command> <replaceable>command</replaceable></literal> for all pertinent commands
 upload packages to the official Debian Package Archive after checking their  
 contents.  
503  </para>  </para>
504  </listitem>  </listitem>
505  <listitem>  <listitem>
506  <para>  <para>
507  <emphasis role="strong">mentor</emphasis>: The person who helps novice  contents of <literal><command>info</command> <replaceable>command</replaceable></literal> for all pertinent commands
 maintainers on packaging etc.  
508  </para>  </para>
509  </listitem>  </listitem>
510  <listitem>  <listitem>
511  <para>  <para>
512  <emphasis role="strong">Debian Developer</emphasis> (DD): The person who is a  contents of <ulink url="&debian-mentors-ldo;">debian-mentors@lists.debian.org mailing list archive</ulink>
 member of Debian.  He has full upload right to the official Debian Package  
 Archive.  
513  </para>  </para>
514  </listitem>  </listitem>
515  <listitem>  <listitem>
516  <para>  <para>
517  <emphasis role="strong">Debian Maintainer</emphasis> (DM): The person who has  contents of <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org mailing list archive</ulink>
 limited upload right to the official Debian Package Archive.  
518  </para>  </para>
519  </listitem>  </listitem>
520  </itemizedlist>  </itemizedlist>
521  <para>  <para>
522  There are several version names used around Debian.  You can use web search engines more effectively by including search strings
523    such as <literal>site:lists.debian.org</literal> to limit the domain.
524  </para>  </para>
 <itemizedlist>  
 <listitem>  
525  <para>  <para>
526  <emphasis role="strong">upstream source version</emphasis>: The upstream source  Making a small test package is a good way to learn details of packaging.
527  version is referred as <literal><replaceable>version</replaceable></literal>.  Inspecting existing well maintained packages is the best way to learn how other
528    people make packages.
529  </para>  </para>
 </listitem>  
 <listitem>  
530  <para>  <para>
531  <emphasis role="strong">Debian revision</emphasis>: The revision by Debian on  If you still have questions about packaging that you couldn't find answers to
532  package is referred as <literal><replaceable>revision</replaceable></literal>.  in the available documentation and web resources, you can ask them interactively.
533  </para>  </para>
534  </listitem>  <itemizedlist>
535  <listitem>  <listitem>
536  <para>  <para>
537  <emphasis role="strong">Debian package version</emphasis>: The Debian package  <ulink url="&debian-mentors-ldo;">debian-mentors@lists.debian.org mailing list</ulink>. (This mailing list is for the novice.)
 version is referred as the following.  
538  </para>  </para>
539  <itemizedlist>  </listitem>
540  <listitem>  <listitem>
541  <para>  <para>
542  <literal><replaceable>version</replaceable></literal> for the native Debian  <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org mailing list</ulink>. (This mailing list is for the expert.)
 binary package and for the Debian source package.  
543  </para>  </para>
544  </listitem>  </listitem>
545  <listitem>  <listitem>
546  <para>  <para>
547  <literal><replaceable>version</replaceable>-<replaceable>revision</replaceable></literal>  <ulink url="&irc-debian;">IRC</ulink> such as <literal>#debian-mentors</literal>.
 for the non-native Debian binary package.  
548  </para>  </para>
549  </listitem>  </listitem>
550  </itemizedlist>  </itemizedlist>
 </listitem>  
 </itemizedlist>  
 <para>  
 Please read the other manuals if you need more details on terminology.  
 </para>  
 </section>  
 <section id="debiandeveloper"><title>Official Debian Developer</title>  
 <para>  
 You can not become an official <emphasis role="strong">Debian  
 Developer</emphasis> (DD) over night because it takes more than technical  
 skill.  Please do not be discouraged by this.  If it is useful to others, you  
 can still upload your package either as a <emphasis role="strong">maintainer</emphasis> through a <emphasis role="strong">sponsor</emphasis> or as a <emphasis role="strong">Debian  
 Maintainer</emphasis>.  See <ulink url="&newmaint;">Debian New  
 Maintainers</ulink> for more.  
 </para>  
 <para>  
 Please note that you do not need to create any new package to become an  
 official Debian Developer.  Contributing to the existing packages can provide a  
 path to become an official Debian Developer too.  There are many packages  
 waiting for good maintainers (see <xref linkend="choose"/> ).  
 </para>  
 </section>  
 <section id="helpme"><title>Where to ask for help</title>  
 <!--  
  /usr/share/doc/debian is used be doc-debian and debian-faq  
 -->  
 <para>  
 Before you decide to ask your question in some public place, please just RTFM.  
 That includes documentation in <filename>/usr/share/doc/dpkg</filename>,  
 <filename>/usr/share/doc/debian</filename>,  
 <filename>&autotools-dev;</filename>,  
 <filename>/usr/share/doc/<replaceable>package</replaceable>/*</filename> files  
 and the <command>man</command>/<command>info</command> pages for all the  
 programs mentioned in this document.  See all the information at <ulink url="&nm-home;">&nm-home;</ulink>.  
 </para>  
551  <para>  <para>
552  Making a small test package is good way to learn details of packaging.  The more experienced Debian developers will gladly help you, if you ask
553  Inspecting existing well maintained packages is the best way to learn how other  properly after making your required efforts.
 people make packages.  
 </para>  
 <para>  
 If you still have questions about packaging that you couldn't find answers to  
 in the available documentation and web resources, you can ask them on the  
 Debian Mentors' mailing list at <ulink url="http://lists.debian.org/debian-mentors/">debian-mentors@lists.debian.org</ulink>.  
 The more experienced Debian developers will gladly help you, but do read at  
 least some of the documentation before asking a question!  
 </para>  
 <para>  
 See <ulink url="http://lists.debian.org/debian-mentors/">http://lists.debian.org/debian-mentors/</ulink>  
 for more information about this mailing list.  
554  </para>  </para>
555  <para>  <para>
556  When you receive a bug report (yes, actual bug reports!), you will know that it  When you receive a bug report (yes, actual bug reports!), you will know that it
557  is time for you to dig into the <ulink url="http://www.debian.org/Bugs/">Debian  is time for you to dig into the
558  Bug Tracking System</ulink> and read the documentation there, to be able to  <ulink url="&bts;">Debian Bug Tracking System</ulink>
559  deal with the reports efficiently.  I highly recommend reading the <ulink url="http://www.debian.org/doc/manuals/developers-reference/pkgs.html#bug-handling">Developer's  and read the documentation there, to be able to
560  Reference, 5.8.  'Handling bugs'</ulink>.  deal with the reports efficiently.  I highly recommend reading the
561  </para>  <ulink url="&devref-bug-handling;">Debian Developer's Reference, 5.8:
562  <para>  "Handling bugs"</ulink>.
 If you still have questions, ask on the Debian Developers' mailing list at  
 <ulink url="http://lists.debian.org/debian-devel/">debian-devel@lists.debian.org</ulink>.  
 See <ulink url="http://lists.debian.org/debian-devel/">http://lists.debian.org/debian-devel/</ulink>  
 for more information about this mailing list.  
563  </para>  </para>
564  <para>  <para>
565  Even if it all worked well, it's time to start praying.  Why?  Because in just  Even if it all worked well, it's time to start praying.  Why?  Because in just
# Line 526  documentation</emphasis> for details). Line 577  documentation</emphasis> for details).
577  </chapter>  </chapter>
578  <chapter id="first"><title>First steps</title>  <chapter id="first"><title>First steps</title>
579  <para>  <para>
580  Let's try to make your own package (or, better even, adopt an existing one).  Let's start by creating a package of your own (or, even better,
581    adopting an existing one).
582  </para>  </para>
 <section id="choose"><title>Choose your program</title>  
583  <para>  <para>
584  You have probably chosen the package you want to create.  The first thing you  The Debian package building involves generating several specifically named
585  need to do is check if the package is in the distribution archive already by  files for each step as the following.
586  using <command>aptitude</command>.  </para>
587    <itemizedlist>
588    <listitem>
589    <para>We obtain an upstream program file usually in a compressed tar format.</para>
590      <itemizedlist>
591      <listitem><literal><replaceable>programname</replaceable>-<replaceable>version</replaceable>.tar.gz</literal></listitem>
592      </itemizedlist>
593    </listitem>
594    <listitem>
595    <para>
596    We create an Debian source package, which reffers to the set of input files for
597    the Debian package building, by adding Debian package modifications to the upstream program.
598  </para>  </para>
599      <itemizedlist>
600      <listitem><literal><replaceable>programname</replaceable>_<replaceable>version</replaceable>.orig.tar.gz</literal></listitem>
601      <listitem><literal><replaceable>programname</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.debian.tar.gz</literal></listitem>
602      <listitem><literal><replaceable>programname</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.dsc</literal></listitem>
603      </itemizedlist>
604    </listitem>
605    <listitem>
606  <para>  <para>
607  You can also check package information through <ulink url="http://www.debian.org/distrib/packages">package search page</ulink> and  We build Debian binary packages, which are ordinary installable package files in <literal>.deb</literal> format (or <literal>.udeb</literal> format, used by the Debian Installer), from the Debian source package.
 <ulink url="http://packages.qa.debian.org/common/index.html">Debian Package  
 Tracking System</ulink>.  
608  </para>  </para>
609      <itemizedlist>
610      <listitem><literal><replaceable>programname</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.deb</literal></listitem>
611      </itemizedlist>
612    </listitem>
613    </itemizedlist>
614  <para>  <para>
615  If the package already exists, well, install it!  :-) If it happens to be  In the above file names,
616  <emphasis role="strong">orphaned</emphasis> -- if its maintainer is set to  <literal><replaceable>programname</replaceable></literal> is substituted by the
617  <ulink url="http://qa.debian.org/">Debian QA Group</ulink>, you may be able to  <emphasis role="strong">package name</emphasis>,
618  pick it up if it's still available (check the ownership status at <ulink url="http://bugs.debian.org/wnpp">Debian Bug report logs: Bugs in package wnpp  <literal><replaceable>version</replaceable></literal> is substituted by the
619  in unstable</ulink>).  You may also adopt a package for which the corresponding  <emphasis role="strong">upstream version</emphasis>, and
620  maintainer has filed a Request for Adoption (<emphasis role="strong">RFA</emphasis>).  <literal><replaceable>revision</replaceable></literal> is substituted by the
621    <emphasis role="strong">Debian revision</emphasis>.
622    <footnote><para>
623    The <emphasis role="strong">package name</emphasis>, <emphasis
624    role="strong">upstream version</emphasis>, and <emphasis role="strong">Debian
625    revision</emphasis> must be adjusted to comply with the Debian Policy Manual:
626    <ulink url="&policy-source;">5.6.1 Source</ulink>,
627    <ulink url="&policy-package;">5.6.7 Package</ulink>, and
628    <ulink url="&policy-version;">5.6.12 Version</ulink>.
629    </para></footnote>
630  </para>  </para>
631  <para>  <para>
632  Several different views of orphaned or RFA'ed packages are available at:  You should chose the <emphasis role="strong">package name</emphasis>
633    which consists only of lower case letters (<literal>a-z</literal>), digits
634    (<literal>0-9</literal>), plus (<literal>+</literal>) and minus
635    (<literal>-</literal>) signs, and periods (<literal>.</literal>). They must be
636    at least two characters long and must start with an alphanumeric character.
637  </para>  </para>
 <itemizedlist>  
 <listitem>  
638  <para>  <para>
639  <ulink url="http://www.debian.org/devel/wnpp/">Work-Needing and Prospective  You should use the <emphasis role="strong">upstream version</emphasis> and the
640  Packages</ulink>  <emphasis role="strong">Debian revision</emphasis> which consists only of
641    alphanumerics (<literal>a-zA-Z0-9</literal>), plus (<literal>+</literal>),
642    tilde (<literal>~</literal>), and periods (<literal>.</literal>). They must
643    start with a digit (<literal>0-9</literal>).
644  </para>  </para>
645  </listitem>  <section id="choose"><title>Choose your program</title>
 <listitem>  
646  <para>  <para>
647  <ulink url="http://wnpp.debian.net/">Debian Packages that Need Lovin'</ulink>  You have probably chosen the package you want to create.  The first thing you
648    need to do is check if the package is in the distribution archive already by
649    using the following.
650  </para>  </para>
651    <itemizedlist>
652    <listitem>
653    <para>the <command>aptitude</command> command</para>
654  </listitem>  </listitem>
655  <listitem>  <listitem>
656    <para>the <ulink url="&packages-do;">Debian packages</ulink> web page</para>
657    </listitem>
658    <listitem>
659    <para>the <ulink url="&packages-qa-do;">Debian Package Tracking System</ulink> web page</para>
660    </listitem>
661    </itemizedlist>
662    <para>
663    If the package already exists, well, install it!  :-) If it happens to be
664    <emphasis role="strong">orphaned</emphasis> (that is, if its
665    maintainer is set to <ulink url="&qa-do;">Debian QA Group</ulink>),
666    you may be able to pick it up if it's still available.  You may also
667    adopt a package whose maintainer has filed a Request for Adoption
668    (<emphasis role="strong">RFA</emphasis>).<footnote> <para>See
669    <ulink url="&devref-adopt;">Debian Developer's Reference 5.9.5.
670    "Adopting a package"</ulink>.</para> </footnote>
671    </para>
672  <para>  <para>
673  <ulink url="http://members.hellug.gr/serzan/wnpp/">Browse WNPP bugs based on  There are several package ownership status resources.
 debtags</ulink>  
674  </para>  </para>
675    <itemizedlist>
676    <listitem>
677    <para> <ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> </para>
678    </listitem>
679    <listitem>
680    <para> <ulink url="&wnpp-bts;">Debian Bug report logs: Bugs in pseudo-package <systemitem role="package">wnpp</systemitem> in <literal>unstable</literal></ulink> </para>
681    </listitem>
682    <listitem>
683    <para> <ulink url="&wnpp-dn;">Debian Packages that Need Lovin'</ulink> </para>
684    </listitem>
685    <listitem>
686    <para> <ulink url="&wnpp-debtags;">Browse <systemitem role="package">wnpp</systemitem> bugs based on debtags</ulink> </para>
687  </listitem>  </listitem>
688  </itemizedlist>  </itemizedlist>
689  <para>  <para>
# Line 575  for most kinds of programs, and the numb Line 692  for most kinds of programs, and the numb
692  archive is much larger than that of contributors with upload rights.  Thus,  archive is much larger than that of contributors with upload rights.  Thus,
693  contributions to packages already in the archive are far more appreciated (and  contributions to packages already in the archive are far more appreciated (and
694  more likely to receive sponsorship) by other developers <footnote><para> Having  more likely to receive sponsorship) by other developers <footnote><para> Having
695  said that, there will of course always be new programs that are worthwhile  said that, there will of course always be new programs that are worth
696  packaging.  </para> </footnote>.  You can do that in various ways.  packaging.  </para> </footnote>.  You can contribute in various ways.
697  </para>  </para>
698  <itemizedlist>  <itemizedlist>
699  <listitem>  <listitem>
# Line 586  taking over orphaned, yet actively used, Line 703  taking over orphaned, yet actively used,
703  </listitem>  </listitem>
704  <listitem>  <listitem>
705  <para>  <para>
706  joining <ulink url="http://wiki.debian.org/Teams">packaging teams</ulink>  joining <ulink url="&teams;">packaging teams</ulink>
707  </para>  </para>
708  </listitem>  </listitem>
709  <listitem>  <listitem>
# Line 596  triaging bugs of very popular packages Line 713  triaging bugs of very popular packages
713  </listitem>  </listitem>
714  <listitem>  <listitem>
715  <para>  <para>
716  preparing <ulink url="http://www.debian.org/doc/developers-reference/pkgs.html#nmu-qa-upload">QA  preparing <ulink url="&devref-nmu;">QA or NMU uploads</ulink>
 or NMU uploads</ulink>  
717  </para>  </para>
718  </listitem>  </listitem>
719  </itemizedlist>  </itemizedlist>
# Line 607  If you are able to adopt the package, ge Line 723  If you are able to adopt the package, ge
723  examine them.  This document unfortunately doesn't include comprehensive  examine them.  This document unfortunately doesn't include comprehensive
724  information about adopting packages.  Thankfully you shouldn't have a hard time  information about adopting packages.  Thankfully you shouldn't have a hard time
725  figuring out how the package works since someone has already done the initial  figuring out how the package works since someone has already done the initial
726  set up for you.  Keep reading, though, a lot of the advice below will still be  setup for you.  Keep reading, though; a lot of the advice below will still be
727  applicable for your case.  applicable for your case.
728  </para>  </para>
729  <para>  <para>
# Line 617  as follows: Line 733  as follows:
733  <itemizedlist>  <itemizedlist>
734  <listitem>  <listitem>
735  <para>  <para>
736  First, you must know that program works, and have tried it for some time to  First, you must know that the program works, and have tried it for some time to
737  confirm its usefulness.  confirm its usefulness.
738  </para>  </para>
739  </listitem>  </listitem>
740  <listitem>  <listitem>
741  <para>  <para>
742  You must check if no one else is working on the package already at <ulink url="http://www.de.debian.org/devel/wnpp/being_packaged">the list of packages  You must check that no one else is already working on the package on the
743  being worked on</ulink>.  If no one else is working on it, file an ITP (Intent  <ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> site.
744    If no one else is working on it, file an ITP (Intent
745  To Package) bug report to the <systemitem role="package">wnpp</systemitem>  To Package) bug report to the <systemitem role="package">wnpp</systemitem>
746  pseudo-package using <command>reportbug</command>.  If someone's already on it,  pseudo-package using <command>reportbug</command>.  If someone's already on it,
747  contact them if you feel you need to.  If not - find another interesting  contact them if you feel you need to.  If not - find another interesting
748  program that nobody maintains.  program that nobody is maintaining.
749  </para>  </para>
750  </listitem>  </listitem>
751  <listitem>  <listitem>
752  <para>  <para>
753  That program <emphasis role="strong">must have a license</emphasis>.  The software <emphasis role="strong">must have a license</emphasis>.
754  </para>  </para>
755  <itemizedlist>  <itemizedlist>
756  <listitem>  <listitem>
757  <para>  <para>
758  For the <literal>main</literal> section, it <emphasis role="strong">must be  For the <literal>main</literal> section, Debian Policy requires it
759  compliant to all the Debian Free Software Guidelines (DFSG)</emphasis> (see  <emphasis role="strong">to be fully compliant with the Debian Free Software
760  <ulink url="http://www.debian.org/social_contract#guidelines">http://www.debian.org/social_contract#guidelines</ulink>)  Guidelines</emphasis> (<ulink url="&dfsg;">DFSG</ulink>)
761  and <emphasis role="strong">that program must not require a package outside of  and <emphasis role="strong">not to require a package outside of
762  <literal>main</literal></emphasis> for compilation or execution as required by  <literal>main</literal></emphasis> for compilation or execution.  This
763  the Debian Policy.  This is desired case.  is the desired case.
764  </para>  </para>
765  </listitem>  </listitem>
766  <listitem>  <listitem>
767  <para>  <para>
768  For the <literal>contrib</literal> section, it must be compliant to all the  For the <literal>contrib</literal> section, it must comply with the
769  DFSG but it may require a package outside of <literal>main</literal> for  DFSG but it may require a package outside of <literal>main</literal> for
770  compilation or execution.  compilation or execution.
771  </para>  </para>
772  </listitem>  </listitem>
773  <listitem>  <listitem>
774  <para>  <para>
775  For the <literal>non-free</literal> section, it may not be compliant to some of  For the <literal>non-free</literal> section, it may be non-compliant
776  the DFSG but it <emphasis role="strong">must be distributable</emphasis>.  with the DFSG but it <emphasis role="strong">must be distributable</emphasis>.
777  </para>  </para>
778  </listitem>  </listitem>
779  </itemizedlist>  </itemizedlist>
780  <para>  <para>
781  If you are unsure about where it should go, post the license text on <ulink url="http://lists.debian.org/debian-legal/">debian-legal@lists.debian.org</ulink>  If you are unsure about where it should go, post the license text on <ulink url="&debian-legal-ldo;">debian-legal@lists.debian.org</ulink>
782  and ask for advice.  and ask for advice.
783  </para>  </para>
784  </listitem>  </listitem>
785  <listitem>  <listitem>
786  <para>  <para>
787  That program certainly should <emphasis role="strong">not</emphasis> run setuid  The program certainly should <emphasis role="strong">not</emphasis> run setuid
788  root, or even better - it shouldn't need to be setuid or setgid to anything.  root, or even better, it shouldn't need to be setuid or setgid to anything.
789  </para>  </para>
790  </listitem>  </listitem>
791  <listitem>  <listitem>
792  <para>  <para>
793  That program should not be a daemon, or something that goes in  The program should not be a daemon, or go in an
794  <filename>*/sbin</filename> directories, or open a port as root.  <filename>*/sbin</filename> directory, or open a port as root.
795  </para>  </para>
796  </listitem>  </listitem>
797  <listitem>  <listitem>
798  <para>  <para>
799  That program should result in binary executable form, libraries are harder to  The program should be in binary executable form; libraries are harder to handle.
 handle.  
800  </para>  </para>
801  </listitem>  </listitem>
802  <listitem>  <listitem>
803  <para>  <para>
804  That program should be well documented and its code needs to be understandable  The program should be well documented and its code needs to be understandable
805  (i.e.  not obfuscated).  (i.e.  not obfuscated).
806  </para>  </para>
807  </listitem>  </listitem>
808  <listitem>  <listitem>
809  <para>  <para>
810  You should contact program's author(s) to check if they agree with packaging it  You should contact the program's author(s) to check if they agree with packaging it
811  and amicable to Debian.  It is important to be able to consult with author(s)  and are amicable to Debian.  It is important to be able to consult with the author(s)
812  about the program in case of any program specific problems, so don't try to  in case of any problems with the program, so don't try to package
813  package unmaintained pieces of software.  unmaintained software.
814  </para>  </para>
815  </listitem>  </listitem>
816  </itemizedlist>  </itemizedlist>
817  <para>  <para>
818  Of course, these things are just safety measures, and intended to save you from  Of course, these are just safety measures, and intended to save you from
819  raging users if you do something wrong in some setuid daemon...  When you gain  enraging users if you do something wrong in some setuid daemon...  When you gain
820  some more experience in packaging, you'll be able to do such packages, but even  more experience in packaging, you'll be able to package such software.
 the experienced developers consult the <ulink url="http://lists.debian.org/debian-mentors/">debian-mentors@lists.debian.org</ulink>  
 mailing list when they are in doubt.  And people there will gladly help.  
 </para>  
 <para>  
 For more help about these, check in <ulink url="http://www.debian.org/doc/devel-manuals#devref">Debian Developer's  
 Reference</ulink>.  
821  </para>  </para>
822  </section>  </section>
823  <section id="getit"><title>Get the program, and try it out</title>  <section id="getit"><title>Get the program, and try it out</title>
824  <para>  <para>
825  So the first thing to do is to find and download the original source code.  I  So the first thing to do is to find and download the original source code.
826  presume that you already have the source file that you picked up at the  Presumably you already have the source file that you picked up at the
827  author's homepage.  Sources for free Unix programs usually come in  author's homepage.  Sources for free Unix programs usually come in
828  <command>tar</command>+<command>gzip</command> format with extension  <command>tar</command>+<command>gzip</command> format with the extension
829  <filename>.tar.gz</filename>, or  <filename>.tar.gz</filename>, or
830  <command>tar</command>+<command>bzip2</command> format with extension  <command>tar</command>+<command>bzip2</command> format with the extension
831  <filename>.tar.bz2</filename>.  These usually contain the subdirectory called  <filename>.tar.bz2</filename>.  These usually contain a directory called
832  <filename><replaceable>programname</replaceable>-<replaceable>version</replaceable></filename>  <filename><replaceable>programname</replaceable>-<replaceable>version</replaceable></filename>
833  in them and all the sources under it.  with all the sources inside.
834  </para>  </para>
835  <para>  <para>
836  If the latest version of such sources are available through VCS such as Git,  If the latest version of the source is available through a VCS such as Git,
837  Subversion, or CVS repository, you need to get it with <literal>git  Subversion, or CVS, you need to get it with <literal>git
838  clone</literal>, <literal>cvs co</literal>, or <literal>svn co</literal> and  clone</literal>, <literal>svn co</literal>, or <literal>cvs co</literal> and
839  repack it into <command>tar</command>+<command>gzip</command> format by  repack it into <command>tar</command>+<command>gzip</command> format yourself
840  yourself using the <literal>--exclude-vcs</literal> option.  by using the <literal>--exclude-vcs</literal> option.
841  </para>  </para>
842  <para>  <para>
843  If your program's source comes as some other sort of archive (for instance, the  If your program's source comes as some other sort of archive (for instance, the
844  filename ends in <filename>.Z</filename> or  filename ends in <filename>.Z</filename> or
845  <filename>.zip</filename><footnote><para> You can identify the archive format  <filename>.zip</filename><footnote><para> You can identify the archive format
846  using the <command>file</command> command when the file extension is not  using the <command>file</command> command when the file extension is not
847  enough.  </para> </footnote>), unpack it with appropriate tools and repack it,  enough.  </para> </footnote>), you should also unpack it with the
848  too.  appropriate tools and repack it.
849  </para>  </para>
850  <para>  <para>
851  As an example, I'll use a program called <command>gentoo</command>, an X GTK+  As an example, I'll use a program called <command>gentoo</command>, a GTK+
852  file manager.<footnote><para> This program is already packaged.  Current  file manager.
853  version 0.15.3 has changed substantially from the version 0.9.12 in the  <footnote><para> This program is already packaged. The
854  following examples.  </para> </footnote>  <ulink url="&gentoo-package;">current version</ulink> uses Autotools as its
855    build structure and is substantially different from the following examples,
856    which were based on version 0.9.12.</para>
857    </footnote>
858  </para>  </para>
859  <para>  <para>
860  Create a subdirectory under your home directory named  Create a subdirectory under your home directory named
861  <filename>debian</filename> or <filename>deb</filename> or anything you find  <filename>debian</filename> or <filename>deb</filename> or anything you find
862  appropriate (e.g.  just <filename>~/gentoo</filename> would do fine in this  appropriate (e.g.  just <filename>~/gentoo</filename> would do fine in this
863  case).  Place the downloaded archive in it, and extract it (with <literal>tar  case).  Place the downloaded archive in it, and extract it (with <literal>tar
864  xzf gentoo-0.9.12.tar.gz</literal>).  Make sure there are no errors, even some  xzf gentoo-0.9.12.tar.gz</literal>).  Make sure there are no warning
865  <emphasis>irrelevant</emphasis> ones, because there will most probably be  messages, even <emphasis>irrelevant</emphasis> ones, because other
866  problems unpacking on other people's systems, whose unpacking tools may or may  people's unpacking tools may or may not ignore these anomalies, so they
867  not ignore those anomalies.  On your console screen, you should see the  may have problems unpacking them.  Your shell commandline may look
868  following.  something like this:
869  </para>  </para>
870  <screen>  <screen>
871  $ mkdir ~/gentoo ; cd ~/gentoo  $ mkdir ~/gentoo ; cd ~/gentoo
# Line 767  Now you have another subdirectory, calle Line 880  Now you have another subdirectory, calle
880  Change to that directory and <emphasis>thoroughly</emphasis> read the provided  Change to that directory and <emphasis>thoroughly</emphasis> read the provided
881  documentation.  Usually there are files named <filename>README*</filename>,  documentation.  Usually there are files named <filename>README*</filename>,
882  <filename>INSTALL*</filename>, <filename>*.lsm</filename> or  <filename>INSTALL*</filename>, <filename>*.lsm</filename> or
883  <filename>*.html</filename>.  You must find instructions on how to correctly  <filename>*.html</filename>.  You must find instructions on how to
884  compile and install the program (most probably they'll assume you want to  compile and install the program (most probably they'll assume you want to
885  install to <filename>/usr/local/bin</filename> directory; you won't be doing  install to the <filename>/usr/local/bin</filename> directory; you won't be doing
886  that, but more on that later in <xref linkend="destdir"/> ).  that, but more on that later in <xref linkend="destdir"/>).
887  </para>  </para>
888  <para>  <para>
889  Simple programs come with a <filename>Makefile</filename> file in them and can  Simple programs come with a <filename>Makefile</filename> and can
890  be compiled simply with <literal>make</literal>.  Some of them support  be compiled just by invoking <literal>make</literal>.<footnote><para>
891  <literal>make check</literal>, which runs included self-checks.  Installation  Many modern programs come with a script <filename>configure</filename> which
892    when executed creates a <filename>Makefile</filename> customized for
893    your system.</para></footnote> Some of them support
894    <literal>make check</literal>, which runs included self-tests.  Installation
895  to the destination directories is usually done with <literal>make  to the destination directories is usually done with <literal>make
896  install</literal>.  install</literal>.
897  </para>  </para>
# Line 790  there's even a <literal>make uninstall</ Line 906  there's even a <literal>make uninstall</
906  all the installed files.  all the installed files.
907  </para>  </para>
908  </section>  </section>
909  <section id="portable"><title>Free portable programs</title>  <section id="portable"><title>Free portable build system</title>
910  <para>  <para>
911  A lot of Free programs are written in the <ulink url="http://en.wikipedia.org/wiki/C_(programming_language)">C</ulink> and  A lot of free software is written in the <ulink url="&c-program;">C</ulink> and
912  <ulink url="http://en.wikipedia.org/wiki/C++">C++</ulink> languages.  Many of  <ulink url="&cxx;">C++</ulink> languages.  Many of
913  these use Autotools or CMake to make them portable across different platforms.  these use Autotools or CMake to make them portable across different platforms.
914  These tools are used to generate <filename>Makefile</filename> and other  These tools are used to generate the <filename>Makefile</filename> and other
915  required source files.  Then, such programs are built with usual <literal>make;  required source files.  Then, such programs are built using the usual
916  make install</literal>.  <literal>make; make install</literal>.
917  </para>  </para>
918  <para>  <para>
919  <ulink url="http://en.wikipedia.org/wiki/GNU_build_system">Autotools</ulink>  <ulink url="&gnu-build-system;">Autotools</ulink> is the GNU build
920  are the GNU build system comprising <ulink url="http://en.wikipedia.org/wiki/Autoconf">Autoconf</ulink>, <ulink url="http://en.wikipedia.org/wiki/Automake">Automake</ulink>, <ulink url="http://en.wikipedia.org/wiki/GNU_Libtool">Libtool</ulink>, and <ulink url="http://en.wikipedia.org/wiki/GNU_gettext">gettext</ulink>.  You can notice  system comprising <ulink url="&autoconf;">Autoconf</ulink>,
921    <ulink url="&automake;">Automake</ulink>,
922    <ulink url="&libtool;">Libtool</ulink>, and
923    <ulink url="&gettext;">gettext</ulink>.  You can recognize
924  such sources by the <filename>configure.ac</filename>,  such sources by the <filename>configure.ac</filename>,
925  <filename>Makefile.am</filename>, and <filename>Makefile.in</filename> files.  <filename>Makefile.am</filename>, and <filename>Makefile.in</filename> files.
926  <footnote><para> See <ulink url="http://www.lrde.epita.fr/~adl/autotools.html">Autotools Tutorial</ulink>  <footnote><para> See the <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink>
927  and <filename>&autotools-dev;</filename>.  </para> </footnote>  and <ulink url="&autotools-readme;"/>.  </para> </footnote>
928  </para>  </para>
929  <para>  <para>
930  The first step of Autotools work flow is usually that the upstream runs  The first step of the Autotools workflow is usually that upstream runs
931  <literal>autoreconf -i -f</literal> in the source and distributes this source  <literal>autoreconf -i -f</literal> in the source directory and
932  with generated files.  distributes the generated files along with the source.
933  </para>  </para>
934  <screen>  <screen>
935  configure.ac-----+-&gt; autoreconf -+-&gt; configure  configure.ac-----+-&gt; autoreconf -+-&gt; configure
# Line 829  files requires some knowledge of <comman Line 948  files requires some knowledge of <comman
948  <literal>info automake</literal>.  <literal>info automake</literal>.
949  </para>  </para>
950  <para>  <para>
951  The second step of Autotools work flow is usually that the user obtains this  The second step of the Autotools workflow is usually that the user obtains this
952  distributed source and runs <literal>./configure &amp;&amp; make</literal> in  distributed source and runs <literal>./configure &amp;&amp; make</literal> in
953  the source to compile program into a  the source directory to compile the program into a
954  <command><replaceable>binary</replaceable></command>.  <command><replaceable>binary</replaceable></command>.
955  </para>  </para>
956  <screen>  <screen>
# Line 843  config.h.in -----+                +-&gt; Line 962  config.h.in -----+                +-&gt;
962             config.guess --+             config.guess --+
963  </screen>  </screen>
964  <para>  <para>
965  You can change many things in the <filename>Makefile</filename> file such as  You can change many things in the <filename>Makefile</filename>; for
966  the default file install location using the command option, e.g.  instance you can change the default location for file installation
967  <command>./configure --prefix=/usr</command>.  using the option <command>./configure --prefix=/usr</command>.
968  </para>  </para>
969  <para>  <para>
970  Although it is not required, updating the <filename>configure</filename> and  Although it is not required, updating the <filename>configure</filename> and
971  other files with <literal>autoreconf -i -f</literal> as the user may improve  other files with <literal>autoreconf -i -f</literal> may improve
972  the compatibility of the source.  the compatibility of the source.
973    <footnote><para>You can automate this by using
974    <systemitem role="package">dh-autoreconf</systemitem> package.
975    See <xref linkend="customrules"/>.</para></footnote>
976  </para>  </para>
977  <para>  <para>
978  <ulink url="http://en.wikipedia.org/wiki/CMake">CMake</ulink> is an alternative  <ulink url="&cmake;">CMake</ulink> is an alternative
979  build system.  You can notice such sources by the  build system.  You can recognize such sources by the
980  <filename>CMakeLists.txt</filename> file.  <filename>CMakeLists.txt</filename> file.
981  </para>  </para>
982  </section>  </section>
# Line 871  to Line 993  to
993  </para>  </para>
994  <para>  <para>
995  If the program name consists of more than one word, contract them to one word,  If the program name consists of more than one word, contract them to one word,
996  or make an abbreviation.  For example, program John's little editor for X  or make an abbreviation.  For example, a package of the program "John's little
997  package would be named <systemitem role="package">johnledx</systemitem>, or  editor for X" might be named <systemitem role="package">johnledx</systemitem>, or
998  <systemitem role="package">jle4x</systemitem>, or whatever you decide, as long  <systemitem role="package">jle4x</systemitem>, or whatever you decide, as long
999  as it's under some reasonable limit, e.g.  20 characters.  as it's under some reasonable length limit, e.g. 20 characters.
1000  </para>  </para>
1001  <para>  <para>
1002  Also check for the exact version of the program (to be included in the package  Also check for the exact version of the program (to be included in the package
1003  version).  If that piece of software is not numbered with versions like  version).  If this piece of software is not numbered with versions like
1004  <literal>X.Y.Z</literal>, but with some kind of date, feel free to use that  <literal>X.Y.Z</literal>, but with some kind of date, feel free to use that
1005  date as the version number, as long as newer version numbers will look larger.  date as the version number, as long as newer version numbers will look larger.
1006  While it is best to use the same version number as what upstream uses, if it is  While it is best to use the same version numbering as upstream, if it is
1007  in the format of <literal>09Oct23</literal> you may need to convert it to  in the format of <literal>09Oct23</literal> you may need to convert it to
1008  <literal>YYYYMMDD</literal> format, which would be <literal>20091023</literal>,  <literal>YYYYMMDD</literal> format, which would be <literal>20091023</literal>,
1009  to ensure proper order for upgrade with the <command>dpkg</command>  to ensure that <command>dpkg</command> sees later versions as
1010  program.<footnote><para> Version string can be compared by <literal>dpkg  upgrades.<footnote><para> Version strings can be compared with <literal>dpkg
1011  --compare-versions <replaceable>ver1</replaceable>  --compare-versions <replaceable>ver1</replaceable>
1012  <replaceable>op</replaceable> <replaceable>ver2</replaceable></literal>.  See  <replaceable>op</replaceable> <replaceable>ver2</replaceable></literal>.  See
1013  <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum>  <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum>
1014  </citerefentry> manpage.  </para> </footnote>  </citerefentry>.  </para> </footnote>
1015  </para>  </para>
1016  <para>  <para>
1017  Some programs won't be numbered at all, in which case you should contact the  Some programs won't be numbered at all, in which case you should contact the
# Line 898  upstream maintainer to see if they've go Line 1020  upstream maintainer to see if they've go
1020  </section>  </section>
1021  <section id="dh-make"><title>Initial Debian package</title>  <section id="dh-make"><title>Initial Debian package</title>
1022  <para>  <para>
1023  Let's set up the shell environment variable <literal>$DEBEMAIL</literal> and  Set up the shell environment variables <literal>$DEBEMAIL</literal> and
1024  <literal>$DEBFULLNAME</literal> so many Debian maintenance tools recognize your  <literal>$DEBFULLNAME</literal> so that various Debian maintenance
1025  name and email address to use for packages as follows.<footnote><para> The  tools recognize your email address and name to use for packages.<footnote><para> The
1026  following text assumes you are using Bash as your login shell.  If you use  following text assumes you are using Bash as your login shell.  If you use
1027  other login shells such as Z shell, use their pertinent configuration files  some other login shell such as Z shell, use their corresponding
1028  instead of <filename>~/.bashrc</filename>.  </para> </footnote>.  configuration files instead of <filename>~/.bashrc</filename>. </para> </footnote>.
1029  </para>  </para>
1030  <screen>  <screen>
1031  $ cat &gt;&gt;~/.bashrc &lt;&lt;EOF  $ cat &gt;&gt;~/.bashrc &lt;&lt;EOF
# Line 913  export DEBEMAIL DEBFULLNAME Line 1035  export DEBEMAIL DEBFULLNAME
1035  EOF  EOF
1036  </screen>  </screen>
1037  <para>  <para>
1038  Let's make an initial Debian package by issuing the <command>dh_make</command>  You can create an initial Debian package by issuing the
1039  command as follows.  <command>dh_make</command> command as follows.
1040  </para>  </para>
1041  <screen>  <screen>
1042  $ . ~/.bashrc  $ . ~/.bashrc
# Line 925  $ dh_make -f ../gentoo-0.9.12.tar.gz Line 1047  $ dh_make -f ../gentoo-0.9.12.tar.gz
1047  Of course, replace the filename with the name of your original source archive.  Of course, replace the filename with the name of your original source archive.
1048  <footnote><para> If the upstream source provides the  <footnote><para> If the upstream source provides the
1049  <filename>debian</filename> directory and its contents, run the  <filename>debian</filename> directory and its contents, run the
1050  <command>dh_make</command> command with the <literal>--addmissing</literal>  <command>dh_make</command> command with the extra option
1051  option, instead.  The new source <literal>3.0 (quilt)</literal> format is quite  <literal>--addmissing</literal>.  The new source <literal>3.0 (quilt)</literal> format is
1052  robust not to break even for these packages.  You may need to update contents  robust enough not to break even for these packages.  You may need to update the contents
1053  provided by the upstream for your Debian package.  </para> </footnote> See  provided by the upstream for your Debian package.  </para> </footnote> See
1054  <citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>1</manvolnum>  <citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>1</manvolnum>
1055  </citerefentry> for details.  </citerefentry> for details.
1056  </para>  </para>
1057  <para>  <para>
1058  Some information will come up.  It will ask you what sort of package you want  You should see some output asking you what sort of package you want
1059  to create.  Gentoo is a single binary package - it creates only one binary, and  to create.  Gentoo is a single binary package - it creates only one binary, and
1060  thus one <filename>.deb</filename> file - so we will select the first option,  thus one <filename>.deb</filename> file - so we will select the first option
1061  with the <literal>s</literal> key, check the information on the screen and  (with the <literal>s</literal> key), check the information on the screen, and
1062  confirm by pressing <literal><replaceable>ENTER</replaceable></literal>.  confirm by pressing <literal><replaceable>ENTER</replaceable></literal>.
1063  <footnote><para> There are few choices here: <literal>s</literal> for Single  <footnote><para> There are several choices here: <literal>s</literal> for Single
1064  binary, <literal>i</literal> for Arch-Independent, <literal>m</literal> for  binary, <literal>i</literal> for arch-Independent, <literal>m</literal> for
1065  Multiple binary, <literal>l</literal> for Library, <literal>k</literal> for  Multiple binary, <literal>l</literal> for Library, <literal>k</literal> for
1066  Kernel module, <literal>n</literal> for Kernel patch and <literal>b</literal>  Kernel module, <literal>n</literal> for kernel patch, and <literal>b</literal>
1067  for <systemitem role="package">cdbs</systemitem>.  This document focuses on the  for <systemitem role="package">cdbs</systemitem>.  This document focuses on the
1068  use of the <systemitem role="package">debhelper</systemitem> package with the  use of the <command>dh</command> command (from the package
1069  <command>dh</command> command.  This document focuses on the use of the new  <systemitem role="package">debhelper</systemitem>) to create a single-binary package,
1070  <command>dh</command> command for Single binary and touches on it for  but also touches on how to use it for arch-independent or
1071  Arch-Independent and Multiple binary.  The <systemitem role="package">cdbs</systemitem> package offers alternative package script  multiple-binary packages.  The package
1072  infrastructure to the <command>dh</command> command and outside of the scope of  <systemitem role="package">cdbs</systemitem> offers an alternative packaging script
1073    infrastructure to the <command>dh</command> command and is outside the scope of
1074  this document.  </para> </footnote>  this document.  </para> </footnote>
1075  </para>  </para>
1076  <para>  <para>
1077  After this execution of <command>dh_make</command>, a copy of the upstream  This execution of <command>dh_make</command> creates a copy of the upstream
1078  tarball is created as <filename>gentoo_0.9.12.orig.tar.gz</filename> in the  tarball as <filename>gentoo_0.9.12.orig.tar.gz</filename> in the
1079  parent directory to accommodate the creation of the non-native Debian source  parent directory to accommodate the creation of the non-native Debian source
1080  package with the <filename>debian.tar.gz</filename> later.  package with the name <filename>debian.tar.gz</filename> later.
1081  </para>  </para>
1082  <screen>  <screen>
1083  $ cd ~/gentoo ; ls -F  $ cd ~/gentoo ; ls -F
# Line 963  gentoo-0.9.12.tar.gz Line 1086  gentoo-0.9.12.tar.gz
1086  gentoo_0.9.12.orig.tar.gz  gentoo_0.9.12.orig.tar.gz
1087  </screen>  </screen>
1088  <para>  <para>
1089  Please note 2 key features in this  Please note two key features of this filename
1090  <filename>gentoo_0.9.12.orig.tar.gz</filename> file name:  <filename>gentoo_0.9.12.orig.tar.gz</filename>:
1091  </para>  </para>
1092  <itemizedlist>  <itemizedlist>
1093  <listitem>  <listitem>
1094  <para>  <para>
1095  Package name and version are separated by the <literal>_</literal>  Package name and version are separated by the character <literal>_</literal>
1096  (underscore).  (underscore).
1097  </para>  </para>
1098  </listitem>  </listitem>
1099  <listitem>  <listitem>
1100  <para>  <para>
1101  There is the <filename>.orig</filename> before the  The string <filename>.orig</filename> is inserted before the
1102  <filename>.tar.gz</filename>.  <filename>.tar.gz</filename>.
1103  </para>  </para>
1104  </listitem>  </listitem>
1105  </itemizedlist>  </itemizedlist>
1106  <para>  <para>
1107  You should also notice that many template files are created in the source under  You should also notice that many template files are created in the source under
1108  the <filename>debian</filename> directory.  These will be explained in <xref linkend="dreq"/> and <xref linkend="dother"/> .  You should also understand  the <filename>debian</filename> directory.  These will be explained in
1109  that the packaging is not automatic process.  You need to modify the upstream  <xref linkend="dreq"/> and <xref linkend="dother"/>.  You should also understand
1110  source for Debian as <xref linkend="modify"/> .  After all these, you need to  that packaging cannot be a fully automated process.  You will need to modify the upstream
1111  build Debian packages under the proper method as <xref linkend="build"/> ,  source for Debian (see <xref linkend="modify"/>).  After this, you need to
1112  check them as <xref linkend="checkit"/> , and upload them as <xref linkend="upload"/> .  I will explain all these steps.  use the proper methods for building Debian packages (<xref linkend="build"/>),
1113    testing them (<xref linkend="checkit"/>), and uploading them (<xref linkend="upload"/>).
1114    All the steps will be explained.
1115  </para>  </para>
1116  <para>  <para>
1117  Once again, as a new maintainer you are discouraged from creating complicated  Once again, as a new maintainer you are discouraged from creating complicated
1118  packages, e.g.,  packages, e.g.:
1119  </para>  </para>
1120  <itemizedlist>  <itemizedlist>
1121  <listitem>  <listitem>
1122  <para>  <para>
1123  multiple binary packages,  multiple binary packages;
1124  </para>  </para>
1125  </listitem>  </listitem>
1126  <listitem>  <listitem>
1127  <para>  <para>
1128  library packages,  library packages;
1129  </para>  </para>
1130  </listitem>  </listitem>
1131  <listitem>  <listitem>
1132  <para>  <para>
1133  kernel module packages,  kernel module packages;
1134  </para>  </para>
1135  </listitem>  </listitem>
1136  <listitem>  <listitem>
1137  <para>  <para>
1138  kernel patch packages,  kernel patch packages;
1139  </para>  </para>
1140  </listitem>  </listitem>
1141  <listitem>  <listitem>
1142  <para>  <para>
1143  the source file format being neither in <filename>tar.gz</filename> nor  packages with the source in a format other than <filename>tar.gz</filename> or
1144  <filename>tar.bz2</filename>, or  <filename>tar.bz2</filename>; or
1145  </para>  </para>
1146  </listitem>  </listitem>
1147  <listitem>  <listitem>
1148  <para>  <para>
1149  the source tarball containing undistributable contents.  packages where the source tarball contains undistributable contents.
1150  </para>  </para>
1151  </listitem>  </listitem>
1152  </itemizedlist>  </itemizedlist>
1153  <para>  <para>
1154  It's not too hard, but it does require a bit more knowledge, so we won't  Doing so is not too hard, but it requires a bit more knowledge, so we won't
1155  describe all of it here.  describe all of it here.
1156  </para>  </para>
1157  <para>  <para>
# Line 1036  recover them by running <command>dh_make Line 1161  recover them by running <command>dh_make
1161  </para>  </para>
1162  <para>  <para>
1163  Updating an existing package may get complicated since it may be using older  Updating an existing package may get complicated since it may be using older
1164  techniques.  Please stick with fresh packaging cases for now to learn basics.  techniques.  While learning the basics, please stick to creating a fresh
1165  I will come back to explain it later in <xref linkend="update"/> .  package; further explanations are given in <xref linkend="update"/>.
1166  </para>  </para>
1167  </section>  </section>
1168  </chapter>  </chapter>
# Line 1051  people often run across. Line 1176  people often run across.
1176  <para>  <para>
1177  The <command>quilt</command> program offers the basic method to record  The <command>quilt</command> program offers the basic method to record
1178  modification to the source for the Debian packaging.  Since slightly different  modification to the source for the Debian packaging.  Since slightly different
1179  default is desirable for Debian packaging, let's set up  default is desirable, let's create an alias <command>dquilt</command> for
1180  <filename>~/.quiltrc</filename> as follows.  <footnote><para> You can disable  Debian packaging by adding the following line to <filename>~/.bashrc</filename>.
1181  this configuration by starting the <command>quilt</command> command as  </para>
1182  <literal>quilt --quiltrc /dev/null ...</literal>.  </para> </footnote>  <screen>
1183    alias dquilt="quilt --quiltrc=~/.quiltrc-dpkg"
1184    </screen>
1185    <para>
1186    Then let's create <filename>~/.quiltrc-dpkg</filename> as follows.
1187  </para>  </para>
1188  <screen>  <screen>
1189  d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done  d=. ; while [ ! -d $d/debian -a `readlink -e $d` != / ]; do d=$d/..; done
1190  if [ -d $d/debian ] &amp;&amp; [ -z $QUILT_PATCHES ]; then  if [ -d $d/debian ] &amp;&amp; [ -z $QUILT_PATCHES ]; then
1191      # Debian packaging case and unset $QUILT_PATCHES      # Debian packaging case and unset $QUILT_PATCHES
1192      QUILT_PATCHES=debian/patches      QUILT_PATCHES="debian/patches"
1193      QUILT_PATCH_OPTS=--unified-reject-files      QUILT_PATCH_OPTS="--reject-format=unified"
1194      QUILT_DIFF_ARGS=-p ab --no-timestamps --no-index --color=auto      QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto"
1195      QUILT_REFRESH_ARGS=-p ab --no-timestamps --no-index      QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
1196      QUILT_COLORS=diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33      QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33"
1197      if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi      if ! [ -d $d/debian/patches ]; then mkdir $d/debian/patches; fi
1198  fi  fi
1199  </screen>  </screen>
1200  <para>  <para>
1201  See <citerefentry> <refentrytitle>quilt</refentrytitle>  See <citerefentry> <refentrytitle>quilt</refentrytitle>
1202  <manvolnum>1</manvolnum> </citerefentry> and  <manvolnum>1</manvolnum> </citerefentry> and
1203  <filename>/usr/share/doc/quilt/quilt.html</filename> for how to use  <ulink url="&quilt-pdf;">quilt.pdf</ulink> for how to use
1204  <command>quilt</command>.  <command>quilt</command>.
1205  </para>  </para>
1206  </section>  </section>
# Line 1088  install: gentoo Line 1217  install: gentoo
1217          install gentoorc-example $(HOME)/.gentoorc          install gentoorc-example $(HOME)/.gentoorc
1218  </screen>  </screen>
1219  <para>  <para>
1220  Let's fix this and record this with the <command>quilt</command> command as  Let's fix this and record this with the <command>dquilt</command> command as
1221  <filename>fix-gentoo-target.patch</filename>.  <footnote><para> The  <filename>fix-gentoo-target.patch</filename>.  <footnote><para> The
1222  <filename>debian/patches</filename> directory should exist now if you run  <filename>debian/patches</filename> directory should exist now if you run
1223  <command>dh_make</command> as described before.  This example operation creates  <command>dh_make</command> as described before.  This example operation creates
# Line 1096  it just in case you are updating the exi Line 1225  it just in case you are updating the exi
1225  </para>  </para>
1226  <screen>  <screen>
1227  $ mkdir debian/patches  $ mkdir debian/patches
1228  $ quilt new fix-gentoo-target.patch  $ dquilt new fix-gentoo-target.patch
1229  $ quilt add Makefile  $ dquilt add Makefile
1230  </screen>  </screen>
1231  <para>  <para>
1232  You change the <filename>Makefile</filename> file as follows.  You change the <filename>Makefile</filename> file as follows.
# Line 1109  install: gentoo-target Line 1238  install: gentoo-target
1238          install gentoorc-example $(HOME)/.gentoorc          install gentoorc-example $(HOME)/.gentoorc
1239  </screen>  </screen>
1240  <para>  <para>
1241  Ask <command>quilt</command> to refresh the patch to create  Ask <command>dquilt</command> to refresh the patch to create
1242  <filename>debian/patches/fix-gentoo-target.patch</filename> and add its  <filename>debian/patches/fix-gentoo-target.patch</filename> and add its
1243  description.  description following <ulink url="&dep3;">DEP-3: Patch Tagging Guidelines</ulink>.
1244  </para>  </para>
1245  <screen>  <screen>
1246  $ quilt refresh  $ dquilt refresh
1247  $ quilt header -e  $ dquilt header -e
1248  ... describe patch  ... describe patch
1249  </screen>  </screen>
1250  </section>  </section>
1251    
1252  <section id="destdir"><title>Installation of files to the destination</title>  <section id="destdir"><title>Installation of files to the destination</title>
1253  <para>  <para>
1254  Normally, programs install themselves in the <filename>/usr/local</filename>  Normally, programs install themselves in the <filename>/usr/local</filename>
1255  subdirectory.  Since it is reserved for system administrator's (or user's)  subdirectory.  Since it is reserved for system administrator's (or user's)
1256  private use, Debian packages must not use that directory but should use system  private use, Debian packages must not use that directory but should use system
1257  directories such as the <filename>/usr/bin</filename> subdirectory following  directories such as the <filename>/usr/bin</filename> subdirectory following
1258  the Filesystem Hierarchy Standard (<ulink url="http://www.debian.org/doc/packaging-manuals/fhs/fhs-2.3.html">FHS</ulink>,  the <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink> (FHS).
 <filename>/usr/share/doc/debian-policy/fhs/fhs-2.3.html</filename>).  
1259  </para>  </para>
1260  <para>  <para>
1261  Normally, <citerefentry> <refentrytitle>make</refentrytitle>  Normally, <citerefentry> <refentrytitle>make</refentrytitle>
# Line 1147  commands if the following conditions are Line 1276  commands if the following conditions are
1276  <listitem>  <listitem>
1277  <para>  <para>
1278  The <filename>Makefile</filename> file follows the GNU conventions to support  The <filename>Makefile</filename> file follows the GNU conventions to support
1279  <literal>$(DESTDIR)</literal> variable  <literal>$(DESTDIR)</literal> variable.
1280  (<filename>/usr/share/doc/gnu-standards/standards.html#Makefile-Conventions</filename>).  <footnote><para> See <ulink url="&gnu-destdir;">GNU Coding Standards: 7.2.4 DESTDIR: Support for Staged Installs</ulink>.</para></footnote>
1281  </para>  </para>
1282  </listitem>  </listitem>
1283  <listitem>  <listitem>
# Line 1234  for the system administrator's use.  Suc Line 1363  for the system administrator's use.  Suc
1363  </para>  </para>
1364  <para>  <para>
1365  The more exact locations for binaries, icons, documentation etc.  are specified  The more exact locations for binaries, icons, documentation etc.  are specified
1366  in the Filesystem Hierarchy Standard (see  in the Filesystem Hierarchy Standard (FHS).  I recommend you
 <filename>/usr/share/doc/debian-policy/fhs/</filename>).  I recommend you  
1367  browse it and read the sections that might concern your package.  browse it and read the sections that might concern your package.
1368  </para>  </para>
1369  <para>  <para>
# Line 1263  you the filename and the line number for Line 1391  you the filename and the line number for
1391  </para>  </para>
1392  <para>  <para>
1393  Edit those files and in those lines replace <literal>usr/local/lib</literal>  Edit those files and in those lines replace <literal>usr/local/lib</literal>
1394  with <literal>usr/lib</literal>.  with <literal>usr/lib</literal>.  This can be done automatically as follows:
1395  </para>  </para>
1396  <screen>  <screen>
1397  $ vim '+argdo %s/usr\/local\/lib/usr\/lib/gce|update' +q \  $ vim '+argdo %s/usr\/local\/lib/usr\/lib/gce|update' +q \
# Line 1279  to directories other than ones defined a Line 1407  to directories other than ones defined a
1407  <filename>Makefile</filename>.  <filename>Makefile</filename>.
1408  </para>  </para>
1409  <para>  <para>
1410  After your upstream bug fix, <systemitem role="package">gentoo</systemitem>'s  Before your upstream bug fix, <systemitem role="package">gentoo</systemitem>'s
1411  install target said:  install target said:
1412  </para>  </para>
1413  <screen>  <screen>
# Line 1289  install: gentoo-target Line 1417  install: gentoo-target
1417          install gentoorc-example $(HOME)/.gentoorc          install gentoorc-example $(HOME)/.gentoorc
1418  </screen>  </screen>
1419  <para>  <para>
1420  Let's fix this and record this with the <command>quilt</command> command as  Let's fix this and record this with the <command>dquilt</command> command as
1421  <filename>debian/patches/install.patch</filename>.  <filename>debian/patches/install.patch</filename>.
1422  </para>  </para>
1423  <screen>  <screen>
1424  $ quilt new install.patch  $ dquilt new install.patch
1425  $ quilt add Makefile  $ dquilt add Makefile
1426  </screen>  </screen>
1427  <para>  <para>
1428  Let's change this for Debian package as following using the editor:  Let's change this for Debian package as following using the editor:
# Line 1324  of additional documentation that the ups Line 1452  of additional documentation that the ups
1452          cp -a docs/* $(DESTDIR)/usr/share/doc/gentoo/html          cp -a docs/* $(DESTDIR)/usr/share/doc/gentoo/html
1453  </screen>  </screen>
1454  <para>  <para>
1455  After careful check, if everything is fine, ask <command>quilt</command> to  After careful check, if everything is fine, ask <command>dquilt</command> to
1456  refresh the patch to create <filename>debian/patches/install.patch</filename>  refresh the patch to create <filename>debian/patches/install.patch</filename>
1457  and add its description.  and add its description.
1458  </para>  </para>
1459  <screen>  <screen>
1460  $ quilt refresh  $ dquilt refresh
1461  $ quilt header -e  $ dquilt header -e
1462  ... describe patch  ... describe patch
1463  </screen>  </screen>
1464  <para>  <para>
# Line 1386  Let's fix this as <filename>debian/patch Line 1514  Let's fix this as <filename>debian/patch
1514  <literal>curses</literal> into <literal>ncurses</literal>.  <literal>curses</literal> into <literal>ncurses</literal>.
1515  </para>  </para>
1516  <screen>  <screen>
1517  $ quilt new ncurse.patch  $ dquilt new ncurse.patch
1518  $ quilt add Makefile  $ dquilt add Makefile
1519  $ sed -i -e s/-lcurses/-lncurses/g Makefile  $ sed -i -e s/-lcurses/-lncurses/g Makefile
1520  $ quilt refresh  $ dquilt refresh
1521  $ quilt header -e  $ dquilt header -e
1522  ... describe patch  ... describe patch
1523  </screen>  </screen>
1524  </section>  </section>
# Line 1403  that we should edit in order to customiz Line 1531  that we should edit in order to customiz
1531  most important of them are <filename>control</filename>,  most important of them are <filename>control</filename>,
1532  <filename>changelog</filename>, <filename>copyright</filename> and  <filename>changelog</filename>, <filename>copyright</filename> and
1533  <filename>rules</filename>, which are required for all packages.  <filename>rules</filename>, which are required for all packages.
1534    <footnote><para>
1535    In this chapter, files in the <filename>debian</filename> directory are
1536    referred without preceding <filename>debian/</filename> for simplicity whenever
1537    they are obvious.
1538    </para></footnote>
1539  </para>  </para>
1540  <section id="control"><title><filename>control</filename> file</title>  <section id="control"><title><filename>control</filename> file</title>
1541  <para>  <para>
1542  This file contains various values which <command>dpkg</command>,  This file contains various values which <command>dpkg</command>,
1543  <command>dselect</command>, <command>apt-get</command>,  <command>dselect</command>, <command>apt-get</command>,
1544  <command>apt-cache</command>, <command>aptitude</command>, and other package  <command>apt-cache</command>, <command>aptitude</command>, and other package
1545  management tools will use to manage the package.  It is defined by the <ulink url="http://www.debian.org/doc/debian-policy/ch-controlfields.html">Debian  management tools will use to manage the package.  It is defined by the <ulink url="&policy-control;">Debian
1546  Policy Manual, 5 'Control files and their fields'</ulink>.  Policy Manual, 5 'Control files and their fields'</ulink>.
1547  </para>  </para>
1548  <para>  <para>
# Line 1435  created for us: Line 1568  created for us:
1568  (I've added the line numbers.)  (I've added the line numbers.)
1569  </para>  </para>
1570  <para>  <para>
1571  Lines 1-6 are the control information for the source package.  Lines 1-7 are the control information for the source package.
1572    Lines 9-13 are the control information for the binary package.
1573  </para>  </para>
1574  <para>  <para>
1575  Line 1 is the name of the source package.  Line 1 is the name of the source package.
# Line 1454  for administrator-only programs, <litera Line 1588  for administrator-only programs, <litera
1588  documentation, <literal>libs</literal> for libraries, <literal>mail</literal>  documentation, <literal>libs</literal> for libraries, <literal>mail</literal>
1589  for e-mail readers and daemons, <literal>net</literal> for network apps and  for e-mail readers and daemons, <literal>net</literal> for network apps and
1590  daemons, <literal>x11</literal> for X11 programs that don't fit anywhere else,  daemons, <literal>x11</literal> for X11 programs that don't fit anywhere else,
1591  and many more.  See the <ulink url="http://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections">Debian  and many more.
1592  Policy Manual, 2.4 'Sections'</ulink> and <ulink url="http://packages.debian.org/unstable/">List of sections in 'sid'</ulink>  <footnote> <para>See
1593  for the guidance.  <ulink url="&policy-subsections;">Debian Policy Manual, 2.4 'Sections'</ulink> and
1594    <ulink url="&sections-unstable;">List of sections in <literal>sid</literal></ulink>.</para>
1595    </footnote>
1596  </para>  </para>
1597  <para>  <para>
1598  Let's change it then to x11.  (A <literal>main/</literal> prefix is implied so  Let's change it then to x11.  (A <literal>main/</literal> prefix is implied so
1599  we can omit it.)  we can omit it.)
1600  </para>  </para>
1601  <para>  <para>
1602  Line 3 describes how important it is that the user installs this package.  See  Line 3 describes how important it is that the user installs this package.
1603  the <ulink url="http://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities">Debian  <footnote> <para>See
1604  Policy Manual, 2.5 'Priorities'</ulink> for the guidance.  <ulink url="&policy-priorities;">Debian Policy Manual, 2.5 'Priorities'</ulink>.
1605    </para>
1606    </footnote>
1607  </para>  </para>
1608  <itemizedlist>  <itemizedlist>
1609  <listitem>  <listitem>
# Line 1501  you.  Avoid using commas, ampersands and Line 1639  you.  Avoid using commas, ampersands and
1639  <para>  <para>
1640  The 5th line includes the list of packages required to build your package as  The 5th line includes the list of packages required to build your package as
1641  the <literal>Build-Depends</literal> field.  You can also have the  the <literal>Build-Depends</literal> field.  You can also have the
1642  <literal>Build-Depends-Indep</literal> field as an additional line, here.  (see  <literal>Build-Depends-Indep</literal> field as an additional line, here.
1643  the <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps">Debian  <footnote><para>See <ulink url="&policy-relationships;#s-sourcebinarydeps">Debian
1644  Policy Manual, 7.7 'Relationships between source and binary packages -  Policy Manual, 7.7 'Relationships between source and binary packages -
1645  Build-Depends, Build-Depends-Indep, Build-Conflicts,  Build-Depends, Build-Depends-Indep, Build-Conflicts,
1646  Build-Conflicts-Indep'</ulink>).  Some packages like <systemitem role="package">gcc</systemitem> and <systemitem role="package">make</systemitem> which are required by the <systemitem role="package">build-essential</systemitem> package are implied.  If you need  Build-Conflicts-Indep'</ulink>.</para></footnote>  Some packages like
1647    <systemitem role="package">gcc</systemitem> and
1648    <systemitem role="package">make</systemitem> which are required by the
1649    <systemitem role="package">build-essential</systemitem> package are implied.  If you need
1650  to have other tools to build your package, you should add them to these fields.  to have other tools to build your package, you should add them to these fields.
1651  Multiple entries are separated with commas; read on for the explanation of  Multiple entries are separated with commas; read on for the explanation of
1652  binary dependencies to find out more about the syntax of these lines.  binary dependencies to find out more about the syntax of these lines.
# Line 1524  satisfy the Debian Policy requirement fo Line 1665  satisfy the Debian Policy requirement fo
1665  For source packages which have some binary packages with <literal>Architecture:  For source packages which have some binary packages with <literal>Architecture:
1666  any</literal>, they are rebuild by the autobuilder.  Since this autobuilder  any</literal>, they are rebuild by the autobuilder.  Since this autobuilder
1667  procedure runs <literal>debian/rules build</literal> in it while installing  procedure runs <literal>debian/rules build</literal> in it while installing
1668  only packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="autobuilder"/> ), the <literal>Build-Depends</literal> field needs to  only packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="autobuilder"/>), the <literal>Build-Depends</literal> field needs to
1669  list practically all the required packages and the  list practically all the required packages and the
1670  <literal>Build-Depends-indep</literal> is rarely used.  <literal>Build-Depends-indep</literal> is rarely used.
1671  </para>  </para>
# Line 1543  for the <literal>clean</literal> target. Line 1684  for the <literal>clean</literal> target.
1684  If you are not sure which one should be used, use the  If you are not sure which one should be used, use the
1685  <literal>Build-Depends</literal> field to be on the safe side.  <literal>Build-Depends</literal> field to be on the safe side.
1686  <footnote><para> This somewhat strange situation is a feature well documented  <footnote><para> This somewhat strange situation is a feature well documented
1687  in the <ulink url="http://www.debian.org/doc/debian-policy/footnotes.html#f48">Debian Policy  in the <ulink url="&policy-build-depends-indep;">Debian Policy
1688  Manual, Footnotes 48</ulink>.  This is not due to the use of the  Manual, Footnotes 48</ulink>.  This is not due to the use of the
1689  <command>dh</command> command in the <filename>debian/rules</filename> file but  <command>dh</command> command in the <filename>debian/rules</filename> file but
1690  due to how the <command>dpkg-buildpackage</command> works.  The same situation  due to how the <command>dpkg-buildpackage</command> works.  The same situation
# Line 1581  the problem of excessive build dependenc Line 1722  the problem of excessive build dependenc
1722  next to <systemitem role="package">debhelper</systemitem>.  next to <systemitem role="package">debhelper</systemitem>.
1723  </para>  </para>
1724  <para>  <para>
1725  Line 6 is the version of the <ulink url="http://www.debian.org/doc/devel-manuals#policy">Debian Policy  Line 6 is the version of the <ulink url="&debian-policy;">Debian Policy
1726  Manual</ulink> standards this package follows, the one you read while making  Manual</ulink> standards this package follows, the one you read while making
1727  your package.  your package.
1728  </para>  </para>
# Line 1625  these relations; if not, it will be expl Line 1766  these relations; if not, it will be expl
1766  </citerefentry> etc.)  </citerefentry> etc.)
1767  </para>  </para>
1768  <para>  <para>
1769  This is what the dependencies mean:  Here is a simplified description of package relationships.
1770    <footnote><para>See
1771    <ulink url="&policy-relationships;">Debian Policy Manual, 7 'Declaring relationships between packages'</ulink>.
1772    </para></footnote>
1773  </para>  </para>
1774  <itemizedlist>  <itemizedlist>
1775  <listitem>  <listitem>
# Line 1672  ignore this field. Line 1816  ignore this field.
1816  This is stronger than <literal>Depends</literal>.  The package will not be  This is stronger than <literal>Depends</literal>.  The package will not be
1817  installed unless the packages it pre-depends on are installed and  installed unless the packages it pre-depends on are installed and
1818  <emphasis>correctly configured</emphasis>.  Use this <emphasis>very</emphasis>  <emphasis>correctly configured</emphasis>.  Use this <emphasis>very</emphasis>
1819  sparingly and only after discussing it on the <ulink url="http://lists.debian.org/debian-devel/">debian-devel@lists.debian.org</ulink>  sparingly and only after discussing it on the <ulink url="&debian-devel-ldo;">debian-devel@lists.debian.org</ulink>
1820  mailing list.  Read: don't use it at all.  :-)  mailing list.  Read: don't use it at all.  :-)
1821  </para>  </para>
1822  </listitem>  </listitem>
# Line 1704  package management tools. Line 1848  package management tools.
1848  <para>  <para>
1849  For some types of packages where there are multiple alternatives virtual names  For some types of packages where there are multiple alternatives virtual names
1850  have been defined.  You can get the full list in the  have been defined.  You can get the full list in the
1851  <filename>/usr/share/doc/debian-policy/virtual-package-names-list.txt.gz</filename>  <ulink url="&virtual-package;">virtual-package-names-list.txt.gz</ulink>
1852  file.  Use this if your program provides a function of an existing virtual  file.  Use this if your program provides a function of an existing virtual
1853  package.  package.
1854  </para>  </para>
# Line 1746  Replaces: quux (&lt;&lt; 5), quux-foo (& Line 1890  Replaces: quux (&lt;&lt; 5), quux-foo (&
1890  <para>  <para>
1891  The last feature you need to know about is  The last feature you need to know about is
1892  <literal>${shlibs:Depends}</literal>, <literal>${perl:Depends}</literal>,  <literal>${shlibs:Depends}</literal>, <literal>${perl:Depends}</literal>,
1893  <literal>${misc:Depends}</literal>, etc.  These entries are substituted by the  <literal>${misc:Depends}</literal>, etc.
 list generated by other <systemitem role="package">debhelper</systemitem>  
 components when the <citerefentry> <refentrytitle>dh_gencontrol</refentrytitle>  
 <manvolnum>1</manvolnum> </citerefentry> command is executed.  
1894  </para>  </para>
1895  <para>  <para>
1896  <citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle>  <citerefentry> <refentrytitle>dh_shlibdeps</refentrytitle>
1897  <manvolnum>1</manvolnum> </citerefentry> will scan it for binaries and  <manvolnum>1</manvolnum> </citerefentry> calculates shared library dependencies
1898  libraries determine their shared library dependencies and detect which packages  for binary packages.  It generates a list of ELF executables and shared
1899  they are in, such as <systemitem role="package">libc6</systemitem> or  libraries it has found for each binary package.  Such list is used for
1900  <systemitem role="package">xlib6g</systemitem>, after your package has been  substituting <literal>${shlibs:Depends}</literal>.
 built and installed into the temporary directory.  This list of shared library  
 dependencies is used for <literal>${shlibs:Depends}</literal>.  
1901  </para>  </para>
1902  <para>  <para>
1903  The package list generated by the <citerefentry>  <citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</manvolnum>
1904  <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>  </citerefentry> calculates Perl dependencies.  It generates a list of a
1905  is used for <literal>${perl:Depends}</literal>.  dependency on <literal>perl</literal> or <literal>perlapi</literal> for each binary package.  Such list is used for
1906    substituting <literal>${perl:Depends}</literal>.
1907  </para>  </para>
1908  <para>  <para>
1909  Some <systemitem role="package">debhelper</systemitem> commands may make the  Some <systemitem role="package">debhelper</systemitem> commands may make the
1910  generated package need to depend on some other packages.  This list of required  generated package need to depend on some other packages.  All such commands
1911  packages is used for <literal>${misc:Depends}</literal>.  generate a list of required packages for each binary package.
1912    Such list is used for substituting <literal>${misc:Depends}</literal>.
1913    </para>
1914    <para>
1915    <citerefentry> <refentrytitle>dh_gencontrol</refentrytitle>
1916    <manvolnum>1</manvolnum> </citerefentry> generates
1917    <filename>DEBIAN/control</filename> for each binary package while
1918    substituting <literal>${shlibs:Depends}</literal>,
1919    <literal>${perl:Depends}</literal>, <literal>${misc:Depends}</literal>, etc.
1920  </para>  </para>
1921  <para>  <para>
1922  Having said all that, we can leave the <literal>Depends</literal> field exactly  Having said all that, we can leave the <literal>Depends</literal> field exactly
# Line 1777  file</literal>, because <systemitem role Line 1925  file</literal>, because <systemitem role
1925  some features provided by that <systemitem role="package">file</systemitem>  some features provided by that <systemitem role="package">file</systemitem>
1926  package.  package.
1927  </para>  </para>
1928    <para> Line 9 is the Homepage URL.  Let's assume this to be at
1929    <ulink url="&gentoo;"/>.
1930    </para>
1931  <para>  <para>
1932  Line 12 is the short description.  Most people screens are 80 columns wide so  Line 12 is the short description.  Most people screens are 80 columns wide so
1933  this shouldn't be longer than about 60 characters.  I'll change it to  this shouldn't be longer than about 60 characters.  I'll change it to
# Line 1787  Line 13 is where the long description go Line 1938  Line 13 is where the long description go
1938  gives more details about the package.  Column 1 of each line should be empty.  gives more details about the package.  Column 1 of each line should be empty.
1939  There must be no blank lines, but you can put a single <literal>.</literal>  There must be no blank lines, but you can put a single <literal>.</literal>
1940  (dot) in a column to simulate that.  Also, there must be no more than one blank  (dot) in a column to simulate that.  Also, there must be no more than one blank
1941  line after the long description.  line after the long description. <footnote><para>These descriptions are in
1942    English.  Translations of these descriptions are provided by
1943    <ulink url="&ddtp;">The Debian Description Translation Project - DDTP</ulink>.</para></footnote>
1944  </para>  </para>
1945  <para>  <para>
1946  Let's insert <literal>Vcs-*</literal> fields documented in <ulink url="http://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-vcs">Developer's  Let's insert <literal>Vcs-*</literal> fields to document the Version Control
1947  Reference, 6.2.5.  'Version Control System location'</ulink> between line 6 and  System (VCS) location between line 6 and 7.
1948  7.  Let's assume that the <systemitem role="package">gentoo</systemitem>  <footnote><para>See
1949  package is located in Debian Alioth Git Service at  <ulink url="&devref-bpp-vcs;">Developer's Reference, 6.2.5. 'Version Control System location'</ulink>.
1950    </para></footnote>
1951    Let's assume that the <systemitem role="package">gentoo</systemitem>
1952    package has its VCS located in Debian Alioth Git Service at
1953  <literal>git://git.debian.org/git/collab-maint/gentoo.git</literal>.  <literal>git://git.debian.org/git/collab-maint/gentoo.git</literal>.
1954  </para>  </para>
1955  <para>  <para>
# Line 1808  Finally, here is the updated <filename>c Line 1964  Finally, here is the updated <filename>c
1964   6 Standards-Version: 3.8.4   6 Standards-Version: 3.8.4
1965   7 Vcs-Git: git://git.debian.org/git/collab-maint/gentoo.git   7 Vcs-Git: git://git.debian.org/git/collab-maint/gentoo.git
1966   8 Vcs-browser: http://git.debian.org/?p=collab-maint/gentoo.git   8 Vcs-browser: http://git.debian.org/?p=collab-maint/gentoo.git
1967   9 Homepage: http://www.obsession.se/gentoo/   9 Homepage: &gentoo;
1968  10  10
1969  11 Package: gentoo  11 Package: gentoo
1970  12 Architecture: any  12 Architecture: any
# Line 1836  Finally, here is the updated <filename>c Line 1992  Finally, here is the updated <filename>c
1992  <section id="copyright"><title><filename>copyright</filename> file</title>  <section id="copyright"><title><filename>copyright</filename> file</title>
1993  <para>  <para>
1994  This file contains the information about package upstream resources, copyright  This file contains the information about package upstream resources, copyright
1995  and license information.  Its format is not dictated by the Debian Policy  and license information.
1996  Manual, but the content is (<ulink url="http://www.debian.org/doc/debian-policy/ch-docs.html#s-copyrightfile">Debian  <ulink url="&policy-copyright;">Debian Policy Manual, 12.5 'Copyright information'</ulink>
1997  Policy Manual, 12.5 'Copyright information'</ulink>).  You may also consult  dictates its content and
1998  <ulink url="http://dep.debian.net/deps/dep5/">DEP-5: Machine-parseable  <ulink url="&dep5;">DEP-5: Machine-parseable <filename>debian/copyright</filename></ulink>
1999  debian/copyright</ulink>.  provides guidelines for its format.
2000  </para>  </para>
2001  <para>  <para>
2002  <command>dh_make</command> can give you a template  <command>dh_make</command> can give you a template
# Line 1901  In short, here's how <systemitem role="p Line 2057  In short, here's how <systemitem role="p
2057  </para>  </para>
2058  <para>  <para>
2059  Please follow the HOWTO provided by ftpmasters and sent to  Please follow the HOWTO provided by ftpmasters and sent to
2060  debian-devel-announce: <ulink url="&copyright-howto;">&copyright-howto;</ulink>.  debian-devel-announce: <ulink url="&howto-copyright;"/>.
2061  </para>  </para>
2062  </section>  </section>
2063  <section id="changelog"><title><filename>changelog</filename> file</title>  <section id="changelog"><title><filename>changelog</filename> file</title>
2064  <para>  <para>
2065  This is a required file, which has a special format described in the <ulink url="http://www.debian.org/doc/debian-policy/ch-source.html#s-dpkgchangelog">Debian  This is a required file, which has a special format described in the
2066  Policy Manual, 4.4 'debian/changelog'</ulink>.  This format is used by  <ulink url="&policy-dpkgchangelog;">Debian Policy Manual, 4.4 'debian/changelog'</ulink>.
2067  <command>dpkg</command> and other programs to obtain the version number,  This format is used by <command>dpkg</command> and other programs to obtain the
2068  revision, distribution and urgency of your package.  version number, revision, distribution and urgency of your package.
2069  </para>  </para>
2070  <para>  <para>
2071  For you, it is also important, since it is good to have documented all changes  For you, it is also important, since it is good to have documented all changes
# Line 1971  You will end up with something like this Line 2127  You will end up with something like this
2127  </para>  </para>
2128  <para>  <para>
2129  You can read more about updating the <filename>changelog</filename> file later  You can read more about updating the <filename>changelog</filename> file later
2130  in <xref linkend="update"/> .  in <xref linkend="update"/>.
2131  </para>  </para>
2132  </section>  </section>
2133  <section id="rules"><title><filename>rules</filename> file</title>  <section id="rules"><title><filename>rules</filename> file</title>
# Line 1987  is marked as executable. Line 2143  is marked as executable.
2143  <para>  <para>
2144  Every <filename>rules</filename> file, as any other  Every <filename>rules</filename> file, as any other
2145  <filename>Makefile</filename>, consists of several targets and their rules  <filename>Makefile</filename>, consists of several targets and their rules
2146  specifying how to handle the source.  <ulink url="http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules">Debian  specifying how to handle the source.  <ulink url="&policy-debianrules;">Debian
2147  Policy Manual, 4.9 'Main building script: debian/rules'</ulink> explains its  Policy Manual, 4.9 'Main building script: debian/rules'</ulink> explains its
2148  details.  details.
2149  </para>  </para>
# Line 2020  binary package under the <filename>debia Line 2176  binary package under the <filename>debia
2176  <literal>binary</literal> target: to create all binary packages (effectively  <literal>binary</literal> target: to create all binary packages (effectively
2177  combination of <literal>binary-arch</literal> and  combination of <literal>binary-arch</literal> and
2178  <literal>binary-indep</literal> targets).  (required)<footnote><para> This  <literal>binary-indep</literal> targets).  (required)<footnote><para> This
2179  target is used by <literal>dpkg-buildpackage</literal> as in <xref linkend="completebuild"/> .  </para> </footnote>  target is used by <literal>dpkg-buildpackage</literal> as in <xref linkend="completebuild"/>.  </para> </footnote>
2180  </para>  </para>
2181  </listitem>  </listitem>
2182  <listitem>  <listitem>
# Line 2028  target is used by <literal>dpkg-buildpac Line 2184  target is used by <literal>dpkg-buildpac
2184  <literal>binary-arch</literal> target: to create arch-dependent  <literal>binary-arch</literal> target: to create arch-dependent
2185  (<literal>Architecture: any</literal>) binary packages in the parent directory.  (<literal>Architecture: any</literal>) binary packages in the parent directory.
2186  (required)<footnote><para> This target is used by <literal>dpkg-buildpackage  (required)<footnote><para> This target is used by <literal>dpkg-buildpackage
2187  -B</literal> as in <xref linkend="autobuilder"/> .  </para> </footnote>  -B</literal> as in <xref linkend="autobuilder"/>.  </para> </footnote>
2188  </para>  </para>
2189  </listitem>  </listitem>
2190  <listitem>  <listitem>
# Line 2093  It tells the operating system that this Line 2249  It tells the operating system that this
2249  <filename>/usr/bin/make</filename>.  <filename>/usr/bin/make</filename>.
2250  </para>  </para>
2251  <para>  <para>
2252  Line 10 can be uncommented to set <literal>DH_VERBOSE</literal> variable to 1.  Line 11 can be uncommented to set <literal>DH_VERBOSE</literal> variable to 1.
2253  Then, the <command>dh</command> command will output which  Then, the <command>dh</command> command will output which
2254  <command>dh_*</command> commands are executed by the <command>dh</command>  <command>dh_*</command> commands are executed by the <command>dh</command>
2255  command.  You can also add <literal>export DH_OPTIONS=-v</literal> line here.  command.  You can also add <literal>export DH_OPTIONS=-v</literal> line here.
# Line 2108  anything from you. Line 2264  anything from you.
2264  Lines 12 and 13 are where all the work is done.  The percent sign means any  Lines 12 and 13 are where all the work is done.  The percent sign means any
2265  targets which then call a single program, <command>dh</command> with the target  targets which then call a single program, <command>dh</command> with the target
2266  name.  <footnote><para> This uses the new <systemitem role="package">debhelper</systemitem> V7 features.  Its design concepts are  name.  <footnote><para> This uses the new <systemitem role="package">debhelper</systemitem> V7 features.  Its design concepts are
2267  explained in <ulink url="http://joey.kitenet.net/talks/debhelper/debhelper-slides.pdf">Not Your  explained in <ulink url="&debhelper-slides;">Not Your
2268  Grandpa's Debhelper</ulink> presented at Debconf9 by the <systemitem role="package">debhelper</systemitem> upstream.  Under  Grandpa's Debhelper</ulink> presented at Debconf9 by the <systemitem role="package">debhelper</systemitem> upstream.  Under
2269  <literal>lenny</literal>, <command>dh_make</command> created a much more  <literal>lenny</literal>, <command>dh_make</command> created a much more
2270  complicated <filename>rules</filename> file with many <command>dh_*</command>  complicated <filename>rules</filename> file with many <command>dh_*</command>
2271  scripts listed for each required explicit targets and frozen them to the state  scripts listed for each required explicit targets and frozen them to the state
2272  when it was initially packaged.  This new <command>dh</command> command is  when it was initially packaged.  This new <command>dh</command> command is
2273  simpler and frees us from this constrain.  You still have full power to  simpler and frees us from this constrain.  You still have full power to
2274  customize this with <literal>override_dh_*</literal> targets.  See <xref linkend="customrules"/> .  It is based only on the <systemitem role="package">debhelper</systemitem> package and does not obfuscate the  customize this with <literal>override_dh_*</literal> targets.  See <xref linkend="customrules"/>.  It is based only on the <systemitem role="package">debhelper</systemitem> package and does not obfuscate the
2275  package building process like the <systemitem role="package">cdbs</systemitem>  package building process like the <systemitem role="package">cdbs</systemitem>
2276  package.  </para> </footnote> The <command>dh</command> command is a wrapper  package.  </para> </footnote> The <command>dh</command> command is a wrapper
2277  script which runs appropriate sequences of <command>dh_*</command> programs  script which runs appropriate sequences of <command>dh_*</command> programs
# Line 2529  This installs <command>bash</command> co Line 2685  This installs <command>bash</command> co
2685  </listitem>  </listitem>
2686  </itemizedlist>  </itemizedlist>
2687  <para>  <para>
 For sources using Autotools, use combination of above as <literal>dh --with  
 autotools-dev --with autoreconf $@</literal> to be most current with the GNU  
 Build System.  
 </para>  
 <para>  
2688  Many <command>dh_*</command> commands invoked by the new <command>dh</command>  Many <command>dh_*</command> commands invoked by the new <command>dh</command>
2689  command can be customized by the corresponding configuration files in the  command can be customized by the corresponding configuration files in the
2690  <filename>debian</filename> directory.  See <xref linkend="dother"/> and the  <filename>debian</filename> directory.  See <xref linkend="dother"/> and the
# Line 2560  corner cases.  Use of simplified equival Line 2711  corner cases.  Use of simplified equival
2711  kill such <systemitem role="package">debhelper</systemitem>'s smart features.  kill such <systemitem role="package">debhelper</systemitem>'s smart features.
2712  </para>  </para>
2713  <para>  <para>
2714  If you want to store the system configuration data for the <systemitem role="package">gentoo</systemitem> package in the  If you want to store the system configuration data in the
2715  <filename>/etc/gentoo</filename> directory instead of the usual  <filename>/etc/gentoo</filename> directory instead of the usual
2716  <filename>/etc</filename> directory, you can override the default  <filename>/etc</filename> directory for the recent
2717    <systemitem role="package">gentoo</systemitem> package using Autotools, you can override the default
2718  <literal>--sysconfig=/etc</literal> argument given by the  <literal>--sysconfig=/etc</literal> argument given by the
2719  <command>dh_auto_configure</command> command to the  <command>dh_auto_configure</command> command to the
2720  <command>./configure</command> command by the following.  <footnote><para> The  <command>./configure</command> command by the following.
 <systemitem role="package">gentoo</systemitem> package uses the GNU build  
 system, also known as the Autotools.  See <ulink url="http://en.wikipedia.org/wiki/GNU_build_system">http://en.wikipedia.org/wiki/GNU_build_system</ulink>.  
 </para> </footnote>  
2721  </para>  </para>
2722  <screen>  <screen>
2723  override_dh_auto_configure:  override_dh_auto_configure:
# Line 2649  possible. Line 2798  possible.
2798  To control most of what <systemitem role="package">debhelper</systemitem> does  To control most of what <systemitem role="package">debhelper</systemitem> does
2799  while building the package, you put optional configuration files under the  while building the package, you put optional configuration files under the
2800  <filename>debian</filename> directory.  This chapter will make an overview of  <filename>debian</filename> directory.  This chapter will make an overview of
2801  what each of these does and its format.  Please read <ulink url="http://www.debian.org/doc/devel-manuals#policy">Debian Policy  what each of these does and its format.  Please read <ulink url="&debian-policy;">Debian Policy
2802  Manual</ulink> and <ulink url="http://www.debian.org/doc/devel-manuals#devref">Debian Developer's  Manual</ulink> and <ulink url="&developers-reference;">Debian Developer's
2803  Reference</ulink> for guidelines for the packaging.  Reference</ulink> for guidelines for the packaging.
2804  </para>  </para>
2805  <para>  <para>
# Line 2660  filenames suffixed by <literal>.ex</lite Line 2809  filenames suffixed by <literal>.ex</lite
2809  prefixed by the binary package name such as  prefixed by the binary package name such as
2810  <literal><replaceable>package</replaceable></literal>.  Take a look at all of  <literal><replaceable>package</replaceable></literal>.  Take a look at all of
2811  them.  them.
2812    <footnote><para>
2813    In this chapter, files in the <filename>debian</filename> directory are
2814    referred without preceding <filename>debian/</filename> for simplicity whenever
2815    they are obvious.
2816    </para></footnote>
2817  </para>  </para>
2818  <para>  <para>
2819  The <command>dh_make</command> command may not create some template  The <command>dh_make</command> command may not create some template
# Line 2694  remove template files which you do not n Line 2848  remove template files which you do not n
2848  </listitem>  </listitem>
2849  <listitem>  <listitem>
2850  <para>  <para>
2851  modify the <filename>control</filename> file (see <xref linkend="control"/> ),  modify the <filename>control</filename> file (see <xref linkend="control"/>),
2852  if necessary.  if necessary.
2853  </para>  </para>
2854  </listitem>  </listitem>
2855  <listitem>  <listitem>
2856  <para>  <para>
2857  modify the <filename>rules</filename> file (see <xref linkend="rules"/> ), if  modify the <filename>rules</filename> file (see <xref linkend="rules"/>), if
2858  necessary.  necessary.
2859  </para>  </para>
2860  </listitem>  </listitem>
# Line 2748  $ echo 7 &gt; debian/compat Line 2902  $ echo 7 &gt; debian/compat
2902  <para>  <para>
2903  One of the most annoying things about software is when you spend a great deal  One of the most annoying things about software is when you spend a great deal
2904  of time and effort customizing a program, only to have an upgrade stomp all  of time and effort customizing a program, only to have an upgrade stomp all
2905  over your changes.  Debian solves this problem by marking configuration files  over your changes.  Debian solves this problem by marking such configuration files as conffiles.
2906  so that when you upgrade a package, you'll be prompted whether you want to keep  <footnote><para>See <citerefentry> <refentrytitle>dpkg</refentrytitle>
2907  your old configuration or not.  <manvolnum>1</manvolnum> </citerefentry> and
2908    <ulink url="&policy-conffiles;">Debian Policy Manual 'D.2.5 Conffiles'</ulink>.
2909    </para></footnote>
2910    When you upgrade a package, you'll be prompted whether you want to keep
2911    your old configuration files or not.
2912  </para>  </para>
2913  <para>  <para>
2914  Since <systemitem role="package">debhelper</systemitem> V3, <citerefentry>  Since <systemitem role="package">debhelper</systemitem> V3, <citerefentry>
# Line 2787  the <filename>/etc</filename> directory. Line 2945  the <filename>/etc</filename> directory.
2945  </listitem>  </listitem>
2946  </itemizedlist>  </itemizedlist>
2947  <para>  <para>
2948  For more information on the <emphasis>maintainer scripts</emphasis>, see <xref linkend="maintscripts"/> .  For more information on the <emphasis>maintainer scripts</emphasis>, see <xref linkend="maintscripts"/>.
2949  </para>  </para>
2950  </section>  </section>
2951  <section id="crond"><title><filename><replaceable>package</replaceable>.cron.*</filename> files</title>  <section id="crond"><title><filename><replaceable>package</replaceable>.cron.*</filename> files</title>
# Line 2856  means there is a problem with the <filen Line 3014  means there is a problem with the <filen
3014  </para>  </para>
3015  <para>  <para>
3016  Files listed in the <filename>install</filename> file doesn't need the  Files listed in the <filename>install</filename> file doesn't need the
3017  directories created first.  See <xref linkend="install"/> .  directories created first.  See <xref linkend="install"/>.
3018  </para>  </para>
3019  <para>  <para>
3020  It is best to first try to run the installation first and only use this if you  It is best to try to run the installation first and only use this if you
3021  run into trouble.  There is no preceding slash on the directory names.  run into trouble.  There is no preceding slash on the directory names listed in
3022    the <filename>dirs</filename> file.
3023  </para>  </para>
3024  </section>  </section>
3025  <section id="doc-base"><title><filename><replaceable>package</replaceable>.doc-base</filename> file</title>  <section id="doc-base"><title><filename><replaceable>package</replaceable>.doc-base</filename> file</title>
# Line 2895  Files: /usr/share/doc/gentoo/html/*.html Line 3054  Files: /usr/share/doc/gentoo/html/*.html
3054  For information on the file format, see <citerefentry>  For information on the file format, see <citerefentry>
3055  <refentrytitle>install-docs</refentrytitle> <manvolnum>8</manvolnum>  <refentrytitle>install-docs</refentrytitle> <manvolnum>8</manvolnum>
3056  </citerefentry> and the <systemitem role="package">doc-base</systemitem>  </citerefentry> and the <systemitem role="package">doc-base</systemitem>
3057  manual, in <filename>/usr/share/doc/doc-base/doc-base.html/</filename>.  manual, in <ulink url="&doc-base;">Debian doc-base Manual</ulink>.
3058  </para>  </para>
3059  <para>  <para>
3060  For more details on installing additional documentation, look in <xref linkend="destdir"/> .  For more details on installing additional documentation, look in <xref linkend="destdir"/>.
3061  </para>  </para>
3062  </section>  </section>
3063  <section id="docs"><title><filename>docs</filename> file</title>  <section id="docs"><title><filename>docs</filename> file</title>
# Line 2956  obviously disregarded my initial recomme Line 3115  obviously disregarded my initial recomme
3115  <para>  <para>
3116  The <filename><replaceable>package</replaceable>.init</filename> file is  The <filename><replaceable>package</replaceable>.init</filename> file is
3117  installed as the  installed as the
3118  <filename>/etc/init.d/<replaceable>package</replaceable></filename> script.  <filename>/etc/init.d/<replaceable>package</replaceable></filename> script
3119    for the <emphasis>init script</emphasis> which starts and stops a daemon.
3120  Its fairly generic skeleton template is provided by the  Its fairly generic skeleton template is provided by the
3121  <command>dh_make</command> command as <filename>init.d.ex</filename>.  You'll  <command>dh_make</command> command as <filename>init.d.ex</filename>.  You'll
3122  likely have to rename and edit it, a lot, while making sure to provide  likely have to rename and edit it, a lot, while making sure to provide
3123  Filesystem Hierarchy Standard (see  <ulink url="&lsb;">Linux Standard Base</ulink> (LSB) compliant headers.  It
 <filename>/usr/share/doc/debian-policy/fhs/</filename>) compliant headers.  It  
3124  gets installed into the temporary directory by <citerefentry>  gets installed into the temporary directory by <citerefentry>
3125  <refentrytitle>dh_installinit</refentrytitle> <manvolnum>1</manvolnum>  <refentrytitle>dh_installinit</refentrytitle> <manvolnum>1</manvolnum>
3126  </citerefentry>.  </citerefentry>.
# Line 2970  gets installed into the temporary direct Line 3129  gets installed into the temporary direct
3129  The <filename><replaceable>package</replaceable>.default</filename> file will  The <filename><replaceable>package</replaceable>.default</filename> file will
3130  be installed into  be installed into
3131  <filename>/etc/default/<replaceable>package</replaceable></filename>.  This  <filename>/etc/default/<replaceable>package</replaceable></filename>.  This
3132  file sets defaults that are sourced by the init script.  Most times this  file sets defaults that are sourced by the <emphasis>init script</emphasis>.  Most times this
3133  default file is used to disable running a daemon, set some default flags or  <filename><replaceable>package</replaceable>.default</filename> file is used to disable running a daemon, set some default flags or
3134  timeouts.  If your init script has certain <emphasis>settable</emphasis>  timeouts.  If your <emphasis>init script</emphasis> has certain <emphasis>settable</emphasis>
3135  features you want to install these into the default file, not the init script.  features you want to install these into the <filename><replaceable>package</replaceable>.default</filename> file, not the <emphasis>init script</emphasis>.
3136  </para>  </para>
3137  <para>  <para>
3138  If your upstream program has an init file you can either use it or not.  If you  If your upstream program provides a file for the <emphasis>init script</emphasis>, you can either use it or not.  If you
3139  don't use their init.d script then create a new one in  don't use their <emphasis>init script</emphasis> then create a new one in
3140  <filename>debian/<replaceable>package</replaceable>.init</filename>.  However  <filename><replaceable>package</replaceable>.init</filename>.  However
3141  if the upstream init script looks fine and installs in the right place you  if the upstream <emphasis>init script</emphasis> looks fine and installs in the right place you
3142  still need to setup the <filename>rc*</filename> symlinks.  To do this you will  still need to setup the <filename>rc*</filename> symlinks.  To do this you will
3143  need to override <command>dh_installinit</command> in the  need to override <command>dh_installinit</command> in the
3144  <filename>rules</filename> file with the following lines:  <filename>rules</filename> file with the following lines:
# Line 3048  If <systemitem role="package">lintian</s Line 3207  If <systemitem role="package">lintian</s
3207  diagnostics for a case when the policy allows exceptions to some rule, you can  diagnostics for a case when the policy allows exceptions to some rule, you can
3208  use <filename><replaceable>package</replaceable>.lintian-overrides</filename>  use <filename><replaceable>package</replaceable>.lintian-overrides</filename>
3209  or <filename>source/lintian-overrides</filename> to quiet it.  Please read  or <filename>source/lintian-overrides</filename> to quiet it.  Please read
3210  <filename>/usr/share/doc/lintian/lintian.html/index.html</filename> and refrain  <ulink url="&lintian-doc;">Lintian User's Manual</ulink> and refrain
3211  from abusing this.  from abusing this.
3212  </para>  </para>
3213  <para>  <para>
# Line 3087  as the first suffix, which means it's a Line 3246  as the first suffix, which means it's a
3246  sure to verify that this section is indeed the correct one.  Here's a short  sure to verify that this section is indeed the correct one.  Here's a short
3247  list of manual page sections:  list of manual page sections:
3248  </para>  </para>
3249  <screen>  <table id="manpage-sections" pgwide="0" frame="topbot" rowsep="1" colsep="1">
3250  Section |     Description     |     Notes  <title>manual page sections</title>
3251     1     User commands          Executable commands or scripts.  <tgroup cols="3">
3252     2     System calls           Functions provided by the kernel.    <colspec colwidth="8*" align="left"/> <colspec colwidth="24*" align="left"/> <colspec colwidth="40*" align="left"/>
3253     3     Library calls          Functions within system libraries.    <thead>
3254     4     Special files          Usually found in /dev      <row> <entry>Section</entry> <entry>Description</entry> <entry>Notes</entry> </row>
3255     5     File formats           E.g. /etc/passwd's format    </thead>
3256     6     Games                  Or other frivolous programs    <tbody>
3257     7     Macro packages         Such as man macros.      <row> <entry>1</entry> <entry>User command</entry> <entry>Executable commands or scripts</entry> </row>
3258     8     System administration  Programs typically only run by root.      <row> <entry>2</entry> <entry>System calls</entry> <entry>Functions provided by the kernel</entry> </row>
3259     9     Kernel routines        Non-standard calls and internals.      <row> <entry>3</entry> <entry>Library calls</entry> <entry>Functions within system libraries</entry> </row>
3260  </screen>      <row> <entry>4</entry> <entry>Special files</entry> <entry>Usually found in <filename>/dev</filename></entry> </row>
3261        <row> <entry>5</entry> <entry>File formats</entry> <entry>E.g. <filename>/etc/passwd</filename>'s format</entry> </row>
3262        <row> <entry>6</entry> <entry>Games</entry> <entry>Games or other frivolous programs</entry> </row>
3263        <row> <entry>7</entry> <entry>Macro packages</entry> <entry>Such as <command>man</command> macros</entry> </row>
3264        <row> <entry>8</entry> <entry>System administration</entry> <entry>Programs typically only run by root</entry> </row>
3265        <row> <entry>9</entry> <entry>Kernel routines</entry> <entry>Non-standard calls and internals</entry> </row>
3266      </tbody>
3267    </tgroup>
3268    </table>
3269  <para>  <para>
3270  So <systemitem role="package">gentoo</systemitem>'s man page should be called  So <systemitem role="package">gentoo</systemitem>'s man page should be called
3271  <filename>gentoo.1</filename>.  If there was no <filename>gentoo.1</filename>  <filename>gentoo.1</filename>.  If there was no <filename>gentoo.1</filename>
# Line 3205  If your package has manual pages, you sh Line 3372  If your package has manual pages, you sh
3372  <filename><replaceable>package</replaceable>.manpages</filename> files.  <filename><replaceable>package</replaceable>.manpages</filename> files.
3373  </para>  </para>
3374  <para>  <para>
3375  To install <filename>doc/gentoo.1</filename> for the <systemitem role="package">gentoo</systemitem> package as its manpage, you create a  To install <filename>docs/gentoo.1</filename> for the <systemitem role="package">gentoo</systemitem> package as its manpage, you create a
3376  <filename>gentoo.manpages</filename> file as:  <filename>gentoo.manpages</filename> file as the following.
3377  </para>  </para>
3378  <screen>  <screen>
3379  docs/gentoo.1  docs/gentoo.1
# Line 3220  the system will be created for them. Line 3387  the system will be created for them.
3387  </para>  </para>
3388  <para>  <para>
3389  Here's the default <filename>menu.ex</filename> file that  Here's the default <filename>menu.ex</filename> file that
3390  <command>dh_make</command> created:  <command>dh_make</command> created.
3391  </para>  </para>
3392  <screen>  <screen>
3393  ?package(gentoo):needs=X11|text|vc|wm \  ?package(gentoo):needs=X11|text|vc|wm \
# Line 3233  specifies what kind of interface the pro Line 3400  specifies what kind of interface the pro
3400  listed alternatives, e.g.  <literal>text</literal> or <literal>X11</literal>.  listed alternatives, e.g.  <literal>text</literal> or <literal>X11</literal>.
3401  </para>  </para>
3402  <para>  <para>
3403  The next is <literal>section</literal>, where the menu and submenu the entry  The next is <literal>section</literal>, where the menu and submenu entry
3404  should appear in.  The current list of sections <footnote><para> There were a  should appear in.
3405  major reorganization of menu structure for <literal>squeeze</literal>.  </para>  <footnote><para> The current list of sections is at
3406  </footnote> is at:  <ulink url="&menu-structure;">The Debian Menu sub-policy 2.1 'Preferred menu structure'</ulink>.
3407  <filename>/usr/share/doc/debian-policy/menu-policy.html/ch2.html#s2.1</filename>  There were a major reorganization of menu structure for <literal>squeeze</literal>.
3408    </para> </footnote>
3409  </para>  </para>
3410  <para>  <para>
3411  The <literal>title</literal> field is the name of the program.  You can start  The <literal>title</literal> field is the name of the program.  You can start
# Line 3263  You can also add other fields like <lite Line 3431  You can also add other fields like <lite
3431  </citerefentry>, <citerefentry> <refentrytitle>menufile</refentrytitle>  </citerefentry>, <citerefentry> <refentrytitle>menufile</refentrytitle>
3432  <manvolnum>5</manvolnum> </citerefentry>, <citerefentry>  <manvolnum>5</manvolnum> </citerefentry>, <citerefentry>
3433  <refentrytitle>update-menus</refentrytitle> <manvolnum>1</manvolnum>  <refentrytitle>update-menus</refentrytitle> <manvolnum>1</manvolnum>
3434  </citerefentry> and  </citerefentry> and
3435  <filename>/usr/share/doc/debian-policy/menu-policy.html/</filename> for more  <ulink url="&menu-policy;">The Debian Menu sub-policy</ulink> for more
3436  information.  information.
3437  </para>  </para>
3438  </section>  </section>
# Line 3289  package is installed, upgraded or remove Line 3457  package is installed, upgraded or remove
3457  <para>  <para>
3458  As a novice maintainer, you should avoid any manual editing of  As a novice maintainer, you should avoid any manual editing of
3459  <emphasis>maintainer scripts</emphasis> because they are problematic.  For more  <emphasis>maintainer scripts</emphasis> because they are problematic.  For more
3460  information look in the <ulink url="http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html">Debian  information look in the <ulink url="&policy-mantainerscripts;">Debian
3461  Policy Manual, 6 'Package maintainer scripts and installation  Policy Manual, 6 'Package maintainer scripts and installation
3462  procedure'</ulink>, and take a look at these example files provided by  procedure'</ulink>, and take a look at these example files provided by
3463  <command>dh_make</command>.  <command>dh_make</command>.
# Line 3338  The <filename>watch</filename> file form Line 3506  The <filename>watch</filename> file form
3506  <refentrytitle>uscan</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>  <refentrytitle>uscan</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
3507  manpage.  The <filename>watch</filename> file configures the  manpage.  The <filename>watch</filename> file configures the
3508  <command>uscan</command> program (in the <systemitem role="package">devscripts</systemitem> package) to watch the site where you  <command>uscan</command> program (in the <systemitem role="package">devscripts</systemitem> package) to watch the site where you
3509  originally got the source from.  This is also used by <ulink url="http://wiki.debian.org/DEHS">Debian External Health Status (DEHS)</ulink>.  originally got the source from.  This is also used by <ulink url="&dehs;">Debian External Health Status (DEHS)</ulink>.
3510  </para>  </para>
3511  <para>  <para>
3512  Here's what I put in it:  Here's what I put in it:
# Line 3346  Here's what I put in it: Line 3514  Here's what I put in it:
3514  <screen>  <screen>
3515  # watch control file for uscan  # watch control file for uscan
3516  version=3  version=3
3517  http://sf.net/gentoo/gentoo-(.+)\.tar\.gz debian uupdate  &sf-net;/gentoo/gentoo-(.+)\.tar\.gz debian uupdate
3518  </screen>  </screen>
3519  <para>  <para>
3520  Normally with this <filename>watch</filename> file, the URL at  Normally with this <filename>watch</filename> file, the URL at
3521  <literal>http://sf.net/gentoo</literal> is downloaded and searched for links of  <literal>&sf-net;/gentoo</literal> is downloaded and searched for links of
3522  the form <literal>&lt;a href=...&gt;</literal>.  The base name (just the part  the form <literal>&lt;a href=...&gt;</literal>.  The base name (just the part
3523  after the final <literal>/</literal>) of these linked URLs are matched against  after the final <literal>/</literal>) of these linked URLs are matched against
3524  Perl regexp (see <citerefentry> <refentrytitle>perlre</refentrytitle>  Perl regular expression (see <citerefentry> <refentrytitle>perlre</refentrytitle>
3525  <manvolnum>1</manvolnum> </citerefentry>) pattern  <manvolnum>1</manvolnum> </citerefentry>) pattern
3526  <literal>gentoo-(.+)\.tar\.gz</literal>.  Out of matched files, the file with  <literal>gentoo-(.+)\.tar\.gz</literal>.  Out of matched files, the file with
3527  the greatest version number is downloaded and the <command>uupdate</command>  the greatest version number is downloaded and the <command>uupdate</command>
# Line 3361  program is run to create the updated sou Line 3529  program is run to create the updated sou
3529  </para>  </para>
3530  <para>  <para>
3531  Although this is true for other sites, the SourceForge download service at  Although this is true for other sites, the SourceForge download service at
3532  <ulink url="http://sf.net">http://sf.net</ulink> is an exception.  When the  <ulink url="&sf-net;"/> is an exception.  When the
3533  <filename>watch</filename> file has an URL matching with the Perl regexp  <filename>watch</filename> file has an URL matching with the Perl regexp
3534  <literal>^http://sf\.net/</literal>, the <command>uscan</command> program  <literal>^http://sf\.net/</literal>, the <command>uscan</command> program
3535  substitutes it with <literal>http://qa.debian.org/watch/sf.php/</literal> and  substitutes it with <literal>&qa-do;watch/sf.php/</literal> and
3536  then applies this rule.  The URL redirector service at this <ulink url="http://qa.debian.org/">http://qa.debian.org/</ulink> is designed to offer  then applies this rule.  The URL redirector service at this <ulink url="&qa-do;"/> is designed to offer
3537  a stable redirect service to the desired file for the  a stable redirect service to the desired file for the
3538  <filename>watch</filename> file having  <filename>watch</filename> file having
3539  <literal>http://sf.net/<replaceable>project</replaceable>/<replaceable>tar-name</replaceable>-(.+)\.tar\.gz</literal>.  <literal>&sf-net;/<replaceable>project</replaceable>/<replaceable>tar-name</replaceable>-(.+)\.tar\.gz</literal>.
3540  This solves issues related to the periodically changing URL there.  This solves issues related to the periodically changing URL there.
3541  </para>  </para>
3542  </section>  </section>
# Line 3396  should say either: Line 3564  should say either:
3564  The newer <literal>3.0 (quilt)</literal> source format records modifications in  The newer <literal>3.0 (quilt)</literal> source format records modifications in
3565  a <command>quilt</command> patch series within  a <command>quilt</command> patch series within
3566  <filename>debian/patches</filename>.  Those changes are then automatically  <filename>debian/patches</filename>.  Those changes are then automatically
3567  applied during extraction of the source package.  <footnote><para> See <ulink url="http://wiki.debian.org/Projects/DebSrc3.0">DebSrc3.0</ulink> for the  applied during extraction of the source package.  <footnote><para> See <ulink url="&debsrc3;">DebSrc3.0</ulink> for the
3568  summary information concerning the switch to the new <literal>3.0  summary information concerning the switch to the new <literal>3.0
3569  (quilt)</literal> and <literal>3.0 (native)</literal> source formats.  </para>  (quilt)</literal> and <literal>3.0 (native)</literal> source formats.  </para>
3570  </footnote> The Debian modifications are simply stored in a  </footnote> The Debian modifications are simply stored in a
# Line 3425  Debian packaging to ease merging of the Line 3593  Debian packaging to ease merging of the
3593  </para>  </para>
3594  <para>  <para>
3595  After you build a package, the source is normally left patched.  You need to  After you build a package, the source is normally left patched.  You need to
3596  unpatch it manually by running <literal>quilt pop -a</literal> before  unpatch it manually by running <literal>dquilt pop -a</literal> before
3597  committing to the <literal>master</literal> branch.  You can automate this by  committing to the <literal>master</literal> branch.  You can automate this by
3598  adding the optional <filename>debian/source/local-options</filename> file  adding the optional <filename>debian/source/local-options</filename> file
3599  containing <literal>unapply-patches</literal>.  This file is not included in  containing <literal>unapply-patches</literal>.  This file is not included in
# Line 3434  file may contain <literal>abort-on-upstr Line 3602  file may contain <literal>abort-on-upstr
3602  <citerefentry> <refentrytitle>dpkg-source</refentrytitle>  <citerefentry> <refentrytitle>dpkg-source</refentrytitle>
3603  <manvolnum>1</manvolnum> </citerefentry>).  <manvolnum>1</manvolnum> </citerefentry>).
3604  </para>  </para>
3605    <screen>
3606    unapply-patches
3607    abort-on-upstream-changes
3608    </screen>
3609    </section>
3610    <section id="sourceopt"><title><filename>source/options</filename> file</title>
3611    <para>
3612    The autogenerated files in the source tree can be quite annoying for packaging
3613    since they generate meaningless large patch files.  There are custom modules
3614    such as <command>dh_autoreconf</command> to ease this problem as described in
3615    <xref linkend="customrules"/>.
3616    </para>
3617    <para>
3618    You can provide a Perl regular expression to the
3619    <literal>--extend-diff-ignore</literal> option argument of <citerefentry>
3620    <refentrytitle>dpkg-source</refentrytitle><manvolnum>1</manvolnum>
3621    </citerefentry> to ignore changes made to the autogenerated files while
3622    creating the source package.
3623    </para>
3624    <para>
3625    You can store such <command>dpkg-source</command> option argument in the
3626    <filename>source/options</filename> file of the source package as the generic
3627    solution to address this problem of the autogenerated files.  The following
3628    will skip creating patch files for <filename>config.sub</filename>,
3629    <filename>config.guess</filename> and <filename>Makefile</filename>.
3630    </para>
3631    <screen>
3632    extend-diff-ignore = "(^|/)(config\.sub|config\.guess|Makefile)$"
3633    </screen>
3634  </section>  </section>
3635  <section id="patches"><title><filename>patches/*</filename> files</title>  <section id="patches"><title><filename>patches/*</filename> files</title>
3636  <para>  <para>
# Line 3473  documentation of your changes are very i Line 3670  documentation of your changes are very i
3670  by your sponsor.  </para> </footnote>  by your sponsor.  </para> </footnote>
3671  </para>  </para>
3672  <para>  <para>
3673  For <xref linkend="modify"/> , we created 3 patches in  For <xref linkend="modify"/>, we created 3 patches in
3674  <filename>debian/patches</filename>.  <filename>debian/patches</filename>.
3675  </para>  </para>
3676  <para>  <para>
3677  Since Debian patches are located in <filename>debian/patches</filename>, please  Since Debian patches are located in <filename>debian/patches</filename>, please
3678  make sure to setup the <command>quilt</command> command properly as described  make sure to setup the <command>dquilt</command> command properly as described
3679  in <xref linkend="quiltrc"/> .  in <xref linkend="quiltrc"/>.
3680  </para>  </para>
3681  <para>  <para>
3682  When someone (including yourself) provides you with a patch  When someone (including yourself) provides you with a patch
# Line 3490  quite simple: Line 3687  quite simple:
3687  <screen>  <screen>
3688  $ dpkg-source -x gentoo_0.9.12.dsc  $ dpkg-source -x gentoo_0.9.12.dsc
3689  $ cd gentoo-0.9.12  $ cd gentoo-0.9.12
3690  $ quilt import ../<replaceable>foo</replaceable>.patch  $ dquilt import ../<replaceable>foo</replaceable>.patch
3691  $ quilt push  $ dquilt push
3692  $ quilt refresh  $ dquilt refresh
3693  $ quilt header -e  $ dquilt header -e
3694  ... describe patch  ... describe patch
3695  </screen>  </screen>
3696  <para>  <para>
3697  The patches stored in the newer <literal>3.0 (quilt)</literal> source format  The patches stored in the newer <literal>3.0 (quilt)</literal> source format
3698  must be <emphasis>fuzz</emphasis> free.  You should ensure it as <literal>quilt  must be <emphasis>fuzz</emphasis> free.  You should ensure it as <literal>dquilt
3699  pop -a; while quilt push; do quilt refresh; done</literal>.  pop -a; while dquilt push; do dquilt refresh; done</literal>.
3700  </para>  </para>
3701  </section>  </section>
3702  </chapter>  </chapter>
# Line 3520  the <systemitem role="package">build-ess Line 3717  the <systemitem role="package">build-ess
3717  </listitem>  </listitem>
3718  <listitem>  <listitem>
3719  <para>  <para>
3720  packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="control"/> ), and  packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="control"/>), and
3721  </para>  </para>
3722  </listitem>  </listitem>
3723  <listitem>  <listitem>
3724  <para>  <para>
3725  packages listed in the <literal>Build-Depends-indep</literal> field (see <xref linkend="control"/> ).  packages listed in the <literal>Build-Depends-indep</literal> field (see <xref linkend="control"/>).
3726  </para>  </para>
3727  </listitem>  </listitem>
3728  </itemizedlist>  </itemizedlist>
# Line 3575  create and sign the upload <filename>.ch Line 3772  create and sign the upload <filename>.ch
3772  <para>  <para>
3773  The only input that will be required of you is your GPG secret pass phrase,  The only input that will be required of you is your GPG secret pass phrase,
3774  twice.  twice.
3775    <footnote><para>
3776    This GPG key must be signed by a Debian developer to get connected to the web
3777    of trust and must be registered to <ulink url="&keyring;">the Debian
3778    keyring</ulink>.  This enables your uploaded packages to be accepted to the
3779    Debian archives.  See
3780    <ulink url="&keycreate;">Creating a new GPG key</ulink> and
3781    <ulink url="&keysigning; ">Debian Wiki on Keysigning</ulink>.
3782    </para></footnote>
3783  </para>  </para>
3784  <para>  <para>
3785  After all this is done, you will see the following files in the directory above  After all this is done, you will see the following files in the directory above
# Line 3620  copy the three files somewhere else and Line 3825  copy the three files somewhere else and
3825  gentoo_0.9.12-1.dsc</literal>.  <footnote><para> You can avoid applying  gentoo_0.9.12-1.dsc</literal>.  <footnote><para> You can avoid applying
3826  <command>quilt</command> patches in the <literal>3.0 (quilt)</literal> source  <command>quilt</command> patches in the <literal>3.0 (quilt)</literal> source
3827  format at the end of the extraction with the <literal>--skip-patches</literal>  format at the end of the extraction with the <literal>--skip-patches</literal>
3828  option.  Alternatively, you can run <literal>quilt pop -a</literal> after  option.  Alternatively, you can run <literal>dquilt pop -a</literal> after
3829  normal operation.  </para> </footnote>  normal operation.  </para> </footnote>
3830  </para>  </para>
3831  </listitem>  </listitem>
# Line 3648  This file is GPG signed, so that people Line 3853  This file is GPG signed, so that people
3853  As you keep working on the package, behavior will change and new features will  As you keep working on the package, behavior will change and new features will
3854  be added.  People downloading your package can look at this file and quickly  be added.  People downloading your package can look at this file and quickly
3855  see what has changed.  Debian archive maintenance programs will also post the  see what has changed.  Debian archive maintenance programs will also post the
3856  contents of this file to the <ulink url="http://lists.debian.org/debian-devel-announce/">debian-devel-announce@lists.debian.org</ulink>  contents of this file to the <ulink url="&debian-devel-announce-ldo;">debian-devel-announce@lists.debian.org</ulink>
3857  mailing list.  mailing list.
3858  </para>  </para>
3859  </listitem>  </listitem>
# Line 3666  they'll know the file is corrupt or has Line 3871  they'll know the file is corrupt or has
3871  </section>  </section>
3872  <section id="autobuilder"><title>Autobuilder</title>  <section id="autobuilder"><title>Autobuilder</title>
3873  <para>  <para>
3874  Debian supports many <ulink url="http://www.debian.org/ports/">ports</ulink>  Debian supports many <ulink url="&ports;">ports</ulink>
3875  with the <ulink url="http://www.debian.org/devel/buildd/">autobuilder  with the <ulink url="&buildd;">autobuilder
3876  network</ulink> running <command>buildd</command> daemons on many different  network</ulink> running <command>buildd</command> daemons on many different
3877  architecture computers.  Although you do not need to do this by yourself, you  architecture computers.  Although you do not need to do this by yourself, you
3878  should be aware of what will happen on your packages.  Let's look into roughly  should be aware of what will happen on your packages.  Let's look into roughly
# Line 3688  the <systemitem role="package">build-ess Line 3893  the <systemitem role="package">build-ess
3893  </listitem>  </listitem>
3894  <listitem>  <listitem>
3895  <para>  <para>
3896  packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="control"/> ).  packages listed in the <literal>Build-Depends</literal> field (see <xref linkend="control"/>).
3897  </para>  </para>
3898  </listitem>  </listitem>
3899  </itemizedlist>  </itemizedlist>
# Line 3736  This is why you see your package for oth Line 3941  This is why you see your package for oth
3941  </para>  </para>
3942  <para>  <para>
3943  Although packages listed in the <literal>Build-Depends-indep</literal> field  Although packages listed in the <literal>Build-Depends-indep</literal> field
3944  are required to be installed for the normal packaging by us (see <xref linkend="completebuild"/> ), they are not required to be installed for the  are required to be installed for the normal packaging by us (see <xref linkend="completebuild"/>), they are not required to be installed for the
3945  autobuilder system since it build only architecture dependent binary packages.  autobuilder system since it build only architecture dependent binary packages.
3946  <footnote><para> Unlike under the <systemitem role="package">pbuilder</systemitem> package, the <command>chroot</command>  <footnote><para> Unlike under the <systemitem role="package">pbuilder</systemitem> package, the <command>chroot</command>
3947  environment under the <systemitem role="package">sbuild</systemitem> package  environment under the <systemitem role="package">sbuild</systemitem> package
# Line 3745  many packages installed.  </para> </foot Line 3950  many packages installed.  </para> </foot
3950  packaging and autobuilder situation dictates whether you record such required  packaging and autobuilder situation dictates whether you record such required
3951  packages in the <literal>Build-Depends</literal> or  packages in the <literal>Build-Depends</literal> or
3952  <literal>Build-Depends-indep</literal> fields of the  <literal>Build-Depends-indep</literal> fields of the
3953  <filename>debian/control</filename> file (see <xref linkend="control"/> ).  <filename>debian/control</filename> file (see <xref linkend="control"/>).
3954  </para>  </para>
3955  </section>  </section>
3956  <section id="option-sa"><title>Including <filename>orig.tar.gz</filename> for upload</title>  <section id="option-sa"><title>Including <filename>orig.tar.gz</filename> for upload</title>
3957  <para>  <para>
3958  When you first upload the package to the archive, you need to include the  When you first upload the package to the archive, you need to include the
3959  original <filename>orig.tar.gz</filename> source.  If the last changelog entry  original <filename>orig.tar.gz</filename> source, too.  If the Debian revision
3960  is not the first one for the given upstream version, you must provide  number of such package is neither <literal>1</literal> nor
3961  <command>dpkg-buildpackage</command> command with the <literal>-sa</literal>  <literal>0</literal>, you must provide <command>dpkg-buildpackage</command>
3962  option.  On the other hand, the <literal>-sd</literal> option will force to  command with the <literal>-sa</literal> option.  On the other hand, the
3963  exclude the original <filename>orig.tar.gz</filename> source.  <literal>-sd</literal> option will force to exclude the original
3964    <filename>orig.tar.gz</filename> source.
3965  </para>  </para>
3966  </section>  </section>
3967  <section id="debuild"><title><command>debuild</command> command</title>  <section id="debuild"><title><command>debuild</command> command</title>
# Line 3808  For a clean room (<command>chroot</comma Line 4014  For a clean room (<command>chroot</comma
4014  build dependencies, the <systemitem role="package">pbuilder</systemitem>  build dependencies, the <systemitem role="package">pbuilder</systemitem>
4015  package is very useful.  <footnote><para> Since the <systemitem role="package">pbuilder</systemitem> package is still evolving, you have to  package is very useful.  <footnote><para> Since the <systemitem role="package">pbuilder</systemitem> package is still evolving, you have to
4016  check the actual configuration situation by consulting the latest official  check the actual configuration situation by consulting the latest official
4017  documentation.  </para> </footnote> This ensures a clean build from the source  documentation.</para> </footnote> This ensures a clean build from the source
4018  under the <literal>sid</literal> auto-builder for different architectures and  under the <literal>sid</literal> auto-builder for different architectures and
4019  avoids the severity serious FTBFS (Fails To Build From Source) bug which is  avoids the severity serious FTBFS (Fails To Build From Source) bug which is
4020  always in the RC (release critical) category.  See <ulink url="&buildd-home;">&buildd-home;</ulink> for more on the Debian  always in the RC (release critical) category.
4021  package auto-builder.  <footnote><para>See <ulink url="&buildd-do;"/> for more on the
4022    auto-builder of the Debian package.</para></footnote>
4023  </para>  </para>
4024  <para>  <para>
4025  Let's customize the <systemitem role="package">pbuilder</systemitem> package by  Let's customize the <systemitem role="package">pbuilder</systemitem> package by
# Line 3943  environments of almost any Debian deriva Line 4150  environments of almost any Debian deriva
4150  architecture.  architecture.
4151  </para>  </para>
4152  <para>  <para>
4153  See <ulink url="&pbuilder-home;">&pbuilder-home;</ulink>,  See <ulink url="&pbuilder;"/>,
4154  <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum>  <citerefentry> <refentrytitle>pdebuild</refentrytitle> <manvolnum>1</manvolnum>
4155  </citerefentry>, <citerefentry> <refentrytitle>pbuilderrc</refentrytitle>  </citerefentry>, <citerefentry> <refentrytitle>pbuilderrc</refentrytitle>
4156  <manvolnum>5</manvolnum> </citerefentry>, and <citerefentry>  <manvolnum>5</manvolnum> </citerefentry>, and <citerefentry>
# Line 3953  See <ulink url="&pbuilder-home;">&pbuild Line 4160  See <ulink url="&pbuilder-home;">&pbuild
4160  </section>  </section>
4161  <section id="git-buildpackage"><title><command>git-buildpackage</command> command and similars</title>  <section id="git-buildpackage"><title><command>git-buildpackage</command> command and similars</title>
4162  <para>  <para>
4163  If your upstream uses the source code management system (<ulink url="http://www.debian.org/doc/manuals/debian-reference/ch10.en.html#_version_control_systems">VCS</ulink>)  If your upstream uses the source code management system (VCS)
4164    <footnote><para>See <ulink url="&debref-vcs;">Version control systems</ulink> for more.</para></footnote>
4165  to maintain their code, you should consider to use them.  That makes merging  to maintain their code, you should consider to use them.  That makes merging
4166  and cherry-picking upstream patches much easier.  There are several specialized  and cherry-picking upstream patches much easier.  There are several specialized
4167  wrapper script packages for the Debian package building for each VCS.  wrapper script packages for the Debian package building for each VCS.
# Line 3967  Debian packages in Git repositories. Line 4175  Debian packages in Git repositories.
4175  </listitem>  </listitem>
4176  <listitem>  <listitem>
4177  <para>  <para>
 <systemitem role="package">topgit</systemitem>: a Git patch queue manager  
 </para>  
 </listitem>  
 <listitem>  
 <para>  
4178  <systemitem role="package">svn-buildpackage</systemitem>: helper programs to  <systemitem role="package">svn-buildpackage</systemitem>: helper programs to
4179  maintain Debian packages with Subversion.  maintain Debian packages with Subversion.
4180  </para>  </para>
# Line 3984  package scripts for CVS source trees. Line 4187  package scripts for CVS source trees.
4187  </listitem>  </listitem>
4188  </itemizedlist>  </itemizedlist>
4189  <para>  <para>
4190  These packages offer more elegant working environment than manual use of the  There are packages which <emphasis>automate</emphasis> building of packages
4191  <command>quilt</command> commands for advanced audiences to  under VCS managed source tree for advanced audiences.  I will not explain them
4192  <emphasis>automate</emphasis> building of packages.  I will not explain them in  in this tutorial.
4193  this tutorial.  <footnote><para> Here are few web resources available for  <footnote><para> Here are few web resources available for advanced audiences.  </para>
4194  advanced audiences.  </para> <itemizedlist> <listitem> <para> Building Debian  <itemizedlist>
4195  Packages with git-buildpackage at  <listitem> <para> <ulink url="&git-buildpackage-doc;">Building Debian Packages with git-buildpackage</ulink> </para> </listitem>
4196  <filename>/usr/share/doc/git-buildpackage/manual-html/gbp.html</filename>  <listitem> <para> <ulink url="&debian-packages-git;">debian packages in git</ulink> </para> </listitem>
4197  </para> </listitem> <listitem> <para> <ulink url="https://honk.sigxcpu.org/piki/development/debian_packages_in_git/">debian  <listitem> <para> <ulink url="&git-debian-packaging;">Using Git for Debian Packaging</ulink> </para> </listitem>
4198  packages in git</ulink> </para> </listitem> <listitem> <para> <ulink url="http://www.eyrie.org/~eagle/notes/debian/git.html">Using Git for Debian  <listitem> <para> <ulink url="&git-dpm;">git-dpm: Debian packages in Git manager</ulink> </para> </listitem>
4199  Packaging</ulink> </para> </listitem> <listitem> <para> <ulink url="http://git.debian.org/?p=collab-maint/topgit.git;a=blob_plain;f=debian/HOWTO-tg2quilt;hb=HEAD">Using  <listitem> <para> <ulink url="&topgit;">Using TopGit to generate quilt series for Debian packaging</ulink> </para> </listitem>
4200  TopGit to generate quilt series for Debian packaging</ulink> </para>  </itemizedlist>
4201  </listitem> <listitem> <para> <ulink url="http://git-dpm.alioth.debian.org/">git-dpm: Debian packages in Git  </footnote>
 manager</ulink> </para> </listitem> </itemizedlist> </footnote>  
4202  </para>  </para>
4203  </section>  </section>
4204  <section id="quickrebuild"><title>Quick rebuild</title>  <section id="quickrebuild"><title>Quick rebuild</title>
# Line 4063  All <emphasis>maintainer scripts</emphas Line 4265  All <emphasis>maintainer scripts</emphas
4265  <filename>preinst</filename>, <filename>prerm</filename>,  <filename>preinst</filename>, <filename>prerm</filename>,
4266  <filename>postinst</filename>, and <filename>postrm</filename> files, are  <filename>postinst</filename>, and <filename>postrm</filename> files, are
4267  non-trivial unless they are auto-generated by the <systemitem role="package">debhelper</systemitem> programs.  So do not use them if you are  non-trivial unless they are auto-generated by the <systemitem role="package">debhelper</systemitem> programs.  So do not use them if you are
4268  a novice maintainer (see <xref linkend="maintscripts"/> ).  a novice maintainer (see <xref linkend="maintscripts"/>).
4269  </para>  </para>
4270  <para>  <para>
4271  If the package makes use of these non-trivial <emphasis>maintainer  If the package makes use of these non-trivial <emphasis>maintainer
# Line 4144  file.  The <command>lintian</command> co Line 4346  file.  The <command>lintian</command> co
4346  for many common packaging errors.  <footnote><para> You do not need to provide  for many common packaging errors.  <footnote><para> You do not need to provide
4347  the <command>lintian</command> option <literal>-i -I --show-overrides</literal>  the <command>lintian</command> option <literal>-i -I --show-overrides</literal>
4348  if you customized <filename>/etc/devscripts.conf</filename> or  if you customized <filename>/etc/devscripts.conf</filename> or
4349  <filename>~/.devscripts</filename> as described in <xref linkend="debuild"/> .  <filename>~/.devscripts</filename> as described in <xref linkend="debuild"/>.
4350  </para> </footnote>  </para> </footnote>
4351  </para>  </para>
4352  <screen>  <screen>
# Line 4188  error. Line 4390  error.
4390  <para>  <para>
4391  For warnings, tune the package to avoid them or verify that the warnings are  For warnings, tune the package to avoid them or verify that the warnings are
4392  spurious.  If spurious, set the <filename>lintian-overrides</filename> files as  spurious.  If spurious, set the <filename>lintian-overrides</filename> files as
4393  described in <xref linkend="lintian"/> .  described in <xref linkend="lintian"/>.
4394  </para>  </para>
4395  <para>  <para>
4396  Note that you can build the package with <command>dpkg-buildpackage</command>  Note that you can build the package with <command>dpkg-buildpackage</command>
# Line 4242  old <literal>1.0</literal> source format Line 4444  old <literal>1.0</literal> source format
4444  <screen>  <screen>
4445  $ interdiff -z <replaceable>old-package</replaceable>.diff.gz <replaceable>new-package</replaceable>.diff.gz  $ interdiff -z <replaceable>old-package</replaceable>.diff.gz <replaceable>new-package</replaceable>.diff.gz
4446  </screen>  </screen>
4447    <para>
4448    The new <literal>3.0</literal> source format stores changes in multiple patch
4449    files as described in <xref linkend="patches"/>.  You can trace changes of each
4450    <filename>debian/patches/*</filename> file using <command>interdiff</command>, too.
4451    </para>
4452  </section>  </section>
4453  <section id="mc"><title><command>mc</command> command</title>  <section id="mc"><title><command>mc</command> command</title>
4454  <para>  <para>
# Line 4261  your <filename>rules</filename> file to Line 4468  your <filename>rules</filename> file to
4468  </chapter>  </chapter>
4469  <chapter id="upload"><title>Uploading the package</title>  <chapter id="upload"><title>Uploading the package</title>
4470  <para>  <para>
4471  Now that you have tested your new package thoroughly, you will be technically  Now that you have tested your new package thoroughly, you want to release it to
4472  ready to start the Debian new maintainer application process, as described at  a public archive to share it.
 <ulink url="http://www.debian.org/devel/join/newmaint">http://www.debian.org/devel/join/newmaint</ulink>  
4473  </para>  </para>
4474  <section id="upload-debian"><title>Uploading to the Debian archive</title>  <section id="upload-debian"><title>Uploading to the Debian archive</title>
4475  <para>  <para>
4476  Once you become an official developer, you'll need to upload the package to the  Once you become an official developer,
4477  Debian archive.  You can do this manually, but it's easier to use the provided  <footnote><para>
4478    See <xref linkend="socialdynamism"/>.
4479    </para></footnote>
4480    you can upload the package to the Debian archive.
4481    <footnote><para>
4482    There are publicly accessible archives such as <ulink url="&mentors-dn;"/>
4483    which work almost the same way as Debian archive and provide upload area for
4484    the non-DD.  You can set up an equivalent archive by yourself using tools
4485    listed at <ulink url="&deb-archive;"/>.  So this section is useful for the
4486    non-DD, too.
4487    </para></footnote>
4488    You can do this manually, but it's easier to use the existing
4489  automated tools, like <citerefentry> <refentrytitle>dupload</refentrytitle>  automated tools, like <citerefentry> <refentrytitle>dupload</refentrytitle>
4490  <manvolnum>1</manvolnum> </citerefentry> or <citerefentry>  <manvolnum>1</manvolnum> </citerefentry> or <citerefentry>
4491  <refentrytitle>dput</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.  <refentrytitle>dput</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.
# Line 4294  these options means. Line 4511  these options means.
4511  The <literal>$default_host</literal> option determines which of the upload  The <literal>$default_host</literal> option determines which of the upload
4512  queues will be used by default.  <literal>anonymous-ftp-master</literal> is the  queues will be used by default.  <literal>anonymous-ftp-master</literal> is the
4513  primary one, but it's possible that you will want to use another one.  primary one, but it's possible that you will want to use another one.
4514    <footnote><para>See <ulink url="&devref-upload;">Debian Developer's Reference 5.6. 'Uploading a package'</ulink>.</para></footnote>
4515  </para>  </para>
4516  <para>  <para>
4517  While connected to the Internet, you can upload your package by the following:  While connected to the Internet, you can upload your package by the following:
# Line 4312  useful these days.  If you upload to ftp Line 4530  useful these days.  If you upload to ftp
4530  will ask for your password on Debian machines, and then upload the packages.  will ask for your password on Debian machines, and then upload the packages.
4531  -->  -->
4532  <para>  <para>
4533  If you encounter an upload problem at <ulink url="&ftp-uploadqueue;">&ftp-uploadqueue;</ulink>, you can fix this  If you encounter an upload problem at <ulink url="&uploadqueue;"/>, you can fix this
4534  by manually uploading GPG signed <filename>*.commands</filename> file to there  by manually uploading GPG signed <filename>*.commands</filename> file to there
4535  with <command>ftp</command>.  <footnote><para> See <ulink url="&ftp-command;">&ftp-command;</ulink>.  Alternatively, you may  with <command>ftp</command>.  <footnote><para> See <ulink url="&uploadqueue-readme;"/>.  Alternatively, you may
4536  use <command>dcut</command> command from the <systemitem role="package">dput</systemitem> package.  </para> </footnote> For example, use  use <command>dcut</command> command from the <systemitem role="package">dput</systemitem> package.  </para> </footnote> For example, use
4537  <filename>hello.commands</filename>:  <filename>hello.commands</filename>:
4538  </para>  </para>
# Line 4333  Z4jxNrgh7Bc= Line 4551  Z4jxNrgh7Bc=
4551  =pH94  =pH94
4552  -----END PGP SIGNATURE-----  -----END PGP SIGNATURE-----
4553  </screen>  </screen>
 <para>  
 See <ulink url="http://mentors.debian.net/cgi-bin/welcome">mentors.debian.net</ulink> for  
 publically accessible upload area for non-DD.  
 </para>  
 <para>  
 See <ulink url="http://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_small_public_package_archive">Debian  
 Reference, 2.7.12.  'Small public package archive'</ulink> for an example for  
 creating a small public package archive compatible with the modern secure APT  
 system.  
 </para>  
4554  </section>  </section>
4555  <section id="skipped-uploads"><title>Skipped uploads</title>  <section id="skipped-uploads"><title>Skipped uploads</title>
4556  <para>  <para>
# Line 4375  If this is to be recorded as a new patch Line 4583  If this is to be recorded as a new patch
4583  <itemizedlist>  <itemizedlist>
4584  <listitem>  <listitem>
4585  <para>  <para>
4586  <literal>quilt new <replaceable>bugname.patch</replaceable></literal> to set  <literal>dquilt new <replaceable>bugname.patch</replaceable></literal> to set
4587  patch name;  patch name;
4588  </para>  </para>
4589  </listitem>  </listitem>
4590  <listitem>  <listitem>
4591  <para>  <para>
4592  <literal>quilt add <replaceable>buggy-file</replaceable></literal> to declare  <literal>dquilt add <replaceable>buggy-file</replaceable></literal> to declare
4593  file to be modified;  file to be modified;
4594  </para>  </para>
4595  </listitem>  </listitem>
# Line 4392  Correct the problem in the package sourc Line 4600  Correct the problem in the package sourc
4600  </listitem>  </listitem>
4601  <listitem>  <listitem>
4602  <para>  <para>
4603  <literal>quilt refresh</literal> to record to  <literal>dquilt refresh</literal> to record to
4604  <filename><replaceable>bugname.patch</replaceable></filename>;  <filename><replaceable>bugname.patch</replaceable></filename>;
4605  </para>  </para>
4606  </listitem>  </listitem>
4607  <listitem>  <listitem>
4608  <para>  <para>
4609  <literal>quilt header -e</literal> to add its description;  <literal>dquilt header -e</literal> to add its description;
4610  </para>  </para>
4611  </listitem>  </listitem>
4612  </itemizedlist>  </itemizedlist>
# Line 4410  If this is to update an existing patch, Line 4618  If this is to update an existing patch,
4618  <itemizedlist>  <itemizedlist>
4619  <listitem>  <listitem>
4620  <para>  <para>
4621  <literal>quilt pop <replaceable>foo.patch</replaceable></literal> to recall  <literal>dquilt pop <replaceable>foo.patch</replaceable></literal> to recall
4622  existing <filename><replaceable>foo.patch</replaceable></filename>;  existing <filename><replaceable>foo.patch</replaceable></filename>;
4623  </para>  </para>
4624  </listitem>  </listitem>
# Line 4422  Correct the problem in the old Line 4630  Correct the problem in the old
4630  </listitem>  </listitem>
4631  <listitem>  <listitem>
4632  <para>  <para>
4633  <literal>quilt refresh</literal> to update  <literal>dquilt refresh</literal> to update
4634  <filename><replaceable>foo.patch</replaceable></filename>;  <filename><replaceable>foo.patch</replaceable></filename>;
4635  </para>  </para>
4636  </listitem>  </listitem>
4637  <listitem>  <listitem>
4638  <para>  <para>
4639  <literal>quilt header -e</literal> to update its description;  <literal>dquilt header -e</literal> to update its description;
4640  </para>  </para>
4641  </listitem>  </listitem>
4642  <listitem>  <listitem>
4643  <para>  <para>
4644  <literal>while quilt push; do quilt refresh; done</literal> to apply all  <literal>while dquilt push; do dquilt refresh; done</literal> to apply all
4645  patches while removing <emphasis>fuzz</emphasis>;  patches while removing <emphasis>fuzz</emphasis>;
4646  </para>  </para>
4647  </listitem>  </listitem>
# Line 4466  Repeat what you did in the above to fix Line 4674  Repeat what you did in the above to fix
4674  </listitem>  </listitem>
4675  <listitem>  <listitem>
4676  <para>  <para>
4677  Repeat what you did in <xref linkend="completebuild"/> , <xref linkend="checkit"/> , and <xref linkend="upload"/> .  The difference is that  Repeat what you did in <xref linkend="completebuild"/>, <xref linkend="checkit"/>, and <xref linkend="upload"/>.  The difference is that
4678  this time, the original source archive won't be included, as it hasn't been  this time, the original source archive won't be included, as it hasn't been
4679  changed and it already exists in the Debian archive.  changed and it already exists in the Debian archive.
4680  </para>  </para>
# Line 4530  Update the Debian <filename>changelog</f Line 4738  Update the Debian <filename>changelog</f
4738  <itemizedlist>  <itemizedlist>
4739  <listitem>  <listitem>
4740  <para>  <para>
4741  Add an entry with New upstream release.  Add an entry with <literal>New upstream release</literal>.
4742  </para>  </para>
4743  </listitem>  </listitem>
4744  <listitem>  <listitem>
4745  <para>  <para>
4746  Describe concisely the changes <emphasis>in the new upstream release</emphasis>  Describe concisely the changes <emphasis>in the new upstream release</emphasis>
4747  that fix reported bugs and close those bugs.  that fix reported bugs and close those bugs by adding <literal>Closes: #<replaceable>bug_number</replaceable></literal>.
4748  </para>  </para>
4749  </listitem>  </listitem>
4750  <listitem>  <listitem>
4751  <para>  <para>
4752  Describe concisely the changes <emphasis>to the new upstream release</emphasis>  Describe concisely the changes <emphasis>to the new upstream release</emphasis>
4753  by the maintainer that fix reported bugs and close those bugs.  by the maintainer that fix reported bugs and close those bugs by adding <literal>Closes: #<replaceable>bug_number</replaceable></literal>.
4754  </para>  </para>
4755  </listitem>  </listitem>
4756  </itemizedlist>  </itemizedlist>
4757  </listitem>  </listitem>
4758  <listitem>  <listitem>
4759  <para>  <para>
4760  <literal>while quilt push; do quilt refresh; done</literal> to apply all  <literal>while dquilt push; do dquilt refresh; done</literal> to apply all
4761  patches while removing <emphasis>fuzz</emphasis>.  patches while removing <emphasis>fuzz</emphasis>.
4762  </para>  </para>
4763  </listitem>  </listitem>
# Line 4566  If a patch you applied to the source was Line 4774  If a patch you applied to the source was
4774  <itemizedlist>  <itemizedlist>
4775  <listitem>  <listitem>
4776  <para>  <para>
4777  <literal>quilt delete</literal> to remove it.  <literal>dquilt delete</literal> to remove it.
4778  </para>  </para>
4779  </listitem>  </listitem>
4780  </itemizedlist>  </itemizedlist>
# Line 4579  upstream source, Line 4787  upstream source,
4787  <itemizedlist>  <itemizedlist>
4788  <listitem>  <listitem>
4789  <para>  <para>
4790  <literal>quilt push -f</literal> to apply old patches while forcing rejects as  <literal>dquilt push -f</literal> to apply old patches while forcing rejects as
4791  <filename><replaceable>baz</replaceable>.rej</filename>.  <filename><replaceable>baz</replaceable>.rej</filename>.
4792  </para>  </para>
4793  </listitem>  </listitem>
# Line 4592  realize intended effect of Line 4800  realize intended effect of
4800  </listitem>  </listitem>
4801  <listitem>  <listitem>
4802  <para>  <para>
4803  <literal>quilt refresh</literal> to update the patch.  <literal>dquilt refresh</literal> to update the patch.
4804  </para>  </para>
4805  </listitem>  </listitem>
4806  </itemizedlist>  </itemizedlist>
4807  </listitem>  </listitem>
4808  <listitem>  <listitem>
4809  <para>  <para>
4810  Continue back to <literal>while quilt push; do quilt refresh; done</literal>.  Continue back to <literal>while dquilt push; do dquilt refresh; done</literal>.
4811  </para>  </para>
4812  </listitem>  </listitem>
4813  </itemizedlist>  </itemizedlist>
# Line 4623  $ wget http://example.org/<replaceable>f Line 4831  $ wget http://example.org/<replaceable>f
4831  $ cd <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>  $ cd <replaceable>foo</replaceable>-<replaceable>oldversion</replaceable>
4832  $ uupdate -v <replaceable>newversion</replaceable> ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz  $ uupdate -v <replaceable>newversion</replaceable> ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>.tar.gz
4833  $ cd ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>  $ cd ../<replaceable>foo</replaceable>-<replaceable>newversion</replaceable>
4834  $ while quilt push; do quilt refresh; done  $ while dquilt push; do dquilt refresh; done
4835  $ dch  $ dch
4836  ... document changes made  ... document changes made
4837  </screen>  </screen>
4838  <para>  <para>
4839  If you set up a <filename>debian/watch</filename> file as described in <xref linkend="watch"/> , you can skip the <command>wget</command> command.  You  If you set up a <filename>debian/watch</filename> file as described in <xref linkend="watch"/>, you can skip the <command>wget</command> command.  You
4840  simply run <citerefentry> <refentrytitle>uscan</refentrytitle>  simply run <citerefentry> <refentrytitle>uscan</refentrytitle>
4841  <manvolnum>1</manvolnum> </citerefentry> in the  <manvolnum>1</manvolnum> </citerefentry> in the
4842  <filename><replaceable>foo</replaceable>-<replaceable>oldversion</replaceable></filename>  <filename><replaceable>foo</replaceable>-<replaceable>oldversion</replaceable></filename>
# Line 4641  run the <command>uupdate</command> comma Line 4849  run the <command>uupdate</command> comma
4849  uupdate</literal> at the end of the URL.  </para> </footnote>  uupdate</literal> at the end of the URL.  </para> </footnote>
4850  </para>  </para>
4851  <para>  <para>
4852  You can release this updated source by repeating what you did in <xref linkend="completebuild"/> , <xref linkend="checkit"/> , and <xref linkend="upload"/> .  You can release this updated source by repeating what you did in <xref linkend="completebuild"/>, <xref linkend="checkit"/>, and <xref linkend="upload"/>.
4853  </para>  </para>
4854  </section>  </section>
4855  <section id="packagestyle"><title>Updating the packaging style</title>  <section id="packagestyle"><title>Updating the packaging style</title>
# Line 4674  If you want to update the <filename>rule Line 4882  If you want to update the <filename>rule
4882  <filename>Makefile</filename> inclusion mechanism of the Common Debian Build  <filename>Makefile</filename> inclusion mechanism of the Common Debian Build
4883  System (<systemitem role="package">cdbs</systemitem>) to the  System (<systemitem role="package">cdbs</systemitem>) to the
4884  <command>dh</command> syntax, see  <command>dh</command> syntax, see
4885  <filename>/usr/share/doc/cdbs/cdbs-doc.html</filename> and understand its  <ulink url="&cdbs-doc;">cdbs-doc.pdf.gz</ulink> and understand its
4886  <literal>DEB_*</literal> configuration variables.  <footnote><para> In the  <literal>DEB_*</literal> configuration variables.  <footnote><para> In the
4887  <systemitem role="package">cdbs</systemitem> (0.4.74) package, there are some  <systemitem role="package">cdbs</systemitem> (0.4.74) package, there are some
4888  negative descriptions of the <filename>rules</filename> file created by the  negative descriptions of the <filename>rules</filename> file created by the
# Line 4712  using the <command>splitdiff</command> c Line 4920  using the <command>splitdiff</command> c
4920  If it was packaged with another patch system such as <systemitem role="package">dpatch</systemitem>, <systemitem role="package">dbs</systemitem>, or <systemitem role="package">cdbs</systemitem> with <literal>-p0</literal>,  If it was packaged with another patch system such as <systemitem role="package">dpatch</systemitem>, <systemitem role="package">dbs</systemitem>, or <systemitem role="package">cdbs</systemitem> with <literal>-p0</literal>,
4921  <literal>-p1</literal>, or <literal>-p2</literal>, convert it to the  <literal>-p1</literal>, or <literal>-p2</literal>, convert it to the
4922  <systemitem role="package">quilt</systemitem> command using  <systemitem role="package">quilt</systemitem> command using
4923  <filename>deb3</filename> at <ulink url="http://bugs.debian.org/581186">http://bugs.debian.org/581186</ulink>.  <filename>deb3</filename> at <ulink url="&deb3;"/>.
4924  </para>  </para>
4925  </listitem>  </listitem>
4926  <listitem>  <listitem>
# Line 4726  commands, remove such things and make it Line 4934  commands, remove such things and make it
4934  </listitem>  </listitem>
4935  </itemizedlist>  </itemizedlist>
4936  <para>  <para>
4937  You need to do other tasks described in <xref linkend="newupstream"/> , too.  You need to do other tasks described in <xref linkend="newupstream"/>, too.
4938  </para>  </para>
4939  </section>  </section>
4940  <section id="reminders"><title>Reminders for updating packages</title>  <section id="reminders"><title>Reminders for updating packages</title>
# Line 4758  and <filename>debian/control</filename> Line 4966  and <filename>debian/control</filename>
4966  </listitem>  </listitem>
4967  <listitem>  <listitem>
4968  <para>  <para>
4969  Check to see <ulink url="http://www.debian.org/Bugs/">Debian Bug Tracking  Check to see <ulink url="&bts;">Debian Bug Tracking
4970  System (BTS)</ulink> if someone have provided patches to bugs that are  System (BTS)</ulink> if someone have provided patches to bugs that are
4971  currently open in it.  currently open in it.
4972  </para>  </para>

Legend:
Removed from v.8612  
changed lines
  Added in v.8706

  ViewVC Help
Powered by ViewVC 1.1.5