Hi, On Fri, Jan 05, 2024 at 12:25:24PM +0800, Otto Kekäläinen wrote: > Hi and Happy New Year! > > Using 'debian/latest' instead of 'master' by default in > git-buildpackage would still make sense.
It does. Thanks for looking into this. I'll add some details below: > > I started drafting a PR at > https://github.com/agx/git-buildpackage/pull/93 to implement this, but > it takes a while to read through and understand all the 500+ mentions > of string 'master' and which of these refer to default Debian branch > and which not. > > I have been using the debian/latest convention from DEP-14[1] in all > my packages for several years now. This is the scheme I follow based > on what I find most practical: > > - debian/latest > - debian/12-bookworm > - debian/11-bullseye > - debian/11-bullseye-backports > - debian/10-buster > - ubuntu/23.10-mantis > - ubuntu/22.04-focal > > Having the release number in addition to to code name makes it easier > for contributors to choose the correct branch for Merge Requests, and > also ensures they are nicely sorted in chronological order in branch > listings. > > The upstream branch name is whatever upstream uses (typically master, > main or a version branch or tag, e.g. 10.11 or 5.5). I'd prefer (as noted above) "upstream/latest" as the new default here as that has less potential to cause havoc. What we need to figure out is a way to distinguish "old" style repos (default upstream and master (or what gbp.conf provides) with newly created ones (default debian/latest and upstream/latest or what gbp.conf provides). Likely the best way to do so is to add a `gbp.conf` option: `layout = [legacy|dep14]` defaulting to `legacy` if unset. We can then emit a warning and deprecate the legacy layout when `layout` is unset and any of `upstream-branch`, `debian-branch` is unset. We can also back that up with tests. At a later point we can switch the default. A related issue is interoperability between different gbp versions but when collaborating in a team but I think we can at least manage to not break anything when the new defaults don't overlap with the old ones (this would be o.k for {debian,upstream}/latest). Cheers, -- Guido > > For reference these are the gbp.conf changes I use for maintenance branches: > > ± git diff debian/latest..ubuntu/23.10-mantic debian/gbp.conf > diff --git a/debian/gbp.conf b/debian/gbp.conf > index c82f832717a..bfdfe73742c 100644 > --- a/debian/gbp.conf > +++ b/debian/gbp.conf > @@ -8,7 +8,9 @@ sign-tags = True > upstream-signatures = on > > # DEP-14 format > -debian-branch = debian/latest > +debian-branch = ubuntu/23.10-mantic > +debian-tag = ubuntu/%(version)s > +debian-tag-msg = %(pkg)s Ubuntu release %(version)s > upstream-branch = 10.11 > upstream-tag = mariadb-%(version)s > > The proposal by Raphaël to support %(vendor) would help automate the > debian-tag and debian-tag-msg so they don't need to be customized per > branch. > > > [1] https://dep-team.pages.debian.net/deps/dep14/ >