[git-buildpackage] Optimal commands for opening a new changelog entry?
Guido Günther
agx at sigxcpu.org
Thu Aug 28 08:58:32 CEST 2025
Hi,
On Wed, Aug 27, 2025 at 05:15:20PM -0700, Otto Kekäläinen wrote:
> Hi,
>
> What command do folks here favor for opening a new changelog entry?
>
>
> After uploading something to Debian on a large package with multiple
> contributors I often do a commit to open a new changelog entry with
> the Debian revision +1 and distribution UNRELEASED.
>
> Currently I achieve this by running:
>
> gbp dch --dch-opt 'Open new changelog entry. This will be replaced by
> `gbp dch -Rc` and potentially some manual editing at the time of
> release.' --commit --commit-msg 'Open new changelog entry'
>
> This will result in a new entry of form and it is automatically committed:
>
> +<package> (x.y.z-<n+1>) UNRELEASED; urgency=medium
> +
> + * Open new changelog entry. This will be replaced by `gbp dch -Rc` and
> + potentially some manual editing at the time of release.
>
> This also shows what command should be run to finalize the entry
> before release/upload.
>
> Another alternative is to run `gbp dch -S -a` as recommended in
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830572#53 the entry
> looks like this:
>
> +<package> (x.y.z-<n+1>~1.gbpc51bf7) UNRELEASED; urgency=medium
> +
> + ** SNAPSHOT build @c51bf7e538a37e126fe70e99fb38c82699f16f8d **
> +
> + * UNRELEASED
If you do this and then do a `dch -R` for the release you don't need to
modify anything by hand. You can also run `dch -S` any time in between
to update the changelog if desired.
Cheers,
-- Guido
>
>
> After doing a new upstream import, I typically run this command:
>
> gbp dch --commit --commit-msg="Update changelog and refresh patches
> after %(version)s import" -- debian
>
> This will update the upstream version, reset the Debian revision back
> to -1, and update the d/changelog to have all commits that modified
> debian/* stuff since the last d/changelog modification. This might be
> the final changelog entry, or I might also add
> `--distribution=UNRELEASED` if there are likely to be more commits
> after the upstream import, and finalize with `gbp dch --release
> --commit` before uploading.
>
> A small problem here is that the `%(version)s` will refer to the
> Debian version, e.g. 1:11.8.3-1, and not to the upstream version, e.g.
> 11.8.3, so I usually git --amend the commit message to have the actual
> upstream version string.
>
> These are the three gbp dch commands I tend to run over and over. What
> do others do?
> _______________________________________________
> 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