This file is indexed.

/usr/share/doc/bzr-builddeb/README.html is in bzr-builddeb 2.8.10.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
<title>bzr-builddeb</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 ! important }

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 ! important }

.last, .with-subtitle {
  margin-bottom: 0 ! important }

.hidden {
  display: none }

a.toc-backref {
  text-decoration: none ;
  color: black }

blockquote.epigraph {
  margin: 2em 5em ; }

dl.docutils dd {
  margin-bottom: 0.5em }

object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
  overflow: hidden;
}

/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
  font-weight: bold }
*/

div.abstract {
  margin: 2em 5em }

div.abstract p.topic-title {
  font-weight: bold ;
  text-align: center }

div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
  margin: 2em ;
  border: medium outset ;
  padding: 1em }

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
  font-weight: bold ;
  font-family: sans-serif }

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
  color: red ;
  font-weight: bold ;
  font-family: sans-serif }

/* Uncomment (and remove this text!) to get reduced vertical space in
   compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
  margin-bottom: 0.5em }

div.compound .compound-last, div.compound .compound-middle {
  margin-top: 0.5em }
*/

div.dedication {
  margin: 2em 5em ;
  text-align: center ;
  font-style: italic }

div.dedication p.topic-title {
  font-weight: bold ;
  font-style: normal }

div.figure {
  margin-left: 2em ;
  margin-right: 2em }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.line-block {
  display: block ;
  margin-top: 1em ;
  margin-bottom: 1em }

div.line-block div.line-block {
  margin-top: 0 ;
  margin-bottom: 0 ;
  margin-left: 1.5em }

div.sidebar {
  margin: 0 0 0.5em 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

div.system-messages {
  margin: 5em }

div.system-messages h1 {
  color: red }

div.system-message {
  border: medium outset ;
  padding: 1em }

div.system-message p.system-message-title {
  color: red ;
  font-weight: bold }

div.topic {
  margin: 2em }

h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
  margin-top: 0.4em }

h1.title {
  text-align: center }

h2.subtitle {
  text-align: center }

hr.docutils {
  width: 75% }

img.align-left, .figure.align-left, object.align-left {
  clear: left ;
  float: left ;
  margin-right: 1em }

img.align-right, .figure.align-right, object.align-right {
  clear: right ;
  float: right ;
  margin-left: 1em }

img.align-center, .figure.align-center, object.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.align-left {
  text-align: left }

.align-center {
  clear: both ;
  text-align: center }

.align-right {
  text-align: right }

/* reset inner alignment in figures */
div.align-right {
  text-align: inherit }

/* div.align-center * { */
/*   text-align: left } */

ol.simple, ul.simple {
  margin-bottom: 1em }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.attribution {
  text-align: right ;
  margin-left: 50% }

p.caption {
  font-style: italic }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font: inherit }

pre.literal-block, pre.doctest-block, pre.math, pre.code {
  margin-left: 2em ;
  margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80% }

table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 2em 4em }

table.docutils {
  margin-top: 0.5em ;
  margin-bottom: 0.5em }

table.footnote {
  border-left: solid 1px black;
  margin-left: 1px }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding-left: 0.5em ;
  padding-right: 0.5em ;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
  border: 0px;
  border-top: 2px solid;
  border-bottom: 2px solid;
  border-collapse: collapse;
}
table.docutils.booktabs * {
  border: 0px;
}
table.docutils.booktabs th {
  border-bottom: thin solid;
  text-align: left;
}

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

ul.auto-toc {
  list-style-type: none }

</style>
</head>
<body>
<div class="document" id="bzr-builddeb">
<h1 class="title">bzr-builddeb</h1>

<div class="section" id="overview">
<h1>Overview</h1>
<p>This is bzr-builddeb, a plugin for <a class="reference external" href="http://bazaar-vcs.org/">bzr</a> that allows you to build <a class="reference external" href="http://www.debian.org/">Debian</a>
packages from a bzr branch.</p>
<p>Note that there is a user manual available at
/usr/share/doc/bzr-builddeb/user_manual/index.html that gives more
information than this file.</p>
</div>
<div class="section" id="installation">
<h1>Installation</h1>
<p>This plugin requires <a class="reference external" href="http://bzr.debian.org/pkg-python-debian/trunk/">python-debian</a> (at least version 0.1.11),
and a version of bzr at least 2.1. These are available in Debian
(though maybe not at the required versions for a development version
of builddeb).</p>
<p>It also requires the <tt class="docutils literal"><span class="pre">dpkg-dev</span></tt> package to be installed (for the
<tt class="docutils literal"><span class="pre">dpkg-mergechangelogs</span></tt> tool):</p>
<pre class="literal-block">
apt-get install dpkg-dev
</pre>
<p>This plugin can be installed in two ways. As you are probably using a Debian
system you can probably just use the Debian packages. The other way is to
branch it in to <tt class="docutils literal"><span class="pre">~/.bazaar/plugins/builddeb</span></tt>, i.e:</p>
<pre class="literal-block">
bzr branch http://jameswestby.net/bzr/bzr-builddeb/ \
  ~/.bazaar/plugins/builddeb
</pre>
<p>This will give you a <tt class="docutils literal">bzr builddeb</tt> command (alias <tt class="docutils literal">bd</tt>).</p>
<p>Help for this plugin can be found by running <tt class="docutils literal">bzr help builddeb</tt>.</p>
<p>There is also a script named <tt class="docutils literal"><span class="pre">bzr-buildpackage</span></tt> provided in /usr/bin
that provides access to the tool as well. It is just a wrapper script that
calls <tt class="docutils literal">bzr builddeb</tt> with the arguments you provide, so the rest of the
documentation applies equally well to using this script. Probably the only
difference is that help will be got with <tt class="docutils literal"><span class="pre">bzr-buildpackage</span> <span class="pre">---help</span></tt>
(as <tt class="docutils literal">bzr builddeb <span class="pre">--help</span></tt> also works and does the same as
<tt class="docutils literal">bzr help builddeb</tt>). The script is provided for two reasons, the first
is similarity to the other <tt class="docutils literal"><span class="pre">-buildpackage</span></tt> systems, and the second is so
that the Debian package can provide the <tt class="docutils literal"><span class="pre">bzr-buildpackage</span></tt> package, and
so make it easier for people to find the package.</p>
</div>
<div class="section" id="configuration">
<h1>Configuration</h1>
<p>There are also configuration files that can be used, these are, in the order
that values will be used if found:</p>
<pre class="literal-block">
* .bzr-builddeb/local.conf (in the package directory)
* ~/.bazaar/builddeb.conf
* .bzr-builddeb/default.conf (in the package directory)
</pre>
<p>The last of these should be used for values that will be used by all users of
the package, for instance 'merge = True'. The others are for the user to add
or override settings that are specific to them, either globally or per package.</p>
<p>There is one complication to this however. As arbitrary commands can be
specified for some of the options there is a potential security hole. This
is closed by only taking these options from the configuration file in your
home directory, which can't be changed by another committer to the branch.
I apologise if this breaks your setup, and if you can't work around it please
talk to me to try to find an approach that satisfies you and does not open
any security holes.</p>
<p>These files must start with:</p>
<pre class="literal-block">
[BUILDDEB]
</pre>
<div class="section" id="configuration-options">
<h2>Configuration Options</h2>
<p>The following options are read from the configuration files. Most can also be
used as command line arguments by prepending <tt class="docutils literal"><span class="pre">--</span></tt> to the names and not using
the <tt class="docutils literal">\=</tt> symbol. There are a few exceptions to this that are noted in the
descriptions.</p>
<div class="section" id="directories">
<h3>Directories</h3>
<p>These change the directories that the plugin uses for various things.</p>
<blockquote>
<ul>
<li><p class="first"><tt class="docutils literal"><span class="pre">build-dir</span> = path</tt></p>
<p>The directory in which the build takes place. (Defaults to
<tt class="docutils literal"><span class="pre">../build-area</span></tt> relative to the branch).</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">result-dir</span> = path</tt></p>
<p>The directory the resulting files will be placed in. (Defaults to <tt class="docutils literal">..</tt>)</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">orig-dir</span> = path</tt></p>
<p>The directory to search for the <tt class="docutils literal">.orig.tar.gz</tt> when not in native mode.
(Defaults to <tt class="docutils literal">..</tt> relative to the branch).</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="modes">
<h3>Modes</h3>
<p>These change the way in which the plugin operates. They can be set depending
on the type of package you are building.</p>
<blockquote>
<ul>
<li><p class="first"><tt class="docutils literal">merge = True</tt></p>
<p>Turns on merge mode. This is where only the <tt class="docutils literal">debian/</tt> directory is
versioned. It uses and <tt class="docutils literal">orig.tar.gz</tt> for the upstream and combines the
two before building. It works with both the <tt class="docutils literal">debian/</tt> directory in the
branch, or the contents of <tt class="docutils literal">debian/</tt> (e.g. <tt class="docutils literal">rules</tt>, <tt class="docutils literal">control</tt>)
directly in the top level directory of the branch. (Defaults to <tt class="docutils literal">False</tt>).</p>
</li>
<li><p class="first"><tt class="docutils literal">native = True</tt></p>
<p>If you want to build a native package from a branch then turn on this
option. It will stop the plugin from looking for an <tt class="docutils literal">orig.tar.gz</tt> and
build a native package instead. This has no effect if merge mode is on,
as I don't think it makes any sense to version the <tt class="docutils literal">debian/</tt> separately
for a native package. If you disagree let me know.</p>
</li>
<li><p class="first"><tt class="docutils literal">split = True</tt></p>
<p>This takes a package from a branch that includes both the upstream source
and the <tt class="docutils literal">debian/</tt> dir and creates a non-native package from it by
creating an <tt class="docutils literal">orig.tar.gz</tt> from the code outside of <tt class="docutils literal">debian/</tt>. This
is probably most useful if you are bot upstream and Debian maintainer
of a non-native package. This has no effect if <tt class="docutils literal">merge</tt> or <tt class="docutils literal">native</tt>
are true, the former is for use when you don't version the full source,
the second for when you don't need an <tt class="docutils literal">orig.tar.gz</tt> so they make no sense
to be used together.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">export-upstream</span> = path</tt></p>
<p>This option takes a path (remote or local) to a bzr branch that contains
the upstream code. If this is set then the plugin will export the code
from that branch to create the <tt class="docutils literal">.orig.tar.gz</tt>. This option only has any
effect if <tt class="docutils literal">merge</tt> is set.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">export-upstream-revision</span> = revision</tt></p>
<p>This sets the revision that the upstream code will be branched at. It takes
the same revision spec as the normal --revision parameter. Use it to
associate an upstream version number with a particular revision of the
upstream code. This has no effect if <tt class="docutils literal"><span class="pre">export-upstream</span></tt> is not set.</p>
</li>
</ul>
</blockquote>
</div>
<div class="section" id="builders">
<h3>Builders</h3>
<p>These configure the commands that are used to build the package in different
situations.</p>
<blockquote>
<ul>
<li><p class="first"><tt class="docutils literal">builder = command</tt></p>
<p>The command to use to build the package. Defaults to <tt class="docutils literal">debuild</tt>).
Will only be read from the file in your home directory.</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">quick-builder</span> = command</tt></p>
<p>The command used to build the package if the <tt class="docutils literal"><span class="pre">--quick</span></tt> option is used.
(Defaults to <tt class="docutils literal">fakeroot debian/rules binary</tt>). Will only be read from
the file in your home directory.</p>
</li>
</ul>
</blockquote>
<p>The idea is that certain options can be set in <tt class="docutils literal"><span class="pre">.bzr-builddeb/default.conf</span></tt>
that apply to the package on all systems, or that there is a default that is
wanted that differs from the default provided. <tt class="docutils literal">merge = True</tt> is a perfect
example of this.</p>
<p>Then the user can override this locally if they want for all of their packages
(they prefer <tt class="docutils literal">builder = pdebuild</tt>), so they can set this in
<tt class="docutils literal"><span class="pre">~/.bazaar/builddeb.conf</span></tt>. They can override it for the package if they want
(e.g. they have a different location for upstream tarballs of a package if
they are involved with upstream as well, so they set <tt class="docutils literal">orig_dir =
<span class="pre">/home/.../releases/</span></tt>), this can be done in <tt class="docutils literal"><span class="pre">.bzr-builddeb/local.conf</span></tt>).</p>
</div>
</div>
</div>
<div class="section" id="creating-a-package">
<h1>Creating a package</h1>
<p>Below are instructions for creating a package. These instructions differ
depending on whether you want to use merge mode or not.</p>
<p>First the common start create a directory to hold your work. This is not
absolutely necessary, but as you still get all the power of bzr when using
this plugin, so you might want to branch etc. and so this will be useful
later on:</p>
<pre class="literal-block">
$ mkdir path/to/project
</pre>
<p>If you are going to be using branches then the following is a good optimisation
you can use:</p>
<pre class="literal-block">
$ bzr init-repo --trees path/to/project
</pre>
<p>Now create your global config file if you want to change something like the
builder in use, or have a global result directory or similar:</p>
<pre class="literal-block">
$ echo &quot;[BUILDDEB]&quot; &gt; ~/.bazaar/builddeb.conf
$ $EDITOR ~/.bazaar/builddeb.conf
</pre>
<p>and any options that you want.</p>
<p>I will describe creating a new project, but for existing projects you can
copy the code over and call <tt class="docutils literal">bzr init</tt> then continue in the same way.</p>
<p>I will also describe the setup that conforms to the default options for
directories. If you wish to use a different layout set up the options to
your liking and tweak the commands below as necessary.</p>
<div class="section" id="using-merge-mode">
<h2>Using merge mode</h2>
<p>Merge mode is when only the <tt class="docutils literal">debian/</tt> directory of the package is versioned,
with the upstream version of the code living elsewhere. It allows for clear
separation of the Debian specific changes from the upstream code.</p>
<p>First copy the <tt class="docutils literal">.orig.tar.gz</tt> file for the current version in to the parent
directory. If you do not have the upstream tarball for the current version,
but you do have a <tt class="docutils literal">watch</tt> file detailing where it can be found then the
plugin will automatically retrieve the tarballs as they are needed.</p>
<p>Now create the branch for the <tt class="docutils literal">debian/</tt> directory:</p>
<pre class="literal-block">
$ bzr init project
</pre>
<p>Now you can either create a <tt class="docutils literal">project/debian/</tt> directory for all the files,
or add them in the <tt class="docutils literal">project</tt> directory.</p>
<p>Now tell bzr-builddeb that this is a merge mode project:</p>
<pre class="literal-block">
$ cd project/
$ mkdir .bzr-builddeb/
$ echo -e &quot;[BUILDDEB]\nmerge = True&quot; &gt; .bzr-builddeb/default.conf
</pre>
<p>Now you are ready to create the project. Create the usual files, and edit them
to your satisfaction. When you have the files run:</p>
<pre class="literal-block">
$ bzr add
$ bzr ci
</pre>
<p>from the root of the project branch.</p>
<p>You are now ready to build the project. See below for instructions on doing
this.</p>
</div>
<div class="section" id="non-merge-mode">
<h2>Non-merge mode</h2>
<p>This is a little simpler to set up. Create the branch for the project:</p>
<pre class="literal-block">
$ cd path/to/project
$ bzr init project
</pre>
<p>Now add all the project files to the branch, and add the to bzr:</p>
<pre class="literal-block">
$ cd project
$ bzr add
$ bzr ci
</pre>
<p>There are two options when you want to build a Debian package, whether
it is a native package or not. Most packages are non-native so I will describe
that first.</p>
<p>To create a non-native package you need an upstream tarball to build against.
Set the <tt class="docutils literal"><span class="pre">orig-dir</span></tt> variable to the directory containing the tarball that
you want to use and the plugin will pick it up and you will have a non-native
package. If you do not have the upstream tarball corresponding to the version
of the package you are trying to build, but you have a <tt class="docutils literal">watch</tt> file
detailing where it can be found then it will be automatically retrieved when
needed.</p>
<p>However sometimes you might be upstream of a package as well as Debian
maintainer, but it is not a native package. In that case you may version
the whole source including <tt class="docutils literal">debian/</tt>, but not want to have to manually
make a tarball without the <tt class="docutils literal">debian/</tt> directory. In that case see the
<tt class="docutils literal">split</tt> variable. If you set that then the plugin will create you an
appropriately named orig.tar.gz of everything outside of <tt class="docutils literal">debian/</tt>.</p>
<p>If you want to have a native package you don't need to worry about
<tt class="docutils literal"><span class="pre">orig-dir</span></tt>, but instead set <tt class="docutils literal">native = True</tt> in the
<tt class="docutils literal"><span class="pre">.bzr-builddeb/default.conf</span></tt> file (make sure it starts with <tt class="docutils literal">[BUILDDEB]</tt>
if you create it).</p>
<p>Now you are ready to build using the plugin.</p>
</div>
</div>
<div class="section" id="building-a-package">
<h1>Building a Package</h1>
<p>Once your package is set up then building it is easy. Run the following
command from the top-level of the project branch, after checking in all
changes:</p>
<pre class="literal-block">
$ bzr bd
</pre>
<p>If you used the default options this should build the package and leave the
resulting files in <tt class="docutils literal"><span class="pre">../build-area</span></tt>.</p>
<p>Note that most of the options can be used as parameters to this command as well
by prefixing their name with <tt class="docutils literal"><span class="pre">--</span></tt>. So you can do for example:</p>
<pre class="literal-block">
$ bzr bd --builder pdebuild
</pre>
<p>to change from what is in the configuration files. Note that there is currently
no way to set the binary options to false if they are set to true in the
configuration files. It would be possible to allow this, but it would bloat
the code and the help listings quite a lot, so I will only it if asked to.</p>
</div>
<div class="section" id="tips">
<h1>Tips</h1>
<p>If you have a slow builder defined in your configuration (for instance
<tt class="docutils literal">pdebuild</tt>, you can bypass this by using the <tt class="docutils literal"><span class="pre">--quick</span></tt> option. This uses
whatever the <tt class="docutils literal">quick_builder</tt> option is (defaults to <tt class="docutils literal">fakeroot debian/rules
binary</tt>).</p>
<p>If you are running in merge mode, and you have a large upstream tarball, and
you do not want to unpack it at every build you can speed things up even more.
This involves reusing the tarball each build, so saving the need to unpack it.
To do this run:</p>
<pre class="literal-block">
$ bzr bd --export-only
</pre>
<p>once to create a build-dir to use. (<tt class="docutils literal"><span class="pre">-e</span></tt> is the short option for this). Then
on the next builds you can use the <tt class="docutils literal"><span class="pre">--reuse</span></tt> and <tt class="docutils literal"><span class="pre">--dont-purge</span></tt> options to
keep using this build directory. <strong>N.B. This may cause build problems,
especially if files are removed</strong>, it is advisable to run a build without
<tt class="docutils literal"><span class="pre">--reuse</span></tt> after removing any files.</p>
</div>
<div class="section" id="workflow">
<h1>Workflow</h1>
<p>bzr-builddeb is designed to fit in with the workflow that bzr encourages. It
is designed as a plugin, so that it just becomes one more <tt class="docutils literal">bzr</tt> command that
you run while working on the package.</p>
<p>It also works fine with the frequent branching approach of bzr, so that you
can branch to test something new for the package, or for a bug fix, and then
merge it back in to your main branch when it is done.</p>
</div>
<div class="section" id="copyright">
<h1>Copyright</h1>
<p>This README is Copyright (C) 2006 James Westby &lt;<a class="reference external" href="mailto:jw+debian&#64;jameswestby.net">jw+debian&#64;jameswestby.net</a>&gt; and
is distributed under the following terms:</p>
<pre class="literal-block">
This file is part of bzr-builddeb.

bzr-builldeb is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

bzr-builddeb is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with bzr-builddeb; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
</pre>
<!-- vim: set ft=rst : -->
</div>
</div>
</body>
</html>