| 29 |
<title>Debian New Maintainers' Guide</title> |
<title>Debian New Maintainers' Guide</title> |
| 30 |
<bookinfo> |
<bookinfo> |
| 31 |
<authorgroup> |
<authorgroup> |
| 32 |
<author> <personname> <firstname>Josip</firstname> <surname>Rodin</surname> </personname> <email>joy-mg@debian.org</email> <contrib>(original contents)</contrib> </author> |
<!-- do not use firstname and surname tags it braks Japanese. The same with othercredit --> |
| 33 |
<author> <personname> <firstname>Osamu</firstname> <surname>Aoki</surname> </personname> <email>osamu@debian.org</email> <contrib>(updated contents)</contrib> </author> |
<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 --> |
<!-- translator credits in po4a/translator.*.ent --> |
| 36 |
&othercredit; |
&othercredit; |
| 37 |
</authorgroup> |
</authorgroup> |
| 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>&base-release;</literal> |
This document has been updated for the Debian <literal>&base-release;</literal> |
| 79 |
release. |
release. |
| 80 |
<footnote><para> The document assumes you are using the |
<footnote><para> The document assumes you are using a |
| 81 |
<literal>&base-release;</literal> system or newer. If you need to follow this |
<literal>&base-release;</literal> or newer system. If you need to follow this |
| 82 |
text in the older system (including the older Ubuntu system etc.), you must |
text in an older system (including an older Ubuntu system etc.), you must |
| 83 |
install backported <systemitem role="package">dpkg</systemitem> and |
install backported <systemitem role="package">dpkg</systemitem> and |
| 84 |
<systemitem role="package">debhelper</systemitem> packages, at least. |
<systemitem role="package">debhelper</systemitem> packages, at least. |
| 85 |
</para> </footnote> |
</para> </footnote> |
| 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 :-) |
| 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> |
<footnote><para> |
| 97 |
You can learn basic operations of the Debian system from |
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 |
<ulink url="&debref;">Debian Reference</ulink>. It contains some pointers to |
| 99 |
learn about Unix programming, too. |
learn about Unix programming, too. |
| 100 |
</para></footnote> |
</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 |
Newer versions of this document should always be available online at |
| 117 |
<ulink url="&maint-guide;"/> and in the |
<ulink url="&maint-guide;"/> and in the |
| 118 |
<systemitem role="package">maint-guide</systemitem> package. |
<systemitem role="package">maint-guide</systemitem> package. |
| 119 |
The translations may be available in packages such as |
The translations may be available in packages such as |
| 120 |
<systemitem role="package">maint-guide-es</systemitem>. |
<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 dynamism of Debian</title> |
<section id="socialdynamism"><title>Social dynamics of Debian</title> |
| 124 |
<para> |
<para> |
| 125 |
Here are my observation of the social dynamism of Debian. |
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> |
</para> |
| 128 |
<itemizedlist> |
<itemizedlist> |
| 129 |
<listitem><para>We all are volunteers.</para> |
<listitem><para>We all are volunteers.</para> |
| 130 |
<itemizedlist> |
<itemizedlist> |
| 131 |
<listitem><para>You can not impose others what to do.</para></listitem> |
<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> |
<listitem><para>You should be motivated to do things by yourself.</para></listitem> |
| 133 |
</itemizedlist></listitem> |
</itemizedlist></listitem> |
| 134 |
<listitem><para>Friendly cooperation is the driving force.</para> |
<listitem><para>Friendly cooperation is the driving force.</para> |
| 139 |
<listitem><para>Debian is not your school where you get automatic attention of teachers.</para> |
<listitem><para>Debian is not your school where you get automatic attention of teachers.</para> |
| 140 |
<itemizedlist> |
<itemizedlist> |
| 141 |
<listitem><para>You should be able to learn many things by yourself.</para></listitem> |
<listitem><para>You should be able to learn many things by yourself.</para></listitem> |
| 142 |
<listitem><para>Attention of other volunteers is the very scarce resource.</para></listitem> |
<listitem><para>Attention from other volunteers is a very scarce resource.</para></listitem> |
| 143 |
</itemizedlist></listitem> |
</itemizedlist></listitem> |
| 144 |
<listitem><para>Debian is constantly improving.</para> |
<listitem><para>Debian is constantly improving.</para> |
| 145 |
<itemizedlist> |
<itemizedlist> |
| 146 |
<listitem><para>You should adapt yourself to changes.</para></listitem> |
<listitem><para>You are expected to make high quality packages.</para></listitem> |
| 147 |
<listitem><para>Documentation may be slightly outdated .</para></listitem> |
<listitem><para>You should adapt yourself to change.</para></listitem> |
| 148 |
</itemizedlist></listitem> |
</itemizedlist></listitem> |
| 149 |
</itemizedlist> |
</itemizedlist> |
| 150 |
<para> |
<para> |
| 151 |
Since we focus only on technical aspects of packaging in this document, |
There are several types of people interacting around Debian with different |
| 152 |
please refer to the following to learn how Debian functions and how you can get involved. |
roles. |
| 153 |
</para> |
</para> |
| 154 |
<itemizedlist> |
<itemizedlist> |
| 155 |
<listitem><para><ulink url="&logiciellibre;">Debian: 17 ans de logiciel libre, "do-ocracy" et démocratie</ulink> (Introductory slides in English PDF) </para> </listitem> |
<listitem> |
| 156 |
<listitem><para><ulink url="&nm-do;">Debian New Maintainer site</ulink> (official) </para> </listitem> |
<para> |
| 157 |
<listitem><para><ulink url="&debianmentorfaq;">Debian Mentors FAQ</ulink> (supplemental) </para> </listitem> |
<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> |
</itemizedlist> |
|
</section> |
|
|
<section id="debiandeveloper"><title>Official Debian Developer</title> |
|
| 200 |
<para> |
<para> |
| 201 |
You can not become an official |
Please note that you cannot become an official |
| 202 |
<emphasis role="strong">Debian Developer</emphasis> (DD) over night because it |
<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 |
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 |
is useful to others, you can still upload your package either as a |
| 205 |
<emphasis role="strong">maintainer</emphasis> through a |
<emphasis role="strong">maintainer</emphasis> through a |
| 209 |
<para> |
<para> |
| 210 |
Please note that you do not need to create any new package to become an |
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 |
official Debian Developer. Contributing to the existing packages can provide a |
| 212 |
path to become an official Debian Developer too. There are many packages |
path to becoming an official Debian Developer too. There are many packages |
| 213 |
waiting for good maintainers (see <xref linkend="choose"/> ). |
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> |
</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> |
</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> |
| 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>) <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>.) |
|
<ulink url="&devscripts-readme;"/>.) |
|
| 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> |
| 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> |
| 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>.) |
| 345 |
</para> |
</para> |
| 346 |
</listitem> |
</listitem> |
| 347 |
<listitem> |
<listitem> |
| 348 |
<para> |
<para> |
| 349 |
<systemitem role="package">xutils-dev</systemitem> - some programs, usually |
<systemitem role="package">lintian</systemitem> - this is the Debian package |
| 350 |
those made for X11, also use these programs to generate |
checker, which can let you know of any common mistakes after you build the |
| 351 |
<filename>Makefile</filename> files from sets of macro functions. (see |
package, and explains the errors found. (See <citerefentry> |
| 352 |
<citerefentry> <refentrytitle>imake</refentrytitle> <manvolnum>1</manvolnum> |
<refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> |
| 353 |
</citerefentry>, <citerefentry> <refentrytitle>xmkmf</refentrytitle> |
</citerefentry>, |
| 354 |
<manvolnum>1</manvolnum> </citerefentry>) |
<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">lintian</systemitem> - this is the Debian package |
<systemitem role="package">patch</systemitem> - this very useful utility will |
| 360 |
checker that can let you know of any common mistakes after you build the |
take a file containing a difference listing (produced by the |
| 361 |
package, and explains the errors found. (see <citerefentry> |
<command>diff</command> program) and apply it to the original file, producing a |
| 362 |
<refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> |
patched version. (See <citerefentry> <refentrytitle>patch</refentrytitle> |
| 363 |
</citerefentry>, |
<manvolnum>1</manvolnum> </citerefentry>.) |
| 364 |
<ulink url="&lintian-doc;">Lintian User's Manual</ulink>) |
</para> |
| 365 |
|
</listitem> |
| 366 |
|
<listitem> |
| 367 |
|
<para> |
| 368 |
|
<systemitem role="package">patchutils</systemitem> - this package contains some |
| 369 |
|
utilities to work with patches such as the <command>lsdiff</command>, |
| 370 |
|
<command>interdiff</command> and <command>filterdiff</command> commands. |
| 371 |
</para> |
</para> |
| 372 |
</listitem> |
</listitem> |
| 373 |
<listitem> |
<listitem> |
| 384 |
</listitem> |
</listitem> |
| 385 |
<listitem> |
<listitem> |
| 386 |
<para> |
<para> |
| 387 |
<systemitem role="package">patchutils</systemitem> - this package contains some |
<systemitem role="package">perl</systemitem> - Perl is one of the most used |
| 388 |
utilities to work with patches such as the <command>lsdiff</command>, |
interpreted scripting languages on today's Unix-like systems, often referred to |
| 389 |
<command>interdiff</command> and <command>filterdiff</command> commands. |
as Unix's Swiss Army Chainsaw. (See <citerefentry> |
| 390 |
|
<refentrytitle>perl</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.) |
| 391 |
|
</para> |
| 392 |
|
</listitem> |
| 393 |
|
<listitem> |
| 394 |
|
<para> |
| 395 |
|
<systemitem role="package">python</systemitem> - Python is another of the most |
| 396 |
|
used interpreted scripting languages on the Debian system, combining |
| 397 |
|
remarkable power with very clear syntax. (See <citerefentry> |
| 398 |
|
<refentrytitle>python</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>.) |
| 399 |
</para> |
</para> |
| 400 |
</listitem> |
</listitem> |
| 401 |
<listitem> |
<listitem> |
| 402 |
<para> |
<para> |
| 403 |
<systemitem role="package">quilt</systemitem> - this package helps you to |
<systemitem role="package">quilt</systemitem> - this package helps you to |
| 404 |
manage a series of patches by keeping track of the changes each of them makes. |
manage large numbers of patches by keeping track of the changes each patch |
| 405 |
They are logically organized as a stack, and you can apply (=push), un-apply |
makes. Patches can be applied, un-applied, refreshed, and more. (See |
| 406 |
(=pop), refresh them easily by traveling into the stack. (see <citerefentry> |
<citerefentry> <refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum></citerefentry>, |
| 407 |
<refentrytitle>quilt</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>, |
<ulink url="&quilt-pdf;">quilt.pdf</ulink>.) |
|
<ulink url="&quilt-pdf;">quilt.pdf</ulink>) |
|
| 408 |
</para> |
</para> |
| 409 |
</listitem> |
</listitem> |
| 410 |
<listitem> |
<listitem> |
| 411 |
<para> |
<para> |
| 412 |
<systemitem role="package">git</systemitem> - this package provides popular |
<systemitem role="package">xutils-dev</systemitem> - some programs, usually |
| 413 |
version control system designed to handle very large projects with speed and |
those made for X11, also use these programs to generate |
| 414 |
efficiency; it is used for many high profile open source projects, most notably |
<filename>Makefile</filename> files from sets of macro functions. (See |
| 415 |
the Linux kernel. (see <citerefentry> <refentrytitle>git</refentrytitle> |
<citerefentry> <refentrytitle>imake</refentrytitle> <manvolnum>1</manvolnum> |
| 416 |
<manvolnum>1</manvolnum> </citerefentry>, |
</citerefentry>, <citerefentry> <refentrytitle>xmkmf</refentrytitle> |
| 417 |
<ulink url="&git-doc;">git Manual</ulink>) |
<manvolnum>1</manvolnum> </citerefentry>.) |
| 418 |
</para> |
</para> |
| 419 |
</listitem> |
</listitem> |
| 420 |
</itemizedlist> |
</itemizedlist> |
| 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> |
<para> |
| 428 |
If you have specific questions later, I suggest you to read the documents |
If you have specific questions later, I would suggest re-reading the documents |
| 429 |
mentioned above again. Since this is a tutorial, I intentionally skipped |
mentioned above. Since this is a tutorial, I have intentionally skipped |
| 430 |
details and provided only pointers to keep it simple. |
details and provided only pointers to keep it simple. |
| 431 |
</para> |
</para> |
| 432 |
</section> |
</section> |
| 433 |
<section id="needdocs"><title>Documentations you need for development</title> |
<section id="needdocs"><title>Documentation needed for development</title> |
| 434 |
<para> |
<para> |
| 435 |
The following is the <emphasis>very important</emphasis> documentation which |
The following is the <emphasis>very important</emphasis> documentation which |
| 436 |
you should read along with this document: |
you should read along with this document: |
| 438 |
<itemizedlist> |
<itemizedlist> |
| 439 |
<listitem> |
<listitem> |
| 440 |
<para> |
<para> |
| 441 |
|
<ulink url="&autotools-tutorial;">Autotools |
| 442 |
|
Tutorial</ulink> provides a very good tutorial for <ulink url="&gnu-build-system;">the GNU Build System known |
| 443 |
|
as the GNU Autotools</ulink> whose most important components are Autoconf, |
| 444 |
|
Automake, Libtool, and gettext. |
| 445 |
|
</para> |
| 446 |
|
</listitem> |
| 447 |
|
<listitem> |
| 448 |
|
<para> |
| 449 |
<systemitem role="package">debian-policy</systemitem> - the <ulink url="&debian-policy;">Debian Policy |
<systemitem role="package">debian-policy</systemitem> - the <ulink url="&debian-policy;">Debian Policy |
| 450 |
Manual</ulink> includes explanations of the structure and contents of the |
Manual</ulink> includes explanations of the structure and contents of the |
| 451 |
Debian archive, several OS design issues, the <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink> |
Debian archive, several OS design issues, the <ulink url="&fhs;">Filesystem Hierarchy Standard</ulink> |
| 452 |
(FHS, which says where each file and directory should be) etc. For you, the most |
(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 |
important thing is that it describes requirements that each package must |
| 454 |
satisfy to be included in the distribution (see the local copies of |
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>). |
<ulink url="&policy-pdf;">policy.pdf</ulink> and <ulink url="&fhs-pdf;">fhs-2.3.pdf</ulink>). |
| 461 |
- the <ulink url="&developers-reference;">Debian Developer's Reference</ulink> |
- the <ulink url="&developers-reference;">Debian Developer's Reference</ulink> |
| 462 |
describes all matters not specifically about the technical |
describes all matters not specifically about the technical |
| 463 |
details of packaging, like the structure of the archive, how to rename, orphan, |
details of packaging, like the structure of the archive, how to rename, orphan, |
| 464 |
pick up packages, how to do NMUs, how to manage bugs, best packaging practices, |
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 |
when and where to upload etc. (See the local copy of |
| 466 |
<ulink url="&developers-refpdf;">developers-reference.pdf</ulink>). |
<ulink url="&developers-refpdf;">developers-reference.pdf</ulink>.) |
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<ulink url="&autotools-tutorial;">Autotools |
|
|
Tutorial</ulink> provides very good tutorial for <ulink url="&gnu-build-system;">the GNU Build System known |
|
|
as the GNU Autotools</ulink> whose most important components are Autoconf, |
|
|
Automake, Libtool, and gettext. |
|
| 467 |
</para> |
</para> |
| 468 |
</listitem> |
</listitem> |
| 469 |
<listitem> |
<listitem> |
| 473 |
<ulink url="&gnu-standard;">GNU Coding Standards</ulink>, and |
<ulink url="&gnu-standard;">GNU Coding Standards</ulink>, and |
| 474 |
<ulink url="&gnu-maintainer;">Information for Maintainers of GNU Software</ulink>. |
<ulink url="&gnu-maintainer;">Information for Maintainers of GNU Software</ulink>. |
| 475 |
Although Debian does not require these to |
Although Debian does not require these to |
| 476 |
be followed, these are still helpful as guidelines and common sense. (see the local copies of |
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 |
<ulink url="&gnu-standard-pdf;">standards.pdf</ulink> and |
| 479 |
<ulink url="&gnu-maintainer-pdf;">maintain.pdf</ulink>). |
<ulink url="&gnu-maintainer-pdf;">maintain.pdf</ulink>.) |
| 480 |
</para> |
</para> |
| 481 |
</listitem> |
</listitem> |
| 482 |
</itemizedlist> |
</itemizedlist> |
| 483 |
<para> |
<para> |
| 484 |
If this document contradicts with any of the documents mentioned above, they |
If this document contradicts any of the documents mentioned above, they |
| 485 |
are correct. Please file a bug report on the |
are correct. Please file a bug report on the |
| 486 |
<systemitem role="package">maint-guide</systemitem> package using |
<systemitem role="package">maint-guide</systemitem> package using |
| 487 |
<command>reportbug</command>. |
<command>reportbug</command>. |
| 488 |
</para> |
</para> |
| 489 |
</section> |
</section> |
|
<section id="terminology"><title>Basic terminology</title> |
|
|
<para> |
|
|
There are two types of packages. |
|
|
</para> |
|
|
<itemizedlist> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">source package</emphasis>: A source package is a set of |
|
|
files which contain code and data which you can compile and process into |
|
|
execution programs and formatted documents. It usually comes as a combination |
|
|
of <filename>*.orig.tar.gz</filename>, <filename>*.debian.tar.gz</filename> (or |
|
|
<filename>*.diff.gz</filename>), and <filename>*.dsc</filename>. Some other |
|
|
archive and compression methods may be used, too. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">binary package</emphasis>: A binary package contains |
|
|
execution programs and formatted documents. It usually comes as |
|
|
<filename>*.deb</filename> for the normal Debian system and as |
|
|
<filename>*.udeb</filename> for the Debian Installer. |
|
|
</para> |
|
|
</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> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">upstream author</emphasis>: The person who made the |
|
|
original program. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">upstream maintainer</emphasis>: The person who |
|
|
currently maintains the program. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">maintainer</emphasis>: The person who makes Debian |
|
|
package of the program. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">sponsor</emphasis>: The person who helps maintainers to |
|
|
upload packages to the official Debian Package Archive after checking their |
|
|
contents. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">mentor</emphasis>: The person who helps novice |
|
|
maintainers on packaging etc. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">Debian Developer</emphasis> (DD): The person who is a |
|
|
member of Debian. He has full upload right to the official Debian Package |
|
|
Archive. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">Debian Maintainer</emphasis> (DM): The person who has |
|
|
limited upload right to the official Debian Package Archive. |
|
|
</para> |
|
|
</listitem> |
|
|
</itemizedlist> |
|
|
<para> |
|
|
There are several version names<footnote><para>See <ulink url="&policy-control;#s-f-Version">Debian Policy Manual: 5.6.12 Version</ulink>.</para></footnote> used around Debian. |
|
|
</para> |
|
|
<itemizedlist> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">upstream source version</emphasis>: The upstream source |
|
|
version is referred as <literal><replaceable>version</replaceable></literal>. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">Debian revision</emphasis>: The revision by Debian on |
|
|
package is referred as <literal><replaceable>revision</replaceable></literal>. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<emphasis role="strong">Debian package version</emphasis>: The Debian package |
|
|
version is referred as the following. |
|
|
</para> |
|
|
<itemizedlist> |
|
|
<listitem> |
|
|
<para> |
|
|
<literal><replaceable>version</replaceable></literal> for the native Debian |
|
|
binary package and for the Debian source package. |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
<literal><replaceable>version</replaceable>-<replaceable>revision</replaceable></literal> |
|
|
for the non-native Debian binary package. |
|
|
</para> |
|
|
</listitem> |
|
|
</itemizedlist> |
|
|
</listitem> |
|
|
</itemizedlist> |
|
|
<para> |
|
|
Please read the other manuals if you need more details on terminology. |
|
|
<footnote><para>See lists in <xref linkend="socialdynamism"/> and <xref linkend="needdocs"/>.</para></footnote> |
|
|
</para> |
|
|
</section> |
|
| 490 |
<section id="helpme"><title>Where to ask for help</title> |
<section id="helpme"><title>Where to ask for help</title> |
| 491 |
<para> |
<para> |
| 492 |
Before you decide to ask your question in some public place, please read the fine documentation. |
Before you decide to ask your question in some public place, please read the fine documentation. |
| 494 |
<itemizedlist> |
<itemizedlist> |
| 495 |
<listitem> |
<listitem> |
| 496 |
<para> |
<para> |
| 497 |
files in <filename>/usr/share/doc/dpkg</filename> |
files in <filename>/usr/share/doc/<replaceable>package</replaceable></filename> for all pertinent packages |
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
files in <filename>/usr/share/doc/debian</filename> |
|
|
<!-- /usr/share/doc/debian is used be doc-debian and debian-faq --> |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
files in <filename>/usr/share/doc/autotools-dev</filename> |
|
|
</para> |
|
|
</listitem> |
|
|
<listitem> |
|
|
<para> |
|
|
files in <filename>/usr/share/doc/<replaceable>package</replaceable></filename> for all pertinent packages. |
|
| 498 |
</para> |
</para> |
| 499 |
</listitem> |
</listitem> |
| 500 |
<listitem> |
<listitem> |
| 519 |
</listitem> |
</listitem> |
| 520 |
</itemizedlist> |
</itemizedlist> |
| 521 |
<para> |
<para> |
| 522 |
Please consider to use web search engine effectively by including search string |
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. |
such as <literal>site:lists.debian.org</literal> to limit the domain. |
| 524 |
</para> |
</para> |
| 525 |
<para> |
<para> |
| 526 |
Making a small test package is good way to learn details of packaging. |
Making a small test package is a good way to learn details of packaging. |
| 527 |
Inspecting existing well maintained packages is the best way to learn how other |
Inspecting existing well maintained packages is the best way to learn how other |
| 528 |
people make packages. |
people make packages. |
| 529 |
</para> |
</para> |
| 558 |
<ulink url="&bts;">Debian Bug Tracking System</ulink> |
<ulink url="&bts;">Debian Bug Tracking System</ulink> |
| 559 |
and read the documentation there, to be able to |
and read the documentation there, to be able to |
| 560 |
deal with the reports efficiently. I highly recommend reading the |
deal with the reports efficiently. I highly recommend reading the |
| 561 |
<ulink url="&devref-bug-handling;">Debian Developer's Reference, 5.8. 'Handling bugs'</ulink>. |
<ulink url="&devref-bug-handling;">Debian Developer's Reference, 5.8: |
| 562 |
|
"Handling bugs"</ulink>. |
| 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 |
| 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> |
| 583 |
|
<para> |
| 584 |
|
This involves generating several specifically named files for each step of the |
| 585 |
|
Debian package building. |
| 586 |
|
</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> |
| 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> |
| 607 |
|
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. |
| 608 |
|
</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> |
| 615 |
|
When there is no complication with the Debian policy, |
| 616 |
|
<literal><replaceable>programname</replaceable></literal> is substituted by the |
| 617 |
|
<emphasis role="strong">package name</emphasis>, |
| 618 |
|
<literal><replaceable>version</replaceable></literal> is substituted by the |
| 619 |
|
<emphasis role="strong">upstream version</emphasis>, and |
| 620 |
|
<literal><replaceable>revision</replaceable></literal> is substituted by the |
| 621 |
|
<emphasis role="strong">Debian revision</emphasis>. |
| 622 |
</para> |
</para> |
| 623 |
<section id="choose"><title>Choose your program</title> |
<section id="choose"><title>Choose your program</title> |
| 624 |
<para> |
<para> |
| 631 |
<para>the <command>aptitude</command> command</para> |
<para>the <command>aptitude</command> command</para> |
| 632 |
</listitem> |
</listitem> |
| 633 |
<listitem> |
<listitem> |
| 634 |
<para><ulink url="&packages-do;">Debian packages</ulink> web page</para> |
<para>the <ulink url="&packages-do;">Debian packages</ulink> web page</para> |
| 635 |
</listitem> |
</listitem> |
| 636 |
<listitem> |
<listitem> |
| 637 |
<para><ulink url="&packages-qa-do;">Debian Package Tracking System</ulink> web page</para> |
<para>the <ulink url="&packages-qa-do;">Debian Package Tracking System</ulink> web page</para> |
| 638 |
</listitem> |
</listitem> |
| 639 |
</itemizedlist> |
</itemizedlist> |
| 640 |
<para> |
<para> |
| 641 |
If the package already exists, well, install it! :-) If it happens to be |
If the package already exists, well, install it! :-) If it happens to be |
| 642 |
<emphasis role="strong">orphaned</emphasis> -- if its maintainer is set to |
<emphasis role="strong">orphaned</emphasis> (that is, if its |
| 643 |
<ulink url="&qa-do;">Debian QA Group</ulink>, you may be able to pick it up if |
maintainer is set to <ulink url="&qa-do;">Debian QA Group</ulink>), |
| 644 |
it's still available. You may also adopt a package for which the corresponding |
you may be able to pick it up if it's still available. You may also |
| 645 |
maintainer has filed a Request for Adoption |
adopt a package whose maintainer has filed a Request for Adoption |
| 646 |
(<emphasis role="strong">RFA</emphasis>). |
(<emphasis role="strong">RFA</emphasis>).<footnote> <para>See |
| 647 |
|
<ulink url="&devref-adopt;">Debian Developer's Reference 5.9.5. |
| 648 |
|
"Adopting a package"</ulink>.</para> </footnote> |
| 649 |
</para> |
</para> |
| 650 |
<para> |
<para> |
| 651 |
There are several package ownership status resources. |
There are several package ownership status resources. |
| 655 |
<para> <ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> </para> |
<para> <ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> </para> |
| 656 |
</listitem> |
</listitem> |
| 657 |
<listitem> |
<listitem> |
| 658 |
<para> <ulink url="&wnpp-bts;">Debian Bug report logs: Bugs in package wnpp in unstable</ulink> </para> |
<para> <ulink url="&wnpp-bts;">Debian Bug report logs: Bugs in pseudo-package <systemitem role="package">wnpp</systemitem> in <literal>unstable</literal></ulink> </para> |
| 659 |
</listitem> |
</listitem> |
| 660 |
<listitem> |
<listitem> |
| 661 |
<para> <ulink url="&wnpp-dn;">Debian Packages that Need Lovin'</ulink> </para> |
<para> <ulink url="&wnpp-dn;">Debian Packages that Need Lovin'</ulink> </para> |
| 662 |
</listitem> |
</listitem> |
| 663 |
<listitem> |
<listitem> |
| 664 |
<para> <ulink url="&wnpp-debtags;">Browse WNPP bugs based on debtags</ulink> </para> |
<para> <ulink url="&wnpp-debtags;">Browse <systemitem role="package">wnpp</systemitem> bugs based on debtags</ulink> </para> |
| 665 |
</listitem> |
</listitem> |
| 666 |
</itemizedlist> |
</itemizedlist> |
| 667 |
<para> |
<para> |
| 670 |
archive is much larger than that of contributors with upload rights. Thus, |
archive is much larger than that of contributors with upload rights. Thus, |
| 671 |
contributions to packages already in the archive are far more appreciated (and |
contributions to packages already in the archive are far more appreciated (and |
| 672 |
more likely to receive sponsorship) by other developers <footnote><para> Having |
more likely to receive sponsorship) by other developers <footnote><para> Having |
| 673 |
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 |
| 674 |
packaging. </para> </footnote>. You can do that in various ways. |
packaging. </para> </footnote>. You can contribute in various ways. |
| 675 |
</para> |
</para> |
| 676 |
<itemizedlist> |
<itemizedlist> |
| 677 |
<listitem> |
<listitem> |
| 701 |
examine them. This document unfortunately doesn't include comprehensive |
examine them. This document unfortunately doesn't include comprehensive |
| 702 |
information about adopting packages. Thankfully you shouldn't have a hard time |
information about adopting packages. Thankfully you shouldn't have a hard time |
| 703 |
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 |
| 704 |
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 |
| 705 |
applicable for your case. |
applicable for your case. |
| 706 |
</para> |
</para> |
| 707 |
<para> |
<para> |
| 711 |
<itemizedlist> |
<itemizedlist> |
| 712 |
<listitem> |
<listitem> |
| 713 |
<para> |
<para> |
| 714 |
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 |
| 715 |
confirm its usefulness. |
confirm its usefulness. |
| 716 |
</para> |
</para> |
| 717 |
</listitem> |
</listitem> |
| 718 |
<listitem> |
<listitem> |
| 719 |
<para> |
<para> |
| 720 |
You must check if no one else is working on the package already at the |
You must check that no one else is already working on the package on the |
| 721 |
<ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> site. |
<ulink url="&wnpp-do;">Work-Needing and Prospective Packages</ulink> site. |
| 722 |
If no one else is working on it, file an ITP (Intent |
If no one else is working on it, file an ITP (Intent |
| 723 |
To Package) bug report to the <systemitem role="package">wnpp</systemitem> |
To Package) bug report to the <systemitem role="package">wnpp</systemitem> |
| 724 |
pseudo-package using <command>reportbug</command>. If someone's already on it, |
pseudo-package using <command>reportbug</command>. If someone's already on it, |
| 725 |
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 |
| 726 |
program that nobody maintains. |
program that nobody is maintaining. |
| 727 |
</para> |
</para> |
| 728 |
</listitem> |
</listitem> |
| 729 |
<listitem> |
<listitem> |
| 730 |
<para> |
<para> |
| 731 |
That program <emphasis role="strong">must have a license</emphasis>. |
The software <emphasis role="strong">must have a license</emphasis>. |
| 732 |
</para> |
</para> |
| 733 |
<itemizedlist> |
<itemizedlist> |
| 734 |
<listitem> |
<listitem> |
| 735 |
<para> |
<para> |
| 736 |
For the <literal>main</literal> section, it <emphasis role="strong">must be |
For the <literal>main</literal> section, Debian Policy requires it |
| 737 |
compliant to all the Debian Free Software Guidelines</emphasis> (<ulink url="&dfsg;">DFSG</ulink>) |
<emphasis role="strong">to be fully compliant with the Debian Free Software |
| 738 |
and <emphasis role="strong">that program must not require a package outside of |
Guidelines</emphasis> (<ulink url="&dfsg;">DFSG</ulink>) |
| 739 |
<literal>main</literal></emphasis> for compilation or execution as required by |
and <emphasis role="strong">not to require a package outside of |
| 740 |
the Debian Policy. This is desired case. |
<literal>main</literal></emphasis> for compilation or execution. This |
| 741 |
|
is the desired case. |
| 742 |
</para> |
</para> |
| 743 |
</listitem> |
</listitem> |
| 744 |
<listitem> |
<listitem> |
| 745 |
<para> |
<para> |
| 746 |
For the <literal>contrib</literal> section, it must be compliant to all the |
For the <literal>contrib</literal> section, it must comply with the |
| 747 |
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 |
| 748 |
compilation or execution. |
compilation or execution. |
| 749 |
</para> |
</para> |
| 750 |
</listitem> |
</listitem> |
| 751 |
<listitem> |
<listitem> |
| 752 |
<para> |
<para> |
| 753 |
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 |
| 754 |
the DFSG but it <emphasis role="strong">must be distributable</emphasis>. |
with the DFSG but it <emphasis role="strong">must be distributable</emphasis>. |
| 755 |
</para> |
</para> |
| 756 |
</listitem> |
</listitem> |
| 757 |
</itemizedlist> |
</itemizedlist> |
| 762 |
</listitem> |
</listitem> |
| 763 |
<listitem> |
<listitem> |
| 764 |
<para> |
<para> |
| 765 |
That program certainly should <emphasis role="strong">not</emphasis> run setuid |
The program certainly should <emphasis role="strong">not</emphasis> run setuid |
| 766 |
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. |
| 767 |
</para> |
</para> |
| 768 |
</listitem> |
</listitem> |
| 769 |
<listitem> |
<listitem> |
| 770 |
<para> |
<para> |
| 771 |
That program should not be a daemon, or something that goes in |
The program should not be a daemon, or go in an |
| 772 |
<filename>*/sbin</filename> directories, or open a port as root. |
<filename>*/sbin</filename> directory, or open a port as root. |
| 773 |
</para> |
</para> |
| 774 |
</listitem> |
</listitem> |
| 775 |
<listitem> |
<listitem> |
| 776 |
<para> |
<para> |
| 777 |
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. |
|
| 778 |
</para> |
</para> |
| 779 |
</listitem> |
</listitem> |
| 780 |
<listitem> |
<listitem> |
| 781 |
<para> |
<para> |
| 782 |
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 |
| 783 |
(i.e. not obfuscated). |
(i.e. not obfuscated). |
| 784 |
</para> |
</para> |
| 785 |
</listitem> |
</listitem> |
| 786 |
<listitem> |
<listitem> |
| 787 |
<para> |
<para> |
| 788 |
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 |
| 789 |
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) |
| 790 |
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 |
| 791 |
package unmaintained pieces of software. |
unmaintained software. |
| 792 |
</para> |
</para> |
| 793 |
</listitem> |
</listitem> |
| 794 |
</itemizedlist> |
</itemizedlist> |
| 795 |
<para> |
<para> |
| 796 |
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 |
| 797 |
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 |
| 798 |
some more experience in packaging, you'll be able to package such packages. |
more experience in packaging, you'll be able to package such software. |
| 799 |
</para> |
</para> |
| 800 |
</section> |
</section> |
| 801 |
<section id="getit"><title>Get the program, and try it out</title> |
<section id="getit"><title>Get the program, and try it out</title> |
| 802 |
<para> |
<para> |
| 803 |
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. |
| 804 |
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 |
| 805 |
author's homepage. Sources for free Unix programs usually come in |
author's homepage. Sources for free Unix programs usually come in |
| 806 |
<command>tar</command>+<command>gzip</command> format with extension |
<command>tar</command>+<command>gzip</command> format with the extension |
| 807 |
<filename>.tar.gz</filename>, or |
<filename>.tar.gz</filename>, or |
| 808 |
<command>tar</command>+<command>bzip2</command> format with extension |
<command>tar</command>+<command>bzip2</command> format with the extension |
| 809 |
<filename>.tar.bz2</filename>. These usually contain the subdirectory called |
<filename>.tar.bz2</filename>. These usually contain a directory called |
| 810 |
<filename><replaceable>programname</replaceable>-<replaceable>version</replaceable></filename> |
<filename><replaceable>programname</replaceable>-<replaceable>version</replaceable></filename> |
| 811 |
in them and all the sources under it. |
with all the sources inside. |
| 812 |
</para> |
</para> |
| 813 |
<para> |
<para> |
| 814 |
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, |
| 815 |
Subversion, or CVS repository, you need to get it with <literal>git |
Subversion, or CVS, you need to get it with <literal>git |
| 816 |
clone</literal>, <literal>svn co</literal>, or <literal>cvs co</literal> and |
clone</literal>, <literal>svn co</literal>, or <literal>cvs co</literal> and |
| 817 |
repack it into <command>tar</command>+<command>gzip</command> format by |
repack it into <command>tar</command>+<command>gzip</command> format yourself |
| 818 |
yourself using the <literal>--exclude-vcs</literal> option. |
by using the <literal>--exclude-vcs</literal> option. |
| 819 |
</para> |
</para> |
| 820 |
<para> |
<para> |
| 821 |
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 |
| 822 |
filename ends in <filename>.Z</filename> or |
filename ends in <filename>.Z</filename> or |
| 823 |
<filename>.zip</filename><footnote><para> You can identify the archive format |
<filename>.zip</filename><footnote><para> You can identify the archive format |
| 824 |
using the <command>file</command> command when the file extension is not |
using the <command>file</command> command when the file extension is not |
| 825 |
enough. </para> </footnote>), unpack it with appropriate tools and repack it, |
enough. </para> </footnote>), you should also unpack it with the |
| 826 |
too. |
appropriate tools and repack it. |
| 827 |
</para> |
</para> |
| 828 |
<para> |
<para> |
| 829 |
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+ |
| 830 |
file manager. |
file manager. |
| 831 |
<footnote><para> This program is already packaged. Its |
<footnote><para> This program is already packaged. The |
| 832 |
<ulink url="&gentoo-package;">current version</ulink> uses Autotools as its |
<ulink url="&gentoo-package;">current version</ulink> uses Autotools as its |
| 833 |
build structure and is substantially different from the following examples |
build structure and is substantially different from the following examples, |
| 834 |
based on the version 0.9.12.</para> |
which were based on version 0.9.12.</para> |
| 835 |
</footnote> |
</footnote> |
| 836 |
</para> |
</para> |
| 837 |
<para> |
<para> |
| 839 |
<filename>debian</filename> or <filename>deb</filename> or anything you find |
<filename>debian</filename> or <filename>deb</filename> or anything you find |
| 840 |
appropriate (e.g. just <filename>~/gentoo</filename> would do fine in this |
appropriate (e.g. just <filename>~/gentoo</filename> would do fine in this |
| 841 |
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 |
| 842 |
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 |
| 843 |
<emphasis>irrelevant</emphasis> ones, because there will most probably be |
messages, even <emphasis>irrelevant</emphasis> ones, because other |
| 844 |
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 |
| 845 |
not ignore those anomalies. On your console screen, you should see the |
may have problems unpacking them. Your shell commandline may look |
| 846 |
following. |
something like this: |
| 847 |
</para> |
</para> |
| 848 |
<screen> |
<screen> |
| 849 |
$ mkdir ~/gentoo ; cd ~/gentoo |
$ mkdir ~/gentoo ; cd ~/gentoo |
| 858 |
Change to that directory and <emphasis>thoroughly</emphasis> read the provided |
Change to that directory and <emphasis>thoroughly</emphasis> read the provided |
| 859 |
documentation. Usually there are files named <filename>README*</filename>, |
documentation. Usually there are files named <filename>README*</filename>, |
| 860 |
<filename>INSTALL*</filename>, <filename>*.lsm</filename> or |
<filename>INSTALL*</filename>, <filename>*.lsm</filename> or |
| 861 |
<filename>*.html</filename>. You must find instructions on how to correctly |
<filename>*.html</filename>. You must find instructions on how to |
| 862 |
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 |
| 863 |
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 |
| 864 |
that, but more on that later in <xref linkend="destdir"/> ). |
that, but more on that later in <xref linkend="destdir"/>). |
| 865 |
</para> |
</para> |
| 866 |
<para> |
<para> |
| 867 |
Simple programs come with a <filename>Makefile</filename> file in them and can |
Simple programs come with a <filename>Makefile</filename> and can |
| 868 |
be compiled simply with <literal>make</literal>.<footnote><para> |
be compiled just by invoking <literal>make</literal>.<footnote><para> |
| 869 |
Many modern programs come with a script <filename>configure</filename> which |
Many modern programs come with a script <filename>configure</filename> which |
| 870 |
creates a <filename>Makefile</filename> file customized for your system upon |
when executed creates a <filename>Makefile</filename> customized for |
| 871 |
its execution.</para></footnote> Some of them support |
your system.</para></footnote> Some of them support |
| 872 |
<literal>make check</literal>, which runs included self-checks. Installation |
<literal>make check</literal>, which runs included self-tests. Installation |
| 873 |
to the destination directories is usually done with <literal>make |
to the destination directories is usually done with <literal>make |
| 874 |
install</literal>. |
install</literal>. |
| 875 |
</para> |
</para> |
| 886 |
</section> |
</section> |
| 887 |
<section id="portable"><title>Free portable programs</title> |
<section id="portable"><title>Free portable programs</title> |
| 888 |
<para> |
<para> |
| 889 |
A lot of Free programs are written in the <ulink url="&c-program;">C</ulink> and |
A lot of free software is written in the <ulink url="&c-program;">C</ulink> and |
| 890 |
<ulink url="&cxx;">C++</ulink> languages. Many of |
<ulink url="&cxx;">C++</ulink> languages. Many of |
| 891 |
these use Autotools or CMake to make them portable across different platforms. |
these use Autotools or CMake to make them portable across different platforms. |
| 892 |
These tools are used to generate <filename>Makefile</filename> and other |
These tools are used to generate the <filename>Makefile</filename> and other |
| 893 |
required source files. Then, such programs are built with usual <literal>make; |
required source files. Then, such programs are built using the usual |
| 894 |
make install</literal>. |
<literal>make; make install</literal>. |
| 895 |
</para> |
</para> |
| 896 |
<para> |
<para> |
| 897 |
<ulink url="&gnu-build-system;">Autotools</ulink> |
<ulink url="&gnu-build-system;">Autotools</ulink> is the GNU build |
| 898 |
are the GNU build system comprising <ulink url="&autoconf;">Autoconf</ulink>, <ulink url="&automake;">Automake</ulink>, <ulink url="&libtool;">Libtool</ulink>, and <ulink url="&gettext;">gettext</ulink>. You can notice |
system comprising <ulink url="&autoconf;">Autoconf</ulink>, |
| 899 |
|
<ulink url="&automake;">Automake</ulink>, |
| 900 |
|
<ulink url="&libtool;">Libtool</ulink>, and |
| 901 |
|
<ulink url="&gettext;">gettext</ulink>. You can recognize |
| 902 |
such sources by the <filename>configure.ac</filename>, |
such sources by the <filename>configure.ac</filename>, |
| 903 |
<filename>Makefile.am</filename>, and <filename>Makefile.in</filename> files. |
<filename>Makefile.am</filename>, and <filename>Makefile.in</filename> files. |
| 904 |
<footnote><para> See <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink> |
<footnote><para> See the <ulink url="&autotools-tutorial;">Autotools Tutorial</ulink> |
| 905 |
and <ulink url="&autotools-readme;"/>. </para> </footnote> |
and <ulink url="&autotools-readme;"/>. </para> </footnote> |
| 906 |
</para> |
</para> |
| 907 |
<para> |
<para> |
| 908 |
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 |
| 909 |
<literal>autoreconf -i -f</literal> in the source and distributes this source |
<literal>autoreconf -i -f</literal> in the source directory and |
| 910 |
with generated files. |
distributes the generated files along with the source. |
| 911 |
</para> |
</para> |
| 912 |
<screen> |
<screen> |
| 913 |
configure.ac-----+-> autoreconf -+-> configure |
configure.ac-----+-> autoreconf -+-> configure |
| 926 |
<literal>info automake</literal>. |
<literal>info automake</literal>. |
| 927 |
</para> |
</para> |
| 928 |
<para> |
<para> |
| 929 |
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 |
| 930 |
distributed source and runs <literal>./configure && make</literal> in |
distributed source and runs <literal>./configure && make</literal> in |
| 931 |
the source to compile program into a |
the source directory to compile the program into a |
| 932 |
<command><replaceable>binary</replaceable></command>. |
<command><replaceable>binary</replaceable></command>. |
| 933 |
</para> |
</para> |
| 934 |
<screen> |
<screen> |
| 940 |
config.guess --+ |
config.guess --+ |
| 941 |
</screen> |
</screen> |
| 942 |
<para> |
<para> |
| 943 |
You can change many things in the <filename>Makefile</filename> file such as |
You can change many things in the <filename>Makefile</filename>; for |
| 944 |
the default file install location using the command option, e.g. |
instance you can change the default location for file installation |
| 945 |
<command>./configure --prefix=/usr</command>. |
using the option <command>./configure --prefix=/usr</command>. |
| 946 |
</para> |
</para> |
| 947 |
<para> |
<para> |
| 948 |
Although it is not required, updating the <filename>configure</filename> and |
Although it is not required, updating the <filename>configure</filename> and |
| 949 |
other files with <literal>autoreconf -i -f</literal> as the user may improve |
other files with <literal>autoreconf -i -f</literal> may improve |
| 950 |
the compatibility of the source. |
the compatibility of the source. |
| 951 |
<footnote><para>You can automate this by using |
<footnote><para>You can automate this by using |
| 952 |
<systemitem role="package">dh_autoreconf</systemitem> package. |
<systemitem role="package">dh-autoreconf</systemitem> package. |
| 953 |
See <xref linkend="customrules"/>.</para></footnote> |
See <xref linkend="customrules"/>.</para></footnote> |
| 954 |
</para> |
</para> |
| 955 |
<para> |
<para> |
| 956 |
<ulink url="&cmake;">CMake</ulink> is an alternative |
<ulink url="&cmake;">CMake</ulink> is an alternative |
| 957 |
build system. You can notice such sources by the |
build system. You can recognize such sources by the |
| 958 |
<filename>CMakeLists.txt</filename> file. |
<filename>CMakeLists.txt</filename> file. |
| 959 |
</para> |
</para> |
| 960 |
</section> |
</section> |
| 971 |
</para> |
</para> |
| 972 |
<para> |
<para> |
| 973 |
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, |
| 974 |
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 |
| 975 |
package would be named <systemitem role="package">johnledx</systemitem>, or |
editor for X" might be named <systemitem role="package">johnledx</systemitem>, or |
| 976 |
<systemitem role="package">jle4x</systemitem>, or whatever you decide, as long |
<systemitem role="package">jle4x</systemitem>, or whatever you decide, as long |
| 977 |
as it's under some reasonable limit, e.g. 20 characters. |
as it's under some reasonable length limit, e.g. 20 characters. |
| 978 |
</para> |
</para> |
| 979 |
<para> |
<para> |
| 980 |
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 |
| 981 |
version). If that piece of software is not numbered with versions like |
version). If this piece of software is not numbered with versions like |
| 982 |
<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 |
| 983 |
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. |
| 984 |
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 |
| 985 |
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 |
| 986 |
<literal>YYYYMMDD</literal> format, which would be <literal>20091023</literal>, |
<literal>YYYYMMDD</literal> format, which would be <literal>20091023</literal>, |
| 987 |
to ensure proper order for upgrade with the <command>dpkg</command> |
to ensure that <command>dpkg</command> sees later versions as |
| 988 |
program.<footnote><para> Version string can be compared by <literal>dpkg |
upgrades.<footnote><para> Version strings can be compared with <literal>dpkg |
| 989 |
--compare-versions <replaceable>ver1</replaceable> |
--compare-versions <replaceable>ver1</replaceable> |
| 990 |
<replaceable>op</replaceable> <replaceable>ver2</replaceable></literal>. See |
<replaceable>op</replaceable> <replaceable>ver2</replaceable></literal>. See |
| 991 |
<citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> |
<citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> |
| 992 |
</citerefentry> manpage. </para> </footnote> |
</citerefentry>. </para> </footnote> |
| 993 |
</para> |
</para> |
| 994 |
<para> |
<para> |
| 995 |
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 |
| 998 |
</section> |
</section> |
| 999 |
<section id="dh-make"><title>Initial Debian package</title> |
<section id="dh-make"><title>Initial Debian package</title> |
| 1000 |
<para> |
<para> |
| 1001 |
Let's set up the shell environment variable <literal>$DEBEMAIL</literal> and |
Set up the shell environment variables <literal>$DEBEMAIL</literal> and |
| 1002 |
<literal>$DEBFULLNAME</literal> so many Debian maintenance tools recognize your |
<literal>$DEBFULLNAME</literal> so that various Debian maintenance |
| 1003 |
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 |
| 1004 |
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 |
| 1005 |
other login shells such as Z shell, use their pertinent configuration files |
some other login shell such as Z shell, use their corresponding |
| 1006 |
instead of <filename>~/.bashrc</filename>. </para> </footnote>. |
configuration files instead of <filename>~/.bashrc</filename>. </para> </footnote>. |
| 1007 |
</para> |
</para> |
| 1008 |
<screen> |
<screen> |
| 1009 |
$ cat >>~/.bashrc <<EOF |
$ cat >>~/.bashrc <<EOF |
| 1013 |
EOF |
EOF |
| 1014 |
</screen> |
</screen> |
| 1015 |
<para> |
<para> |
| 1016 |
Let's make an initial Debian package by issuing the <command>dh_make</command> |
You can create an initial Debian package by issuing the |
| 1017 |
command as follows. |
<command>dh_make</command> command as follows. |
| 1018 |
</para> |
</para> |
| 1019 |
<screen> |
<screen> |
| 1020 |
$ . ~/.bashrc |
$ . ~/.bashrc |
| 1025 |
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. |
| 1026 |
<footnote><para> If the upstream source provides the |
<footnote><para> If the upstream source provides the |
| 1027 |
<filename>debian</filename> directory and its contents, run the |
<filename>debian</filename> directory and its contents, run the |
| 1028 |
<command>dh_make</command> command with the <literal>--addmissing</literal> |
<command>dh_make</command> command with the extra option |
| 1029 |
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 |
| 1030 |
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 |
| 1031 |
provided by the upstream for your Debian package. </para> </footnote> See |
provided by the upstream for your Debian package. </para> </footnote> See |
| 1032 |
<citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>1</manvolnum> |
<citerefentry> <refentrytitle>dh_make</refentrytitle> <manvolnum>1</manvolnum> |
| 1033 |
</citerefentry> for details. |
</citerefentry> for details. |
| 1034 |
</para> |
</para> |
| 1035 |
<para> |
<para> |
| 1036 |
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 |
| 1037 |
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 |
| 1038 |
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 |
| 1039 |
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 |
| 1040 |
confirm by pressing <literal><replaceable>ENTER</replaceable></literal>. |
confirm by pressing <literal><replaceable>ENTER</replaceable></literal>. |
| 1041 |
<footnote><para> There are few choices here: <literal>s</literal> for Single |
<footnote><para> There are several choices here: <literal>s</literal> for Single |
| 1042 |
binary, <literal>i</literal> for Arch-Independent, <literal>m</literal> for |
binary, <literal>i</literal> for arch-Independent, <literal>m</literal> for |
| 1043 |
Multiple binary, <literal>l</literal> for Library, <literal>k</literal> for |
Multiple binary, <literal>l</literal> for Library, <literal>k</literal> for |
| 1044 |
Kernel module, <literal>n</literal> for Kernel patch and <literal>b</literal> |
Kernel module, <literal>n</literal> for kernel patch, and <literal>b</literal> |
| 1045 |
for <systemitem role="package">cdbs</systemitem>. This document focuses on the |
for <systemitem role="package">cdbs</systemitem>. This document focuses on the |
| 1046 |
use of the <systemitem role="package">debhelper</systemitem> package with the |
use of the <command>dh</command> command (from the package |
| 1047 |
<command>dh</command> command. This document focuses on the use of the new |
<systemitem role="package">debhelper</systemitem>) to create a single-binary package, |
| 1048 |
<command>dh</command> command for Single binary and touches on it for |
but also touches on how to use it for arch-independent or |
| 1049 |
Arch-Independent and Multiple binary. The <systemitem role="package">cdbs</systemitem> package offers alternative package script |
multiple-binary packages. The package |
| 1050 |
infrastructure to the <command>dh</command> command and outside of the scope of |
<systemitem role="package">cdbs</systemitem> offers an alternative packaging script |
| 1051 |
|
infrastructure to the <command>dh</command> command and is outside the scope of |
| 1052 |
this document. </para> </footnote> |
this document. </para> </footnote> |
| 1053 |
</para> |
</para> |
| 1054 |
<para> |
<para> |
| 1055 |
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 |
| 1056 |
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 |
| 1057 |
parent directory to accommodate the creation of the non-native Debian source |
parent directory to accommodate the creation of the non-native Debian source |
| 1058 |
package with the <filename>debian.tar.gz</filename> later. |
package with the name <filename>debian.tar.gz</filename> later. |
| 1059 |
</para> |
</para> |
| 1060 |
<screen> |
<screen> |
| 1061 |
$ cd ~/gentoo ; ls -F |
$ cd ~/gentoo ; ls -F |
| 1064 |
gentoo_0.9.12.orig.tar.gz |
gentoo_0.9.12.orig.tar.gz |
| 1065 |
</screen> |
</screen> |
| 1066 |
<para> |
<para> |
| 1067 |
Please note 2 key features in this |
Please note two key features of this filename |
| 1068 |
<filename>gentoo_0.9.12.orig.tar.gz</filename> file name: |
<filename>gentoo_0.9.12.orig.tar.gz</filename>: |
| 1069 |
</para> |
</para> |
| 1070 |
<itemizedlist> |
<itemizedlist> |
| 1071 |
<listitem> |
<listitem> |
| 1072 |
<para> |
<para> |
| 1073 |
Package name and version are separated by the <literal>_</literal> |
Package name and version are separated by the character <literal>_</literal> |
| 1074 |
(underscore). |
(underscore). |
| 1075 |
</para> |
</para> |
| 1076 |
</listitem> |
</listitem> |
| 1077 |
<listitem> |
<listitem> |
| 1078 |
<para> |
<para> |
| 1079 |
There is the <filename>.orig</filename> before the |
The string <filename>.orig</filename> is inserted before the |
| 1080 |
<filename>.tar.gz</filename>. |
<filename>.tar.gz</filename>. |
| 1081 |
</para> |
</para> |
| 1082 |
</listitem> |
</listitem> |
| 1083 |
</itemizedlist> |
</itemizedlist> |
| 1084 |
<para> |
<para> |
| 1085 |
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 |
| 1086 |
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 |
| 1087 |
that the packaging is not automatic process. You need to modify the upstream |
<xref linkend="dreq"/> and <xref linkend="dother"/>. You should also understand |
| 1088 |
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 |
| 1089 |
build Debian packages under the proper method as <xref linkend="build"/> , |
source for Debian (see <xref linkend="modify"/>). After this, you need to |
| 1090 |
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"/>), |
| 1091 |
|
testing them (<xref linkend="checkit"/>), and uploading them (<xref linkend="upload"/>). |
| 1092 |
|
All the steps will be explained. |
| 1093 |
</para> |
</para> |
| 1094 |
<para> |
<para> |
| 1095 |
Once again, as a new maintainer you are discouraged from creating complicated |
Once again, as a new maintainer you are discouraged from creating complicated |
| 1096 |
packages, e.g., |
packages, e.g.: |
| 1097 |
</para> |
</para> |
| 1098 |
<itemizedlist> |
<itemizedlist> |
| 1099 |
<listitem> |
<listitem> |
| 1100 |
<para> |
<para> |
| 1101 |
multiple binary packages, |
multiple binary packages; |
| 1102 |
</para> |
</para> |
| 1103 |
</listitem> |
</listitem> |
| 1104 |
<listitem> |
<listitem> |
| 1105 |
<para> |
<para> |
| 1106 |
library packages, |
library packages; |
| 1107 |
</para> |
</para> |
| 1108 |
</listitem> |
</listitem> |
| 1109 |
<listitem> |
<listitem> |
| 1110 |
<para> |
<para> |
| 1111 |
kernel module packages, |
kernel module packages; |
| 1112 |
</para> |
</para> |
| 1113 |
</listitem> |
</listitem> |
| 1114 |
<listitem> |
<listitem> |
| 1115 |
<para> |
<para> |
| 1116 |
kernel patch packages, |
kernel patch packages; |
| 1117 |
</para> |
</para> |
| 1118 |
</listitem> |
</listitem> |
| 1119 |
<listitem> |
<listitem> |
| 1120 |
<para> |
<para> |
| 1121 |
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 |
| 1122 |
<filename>tar.bz2</filename>, or |
<filename>tar.bz2</filename>; or |
| 1123 |
</para> |
</para> |
| 1124 |
</listitem> |
</listitem> |
| 1125 |
<listitem> |
<listitem> |
| 1126 |
<para> |
<para> |
| 1127 |
the source tarball containing undistributable contents. |
packages where the source tarball contains undistributable contents. |
| 1128 |
</para> |
</para> |
| 1129 |
</listitem> |
</listitem> |
| 1130 |
</itemizedlist> |
</itemizedlist> |
| 1131 |
<para> |
<para> |
| 1132 |
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 |
| 1133 |
describe all of it here. |
describe all of it here. |
| 1134 |
</para> |
</para> |
| 1135 |
<para> |
<para> |
| 1139 |
</para> |
</para> |
| 1140 |
<para> |
<para> |
| 1141 |
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 |
| 1142 |
techniques. Please stick with fresh packaging cases for now to learn basics. |
techniques. While learning the basics, please stick to creating a fresh |
| 1143 |
I will come back to explain it later in <xref linkend="update"/> . |
package; further explanations are given in <xref linkend="update"/>. |
| 1144 |
</para> |
</para> |
| 1145 |
</section> |
</section> |
| 1146 |
</chapter> |
</chapter> |
| 1158 |
Debian packaging by adding the following line to <filename>~/.bashrc</filename>. |
Debian packaging by adding the following line to <filename>~/.bashrc</filename>. |
| 1159 |
</para> |
</para> |
| 1160 |
<screen> |
<screen> |
| 1161 |
alias dquilt=quilt --quiltrc=~/.quiltrc-dpkg |
alias dquilt="quilt --quiltrc=~/.quiltrc-dpkg" |
| 1162 |
</screen> |
</screen> |
| 1163 |
<para> |
<para> |
| 1164 |
Then let's create <filename>~/.quiltrc-dpkg</filename> as follows. |
Then let's create <filename>~/.quiltrc-dpkg</filename> as follows. |
| 1509 |
most important of them are <filename>control</filename>, |
most important of them are <filename>control</filename>, |
| 1510 |
<filename>changelog</filename>, <filename>copyright</filename> and |
<filename>changelog</filename>, <filename>copyright</filename> and |
| 1511 |
<filename>rules</filename>, which are required for all packages. |
<filename>rules</filename>, which are required for all packages. |
| 1512 |
|
<footnote><para> |
| 1513 |
|
In this chapter, files in the <filename>debian</filename> directory are |
| 1514 |
|
referred without preceding <filename>debian/</filename> for simplicity whenever |
| 1515 |
|
they are obvious. |
| 1516 |
|
</para></footnote> |
| 1517 |
</para> |
</para> |
| 1518 |
<section id="control"><title><filename>control</filename> file</title> |
<section id="control"><title><filename>control</filename> file</title> |
| 1519 |
<para> |
<para> |
| 1569 |
and many more. |
and many more. |
| 1570 |
<footnote> <para>See |
<footnote> <para>See |
| 1571 |
<ulink url="&policy-subsections;">Debian Policy Manual, 2.4 'Sections'</ulink> and |
<ulink url="&policy-subsections;">Debian Policy Manual, 2.4 'Sections'</ulink> and |
| 1572 |
<ulink url="§ions-unstable;">List of sections in 'sid'</ulink>.</para> |
<ulink url="§ions-unstable;">List of sections in <literal>sid</literal></ulink>.</para> |
| 1573 |
</footnote> |
</footnote> |
| 1574 |
</para> |
</para> |
| 1575 |
<para> |
<para> |
| 1643 |
For source packages which have some binary packages with <literal>Architecture: |
For source packages which have some binary packages with <literal>Architecture: |
| 1644 |
any</literal>, they are rebuild by the autobuilder. Since this autobuilder |
any</literal>, they are rebuild by the autobuilder. Since this autobuilder |
| 1645 |
procedure runs <literal>debian/rules build</literal> in it while installing |
procedure runs <literal>debian/rules build</literal> in it while installing |
| 1646 |
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 |
| 1647 |
list practically all the required packages and the |
list practically all the required packages and the |
| 1648 |
<literal>Build-Depends-indep</literal> is rarely used. |
<literal>Build-Depends-indep</literal> is rarely used. |
| 1649 |
</para> |
</para> |
| 1879 |
</para> |
</para> |
| 1880 |
<para> |
<para> |
| 1881 |
<citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</manvolnum> |
<citerefentry> <refentrytitle>dh_perl</refentrytitle> <manvolnum>1</manvolnum> |
| 1882 |
</citerefentry> calculates perl dependencies. It generates a list of a |
</citerefentry> calculates Perl dependencies. It generates a list of a |
| 1883 |
dependency on perl or perlapi for each binary package. Such list is used for |
dependency on <literal>perl</literal> or <literal>perlapi</literal> for each binary package. Such list is used for |
| 1884 |
substituting <literal>${perl:Depends}</literal>. |
substituting <literal>${perl:Depends}</literal>. |
| 1885 |
</para> |
</para> |
| 1886 |
<para> |
<para> |
| 1973 |
and license information. |
and license information. |
| 1974 |
<ulink url="&policy-copyright;">Debian Policy Manual, 12.5 'Copyright information'</ulink> |
<ulink url="&policy-copyright;">Debian Policy Manual, 12.5 'Copyright information'</ulink> |
| 1975 |
dictates its content and |
dictates its content and |
| 1976 |
<ulink url="&dep5;">DEP-5: Machine-parseable debian/copyright</ulink> |
<ulink url="&dep5;">DEP-5: Machine-parseable <filename>debian/copyright</filename></ulink> |
| 1977 |
provides guidelines for its format. |
provides guidelines for its format. |
| 1978 |
</para> |
</para> |
| 1979 |
<para> |
<para> |
| 2105 |
</para> |
</para> |
| 2106 |
<para> |
<para> |
| 2107 |
You can read more about updating the <filename>changelog</filename> file later |
You can read more about updating the <filename>changelog</filename> file later |
| 2108 |
in <xref linkend="update"/> . |
in <xref linkend="update"/>. |
| 2109 |
</para> |
</para> |
| 2110 |
</section> |
</section> |
| 2111 |
<section id="rules"><title><filename>rules</filename> file</title> |
<section id="rules"><title><filename>rules</filename> file</title> |
| 2154 |
<literal>binary</literal> target: to create all binary packages (effectively |
<literal>binary</literal> target: to create all binary packages (effectively |
| 2155 |
combination of <literal>binary-arch</literal> and |
combination of <literal>binary-arch</literal> and |
| 2156 |
<literal>binary-indep</literal> targets). (required)<footnote><para> This |
<literal>binary-indep</literal> targets). (required)<footnote><para> This |
| 2157 |
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> |
| 2158 |
</para> |
</para> |
| 2159 |
</listitem> |
</listitem> |
| 2160 |
<listitem> |
<listitem> |
| 2162 |
<literal>binary-arch</literal> target: to create arch-dependent |
<literal>binary-arch</literal> target: to create arch-dependent |
| 2163 |
(<literal>Architecture: any</literal>) binary packages in the parent directory. |
(<literal>Architecture: any</literal>) binary packages in the parent directory. |
| 2164 |
(required)<footnote><para> This target is used by <literal>dpkg-buildpackage |
(required)<footnote><para> This target is used by <literal>dpkg-buildpackage |
| 2165 |
-B</literal> as in <xref linkend="autobuilder"/> . </para> </footnote> |
-B</literal> as in <xref linkend="autobuilder"/>. </para> </footnote> |
| 2166 |
</para> |
</para> |
| 2167 |
</listitem> |
</listitem> |
| 2168 |
<listitem> |
<listitem> |
| 2227 |
<filename>/usr/bin/make</filename>. |
<filename>/usr/bin/make</filename>. |
| 2228 |
</para> |
</para> |
| 2229 |
<para> |
<para> |
| 2230 |
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. |
| 2231 |
Then, the <command>dh</command> command will output which |
Then, the <command>dh</command> command will output which |
| 2232 |
<command>dh_*</command> commands are executed by the <command>dh</command> |
<command>dh_*</command> commands are executed by the <command>dh</command> |
| 2233 |
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. |
| 2249 |
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 |
| 2250 |
when it was initially packaged. This new <command>dh</command> command is |
when it was initially packaged. This new <command>dh</command> command is |
| 2251 |
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 |
| 2252 |
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 |
| 2253 |
package building process like the <systemitem role="package">cdbs</systemitem> |
package building process like the <systemitem role="package">cdbs</systemitem> |
| 2254 |
package. </para> </footnote> The <command>dh</command> command is a wrapper |
package. </para> </footnote> The <command>dh</command> command is a wrapper |
| 2255 |
script which runs appropriate sequences of <command>dh_*</command> programs |
script which runs appropriate sequences of <command>dh_*</command> programs |
| 2663 |
</listitem> |
</listitem> |
| 2664 |
</itemizedlist> |
</itemizedlist> |
| 2665 |
<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> |
|
| 2666 |
Many <command>dh_*</command> commands invoked by the new <command>dh</command> |
Many <command>dh_*</command> commands invoked by the new <command>dh</command> |
| 2667 |
command can be customized by the corresponding configuration files in the |
command can be customized by the corresponding configuration files in the |
| 2668 |
<filename>debian</filename> directory. See <xref linkend="dother"/> and the |
<filename>debian</filename> directory. See <xref linkend="dother"/> and the |
| 2787 |
prefixed by the binary package name such as |
prefixed by the binary package name such as |
| 2788 |
<literal><replaceable>package</replaceable></literal>. Take a look at all of |
<literal><replaceable>package</replaceable></literal>. Take a look at all of |
| 2789 |
them. |
them. |
| 2790 |
|
<footnote><para> |
| 2791 |
|
In this chapter, files in the <filename>debian</filename> directory are |
| 2792 |
|
referred without preceding <filename>debian/</filename> for simplicity whenever |
| 2793 |
|
they are obvious. |
| 2794 |
|
</para></footnote> |
| 2795 |
</para> |
</para> |
| 2796 |
<para> |
<para> |
| 2797 |
The <command>dh_make</command> command may not create some template |
The <command>dh_make</command> command may not create some template |
| 2826 |
</listitem> |
</listitem> |
| 2827 |
<listitem> |
<listitem> |
| 2828 |
<para> |
<para> |
| 2829 |
modify the <filename>control</filename> file (see <xref linkend="control"/> ), |
modify the <filename>control</filename> file (see <xref linkend="control"/>), |
| 2830 |
if necessary. |
if necessary. |
| 2831 |
</para> |
</para> |
| 2832 |
</listitem> |
</listitem> |
| 2833 |
<listitem> |
<listitem> |
| 2834 |
<para> |
<para> |
| 2835 |
modify the <filename>rules</filename> file (see <xref linkend="rules"/> ), if |
modify the <filename>rules</filename> file (see <xref linkend="rules"/>), if |
| 2836 |
necessary. |
necessary. |
| 2837 |
</para> |
</para> |
| 2838 |
</listitem> |
</listitem> |
| 2923 |
</listitem> |
</listitem> |
| 2924 |
</itemizedlist> |
</itemizedlist> |
| 2925 |
<para> |
<para> |
| 2926 |
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"/>. |
| 2927 |
</para> |
</para> |
| 2928 |
</section> |
</section> |
| 2929 |
<section id="crond"><title><filename><replaceable>package</replaceable>.cron.*</filename> files</title> |
<section id="crond"><title><filename><replaceable>package</replaceable>.cron.*</filename> files</title> |
| 2992 |
</para> |
</para> |
| 2993 |
<para> |
<para> |
| 2994 |
Files listed in the <filename>install</filename> file doesn't need the |
Files listed in the <filename>install</filename> file doesn't need the |
| 2995 |
directories created first. See <xref linkend="install"/> . |
directories created first. See <xref linkend="install"/>. |
| 2996 |
</para> |
</para> |
| 2997 |
<para> |
<para> |
| 2998 |
It is best to 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 |
| 3035 |
manual, in <ulink url="&doc-base;">Debian doc-base Manual</ulink>. |
manual, in <ulink url="&doc-base;">Debian doc-base Manual</ulink>. |
| 3036 |
</para> |
</para> |
| 3037 |
<para> |
<para> |
| 3038 |
For more details on installing additional documentation, look in <xref linkend="destdir"/> . |
For more details on installing additional documentation, look in <xref linkend="destdir"/>. |
| 3039 |
</para> |
</para> |
| 3040 |
</section> |
</section> |
| 3041 |
<section id="docs"><title><filename>docs</filename> file</title> |
<section id="docs"><title><filename>docs</filename> file</title> |
| 3093 |
<para> |
<para> |
| 3094 |
The <filename><replaceable>package</replaceable>.init</filename> file is |
The <filename><replaceable>package</replaceable>.init</filename> file is |
| 3095 |
installed as the |
installed as the |
| 3096 |
<filename>/etc/init.d/<replaceable>package</replaceable></filename> script. |
<filename>/etc/init.d/<replaceable>package</replaceable></filename> script |
| 3097 |
|
for the <emphasis>init script</emphasis> which starts and stops a daemon. |
| 3098 |
Its fairly generic skeleton template is provided by the |
Its fairly generic skeleton template is provided by the |
| 3099 |
<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 |
| 3100 |
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 |
| 3107 |
The <filename><replaceable>package</replaceable>.default</filename> file will |
The <filename><replaceable>package</replaceable>.default</filename> file will |
| 3108 |
be installed into |
be installed into |
| 3109 |
<filename>/etc/default/<replaceable>package</replaceable></filename>. This |
<filename>/etc/default/<replaceable>package</replaceable></filename>. This |
| 3110 |
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 |
| 3111 |
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 |
| 3112 |
timeouts. If your init script has certain <emphasis>settable</emphasis> |
timeouts. If your <emphasis>init script</emphasis> has certain <emphasis>settable</emphasis> |
| 3113 |
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>. |
| 3114 |
</para> |
</para> |
| 3115 |
<para> |
<para> |
| 3116 |
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 |
| 3117 |
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 |
| 3118 |
<filename>debian/<replaceable>package</replaceable>.init</filename>. However |
<filename><replaceable>package</replaceable>.init</filename>. However |
| 3119 |
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 |
| 3120 |
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 |
| 3121 |
need to override <command>dh_installinit</command> in the |
need to override <command>dh_installinit</command> in the |
| 3122 |
<filename>rules</filename> file with the following lines: |
<filename>rules</filename> file with the following lines: |
| 3235 |
<row> <entry>1</entry> <entry>User command</entry> <entry>Executable commands or scripts</entry> </row> |
<row> <entry>1</entry> <entry>User command</entry> <entry>Executable commands or scripts</entry> </row> |
| 3236 |
<row> <entry>2</entry> <entry>System calls</entry> <entry>Functions provided by the kernel</entry> </row> |
<row> <entry>2</entry> <entry>System calls</entry> <entry>Functions provided by the kernel</entry> </row> |
| 3237 |
<row> <entry>3</entry> <entry>Library calls</entry> <entry>Functions within system libraries</entry> </row> |
<row> <entry>3</entry> <entry>Library calls</entry> <entry>Functions within system libraries</entry> </row> |
| 3238 |
<row> <entry>4</entry> <entry>Special files</entry> <entry>Usually found in /dev</entry> </row> |
<row> <entry>4</entry> <entry>Special files</entry> <entry>Usually found in <filename>/dev</filename></entry> </row> |
| 3239 |
<row> <entry>5</entry> <entry>File formats</entry> <entry>E.g. <filename>/etc/passwd</filename>'s format</entry> </row> |
<row> <entry>5</entry> <entry>File formats</entry> <entry>E.g. <filename>/etc/passwd</filename>'s format</entry> </row> |
| 3240 |
<row> <entry>6</entry> <entry>Games</entry> <entry>Games or other frivolous programs</entry> </row> |
<row> <entry>6</entry> <entry>Games</entry> <entry>Games or other frivolous programs</entry> </row> |
| 3241 |
<row> <entry>7</entry> <entry>Macro packages</entry> <entry>Such as man macros</entry> </row> |
<row> <entry>7</entry> <entry>Macro packages</entry> <entry>Such as <command>man</command> macros</entry> </row> |
| 3242 |
<row> <entry>8</entry> <entry>System administration</entry> <entry>Programs typically only run by root</entry> </row> |
<row> <entry>8</entry> <entry>System administration</entry> <entry>Programs typically only run by root</entry> </row> |
| 3243 |
<row> <entry>9</entry> <entry>Kernel routines</entry> <entry>Non-standard calls and internals</entry> </row> |
<row> <entry>9</entry> <entry>Kernel routines</entry> <entry>Non-standard calls and internals</entry> </row> |
| 3244 |
</tbody> |
</tbody> |
| 3603 |
You can store such <command>dpkg-source</command> option argument in the |
You can store such <command>dpkg-source</command> option argument in the |
| 3604 |
<filename>source/options</filename> file of the source package as the generic |
<filename>source/options</filename> file of the source package as the generic |
| 3605 |
solution to address this problem of the autogenerated files. The following |
solution to address this problem of the autogenerated files. The following |
| 3606 |
will skip creating patch files for <filename>config.sub</filename> |
will skip creating patch files for <filename>config.sub</filename>, |
| 3607 |
<filename>config.guess</filename> and <filename>Makefile</filename>. |
<filename>config.guess</filename> and <filename>Makefile</filename>. |
| 3608 |
</para> |
</para> |
| 3609 |
<screen> |
<screen> |
| 3648 |
by your sponsor. </para> </footnote> |
by your sponsor. </para> </footnote> |
| 3649 |
</para> |
</para> |
| 3650 |
<para> |
<para> |
| 3651 |
For <xref linkend="modify"/> , we created 3 patches in |
For <xref linkend="modify"/>, we created 3 patches in |
| 3652 |
<filename>debian/patches</filename>. |
<filename>debian/patches</filename>. |
| 3653 |
</para> |
</para> |
| 3654 |
<para> |
<para> |
| 3655 |
Since Debian patches are located in <filename>debian/patches</filename>, please |
Since Debian patches are located in <filename>debian/patches</filename>, please |
| 3656 |
make sure to setup the <command>dquilt</command> command properly as described |
make sure to setup the <command>dquilt</command> command properly as described |
| 3657 |
in <xref linkend="quiltrc"/> . |
in <xref linkend="quiltrc"/>. |
| 3658 |
</para> |
</para> |
| 3659 |
<para> |
<para> |
| 3660 |
When someone (including yourself) provides you with a patch |
When someone (including yourself) provides you with a patch |
| 3695 |
</listitem> |
</listitem> |
| 3696 |
<listitem> |
<listitem> |
| 3697 |
<para> |
<para> |
| 3698 |
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 |
| 3699 |
</para> |
</para> |
| 3700 |
</listitem> |
</listitem> |
| 3701 |
<listitem> |
<listitem> |
| 3702 |
<para> |
<para> |
| 3703 |
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"/>). |
| 3704 |
</para> |
</para> |
| 3705 |
</listitem> |
</listitem> |
| 3706 |
</itemizedlist> |
</itemizedlist> |
| 3751 |
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, |
| 3752 |
twice. |
twice. |
| 3753 |
<footnote><para> |
<footnote><para> |
| 3754 |
This GPG key must be signed by the Debian developer to get connected to the web |
This GPG key must be signed by a Debian developer to get connected to the web |
| 3755 |
of trust and must be registerd to <ulink url="&keyring;">the Debian |
of trust and must be registered to <ulink url="&keyring;">the Debian |
| 3756 |
keyring</ulink>. This enables your uploaded packages to be accepted to the |
keyring</ulink>. This enables your uploaded packages to be accepted to the |
| 3757 |
Debian archives. See |
Debian archives. See |
| 3758 |
<ulink url="&keycreate;">Creating a new GPG key</ulink> and |
<ulink url="&keycreate;">Creating a new GPG key</ulink> and |
| 3871 |
</listitem> |
</listitem> |
| 3872 |
<listitem> |
<listitem> |
| 3873 |
<para> |
<para> |
| 3874 |
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"/>). |
| 3875 |
</para> |
</para> |
| 3876 |
</listitem> |
</listitem> |
| 3877 |
</itemizedlist> |
</itemizedlist> |
| 3919 |
</para> |
</para> |
| 3920 |
<para> |
<para> |
| 3921 |
Although packages listed in the <literal>Build-Depends-indep</literal> field |
Although packages listed in the <literal>Build-Depends-indep</literal> field |
| 3922 |
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 |
| 3923 |
autobuilder system since it build only architecture dependent binary packages. |
autobuilder system since it build only architecture dependent binary packages. |
| 3924 |
<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> |
| 3925 |
environment under the <systemitem role="package">sbuild</systemitem> package |
environment under the <systemitem role="package">sbuild</systemitem> package |
| 3928 |
packaging and autobuilder situation dictates whether you record such required |
packaging and autobuilder situation dictates whether you record such required |
| 3929 |
packages in the <literal>Build-Depends</literal> or |
packages in the <literal>Build-Depends</literal> or |
| 3930 |
<literal>Build-Depends-indep</literal> fields of the |
<literal>Build-Depends-indep</literal> fields of the |
| 3931 |
<filename>debian/control</filename> file (see <xref linkend="control"/> ). |
<filename>debian/control</filename> file (see <xref linkend="control"/>). |
| 3932 |
</para> |
</para> |
| 3933 |
</section> |
</section> |
| 3934 |
<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> |
| 4243 |
<filename>preinst</filename>, <filename>prerm</filename>, |
<filename>preinst</filename>, <filename>prerm</filename>, |
| 4244 |
<filename>postinst</filename>, and <filename>postrm</filename> files, are |
<filename>postinst</filename>, and <filename>postrm</filename> files, are |
| 4245 |
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 |
| 4246 |
a novice maintainer (see <xref linkend="maintscripts"/> ). |
a novice maintainer (see <xref linkend="maintscripts"/>). |
| 4247 |
</para> |
</para> |
| 4248 |
<para> |
<para> |
| 4249 |
If the package makes use of these non-trivial <emphasis>maintainer |
If the package makes use of these non-trivial <emphasis>maintainer |
| 4324 |
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 |
| 4325 |
the <command>lintian</command> option <literal>-i -I --show-overrides</literal> |
the <command>lintian</command> option <literal>-i -I --show-overrides</literal> |
| 4326 |
if you customized <filename>/etc/devscripts.conf</filename> or |
if you customized <filename>/etc/devscripts.conf</filename> or |
| 4327 |
<filename>~/.devscripts</filename> as described in <xref linkend="debuild"/> . |
<filename>~/.devscripts</filename> as described in <xref linkend="debuild"/>. |
| 4328 |
</para> </footnote> |
</para> </footnote> |
| 4329 |
</para> |
</para> |
| 4330 |
<screen> |
<screen> |
| 4368 |
<para> |
<para> |
| 4369 |
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 |
| 4370 |
spurious. If spurious, set the <filename>lintian-overrides</filename> files as |
spurious. If spurious, set the <filename>lintian-overrides</filename> files as |
| 4371 |
described in <xref linkend="lintian"/> . |
described in <xref linkend="lintian"/>. |
| 4372 |
</para> |
</para> |
| 4373 |
<para> |
<para> |
| 4374 |
Note that you can build the package with <command>dpkg-buildpackage</command> |
Note that you can build the package with <command>dpkg-buildpackage</command> |
| 4453 |
<para> |
<para> |
| 4454 |
Once you become an official developer, |
Once you become an official developer, |
| 4455 |
<footnote><para> |
<footnote><para> |
| 4456 |
See <xref linkend="debiandeveloper"/>. |
See <xref linkend="socialdynamism"/>. |
| 4457 |
</para></footnote> |
</para></footnote> |
| 4458 |
you can upload the package to the Debian archive. |
you can upload the package to the Debian archive. |
| 4459 |
<footnote><para> |
<footnote><para> |
| 4460 |
There are publically accessible archives such as <ulink url="&mentors-dn;"/> |
There are publicly accessible archives such as <ulink url="&mentors-dn;"/> |
| 4461 |
which work almost the same way as Debian archive and provide upload area for |
which work almost the same way as Debian archive and provide upload area for |
| 4462 |
the non-DD. You can set up an equivqlent archive by yourself using tools |
the non-DD. You can set up an equivalent archive by yourself using tools |
| 4463 |
listed at <ulink url="&deb-archive;"/>. So this section is useful for the |
listed at <ulink url="&deb-archive;"/>. So this section is useful for the |
| 4464 |
non-DD, too. |
non-DD, too. |
| 4465 |
</para></footnote> |
</para></footnote> |
| 4652 |
</listitem> |
</listitem> |
| 4653 |
<listitem> |
<listitem> |
| 4654 |
<para> |
<para> |
| 4655 |
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 |
| 4656 |
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 |
| 4657 |
changed and it already exists in the Debian archive. |
changed and it already exists in the Debian archive. |
| 4658 |
</para> |
</para> |
| 4814 |
... document changes made |
... document changes made |
| 4815 |
</screen> |
</screen> |
| 4816 |
<para> |
<para> |
| 4817 |
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 |
| 4818 |
simply run <citerefentry> <refentrytitle>uscan</refentrytitle> |
simply run <citerefentry> <refentrytitle>uscan</refentrytitle> |
| 4819 |
<manvolnum>1</manvolnum> </citerefentry> in the |
<manvolnum>1</manvolnum> </citerefentry> in the |
| 4820 |
<filename><replaceable>foo</replaceable>-<replaceable>oldversion</replaceable></filename> |
<filename><replaceable>foo</replaceable>-<replaceable>oldversion</replaceable></filename> |
| 4827 |
uupdate</literal> at the end of the URL. </para> </footnote> |
uupdate</literal> at the end of the URL. </para> </footnote> |
| 4828 |
</para> |
</para> |
| 4829 |
<para> |
<para> |
| 4830 |
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"/>. |
| 4831 |
</para> |
</para> |
| 4832 |
</section> |
</section> |
| 4833 |
<section id="packagestyle"><title>Updating the packaging style</title> |
<section id="packagestyle"><title>Updating the packaging style</title> |
| 4912 |
</listitem> |
</listitem> |
| 4913 |
</itemizedlist> |
</itemizedlist> |
| 4914 |
<para> |
<para> |
| 4915 |
You need to do other tasks described in <xref linkend="newupstream"/> , too. |
You need to do other tasks described in <xref linkend="newupstream"/>, too. |
| 4916 |
</para> |
</para> |
| 4917 |
</section> |
</section> |
| 4918 |
<section id="reminders"><title>Reminders for updating packages</title> |
<section id="reminders"><title>Reminders for updating packages</title> |