| 1 |
hanska-guest |
1277 |
<?xml version="1.0"?>
|
| 2 |
|
|
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V5.0CR7//EN" "http://www.docbook.org/xml/5.0CR7/dtd/docbook.dtd">
|
| 3 |
|
|
<article xmlns="http://docbook.org/ns/docbook" xml:base="http://debian-med.alioth.debian.org/">
|
| 4 |
|
|
<title>Debian-Med Group Policy</title>
|
| 5 |
|
|
<info>
|
| 6 |
|
|
<authorgroup>
|
| 7 |
|
|
<author>
|
| 8 |
hanska-guest |
1280 |
<personname>Andreas Tille</personname>
|
| 9 |
hanska-guest |
1277 |
<email>tille@debian.org</email>
|
| 10 |
hanska-guest |
1284 |
<contrib>First review </contrib>
|
| 11 |
hanska-guest |
1277 |
</author>
|
| 12 |
|
|
<author>
|
| 13 |
|
|
<personname>David Paleino</personname>
|
| 14 |
|
|
<email>d.paleino@gmail.com</email>
|
| 15 |
hanska-guest |
1284 |
<contrib>Initial writing </contrib>
|
| 16 |
hanska-guest |
1277 |
</author>
|
| 17 |
|
|
</authorgroup>
|
| 18 |
|
|
<releaseinfo>
|
| 19 |
|
|
$ policy.xml rev. @REV@ - @DATE@ (@AUTHOR@) $
|
| 20 |
|
|
</releaseinfo>
|
| 21 |
|
|
</info>
|
| 22 |
|
|
<mediaobject>
|
| 23 |
|
|
<imageobject>
|
| 24 |
|
|
<imagedata fileref="/img/debian-med.jpg" format="JPG" align="center" />
|
| 25 |
|
|
</imageobject>
|
| 26 |
|
|
</mediaobject>
|
| 27 |
|
|
<sect1>
|
| 28 |
|
|
<title>Introduction</title>
|
| 29 |
|
|
<para>Debian-Med is a "<link xlink:href="http://people.debian.org/~tille/cdd">Custom Debian Distribution</link>"
|
| 30 |
|
|
with the aim to develop Debian into an operating system that is particularly
|
| 31 |
|
|
well fit for the requirements for medical practice and research.</para>
|
| 32 |
|
|
<para>The Debian-Med project presents packages that are associated
|
| 33 |
|
|
with medicine, pre-clinical research, and life sciences. Its developments
|
| 34 |
|
|
are mostly focused on three areas for the moment: medical practice,
|
| 35 |
|
|
imaging and bioinformatics.</para>
|
| 36 |
|
|
<para>Over the previous years, several initiatives have spawned that
|
| 37 |
|
|
address the scientific disciplines like chemistry or bioinformatics.
|
| 38 |
|
|
Debian-Med is not a competition to these efforts but a platform to
|
| 39 |
|
|
present the packages to the community as a Custom Debian Distribution.</para>
|
| 40 |
|
|
</sect1>
|
| 41 |
|
|
<sect1>
|
| 42 |
|
|
<title>How to Contribute</title>
|
| 43 |
|
|
<para>From the developer to the user, there is a long chain of tasks
|
| 44 |
|
|
in which we always welcome participation. First we must keep ourselves
|
| 45 |
|
|
informed about the software landscape in biology and medicine. Software
|
| 46 |
|
|
to be packaged is chosen according to criteria such as users' need and
|
| 47 |
|
|
the consistency of the distribution.</para>
|
| 48 |
|
|
<para>Once in Debian, the software is monitored for its quality and bugs
|
| 49 |
|
|
are fixed, if possible in collaboration with the upstream maintainer(s).
|
| 50 |
|
|
All this work would not be very useful if it remains confidential.</para>
|
| 51 |
|
|
<para>We also dedicate some time to advertise it to the world via
|
| 52 |
|
|
<link xlink:href="http://www.debian.org">www.debian.org</link>
|
| 53 |
|
|
and to ease the integration of new members.</para>
|
| 54 |
|
|
<para>Please contact us on <link xlink:href="mailto:debian-med@lists.debian.org">debian-med@lists.debian.org</link>
|
| 55 |
|
|
if you want to help to make medical and biological software available
|
| 56 |
|
|
to Debian users. Read the <link>Membership</link> section if you're
|
| 57 |
|
|
interested in joining us.</para>
|
| 58 |
|
|
<para>If you speak a language other than English, you can contribute
|
| 59 |
|
|
rightaway with translations of package descriptions at
|
| 60 |
|
|
<link xlink:href="http://ddtp.debian.org">ddtp.debian.org</link>.</para>
|
| 61 |
|
|
<para>When working on these, you will find immediate targets for improvements
|
| 62 |
|
|
of the original English versions, too. For these, though, you need access
|
| 63 |
|
|
to Debian-Med's source code repository. Very welcome are tutorials that
|
| 64 |
|
|
guide Debian users towards the use of packages to their immediate benefit.
|
| 65 |
|
|
You may also consider to write respective articles for Magazines, be they
|
| 66 |
|
|
online or in print.</para>
|
| 67 |
|
|
<sect2>
|
| 68 |
|
|
<title>Membership</title>
|
| 69 |
|
|
<para>To request membership to this group, please go on our
|
| 70 |
|
|
<link xlink:href="http://alioth.debian.org/projects/debian-med">Alioth page</link>,
|
| 71 |
|
|
or directly follow this <link xlink:href="http://alioth.debian.org/project/request.php?group_id=30063">link</link>.
|
| 72 |
|
|
Remember that you must have an Alioth account before requesting
|
| 73 |
|
|
membership (see <link xlink:href="http://alioth.debian.org/account/register.php">here</link>
|
| 74 |
|
|
to request an Alioth account).</para>
|
| 75 |
|
|
</sect2>
|
| 76 |
|
|
</sect1>
|
| 77 |
|
|
<sect1>
|
| 78 |
|
|
<title>Subversion</title>
|
| 79 |
|
|
<para>Our Subversion (SVN) repository is currently hosted on
|
| 80 |
|
|
<link xlink:href="http://alioth.debian.org/">Alioth</link>, the hosting
|
| 81 |
|
|
facility provided by Debian to free software developers. You can have a look at
|
| 82 |
|
|
the repository through Alioth's <link xlink:href="http://svn.debian.org/wsvn/debian-med/trunk/?rev=0&sc=0">web</link>
|
| 83 |
|
|
<link xlink:href="http://svn.debian.org/viewsvn/debian-med">interfaces</link>.</para>
|
| 84 |
|
|
<sect2>
|
| 85 |
|
|
<title>Give me the source!</title>
|
| 86 |
|
|
<para>
|
| 87 |
|
|
To check sources out from SVN, please do:
|
| 88 |
|
|
<itemizedlist>
|
| 89 |
|
|
<listitem>
|
| 90 |
|
|
<para>if you are a member of Debian-Med:</para>
|
| 91 |
|
|
<blockquote>
|
| 92 |
|
|
<para><userinput>
|
| 93 |
|
|
<command>svn co</command> <filename class="directory">svn+ssh://user@alioth.debian.org/svn/debian-med/trunk/...</filename>
|
| 94 |
|
|
</userinput></para>
|
| 95 |
|
|
</blockquote>
|
| 96 |
|
|
</listitem>
|
| 97 |
|
|
<listitem>
|
| 98 |
|
|
<para>if you are NOT a member of Debian-Med:</para>
|
| 99 |
|
|
<blockquote>
|
| 100 |
|
|
<para><userinput>
|
| 101 |
|
|
<command>svn co</command> <filename class="directory">svn://svn.debian.org/svn/debian-med/trunk/...</filename>
|
| 102 |
|
|
</userinput></para>
|
| 103 |
|
|
</blockquote>
|
| 104 |
|
|
</listitem>
|
| 105 |
|
|
</itemizedlist>
|
| 106 |
|
|
</para>
|
| 107 |
|
|
</sect2>
|
| 108 |
|
|
<sect2>
|
| 109 |
|
|
<title>Repository structure</title>
|
| 110 |
|
|
<para>The SVN repository is structured as follows:
|
| 111 |
|
|
.1 debian-med/. .2 trunk/. .3 community/. .4 debtags/. .4 infrastructure/. .4 website/. .3 packages/. .4 <package>/. .5 branches/. .5 tags/. .5 trunk/. .6 debian/.
|
| 112 |
|
|
</para>
|
| 113 |
|
|
</sect2>
|
| 114 |
|
|
</sect1>
|
| 115 |
|
|
<sect1>
|
| 116 |
|
|
<title>Packaging</title>
|
| 117 |
|
|
<sect2>
|
| 118 |
|
|
<title>Announcing intent to package</title>
|
| 119 |
|
|
<para>If you intent to work on a Debian package you should follow
|
| 120 |
|
|
the <link xlink:href="http://www.debian.org/devel/wnpp/#l1">normal Debian rules</link> and file a <acronym>WNPP</acronym> bug report.</para>
|
| 121 |
|
|
<para>It is a good idea to keep the Debian-Med mailing list
|
| 122 |
|
|
<link xlink:href="mailto:debian-med@lists.debian.org">debian-med@lists.debian.org</link>
|
| 123 |
|
|
in CC or forward the response of the BTS that includes the bug
|
| 124 |
|
|
number to the mailing list to keep your co-workers informed.</para>
|
| 125 |
|
|
<para>In addition to this you should add a user tag to this
|
| 126 |
|
|
<acronym>WNPP</acronym> bug to make sure that your intent is in focus
|
| 127 |
|
|
of the Debian-Med team.</para>
|
| 128 |
|
|
<para>This can be done by sending a mail to <link xlink:href="mailto:request@bugs.debian.org">request@bugs.debian.org</link>
|
| 129 |
|
|
with the following content:</para>
|
| 130 |
|
|
<blockquote>
|
| 131 |
|
|
<programlisting>user debian-med@lists.debian.org
|
| 132 |
|
|
usertag <bug-number> + wnpp med-<task>
|
| 133 |
|
|
thanks</programlisting>
|
| 134 |
|
|
</blockquote>
|
| 135 |
|
|
<para>For instance if you want to tag an <acronym>ITP</acronym> with
|
| 136 |
|
|
bug number #123456 for Debian-Med section biology you would do the
|
| 137 |
|
|
following:</para>
|
| 138 |
|
|
<blockquote>
|
| 139 |
|
|
<programlisting>mailx -s "Tagging bug #123456" request@bugs.debian.org <<...
|
| 140 |
|
|
user debian-med@lists.debian.org
|
| 141 |
|
|
usertag 123456 + wnpp med-bio
|
| 142 |
|
|
thanks
|
| 143 |
|
|
...</programlisting>
|
| 144 |
|
|
</blockquote>
|
| 145 |
|
|
</sect2>
|
| 146 |
|
|
<sect2>
|
| 147 |
|
|
<title>Conventions</title>
|
| 148 |
|
|
<para>Please, in <filename>debian/control</filename>, use these values:</para>
|
| 149 |
|
|
<blockquote>
|
| 150 |
|
|
<programlisting>...
|
| 151 |
|
|
Section: ...
|
| 152 |
|
|
Priority: ...
|
| 153 |
|
|
Maintainer: Debian-Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
|
| 154 |
|
|
XS-DM-Upload-Allowed: yes
|
| 155 |
|
|
Uploaders: <yourname> <youremail>
|
| 156 |
|
|
Standards-Version: 3.7.3
|
| 157 |
|
|
Homepage: http://...
|
| 158 |
|
|
Vcs-Svn: svn://svn.debian.org/svn/debian-med/trunk/packages/<package>/trunk/
|
| 159 |
|
|
Vcs-Browser: http://svn.debian.org/wsvn/debian-med/trunk/packages/<package>/trunk/?rev=0&sc=0
|
| 160 |
|
|
...</programlisting>
|
| 161 |
|
|
</blockquote>
|
| 162 |
|
|
<para>Make sure you use the right Section and Priority fields for
|
| 163 |
|
|
the package. Also, be sure to use the latest Standards-Version.
|
| 164 |
|
|
Please also add the Homepage field, we aim at having our packages
|
| 165 |
|
|
the most complete as they can be.</para>
|
| 166 |
|
|
</sect2>
|
| 167 |
|
|
<sect2>
|
| 168 |
|
|
<title>Injecting a new package</title>
|
| 169 |
|
|
<para>To inject a new package to the SVN repository, you must have
|
| 170 |
|
|
write access to it; i.e. you must be a member of this group.</para>
|
| 171 |
|
|
<para>You can inject a new package only after successfully building
|
| 172 |
|
|
it with <command>dpkg-buildpackage</command> (or any wrapper around it). Then you can:</para>
|
| 173 |
|
|
<blockquote>
|
| 174 |
|
|
<para><userinput>
|
| 175 |
|
|
<command>svn-inject</command>
|
| 176 |
|
|
<filename>package.dsc</filename>
|
| 177 |
|
|
<filename class="directory">svn+ssh://user@alioth.debian.org/svn/debian-med/trunk/packages/</filename>
|
| 178 |
|
|
</userinput></para>
|
| 179 |
|
|
</blockquote>
|
| 180 |
|
|
<para>The <command>svn-inject</command> command is found in the
|
| 181 |
|
|
<command>svn-buildpackage</command> package (just
|
| 182 |
|
|
<command>apt-get</command> it).</para>
|
| 183 |
|
|
<para>Once you injected a new package please make sure that it is
|
| 184 |
|
|
mentioned in the apropriate tasks file in the package source of the
|
| 185 |
|
|
debian-med package in SVN. Normally maintainer watch the changes in
|
| 186 |
|
|
the Debian-Med packaging pool but it helps if the maintainer of a
|
| 187 |
|
|
certain package verifies that everything is in the right place.</para>
|
| 188 |
|
|
</sect2>
|
| 189 |
|
|
<sect2>
|
| 190 |
|
|
<title>Building the packages</title>
|
| 191 |
|
|
<para>To build the package, just use the tools that <command>svn-buildpackage</command>
|
| 192 |
|
|
carries. First of all, we suggest you to define some aliases for the
|
| 193 |
|
|
most common commands:</para>
|
| 194 |
|
|
<blockquote>
|
| 195 |
|
|
<programlisting>alias svn-b='svn-buildpackage -us -uc -rfakeroot --svn-ignore'
|
| 196 |
|
|
alias svn-br='svn-b --svn-dont-purge --svn-reuse'
|
| 197 |
|
|
alias svn-bt='svn-buildpackage --svn-tag -rfakeroot'</programlisting>
|
| 198 |
|
|
</blockquote>
|
| 199 |
|
|
<para>Checkout the sources (see the proper section).</para>
|
| 200 |
|
|
<para>Once done, you're ready to do the work. First, cd to the trunk
|
| 201 |
|
|
directory, and download the upstream sources (if there is a
|
| 202 |
|
|
<filename>debian/watch</filename> file):</para>
|
| 203 |
|
|
<blockquote>
|
| 204 |
|
|
<para><userinput>
|
| 205 |
|
|
<command>echo "origDir=.." >> .svn/deb-layout && uscan --force-download</command>
|
| 206 |
|
|
</userinput></para>
|
| 207 |
|
|
</blockquote>
|
| 208 |
|
|
<para>Alternatively, you can try this, it depends on how the package
|
| 209 |
|
|
was built (again, from the <filename class="directory">trunk/</filename> directory):</para>
|
| 210 |
|
|
<blockquote>
|
| 211 |
|
|
<para><userinput>
|
| 212 |
|
|
<command>debian/rules get-orig-source</command>
|
| 213 |
|
|
</userinput></para>
|
| 214 |
|
|
</blockquote>
|
| 215 |
|
|
<para>Once done, edit the files you need, and then build the package with
|
| 216 |
|
|
<command>svn-b</command> or <command>svn-br</command>.</para>
|
| 217 |
|
|
<para>If you're a Debian-Med member, you can commit your changes:</para>
|
| 218 |
|
|
<blockquote>
|
| 219 |
|
|
<para><userinput>
|
| 220 |
|
|
<command>svn commit</command>
|
| 221 |
|
|
</userinput></para>
|
| 222 |
|
|
</blockquote>
|
| 223 |
|
|
<para>(also <command>svn ci</command>).</para>
|
| 224 |
|
|
<para>Otherwise, you can ask to be added to the group (see the Membership
|
| 225 |
|
|
section), or send the result of svn diff to the
|
| 226 |
|
|
<link xlink:href="mailto:debian-med@lists.debian.org">mailing list</link>
|
| 227 |
|
|
(<command>gzip -9</command> it, if it's too large).</para>
|
| 228 |
|
|
</sect2>
|
| 229 |
|
|
<sect2>
|
| 230 |
|
|
<title>Tagging packages</title>
|
| 231 |
|
|
<para>It may happen that a package version has been uploaded to Debian
|
| 232 |
|
|
repositories, and you forgot to tag the last build with</para>
|
| 233 |
|
|
<blockquote>
|
| 234 |
|
|
<para><userinput>
|
| 235 |
|
|
<command>svn-buildpackage --svn-tag</command>
|
| 236 |
|
|
</userinput></para>
|
| 237 |
|
|
</blockquote>
|
| 238 |
|
|
<para>
|
| 239 |
|
|
You can tag this package also retroactively. A first step, creating
|
| 240 |
|
|
the tags directory, can be achieved in two ways:
|
| 241 |
|
|
<itemizedlist>
|
| 242 |
|
|
<listitem>
|
| 243 |
|
|
<para>create it locally (it is a sibling of <filename class="directory">trunk/</filename>), and commit:</para>
|
| 244 |
|
|
<blockquote>
|
| 245 |
|
|
<para><userinput>
|
| 246 |
|
|
<command>svn mkdir</command> <filename class="directory">tags</filename>
|
| 247 |
|
|
</userinput></para>
|
| 248 |
|
|
<para><userinput>
|
| 249 |
|
|
<command>svn commit</command>
|
| 250 |
|
|
</userinput></para>
|
| 251 |
|
|
</blockquote>
|
| 252 |
|
|
</listitem>
|
| 253 |
|
|
<listitem>
|
| 254 |
|
|
<para>create it remotely:</para>
|
| 255 |
|
|
<blockquote>
|
| 256 |
|
|
<para><userinput>
|
| 257 |
|
|
<command>svn mkdir</command> <filename class="directory">svn+ssh://user@svn.debian.org/svn/debian-med/trunk/packages/<package>/tags</filename>
|
| 258 |
|
|
</userinput></para>
|
| 259 |
|
|
</blockquote>
|
| 260 |
|
|
</listitem>
|
| 261 |
|
|
</itemizedlist>
|
| 262 |
|
|
</para>
|
| 263 |
|
|
<para>After the tags directory has been created, you're ready to tag the
|
| 264 |
|
|
package:</para>
|
| 265 |
|
|
<blockquote>
|
| 266 |
|
|
<para><userinput>
|
| 267 |
|
|
<command>svn-buildpackage --svn-tag-only --svn-no-autodch</command>
|
| 268 |
|
|
</userinput></para>
|
| 269 |
|
|
</blockquote>
|
| 270 |
|
|
<para>(--svn-no-autodch avoids <filename>debian/changelog</filename> to be marked as UNRELEASED).</para>
|
| 271 |
|
|
</sect2>
|
| 272 |
|
|
<sect2>
|
| 273 |
|
|
<title>Handling patches</title>
|
| 274 |
|
|
<para>Often happens that the upstream code doesn't fit well into the
|
| 275 |
|
|
Debian distribution: be this wrong paths, missing features, anything
|
| 276 |
|
|
that implies editing the source files. When you directly edit
|
| 277 |
|
|
upstream's source files, your changes will be put into a .diff.gz file,
|
| 278 |
|
|
which should instead contain only debian. Because of this, it's best
|
| 279 |
|
|
using a patch handling system which keeps patches under the
|
| 280 |
|
|
<filename class="directory">debian/</filename> directory.</para>
|
| 281 |
|
|
<para>The most known are <command>quilt</command> and <command>dpatch</command>.
|
| 282 |
|
|
Please don't use any other patch system in Debian-Med, unless absolutely
|
| 283 |
|
|
necessary.</para>
|
| 284 |
|
|
<sect3>
|
| 285 |
|
|
<title>Using <command>quilt</command></title>
|
| 286 |
|
|
<para>Using quilt is rather easy.</para>
|
| 287 |
|
|
<para>First, make sure you have correctly setup quilt: open
|
| 288 |
|
|
<filename>.quiltrc</filename> in your home directory (create
|
| 289 |
|
|
it if you don't have one), and make sure it looks like this:</para>
|
| 290 |
|
|
<blockquote>
|
| 291 |
|
|
<programlisting>QUILT_DIFF_ARGS="--no-timestamps --no-index"
|
| 292 |
|
|
QUILT_REFRESH_ARGS="--no-timestamps --no-index"
|
| 293 |
|
|
QUILT_PATCH_OPTS="--unified-reject-files"
|
| 294 |
|
|
QUILT_PATCHES="debian/patches"</programlisting>
|
| 295 |
|
|
</blockquote>
|
| 296 |
|
|
<para>After this, you're ready to start working with quilt.</para>
|
| 297 |
|
|
<sect4>
|
| 298 |
|
|
<title>Creating a patch</title>
|
| 299 |
|
|
<para>To create a patch, use the <command>new</command> command.
|
| 300 |
|
|
Run:</para>
|
| 301 |
|
|
<blockquote>
|
| 302 |
|
|
<para><userinput>
|
| 303 |
|
|
<command>quilt new</command> <filename><patch_name>.patch</filename>
|
| 304 |
|
|
</userinput></para>
|
| 305 |
|
|
</blockquote>
|
| 306 |
|
|
<para>This will create (if it doesn't exist yet) a
|
| 307 |
|
|
<filename>debian/patches/series</filename> file, which
|
| 308 |
|
|
contains all the patches to be applied by quilt. Moreover,
|
| 309 |
|
|
the new patch is also the topmost (the currently
|
| 310 |
|
|
applied).</para>
|
| 311 |
|
|
<para>Now start editing files, with:</para>
|
| 312 |
|
|
<blockquote>
|
| 313 |
|
|
<para><userinput>
|
| 314 |
|
|
<command>quilt edit</command> <filename><file></filename>
|
| 315 |
|
|
</userinput></para>
|
| 316 |
|
|
</blockquote>
|
| 317 |
|
|
<para>and repeat the process for each file the patch is
|
| 318 |
|
|
involved with. At the end, run</para>
|
| 319 |
|
|
<blockquote>
|
| 320 |
|
|
<para><userinput>
|
| 321 |
|
|
<command>quilt refresh</command>
|
| 322 |
|
|
</userinput></para>
|
| 323 |
|
|
</blockquote>
|
| 324 |
|
|
<para>This will compare the noted state of the edited files
|
| 325 |
|
|
with the current state, and will produce a patch in
|
| 326 |
|
|
<filename>debian/patches</filename>. Remember: the patch
|
| 327 |
|
|
is currently applied (you can check this with
|
| 328 |
|
|
<command>quilt applied</command>).</para>
|
| 329 |
|
|
</sect4>
|
| 330 |
|
|
<sect4>
|
| 331 |
|
|
<title>Applying and unapplying patches</title>
|
| 332 |
|
|
<para>Just two easy commands to do the job:</para>
|
| 333 |
|
|
<itemizedlist>
|
| 334 |
|
|
<listitem><para><command>quilt pop</command> will unapply the topmost patch.</para></listitem>
|
| 335 |
|
|
<listitem><para><command>quilt push</command> will apply the next patch in debian/patches/series.</para></listitem>
|
| 336 |
|
|
</itemizedlist>
|
| 337 |
|
|
<para>You can just add a "-a" flag to the commands above, to
|
| 338 |
|
|
respectively apply/unapply all patches in the series.</para>
|
| 339 |
|
|
<tip>
|
| 340 |
|
|
<para>You can check which patches are applied/unapplied
|
| 341 |
|
|
with, respectively, <command>quilt applied</command> and
|
| 342 |
|
|
<command>quilt unapplied</command>.</para>
|
| 343 |
|
|
</tip>
|
| 344 |
|
|
</sect4>
|
| 345 |
|
|
<sect4>
|
| 346 |
|
|
<title>Editing patches</title>
|
| 347 |
|
|
<para>To edit a patch, first make it the topmost:</para>
|
| 348 |
|
|
<blockquote>
|
| 349 |
|
|
<para><userinput>
|
| 350 |
|
|
<command>quilt push</command> <filename><patch_name></filename>
|
| 351 |
|
|
</userinput></para>
|
| 352 |
|
|
</blockquote>
|
| 353 |
|
|
<para>If the patch is already applied, but is not the topmost,
|
| 354 |
|
|
run <command>quilt pop</command> until it becomes the currently
|
| 355 |
|
|
applied one.</para>
|
| 356 |
|
|
<para>You can now run <command>quilt edit</command> on the files
|
| 357 |
|
|
you want to change, and, when you're done, <command>quilt
|
| 358 |
|
|
refresh</command>.</para>
|
| 359 |
|
|
</sect4>
|
| 360 |
|
|
<sect4>
|
| 361 |
|
|
<title>Renaming patches</title>
|
| 362 |
|
|
<para>Sometimes it's useful to rename a patch. Without
|
| 363 |
|
|
any hassle, do:</para>
|
| 364 |
|
|
<blockquote>
|
| 365 |
|
|
<para><userinput>
|
| 366 |
|
|
<command>quilt rename -P</command> <filename><old_name>.patch</filename>
|
| 367 |
|
|
<filename><new_name>.patch</filename>
|
| 368 |
|
|
</userinput></para>
|
| 369 |
|
|
</blockquote>
|
| 370 |
|
|
</sect4>
|
| 371 |
|
|
<sect4>
|
| 372 |
|
|
<title>Other commands</title>
|
| 373 |
|
|
<para>Please see <command>man 1 quilt</command> to have a
|
| 374 |
|
|
comprehensive list of commands.</para>
|
| 375 |
|
|
</sect4>
|
| 376 |
|
|
<sect4>
|
| 377 |
|
|
<title>Integration in the build process</title>
|
| 378 |
|
|
<para>Add in the very first part of <filename>debian/rules</filename>
|
| 379 |
|
|
(i.e. before the targets), the line:</para>
|
| 380 |
|
|
<blockquote>
|
| 381 |
|
|
<programlisting>include <filename class="headerfile">/usr/share/quilt/quilt.make</filename></programlisting>
|
| 382 |
|
|
</blockquote>
|
| 383 |
|
|
<para>Remember to add the needed dependencies to its
|
| 384 |
|
|
targets:</para>
|
| 385 |
|
|
<blockquote>
|
| 386 |
|
|
<programlisting>...
|
| 387 |
|
|
build: patch build-stamp
|
| 388 |
|
|
build-stamp: configure
|
| 389 |
|
|
...</programlisting>
|
| 390 |
|
|
</blockquote>
|
| 391 |
|
|
<para>This kind of dependency will ensure that if you also
|
| 392 |
|
|
patch the build system, you get a working patched build
|
| 393 |
|
|
process.</para>
|
| 394 |
|
|
<caution>
|
| 395 |
|
|
<para>Don't also put configure as a dependency of
|
| 396 |
|
|
build (leave it in build-stamp): that may cause problems
|
| 397 |
|
|
during parallel buildings (i.e. the -j flag of make).</para>
|
| 398 |
|
|
</caution>
|
| 399 |
|
|
<para>Now add a dependency to the clean target:</para>
|
| 400 |
|
|
<blockquote>
|
| 401 |
|
|
<programlisting>...
|
| 402 |
|
|
clean: unpatch
|
| 403 |
|
|
...</programlisting>
|
| 404 |
|
|
</blockquote>
|
| 405 |
|
|
<para>If you've also patched the build system, using upstream's
|
| 406 |
|
|
clean target might fail. This is what you should do:</para>
|
| 407 |
|
|
<blockquote>
|
| 408 |
|
|
<programlisting>...
|
| 409 |
|
|
clean: clean-patched unpatch
|
| 410 |
|
|
clean-patched:
|
| 411 |
|
|
...</programlisting>
|
| 412 |
|
|
</blockquote>
|
| 413 |
|
|
<para>Obviously, you could always use an approach like this,
|
| 414 |
|
|
but it's an useless complication if you don't patch the build
|
| 415 |
|
|
system, and you should keep <filename>debian/rules</filename>
|
| 416 |
|
|
the simplest you can.</para>
|
| 417 |
|
|
</sect4>
|
| 418 |
|
|
</sect3>
|
| 419 |
|
|
<sect3>
|
| 420 |
|
|
<title>Using <command>dpatch</command></title>
|
| 421 |
|
|
<sect4>
|
| 422 |
|
|
<title>Creating a patch</title>
|
| 423 |
|
|
<para>dpatch-edit-patch</para>
|
| 424 |
|
|
</sect4>
|
| 425 |
|
|
<sect4>
|
| 426 |
|
|
<title>Applying and unapplying patches</title>
|
| 427 |
|
|
<para>apply(-all), unapply(-all), status</para>
|
| 428 |
|
|
</sect4>
|
| 429 |
|
|
<sect4>
|
| 430 |
|
|
<title>Editing patches</title>
|
| 431 |
|
|
<para>dpatch-edit-patch</para>
|
| 432 |
|
|
</sect4>
|
| 433 |
|
|
<sect4>
|
| 434 |
|
|
<title>Renaming patches</title>
|
| 435 |
|
|
<para>Is this possible?</para>
|
| 436 |
|
|
</sect4>
|
| 437 |
|
|
<sect4>
|
| 438 |
|
|
<title>Other commands</title>
|
| 439 |
|
|
<para>Please see <command>man 1 dpatch</command> for a
|
| 440 |
|
|
comprehensive list of commands.</para>
|
| 441 |
|
|
</sect4>
|
| 442 |
|
|
<sect4>
|
| 443 |
|
|
<title>Integration in the build process</title>
|
| 444 |
|
|
<para>Follow the instructions for quilt and adapt the path of
|
| 445 |
|
|
inclusion to <filename class="headerfile">/usr/share/dpatch/dpatch.make</filename></para>
|
| 446 |
|
|
</sect4>
|
| 447 |
|
|
</sect3>
|
| 448 |
|
|
</sect2>
|
| 449 |
|
|
</sect1>
|
| 450 |
|
|
</article>
|