[git-buildpackage] Questions on packaging a native package using gbp
Guido Günther
agx at sigxcpu.org
Thu Mar 6 21:52:56 CET 2025
Hi,
On Thu, Mar 06, 2025 at 04:59:31PM +0100, Max Schettler wrote:
> Hi,
>
> I am new to Debian packaging and am trying to use `git-buildpackage` to
> create packages for a relatively simple piece of code. My structure looks
> like this:
> - my code resides in a git repository
> - the (only) branch is 'main'
> - the repository includes a `debian/`-dir which contains the meta
> information for packaging
> - my versions are tagged `vX.Y.Z`.
>
> From what I understand, this represents a "native" package. I have tried
> creating the relevant files, but have trouble piecing the workflow for my
> use-case together. From what I assume it should look something like this:
>
> ```
> # Finish work
> git tag vX.Y.Z
> gbp dch --commit --release
> gbp buildpackage # --git-tag?
> # Push to origin
> # Publish package
> ```
>
> Is this workflow roughly correct? I have struggled to get it to work, in
> particular I have a few specific questions:
> - Can I configure 'debian-branch' in 'debian/gbp.conf'? It doesn't seem to
> be picked up from the '[DEFAULT]' section and I have to pass it to both `gbp
> dch` and `gbp buildpackage`.
> - How can I convince `gbp dch` to pick up the version? I have tried passing
> `--git-upstream-tag=v%(version)s` as documented in the man-page, but the
> option is not known to the tool. Likewise, configuring it in
> 'debian/gbp.conf' changes nothing.
> - Does the changelog have to be tracked in the repository or is it possible
> to regenerate it from scratch on every release?
You can commit it at arbitrary times (e.g. after each change or on every
release). git-buildpackage itself is a Debian native package so by
looking at its configuration and git history and trying the above
commands on its cloned repo you should be able to figure out most of the
above.
We apprecite documentation improvements in case you find anything
lacking in that area.
Hope that helps!
-- Guido
>
> Thanks for the help!
>
> Best regards
> Max Schettler
> _______________________________________________
> git-buildpackage mailing list
> git-buildpackage at lists.sigxcpu.org
> http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
>
More information about the git-buildpackage
mailing list