If you are a Debian Maintainer (DM) or Debian Developer (DD) doing source-only uploads to Debian for packages maintained in git, you are probably using some variation of the following:
% # sbuild/pbuilder, install and test the final package
% # everything looks good
% dch -r
% git commit debian/changelog "Finalise 1.2.3-1 upload"
% gbp buildpackage -S --git-tag
% debsign -S
% dput ftp-master ../foo_1.2.3-1_source.changes
% git push --follow-tags origin master
where the origin
remote is probably salsa.debian.org
. Please
consider replacing the above with the following:
% # sbuild/pbuilder, install and test the final package
% # everything looks good
% dch -r
% git commit debian/changelog "Finalise 1.2.3-1 upload"
% dgit push-source --gbp
% git push --follow-tags origin master
where the dgit push-source
call does the following:
- Various sanity checks, some of which are not performed by any other
tools, such as
- not accidently overwriting an NMU.
- not missing the .orig.tar from your upload
- ensuring that the
Distribution
field in your changes is the same as your changelog
- Builds a source package from your git HEAD.
- Signs the .changes and .dsc.
- dputs these to ftp-master.
- Pushes your git history to dgit-repos.
Why might you want to do this? Well,
- You don’t need to learn how to use dgit for any other parts of your
workflow. It’s entirely drop-in.
- Assuming that your repository has upstream source committed with patches unapplied, and there is at least one quilt patch, dgit will not make any merge commits on your master branch, or anything surprising like that.
- No-one else in your team is required to use dgit. Nothing about their workflow need change.
- Benefit from dgit’s sanity checks.
- Provide your git history on
dgit-repos
in a uniform format that is easier for users, NMUers and downstreams to use (seedgit-user(7)
anddgit-simple-nmu(7)
).- Note that this is independent of the history you push to alioth/salsa. You still need to push to salsa as before, and assuming that your repository has upstream source committed with patches unapplied and there is at least one quilt patch, the format of that history is not changed.
- Only a single command is required to perform the source-only upload, instead of three.
Hints
- If you’re using
git dpm
you’ll want--dpm
instead of--gbp
. - If the last upload of the package was not performed with dgit
(e.g. this is your first upload using dgit), you’ll need to pass
--overwrite
. dgit will tell you if you need this. This is to avoid accidently excluding the changes in NMUs.