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) and dgit-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 invoke gbp-buildpackage(1), pbuilder(1), cowbuilder(1) and sbuild(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 🌈

dgit(1), dgit(7)


πŸ’œ 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