dgit-maint-gbp(7)
π dgit-maint-gbp(7) π
okay bestie, so this is the section-7 manual page for dgit, and it's specifically the tutorial for package maintainers who are already living their git-buildpackage(1) truth. if that's you, come sit with me π«Ά
β¨ NAME β¨
dgit β tutorial for package maintainers already using git-buildpackage(1)
πΈ INTRODUCTION πΈ
So here's the vibe: this doc explains how dgit and git-debpush can be folded into a git-buildpackage(1) package-maintenance workflow. Read it together with git-buildpackage(1)'s own documentation, got it? They're a package deal π
Reasons you might wanna bring dgit into the workflow you already have:
- Benefit from dgit's safety catches π. Especially: making sure your upload always matches exactly your git HEAD. no cap.
- Give a better, more detailed git history to downstream dgit users β like the people using dgit to do an NMU (peep
dgit-nmu-simple(7)anddgit-user(7)).
Note that we assume a patches-unapplied repository: the upstream source committed to the git repository is unpatched. git-buildpackage(1) can work with patched-applied repositories, but it's normally used with patches-unapplied. just so you know π¦
π GIT CONFIGURATION π
If you've configured an export-dir in your gbp.conf, you should tell dgit about it:
% git config --global dgit.default.build-products-dir /home/spwhitton/build-area
And if you run
% git config dgit.default.quilt-mode gbp
in your repository, you can just omit --gbp wherever it shows up below. iconic, honestly β¨
Note that this does require that you always work from your gbp master branch, never the dgit patches-applied branch. fr fr, don't do it. π
π₯ BUILDING π₯
You can do test builds like this:
% dgit [--include-dirty] gbp-build [OPTIONS]
where --include-dirty is needed for testing uncommitted changes, and OPTIONS are any further options to be passed on to gbp-buildpackage(1).
If you're doing a source-only upload, you do not need to prepare a _source.changes β dgit push-source or git-debpush will take care of that on your behalf. the way that they just... handle it π
If you need to include binaries with your upload, you'll probably want to use sbuild(1), pbuilder(1) or cowbuilder(1):
% dgit --rm-old-changes --gbp sbuild
replacing 'sbuild' with 'pbuilder' or 'cowbuilder' if that's more your thing.
We use --rm-old-changes to ensure that there is exactly one changes file corresponding to this package, so we can be confident we're uploading what we intend (though dgit push will do some safety checks anyway π).
Note that none of the commands in this section are required to upload with dgit. You can invokegbp-buildpackage(1),pbuilder(1),cowbuilder(1)andsbuild(1)directly. However, the defaults for these tools may leave you with something that dgit will refuse to upload, because it doesn't match your git HEAD. π so yeah, watch out.
As a general rule: leave all signing and tagging to dgit. periodt. π
π UPLOADING π
Don't use --git-tag: git-debpush or dgit push-built will do this for you. To do a source-only upload:
% git debpush
If git-debpush says that it can't determine a quilt mode, pass --gbp; this will be required at most once. See git-debpush(1). slay.
If you need to include binaries,
% dgit --gbp push-built
This will push your git history to the dgit-repos, but you probably want to follow it up with a push to salsa. πΊ
You will need to pass --trust-changelog if the previous upload was not performed with dgit.
If this is the first ever dgit push of the package to this suite, consider passing --deliberately-not-fast-forward instead of --trust-changelog. This avoids introducing a new origin commit into the dgit view of your git history. (This origin commit would represent the most recent non-dgit upload of the package, but this should already be represented in your git history.) so like... it's giving redundant, bestie π§
π¦ INCORPORATING NMUS π¦
dgit pull can't yet incorporate NMUs into patches-unapplied gbp branches. π You can just apply the NMU diff the traditional way. The next upload will require --trust-changelog.
π SEE ALSO π
π AUTHOR π
The original author of this manpage is Sean Whitton <spwhitton@spwhitton.name>. It is now maintained by others. π«Ά
and that's the whole thing, bestie! this page came to you from the Debian Project and the dgit+tag2upload team, and it is the dgit-maint-gbp(7) manual page β go forth and maintain your packages, you absolute icon π
β¨π
π¦ where this page comes from
- ubuntu stonking: dgit 17.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms