1dgit(1)                              dgit                              dgit(1)
2
3
4

NAME

6       dgit - git integration with the Debian archive
7

SYNOPSIS

9       dgit [dgit-opts] clone [dgit-opts] package [suite] [./dir|/dir]
10       dgit [dgit-opts] fetch|pull [dgit-opts] [suite]
11       dgit [dgit-opts] build|sbuild|build-source [build-opts]
12       dgit [dgit-opts] pbuilder|cowbuilder [debbuildopts]
13       dgit [dgit-opts] push|push-source [dgit-opts] [suite]
14       dgit [dgit-opts] rpush build-host:build-dir [push args...]
15       dgit [dgit-opts] action ...
16

DESCRIPTION

18       dgit allows you to treat the Debian archive as if it were a git reposi‐
19       tory.  Conversely, it allows Debian to publish the source of its  pack‐
20       ages as git branches, in a format which is directly useable by ordinary
21       people.
22
23       This is the command line reference.  Please read the tutorial(s):
24
25       dgit-user(7)              for users: edit, build and share packages
26       dgit-nmu-simple(7)        for DDs: do a straightforward NMU
27       dgit-maint-native(7)      for maintainers of Debian-native packages
28       dgit-maint-debrebase(7)   for maintainers: a pure-git rebasish workflow
29       dgit-maint-merge(7)       for maintainers: a pure-git merging workflow
30       dgit-maint-gbp(7)         for maintainers already using git-buildpackage
31       dgit-sponsorship(7)       for sponsors and sponsored contributors
32       dgit-downstream-dsc(7)    setting up dgit push for a new distro
33
34       See dgit(7) for detailed information about the data model, common prob‐
35       lems likely to arise with certain kinds of package, etc.
36

OPERATIONS

38       dgit clone package [suite] [./dir|/dir]
39              Consults the archive and dgit-repos to construct the git view of
40              history for package in suite (sid by default) in a new directory
41              (named ./package by default); also, downloads any necessary orig
42              tarballs.
43
44              The suite's git tip is left on the local branch dgit/suite ready
45              for  work, and on the corresponding dgit remote tracking branch.
46              The origin remote will be set up to point to the package's dgit-
47              repos tree for the distro to which suite belongs.
48
49              suite  may  be a combination of several underlying suites in the
50              form mainsuite,subsuite...; see COMBINED SUITES in dgit(7).
51
52              For your convenience, the vcs-git remote will be set up from the
53              package's  Vcs-Git field, if there is one - but note that in the
54              general case the history found there may be different to or even
55              disjoint from dgit's view.  (See also dgit update-vcs-git.)
56
57       dgit fetch [suite]
58              Consults  the  archive  and  git-repos to update the git view of
59              history for a specific suite (and downloads any  necessary  orig
60              tarballs),    and    updates    the   remote   tracking   branch
61              remotes/dgit/dgit/suite.  If the current  branch  is  dgit/suite
62              then   dgit   fetch  defaults  to  suite;  otherwise  it  parses
63              debian/changelog and uses the suite specified there.  suite  may
64              be a combined suite, as for clone.
65
66       dgit pull [suite]
67              Does  dgit  fetch,  and  then  merges the new head of the remote
68              tracking branch remotes/dgit/dgit/suite into the current branch.
69
70       dgit checkout suite
71              Checks out the local branch dgit/suite.
72
73              If the branch does not exist, dgit checkout creates it, and sets
74              it  up  the  same way as dgit clone would.  In that case, if the
75              archive remote tracking branch does  not  exist,  dgit  checkout
76              will do a dgit fetch first.
77
78              NB:  dgit  checkout  will  only do a fetch if it has to.  If you
79              already have the suite branch, and want  to  merge  your  branch
80              with updates from the archive, use dgit pull.
81
82              dgit  checkout  will normally need to access the archive server,
83              to canonicalise the provided suite name.  The  exception  is  if
84              you  specify  the  canonical  name,  and the branch (or tracking
85              branch) already exists.
86
87       dgit build ...
88              Runs dpkg-buildpackage with some suitable options.  Options  and
89              arguments  after  build  will be passed on to dpkg-buildpackage.
90              It is not necessary to use dgit build when using dgit; it is  OK
91              to  use  any  approach  which  ensures that the generated source
92              package corresponds to the relevant git commit.
93
94              Tagging, signing and actually uploading should be left  to  dgit
95              push.
96
97              dgit's build operations access the network, to get the -v option
98              right.  See -v, below.
99
100       dgit build-source ...
101              Builds the source package, and a changes file for a  prospective
102              source-only  upload,  using  dpkg-source.  The output is left in
103              package_version.dsc and package_version_source.changes.
104
105              Tagging, signing and actually uploading should be left  to  dgit
106              push-source, or dgit push.
107
108       dgit clean
109              Cleans  the  current  working  tree  (according  to the --clean=
110              option in force).
111
112       dgit update-vcs-git [suite|.] [--] [git fetch options]
113       dgit update-vcs-git [suite|.] -
114              Sets up, or updates the url of, the vcs-git remote, and  (unless
115              - was specified) runs git fetch on it.
116
117              By  default,  the  Vcs-Git  field of the .dsc from Debian sid is
118              used, as that is probably most up to date.  Another suite may be
119              specified,  or  .   to  indicate  that  the Vcs-Git of the cwd's
120              debian/control should be used instead.
121
122       dgit help
123              Print a usage summary.
124
125       dgit sbuild ...
126              Constructs the source package, uses sbuild to do a binary build,
127              and  uses  mergechanges  to  merge the source and binary changes
128              files.  Options and arguments after sbuild will be passed on  to
129              sbuild.  The output is left in package_version_multi.changes.
130
131              Note  that  by  default  sbuild  does not build arch-independent
132              packages.  You probably want to pass -A, to request those.
133
134              Tagging, signing and actually uploading should be left  to  dgit
135              push.
136
137       dgit pbuilder [debbuildopts]
138              Constructs  the  source  package,  uses  pbuilder to do a binary
139              build, and uses mergechanges to  merge  the  source  and  binary
140              changes   files.    The   output   is   left   in   package_ver‐
141              sion_multi.changes.
142
143              You should ensure that your  dgit  --build-products-dir  setting
144              matches your pbuilder --buildresult.
145
146              The debbuildopts are passed to pbuilder using its --debbuildopts
147              option.  If you want to pass other options to pbuilder, use  the
148              --pbuilder:  dgit  option as described below (remember that dgit
149              options should appear between dgit and pbuilder).
150
151              You should ensure that in your pbuilderrc you do  not  have  the
152              setting SOURCE_ONLY_CHANGES=yes as this may cause trouble.
153
154       dgit cowbuilder [debbuildopts]
155              Like dgit pbuilder, but uses cowbuilder instead of pbuilder.
156
157       dgit gbp-build ...
158              Runs  git-buildpackage  with some suitable options.  Options and
159              arguments after gbp-build will be passed on to git-buildpackage.
160
161              By default this uses --quilt=gbp, so HEAD should be a git-build‐
162              package style branch, not a patches-applied branch.
163
164              Tagging,  signing  and actually uploading should be left to dgit
165              push.
166
167       dgit push [suite]
168              Does an `upload', pushing the current HEAD to the archive (as  a
169              source package) and to dgit-repos (as git commits).  The package
170              must already have been built ready for upload, with the .dsc and
171              .changes  left  in the parent directory.  It is normally best to
172              do the build with dgit too (eg with dgit sbuild): some  existing
173              build  tools  pass  unhelpful  options  to  dpkg-source et al by
174              default, which can result in the built source package not  being
175              identical to the git tree.
176
177              In  more  detail:  dgit push checks that the current HEAD corre‐
178              sponds to the .dsc.  It then pushes  the  HEAD  to  the  suite's
179              dgit-repos  branch,  adjusts  the .changes to include any .origs
180              which the archive lacks and exclude .origs which the archive has
181              (so  -sa  and  -sd  are not needed when building for dgit push),
182              makes a signed git tag, edits the .dsc to contain the dgit meta‐
183              data field, runs debsign to sign the upload (.dsc and .changes),
184              pushes the signed tag, and  finally  uses  dput  to  upload  the
185              .changes to the archive.
186
187              dgit  push  always uses the package, suite and version specified
188              in the debian/changelog and the .dsc, which must agree.  If  the
189              command line specifies a suite then that must match too.
190
191              When used on a git-debrebase branch, dgit calls git-debrebase to
192              prepare the branch for source package upload and push.
193
194       dgit push-source [suite]
195              Without -C, builds a source package and dgit pushes it.   Saying
196              dgit  push-source  is like saying "update the source code in the
197              archive to match my git HEAD, and let the  autobuilders  do  the
198              rest."
199
200              With  -C,  performs  a  dgit push, additionally ensuring that no
201              binary packages are uploaded.
202
203       dgit rpush build-host:build-dir [push args...]
204              Pushes the contents of  the  specified  directory  on  a  remote
205              machine.   This  is  like  running  dgit push on build-host with
206              build-dir as the current directory; however, signing  operations
207              are  done  on  the  invoking host.  This allows you to do a push
208              when the system which has the source code and the build  outputs
209              has no access to the key:
210
211
212              1.   Clone on build host (dgit clone)
213              2.   Edit code on build host (edit, git commit)
214              3.   Build package on build host (dgit build)
215              4.   Test package on build host or elsewhere (dpkg -i, test)
216              5.   Upload by invoking dgit rpush on host with your GPG key.
217
218              However,  the  build-host must be able to ssh to the dgit repos.
219              If this is not already the case,  you  must  organise  it  sepa‐
220              rately, for example by the use of ssh agent forwarding.
221
222              The remaining arguments are treated just as dgit push would han‐
223              dle them.
224
225              build-host and build-dir can be passed  as  separate  arguments;
226              this is assumed to be the case if the first argument contains no
227              : (except perhaps one in [ ], to support IPv6 address literals).
228
229              You will need similar enough versions of dgit on the  build-host
230              and  the invocation host.  The build-host needs gnupg installed,
231              with your public key in its keyring (but not your  private  key,
232              obviously).
233
234       dgit setup-new-tree
235              Configure the current working tree the way that dgit clone would
236              have set it  up.   Like  running  dgit  setup-useremail,  setup-
237              mergechangelogs  and  setup-gitattributes  (but  only  does each
238              thing if dgit is configured to do it  automatically).   You  can
239              use  these  in  any  git repository, not just ones used with the
240              other dgit operations.  Does not  run  update-vcs-git  (as  that
241              requires Debian packaging information).
242
243       dgit setup-useremail
244              Set the working tree's user.name and user.email from the distro-
245              specific dgit  configuration  (dgit-distro.distro.user-name  and
246              .user-email), or DEBFULLNAME or DEBEMAIL.
247
248       dgit setup-mergechangelogs
249              Configures  a  git  merge  helper  for the file debian/changelog
250              which uses dpkg-mergechangelogs.
251
252       dgit setup-gitattributes
253              Set up the working tree's .git/info/attributes  to  disable  all
254              transforming attributes for all files.  This is done by defining
255              a macro attribute, dgit-defuse-attrs, and applying it to *.  For
256              why,  see  GITATTRIBUTES  in dgit(7).  Note that only attributes
257              affecting the working  tree  are  suppressed.   git-archive  may
258              remain exciting.
259
260              If  there is an existing macro attribute line [attr]dgit-defuse-
261              attrs in .git/info/attributes, but it is  insufficient,  because
262              it  was  made  by  an  earlier version of dgit and git has since
263              introduced new transforming attributes, this modifies the  macro
264              to disable the newer transformations.
265
266              (If  there  is already a macro attribute line [attr]dgit-defuse-
267              attrs in .git/info/attributes  which  does  what  dgit  requires
268              (whatever  files  it  effects), this operation does nothing fur‐
269              ther.  This fact can be used to defeat or partially defeat  dgit
270              setup-gitattributes and hence dgit setup-new-tree.)
271
272       dgit quilt-fixup
273              `3.0  (quilt)'  format source packages need changes representing
274              not only in-tree but also as patches  in  debian/patches.   dgit
275              quilt-fixup checks whether this has been done; if not, dgit will
276              make appropriate patches in debian/patches and also  commit  the
277              resulting changes to git.
278
279              This is normally done automatically by dgit build and dgit push.
280
281              dgit  will  try to turn each relevant commit in your git history
282              into a new quilt patch.  dgit cannot convert nontrivial  merges,
283              or  certain  other  kinds of more exotic history.  If dgit can't
284              find a suitable linearisation of your  history,  by  default  it
285              will  fail,  but  you  can  ask it to generate a single squashed
286              patch instead.
287
288              When used with a git-debrebase branch, dgit will ask  git-debre‐
289              base to prepare patches.  However, dgit can make patches in some
290              situations where git-debrebase fails, so dgit quilt-fixup can be
291              useful in its own right.  To always use dgit's own patch genera‐
292              tor instead of  git-debrebase  make-patches,  pass  --git-debre‐
293              base=true to dgit.
294
295              See FORMAT 3.0 (QUILT) in dgit(7).
296
297       dgit import-dsc [sub-options] ../path/to/.dsc [+|..]branch
298              Import  a  Debian-format  source package, specified by its .dsc,
299              into git, the way dgit fetch would do.
300
301              This does about half the work of dgit fetch: it will convert the
302              .dsc into a new, orphan git branch.  Since dgit has no access to
303              a corresponding source package archive or knowledge of the  his‐
304              tory it does not consider whether this version is newer than any
305              previous import or corresponding git branches; and it  therefore
306              does not make a pseudomerge to bind the import into any existing
307              git history.
308
309              Because a .dsc can contain a Dgit  field  naming  a  git  commit
310              (which  you  might  not have), and specifying where to find that
311              commit (and any history rewrite table),  import-dsc  might  need
312              online  access.  If this is a problem (or dgit's efforts to find
313              the commit fail),  consider  --no-chase-dsc-distro  or  --force-
314              import-dsc-with-dgit-field.
315
316              There is only one sub-option:
317
318              --require-valid-signature  causes dgit to insist that the signa‐
319              ture on the .dsc is valid (using  the  same  criteria  as  dpkg-
320              source  -x).   Otherwise, dgit tries to verify the signature but
321              the outcome is reported only as messages to stderr.
322
323              If branch is prefixed with + then if it already exists, it  will
324              be  simply  overwritten,  no  matter  its existing contents.  If
325              branch is prefixed with ..  then if it already exists  and  dgit
326              actually  imports  the  dsc  (rather than simply reading the git
327              commit out of the Dgit field), dgit will make a  pseudomerge  so
328              that  the  result  is necessarily fast forward from the existing
329              branch.  Otherwise, if branch already  exists,  dgit  will  stop
330              with an error message.
331
332              If branch does not start with refs/, refs/heads/ is prepended.
333
334       dgit version
335              Prints version information and exits.
336
337       dgit clone-dgit-repos-server destdir
338              Tries  to  fetch  a  copy of the source code for the dgit-repos-
339              server, as actually being used on the dgit git server, as a  git
340              tree.
341
342       dgit print-dgit-repos-server-source-url
343              Prints  the  url  used by dgit clone-dgit-repos-server.  This is
344              hopefully suitable for use as a git remote url.  It may  not  be
345              useable in a browser.
346
347       dgit print-dpkg-source-ignores
348              Prints  the  -i  and  -I arguments which must be passed to dpkg-
349              souce to cause it to exclude  exactly  the  .git  directory  and
350              nothing else.  The separate arguments are unquoted, separated by
351              spaces, and do not contain spaces.
352
353       dgit print-unapplied-treeish
354              Constructs a tree-ish approximating the patches-unapplied  state
355              of  your  3.0 (quilt) package, and prints the git object name to
356              stdout.  This requires appropriate .orig  tarballs.   This  tree
357              object  is  identical  to your .origs as regards upstream files.
358              The contents of the debian subdirectory is not  interesting  and
359              should  not  be  inspected;  except  that debian/patches will be
360              identical to your HEAD.
361
362              To make this operate  off-line,  the  access  configuration  key
363              which  is  used  to  determine  the  build-products-dir  is  the
364              uncanonicalised version of the suite name from the changelog, or
365              (of course) dgit.default.build-products-dir.  See ACCESS CONFIG‐
366              URATION, below.
367
368              This function is primarily provided  for  the  benefit  of  git-
369              debrebase.
370

OPTIONS

372       --dry-run | -n
373              Go  through the motions, fetching all information needed, but do
374              not actually update the output(s).   For  push,  dgit  does  the
375              required checks and leaves the new .dsc in a temporary file, but
376              does not sign, tag, push or upload.
377
378       --damp-run | -L
379              Go through many more of the motions: do everything that  doesn't
380              involve  either  signing things, or making changes on the public
381              servers.
382
383       -kkeyid
384              Use keyid for signing the tag and the upload.  The default comes
385              from  the  distro's  keyid  config  setting  (see CONFIGURATION,
386              below),  or  failing  that,  the  uploader   trailer   line   in
387              debian/changelog.
388
389       --no-sign
390              does not sign tags or uploads (meaningful only with push).
391
392
393       -ppackage
394              Specifies  that  we should process source package package
395              rather    than    looking    in     debian/control     or
396              debian/changelog.   Valid  with dgit fetch and dgit pull,
397              only.
398
399       --clean=git | -wg
400              Use git clean -xdf to clean the working tree, rather than
401              running the package's rules clean target.
402
403              This  will delete all files which are not tracked by git.
404              (Including any files you forgot to git add.)
405
406              --clean=...  options other than  dpkg-source  are  useful
407              when  the  package's  clean  target is troublesome, or to
408              avoid needing the build-dependencies.
409
410              dgit will only actually clean the tree  if  it  needs  to
411              (because it needs to build the source package or binaries
412              from your working tree).  Otherwise it  will  just  check
413              that   there  are  no  untracked  unignored  files.   See
414              --clean=git[-ff],always, below.
415
416       --clean=git-ff | -wgf
417              Use git clean -xdff to clean the working tree.  Like  git
418              clean  -xdf  but  it also removes any subdirectories con‐
419              taining different git trees (which only unusual  packages
420              are likely to create).
421
422       --clean=git[-ff],always | -wga | -wgfa
423              Like  --clean=git, but always does the clean and not just
424              a check, deleting any untracked un-ignored files.
425
426       --clean=check | --clean=check,ignores | -wc | -wci
427              Merely check that the tree is  clean  (does  not  contain
428              uncommitted  files).  Avoids running rules clean, and can
429              avoid needing the build-dependencies.
430
431              With ,ignores or -wci, untracked files covered by .gitig‐
432              nore  are tolerated, so only files which show up as ?  in
433              git status (ie, ones you maybe forgot  to  git  add)  are
434              treated as a problem.
435
436       --clean=none | -wn
437              Do  not  clean  the  tree,  nor  check  that it is clean.
438              Avoids running rules clean, and  can  avoid  needing  the
439              build-dependencies.   If there are files which are not in
440              git, or if the build creates  such  files,  a  subsequent
441              dgit push will fail.
442
443       --clean=dpkg-source[-d] | -wd | -wdd
444              Use dpkg-buildpackage to do the clean, so that the source
445              package is cleaned by dpkg-source running  the  package's
446              clean target.  --clean=dpkg-source is the default.
447
448              Without  the extra d, requires the package's build depen‐
449              dencies.
450
451              With  ...-d  or  -wdd,  the  build-dependencies  are  not
452              checked  (due  to passing -d to dpkg-buildpackage), which
453              violates policy, but may work in practice.
454
455              The rules clean target will only be run if it is  needed:
456              when  dgit  is  going  to build source or binary packages
457              from your working tree, rather than from your git  branch
458              (for  example  because  of --include-dirty or because the
459              binary package build uses your working tree).
460
461              In all cases, dgit will check that there are (after rules
462              clean,  if  applicable) no untracked un-ignored files, in
463              case these are files you forgot to git add.  (Except that
464              this  check  is not done for a `3.0 (quilt)' package when
465              dgit has to apply patches, dirtily, to the working tree.)
466              If  your package does not have a good .gitignore you will
467              probably need --clean=dpkg-source,no-check aka -wdn.
468
469       --clean=dpkg-source[-d],no-check | -wdn | -wddn
470              Like  --clean=dpkg-source,  but  does  not   care   about
471              untracked un-ignored files.
472
473       --clean=dpkg-source[-d],all-check | -wda | -wdda
474              Like  --clean=dpkg-source,  but  fails  even  on  ignored
475              untracked files.  This could perhaps be  used  to  detect
476              bugs in your rules clean target.
477
478       -N | --new
479              The  package  is  or  may  be new in this suite.  Without
480              this, dgit will refuse to  push.   It  may  (for  Debian,
481              will)  be  unable to access the git history for any pack‐
482              ages which have been newly pushed and have not  yet  been
483              published.
484
485       --include-dirty
486              Do  not  complain if the working tree does not match your
487              git HEAD, and when building,  include  the  changes  from
488              your working tree.  This can be useful with build, if you
489              plan to commit later.  (dgit push will still ensure  that
490              the .dsc you upload and the git tree you push are identi‐
491              cal, so this option won't make broken pushes.)
492
493       --ignore-dirty
494              Deprecated alias for --include-dirty.
495
496       --overwrite[=previous-version]
497              Declare that  your  HEAD  really  does  contain  all  the
498              (wanted)   changes   from  all  versions  listed  in  its
499              changelog; or, all (wanted)  changes  from  previous-ver‐
500              sion.  This promise is needed when your git branch is not
501              a descendant of the version in the archive  according  to
502              the git revision history.
503
504              It  is safer not to specify previous-version, and usually
505              it's not needed.  Just say --overwrite, unless  you  know
506              what you are doing.
507
508              This  option is useful if you are the maintainer, and you
509              have incorporated NMU changes into your own git  workflow
510              in  a  way  that  doesn't make your branch a fast forward
511              from the NMU.
512
513              This option is also usually necessary the  first  time  a
514              package  is  pushed with dgit push to a particular suite.
515              See dgit-maint-*(7).
516
517              If previous-version is not  specified,  dgit  will  check
518              that  the  version  in  the  archive is mentioned in your
519              debian/changelog.  (This will avoid losing changes,  even
520              with  --overwrite,  unless  someone  committed  to  git a
521              finalised changelog entry, and then made later changes to
522              that  version.)   If  previous-version  is  specified, it
523              ought to be the version currently in the archive.
524
525              dgit push --overwrite will, if necessary, make a  pseudo-
526              merge  (that  is, something that looks like the result of
527              git merge -s ours) to stitch the archive's  version  into
528              your own git history, so that your push is a fast forward
529              from the archive.
530
531              (In quilt mode gbp, dpm or unpatched,  implying  a  split
532              between  the  dgit  view  and  the  maintainer  view, the
533              pseudo-merge will appear only in the dgit view.)
534
535       --delayed=days
536              Upload to a DELAYED queue.
537
538              WARNING: If the maintainer responds  by  cancelling  your
539              upload  from  the  queue,  and does not make an upload of
540              their own, this will not rewind the  git  branch  on  the
541              dgit  git  server.   Other  dgit users will then see your
542              push (with a warning message from dgit) even  though  the
543              maintainer wanted to abolish it.  Such users might unwit‐
544              tingly reintroduce your changes.
545
546              If this situation arises, someone should make a  suitable
547              dgit  push to update the contents of dgit-repos to a ver‐
548              sion without the controversial changes.
549
550       --no-chase-dsc-distro
551              Tells dgit not to look online for additional git  reposi‐
552              tories  containing  information  about  a particular .dsc
553              being imported.  Chasing is the default.
554
555              For most operations (such as fetch and  pull),  disabling
556              chasing  means  dgit  will access only the git server for
557              the distro you are directly working  with,  even  if  the
558              .dsc  was  copied  verbatim  from  another  distro.   For
559              import-dsc, disabling chasing means dgit will  work  com‐
560              pletely offline.
561
562              Disabling  chasing  can be hazardous: if the .dsc names a
563              git commit which has been rewritten by those in charge of
564              the  distro,  this  option  may prevent that rewrite from
565              being effective.  Also, it can mean that  dgit  fails  to
566              find necessary git commits.
567
568       --save-dgit-view=branch|ref
569              Specifies  that when a split view quilt mode is in opera‐
570              tion, and dgit calculates (or looks up in  its  cache)  a
571              dgit  view corresponding to your HEAD, the dgit view will
572              be left in ref.  The  specified  ref  is  unconditionally
573              overwritten, so don't specify a branch you want to keep.
574
575              This  option  is effective only with the following opera‐
576              tions: quilt-fixup; push; all builds.   And  it  is  only
577              effective      with     --[quilt=]gbp,     --[quilt=]dpm,
578              --quilt=unpatched.
579
580              If ref does not start with refs/ it  is  taken  to  be  a
581              branch - i.e. refs/heads/ is prepended.
582
583              --dgit-view-save  is  a deprecated alias for --save-dgit-
584              view.
585
586       --deliberately-something
587              Declare that you are deliberately doing something.   This
588              can  be used to override safety catches, including safety
589              catches which relate to  distro-specific  policies.   The
590              use  of  --deliberately  is declared and published in the
591              signed tags generated for you by dgit, so  that  the  ar‐
592              chive  software  can  give effect to your intent, and for
593              the benefit of humans looking at the history.  The  mean‐
594              ings  of  somethings  understood in the context of Debian
595              are discussed below:
596
597       --deliberately-not-fast-forward
598              Declare that  you  are  deliberately  rewinding  history.
599              When  pushing  to  Debian, use this when you are making a
600              renewed upload of an entirely new  source  package  whose
601              previous  version  was  not accepted for release from NEW
602              because of problems with copyright or redistributibility.
603
604              In split view quilt modes, this also  prevents  the  con‐
605              struction  by dgit of a pseudomerge to make the dgit view
606              fast forwarding.  Normally only one of --overwrite (which
607              creates  a  suitable pseudomerge) and --deliberately-not-
608              fast-forward (which suppresses the  pseudomerge  and  the
609              fast  forward  checks)  should  be needed; --overwrite is
610              usually better.
611
612       --deliberately-include-questionable-history
613              Declare that you are deliberately including, in  the  git
614              history  of  your  current push, history which contains a
615              previously-submitted version of this  package  which  was
616              not  approved  (or has not yet been approved) by the ftp‐
617              masters.  When pushing to Debian, only  use  this  option
618              after  verifying  that: none of the rejected-from-NEW (or
619              never-accepted) versions in the git history of your  cur‐
620              rent  push,  were  rejected by ftpmaster for copyright or
621              redistributability reasons.
622
623       --deliberately-fresh-repo
624              Declare that you are deliberately rewinding  history  and
625              want  to throw away the existing repo.  Not relevant when
626              pushing to Debian, as the  Debian  server  will  do  this
627              automatically when necessary.
628
629       --quilt=linear
630              When  fixing  up  source  format  `3.0 (quilt)' metadata,
631              insist on generating a linear patch stack: one new  patch
632              for each relevant commit.  If such a stack cannot be gen‐
633              erated, fail.  This is the default for Debian.
634
635              HEAD should be a series of plain  commits  (not  touching
636              debian/patches/),  and  pseudomerges,  with as ancestor a
637              patches-applied branch.
638
639       --quilt=auto
640              When fixing up source format `3.0 (quilt)' metadata, pre‐
641              fer   to   generate   a   linear  patch  stack  (as  with
642              --quilt=auto) but if that doesn't seem possible,  try  to
643              generate a single squashed patch for all the changes made
644              in git (as with --quilt=smash).  This is not a good  idea
645              for an NMU in Debian.
646
647       --quilt=smash
648              When fixing up source format `3.0 (quilt)' metadata, gen‐
649              erate a single additional patch for all the changes  made
650              in git.  This is not a good idea for an NMU in Debian.
651
652              (If HEAD has any in-tree patches already, they must apply
653              cleanly.  This will be the case for any trees produced by
654              dgit  fetch  or  clone; if you do not change the upstream
655              version nor  make  changes  in  debian/patches,  it  will
656              remain true.)
657
658       --quilt=nofix
659              Check  whether source format `3.0 (quilt)' metadata would
660              need fixing up, but, if it does, fail.  You must then fix
661              the  metadata  yourself somehow before pushing.  (NB that
662              dpkg-source --commit will not work because the  dgit  git
663              tree does not have a .pc directory.)
664
665       --quilt=nocheck | --no-quilt-fixup
666              Do not check whether source format `3.0 (quilt)' metadata
667              needs fixing up.  If you use this option and the metadata
668              did in fact need fixing up, dgit push will fail.
669
670       --[quilt=]gbp | --[quilt=]dpm | --quilt=unapplied
671              Tell dgit that you are using a nearly-dgit-compatible git
672              branch, aka a maintainer  view,  and  do  not  want  your
673              branch changed by dgit.
674
675              --gbp  (short for --quilt=gbp) is for use with git-build‐
676              package.  Your HEAD is expected to be a patches-unapplied
677              git  branch,  except  that  it  might  contain changes to
678              upstream .gitignore files.  This is the default for  dgit
679              gbp-build.
680
681              --dpm  (short  for  --quilt=dpm) is for use with git-dpm.
682              Your HEAD is expected to be a patches-applied git branch,
683              except  that it might contain changes to upstream .gitig‐
684              nore files.
685
686              --quilt=unapplied specifies that your HEAD is a  patches-
687              unapplied  git  branch  (and that any changes to upstream
688              .gitignore  files   are   represented   as   patches   in
689              debian/patches).
690
691              With  --quilt=gbp|dpm|unapplied, dgit push (or precursors
692              like quilt-fixup and build) will automatically generate a
693              conversion  of your git branch into the right form.  dgit
694              push will push the dgit-compatible form (the  dgit  view)
695              to the dgit git server.  The dgit view will be visible to
696              you in the dgit remote tracking branches,  but  your  own
697              branch will not be modified.  dgit push will create a tag
698              debian/version for the maintainer view, and the dgit  tag
699              archive/debian/version  for  the  dgit view.  dgit quilt-
700              fixup will merely do some checks,  and  cache  the  main‐
701              tainer view.
702
703              If you have a branch like this it is essential to specify
704              the appropriate --quilt= option!  This is because  it  is
705              not  always  possible  to  tell:  a patches-unapplied git
706              branch of a package with one patch,  for  example,  looks
707              very  like  a  patches-applied  branch where the user has
708              used git revert to undo the patch, expecting to  actually
709              revert  it.   However,  if  you fail to specify the right
710              --quilt option, and  you  aren't  too  lucky,  dgit  will
711              notice the problem and stop, with a useful hint.
712
713       -ddistro | --distro=distro
714              Specifies  that  the  suite  to be operated on is part of
715              distro distro.  This overrides the  default  value  found
716              from  the git config option dgit-suite.suite.distro.  The
717              only effect is that other configuration  variables  (used
718              for  accessing the archive and dgit-repos) used are dgit-
719              distro.distro.*.
720
721              If your suite is part of a distro that dgit already knows
722              about,  you can use this option to make dgit work even if
723              your dgit doesn't know about  the  suite.   For  example,
724              specifying  -ddebian  will  work  when  the  suite  is an
725              unknown suite in the Debian archive.
726
727              To define a new distro it is necessary to define  methods
728              and  URLs  for  fetching (and, for dgit push, altering) a
729              variety of information both in the archive and  in  dgit-
730              repos.  How to set this up is not yet documented.
731
732       -Cchangesfile
733              Specifies  the .changes file which is to be uploaded.  By
734              default dgit push looks for a single .changes file in the
735              parent  directory  whose  filename suggests it is for the
736              right package and version.
737
738              If the specified changesfile pathname  contains  slashes,
739              the directory part is also used as the value for --build-
740              products-dir; otherwise, the changes file is expected  in
741              that directory (by default, in ..).
742
743       --rm-old-changes
744              When  doing  a  build,  delete any changes files matching
745              package_version_*.changes before starting.  This  ensures
746              that  dgit  push  (and dgit sbuild) will be able to unam‐
747              biguously identify the relevant changes  files  from  the
748              most  recent  build,  even  if  there  have been previous
749              builds with different tools or options.  The  default  is
750              not  to  remove,  but  --no-rm-old-changes can be used to
751              override a  previous  --rm-old-changes  or  the  .rm-old-
752              changes configuration setting.
753
754              Note  that  dgit  push-source  will always find the right
755              .changes, regardless of this option.
756
757       --build-products-dir=directory
758              Specifies where to find and create tarballs, binary pack‐
759              ages, source packages, .changes files, and so on.
760
761              By default, dgit uses the parent directory (..).
762
763              Changing  this  setting may necessitate moving .orig tar‐
764              balls to the new directory, so it is probably best to use
765              the dgit.default.build-products-dir configuration setting
766              (see CONFIGURATION, below) which this command line option
767              overrides).
768
769       --no-rm-on-error
770              Do not delete the destination directory if clone fails.
771
772       --dep14tag
773              Generates  a  DEP-14 tag (eg debian/version) as well as a
774              dgit  tag  (eg  archive/debian/version)  where  possible.
775              This is the default.
776
777       --no-dep14tag
778              Do  not generate a DEP-14 tag, except in split quilt view
779              mode.  (On servers where only the old tag format is  sup‐
780              ported,  the  dgit  tag  will have the DEP-14 name.  This
781              option does not prevent that.)
782
783       --dep14tag-always
784              Insist on generating a DEP-14 tag as well as a dgit  tag.
785              If the server does not support that, dgit push will fail.
786
787       -D     Prints  debugging  information  to stderr.  Repeating the
788              option produces more output (currently, up  to  -DDDD  is
789              meaningfully different).
790
791       -cname=value
792              Specifies a git configuration option, to be used for this
793              run.  dgit itself is also controlled by git configuration
794              options.
795
796       -vversion|_ | --since-version=version|_
797              Specifies  the  -vversion  option  to  pass  to dpkg-gen‐
798              changes, during builds.  Changes (from  debian/changelog)
799              since  this version will be included in the built changes
800              file, and hence in the upload.  If  this  option  is  not
801              specified, dgit will query the archive and use the latest
802              version uploaded to the intended suite.
803
804              Specifying _ inhibits this, so that no -v option will  be
805              passed to dpkg-genchanges (and as a result, only the last
806              stanza from debian/changelog will be used for  the  build
807              and upload).
808
809       -mmaintaineraddress
810              Passed to dpkg-genchanges (eventually).
811
812       --ch:option
813              Specifies a single additional option to pass, eventually,
814              to dpkg-genchanges.
815
816              Options which are safe to pass include -C (and  also  -si
817              -sa  -sd  although  these  should never be necessary with
818              Debian since dgit automatically calculates whether .origs
819              need to be uploaded.)
820
821              For other options the caveat below applies.
822
823       --curl:option | --dput:option |...
824              Specifies  a  single  additional  option to pass to curl,
825              dput, debsign, dpkg-source, dpkg-buildpackage,  dpkg-gen‐
826              changes,  sbuild,  pbuilder,  cowbuilder, ssh, dgit, git-
827              debrebase,  apt-get,  apt-cache,  gbp-pq,  gbp-build,  or
828              mergechanges.  Can be repeated as necessary.
829
830              Use of this ability should not normally be necessary.  It
831              is provided for working around  bugs,  or  other  unusual
832              situations.   If  you  use these options, you may violate
833              dgit's assumptions about the behaviour of its subprograms
834              and cause lossage.
835
836              For  dpkg-buildpackage, dpkg-genchanges, mergechanges and
837              sbuild, the option  applies  only  when  the  program  is
838              invoked  directly  by dgit.  Usually, for passing options
839              to dpkg-genchanges, you should use --ch:option.
840
841              Specifying --git is not effective  for  some  lower-level
842              read-only  git operations performed by dgit, and also not
843              when git is invoked by another program run by dgit.
844
845              See notes below regarding ssh and dgit.
846
847              NB that --gpg:option is not  supported  (because  debsign
848              does  not  have that facility).  But see -k and the keyid
849              distro config setting.
850
851       --curl!:option | --dput!:option |...
852              Specifies an option to remove from the command line for a
853              program  called by dgit, as for --program:option (and the
854              same caveats apply).
855
856              Any options or arguments exactly identical to option  are
857              removed.  (It is not an error if there were none.)
858
859              This  can only be used to delete options which are always
860              passed by default by dgit, or to undo a  previous  --pro‐
861              gram:option.   It  cannot  be  used to override option(s)
862              dynamically decided on by dgit.
863
864       --curl=program | --dput=program |...
865              Specifies alternative programs to use  instead  of  curl,
866              dput,  debsign, dpkg-source, dpkg-buildpackage, dpkg-gen‐
867              changes, sbuild, pbuilder, cowbuilder,  gpg,  ssh,  dgit,
868              git-debrebase,  apt-get,  apt-cache,  git,  gbp-pq,  gbp-
869              build, or mergechanges.
870
871              For dpkg-buildpackage, dpkg-genchanges, mergechanges  and
872              sbuild,  this  applies  only  when the program is invoked
873              directly by dgit.
874
875              For dgit, specifies the command to run on the remote host
876              when  dgit rpush needs to invoke a remote copy of itself.
877              (dgit also reinvokes itself as the EDITOR for dpkg-source
878              --commit; this is done using argv[0], and is not affected
879              by --dgit=).
880
881              gbp-build's value is used instead of gbp  build  or  git-
882              buildpackage.  (The default is the latter unless the for‐
883              mer exists on PATH.)  gbp-pq's value is used  instead  of
884              gbp pq.  In both cases, unusually, the specified value is
885              split on whitespace to produce  a  command  and  possibly
886              some options and/or arguments.
887
888              For  pbuilder  and  cowbuilder,  the defaults are sudo -E
889              pbuilder and sudo -E cowbuilder respectively.  Like  with
890              gbp-build  and  gbp  pq,  the specified value is split on
891              whitespace.
892
893              For ssh, the default value is taken from the DGIT_SSH  or
894              GIT_SSH  environment variables, if set (see below).  And,
895              for ssh, when accessing the archive and dgit-repos,  this
896              command  line  setting  is  overridden  by the git config
897              variables  dgit-distro.distro.ssh  and  .dgit.default.ssh
898              (which  can  in  turn be overridden with -c).  Also, when
899              dgit is using git to access dgit-repos, only  git's  idea
900              of what ssh to use (eg, GIT_SSH) is relevant.
901
902       --existing-package=package
903              dgit  push  needs  to canonicalise the suite name.  Some‐
904              times, dgit lacks a way to ask the  archive  to  do  this
905              without knowing the name of an existing package.  Without
906              --new we can just use the package we are trying to  push.
907              But  with  --new  that will not work, so we guess dpkg or
908              use the value of this option.  This option is not  needed
909              with the default mechanisms for accessing the archive.
910
911       -h|--help
912              Print a usage summary.
913
914       --initiator-tempdir=directory
915              dgit  rpush  uses  a  temporary directory on the invoking
916              (signing) host.  This option causes dgit to use directory
917              instead.   Furthermore,  the  specified directory will be
918              emptied, removed and recreated before dgit starts, rather
919              than  removed  after dgit finishes.  The directory speci‐
920              fied must be an absolute pathname.
921
922       --force-something
923              Instructs dgit to try to proceed despite  detecting  what
924              it thinks is going to be a fatal problem.  This is proba‐
925              bly not going to work.  These options are provided as  an
926              escape hatch, in case dgit is confused.  (They might also
927              be useful for testing error cases.)
928
929       --force-import-dsc-with-dgit-field
930              Tell dgit import-dsc to treat a .dsc with  a  Dgit  field
931              like  one without it.  The result is a fresh import, dis‐
932              carding the git history that the person who  pushed  that
933              .dsc was working with.
934
935       --force-uploading-binaries
936              Carry on and upload binaries even though dgit thinks your
937              distro does not permit that.
938
939       --force-uploading-source-only
940              Carry on and do a source-only upload, without  any  bina‐
941              ries, even though dgit thinks your distro does not permit
942              that, or does not permit that in this situation.
943
944       --force-unrepresentable
945              Carry on even if dgit thinks that your git tree  contains
946              changes  (relative  to  your  .orig tarballs) which dpkg-
947              source is not able to represent.  Your build or push will
948              probably fail later.
949
950       --force-changes-origs-exactly
951              Use  the  set  of  .origs  specified  in  your  .changes,
952              exactly,  without  regard  to  what  is  in  the  archive
953              already.  The archive may well reject your upload.
954
955       --force-unsupported-source-format
956              Carry on despite dgit not understanding your source pack‐
957              age format.  dgit will probably mishandle it.
958
959       --force-dsc-changes-mismatch
960              Do not check whether .dsc and .changes  match.   The  ar‐
961              chive will probably reject your upload.
962
963       --force-import-gitapply-absurd   |   --force-import-gitapply-no-
964       absurd
965              Force on or off the use of the absurd git-apply emulation
966              when  running gbp pq import when importing a package from
967              a .dsc.  See Debian bug #841867.
968

CONFIGURATION

970       dgit can be configured via the git config system.  You  may  set
971       keys  with  git-config (either in system-global or per-tree con‐
972       figuration), or provide -ckey=value on the dgit command line.
973
974       Settings likely to be useful for an end user include:
975
976       dgit.default.build-products-dir
977              Specifies where to find the built files to  be  uploaded,
978              when  --build-products-dir is not specified.  The default
979              is the parent directory (..).
980
981       dgit-suite.suite.distro distro
982              Specifies the distro for a  suite.   dgit  keys  off  the
983              suite  name  (which appears in changelogs etc.), and uses
984              that to determine the distro which is involved.  The con‐
985              fig used is thereafter that for the distro.
986
987              suite may be a glob pattern.
988
989       dgit.default.distro distro
990              The default distro for an unknown suite.
991
992       dgit.default.default-suite suite
993              The default suite (eg for clone).
994
995       dgit.default.*
996              for  each dgit-distro.distro.*, the default value used if
997              there is no distro-specific setting.
998
999       dgit-distro.distro.clean-mode
1000              One of the values for the command line  --clean=  option;
1001              used if --clean is not specified.
1002
1003       dgit-distro.distro.clean-mode-newer
1004              Like  .clean-mode, but ignored if the value is unknown to
1005              this version  of  dgit.   Setting  both  .clean-mode  and
1006              .clean-mode-newer  is useful to provide a single git con‐
1007              fig compatible with different dgit versions.
1008
1009       dgit-distro.distro.quilt-mode
1010              One of the values for the command line  --quilt=  option;
1011              used if --quilt is not specified.
1012
1013       dgit-distro.distro.rm-old-changes
1014              Boolean,  used  if  neither --rm-old-changes nor --no-rm-
1015              old-changes is specified.  The default is not to remove.
1016
1017       dgit-distro.distro.readonly auto|a | true|t|y|1 | false|f|n|0
1018              Whether you have push access to the distro.  For  Debian,
1019              it is OK to use auto, which uses readonly mode if you are
1020              not pushing right now; but, setting this  to  false  will
1021              avoid  relying  on  the mirror of the dgit git repository
1022              server.
1023
1024       dgit-distro.distro.keyid
1025              See also -k.
1026
1027       dgit-distro.distro.mirror url
1028
1029       dgit-distro.distro.username
1030              Not relevant for Debian.
1031
1032       dgit-distro.distro.upload-host
1033              Might be useful if you have an intermediate queue server.
1034
1035       dgit-distro.distro.user-name dgit-distro.distro.user-email
1036              Values to configure for user.name and user.email  in  new
1037              git  trees.   If not specified, the DEBFULLNAME and DEBE‐
1038              MAIL environment variables are used, respectively.   Only
1039              used if .setup-usermail is not disabled.
1040
1041       dgit-distro.distro.setup-useremail
1042              Whether to set user.name and user.email in new git trees.
1043              True by default.  Ignored for dgit setup-useremail, which
1044              does it anyway.
1045
1046       dgit-distro.distro.setup-mergechangelogs
1047              Whether  to  set  up  a  merge  driver  which  uses dpkg-
1048              mergechangelogs for debian/changelog.  True  by  default.
1049              Ignored  for  dgit  setup-mergechangelogs,  which does it
1050              anyway.
1051
1052       dgit-distro.distro.setup-gitattributes
1053              Whether to  configure  .git/info/attributes  to  suppress
1054              checkin/checkout  file content transformations in new git
1055              trees.  True by default.  Ignored for  dgit  setup-gitat‐
1056              tributes, which does it anyway.
1057
1058       dgit-distro.distro.cmd-cmd
1059              Program to use instead of cmd.  Works like --cmd=... .
1060
1061       dgit-distro.distro.opts-cmd
1062              Extra options to pass to cmd.  Works like --cmd:... .  To
1063              pass several options, configure multiple  values  in  git
1064              config   (with   git  config  --add).   The  options  for
1065              dgit.default.opts-cmd  and  dgit-distro.distro/push.opts-
1066              cmd are all used, followed by options from dgit's command
1067              line.
1068

ACCESS CONFIGURATION

1070       There are many other settings which  specify  how  a  particular
1071       distro's  services (archive and git) are provided.  These should
1072       not normally be adjusted, but are documented for the benefit  of
1073       distros who wish to adopt dgit.
1074
1075       dgit-distro.distro.nominal-distro
1076              Shown in git tags, Dgit fields, and so on.
1077
1078       dgit-distro.distro.alias-canon
1079              Used for all access configuration lookup.
1080
1081       dgit-distro.distro/push.*
1082              If  set,  overrides  corresponding  non /push config when
1083              readonly=false, or when pushing and readonly=auto.
1084
1085       dgit-distro.distro.git-url
1086
1087       dgit-distro.distro.git-url[-suffix]
1088
1089       dgit-distro.distro.git-proto
1090
1091       dgit-distro.distro.git-path
1092
1093       dgit-distro.distro.git-check true|false|url|ssh-cmd
1094
1095       dgit-distro.distro.git-check-suffix
1096
1097       dgit-distro.distro.diverts.divert new-distro|/distro-suffix
1098
1099       dgit-distro.distro.git-create ssh-cmd|true
1100
1101       dgit-distro.distro.archive-query ftpmasterapi: |  madison:distro
1102       | dummycat:/path  | sshpsql:user@host:dbname
1103
1104       dgit-distro.distro.archive-query-(url|tls-key|curl-ca-args)
1105
1106       dgit-distro.distro.madison-distro
1107
1108       dgit-distro.distro.archive-query-default-component
1109
1110       dgit-distro.distro.dgit-tag-format
1111
1112       dgit-distro.distro.dep14tag want|no|always
1113
1114       dgit-distro.distro.ssh
1115
1116       dgit-distro.distro.sshpsql-dbname
1117
1118       dgit-distro.distro.(git|sshpsql)-(user|host|user-force)
1119
1120       dgit-distro.distro.backports-quirk
1121
1122       dgit-distro.distro.rewrite-map-enable
1123
1124       dgit-distro.distro.source-only-uploads      ok|always|never|not-
1125       wholly-new
1126
1127       dgit.default.old-dsc-distro
1128
1129       dgit.dsc-url-proto-ok.protocol
1130
1131       dgit.dsc-url-proto-ok.bad-syntax
1132
1133       dgit.default.dsc-url-proto-ok
1134
1135       dgit.vcs-git.suites suite[;...]
1136

ENVIRONMENT VARIABLES

1138       DGIT_SSH, GIT_SSH
1139              specify an alternative default program (and perhaps argu‐
1140              ments)  to  use  instead  of  ssh.  DGIT_SSH is consulted
1141              first and may  contain  arguments;  if  it  contains  any
1142              whitespace  will  be passed to the shell.  GIT_SSH speci‐
1143              fies just the program; no arguments can be specified,  so
1144              dgit  interprets  it  the same way as git does.  See also
1145              the --ssh= and --ssh: options.
1146
1147       DEBEMAIL, DEBFULLNAME
1148              Default git user.email and user.name for new trees.   See
1149              dgit setup-new-tree.
1150
1151       gpg, dpkg-..., debsign, git, curl, dput, LWP::UserAgent
1152              and  other  subprograms  and  modules  used  by  dgit are
1153              affected by various environment variables.   Consult  the
1154              documentation for those programs for details.
1155

BUGS

1157       There  should  be  a  `dgit rebase-prep' command or some such to
1158       turn a fast-forwarding branch containing pseudo-merges back into
1159       a  rebasing  patch  stack.   It might have to leave a note for a
1160       future dgit push.
1161
1162       If the dgit push fails halfway through, it  is  not  necessarily
1163       restartable  and idempotent.  It would be good to check that the
1164       proposed signing key is available before starting work.
1165
1166       dgit's build functions, and dgit push, may make changes to  your
1167       current  HEAD.  Sadly this is necessary for packages in the `3.0
1168       (quilt)' source format.  This is ultimately due to what  I  con‐
1169       sider design problems in quilt and dpkg-source.
1170
1171       --dry-run  does  not  always work properly, as not doing some of
1172       the git fetches may result in subsequent actions  being  differ‐
1173       ent.   Doing  a non-dry-run dgit fetch first will help.  --damp-
1174       run is likely to work much better.
1175

SEE ALSO

1177       dgit(7), dgit-*(7), curl(1), dput(1), debsign(1), git-config(1),
1178       git-buildpackage(1), dpkg-buildpackage(1),
1179       https://browse.dgit.debian.org/
1180
1181
1182
1183Debian Project                                                         dgit(1)
Impressum