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

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

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

revision 8757 by taffit-guest, Sat Apr 30 05:09:16 2011 UTC revision 8771 by osamu, Sun May 1 04:25:03 2011 UTC
# Line 121  important topics.  Some of them may look Line 121  important topics.  Some of them may look
121  I have also intentionally skipped some corner cases and provided only pointers  I have also intentionally skipped some corner cases and provided only pointers
122  to keep this document simple.  to keep this document simple.
123  </para>  </para>
124  <section id="socialdynamism"><title>Social dynamics of Debian</title>  <section id="socialdynamics"><title>Social dynamics of Debian</title>
125  <para>  <para>
126  Here are some observations of Debian's social dynamics, presented in the hope  Here are some observations of Debian's social dynamics, presented in the hope
127  that it will prepare you for interactions with Debian.  that it will prepare you for interactions with Debian.
# Line 226  please refer to the following to learn h Line 226  please refer to the following to learn h
226  <listitem><para><ulink url="&debianmentorfaq;">Debian Mentors FAQ</ulink> (supplemental) </para> </listitem>  <listitem><para><ulink url="&debianmentorfaq;">Debian Mentors FAQ</ulink> (supplemental) </para> </listitem>
227  </itemizedlist>  </itemizedlist>
228  </section>  </section>
229  <section id="needprogs"><title>Programs you need for development</title>  <section id="needprogs"><title>Programs needed for development</title>
230  <para>  <para>
231  Before you start anything, you should make sure that you have properly  Before you start anything, you should make sure that you have properly
232  installed some additional packages needed for development.  Note that the list  installed some additional packages needed for development.  Note that the list
# Line 585  documentation</emphasis> for details). Line 585  documentation</emphasis> for details).
585  Let's start by creating a package of your own (or, even better,  Let's start by creating a package of your own (or, even better,
586  adopting an existing one).  adopting an existing one).
587  </para>  </para>
588  <section id="workflow"><title>Workflow of the Debian package building</title>  <section id="workflow"><title>Debian package building workflow</title>
589  <para>  <para>
590  If you are making a Debian package with an upstream program,  If you are making a Debian package with an upstream program, the
591  typical workflow of the Debian package building involves generating several  typical workflow of Debian package building involves generating several
592  specifically named files for each step as the following.  specifically named files for each step as follows.
593  </para>  </para>
594  <itemizedlist>  <itemizedlist>
595  <listitem>  <listitem>
596  <para>We obtain an upstream program file usually in a compressed tar format.</para>  <para>Get a copy of the upstream software, usually in a compressed tar format.</para>
597    <itemizedlist>    <itemizedlist>
598    <listitem><literal><replaceable>package</replaceable>-<replaceable>version</replaceable>.tar.gz</literal></listitem>    <listitem><literal><replaceable>package</replaceable>-<replaceable>version</replaceable>.tar.gz</literal></listitem>
599    </itemizedlist>    </itemizedlist>
600  </listitem>  </listitem>
601  <listitem>  <listitem>
602  <para>  <para>
603  We create a non-native Debian source package in the <literal>3.0 (quilt)</literal> format, which refers to the set of input files for  Add Debian-specific packaging modifications to the upstream program under the
604  the Debian package building, by adding Debian package modifications to the upstream program under the <filename>debian</filename> directory.  <filename>debian</filename> directory, and create a non-native source package
605    (that is, the set of input files used for Debian package building) in
606    <literal>3.0 (quilt)</literal> format .
607  </para>  </para>
608    <itemizedlist>    <itemizedlist>
609    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>.orig.tar.gz</literal></listitem>    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>.orig.tar.gz</literal></listitem>
610    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.debian.tar.gz</literal>    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.debian.tar.gz</literal>
611      <footnote><para>For the older non-native Debian source package in the <literal>1.0</literal> format,      <footnote><para>For the older style of non-native Debian source packages in <literal>1.0</literal> format,
612      <literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.diff.gz</literal>      <literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.diff.gz</literal>
613      is used instead. </para></footnote></listitem>      is used instead. </para></footnote></listitem>
614    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.dsc</literal></listitem>    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>.dsc</literal></listitem>
# Line 614  the Debian package building, by adding D Line 616  the Debian package building, by adding D
616  </listitem>  </listitem>
617  <listitem>  <listitem>
618  <para>  <para>
619  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.  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.
620  </para>  </para>
621    <itemizedlist>    <itemizedlist>
622    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>_<replaceable>arch</replaceable>.deb</literal></listitem>    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>-<replaceable>revision</replaceable>_<replaceable>arch</replaceable>.deb</literal></listitem>
# Line 625  We build Debian binary packages, which a Line 627  We build Debian binary packages, which a
627  Please note that the character separating  Please note that the character separating
628  <literal><replaceable>package</replaceable></literal> and  <literal><replaceable>package</replaceable></literal> and
629  <literal><replaceable>version</replaceable></literal> was changed from  <literal><replaceable>version</replaceable></literal> was changed from
630  <literal>-</literal> (hyphen) to <literal>_</literal> (underscore).  <literal>-</literal> (hyphen) in the tarball name to
631    <literal>_</literal> (underscore) in the Debian package filenames.
632  </para>  </para>
633  <para>  <para>
634  Here,  In the file names above, replace
635  <literal><replaceable>package</replaceable></literal> part of the file name is substituted by the  the <literal><replaceable>package</replaceable></literal> part with the <emphasis role="strong">package name</emphasis>,
636  <emphasis role="strong">package name</emphasis>,  the <literal><replaceable>version</replaceable></literal> part with the <emphasis role="strong">upstream version</emphasis>,
637  <literal><replaceable>version</replaceable></literal> part of it is substituted by the  the <literal><replaceable>revision</replaceable></literal> part with the <emphasis role="strong">Debian revision</emphasis>,
638  <emphasis role="strong">upstream version</emphasis>,  and the <literal><replaceable>arch</replaceable></literal> part with the <emphasis role="strong">package architecture</emphasis>,
639  <literal><replaceable>revision</replaceable></literal> part of it is substituted by the  as defined in the Debian Policy Manual.
640  <emphasis role="strong">Debian revision</emphasis>,  <footnote> <para> See
 <literal><replaceable>arch</replaceable></literal> part of it is substituted by the  
 <emphasis role="strong">package architecture</emphasis>.  
 <footnote><para>  
 The <emphasis role="strong">package name</emphasis>, <emphasis  
 role="strong">upstream version</emphasis>, and <emphasis role="strong">Debian  
 revision</emphasis> must be adjusted to comply with the Debian Policy Manual:  
641  <ulink url="&policy-source;">5.6.1 Source</ulink>,  <ulink url="&policy-source;">5.6.1 Source</ulink>,
642  <ulink url="&policy-package;">5.6.7 Package</ulink>, and  <ulink url="&policy-package;">5.6.7 Package</ulink>, and
643  <ulink url="&policy-version;">5.6.12 Version</ulink>.  <ulink url="&policy-version;">5.6.12 Version</ulink>.
# Line 649  Debian Policy Manual: <ulink url="&polic Line 646  Debian Policy Manual: <ulink url="&polic
646  and is automatically assigned by the package build process.</para></footnote>  and is automatically assigned by the package build process.</para></footnote>
647  </para>  </para>
648  <para>  <para>
649  If you are making a Debian specific package without an upstream program instead,  If instead you are making a Debian-specific package with no upstream, the
650  typical workflow of the Debian package building is simpler.  typical workflow of Debian package building is simpler.
651  </para>  </para>
652  <itemizedlist>  <itemizedlist>
653  <listitem>  <listitem>
654  <para>  <para>
655  We create a native Debian source package in the <literal>3.0 (quilt)</literal> format using a compressed tar format in which required files under the <filename>debian</filename> directory are also included.  Create a native Debian source package in the <literal>3.0 (native)</literal>
656    format using a single compressed tar file in which all files are included.
657  </para>  </para>
658    <itemizedlist>    <itemizedlist>
659    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>.tar.gz</literal></listitem>    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>.tar.gz</literal></listitem>
# Line 664  We create a native Debian source package Line 662  We create a native Debian source package
662  </listitem>  </listitem>
663  <listitem>  <listitem>
664  <para>  <para>
665  We build Debian binary packages from the native Debian source package.  Build Debian binary packages from the native Debian source package.
666  </para>  </para>
667    <itemizedlist>    <itemizedlist>
668    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>_<replaceable>arch</replaceable>.deb</literal></listitem>    <listitem><literal><replaceable>package</replaceable>_<replaceable>version</replaceable>_<replaceable>arch</replaceable>.deb</literal></listitem>
# Line 672  We build Debian binary packages from the Line 670  We build Debian binary packages from the
670  </listitem>  </listitem>
671  </itemizedlist>  </itemizedlist>
672  <para>  <para>
673  In the following, each step of this is explained with detailed examples.  Each step of this outline is explained with detailed examples in later sections.
674  </para>  </para>
675  </section>  </section>
676  <section id="choose"><title>Choose your program</title>  <section id="choose"><title>Choose your program</title>
# Line 817  and ask for advice. Line 815  and ask for advice.
815  </para>  </para>
816  </listitem>  </listitem>
817  </itemizedlist>  </itemizedlist>
818    </listitem>
819  <listitem>  <listitem>
820  <para>  <para>
821  The program should <emphasis role="strong">not</emphasis> introduce security  The program should <emphasis role="strong">not</emphasis> introduce security
822  and maintenance concerns to the Debian system.  and maintenance concerns to the Debian system.
823  </para>  </para>
 </listitem>  
824  <itemizedlist>  <itemizedlist>
825  <listitem>  <listitem>
826  <para>  <para>
# Line 864  with easier packages and discouraged fro Line 862  with easier packages and discouraged fro
862  </para>  </para>
863  <itemizedlist>  <itemizedlist>
864  <listitem><para>Simple packages</para>  <listitem><para>Simple packages</para>
865    <itemizedlist>  <itemizedlist>
866    <listitem><para>single binary package, arch = all (collection of data such as wallpaper graphics)</para></listitem>    <listitem><para>single binary package, arch = all (collection of data such as wallpaper graphics)</para></listitem>
867    <listitem><para>single binary package, arch = all (executables written in the POSIX shell language)</para></listitem>    <listitem><para>single binary package, arch = all (executables written in an interpreted language such as POSIX shell)</para></listitem>
868    <listitem><para>single binary package, arch = all (executables written in interpreter languages)</para></listitem>  </itemizedlist>
   </itemizedlist>  
869  </listitem>  </listitem>
870  <listitem><para>Intermediate complexity packages</para>  <listitem><para>Intermediate complexity packages</para>
871    <itemizedlist>  <itemizedlist>
872    <listitem><para>single binary package, arch = any (executables written in compiler languages such as C and C++)</para></listitem>    <listitem><para>single binary package, arch = any (executables written in compiled languages such as C and C++)</para></listitem>
873    <listitem><para>multiple binary packages, arch = any + all (packages for executables + documentation)</para></listitem>    <listitem><para>multiple binary packages, arch = any + all (packages for executables + documentation)</para></listitem>
874    <listitem><para>upstream source in a format other than <filename>tar.gz</filename> or <filename>tar.bz2</filename></para></listitem>    <listitem><para>upstream source in a format other than <filename>tar.gz</filename> or <filename>tar.bz2</filename></para></listitem>
875    <listitem><para>upstream source containing undistributable contents</para></listitem>    <listitem><para>upstream source containing undistributable contents</para></listitem>
876    </itemizedlist>  </itemizedlist>
877  </listitem>  </listitem>
878  <listitem><para>High complexity packages</para>  <listitem><para>High complexity packages</para>
879    <itemizedlist>  <itemizedlist>
880    <listitem><para>interpreter module package used by other packages</para></listitem>    <listitem><para>interpreter module package used by other packages</para></listitem>
881    <listitem><para>generic library package used by other packages</para></listitem>    <listitem><para>generic library package used by other packages</para></listitem>
882    <listitem><para>multiple binary packages containing a library package</para></listitem>    <listitem><para>multiple binary packages including a library package</para></listitem>
883    <listitem><para>source package with multiple upstream sources</para></listitem>    <listitem><para>source package with multiple upstream sources</para></listitem>
884    <listitem><para>kernel module packages</para></listitem>    <listitem><para>kernel module packages</para></listitem>
885    <listitem><para>kernel patch packages</para></listitem>    <listitem><para>kernel patch packages</para></listitem>
886    <listitem><para>any package with non-trivial maintainer scripts</para></listitem>    <listitem><para>any package with non-trivial maintainer scripts</para></listitem>
887    </itemizedlist>  </itemizedlist>
888  </listitem>  </listitem>
889  </itemizedlist>  </itemizedlist>
890  <para>  <para>
891  Packaging high complexity packages is not too hard, but it requires a bit more  Packaging high complexity packages is not too hard, but it requires a bit more
892  knowledge. You should seek specific guidances for every complexity. For  knowledge. You should seek specific guidance for every complex feature. For
893  example, some interpreter languages have their policy.  example, some languages have their own sub-policy documents:
894  </para>  </para>
895  <itemizedlist>  <itemizedlist>
896  <listitem><para><ulink url="&policy-perl;">Perl policy</ulink></para></listitem>  <listitem><para><ulink url="&policy-perl;">Perl policy</ulink></para></listitem>
# Line 901  example, some interpreter languages have Line 898  example, some interpreter languages have
898  <listitem><para><ulink url="&policy-java;">Java policy</ulink></para></listitem>  <listitem><para><ulink url="&policy-java;">Java policy</ulink></para></listitem>
899  </itemizedlist>  </itemizedlist>
900  <para>  <para>
901  There is another old Latin saying: <emphasis>Fabricando fit fabe</emphasis>  There is another old Latin saying: <emphasis>fabricando fit faber</emphasis>
902  (Practice makes perfect).  It is <emphasis>highly</emphasis> recommended to  (practice makes perfect).  It is <emphasis>highly</emphasis> recommended to
903  practice and experiment all the steps of Debian packaging with simple packages  practice and experiment with all the steps of Debian packaging with simple packages
904  while reading this tutorial.  A trivial upstream tarball  while reading this tutorial.  A trivial upstream tarball
905  <filename>hello-sh-1.0.tar.gz</filename> created with the following may offer  <filename>hello-sh-1.0.tar.gz</filename> created as followings may offer
906  you a good starting point.<footnote><para>Do not worry about missing  a good starting point.<footnote><para>Do not worry about the missing
907  <filename>Makefile</filename>.  You can install the <command>hello</command>  <filename>Makefile</filename>.  You can install the <command>hello</command>
908  command by simply using <command>debhelper</command> as in  command by simply using <command>debhelper</command> as in
909  <xref linkend="install"/>, or by modifying the upstream source to add a new  <xref linkend="install"/>, or by modifying the upstream source to add a new
910  <filename>Makefile</filename> with the <literal>install</literal> target as in  <filename>Makefile</filename> with the <literal>install</literal> target as in
911  <xref linkend="modify"/>.</para></footnote>  <xref linkend="modify"/>.</para></footnote>
# Line 955  enough.  </para> </footnote>), you shoul Line 952  enough.  </para> </footnote>), you shoul
952  appropriate tools and repack it.  appropriate tools and repack it.
953  </para>  </para>
954  <para>  <para>
955    If your program's source comes with some contents which do not comply with
956    DFSG, you should also unpack it to remove such contents and repack it with a
957    modified upstream version containg <literal>dfsg</literal>.
958    </para>
959    <para>
960  As an example, I'll use a program called <command>gentoo</command>, a GTK+  As an example, I'll use a program called <command>gentoo</command>, a GTK+
961  file manager.  file manager.
962  <footnote><para> This program is already packaged. The  <footnote><para> This program is already packaged. The
# Line 1098  build system.  You can recognize such so Line 1100  build system.  You can recognize such so
1100  <section id="namever"><title>Package name and version</title>  <section id="namever"><title>Package name and version</title>
1101  <para>  <para>
1102  If the upstream source comes as <filename>gentoo-0.9.12.tar.gz</filename>, you can  If the upstream source comes as <filename>gentoo-0.9.12.tar.gz</filename>, you can
1103  consider  take <literal>gentoo</literal> as the (source) <emphasis role="strong">package name</emphasis>
1104  <emphasis role="strong">package name</emphasis> to be <literal>gentoo</literal> and  and <literal>0.9.12</literal> as the <emphasis role="strong">upstream version</emphasis>.
 <emphasis role="strong">upstream version</emphasis> to be <literal>0.9.12</literal>.  
1105  These are used in the <filename>debian/changelog</filename> file described later in  These are used in the <filename>debian/changelog</filename> file described later in
1106  <xref linkend="changelog"/>, too.  <xref linkend="changelog"/>, too.
1107  </para>  </para>
# Line 1108  These are used in the <filename>debian/c Line 1109  These are used in the <filename>debian/c
1109  Although this simple approach works most of the times, you may need to adjust  Although this simple approach works most of the times, you may need to adjust
1110  <emphasis role="strong">package name</emphasis> and  <emphasis role="strong">package name</emphasis> and
1111  <emphasis role="strong">upstream version</emphasis> by renaming the upstream  <emphasis role="strong">upstream version</emphasis> by renaming the upstream
1112  source to follow the Debian Policy and the existing convention.  source to follow Debian Policy and existing convention.
1113  </para>  </para>
1114  <para>  <para>
1115  You must choose the <emphasis role="strong">package name</emphasis>  You must choose the <emphasis role="strong">package name</emphasis>
# Line 1117  to consist only of lower case letters (< Line 1118  to consist only of lower case letters (<
1118  (<literal>-</literal>) signs, and periods (<literal>.</literal>). It must be  (<literal>-</literal>) signs, and periods (<literal>.</literal>). It must be
1119  at least two characters long, must start with an alphanumeric character, and  at least two characters long, must start with an alphanumeric character, and
1120  must not be the same as existing ones.  must not be the same as existing ones.
1121  It is good idea to keep its length within 30 characters.  It is a good idea to keep its length within 30 characters.
1122  <footnote><para>The default package name field length of <command>aptitude</command> is 30.  For more than 90% of packages, the package name is less than 24 characters.</para></footnote>  <footnote><para>The default package name field length of <command>aptitude</command> is 30.  For more than 90% of packages, the package name is less than 24 characters.</para></footnote>
1123  </para>  </para>
1124  <!--  <!--
# Line 1133  Previous 20 chars is becoming too short Line 1134  Previous 20 chars is becoming too short
1134  Default aptitude setting display up to 30 chars (98.3%).  Default aptitude setting display up to 30 chars (98.3%).
1135  -->  -->
1136  <para>  <para>
1137  If upstream source uses generic words such as <literal>test-suite</literal> as  If upstream uses some generic term such as <literal>test-suite</literal> for
1138  its name, it is good idea to rename it not to contaminate name space for the  its name, it is a good idea to rename it to identify its contents explicitly and avoid namespace pollution.
 package name and to identify its contents explicitly.  
1139  <footnote><para>If you follow the  <footnote><para>If you follow the
1140  <ulink url="&devref-newpackage;">Debian Developer's Reference 5.1. "New packages"</ulink>,  <ulink url="&devref-newpackage;">Debian Developer's Reference 5.1. "New packages"</ulink>,
1141  the ITP process will usually catch this kind of issues.</para></footnote>  the ITP process will usually catch this kind of issues.</para></footnote>
# Line 1173  aptitude display 10 = 8char for up + 1ch Line 1173  aptitude display 10 = 8char for up + 1ch
1173  90chars as max for file name of binary debs (package+up+deb+arch+.deb)  90chars as max for file name of binary debs (package+up+deb+arch+.deb)
1174  -->  -->
1175  <para>  <para>
1176  If the upstream software does not use normal version system like  If upstream does not use a normal versioning scheme such as
1177  <literal>2.30.32</literal> but uses some kind of date such as  <literal>2.30.32</literal> but uses some kind of date such as
1178  <literal>09Oct23</literal>, a random codename string or a VCS hash value as a part  <literal>09Oct23</literal>, a random codename string, or a VCS hash value as part
1179  of version, make sure to remove them from the  of the version, make sure to remove them from the
1180  <emphasis role="strong">upstream version</emphasis>.  Such information can be  <emphasis role="strong">upstream version</emphasis>.  Such information can be
1181  recorded in the <filename>debian/changelog</filename> file.  If you need to  recorded in the <filename>debian/changelog</filename> file.  If you need to
1182  invent a version string, use the <literal>YYYYMMDD</literal> format such as  invent a version string, use the <literal>YYYYMMDD</literal> format such as
1183  <literal>20110429</literal> as upstream version.  This ensures that  <literal>20110429</literal> as upstream version.  This ensures that
1184  <command>dpkg</command> properly sees later versions as upgrades.  <command>dpkg</command> interprets later versions correctly as upgrades.
1185  </para>  </para>
1186  <para>  <para>
1187  Version strings <footnote><para>Version strings may be  Version strings <footnote><para>Version strings may be
# Line 1194  Version strings <footnote><para>Version Line 1194  Version strings <footnote><para>Version
1194  See <xref linkend="newrevision"/> for how the  See <xref linkend="newrevision"/> for how the
1195  <emphasis role="strong">Debian revision</emphasis> is incremented.  <emphasis role="strong">Debian revision</emphasis> is incremented.
1196  </para></footnote>  </para></footnote>
1197  can be compared with <citerefentry> <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> as the following.  can be compared using <citerefentry>
1198    <refentrytitle>dpkg</refentrytitle> <manvolnum>1</manvolnum> </citerefentry> as follows.
1199  </para>  </para>
1200  <screen>  <screen>
1201   $ dpkg --compare-versions <replaceable>ver1</replaceable> <replaceable>op</replaceable> <replaceable>ver2</replaceable>   $ dpkg --compare-versions <replaceable>ver1</replaceable> <replaceable>op</replaceable> <replaceable>ver2</replaceable>
1202  </screen>  </screen>
1203  <para>  <para>
1204  The version comparison rule can be summarized as the following.  The version comparison rule can be summarized as:
1205  </para>  </para>
1206  <itemizedlist>  <itemizedlist>
1207  <listitem><para>The strings are compared from the head to the tail.</para></listitem>  <listitem><para>Strings are compared from the head to the tail.</para></listitem>
1208  <listitem><para>Alphabets are larger than numbers.</para></listitem>  <listitem><para>Letters are larger than digits.</para></listitem>
1209  <listitem><para>Numbers are compared as the integer.</para></listitem>  <listitem><para>Numbers are compared as integers.</para></listitem>
1210  <listitem><para>Alphabets are compared in the ASCII code order.</para></listitem>  <listitem><para>Letters are compared in ASCII code order.</para></listitem>
1211  <listitem><para>There are some special rules for periods (<literal>.</literal>), plus (<literal>+</literal>) and tildes (<literal>~</literal>) as the followings.</para>  <listitem><para>There are special rules for period
1212    (<literal>.</literal>), plus (<literal>+</literal>), and tilde
1213    (<literal>~</literal>) characters, as follows.</para>
1214    <para>    <para>
1215    <literal>0.0</literal> &lt;    <literal>0.0</literal> &lt;
1216    <literal>0.5</literal> &lt;    <literal>0.5</literal> &lt;
# Line 1224  The version comparison rule can be summa Line 1227  The version comparison rule can be summa
1227  </listitem>  </listitem>
1228  </itemizedlist>  </itemizedlist>
1229  <para>  <para>
1230  One of the tricky case happens when the upstream releases  One tricky case occurs when upstream releases
1231  <filename>gentoo-0.9.12-ReleaseCandidate-99.tar.gz</filename> as the  <filename>gentoo-0.9.12-ReleaseCandidate-99.tar.gz</filename> as the
1232  pre-release of <filename>gentoo-0.9.12.tar.gz</filename>.  You need to make  pre-release of <filename>gentoo-0.9.12.tar.gz</filename>.  You need to make
1233  sure that the upgrade works properly by renaming the upstream source to  sure that the upgrade works properly by renaming the upstream source to
# Line 1347  package; further explanations are given Line 1350  package; further explanations are given
1350  <para>  <para>
1351  Please note that the source file does not need to contain any build system  Please note that the source file does not need to contain any build system
1352  discussed in <xref linkend="simplemake"/> and <xref linkend="portable"/>.  It  discussed in <xref linkend="simplemake"/> and <xref linkend="portable"/>.  It
1353  could be just a collection of graphics data etc.  Installation of files may be  could be just a collection of graphical data etc.  Installation of files may be
1354  enabled by <systemitem role="package">debhelper</systemitem> configuration  carried out using only <systemitem role="package">debhelper</systemitem> configuration
1355  files such as <filename>debian/install</filename> (see  files such as <filename>debian/install</filename> (see
1356  <xref linkend="install"/>) only.  <xref linkend="install"/>).
1357  </para>  </para>
1358  </section>  </section>
1359  <section id="native-dh-make"><title>Initial native Debian package</title>  <section id="native-dh-make"><title>Initial native Debian package</title>
1360  <para>  <para>
1361  Debian native packages are simpler to manage if they contain source files you  If a package contains source files you are only maintaining for Debian,
1362  manage only for Debian, possibly only for local uses.  If you have source  possibly only for local use, it may be simpler to create it as a Debian
1363    native package. If you have source
1364  files in <filename>~/mypackage-1.0</filename>, you can create an initial native  files in <filename>~/mypackage-1.0</filename>, you can create an initial native
1365  Debian package for it by issuing the <command>dh_make</command> command as  Debian package for it by issuing the <command>dh_make</command> command as
1366  follows.  follows.
# Line 4003  Debian archives.  See Line 4007  Debian archives.  See
4007  <ulink url="&keycreate;">Creating a new GPG key</ulink> and  <ulink url="&keycreate;">Creating a new GPG key</ulink> and
4008  <ulink url="&keysigning; ">Debian Wiki on Keysigning</ulink>.  <ulink url="&keysigning; ">Debian Wiki on Keysigning</ulink>.
4009  </para></footnote>  </para></footnote>
4010  If you are building Debian packages only for your local use, you can skip  If you are building Debian packages only for your own local use, you can skip
4011  promptings for the GPG signatures on the <filename>.dsc</filename> file and the  promptings for the GPG signatures on the <filename>.dsc</filename> file and the
4012  <filename>.changes</filename> file as:  <filename>.changes</filename> file like this:
4013  </para>  </para>
4014  <screen>  <screen>
4015  $ dpkg-buildpackage -us -uc  $ dpkg-buildpackage -us -uc
4016  </screen>  </screen>
4017  <para>  <para>
4018  For the non-native Debian package, e.g.,  For a non-native Debian package, e.g.,
4019  <systemitem role="package">gentoo</systemitem>, you will see the following  <systemitem role="package">gentoo</systemitem>, you will see the following
4020  files in the parent directory (<filename>~/gentoo</filename>) after building  files in the parent directory (<filename>~/gentoo</filename>) after building
4021  packages:  packages:
# Line 4099  mentioned.  Anyone downloading your file Line 4103  mentioned.  Anyone downloading your file
4103  they'll know the file is corrupt or has been tampered with.  they'll know the file is corrupt or has been tampered with.
4104  </para>  </para>
4105  <para>  <para>
4106  For the native Debian package, e.g.,  For a native Debian package, e.g.,
4107  <systemitem role="package">mypackage</systemitem>, you will see the following  <systemitem role="package">mypackage</systemitem>, you will see the following
4108  files in the parent directory after building packages:  files in the parent directory after building packages:
4109  </para>  </para>
# Line 4109  files in the parent directory after buil Line 4113  files in the parent directory after buil
4113  <filename>mypackage_1.0.tar.gz</filename>  <filename>mypackage_1.0.tar.gz</filename>
4114  </para>  </para>
4115  <para>  <para>
4116  This is the source code tarball merely created from the  This is the source code tarball created from the
4117  <filename>mypackage-1.0</filename> directory by the  <filename>mypackage-1.0</filename> directory by the
4118  <command>dpkg-source</command>.  (Its suffix is not <filename>orig.tar.gz</filename>.)  <command>dpkg-source</command>.  (Its suffix is not <filename>orig.tar.gz</filename>.)
4119  </para>  </para>
# Line 4257  Cleaning the source and rebuilding the p Line 4261  Cleaning the source and rebuilding the p
4261  $ debuild  $ debuild
4262  </screen>  </screen>
4263  <para>  <para>
4264  Here, if you are building Debian packages only for your local use, you can skip  Here, if you are building Debian packages only for your own local use, you can skip
4265  promptings for the GPG signatures on the <filename>.dsc</filename> file and the  promptings for the GPG signatures on the <filename>.dsc</filename> file and the
4266  <filename>.changes</filename> file as:  <filename>.changes</filename> file like this:
4267  </para>  </para>
4268  <screen>  <screen>
4269  $ debuild -us -uc  $ debuild -us -uc
# Line 4756  a public archive to share it. Line 4760  a public archive to share it.
4760  <para>  <para>
4761  Once you become an official developer,  Once you become an official developer,
4762  <footnote><para>  <footnote><para>
4763  See <xref linkend="socialdynamism"/>.  See <xref linkend="socialdynamics"/>.
4764  </para></footnote>  </para></footnote>
4765  you can upload the package to the Debian archive.  you can upload the package to the Debian archive.
4766  <footnote><para>  <footnote><para>
# Line 4853  For the <command>debuild</command> comma Line 4857  For the <command>debuild</command> comma
4857  $ debuild -sa  $ debuild -sa
4858  </screen>  </screen>
4859  <para>  <para>
4860  For the <command>debuild</command> command:  For the <command>pdebuild</command> command:
4861  </para>  </para>
4862  <screen>  <screen>
4863  $ pdebuild --debbuildopts -sa  $ pdebuild --debbuildopts -sa
# Line 4885  For the <command>debuild</command> comma Line 4889  For the <command>debuild</command> comma
4889  $ debuild -v<replaceable>1.2</replaceable>  $ debuild -v<replaceable>1.2</replaceable>
4890  </screen>  </screen>
4891  <para>  <para>
4892  For the <command>debuild</command> command:  For the <command>pdebuild</command> command:
4893  </para>  </para>
4894  <screen>  <screen>
4895  $ pdebuild --debbuildopts "-v<replaceable>1.2</replaceable>"  $ pdebuild --debbuildopts "-v<replaceable>1.2</replaceable>"
# Line 5008  changed and it already exists in the Deb Line 5012  changed and it already exists in the Deb
5012  </listitem>  </listitem>
5013  </itemizedlist>  </itemizedlist>
5014  <para>  <para>
5015  One of the tricky case happens when you make an experimental package before  One tricky case can occur when you make a local package to experiment with
5016  uploading the normal version, e.g.,  the packaging before uploading  the normal version to the official archive,
5017    e.g.,
5018  <literal><replaceable>1.0.1</replaceable>-<replaceable>1</replaceable></literal>.  <literal><replaceable>1.0.1</replaceable>-<replaceable>1</replaceable></literal>.
5019  For such case, you use a version string in the Debian  For smoother upgrades, it is a good idea to create a
5020  <filename>changelog</filename> file as  <filename>changelog</filename> entry with a version string as
5021  <literal><replaceable>1.0.1</replaceable>-<replaceable>1~rc1</replaceable></literal>. See <xref linkend="namever"/> for the order of version strings.  <literal><replaceable>1.0.1</replaceable>-<replaceable>1~rc1</replaceable></literal>.
5022    You may unclutter <filename>changelog</filename>
5023    by consolidating such local change entries into a single entry for the official package.
5024    See <xref linkend="namever"/> for the order of version strings.
5025  </para>  </para>
5026  <para>  <para>
5027  </para>  </para>

Legend:
Removed from v.8757  
changed lines
  Added in v.8771

  ViewVC Help
Powered by ViewVC 1.1.5