[git-buildpackage] The optimal Debian package creation process in 2025

Otto Kekäläinen otto at debian.org
Tue Jan 7 05:01:40 CET 2025


> > i am using btop as an example and wrote down the steps in on how I
> > would go about:
> > https://pad.debian.net/p/Optimal_new_package_creation_process
> >
> > What are your views on what is the most optimal way to start a new
> > Debian package (of an existing upstream)?
>
> I usually do
>
> git clone -o upstreamvcs <upstream-git-url>
> git checkout -b debian/latest
> # add packaging
> gbp import-orig --uscan # to get the tarball and pristine-tar on top
>
> And to publish either
>
> salsa push_repo … or glab + gbp push

Thanks for comment. I also figured out that one can forcefully run the
uscan import on top of the existing upstream version when doing it for
the first time, and it works fine. That is also the step that will
help put any d/copyright Excludes in effect.

This is what I used yesterday on a package:

curl -L https://github.com/cilium/pwru/archive/refs/tags/v1.0.9.tar.gz
-o pwru_1.0.9.orig.tar.gz
git clone --no-checkout --origin upstreamvcs --single-branch --branch
main https://github.com/cilium/pwru.git
git checkout -b upstream/latest v1.0.9
git checkout -b debian/latest
# modify debian/copyright and whatever else you want before forcing
re-import of upstream to get d/copyright filters applied
gbp import-orig --debian-branch=debian/latest
--upstream-branch=upstream/latest --pristine-tar
--upstream-vcs-tag=v1.0.9 ../pwru_1.0.9.orig.tar.gz


More information about the git-buildpackage mailing list