1dgit(1) dgit dgit(1)
2
3
4
6 dgit - git integration with the Debian archive
7
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
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
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
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 Note that this does not prevent dgit from cleaning your
494 tree, so if the changes in your working tree are in the
495 form of untracked files, those might still be deleted,
496 especially with --clean=git. If you want to include
497 untracked files in the build, you can use --clean=none or
498 --clean=dpkg-source[-d] in addition to --include-dirty.
499 Note that this combination can fail if the untracked
500 files are under debian/patches/.
501
502 --ignore-dirty
503 Deprecated alias for --include-dirty.
504
505 --overwrite[=previous-version]
506 Declare that your HEAD really does contain all the
507 (wanted) changes from all versions listed in its
508 changelog; or, all (wanted) changes from previous-ver‐
509 sion. This promise is needed when your git branch is not
510 a descendant of the version in the archive according to
511 the git revision history.
512
513 It is safer not to specify previous-version, and usually
514 it's not needed. Just say --overwrite, unless you know
515 what you are doing.
516
517 This option is useful if you are the maintainer, and you
518 have incorporated NMU changes into your own git workflow
519 in a way that doesn't make your branch a fast forward
520 from the NMU. It can also be useful when there was an
521 upload made without dgit since the most recent upload
522 made with dgit.
523
524 This option is also usually necessary the first time a
525 package is pushed with dgit push to a particular suite.
526 See dgit-maint-*[1m(7).
527
528 If previous-version is not specified, dgit will check
529 that the version in the archive is mentioned in your
530 debian/changelog. (This will avoid losing changes, even
531 with --overwrite, unless someone committed to git a
532 finalised changelog entry, and then made later changes to
533 that version.) If previous-version is specified, it
534 ought to be the version currently in the archive.
535
536 dgit push --overwrite will, if necessary, make a pseudo-
537 merge (that is, something that looks like the result of
538 git merge -s ours) to stitch the archive's version into
539 your own git history, so that your push is a fast forward
540 from the archive.
541
542 (In quilt mode gbp, dpm, unpatched or baredebian*, imply‐
543 ing a split between the dgit view and the maintainer
544 view, the pseudo-merge will appear only in the dgit
545 view.)
546
547 --delayed=days
548 Upload to a DELAYED queue.
549
550 WARNING: If the maintainer responds by cancelling your
551 upload from the queue, and does not make an upload of
552 their own, this will not rewind the git branch on the
553 dgit git server. Other dgit users will then see your
554 push (with a warning message from dgit) even though the
555 maintainer wanted to abolish it. Such users might unwit‐
556 tingly reintroduce your changes.
557
558 If this situation arises, someone should make a suitable
559 dgit push to update the contents of dgit-repos to a ver‐
560 sion without the controversial changes.
561
562 --no-chase-dsc-distro
563 Tells dgit not to look online for additional git reposi‐
564 tories containing information about a particular .dsc
565 being imported. Chasing is the default.
566
567 For most operations (such as fetch and pull), disabling
568 chasing means dgit will access only the git server for
569 the distro you are directly working with, even if the
570 .dsc was copied verbatim from another distro. For
571 import-dsc, disabling chasing means dgit will work com‐
572 pletely offline.
573
574 Disabling chasing can be hazardous: if the .dsc names a
575 git commit which has been rewritten by those in charge of
576 the distro, this option may prevent that rewrite from
577 being effective. Also, it can mean that dgit fails to
578 find necessary git commits.
579
580 --save-dgit-view=branch|ref
581 Specifies that when split view is in operation, and dgit
582 calculates (or looks up in its cache) a dgit view corre‐
583 sponding to your HEAD, the dgit view will be left in ref.
584 The specified ref is unconditionally overwritten, so
585 don't specify a branch you want to keep.
586
587 This option is effective only with the following opera‐
588 tions: quilt-fixup; push; all builds. And it is only
589 effective when split view is actually in operation.
590
591 If ref does not start with refs/ it is taken to be a
592 branch - i.e. refs/heads/ is prepended.
593
594 --dgit-view-save is a deprecated alias for --save-dgit-
595 view.
596
597 --deliberately-something
598 Declare that you are deliberately doing something. This
599 can be used to override safety catches, including safety
600 catches which relate to distro-specific policies. The
601 use of --deliberately is declared and published in the
602 signed tags generated for you by dgit, so that the ar‐
603 chive software can give effect to your intent, and for
604 the benefit of humans looking at the history. The mean‐
605 ings of somethings understood in the context of Debian
606 are discussed below:
607
608 --deliberately-not-fast-forward
609 Declare that you are deliberately rewriting history.
610 This could be because your branch is not fast forward
611 from the dgit server history, or not fast forward from a
612 locally-synthesised dsc import.
613
614 When pushing to Debian, use this only when you are making
615 a renewed upload of an entirely new source package whose
616 previous version was not accepted for release from NEW
617 because of problems with copyright or redistributibility;
618 or, exceptionally, for the very first upload with dgit.
619
620 When split view is in operation, this also prevents the
621 construction by dgit of a pseudomerge to make the dgit
622 view fast forwarding. Normally only one of --overwrite
623 (which creates a suitable pseudomerge) and --deliber‐
624 ately-not-fast-forward (which suppresses the pseudomerge
625 and the fast forward checks) should be needed; --over‐
626 write is usually better.
627
628 --deliberately-include-questionable-history
629 Declare that you are deliberately including, in the git
630 history of your current push, history which contains a
631 previously-submitted version of this package which was
632 not approved (or has not yet been approved) by the ftp‐
633 masters. When pushing to Debian, only use this option
634 after verifying that: none of the rejected-from-NEW (or
635 never-accepted) versions in the git history of your cur‐
636 rent push, were rejected by ftpmaster for copyright or
637 redistributability reasons.
638
639 --deliberately-fresh-repo
640 Declare that you are deliberately rewriting history and
641 want to throw away the existing repo. Not relevant when
642 pushing to Debian, as the Debian server will do this
643 automatically when necessary.
644
645 --quilt=linear
646 When fixing up source format `3.0 (quilt)' metadata,
647 insist on generating a linear patch stack: one new patch
648 for each relevant commit. If such a stack cannot be gen‐
649 erated, fail. This is the default for Debian.
650
651 HEAD should be a series of plain commits (not touching
652 debian/patches/), and pseudomerges, with as ancestor a
653 patches-applied branch.
654
655 --quilt=auto
656 When fixing up source format `3.0 (quilt)' metadata, pre‐
657 fer to generate a linear patch stack (as with
658 --quilt=linear) but if that doesn't seem possible, try to
659 generate a single squashed patch for all the changes made
660 in git (as with --quilt=smash). This is not a good idea
661 for an NMU in Debian.
662
663 --quilt=smash
664 When fixing up source format `3.0 (quilt)' metadata, gen‐
665 erate a single additional patch for all the changes made
666 in git. This is not a good idea for an NMU in Debian.
667
668 (If HEAD has any in-tree patches already, they must apply
669 cleanly. This will be the case for any trees produced by
670 dgit fetch or clone; if you do not change the upstream
671 version nor make changes in debian/patches, it will
672 remain true.)
673
674 --quilt=nofix
675 Check whether source format `3.0 (quilt)' metadata would
676 need fixing up, but, if it does, fail. You must then fix
677 the metadata yourself somehow before pushing. (NB that
678 dpkg-source --commit will not work because the dgit git
679 tree does not have a .pc directory.)
680
681 --quilt=nocheck | --no-quilt-fixup
682 Do not check whether source format `3.0 (quilt)' metadata
683 needs fixing up. If you use this option and the metadata
684 did in fact need fixing up, dgit push will fail.
685
686 --[quilt=]gbp | --[quilt=]dpm | --quilt=unapplied |
687 --[quilt=]baredebian[+git|+tarball]
688 Tell dgit that you are using a nearly-dgit-compatible git
689 branch, aka a maintainer view, and do not want your
690 branch changed by dgit.
691
692 These quilt modes are known as splitting quilt modes.
693 See --split-view, below.
694
695 --gbp (short for --quilt=gbp) is for use with git-build‐
696 package. Your HEAD is expected to be a patches-unapplied
697 git branch, except that it might contain changes to
698 upstream .gitignore files. This is the default for dgit
699 gbp-build.
700
701 --dpm (short for --quilt=dpm) is for use with git-dpm.
702 Your HEAD is expected to be a patches-applied git branch,
703 except that it might contain changes to upstream .gitig‐
704 nore files.
705
706 --quilt=unapplied specifies that your HEAD is a patches-
707 unapplied git branch (and that any changes to upstream
708 .gitignore files are represented as patches in
709 debian/patches).
710
711 --quilt=baredebian (or its alias --quilt=baredebian+git)
712 specifies that your HEAD contains only a debian/ direc‐
713 tory, with any changes to upstream files represented as
714 patches in debian/patches. The upstream source must be
715 available in git, by default, in a suitably named git
716 tag; see --upstream-commitish. In this mode, dgit cannot
717 check that all edited upstream files are properly repre‐
718 sented as patches: dgit relies on debian/patches being
719 correct.
720
721 --quilt=baredebian+tarball is like --quilt=baredebian,
722 but is used when there is no appropriate upstream git
723 history. To construct the dgit view, dgit will import
724 your orig tarballs' contents into git. In this mode,
725 dgit cannot check that the upstream parts of your upload
726 correspond to what you intend: dgit relies on the right
727 orig tarball(s) existing, and debian/patches being cor‐
728 rect.
729
730 With --quilt=gbp|dpm|unapplied|baredebian*, dgit push (or
731 precursors like quilt-fixup and build) will automatically
732 generate a conversion of your git branch into the right
733 form. dgit push will push the dgit-compatible form (the
734 dgit view) to the dgit git server. The dgit view will be
735 visible to you in the dgit remote tracking branches, but
736 your own branch will not be modified. dgit push will
737 create a tag debian/version for the maintainer view, and
738 the dgit tag archive/debian/version for the dgit view.
739 dgit quilt-fixup will merely do some checks, and cache
740 the maintainer view.
741
742 If you have a branch like this it is essential to specify
743 the appropriate --quilt= option! This is because it is
744 not always possible to tell: a patches-unapplied git
745 branch of a package with one patch, for example, looks
746 very like a patches-applied branch where the user has
747 used git revert to undo the patch, expecting to actually
748 revert it. However, if you fail to specify the right
749 --quilt option, and you aren't too lucky, dgit will
750 notice the problem and stop, with a useful hint.
751
752 -ddistro | --distro=distro
753 Specifies that the suite to be operated on is part of
754 distro distro. This overrides the default value found
755 from the git config option dgit-suite.suite.distro. The
756 only effect is that other configuration variables (used
757 for accessing the archive and dgit-repos) used are dgit-
758 distro.distro.*.
759
760 If your suite is part of a distro that dgit already knows
761 about, you can use this option to make dgit work even if
762 your dgit doesn't know about the suite. For example,
763 specifying -ddebian will work when the suite is an
764 unknown suite in the Debian archive.
765
766 To define a new distro it is necessary to define methods
767 and URLs for fetching (and, for dgit push, altering) a
768 variety of information both in the archive and in dgit-
769 repos. How to set this up is not yet documented.
770
771 --split-view=auto|always|never
772 Controls whether dgit operates a split view, separating
773 your own branch (as Debian maintainer) from that shown to
774 users of dgit clone and dgit fetch.
775
776 When split view is in operation dgit will not make or
777 merge any commits onto your own branch. Specifically,
778 only the dgit view will contain dgit's pseudomerges,
779 which bring into the git history previous uploads made
780 with dgit push, and any commits in debian/patches
781 required to make a correct `3.0 (quilt)' source package.
782
783 auto is the default, and splits the view only when
784 needed: i.e., when you are working with a `3.0 (quilt)'
785 source package and a splitting quilt mode: --[quilt=]gbp,
786 dpm, unpatched or baredebian*.
787
788 always splits the view regardless of the source format
789 and the quilt mode.
790
791 never will cause dgit to fail if split view is needed.
792
793 When split view is in operation, the dgit view is visible
794 in your local git clone, but only in refs specific to
795 dgit: notably remotes/dgit/dgit/suite and archive/dis‐
796 tro/version.
797
798 Note that split view does not affect dgit fetch, and is
799 not compatible with dgit pull.
800
801 -Cchangesfile
802 Specifies the .changes file which is to be uploaded. By
803 default dgit push looks for a single .changes file in the
804 parent directory whose filename suggests it is for the
805 right package and version.
806
807 If the specified changesfile pathname contains slashes,
808 the directory part is also used as the value for --build-
809 products-dir; otherwise, the changes file is expected in
810 that directory (by default, in ..).
811
812 --upstream-commitish=upstream
813 For use with --quilt=baredebian only. Specifies the com‐
814 mit containing the upstream source. This commit must be
815 identical to your .orig tarball. The default is to look
816 for one of the git tags U vU upstream/U (in that order),
817 where U is the upstream version.
818
819 --rm-old-changes
820 When doing a build, delete any changes files matching
821 package_version_*.changes before starting. This ensures
822 that dgit push (and dgit sbuild) will be able to unam‐
823 biguously identify the relevant changes files from the
824 most recent build, even if there have been previous
825 builds with different tools or options. The default is
826 not to remove, but --no-rm-old-changes can be used to
827 override a previous --rm-old-changes or the .rm-old-
828 changes configuration setting.
829
830 Note that dgit push-source will always find the right
831 .changes, regardless of this option.
832
833 --build-products-dir=directory
834 Specifies where to find and create tarballs, binary pack‐
835 ages, source packages, .changes files, and so on.
836
837 By default, dgit uses the parent directory (..).
838
839 Changing this setting may necessitate moving .orig tar‐
840 balls to the new directory, so it is probably best to use
841 the dgit.default.build-products-dir configuration setting
842 (see CONFIGURATION, below) which this command line option
843 overrides).
844
845 --no-rm-on-error
846 Do not delete the destination directory if clone fails.
847
848 --dep14tag
849 Generates a DEP-14 tag (eg debian/version) as well as a
850 dgit tag (eg archive/debian/version). This is the
851 default.
852
853 --no-dep14tag
854 Do not generate a DEP-14 tag, except when split view is
855 in operation.
856
857 --always-dep14tag
858 Obsolete alias for --dep14tag, retained for compatibil‐
859 ity.
860
861 -D Prints debugging information to stderr. Repeating the
862 option produces more output (currently, up to -DDDD is
863 meaningfully different).
864
865 -cname=value
866 Specifies a git configuration option, to be used for this
867 run. dgit itself is also controlled by git configuration
868 options.
869
870 -vversion|_ | --since-version=version|_
871 Specifies the -vversion option to pass to dpkg-gen‐
872 changes, during builds. Changes (from debian/changelog)
873 since this version will be included in the built changes
874 file, and hence in the upload. If this option is not
875 specified, dgit will query the archive and use the latest
876 version uploaded to the intended suite.
877
878 Specifying _ inhibits this, so that no -v option will be
879 passed to dpkg-genchanges (and as a result, only the last
880 stanza from debian/changelog will be used for the build
881 and upload).
882
883 -mmaintaineraddress
884 Passed to dpkg-genchanges (eventually).
885
886 --ch:option
887 Specifies a single additional option to pass, eventually,
888 to dpkg-genchanges.
889
890 Options which are safe to pass include -C (and also -si
891 -sa -sd although these should never be necessary with
892 Debian since dgit automatically calculates whether .origs
893 need to be uploaded.)
894
895 For other options the caveat below applies.
896
897 --curl:option | --dput:option |...
898 Specifies a single additional option to pass to curl,
899 dput, debsign, dpkg-source, dpkg-buildpackage, dpkg-gen‐
900 changes, sbuild, pbuilder, cowbuilder, ssh, dgit, git-
901 debrebase, apt-get, apt-cache, gbp-pq, gbp-build, or
902 mergechanges. Can be repeated as necessary.
903
904 Use of this ability should not normally be necessary. It
905 is provided for working around bugs, or other unusual
906 situations. If you use these options, you may violate
907 dgit's assumptions about the behaviour of its subprograms
908 and cause lossage.
909
910 For dpkg-buildpackage, dpkg-genchanges, mergechanges and
911 sbuild, the option applies only when the program is
912 invoked directly by dgit. Usually, for passing options
913 to dpkg-genchanges, you should use --ch:option.
914
915 Specifying --git is not effective for some lower-level
916 read-only git operations performed by dgit, and also not
917 when git is invoked by another program run by dgit.
918
919 See notes below regarding ssh and dgit.
920
921 NB that --gpg:option is not supported (because debsign
922 does not have that facility). But see -k and the keyid
923 distro config setting.
924
925 --curl!:option | --dput!:option |...
926 Specifies an option to remove from the command line for a
927 program called by dgit, as for --program:option (and the
928 same caveats apply).
929
930 Any options or arguments exactly identical to option are
931 removed. (It is not an error if there were none.)
932
933 This can only be used to delete options which are always
934 passed by default by dgit, or to undo a previous --pro‐
935 gram:option. It cannot be used to override option(s)
936 dynamically decided on by dgit.
937
938 --curl=program | --dput=program |...
939 Specifies alternative programs to use instead of curl,
940 dput, debsign, dpkg-source, dpkg-buildpackage, dpkg-gen‐
941 changes, sbuild, pbuilder, cowbuilder, gpg, ssh, dgit,
942 git-debrebase, apt-get, apt-cache, git, gbp-pq, gbp-
943 build, or mergechanges.
944
945 For dpkg-buildpackage, dpkg-genchanges, mergechanges and
946 sbuild, this applies only when the program is invoked
947 directly by dgit.
948
949 For dgit, specifies the command to run on the remote host
950 when dgit rpush needs to invoke a remote copy of itself.
951 (dgit also reinvokes itself as the EDITOR for dpkg-source
952 --commit; this is done using argv[0], and is not affected
953 by --dgit=).
954
955 gbp-build's value is used instead of gbp build or git-
956 buildpackage. (The default is the latter unless the for‐
957 mer exists on PATH.) gbp-pq's value is used instead of
958 gbp pq. In both cases, unusually, the specified value is
959 split on whitespace to produce a command and possibly
960 some options and/or arguments.
961
962 For pbuilder and cowbuilder, the defaults are sudo -E
963 pbuilder and sudo -E cowbuilder respectively. Like with
964 gbp-build and gbp pq, the specified value is split on
965 whitespace.
966
967 For ssh, the default value is taken from the DGIT_SSH or
968 GIT_SSH environment variables, if set (see below). And,
969 for ssh, when accessing the archive and dgit-repos, this
970 command line setting is overridden by the git config
971 variables dgit-distro.distro.ssh and .dgit.default.ssh
972 (which can in turn be overridden with -c). Also, when
973 dgit is using git to access dgit-repos, only git's idea
974 of what ssh to use (eg, GIT_SSH) is relevant.
975
976 --existing-package=package
977 dgit push needs to canonicalise the suite name. Some‐
978 times, dgit lacks a way to ask the archive to do this
979 without knowing the name of an existing package. Without
980 --new we can just use the package we are trying to push.
981 But with --new that will not work, so we guess dpkg or
982 use the value of this option. This option is not needed
983 with the default mechanisms for accessing the archive.
984
985 -h|--help
986 Print a usage summary.
987
988 --initiator-tempdir=directory
989 dgit rpush uses a temporary directory on the invoking
990 (signing) host. This option causes dgit to use directory
991 instead. Furthermore, the specified directory will be
992 emptied, removed and recreated before dgit starts, rather
993 than removed after dgit finishes. The directory speci‐
994 fied must be an absolute pathname.
995
996 --force-something
997 Instructs dgit to try to proceed despite detecting what
998 it thinks is going to be a fatal problem. This is proba‐
999 bly not going to work. These options are provided as an
1000 escape hatch, in case dgit is confused. (They might also
1001 be useful for testing error cases.)
1002
1003 --force-import-dsc-with-dgit-field
1004 Tell dgit import-dsc to treat a .dsc with a Dgit field
1005 like one without it. The result is a fresh import, dis‐
1006 carding the git history that the person who pushed that
1007 .dsc was working with.
1008
1009 --force-reusing-version
1010 Carry on even though this involves reusing a version num‐
1011 ber of a previous push or upload. It is normally best to
1012 give different versions different numbers. Some servers
1013 (including, usually, the Debian server) will reject
1014 attempts to reuse or replace already-pushed versions.
1015
1016 --force-uploading-binaries
1017 Carry on and upload binaries even though dgit thinks your
1018 distro does not permit that.
1019
1020 --force-uploading-source-only
1021 Carry on and do a source-only upload, without any bina‐
1022 ries, even though dgit thinks your distro does not permit
1023 that, or does not permit that in this situation.
1024
1025 --force-unrepresentable
1026 Carry on even if dgit thinks that your git tree contains
1027 changes (relative to your .orig tarballs) which dpkg-
1028 source is not able to represent. Your build or push will
1029 probably fail later.
1030
1031 --force-changes-origs-exactly
1032 Use the set of .origs specified in your .changes,
1033 exactly, without regard to what is in the archive
1034 already. The archive may well reject your upload.
1035
1036 --force-unsupported-source-format
1037 Carry on despite dgit not understanding your source pack‐
1038 age format. dgit will probably mishandle it.
1039
1040 --force-dsc-changes-mismatch
1041 Do not check whether .dsc and .changes match. The ar‐
1042 chive will probably reject your upload.
1043
1044 --force-import-gitapply-absurd | --force-import-gitapply-no-
1045 absurd
1046 Force on or off the use of the absurd git-apply emulation
1047 when running gbp pq import when importing a package from
1048 a .dsc. See Debian bug #841867.
1049
1050 --for-push
1051 Override the dgit-distro.distro.readonly configuration
1052 setting, to specify that we have read/write access and
1053 should use the corresponding git and achieve access
1054 approach even if the operation is a read-only one.
1055
1057 dgit can be configured via the git config system. You may set
1058 keys with git-config (either in system-global or per-tree con‐
1059 figuration), or provide -ckey=value on the dgit command line.
1060
1061 Settings likely to be useful for an end user include:
1062
1063 dgit.default.build-products-dir
1064 Specifies where to find the built files to be uploaded,
1065 when --build-products-dir is not specified. The default
1066 is the parent directory (..).
1067
1068 dgit-suite.suite.distro distro
1069 Specifies the distro for a suite. dgit keys off the
1070 suite name (which appears in changelogs etc.), and uses
1071 that to determine the distro which is involved. The con‐
1072 fig used is thereafter that for the distro.
1073
1074 suite may be a glob pattern.
1075
1076 dgit.default.distro distro
1077 The default distro for an unknown suite.
1078
1079 This is only used if no /usr/share/distro-info/somedis‐
1080 tro.csv mentions the specified suite.
1081
1082 dgit.default.default-suite suite
1083 The default suite (eg for clone).
1084
1085 dgit.default.*
1086 for each dgit-distro.distro.*, the default value used if
1087 there is no distro-specific setting.
1088
1089 dgit-distro.distro.clean-mode
1090 One of the values for the command line --clean= option;
1091 used if --clean is not specified.
1092
1093 dgit-distro.distro.clean-mode-newer
1094 Like .clean-mode, but ignored if the value is unknown to
1095 this version of dgit. Setting both .clean-mode and
1096 .clean-mode-newer is useful to provide a single git con‐
1097 fig compatible with different dgit versions.
1098
1099 dgit-distro.distro.quilt-mode
1100 One of the values for the command line --quilt= option;
1101 used if --quilt is not specified.
1102
1103 dgit-distro.distro.split-view
1104
1105 dgit-distro.distro.rm-old-changes
1106 Boolean, used if neither --rm-old-changes nor --no-rm-
1107 old-changes is specified. The default is not to remove.
1108
1109 dgit-distro.distro.readonly auto|a | true|t|y|1 | false|f|n|0
1110 Whether you have push access to the distro. For Debian,
1111 it is OK to use auto, which uses readonly mode if you are
1112 not pushing right now; but, setting this to false will
1113 avoid relying on the mirror of the dgit git repository
1114 server.
1115
1116 dgit-distro.distro.keyid
1117 See also -k.
1118
1119 dgit-distro.distro.mirror url
1120
1121 dgit-distro.distro.username
1122 Not relevant for Debian.
1123
1124 dgit-distro.distro.upload-host
1125 Might be useful if you have an intermediate queue server.
1126
1127 dgit-distro.distro.user-name dgit-distro.distro.user-email
1128 Values to configure for user.name and user.email in new
1129 git trees. If not specified, the DEBFULLNAME and DEBE‐
1130 MAIL environment variables are used, respectively. Only
1131 used if .setup-usermail is not disabled.
1132
1133 dgit-distro.distro.setup-useremail
1134 Whether to set user.name and user.email in new git trees.
1135 True by default. Ignored for dgit setup-useremail, which
1136 does it anyway.
1137
1138 dgit-distro.distro.setup-mergechangelogs
1139 Whether to set up a merge driver which uses dpkg-
1140 mergechangelogs for debian/changelog. True by default.
1141 Ignored for dgit setup-mergechangelogs, which does it
1142 anyway.
1143
1144 dgit-distro.distro.setup-gitattributes
1145 Whether to configure .git/info/attributes to suppress
1146 checkin/checkout file content transformations in new git
1147 trees. True by default. Ignored for dgit setup-gitat‐
1148 tributes, which does it anyway.
1149
1150 dgit-distro.distro.cmd-cmd
1151 Program to use instead of cmd. Works like --cmd=... .
1152
1153 dgit-distro.distro.opts-cmd
1154 Extra options to pass to cmd. Works like --cmd:... . To
1155 pass several options, configure multiple values in git
1156 config (with git config --add). The options for
1157 dgit.default.opts-cmd and dgit-distro.distro/push.opts-
1158 cmd are all used, followed by options from dgit's command
1159 line.
1160
1162 There are many other settings which specify how a particular
1163 distro's services (archive and git) are provided. These should
1164 not normally be adjusted, but are documented for the benefit of
1165 distros who wish to adopt dgit.
1166
1167 dgit-distro.distro.nominal-distro
1168 Shown in git tags, Dgit fields, and so on.
1169
1170 dgit-distro.distro.alias-canon
1171 Used for all access configuration lookup.
1172
1173 dgit-distro.distro/push.*
1174 If set, overrides corresponding non /push config when
1175 readonly=false, or when pushing and readonly=auto.
1176
1177 dgit-distro.distro.git-url
1178
1179 dgit-distro.distro.git-url[-suffix]
1180
1181 dgit-distro.distro.git-proto
1182
1183 dgit-distro.distro.git-path
1184
1185 dgit-distro.distro.git-check true|false|url|ssh-cmd
1186
1187 dgit-distro.distro.git-check-suffix
1188
1189 dgit-distro.distro.diverts.divert new-distro|/distro-suffix
1190
1191 dgit-distro.distro.git-create ssh-cmd|true
1192
1193 dgit-distro.distro.archive-query ftpmasterapi: | madison:distro
1194 | dummycat:/path | sshpsql:user@host:dbname | aptget:
1195
1196 dgit-distro.distro.archive-query-(url|tls-key|curl-ca-args)
1197
1198 dgit-distro.distro.madison-distro
1199
1200 dgit-distro.distro.archive-query-default-component
1201
1202 dgit-distro.distro.dgit-tag-format
1203
1204 dgit-distro.distro.dep14tag want|no[|always]
1205
1206 dgit-distro.distro.ssh
1207
1208 dgit-distro.distro.sshpsql-dbname
1209
1210 dgit-distro.distro.(git|sshpsql)-(user|host|user-force)
1211
1212 dgit-distro.distro.backports-quirk
1213
1214 dgit-distro.distro.rewrite-map-enable
1215
1216 dgit-distro.distro.source-only-uploads ok|always|never|not-
1217 wholly-new
1218
1219 dgit.default.old-dsc-distro
1220
1221 dgit.dsc-url-proto-ok.protocol
1222
1223 dgit.dsc-url-proto-ok.bad-syntax
1224
1225 dgit.default.dsc-url-proto-ok
1226
1227 dgit.vcs-git.suites suite[;...]
1228
1230 DGIT_SSH, GIT_SSH
1231 specify an alternative default program (and perhaps argu‐
1232 ments) to use instead of ssh. DGIT_SSH is consulted
1233 first and may contain arguments; if it contains any
1234 whitespace will be passed to the shell. GIT_SSH speci‐
1235 fies just the program; no arguments can be specified, so
1236 dgit interprets it the same way as git does. See also
1237 the --ssh= and --ssh: options.
1238
1239 DEBEMAIL, DEBFULLNAME
1240 Default git user.email and user.name for new trees. See
1241 dgit setup-new-tree.
1242
1243 gpg, dpkg-..., debsign, git, [lib]curl, dput
1244 and other subprograms and modules used by dgit are
1245 affected by various environment variables. Consult the
1246 documentation for those programs for details.
1247
1249 There should be a `dgit rebase-prep' command or some such to
1250 turn a fast-forwarding branch containing pseudo-merges back into
1251 a rebasing patch stack. It might have to leave a note for a
1252 future dgit push.
1253
1254 If the dgit push fails halfway through, it is not necessarily
1255 restartable and idempotent. It would be good to check that the
1256 proposed signing key is available before starting work.
1257
1258 dgit's build functions, and dgit push, may make changes to your
1259 current HEAD. Sadly this is necessary for packages in the `3.0
1260 (quilt)' source format. This is ultimately due to what I con‐
1261 sider design problems in quilt and dpkg-source.
1262
1263 --dry-run does not always work properly, as not doing some of
1264 the git fetches may result in subsequent actions being differ‐
1265 ent. Doing a non-dry-run dgit fetch first will help. --damp-
1266 run is likely to work much better.
1267
1269 dgit(7), dgit-*[22m(7), curl(1), dput(1), debsign(1), git-config(1),
1270 git-buildpackage(1), dpkg-buildpackage(1),
1271 https://browse.dgit.debian.org/
1272
1273
1274
1275Debian Project dgit(1)