| 1 |
plessy |
1847 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
|
|
<?xml-stylesheet type="text/xsl"
|
| 3 |
|
|
href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"?>
|
| 4 |
|
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
| 5 |
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
|
| 6 |
|
|
<article xml:base="http://debian-med.alioth.debian.org/">
|
| 7 |
tille |
3777 |
<title>Debian Med Group Policy</title>
|
| 8 |
plessy |
1847 |
<articleinfo>
|
| 9 |
hanska-guest |
1277 |
<authorgroup>
|
| 10 |
|
|
<author>
|
| 11 |
plessy |
1847 |
<firstname>Andreas</firstname>
|
| 12 |
|
|
<surname>Tille</surname>
|
| 13 |
|
|
<contrib>First review </contrib>
|
| 14 |
hanska-guest |
1277 |
<email>tille@debian.org</email>
|
| 15 |
|
|
</author>
|
| 16 |
|
|
<author>
|
| 17 |
plessy |
1847 |
<firstname>David</firstname>
|
| 18 |
|
|
<surname>Paleino</surname>
|
| 19 |
|
|
<contrib>Initial writing </contrib>
|
| 20 |
hanska-guest |
1277 |
<email>d.paleino@gmail.com</email>
|
| 21 |
|
|
</author>
|
| 22 |
plessy |
1847 |
<author>
|
| 23 |
|
|
<firstname>Charles</firstname>
|
| 24 |
|
|
<surname>Plessy</surname>
|
| 25 |
|
|
<contrib>Contributions in 2008</contrib>
|
| 26 |
|
|
<email>plessy@debian.org</email>
|
| 27 |
|
|
</author>
|
| 28 |
hanska-guest |
1277 |
</authorgroup>
|
| 29 |
|
|
<releaseinfo>
|
| 30 |
|
|
$ policy.xml rev. @REV@ - @DATE@ (@AUTHOR@) $
|
| 31 |
|
|
</releaseinfo>
|
| 32 |
plessy |
1847 |
</articleinfo>
|
| 33 |
hanska-guest |
1277 |
<mediaobject>
|
| 34 |
plessy |
1847 |
<objectinfo>
|
| 35 |
tille |
3777 |
<title>Debian Med Group</title>
|
| 36 |
plessy |
1847 |
</objectinfo>
|
| 37 |
hanska-guest |
1277 |
<imageobject>
|
| 38 |
|
|
<imagedata fileref="/img/debian-med.jpg" format="JPG" align="center" />
|
| 39 |
|
|
</imageobject>
|
| 40 |
|
|
</mediaobject>
|
| 41 |
plessy |
6306 |
<sect1 id="introduction">
|
| 42 |
hanska-guest |
1277 |
<title>Introduction</title>
|
| 43 |
tille |
3777 |
<para>Debian Med is a <quote><ulink url="http://blends.alioth.debian.org/blends">Debian Pure Blend</ulink></quote>
|
| 44 |
hanska-guest |
1277 |
with the aim to develop Debian into an operating system that is particularly
|
| 45 |
|
|
well fit for the requirements for medical practice and research.</para>
|
| 46 |
tille |
3777 |
<para>The Debian Med project presents packages that are associated
|
| 47 |
hanska-guest |
1277 |
with medicine, pre-clinical research, and life sciences. Its developments
|
| 48 |
|
|
are mostly focused on three areas for the moment: medical practice,
|
| 49 |
|
|
imaging and bioinformatics.</para>
|
| 50 |
|
|
<para>Over the previous years, several initiatives have spawned that
|
| 51 |
|
|
address the scientific disciplines like chemistry or bioinformatics.
|
| 52 |
tille |
3777 |
Debian Med is not a competition to these efforts but a platform to
|
| 53 |
|
|
present the packages to the community as a Debian Pure Blend.</para>
|
| 54 |
hanska-guest |
1277 |
</sect1>
|
| 55 |
plessy |
6306 |
<sect1 id="contribute">
|
| 56 |
hanska-guest |
1277 |
<title>How to Contribute</title>
|
| 57 |
|
|
<para>From the developer to the user, there is a long chain of tasks
|
| 58 |
|
|
in which we always welcome participation. First we must keep ourselves
|
| 59 |
|
|
informed about the software landscape in biology and medicine. Software
|
| 60 |
|
|
to be packaged is chosen according to criteria such as users' need and
|
| 61 |
|
|
the consistency of the distribution.</para>
|
| 62 |
|
|
<para>Once in Debian, the software is monitored for its quality and bugs
|
| 63 |
|
|
are fixed, if possible in collaboration with the upstream maintainer(s).
|
| 64 |
|
|
All this work would not be very useful if it remains confidential.</para>
|
| 65 |
|
|
<para>We also dedicate some time to advertise it to the world via
|
| 66 |
plessy |
1847 |
<ulink url="http://www.debian.org">www.debian.org</ulink>
|
| 67 |
hanska-guest |
1277 |
and to ease the integration of new members.</para>
|
| 68 |
plessy |
1847 |
<para>Please contact us on <ulink url="mailto:debian-med@lists.debian.org">debian-med@lists.debian.org</ulink>
|
| 69 |
hanska-guest |
1277 |
if you want to help to make medical and biological software available
|
| 70 |
plessy |
1847 |
to Debian users. Read the <link linkend="membership">Membership</link> section if you're
|
| 71 |
hanska-guest |
1277 |
interested in joining us.</para>
|
| 72 |
|
|
<para>If you speak a language other than English, you can contribute
|
| 73 |
|
|
rightaway with translations of package descriptions at
|
| 74 |
tille |
5212 |
<ulink url="http://ddtp.debian.net">ddtp.debian.net</ulink>.</para>
|
| 75 |
hanska-guest |
1277 |
<para>When working on these, you will find immediate targets for improvements
|
| 76 |
|
|
of the original English versions, too. For these, though, you need access
|
| 77 |
tille |
3777 |
to Debian Med's source code repository. Very welcome are tutorials that
|
| 78 |
hanska-guest |
1277 |
guide Debian users towards the use of packages to their immediate benefit.
|
| 79 |
|
|
You may also consider to write respective articles for Magazines, be they
|
| 80 |
|
|
online or in print.</para>
|
| 81 |
plessy |
6306 |
<sect2 id="membership">
|
| 82 |
|
|
<title>Membership</title>
|
| 83 |
hanska-guest |
1277 |
<para>To request membership to this group, please go on our
|
| 84 |
plessy |
1847 |
<ulink url="http://alioth.debian.org/projects/debian-med">Alioth page</ulink>,
|
| 85 |
|
|
or directly follow this <ulink url="http://alioth.debian.org/project/request.php?group_id=30063">link</ulink>.
|
| 86 |
hanska-guest |
1277 |
Remember that you must have an Alioth account before requesting
|
| 87 |
plessy |
1847 |
membership (see <ulink url="http://alioth.debian.org/account/register.php">here</ulink>
|
| 88 |
hanska-guest |
1277 |
to request an Alioth account).</para>
|
| 89 |
|
|
</sect2>
|
| 90 |
plessy |
6306 |
<sect2 id="readings">
|
| 91 |
|
|
<title>Essential readings</title>
|
| 92 |
plessy |
2408 |
<itemizedlist>
|
| 93 |
|
|
<listitem><para>The <ulink url="http://www.debian.org/doc/debian-policy/">Debian Policy</ulink>: packages must conform to it.</para></listitem>
|
| 94 |
tille |
5212 |
<listitem><para>The <ulink url="http://www.debian.org/doc/developers-reference/">Developers Reference</ulink>: details best packaging practices.</para></listitem>
|
| 95 |
plessy |
2408 |
<listitem><para>The <ulink url="http://www.debian.org/doc/maint-guide/">New Maintainer's Guide</ulink>: puts a bit of the two above in practice.</para></listitem>
|
| 96 |
|
|
<listitem><para>The <ulink url="http://debian-med.alioth.debian.org/docs/policy.html">Debian Med Policy</ulink> (this document): explains how the work is organised in our team..</para></listitem>
|
| 97 |
|
|
</itemizedlist>
|
| 98 |
|
|
</sect2>
|
| 99 |
hanska-guest |
1277 |
</sect1>
|
| 100 |
plessy |
6306 |
<sect1 id="repositories">
|
| 101 |
plessy |
4307 |
<title>Repositories</title>
|
| 102 |
|
|
<para>We use Subversion (SVN) and Git repositories, hosted on
|
| 103 |
plessy |
1847 |
<ulink url="http://alioth.debian.org/">Alioth</ulink>, the hosting
|
| 104 |
hanska-guest |
1277 |
facility provided by Debian to free software developers. You can have a look at
|
| 105 |
plessy |
4307 |
each repository through Alioth's web interfaces: <ulink url="http://svn.debian.org/wsvn/debian-med/trunk/?rev=0&sc=0">wsvn</ulink>
|
| 106 |
|
|
<ulink url="http://svn.debian.org/viewsvn/debian-med">viewsvn</ulink> and
|
| 107 |
|
|
<ulink url="http://git.debian.org/">gitweb</ulink>.</para>
|
| 108 |
|
|
<para>The Subversion repository is the primary location for our source packages.
|
| 109 |
|
|
However, the Git repository is free to use for special cases, for instance when
|
| 110 |
|
|
the Subversion tags take a disproportionated size, when the maintainer is
|
| 111 |
|
|
much more comfortable with Git than Subversion, when some special features of
|
| 112 |
|
|
Git or git-buildpackage are desired, or more simply when the maintainer wants
|
| 113 |
|
|
to thake the opportunity to familiarise with Git.
|
| 114 |
|
|
</para>
|
| 115 |
plessy |
6306 |
<sect2 id="source">
|
| 116 |
hanska-guest |
1277 |
<title>Give me the source!</title>
|
| 117 |
|
|
<para>
|
| 118 |
plessy |
4307 |
To check sources out from our repostitories, please do:
|
| 119 |
hanska-guest |
1277 |
<itemizedlist>
|
| 120 |
|
|
<listitem>
|
| 121 |
tille |
5212 |
<para>If you are a member of Debian Med or a Debian developer, you have write permission:</para>
|
| 122 |
hanska-guest |
1277 |
<blockquote>
|
| 123 |
|
|
<para><userinput>
|
| 124 |
|
|
<command>svn co</command> <filename class="directory">svn+ssh://user@alioth.debian.org/svn/debian-med/trunk/...</filename>
|
| 125 |
tille |
4308 |
</userinput></para>
|
| 126 |
|
|
<para><userinput>
|
| 127 |
plessy |
4307 |
<command>git clone</command> <filename class="directory">git+ssh://user@alioth.debian.org/git/debian-med/<package>.git</filename>
|
| 128 |
hanska-guest |
1277 |
</userinput></para>
|
| 129 |
|
|
</blockquote>
|
| 130 |
plessy |
2866 |
<para>You can avoid specifying your Alioth user name by setting it in <filename>~/.ssh/config</filename>:</para>
|
| 131 |
|
|
<blockquote>
|
| 132 |
|
|
<programlisting>
|
| 133 |
|
|
Host *.debian.org
|
| 134 |
|
|
User yourusername
|
| 135 |
|
|
</programlisting>
|
| 136 |
|
|
</blockquote>
|
| 137 |
hanska-guest |
1277 |
</listitem>
|
| 138 |
|
|
<listitem>
|
| 139 |
plessy |
2409 |
<para>For read-only access, the syntax is slightly different:</para>
|
| 140 |
hanska-guest |
1277 |
<blockquote>
|
| 141 |
|
|
<para><userinput>
|
| 142 |
|
|
<command>svn co</command> <filename class="directory">svn://svn.debian.org/svn/debian-med/trunk/...</filename>
|
| 143 |
plessy |
4825 |
</userinput></para>
|
| 144 |
|
|
<para><userinput>
|
| 145 |
plessy |
4307 |
<command>git clone</command> <filename class="directory">git://git.debian.org/git/debian-med/<package>.git</filename>
|
| 146 |
hanska-guest |
1277 |
</userinput></para>
|
| 147 |
|
|
</blockquote>
|
| 148 |
|
|
</listitem>
|
| 149 |
|
|
</itemizedlist>
|
| 150 |
|
|
</para>
|
| 151 |
plessy |
1847 |
<para>
|
| 152 |
|
|
Another way to check the sources is through the use of the
|
| 153 |
|
|
<command>debcheckout</command> command, from the
|
| 154 |
|
|
<ulink url="http://packages.debian.org/devscripts">devscripts</ulink>
|
| 155 |
|
|
package.
|
| 156 |
|
|
</para>
|
| 157 |
hanska-guest |
1277 |
</sect2>
|
| 158 |
plessy |
6306 |
<sect2 id="repository-structure">
|
| 159 |
hanska-guest |
1277 |
<title>Repository structure</title>
|
| 160 |
|
|
<para>The SVN repository is structured as follows:
|
| 161 |
plessy |
1847 |
<literallayout>
|
| 162 |
|
|
<code>
|
| 163 |
|
|
debian-med/
|
| 164 |
|
|
└ trunk/
|
| 165 |
|
|
├ community/
|
| 166 |
|
|
│ ├ debtags/
|
| 167 |
|
|
│ ├ infrastructure/
|
| 168 |
|
|
│ └ website/
|
| 169 |
|
|
└ packages/
|
| 170 |
|
|
├ <package A>/
|
| 171 |
|
|
│ ├ branches/
|
| 172 |
|
|
│ ├ tags/
|
| 173 |
|
|
│ └ trunk/
|
| 174 |
|
|
│ └ debian/
|
| 175 |
|
|
├ <package B>/
|
| 176 |
|
|
│ ├ branches/
|
| 177 |
|
|
│ ├ tags/
|
| 178 |
|
|
│ └ trunk/
|
| 179 |
|
|
│ └ debian/
|
| 180 |
|
|
…
|
| 181 |
|
|
</code>
|
| 182 |
|
|
</literallayout>
|
| 183 |
|
|
</para>
|
| 184 |
|
|
<note><para>We are currently considering an alternative layout in which all
|
| 185 |
|
|
the <filename>trunk</filename>, <filename>tags</filename> and
|
| 186 |
tille |
5212 |
<filename>branches</filename> directories are grouped together, so that developers can checkout trunks without tags.</para></note>
|
| 187 |
plessy |
4307 |
<para>The Git repository is not structured: each package is in its own Git repository.
|
| 188 |
|
|
But all of them are under the same <filename>debian-med</filename> directory.</para>
|
| 189 |
hanska-guest |
1277 |
</sect2>
|
| 190 |
plessy |
6306 |
<sect2 id="subversion-to-git">
|
| 191 |
plessy |
4307 |
<title>Migration of a source package from Subversion to Git.</title>
|
| 192 |
|
|
<para>There is no easy way to prepare a Git repository from our Subversion repository that would
|
| 193 |
|
|
look like the package was always managed in Git, because we use svn-buildpackage with the
|
| 194 |
|
|
mergeWithUpstream property set, which excludes the upstream sources. Nevertheless, the
|
| 195 |
|
|
following receipe will genearate a Git repostitory that contains all the history of
|
| 196 |
|
|
the debian directory, plus a collection of selected upstream source releases.
|
| 197 |
|
|
</para>
|
| 198 |
|
|
<itemizedlist>
|
| 199 |
|
|
<listitem>
|
| 200 |
|
|
<para>Start the conversion as explained in the <ulink url="http://wiki.debian.org/Alioth/Git#ConvertaSVNAliothrepositorytoGit">Alioth/Git</ulink> page of the Debian wiki. To be consistent with a later usage of <command>git-buildpackage</command>, it is preferable to prefix the tag names <quote>debian</quote>. During this conversion, you can take advantage of the file <filename>/trunk/community/infrastructure/comitters</filename> in the Subversion repository, and expand it if necessary.</para>
|
| 201 |
|
|
</listitem>
|
| 202 |
|
|
<listitem>
|
| 203 |
|
|
<para>Import of the upstream original tarballs that you find relevant, for instance the ones that were part of a stable release). When this paragraph was written, it was necessary to follow special instruction detailed in <ulink url="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471560">bug 471560</ulink>.
|
| 204 |
|
|
</para>
|
| 205 |
|
|
</listitem>
|
| 206 |
|
|
<listitem>
|
| 207 |
|
|
<para>Upload to alioth.debian.org/git/debian-med and set up the hooks and other meta-data as explained in the <ulink url="http://wiki.debian.org/Alioth/Git">Alioth/Git</ulink> page of the Debian wiki.
|
| 208 |
|
|
</para>
|
| 209 |
|
|
</listitem>
|
| 210 |
|
|
</itemizedlist>
|
| 211 |
plessy |
5517 |
<para>It is also possible to prepare a Git repository containing some of the package's history using the command <command>git-import-dscs --debsnap</command> from the helper toolkit <command>git-buildpackage</command>. This will download all the versions of a package available in <ulink url="http://snapshot.debian.org">snapshots.debian.org</ulink> and create tags for each of them. Note that as this paragraph is written, the tool is not aware that <emphasis>backports</emphasis> should be a different branch</para>
|
| 212 |
plessy |
4307 |
</sect2>
|
| 213 |
plessy |
6306 |
<sect2 id="updating-git-package">
|
| 214 |
plessy |
5518 |
<title>Updating a source package managed with Git</title>
|
| 215 |
|
|
<para>Most source packages maintained as Git repositories in Debian Med are using the <command>git-buildpackage</command> helper toolkit. In doubt, try this one first.</para>
|
| 216 |
|
|
<para><command>git-buildpackage</command>'s command <command>git-import-orig</command> allows very easy update of the <emphasis>upstream</emphasis> branch when the original sources are distributed as a compressed archive. Its option <command>--pristine-tar</command> is useful for stablizing the MD5 sum of the “<filename>orig.tar.gz</filename>” produced when building a source package from the repository alone (not doing so results in archive rejection of package updates). With recent versions of git-buildpackage, it is often unnecessary to rename the freshly downloaded original upstream archive.</para>
|
| 217 |
|
|
</sect2>
|
| 218 |
hanska-guest |
1277 |
</sect1>
|
| 219 |
plessy |
6306 |
<sect1 id="packaging">
|
| 220 |
hanska-guest |
1277 |
<title>Packaging</title>
|
| 221 |
plessy |
6306 |
<sect2 id="itp">
|
| 222 |
hanska-guest |
1277 |
<title>Announcing intent to package</title>
|
| 223 |
|
|
<para>If you intent to work on a Debian package you should follow
|
| 224 |
plessy |
1847 |
the <ulink url="http://www.debian.org/devel/wnpp/#l1">normal Debian rules</ulink> and file a <acronym>WNPP</acronym> bug report.</para>
|
| 225 |
tille |
3777 |
<para>It is a good idea to keep the Debian Med mailing list
|
| 226 |
plessy |
1847 |
<ulink url="mailto:debian-med@lists.debian.org">debian-med@lists.debian.org</ulink>
|
| 227 |
plessy |
2630 |
<ulink url="http://www.debian.org/Bugs/Reporting#xcc"> in CC</ulink> and to set it
|
| 228 |
|
|
as the owner of the ITP to keep your co-workers informed. This will ensure that we notice
|
| 229 |
plessy |
4042 |
if for some reason the package has not been uploaded.</para>
|
| 230 |
|
|
<para>In addition, please add the package to the <quote>task</quote> file where it fits
|
| 231 |
|
|
the best, and document your ITP number using the <command>WNPP</command> field name.</para>
|
| 232 |
hanska-guest |
1277 |
</sect2>
|
| 233 |
plessy |
1847 |
</sect1>
|
| 234 |
plessy |
6306 |
<sect1 id="tasks">
|
| 235 |
plessy |
4042 |
<title>Tasks</title>
|
| 236 |
|
|
<para>The Debian Med <ulink url="http://blends.alioth.debian.org/blends">Debian Pure Blend</ulink> is organised by <ulink url="http://debian-med.alioth.debian.org/tasks/index">tasks</ulink>, that group packages around broad themes such as <ulink url="http://debian-med.alioth.debian.org/tasks/imaging">medical imaging</ulink> for instance. The tasks list programs that are already packaged in Debian as well as packages in preparation.</para>
|
| 237 |
|
|
<para>The tasks files are not hosted in the Debian Med repositories, but in the Debian Blends repository. Nevertheless, all members of the Debian Med project on the Alioth forge have write access to the Blends subversion repository. You can easily check out its sources with the command <command>debcheckout -a debian-med</command>.</para>
|
| 238 |
|
|
<para>The syntax of the tasks files is very similar to Debian control files, and described in the <ulink url="http://blends.alioth.debian.org/blends/ch-sentinel.en.html">Debian Blends website</ulink>.</para>
|
| 239 |
|
|
</sect1>
|
| 240 |
plessy |
6306 |
<sect1 id="policy">
|
| 241 |
plessy |
1847 |
<title>Policy</title>
|
| 242 |
plessy |
6306 |
<sect2 id="debian-control">
|
| 243 |
plessy |
1847 |
<title><filename>debian/control</filename></title>
|
| 244 |
|
|
<orderedlist>
|
| 245 |
|
|
<listitem>
|
| 246 |
|
|
<formalpara>
|
| 247 |
|
|
<title>Section</title>
|
| 248 |
|
|
<para>Should be <quote>science</quote> for the source package.</para>
|
| 249 |
|
|
</formalpara>
|
| 250 |
|
|
</listitem>
|
| 251 |
|
|
|
| 252 |
|
|
<listitem>
|
| 253 |
|
|
<formalpara>
|
| 254 |
|
|
<title>Priority</title>
|
| 255 |
|
|
<para>Should be <quote>optional</quote> unless forbidden by the Debian policy (see section 2.5). Packages of priority <quote>extra</quote> are excluded from some QA tests.</para>
|
| 256 |
|
|
</formalpara>
|
| 257 |
|
|
</listitem>
|
| 258 |
|
|
|
| 259 |
|
|
<listitem>
|
| 260 |
|
|
<formalpara>
|
| 261 |
|
|
<title>Maintainer</title>
|
| 262 |
tille |
3777 |
<para>Maintainer should be Debian Med Packaging Team <email>debian-med-packaging@lists.alioth.debian.org</email>. Please subscribe to this list if you list yourself in the <code>Uploaders:</code> field of one of Debian Med's packages. You can refer to the <ulink url="http://qa.debian.org/developer.php?login=debian-med-packaging@lists.alioth.debian.org">QA page</ulink> corresponding to this email to gather information about the packages.</para>
|
| 263 |
plessy |
1847 |
</formalpara>
|
| 264 |
|
|
</listitem>
|
| 265 |
|
|
|
| 266 |
|
|
<listitem>
|
| 267 |
|
|
<formalpara>
|
| 268 |
|
|
<title>Upload by Debian Maintainers</title>
|
| 269 |
|
|
<para>Should be enabled with the field <code>DM-Upload-Allowed: yes</code>. This means that when an Uploader becomes Debian Maintainer, he will immediately get the possibility to upload the package to Debian. Please consider this when you sponsor packages in which some Uploaders are added.</para>
|
| 270 |
|
|
</formalpara>
|
| 271 |
|
|
</listitem>
|
| 272 |
|
|
|
| 273 |
|
|
<listitem>
|
| 274 |
|
|
<formalpara>
|
| 275 |
|
|
<title>Uploaders</title>
|
| 276 |
|
|
<para>Please add yourelf as an uploader when you have a significant interest in a package. Being Uploader means that you are expected to answer to the bug reports. It is totally acceptable to do some QA work on a package without adding oneself to the Uploaders field.
|
| 277 |
|
|
</para>
|
| 278 |
|
|
</formalpara>
|
| 279 |
|
|
</listitem>
|
| 280 |
|
|
|
| 281 |
|
|
<listitem>
|
| 282 |
|
|
<formalpara>
|
| 283 |
|
|
<title>Standards-Version</title>
|
| 284 |
|
|
<para>Please always use the latest unless there are concerns for backporting. If no changes are needed, please indicate this fact in the changelog, and increment the value of the field.</para>
|
| 285 |
|
|
</formalpara>
|
| 286 |
|
|
</listitem>
|
| 287 |
|
|
|
| 288 |
|
|
<listitem>
|
| 289 |
|
|
<formalpara>
|
| 290 |
|
|
<title>Homepage</title>
|
| 291 |
|
|
<para>should be documented whenever possible</para>
|
| 292 |
|
|
</formalpara>
|
| 293 |
|
|
</listitem>
|
| 294 |
|
|
|
| 295 |
|
|
<listitem>
|
| 296 |
|
|
<formalpara>
|
| 297 |
|
|
<title>Vcs-Svn: and Vcs-Browser:</title>
|
| 298 |
plessy |
4307 |
<para>Please use the following templates:
|
| 299 |
plessy |
1847 |
<programlisting>
|
| 300 |
hanska-guest |
1277 |
Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/<package>/trunk/
|
| 301 |
|
|
Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/<package>/trunk/?rev=0&sc=0
|
| 302 |
plessy |
4307 |
</programlisting>or
|
| 303 |
|
|
<programlisting>
|
| 304 |
|
|
Vcs-Git: git://git.debian.org/git/debian-med/<package>.git
|
| 305 |
|
|
Vcs-Browser: http://git.debian.org/?p=debian-med/<package>.git
|
| 306 |
plessy |
1847 |
</programlisting>
|
| 307 |
plessy |
4304 |
</para>
|
| 308 |
plessy |
1847 |
</formalpara>
|
| 309 |
|
|
</listitem>
|
| 310 |
|
|
</orderedlist>
|
| 311 |
hanska-guest |
1277 |
</sect2>
|
| 312 |
plessy |
1847 |
|
| 313 |
plessy |
6306 |
<sect2 id="debian-copyright">
|
| 314 |
plessy |
1847 |
<title><filename>debian/copyright</filename></title>
|
| 315 |
plessy |
4825 |
<para>We use the <ulink url="http://wiki.debian.org/Proposals/CopyrightFormat">proposed machine-readable format</ulink> for the <filename>debian/copyright</filename> file. The <computeroutput>Source</computeroutput> field does not need to contain the full URL to the particular version that is being packaged, since this can be determined by the <command>uscan</command> program with the <filename>debian/watch</filename> file. Please list yourself in the <computeroutput>Files: debian/*</computeroutput> section if you think that your contributions are not trivial and therefore subjected to copyright. Please chose a license that is compatible with the program you package. You can also use <quote>same as if it were in the public domain</quote> or <quote>same as the packaged program itself</quote>.</para>
|
| 316 |
plessy |
1847 |
</sect2>
|
| 317 |
|
|
|
| 318 |
plessy |
6306 |
<sect2 id="debian-changelog">
|
| 319 |
plessy |
1847 |
<title><filename>debian/changelog</filename></title>
|
| 320 |
|
|
<para>Packages hosted in our Subversion repository, that have been modified but not uploaded must use <emphasis>UNRELEASED</emphasis> as a distribution name. This can be done automatically by declaring <emphasis>DEBCHANGE_RELEASE_HEURISTIC=changelog</emphasis> in <filename>~/.devscripts</filename> and using <command>dch</command>.</para>
|
| 321 |
|
|
</sect2>
|
| 322 |
plessy |
6306 |
<sect2 id="debian-readme-source">
|
| 323 |
plessy |
2667 |
<title><filename>debian/README.source</filename></title>
|
| 324 |
plessy |
2672 |
<para>This file is recommended by the Policy (<ulink url="http://www.debian.org/doc/debian-policy/ch-source.html#s-readmesource">§ 4.14</ulink>) from version 3.8.0 for documenting source package handling. Please follow the recommendation. For instance, this file is needed when we use a patch system, when the upstream sources are in another format than gzipped tar achive, when we repack the sources,…</para>
|
| 325 |
plessy |
2667 |
</sect2>
|
| 326 |
plessy |
1847 |
|
| 327 |
plessy |
6306 |
<sect2 id="debhelper">
|
| 328 |
plessy |
1847 |
<title>Debhelper</title>
|
| 329 |
tille |
5322 |
<para>Debhelper uses compatibility levels to control the behaviour of its commands. The latest level is not always available in <emphasis>Stable</emphasis> or <emphasis>Backports</emphasis>. Please avoid using it unless needed until it is available, to facilitate backporting. We currently recommend to use the level <emphasis>7</emphasis>.</para>
|
| 330 |
plessy |
1847 |
</sect2>
|
| 331 |
|
|
|
| 332 |
plessy |
6306 |
<sect2 id="cdbs">
|
| 333 |
plessy |
1847 |
<title>CDBS</title>
|
| 334 |
tille |
5212 |
<para>The use of CDBS is welcome as it helps us to factorise our code. Nevertheless, please do not use complex CDBS for non-trivial packages, so that other developers can quickly understand the package when doing QA work.</para>
|
| 335 |
plessy |
1847 |
<para>It is technically possible to build CDBS packages using Debhelper without the <filename>debian/compat</filename> file. Please do not, and always include such a file according to the above guidelines.</para>
|
| 336 |
|
|
</sect2>
|
| 337 |
|
|
|
| 338 |
plessy |
6306 |
<sect2 id="new-package">
|
| 339 |
hanska-guest |
1277 |
<title>Injecting a new package</title>
|
| 340 |
plessy |
6306 |
<sect3 id="svn-inject">
|
| 341 |
hanska-guest |
4323 |
<title>Subversion</title>
|
| 342 |
hanska-guest |
1277 |
<para>To inject a new package to the SVN repository, you must have
|
| 343 |
plessy |
1847 |
write access to it; i.e. you must be a member of the <emphasis>debian-med</emphasis> group on Alioth.</para>
|
| 344 |
hanska-guest |
1277 |
<para>You can inject a new package only after successfully building
|
| 345 |
plessy |
1847 |
it with <command>dpkg-buildpackage</command> (or any wrapper around it). We use the MergeWithUpstream workflow, so please keep all the modifications in the <filename>debian</filename> directory, and use the <option>-o</option> of <command>svn-buildpackage</command>, as in the following example:</para>
|
| 346 |
hanska-guest |
1277 |
<blockquote>
|
| 347 |
|
|
<para><userinput>
|
| 348 |
|
|
<command>svn-inject</command>
|
| 349 |
plessy |
1847 |
<option>-o</option>
|
| 350 |
hanska-guest |
1277 |
<filename>package.dsc</filename>
|
| 351 |
|
|
<filename class="directory">svn+ssh://user@alioth.debian.org/svn/debian-med/trunk/packages/</filename>
|
| 352 |
|
|
</userinput></para>
|
| 353 |
|
|
</blockquote>
|
| 354 |
|
|
<para>The <command>svn-inject</command> command is found in the
|
| 355 |
|
|
<command>svn-buildpackage</command> package (just
|
| 356 |
|
|
<command>apt-get</command> it).</para>
|
| 357 |
|
|
<para>Once you injected a new package please make sure that it is
|
| 358 |
|
|
mentioned in the apropriate tasks file in the package source of the
|
| 359 |
tille |
3777 |
debian-med Blend package in SVN. Normally maintainer watch the changes in
|
| 360 |
|
|
the Debian Med packaging pool but it helps if the maintainer of a
|
| 361 |
hanska-guest |
1277 |
certain package verifies that everything is in the right place.</para>
|
| 362 |
hanska-guest |
4323 |
</sect3>
|
| 363 |
plessy |
6306 |
<sect3 id="new-git-repository">
|
| 364 |
hanska-guest |
4323 |
<title>Git</title>
|
| 365 |
plessy |
6306 |
<sect4 id="git-buildpackage">
|
| 366 |
hanska-guest |
4323 |
<title>Creating a local repository</title>
|
| 367 |
|
|
<para>Just a few instructions to get you started:</para>
|
| 368 |
|
|
<blockquote>
|
| 369 |
|
|
<para><userinput>
|
| 370 |
|
|
<command>mkdir</command>
|
| 371 |
|
|
<filename class="directory">package</filename>
|
| 372 |
|
|
</userinput></para>
|
| 373 |
|
|
<para><userinput>
|
| 374 |
|
|
<command>cd</command>
|
| 375 |
|
|
<filename class="directory">package</filename>
|
| 376 |
|
|
</userinput></para>
|
| 377 |
|
|
<para><userinput>
|
| 378 |
|
|
<command>git</command>
|
| 379 |
|
|
<option>init</option>
|
| 380 |
|
|
</userinput></para>
|
| 381 |
|
|
<para><userinput>
|
| 382 |
plessy |
6309 |
<command>git import-orig --pristine-tar</command>
|
| 383 |
hanska-guest |
4323 |
<filename>/path/to/package_version.orig.tar.gz</filename>
|
| 384 |
|
|
</userinput></para>
|
| 385 |
|
|
<para><userinput>
|
| 386 |
|
|
<command>dh_make</command>
|
| 387 |
|
|
<option>-p package_x.y.z</option>
|
| 388 |
|
|
</userinput></para>
|
| 389 |
|
|
</blockquote>
|
| 390 |
|
|
<para>The above steps will create a repository with the appropriate layout for
|
| 391 |
|
|
<command>git-buildpackage</command>, with three branches: <filename>master</filename>
|
| 392 |
|
|
(where the Debian development will happen), <filename>pristine-tar</filename>,
|
| 393 |
|
|
used by the <command>pristine-tar</command> tool during the package build process
|
| 394 |
|
|
to recreate the original tarball, and <filename>upstream</filename>, which will
|
| 395 |
|
|
contain the upstream source.</para>
|
| 396 |
|
|
<para>To display your name and more nicely in the Git log, you should instruct
|
| 397 |
|
|
Git to do so (the <option>--global</option> option is to say Git these are the
|
| 398 |
|
|
default parameters for every Git repository you commit to, without it the settings
|
| 399 |
|
|
will be per-repository only):</para>
|
| 400 |
|
|
<blockquote>
|
| 401 |
|
|
<para><userinput>
|
| 402 |
|
|
<command>git config</command>
|
| 403 |
|
|
<option>[--global]</option>
|
| 404 |
|
|
<option>user.name "$DEBFULLNAME"</option>
|
| 405 |
|
|
</userinput></para>
|
| 406 |
|
|
<para><userinput>
|
| 407 |
|
|
<command>git config</command>
|
| 408 |
|
|
<option>[--global]</option>
|
| 409 |
|
|
<option>user.email "$DEBEMAIL"</option>
|
| 410 |
|
|
</userinput></para>
|
| 411 |
|
|
</blockquote>
|
| 412 |
|
|
<para>After you create your <filename class="directory">debian/</filename> (be sure
|
| 413 |
|
|
to commit it!), you should add a <quote>remote</quote> to the repository. A remote is
|
| 414 |
|
|
where the commits will be pushed to, and the default remote is called <quote>origin</quote>.</para>
|
| 415 |
|
|
<para>If you are going to push to our Alioth repository, please do the following inside your
|
| 416 |
|
|
local repository:</para>
|
| 417 |
|
|
<blockquote>
|
| 418 |
|
|
<para><userinput>
|
| 419 |
|
|
<command>git remote add origin</command>
|
| 420 |
|
|
<filename class="directory">git+ssh://alioth.debian.org/git/debian-med/package.git</filename>
|
| 421 |
|
|
</userinput></para>
|
| 422 |
|
|
</blockquote>
|
| 423 |
|
|
<para>The next step is to create the remote repository on Alioth.</para>
|
| 424 |
|
|
</sect4>
|
| 425 |
plessy |
6306 |
<sect4 id="create-alioth-repository">
|
| 426 |
hanska-guest |
4323 |
<title>Creating the remote repository</title>
|
| 427 |
|
|
<blockquote>
|
| 428 |
|
|
<para><userinput>
|
| 429 |
|
|
<command>ssh</command>
|
| 430 |
|
|
<filename class="directory">alioth.debian.org</filename>
|
| 431 |
|
|
</userinput></para>
|
| 432 |
|
|
<para><userinput>
|
| 433 |
|
|
<command>cd</command>
|
| 434 |
|
|
<filename class="directory">/git/debian-med</filename>
|
| 435 |
|
|
</userinput></para>
|
| 436 |
|
|
<para><userinput>
|
| 437 |
|
|
<command>./setup-repository</command>
|
| 438 |
|
|
<option>packagename</option>
|
| 439 |
|
|
<option>"Description of the package"</option>
|
| 440 |
|
|
</userinput></para>
|
| 441 |
|
|
</blockquote>
|
| 442 |
|
|
<para>This will create a <filename class="directory">packagename.git</filename> repository on
|
| 443 |
|
|
Alioth, with the proper hooks set up for our team.</para>
|
| 444 |
|
|
</sect4>
|
| 445 |
plessy |
6306 |
<sect4 id="push-package-to-alioth">
|
| 446 |
hanska-guest |
4323 |
<title>Pushing the package</title>
|
| 447 |
|
|
<para>To push the package (make sure you've added the alioth remote!), do the following:</para>
|
| 448 |
|
|
<blockquote>
|
| 449 |
|
|
<para><userinput>
|
| 450 |
|
|
<command>git push origin master</command>
|
| 451 |
|
|
</userinput></para>
|
| 452 |
|
|
<para><userinput>
|
| 453 |
|
|
<command>git push</command>
|
| 454 |
|
|
<option>--all</option>
|
| 455 |
|
|
</userinput></para>
|
| 456 |
|
|
<para><userinput>
|
| 457 |
|
|
<command>git push</command>
|
| 458 |
|
|
<option>--tags</option>
|
| 459 |
|
|
</userinput></para>
|
| 460 |
|
|
</blockquote>
|
| 461 |
|
|
<para>For the first push, it's necessary to specify <quote>origin master</quote>. The next time
|
| 462 |
|
|
you will push, a <command>git push</command> will suffice. Remember that this will only push the
|
| 463 |
|
|
<quote>master</quote> branch (and the other two only if master is somehow related to the new
|
| 464 |
|
|
branches), so be sure to also do a run with <option>--all</option>, and one with
|
| 465 |
|
|
<option>--tags</option> (if you obviously changed anything in the other branches/tags).</para>
|
| 466 |
|
|
</sect4>
|
| 467 |
|
|
</sect3>
|
| 468 |
|
|
</sect2>
|
| 469 |
plessy |
6306 |
<sect2 id="building-and-tagging">
|
| 470 |
plessy |
4825 |
<title>Building and tagging the packages</title>
|
| 471 |
plessy |
6306 |
<sect3 id="building">
|
| 472 |
hanska-guest |
1277 |
<title>Building the packages</title>
|
| 473 |
plessy |
6306 |
<sect4 id="building-subversion">
|
| 474 |
hanska-guest |
4323 |
<title>Subversion</title>
|
| 475 |
hanska-guest |
1277 |
<para>To build the package, just use the tools that <command>svn-buildpackage</command>
|
| 476 |
|
|
carries. First of all, we suggest you to define some aliases for the
|
| 477 |
|
|
most common commands:</para>
|
| 478 |
|
|
<blockquote>
|
| 479 |
|
|
<programlisting>alias svn-b='svn-buildpackage -us -uc -rfakeroot --svn-ignore'
|
| 480 |
|
|
alias svn-br='svn-b --svn-dont-purge --svn-reuse'
|
| 481 |
|
|
alias svn-bt='svn-buildpackage --svn-tag -rfakeroot'</programlisting>
|
| 482 |
|
|
</blockquote>
|
| 483 |
|
|
<para>Checkout the sources (see the proper section).</para>
|
| 484 |
|
|
<para>Once done, you're ready to do the work. First, cd to the trunk
|
| 485 |
|
|
directory, and download the upstream sources (if there is a
|
| 486 |
|
|
<filename>debian/watch</filename> file):</para>
|
| 487 |
|
|
<blockquote>
|
| 488 |
|
|
<para><userinput>
|
| 489 |
|
|
<command>echo "origDir=.." >> .svn/deb-layout && uscan --force-download</command>
|
| 490 |
|
|
</userinput></para>
|
| 491 |
|
|
</blockquote>
|
| 492 |
|
|
<para>Alternatively, you can try this, it depends on how the package
|
| 493 |
|
|
was built (again, from the <filename class="directory">trunk/</filename> directory):</para>
|
| 494 |
|
|
<blockquote>
|
| 495 |
|
|
<para><userinput>
|
| 496 |
|
|
<command>debian/rules get-orig-source</command>
|
| 497 |
|
|
</userinput></para>
|
| 498 |
|
|
</blockquote>
|
| 499 |
|
|
<para>Once done, edit the files you need, and then build the package with
|
| 500 |
|
|
<command>svn-b</command> or <command>svn-br</command>.</para>
|
| 501 |
tille |
3777 |
<para>If you're a Debian Med member, you can commit your changes:</para>
|
| 502 |
hanska-guest |
1277 |
<blockquote>
|
| 503 |
|
|
<para><userinput>
|
| 504 |
|
|
<command>svn commit</command>
|
| 505 |
|
|
</userinput></para>
|
| 506 |
|
|
</blockquote>
|
| 507 |
|
|
<para>(also <command>svn ci</command>).</para>
|
| 508 |
|
|
<para>Otherwise, you can ask to be added to the group (see the Membership
|
| 509 |
|
|
section), or send the result of svn diff to the
|
| 510 |
plessy |
1847 |
<ulink url="mailto:debian-med@lists.debian.org">mailing list</ulink>
|
| 511 |
hanska-guest |
1277 |
(<command>gzip -9</command> it, if it's too large).</para>
|
| 512 |
hanska-guest |
4323 |
</sect4>
|
| 513 |
plessy |
6306 |
<sect4 id="building-git">
|
| 514 |
hanska-guest |
4323 |
<title>Git</title>
|
| 515 |
|
|
<para>You should use <command>git-buildpackage</command> to build the
|
| 516 |
|
|
packages with git. Be sure to run it from the <quote>master</quote>
|
| 517 |
|
|
branch.</para>
|
| 518 |
|
|
<para>Unfortunately, by default <command>git-buildpackage</command>
|
| 519 |
|
|
builds the package without using any chroot (the same as
|
| 520 |
|
|
<command>svn-buildpackage</command>), but it's configurable to run
|
| 521 |
|
|
it inside a chroot.</para>
|
| 522 |
|
|
<para>You can use this configuration file, <filename>~/.gbp.conf</filename>:</para>
|
| 523 |
|
|
<blockquote>
|
| 524 |
|
|
<programlisting>[DEFAULT]
|
| 525 |
|
|
builder = ~/bin/git-pbuilder
|
| 526 |
|
|
cleaner = fakeroot debian/rules clean
|
| 527 |
|
|
pristine-tar = True
|
| 528 |
|
|
|
| 529 |
|
|
[git-buildpackage]
|
| 530 |
|
|
# use this for more svn-buildpackage like behaviour:
|
| 531 |
|
|
export-dir = ../build-area/
|
| 532 |
|
|
tarball-dir = ../tarballs/</programlisting>
|
| 533 |
|
|
</blockquote>
|
| 534 |
|
|
<para>With this configuration file you're specifying that
|
| 535 |
|
|
<command>git-buildpackage</command> will use <filename>~/bin/git-pbuilder</filename>
|
| 536 |
|
|
as the builder script. This is an example script you can use:</para>
|
| 537 |
|
|
<blockquote>
|
| 538 |
|
|
<programlisting>#!/bin/sh
|
| 539 |
|
|
set -e
|
| 540 |
|
|
|
| 541 |
|
|
pdebuild --pbuilder cowbuilder --debbuildopts "-i\.git -I.git $*"
|
| 542 |
|
|
rm ../*_source.changes</programlisting>
|
| 543 |
|
|
</blockquote>
|
| 544 |
|
|
<para>This will build the package inside the default cowbuilder chroot, while
|
| 545 |
|
|
passing any more parameters directly do <command>dpkg-buildpackage</command>.</para>
|
| 546 |
|
|
</sect4>
|
| 547 |
|
|
</sect3>
|
| 548 |
plessy |
6306 |
<sect3 id="tagging">
|
| 549 |
hanska-guest |
1277 |
<title>Tagging packages</title>
|
| 550 |
plessy |
6306 |
<sect4 id="tagging-subversion">
|
| 551 |
hanska-guest |
4323 |
<title>Subversion</title>
|
| 552 |
hanska-guest |
1277 |
<para>It may happen that a package version has been uploaded to Debian
|
| 553 |
|
|
repositories, and you forgot to tag the last build with</para>
|
| 554 |
|
|
<blockquote>
|
| 555 |
|
|
<para><userinput>
|
| 556 |
|
|
<command>svn-buildpackage --svn-tag</command>
|
| 557 |
|
|
</userinput></para>
|
| 558 |
|
|
</blockquote>
|
| 559 |
|
|
<para>
|
| 560 |
|
|
You can tag this package also retroactively. A first step, creating
|
| 561 |
|
|
the tags directory, can be achieved in two ways:
|
| 562 |
|
|
<itemizedlist>
|
| 563 |
|
|
<listitem>
|
| 564 |
|
|
<para>create it locally (it is a sibling of <filename class="directory">trunk/</filename>), and commit:</para>
|
| 565 |
|
|
<blockquote>
|
| 566 |
|
|
<para><userinput>
|
| 567 |
|
|
<command>svn mkdir</command> <filename class="directory">tags</filename>
|
| 568 |
|
|
</userinput></para>
|
| 569 |
|
|
<para><userinput>
|
| 570 |
|
|
<command>svn commit</command>
|
| 571 |
|
|
</userinput></para>
|
| 572 |
|
|
</blockquote>
|
| 573 |
|
|
</listitem>
|
| 574 |
|
|
<listitem>
|
| 575 |
|
|
<para>create it remotely:</para>
|
| 576 |
|
|
<blockquote>
|
| 577 |
|
|
<para><userinput>
|
| 578 |
|
|
<command>svn mkdir</command> <filename class="directory">svn+ssh://user@svn.debian.org/svn/debian-med/trunk/packages/<package>/tags</filename>
|
| 579 |
|
|
</userinput></para>
|
| 580 |
|
|
</blockquote>
|
| 581 |
|
|
</listitem>
|
| 582 |
|
|
</itemizedlist>
|
| 583 |
|
|
</para>
|
| 584 |
|
|
<para>After the tags directory has been created, you're ready to tag the
|
| 585 |
|
|
package:</para>
|
| 586 |
|
|
<blockquote>
|
| 587 |
|
|
<para><userinput>
|
| 588 |
|
|
<command>svn-buildpackage --svn-tag-only --svn-no-autodch</command>
|
| 589 |
|
|
</userinput></para>
|
| 590 |
|
|
</blockquote>
|
| 591 |
|
|
<para>(--svn-no-autodch avoids <filename>debian/changelog</filename> to be marked as UNRELEASED).</para>
|
| 592 |
hanska-guest |
4323 |
</sect4>
|
| 593 |
plessy |
6306 |
<sect4 id="tagging-git">
|
| 594 |
hanska-guest |
4323 |
<title>Git</title>
|
| 595 |
|
|
<para>Tagging a release with git is pretty straightforward:</para>
|
| 596 |
|
|
<blockquote>
|
| 597 |
|
|
<para><userinput>
|
| 598 |
|
|
<command>git tag</command>
|
| 599 |
|
|
<option>tagname</option>
|
| 600 |
|
|
</userinput></para>
|
| 601 |
|
|
</blockquote>
|
| 602 |
|
|
<para>The tag names usually follow the scheme <quote>debian/x.y-z</quote>,
|
| 603 |
|
|
this will ensure compatibility with other tools as well (like
|
| 604 |
|
|
<command>git import-dsc</command>).</para>
|
| 605 |
|
|
<para>You can also easily retroactively make tags:</para>
|
| 606 |
|
|
<blockquote>
|
| 607 |
|
|
<para><userinput>
|
| 608 |
|
|
<command>git checkout</command>
|
| 609 |
|
|
<option><commit hash></option>
|
| 610 |
|
|
</userinput></para>
|
| 611 |
|
|
</blockquote>
|
| 612 |
|
|
<para>You're now at the point in history when you released the package.
|
| 613 |
|
|
Just tag it as you would normally do.</para>
|
| 614 |
|
|
<para>After tagging, be sure to <command>git push --tags</command>, so that
|
| 615 |
|
|
other people can benefit from it too.</para>
|
| 616 |
|
|
</sect4>
|
| 617 |
|
|
</sect3>
|
| 618 |
hanska-guest |
1277 |
</sect2>
|
| 619 |
plessy |
6306 |
<sect2 id="patches">
|
| 620 |
hanska-guest |
1277 |
<title>Handling patches</title>
|
| 621 |
|
|
<para>Often happens that the upstream code doesn't fit well into the
|
| 622 |
|
|
Debian distribution: be this wrong paths, missing features, anything
|
| 623 |
|
|
that implies editing the source files. When you directly edit
|
| 624 |
|
|
upstream's source files, your changes will be put into a .diff.gz file,
|
| 625 |
plessy |
1847 |
which should instead contain only debian. To better organise the patches and group the by function, please use a patch handling system which keeps patches under the
|
| 626 |
|
|
<filename class="directory">debian/patches</filename> directory.</para>
|
| 627 |
|
|
<para>The most known are <command>quilt</command>, <emphasis>simple-patchsys</emphasis> (from the <emphasis>CDBS</emphasis> package) and <command>dpatch</command>.
|
| 628 |
tille |
3777 |
Please don't use any other patch system in Debian Med, unless absolutely
|
| 629 |
hanska-guest |
1277 |
necessary.</para>
|
| 630 |
plessy |
6306 |
<sect3 id="quilt">
|
| 631 |
hanska-guest |
1277 |
<title>Using <command>quilt</command></title>
|
| 632 |
|
|
<para>Using quilt is rather easy.</para>
|
| 633 |
|
|
<para>First, make sure you have correctly setup quilt: open
|
| 634 |
|
|
<filename>.quiltrc</filename> in your home directory (create
|
| 635 |
|
|
it if you don't have one), and make sure it looks like this:</para>
|
| 636 |
|
|
<blockquote>
|
| 637 |
|
|
<programlisting>QUILT_DIFF_ARGS="--no-timestamps --no-index"
|
| 638 |
|
|
QUILT_REFRESH_ARGS="--no-timestamps --no-index"
|
| 639 |
|
|
QUILT_PATCHES="debian/patches"</programlisting>
|
| 640 |
|
|
</blockquote>
|
| 641 |
|
|
<para>After this, you're ready to start working with quilt.</para>
|
| 642 |
plessy |
6306 |
<sect4 id="quilt-create">
|
| 643 |
hanska-guest |
1277 |
<title>Creating a patch</title>
|
| 644 |
|
|
<para>To create a patch, use the <command>new</command> command.
|
| 645 |
|
|
Run:</para>
|
| 646 |
|
|
<blockquote>
|
| 647 |
|
|
<para><userinput>
|
| 648 |
|
|
<command>quilt new</command> <filename><patch_name>.patch</filename>
|
| 649 |
|
|
</userinput></para>
|
| 650 |
|
|
</blockquote>
|
| 651 |
|
|
<para>This will create (if it doesn't exist yet) a
|
| 652 |
|
|
<filename>debian/patches/series</filename> file, which
|
| 653 |
|
|
contains all the patches to be applied by quilt. Moreover,
|
| 654 |
|
|
the new patch is also the topmost (the currently
|
| 655 |
|
|
applied).</para>
|
| 656 |
|
|
<para>Now start editing files, with:</para>
|
| 657 |
|
|
<blockquote>
|
| 658 |
|
|
<para><userinput>
|
| 659 |
|
|
<command>quilt edit</command> <filename><file></filename>
|
| 660 |
|
|
</userinput></para>
|
| 661 |
|
|
</blockquote>
|
| 662 |
|
|
<para>and repeat the process for each file the patch is
|
| 663 |
|
|
involved with. At the end, run</para>
|
| 664 |
|
|
<blockquote>
|
| 665 |
|
|
<para><userinput>
|
| 666 |
|
|
<command>quilt refresh</command>
|
| 667 |
|
|
</userinput></para>
|
| 668 |
|
|
</blockquote>
|
| 669 |
|
|
<para>This will compare the noted state of the edited files
|
| 670 |
|
|
with the current state, and will produce a patch in
|
| 671 |
|
|
<filename>debian/patches</filename>. Remember: the patch
|
| 672 |
|
|
is currently applied (you can check this with
|
| 673 |
|
|
<command>quilt applied</command>).</para>
|
| 674 |
|
|
</sect4>
|
| 675 |
plessy |
6306 |
<sect4 id="quilt-apply">
|
| 676 |
hanska-guest |
1277 |
<title>Applying and unapplying patches</title>
|
| 677 |
|
|
<para>Just two easy commands to do the job:</para>
|
| 678 |
|
|
<itemizedlist>
|
| 679 |
|
|
<listitem><para><command>quilt pop</command> will unapply the topmost patch.</para></listitem>
|
| 680 |
|
|
<listitem><para><command>quilt push</command> will apply the next patch in debian/patches/series.</para></listitem>
|
| 681 |
|
|
</itemizedlist>
|
| 682 |
|
|
<para>You can just add a "-a" flag to the commands above, to
|
| 683 |
|
|
respectively apply/unapply all patches in the series.</para>
|
| 684 |
|
|
<tip>
|
| 685 |
|
|
<para>You can check which patches are applied/unapplied
|
| 686 |
|
|
with, respectively, <command>quilt applied</command> and
|
| 687 |
|
|
<command>quilt unapplied</command>.</para>
|
| 688 |
|
|
</tip>
|
| 689 |
|
|
</sect4>
|
| 690 |
plessy |
6306 |
<sect4 id="quilt-edit">
|
| 691 |
hanska-guest |
1277 |
<title>Editing patches</title>
|
| 692 |
|
|
<para>To edit a patch, first make it the topmost:</para>
|
| 693 |
|
|
<blockquote>
|
| 694 |
|
|
<para><userinput>
|
| 695 |
|
|
<command>quilt push</command> <filename><patch_name></filename>
|
| 696 |
|
|
</userinput></para>
|
| 697 |
|
|
</blockquote>
|
| 698 |
|
|
<para>If the patch is already applied, but is not the topmost,
|
| 699 |
|
|
run <command>quilt pop</command> until it becomes the currently
|
| 700 |
|
|
applied one.</para>
|
| 701 |
|
|
<para>You can now run <command>quilt edit</command> on the files
|
| 702 |
|
|
you want to change, and, when you're done, <command>quilt
|
| 703 |
|
|
refresh</command>.</para>
|
| 704 |
|
|
</sect4>
|
| 705 |
plessy |
6306 |
<sect4 id="quilt-rename">
|
| 706 |
hanska-guest |
1277 |
<title>Renaming patches</title>
|
| 707 |
|
|
<para>Sometimes it's useful to rename a patch. Without
|
| 708 |
|
|
any hassle, do:</para>
|
| 709 |
|
|
<blockquote>
|
| 710 |
|
|
<para><userinput>
|
| 711 |
|
|
<command>quilt rename -P</command> <filename><old_name>.patch</filename>
|
| 712 |
|
|
<filename><new_name>.patch</filename>
|
| 713 |
|
|
</userinput></para>
|
| 714 |
|
|
</blockquote>
|
| 715 |
|
|
</sect4>
|
| 716 |
plessy |
6306 |
<sect4 id="quilt-other">
|
| 717 |
hanska-guest |
1277 |
<title>Other commands</title>
|
| 718 |
|
|
<para>Please see <command>man 1 quilt</command> to have a
|
| 719 |
|
|
comprehensive list of commands.</para>
|
| 720 |
|
|
</sect4>
|
| 721 |
plessy |
6306 |
<sect4 id="quilt-integration">
|
| 722 |
hanska-guest |
1277 |
<title>Integration in the build process</title>
|
| 723 |
|
|
<para>Add in the very first part of <filename>debian/rules</filename>
|
| 724 |
|
|
(i.e. before the targets), the line:</para>
|
| 725 |
|
|
<blockquote>
|
| 726 |
|
|
<programlisting>include <filename class="headerfile">/usr/share/quilt/quilt.make</filename></programlisting>
|
| 727 |
|
|
</blockquote>
|
| 728 |
plessy |
1847 |
<para>Please use this to import patch and unpatch rules instead of writing them, and remember to add the needed dependencies to its
|
| 729 |
hanska-guest |
1277 |
targets:</para>
|
| 730 |
|
|
<blockquote>
|
| 731 |
|
|
<programlisting>...
|
| 732 |
|
|
build: patch build-stamp
|
| 733 |
|
|
build-stamp: configure
|
| 734 |
|
|
...</programlisting>
|
| 735 |
|
|
</blockquote>
|
| 736 |
|
|
<para>This kind of dependency will ensure that if you also
|
| 737 |
|
|
patch the build system, you get a working patched build
|
| 738 |
|
|
process.</para>
|
| 739 |
|
|
<caution>
|
| 740 |
|
|
<para>Don't also put configure as a dependency of
|
| 741 |
|
|
build (leave it in build-stamp): that may cause problems
|
| 742 |
|
|
during parallel buildings (i.e. the -j flag of make).</para>
|
| 743 |
|
|
</caution>
|
| 744 |
|
|
<para>Now add a dependency to the clean target:</para>
|
| 745 |
|
|
<blockquote>
|
| 746 |
|
|
<programlisting>...
|
| 747 |
|
|
clean: unpatch
|
| 748 |
|
|
...</programlisting>
|
| 749 |
|
|
</blockquote>
|
| 750 |
|
|
<para>If you've also patched the build system, using upstream's
|
| 751 |
|
|
clean target might fail. This is what you should do:</para>
|
| 752 |
|
|
<blockquote>
|
| 753 |
|
|
<programlisting>...
|
| 754 |
|
|
clean: clean-patched unpatch
|
| 755 |
|
|
clean-patched:
|
| 756 |
|
|
...</programlisting>
|
| 757 |
|
|
</blockquote>
|
| 758 |
|
|
<para>Obviously, you could always use an approach like this,
|
| 759 |
|
|
but it's an useless complication if you don't patch the build
|
| 760 |
|
|
system, and you should keep <filename>debian/rules</filename>
|
| 761 |
|
|
the simplest you can.</para>
|
| 762 |
|
|
</sect4>
|
| 763 |
|
|
</sect3>
|
| 764 |
plessy |
6306 |
<sect3 id="dpatch">
|
| 765 |
hanska-guest |
1277 |
<title>Using <command>dpatch</command></title>
|
| 766 |
plessy |
6306 |
<sect4 id="dpatch-create-patch">
|
| 767 |
hanska-guest |
1277 |
<title>Creating a patch</title>
|
| 768 |
|
|
<para>dpatch-edit-patch</para>
|
| 769 |
|
|
</sect4>
|
| 770 |
plessy |
6306 |
<sect4 id="dpatch-apply-unapply">
|
| 771 |
hanska-guest |
1277 |
<title>Applying and unapplying patches</title>
|
| 772 |
|
|
<para>apply(-all), unapply(-all), status</para>
|
| 773 |
|
|
</sect4>
|
| 774 |
plessy |
6306 |
<sect4 id="dpatch-edit-patch">
|
| 775 |
hanska-guest |
1277 |
<title>Editing patches</title>
|
| 776 |
|
|
<para>dpatch-edit-patch</para>
|
| 777 |
|
|
</sect4>
|
| 778 |
plessy |
6306 |
<sect4 id="dpatch-rename-patch">
|
| 779 |
hanska-guest |
1277 |
<title>Renaming patches</title>
|
| 780 |
|
|
<para>Is this possible?</para>
|
| 781 |
|
|
</sect4>
|
| 782 |
plessy |
6306 |
<sect4 id="dpatch-other">
|
| 783 |
hanska-guest |
1277 |
<title>Other commands</title>
|
| 784 |
|
|
<para>Please see <command>man 1 dpatch</command> for a
|
| 785 |
|
|
comprehensive list of commands.</para>
|
| 786 |
|
|
</sect4>
|
| 787 |
plessy |
6306 |
<sect4 id="dpatch-integration">
|
| 788 |
hanska-guest |
1277 |
<title>Integration in the build process</title>
|
| 789 |
|
|
<para>Follow the instructions for quilt and adapt the path of
|
| 790 |
|
|
inclusion to <filename class="headerfile">/usr/share/dpatch/dpatch.make</filename></para>
|
| 791 |
|
|
</sect4>
|
| 792 |
|
|
</sect3>
|
| 793 |
|
|
</sect2>
|
| 794 |
|
|
</sect1>
|
| 795 |
|
|
</article>
|