summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-12-27 18:13:51 +0100
committerGuido Günther <agx@sigxcpu.org>2015-12-27 18:27:57 +0100
commit597e04022ace28a7ce78a5cc429dca31a4d1196c (patch)
treef0d5a538ca06c3d84ba16599acdeefbb535fc0f8 /docs
parentd02d812a280e6da00b9f18fb12b77422f21ef198 (diff)
docs: Use <programlisting> consistently
Use it for command blocks instead of a mixture of programlisting and screen.
Diffstat (limited to 'docs')
-rw-r--r--docs/chapters/building.sgml16
-rw-r--r--docs/chapters/import.sgml158
-rw-r--r--docs/chapters/patches.sgml66
-rw-r--r--docs/chapters/releases.sgml24
-rw-r--r--docs/chapters/special.sgml92
5 files changed, 178 insertions, 178 deletions
diff --git a/docs/chapters/building.sgml b/docs/chapters/building.sgml
index 7fb93580..c7ac94b7 100644
--- a/docs/chapters/building.sgml
+++ b/docs/chapters/building.sgml
@@ -10,9 +10,9 @@
<emphasis>debian-branch</emphasis> or when you have uncommitted changes in
your repository), you'll usually use:
</para>
-<screen>
+<programlisting>
&gbp-buildpackage; <option>--git-ignore-new</option>
-</screen>
+</programlisting>
<para>If &gbp-buildpackage; doesn't find a valid upstream tarball, it will
create one by looking at the tag matching the upstream version. To change
this behaviour, see the <option>--git-upstream-tree</option> option.
@@ -25,9 +25,9 @@
</para>
<para>Once you're satisfied with the build and want to do a release, you commit all
your changes and issue:</para>
-<screen>
+<programlisting>
&gbp-buildpackage; <option>--git-tag</option>
-</screen>
+</programlisting>
<para>This will again build the &debian; package and tag the final result after
extracting the current version from the changelog. If you want &gpg;-signed
tags, you can use the <option>--git-sign</option> and
@@ -39,21 +39,21 @@
<title>Using a separate build dir</title>
<para>Tools like &svn-buildpackage; use a separate build-area. To achieve a similar behaviour
with &gbp-buildpackage;, use the <option>--git-export-dir</option> option:</para>
-<screen>
+<programlisting>
&gbp-buildpackage; <option>--git-export-dir</option>=<replaceable>../build-area/</replaceable>
-</screen>
+</programlisting>
<para>This will export the head of the current branch to
<replaceable>../build-area/package-version</replaceable> and build the
package. If you don't want to export the current branch head, you can use
<option>--git-export</option> to export any treeish object. Here are some
examples:</para>
-<screen>
+<programlisting>
&gbp-buildpackage; <option>--git-export-dir</option>=<replaceable>../build-area</replaceable> <option>--git-export</option>=<replaceable>debian/0.4.3</replaceable>
&gbp-buildpackage; <option>--git-export-dir</option>=<replaceable>../build-area</replaceable> <option>--git-export</option>=<replaceable>etch</replaceable>
&gbp-buildpackage; <option>--git-export-dir</option>=<replaceable>../build-area</replaceable> <option>--git-export</option>=<replaceable>8caed309653d69b7ab440e3d35abc090eb4c6697</replaceable>
&gbp-buildpackage; <option>--git-export-dir</option>=<replaceable>../build-area</replaceable> <option>--git-export</option>=<replaceable>INDEX</replaceable>
&gbp-buildpackage; <option>--git-export-dir</option>=<replaceable>../build-area</replaceable> <option>--git-export</option>=<replaceable>WC</replaceable>
-</screen>
+</programlisting>
<para>The special argument <replaceable>INDEX</replaceable> exports the
state of the current index, which can be used to include staged but uncommitted
changes in the build. Whereas the special argument
diff --git a/docs/chapters/import.sgml b/docs/chapters/import.sgml
index e3bb4758..610e35ec 100644
--- a/docs/chapters/import.sgml
+++ b/docs/chapters/import.sgml
@@ -4,9 +4,9 @@
<sect1 id="gbp.import.existing">
<title>Importing already existing &debian; packages</title>
<para>Importing an already existing &debian; package into a &git; repository is as easy as:
- <screen>
-&gbp-import-dsc; package_0.1-1.dsc
- </screen>
+<programlisting>
+ &gbp-import-dsc; package_0.1-1.dsc
+</programlisting>
This will create a new &git; repository named after the imported package, put
the upstream sources onto the <option>upstream-branch</option> and the
&debian; patch on the <option>debian-branch</option>. In case of a &debian;
@@ -24,27 +24,27 @@
<para>
If you want to import further versions, you can change into your shiny new
&git; repository and just continue with the same command:
- <screen>
-cd package/
-&gbp-import-dsc; package_0.1-2.dsc
-&gbp-import-dsc; package_0.1-3.dsc
-&gbp-import-dsc; package_0.2-1.dsc
- </screen>
+<programlisting>
+ cd package/
+ &gbp-import-dsc; package_0.1-2.dsc
+ &gbp-import-dsc; package_0.1-3.dsc
+ &gbp-import-dsc; package_0.2-1.dsc
+</programlisting>
</para>
<para>
Or you can import all versions at once using &gbp-import-dscs;:
- <screen>
-&gbp-import-dscs; /path/to/history/package_*.dsc
- </screen>
+<programlisting>
+ &gbp-import-dscs; /path/to/history/package_*.dsc
+</programlisting>
This will create a &git; repository if necessary and import all versions sorted
by version number.
</para>
<para>You can also import all versions of a package known from the
<ulink url="http://snapshot.debian.org/">snapshot.debian.org</ulink> service
using the <option>--debsnap</option> option of &gbp-import-dscs;:
- <screen>
-&gbp-import-dscs; --debsnap package
- </screen>
+<programlisting>
+ &gbp-import-dscs; --debsnap package
+</programlisting>
</para>
</sect1>
@@ -52,11 +52,11 @@ by version number.
<title>Importing a new upstream version</title>
<para>Change into your &git; repository (which can be empty), make sure it
has all local modifications committed, and run either of:
- <screen>
-&gbp-import-orig; <filename>/path/to/package_0.2.orig.tar.gz</filename>
-&gbp-import-orig; <filename>/path/to/package_0.2.tar.bz2</filename>
-&gbp-import-orig; <filename>/path/to/package-0.2/</filename>
- </screen>
+<programlisting>
+ &gbp-import-orig; <filename>/path/to/package_0.2.orig.tar.gz</filename>
+ &gbp-import-orig; <filename>/path/to/package_0.2.tar.bz2</filename>
+ &gbp-import-orig; <filename>/path/to/package-0.2/</filename>
+</programlisting>
This puts the upstream sources onto the <option>upstream-branch</option> and
tags them accordingly (the default tag format is
<replaceable>upstream/%(version)s</replaceable>).
@@ -66,15 +66,15 @@ by version number.
<option>--debian-branch</option> options.
</para>
<para>If you are using <filename>debian/watch</filename> to keep track of how to retrieve upstream sources, you can also simply use the <option>--uscan</option> option:
- <screen>
-&gbp-import-orig; --uscan
- </screen>
+<programlisting>
+ &gbp-import-orig; --uscan
+</programlisting>
</para>
<para>You can also filter out content
you don't want imported:
- <screen>
-&gbp-import-orig; <option>--filter</option>=<replaceable>'CVS/*'</replaceable> <filename>/path/to/package_0.2.orig.tar.gz</filename>
- </screen>
+<programlisting>
+ &gbp-import-orig; <option>--filter</option>=<replaceable>'CVS/*'</replaceable> <filename>/path/to/package_0.2.orig.tar.gz</filename>
+</programlisting>
The <option>--filter</option> option can be used multiple times for more
complex filtering.
</para>
@@ -109,19 +109,19 @@ by version number.
If the upstream sources are already on a separate branch, things are pretty
simple. You can either rename that branch to the default
<option>upstream-branch</option> name <emphasis>upstream</emphasis> with:
- <screen>
-&gitcmd; branch upstream theupstream-branch
-&gitcmd; branch <option>-D</option> theupstream-branch
- </screen>
+<programlisting>
+ &gitcmd; branch upstream theupstream-branch
+ &gitcmd; branch <option>-D</option> theupstream-branch
+</programlisting>
or you can tell &gbp-buildpackage; the name of the branch to use as
<option>upstream-branch</option>:
- <screen>
+<programlisting>
<command>cat</command> &lt;&lt;EOF &gt; <filename>.git/gbp.conf</filename>
[DEFAULT]
# this is the upstream-branch:
upstream-branch=theupstream-branch
EOF
- </screen>
+</programlisting>
If you then use &gbp-import-orig; to import new upstream sources, they will
from now on end up on <emphasis>theupstream-branch</emphasis> and
merged to the <option>debian-branch</option>.
@@ -134,10 +134,10 @@ EOF
the upstream sources (not the &debian; patch), you can simply branch from that
point. So use &gitkcmd; or &gitcmd;-log to locate the commit-id of that commit
and create the upstream branch from there, e.g.:
-<screen>
+<programlisting>
COMMIT_ID=`&gitcmd; log --pretty=oneline | tail -1 | awk '{ print $1 }'`
&gitcmd; branch upstream $COMMIT_ID
-</screen>
+</programlisting>
The important thing here is that the <envar>COMMIT_ID</envar> specifies a
point on the master branch that carried <emphasis>only</emphasis> the
upstream sources and not the &debian; modifications. The above example
@@ -156,19 +156,19 @@ EOF
(for instance when converting from a Subversion repository where the
mergeWithUpstream was set for svn-buildpackage), you can create an empty
upstream branch with the following commands:
-<screen>
- <command>git checkout</command> <option>--orphan</option> <replaceable>upstream</replaceable>
- <command>git rm</command> <option>-rf</option> <replaceable>.</replaceable>
- <command>git commit</command> <option>--allow-empty</option> <option>-m</option> <replaceable>'Initial upstream branch.'</replaceable>
- <command>git checkout</command> <option>-f</option> <replaceable>master</replaceable>
-</screen>
+<programlisting>
+ <command>git checkout</command> <option>--orphan</option> <replaceable>upstream</replaceable>
+ <command>git rm</command> <option>-rf</option> <replaceable>.</replaceable>
+ <command>git commit</command> <option>--allow-empty</option> <option>-m</option> <replaceable>'Initial upstream branch.'</replaceable>
+ <command>git checkout</command> <option>-f</option> <replaceable>master</replaceable>
+</programlisting>
With Git versions lower than 1.7.2.3, the commands are slightly more complicated:
-<screen>
- <command>git symbolic-ref</command> <replaceable>HEAD</replaceable> <replaceable>refs/heads/upstream</replaceable>
- <command>git rm</command> <option>--cached</option> <option>-r</option> <replaceable>.</replaceable>
- <command>git commit</command> <option>--allow-empty</option> <option>-m</option> <replaceable>'Initial upstream branch.'</replaceable>
- <command>git checkout</command> <option>-f</option> <replaceable>master</replaceable>
-</screen>
+<programlisting>
+ <command>git symbolic-ref</command> <replaceable>HEAD</replaceable> <replaceable>refs/heads/upstream</replaceable>
+ <command>git rm</command> <option>--cached</option> <option>-r</option> <replaceable>.</replaceable>
+ <command>git commit</command> <option>--allow-empty</option> <option>-m</option> <replaceable>'Initial upstream branch.'</replaceable>
+ <command>git checkout</command> <option>-f</option> <replaceable>master</replaceable>
+</programlisting>
</para>
</sect2>
</sect1>
@@ -179,17 +179,17 @@ EOF
So far, we assumed you already have a &debian; package to start with, but
what if you want to start a new package? First, create an empty repository:
</para>
- <screen>
-<command>mkdir</command> package-0.1
-<command>cd</command> package-0.1
-<command>git init</command>
- </screen>
+<programlisting>
+ <command>mkdir</command> package-0.1
+ <command>cd</command> package-0.1
+ <command>git init</command>
+</programlisting>
<para>Then, you import the upstream sources, branch off the
<option>upstream-branch</option> branch and add the &debian; files (e.g. via dh_make):
- <screen>
-&gbp-import-orig; <option>-u</option> <replaceable>0.1</replaceable> <filename>../package-0.1.tar.gz</filename>
-<command>dh_make</command>
- </screen>
+<programlisting>
+ &gbp-import-orig; <option>-u</option> <replaceable>0.1</replaceable> <filename>../package-0.1.tar.gz</filename>
+ <command>dh_make</command>
+</programlisting>
That's it, you're done. If you want to publish your new repository, you can use &gbp-create-remote-repo;.
</para>
</sect1>
@@ -217,10 +217,10 @@ EOF
A common upstream format is to put a <replaceable>v</replaceable> in front of the version number.
In this case, the configuration option would look like:
</para>
- <screen>
+<programlisting>
[git-buildpackage]
upstream-tag = v%(version)s
- </screen>
+</programlisting>
<para>
<replaceable>version</replaceable> will be replaced with the upstream version number as read from
<filename>debian/changelog</filename>.
@@ -240,35 +240,35 @@ upstream-tag = v%(version)s
<para>First, we clone the upstream repository. To avoid any ambiguities between the &debian; packaging repository
and the upstream repository, we name the upstream repository <replaceable>upstream</replaceable> instead of the
default <replaceable>origin</replaceable>.
- <screen>
- git clone --no-checkout -o upstream git://git.example.com/libgbp.git
- cd libgbp
- git checkout -b debian/sid v1.0
- </screen>
+<programlisting>
+ <command>git clone</command> --no-checkout -o upstream git://git.example.com/libgbp.git
+ <command>cd</command> libgbp
+ <command>git checkout</command> -b debian/sid v1.0
+</programlisting>
The above makes sure we have <replaceable>debian/sid</replaceable> for the &debian; packaging. We didn't create
any <replaceable>upstream/*</replaceable> branches; they're not needed for the packaging and only need to be
kept up to date. After adding the &debian; packaging, we build the package. This assumes you're using &pristine-tar;
and upstream uses a version number format as described above:
- <screen>
- gbp buildpackage --git-pristine-tar --git-pristine-tar-commit --git-upstream-tag='v%(version)s' --git-debian-branch=debian/sid
- </screen>
+<programlisting>
+ <command>gbp buildpackage</command> --git-pristine-tar --git-pristine-tar-commit --git-upstream-tag='v%(version)s' --git-debian-branch=debian/sid
+</programlisting>
When updating to a new upstream version, we simply fetch from upstream and merge in the new tag. Afterwards, we
update the changelog and build the package:
- <screen>
- git fetch upstream
- git merge v1.1
- gbp dch --debian-branch=debian/sid --snapshot --auto debian/
- gbp buildpackage --git-ignore-new --git-pristine-tar --git-pristine-tar-commit --git-upstream-tag='v%(version)s'
- </screen>
+<programlisting>
+ <command>git fetch</command> upstream
+ <command>git merge</command> v1.1
+ <command>gbp dch</command> --debian-branch=debian/sid --snapshot --auto debian/
+ &gbp-buildpackage; --git-ignore-new --git-pristine-tar --git-pristine-tar-commit --git-upstream-tag='v%(version)s'
+</programlisting>
Note that the above &gbp-dch; call makes sure we only pickup changes in the <filename>debian/</filename>
directory. Since we told it to build a snapshot changelog entry and we hadn't commit the changelog yet,
we need to tell &gbp-buildpackage; that the working directory is unclean via the <option>--git-ignore-new</option> option.
Once everything looks good, commit the changelog and build a release version:
- <screen>
- gbp dch --release --auto --git-debian-branch=debian/sid
- git commit -m"Release 1.1-1" debian/changelog
- gbp buildpackage --git-upstream-tag='v%(version)s' --git-debian-branch=debian/sid
- </screen>
+<programlisting>
+ <command>gbp dch</command> --release --auto --git-debian-branch=debian/sid
+ <command>git commit</command> -m"Release 1.1-1" debian/changelog
+ &gbp-buildpackage; --git-upstream-tag='v%(version)s' --git-debian-branch=debian/sid
+</programlisting>
If you want to share your repository with others, you can use &gbp-create-remote-repo; and &gbp-pull; as usual.
</para>
</sect3>
@@ -281,9 +281,9 @@ upstream-tag = v%(version)s
to &debian; has the same checksum as upstream's, you can use the <option>--upstream-vcs-tag</option> option
when importing new tarballs with &gbp-import-orig;. Assuming you have the upstream source in your
repository with a tag <replaceable>v0.0.1</replaceable>, you can use:
- <screen>
- &gbp-import-orig; --upstream-vcs-tag=v0.0.1 foo_0.0.1.orig.tar.gz
- </screen>
+<programlisting>
+ &gbp-import-orig; --upstream-vcs-tag=v0.0.1 foo_0.0.1.orig.tar.gz
+</programlisting>
to add upstream's tag as additional parent to the merge commit.
See <ulink url="http://bugs.debian.org/664771">#664771</ulink> for more details.
</para>
diff --git a/docs/chapters/patches.sgml b/docs/chapters/patches.sgml
index d4fb19ae..d552603b 100644
--- a/docs/chapters/patches.sgml
+++ b/docs/chapters/patches.sgml
@@ -40,10 +40,10 @@ the <filename>master</filename> branch, of course).</para>
<para>Create patch-queue branch and
import <filename>debian/patches</filename> onto it using &gbp-pq;
-<screen>
+<programlisting>
<command>cd <replaceable>REPO</replaceable></command>
- <command>gbp pq import</command>
-</screen>
+ &gbp-pq; import
+</programlisting>
<para>This will switch you to the patch-queue branch
automatically.</para>
@@ -62,26 +62,26 @@ explains how to work with git-rebase.</para></listitem>
&gbp-pq;. This will switch you back to master and regenerate the patches using
a method similar to <command>git-format-patch(1)</command>:</para>
-<screen>
- <command>gbp pq export</command>
-</screen>
+<programlisting>
+ &gbp-pq; export
+</programlisting>
<para>Commit the result either by passing <option>--commit</option> to
the above export or by using git commands:</para>
-<screen>
- <command>git add debian/patches</command>
- <command>git commit</command>
-</screen>
+<programlisting>
+ &gitcmd; add debian/patches
+ &gitcmd; commit
+</programlisting>
<para>Update <filename>debian/changelog</filename> (e.g. by running "&gbp-dch; <option>-S</option> <option>-a</option>")</para>
<para>You can now build the package as usual.</para>
<para>After importing a new upstream version you can use the following commands
to refresh <filename>debian/patches/</filename>:</para>
-<screen>
- <command>gbp pq rebase</command>
- <command>gbp pq export</command>
-</screen>
+<programlisting>
+ &gbp-pq; rebase
+ &gbp-pq; export
+</programlisting>
<para>Should the rebase fail you can resort to
&gitcmd; <option>rebase</option>.</para>
@@ -94,15 +94,15 @@ patches by using the <option>--time-machine=</option>.
your first patch:</para>
<orderedlist>
<listitem><para>Launch an import, this will switch to the proper branch
-<screen>
- <command>gbp pq import</command>
-</screen>
+<programlisting>
+ &gbp-pq; import
+</programlisting>
<listitem><para>Create your first patch: edit files, test, commit your changes using <command>git commit</command></para></listitem>
<listitem><para>To generate the new Quilt patch set use
-<screen>
- <command>gbp pq export --commit</command>
-</screen>This will switch you back to the <filename>master</filename>
+<programlisting>
+ &gbp-pq; export --commit
+</programlisting>This will switch you back to the <filename>master</filename>
branch generate the patches and commit them right away to
your <filename>master</filename> branch.
@@ -127,17 +127,17 @@ sets up these two files for you.
<para>The easiest way is to not push out any patch-queue/* branches at all.
They can be recreated by any team member easily by using</para>
-<screen>
- <command>git branch -d patch-queue/master</command>
- <command>gbp pq import</command>
-</screen>
+<programlisting>
+ &gitcmd; branch -d patch-queue/master
+ &gbp-pq; import
+</programlisting>
<para>The patch-queue branch can also be re-created when pulling (this
will additionally drop your current patch-queue branch and recreate it
from <filename>debian/patches</filename>):</para>
-<screen>
- <command>gbp pull --redo-pq</command>
-</screen>
+<programlisting>
+ &gbp-pull; --redo-pq
+</programlisting>
<para>
Note that you can you can push out patch-queue branches. Other team
@@ -180,13 +180,13 @@ Working from a patch-queue branch.
Instead of building from master build from patch-queue/master prepared by
&gbp-pq; as describe above. This branch has the patches already applied as
dpkg-source expects it:</para>
-<screen>
- <command>gbp pq import</command>
- <command>gbp buildpackage --git-debian-branch=patch-queue/master</command>
+<programlisting>
+ &gbp-pq; import
+ &gbp-buildpackage; --git-debian-branch=patch-queue/master
#Build and test...
- <command>git checkout master</command>
- <command>gbp pq export</command>
-</screen>
+ &git; checkout master
+ &gbp-pq; export
+</programlisting>
</listitem>
</itemizedlist>
</chapter>
diff --git a/docs/chapters/releases.sgml b/docs/chapters/releases.sgml
index 4f75008a..1e79a634 100644
--- a/docs/chapters/releases.sgml
+++ b/docs/chapters/releases.sgml
@@ -11,9 +11,9 @@
<option>debian-branch</option> without touching
<emphasis>debian/changelog</emphasis> at all. Then, when done, do:
</para>
-<screen>
+<programlisting>
&gbp-dch; <option>--release</option>
-</screen>
+</programlisting>
<para>This will look up the latest released version in the changelog,
increment the version in the &debian; changelog, generate changelog
messages from the corresponding &git; commit id up to the branch head, and
@@ -22,9 +22,9 @@
<para>
But what if you want to have an (unreleased) snapshot for intermediate testing:
</para>
-<screen>
+<programlisting>
&gbp-dch; <option>--snapshot</option>
-</screen>
+</programlisting>
<para>will generate a snapshot release with a specially crafted version number
and a warning in the changelog that this is a snapshot release:
</para>
@@ -39,21 +39,21 @@ git-buildpackage (0.3.7~1.gbp470ce2) UNRELEASED; urgency=low
number will continue to increase. Since the snapshot banners contains the
commit id of the current branch head, &gbp-dch; can figure out what to
append to the changelog by itself:
-<screen>
+<programlisting>
&gbp-dch; <option>--snapshot</option> <option>--auto</option>
-</screen>
+</programlisting>
will fetch the commit id and add changelog entries from that point to the
current HEAD&mdash;again auto incrementing the version number. If you don't want
to start at that commit id, you can specify any id or tag with:</para>
-<screen>
+<programlisting>
&gbp-dch; <option>--since</option>=<replaceable>e76a6a180a57701ae4ae381f74523cacb3152780</replaceable> <option>--snapshot</option>
-</screen>
+</programlisting>
<para>
After testing, you can remove the snapshot header by a final &gbp-dch; call:
</para>
-<screen>
+<programlisting>
&gbp-dch; <option>--since</option>=<replaceable>HEAD</replaceable> <option>--release</option>
-</screen>
+</programlisting>
<para>
This will add no further entries but simply remove the specially crafted
version number and the snapshot header. Again you can use any commit id
@@ -65,12 +65,12 @@ git-buildpackage (0.3.7~1.gbp470ce2) UNRELEASED; urgency=low
<para>If the auto incrementing of the snapshot number doesn't suite your needs, you
can give any Python expression that evaluates to a positive integer to
calculate the new snapshot number:</para>
-<screen>
+<programlisting>
&gbp-dch; <option>-S</option> <option>-a</option> <option>--snapshot-number</option>=<replaceable>1</replaceable>
&gbp-dch; <option>-S</option> <option>-a</option> <option>--snapshot-number</option>=<replaceable>'snapshot + 2'</replaceable>
&gbp-dch; <option>-S</option> <option>-a</option> <option>--snapshot-number</option>=<replaceable>'os.popen("git-log --pretty=oneline | wc -l").readlines()[0]'</replaceable>
&gbp-dch; <option>-S</option> <option>-a</option> <option>--snapshot-number</option>=<replaceable>`git-log --pretty=oneline debian/0.3.3 | wc -l`</replaceable>
-</screen>
+</programlisting>
<para>
You can also add the snapshot-number calculation to <filename>gbp.conf</filename>:
</para>
diff --git a/docs/chapters/special.sgml b/docs/chapters/special.sgml
index b4f2d9fd..37efbfb3 100644
--- a/docs/chapters/special.sgml
+++ b/docs/chapters/special.sgml
@@ -5,9 +5,9 @@
<para>If you have to handle non-DFSG clean upstream sources, you can use a
different branch which you have to create once:
</para>
- <screen>
-&gitcmd; branch dfsg_clean upstream
- </screen>
+<programlisting>
+ &gitcmd; branch dfsg_clean upstream
+</programlisting>
<para>
This creates the <emphasis>dfsg_clean</emphasis> branch from the tip of a
branch called <emphasis>upstream</emphasis>. Then, when importing a new
@@ -17,27 +17,27 @@
<emphasis>debian-branch</emphasis> (by default named
<emphasis>master</emphasis>):
</para>
- <screen>
-&gbp-import-orig; --no-merge <filename>/path/to/nondfsg-clean-package_10.4.orig.tar.gz</filename>
-&gitcmd; <option>tag</option> 10.4
- </screen>
+<programlisting>
+ &gbp-import-orig; --no-merge <filename>/path/to/nondfsg-clean-package_10.4.orig.tar.gz</filename>
+ &gitcmd; <option>tag</option> 10.4
+</programlisting>
<para>
After the import, you can switch to the <emphasis>dfsg_clean</emphasis>
branch and get the newly imported changes from the upstream branch:
</para>
- <screen>
-&gitcmd; <option>checkout</option> dfsg_clean
-&gitcmd; <option>pull</option> <filename>.</filename> upstream
- </screen>
+<programlisting>
+ &gitcmd; <option>checkout</option> dfsg_clean
+ &gitcmd; <option>pull</option> <filename>.</filename> upstream
+</programlisting>
<para>Now make this checkout dfsg clean (preferably by a cleanup script), commit
your changes and merge to your <option>debian-branch</option>:</para>
- <screen>
-cleanup-script.sh
-&gitcmd; commit -a -m "Make source dfsg clean"
-&gitcmd; tag <replaceable>10.4.dfsg</replaceable>
-&gitcmd; checkout <replaceable>master</replaceable>
-&gitcmd; pull <replaceable>.</replaceable> <replaceable>dfsg_clean</replaceable>
- </screen>
+<programlisting>
+ cleanup-script.sh
+ &gitcmd; commit -a -m "Make source dfsg clean"
+ &gitcmd; tag <replaceable>10.4.dfsg</replaceable>
+ &gitcmd; checkout <replaceable>master</replaceable>
+ &gitcmd; pull <replaceable>.</replaceable> <replaceable>dfsg_clean</replaceable>
+</programlisting>
</sect1>
<sect1 id="gbp.special.nmus">
@@ -46,16 +46,16 @@ cleanup-script.sh
First, create a branch that holds the NMUs from the tip of your
<option>debian-branch</option> (default is <emphasis>master</emphasis>) once:
</para>
- <screen>
-&gitcmd; <option>branch</option> <replaceable>nmu</replaceable> <replaceable>master</replaceable>
- </screen>
+<programlisting>
+ &gitcmd; <option>branch</option> <replaceable>nmu</replaceable> <replaceable>master</replaceable>
+</programlisting>
<para>
To import an NMU, change into the git repository and use &gbp-import-dsc;:
</para>
- <screen>
-&gitcmd; checkout <replaceable>master</replaceable>
-&gbp-import-dsc; <option>--debian-branch</option>=<replaceable>nmu</replaceable> <filename>/path/to/package_1.0-1nmu0.dsc</filename>
- </screen>
+<programlisting>
+ &gitcmd; checkout <replaceable>master</replaceable>
+ &gbp-import-dsc; <option>--debian-branch</option>=<replaceable>nmu</replaceable> <filename>/path/to/package_1.0-1nmu0.dsc</filename>
+</programlisting>
<para>
This will import the NMU onto the branched named <emphasis>nmu</emphasis>
instead of the default <option>master</option>. This method can also
@@ -83,7 +83,7 @@ cleanup-script.sh
&gbp; has it's own command line option for this:
</para>
<programlisting>
- <command>gbp buildpackage</command> <option>--git-pbuilder</option>
+ &gbp-buildpackage; <option>--git-pbuilder</option>
</programlisting>
<para>
This will set the build command to run &git-pbuilder; (which
@@ -98,42 +98,42 @@ cleanup-script.sh
We can make &git-pbuilder; usage the default by adding it to
<filename>~/.gbp.conf</filename>:
</para>
- <programlisting>
+<programlisting>
cat &lt;&lt;EOF &gt; <filename>~/.gbp.conf</filename>
[DEFAULT]
# We invoke cowbuilder via git-pbuilder. Arguments passed to &gbp-buildpackage;
# will be passed to dpkg-buildpackage in the chroot
pbuilder = True
EOF
- </programlisting>
+</programlisting>
<para>
<command>git-pbuilder</command> defaults to building a package for the
<envar>sid</envar> distribution. If you want to build for another
distribution, pass this in the <option>--git-dist</option> option:
- <programlisting>
-&gbp-buildpackage; --git-pbuilder --git-dist=jessie
- </programlisting>
+<programlisting>
+ &gbp-buildpackage; --git-pbuilder --git-dist=jessie
+</programlisting>
If you want to use <command>debuild</command> again (without
modifying <filename>~/.gbp.conf</filename>), you can use:
</para>
- <programlisting>
-&gbp-buildpackage; --git-no-pbuilder
- </programlisting>
+<programlisting>
+ &gbp-buildpackage; --git-no-pbuilder
+</programlisting>
<para>
In order for all of the above to work you have to create a
base chroot first using &git-pbuilder;
</para>
- <programlisting>
-<command>git-pbuilder</command> create
- </programlisting>
+<programlisting>
+ <command>git-pbuilder</command> create
+</programlisting>
<para>
This can later be updated using
</para>
- <programlisting>
-<command>git-pbuilder</command> update
- </programlisting>
+<programlisting>
+ <command>git-pbuilder</command> update
+</programlisting>
</sect1>
<sect1 id="gbp.special.hacking">
@@ -142,9 +142,9 @@ EOF
Whenever you need to work on an arbitrary &debian; package, you can check it
right into &git; with one command:
<programlisting>
-git-import-dsc --download <filename>package</filename>
-cd <filename>package</filename>
-git-branch debian
+ &gbp-import-dsc --download <filename>package</filename>
+ cd <filename>package</filename>
+ &gitcmd; branch debian
</programlisting>
</para>
<para>
@@ -156,8 +156,8 @@ git-branch debian
modify the package, revert changes you made, create other branches for
testing, see what changes you made, etc. When finished, just do</para>
<programlisting>
-git-commit -a
-git-diff debian --
+ &gitcmd; commit -a
+ &gitcmd; diff debian --
</programlisting>
<para>
@@ -165,7 +165,7 @@ git-diff debian --
fetch the source package from a URL:
<programlisting>
-git-import-dsc --download <filename>http://mentors.debian.net/debian/pool/main/i/ipsec-tools/ipsec-tools_0.7.3-9.dsc</filename>
+ &gbp-import-dsc --download <filename>http://mentors.debian.net/debian/pool/main/i/ipsec-tools/ipsec-tools_0.7.3-9.dsc</filename>
</programlisting>
The import works incrementally; you can import new versions on top of