1dgit-maint-gbp(7)                    dgit                    dgit-maint-gbp(7)
2
3
4

NAME

6       dgit - tutorial for package maintainers already using
7       git-buildpackage(1)
8

INTRODUCTION

10       This document explains how dgit can be incorporated into a
11       git-buildpackage(1) package-maintenance workflow.  This should be read
12       jointly with git-buildpackage(1)'s documentation.  Some reasons why you
13       might want to incorporate dgit into your existing workflow:
14
15       •   Benefit from dgit's safety catches.  In particular, ensure that
16           your upload always matches exactly your git HEAD.
17
18       •   Provide a better, more detailed git history to downstream dgit
19           users, such as people using dgit to do an NMU (see
20           dgit-nmu-simple(7) and dgit-user(7)).
21
22       Note that we assume a patches-unapplied repository: the upstream source
23       committed to the git repository is unpatched.  git-buildpackage(1) can
24       work with patched-applied repositories, but is normally used with
25       patches-unapplied.
26

GIT CONFIGURATION

28       If you have configured an export-dir in your gbp.conf, you should tell
29       dgit about it:
30
31           % git config --global dgit.default.build-products-dir /home/spwhitton/build-area
32
33       If you run
34
35           % git config dgit.default.quilt-mode gbp
36
37       in your repository, you can omit --gbp wherever it occurs below.
38
39       Note that this does require that you always work from your gbp master
40       branch, never the dgit patches-applied branch.
41

BUILDING

43       You can perform test builds like this:
44
45           % dgit [--include-dirty] gbp-build [OPTIONS]
46
47       where --include-dirty is needed for testing uncommitted changes, and
48       OPTIONS are any further options to be passed on to gbp-buildpackage(1).
49
50       If you are doing a source-only upload, you do not need to prepare a
51       _source.changes, as dgit push-source will take of that on your behalf.
52
53       If you need to include binaries with your upload, you will probably
54       want to use sbuild(1), pbuilder(1) or cowbuilder(1):
55
56           % dgit --rm-old-changes --gbp sbuild
57
58       replacing 'sbuild' with 'pbuilder' or 'cowbuilder' if appropriate.
59
60       We use --rm-old-changes to ensure that there is exactly one changes
61       file corresponding to this package, so we can be confident we're
62       uploading what we intend (though dgit push will do some safety checks).
63
64       Note that none of the commands in this section are required to upload
65       with dgit.  You can invoke gbp-buildpackage(1), pbuilder(1),
66       cowbuilder(1) and sbuild(1) directly.  However, the defaults for these
67       tools may leave you with something that dgit will refuse to upload
68       because it doesn't match your git HEAD.
69
70       As a general rule, leave all signing and tagging to dgit.
71

UPLOADING

73       Don't use --git-tag: dgit push will do this for you.  To do a source-
74       only upload:
75
76           % dgit --gbp push-source
77
78       or if you need to include binaries,
79
80           % dgit --gbp push
81
82       This will push your git history to the dgit-repos, but you probably
83       want to follow it up with a push to salsa.
84
85       You will need to pass --overwrite if the previous upload was not
86       performed with dgit.
87
88       If this is first ever dgit push of the package, consider passing
89       --deliberately-not-fast-forward instead of --overwrite.  This avoids
90       introducing a new origin commit into the dgit view of your git history.
91       (This origin commit would represent the most recent non-dgit upload of
92       the package, but this should already be represented in your git
93       history.)
94
95       Alternatively, you can use git-debpush(1).  For the first upload you
96       should pass the --gbp quilt mode option (see git-debpush(1)).
97

INCORPORATING NMUS

99       dgit pull can't yet incorporate NMUs into patches-unapplied gbp
100       branches.  You can just apply the NMU diff the traditional way.  The
101       next upload will require --overwrite.
102

SEE ALSO

104       dgit(1), dgit(7)
105

AUTHOR

107       This tutorial was written and is maintained by Sean Whitton
108       <spwhitton@spwhitton.name>.
109
110
111
112perl v5.36.1                    Debian Project               dgit-maint-gbp(7)
Impressum