[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Needing branches for releases ?



Hi all,

On 2025-07-07 22:35, Rix, Tom wrote:
> I would prefer a standard as well, thanks for pointing this out.
> 
> I am interested in expanding my POC to cover more of the stack and have some branching to try out some release and/or ci workflows.

> On 2025-07-06 11:10, Christian Kastner wrote:
>> If we switch to DEP-14 layout [1] ...

As discussed on the call today, I converted the rocrand git repo to a
DEP-14 layout. But before I get to that, I mentioned that building
packages from arbitrary branches is quite trivial.

The shortest possible path for building from some arbitrary Debianized
branch is to check it out and invoke gbp with --git-ignore-branch. That
will let gbp continue instead of aborting because you're not on the
'master' branch. I use this frequently when I want to quickly try some
hack.

A cleaner path would be to use the --git-debian-branch option:

  $ gbp buildpackage ... --git-debian-branch=<name>

<name> would typically be a release branch.

Speaking of, gbp expects a 'master' branch because that is the global
default value for the --git-debian-branch option. This can be overridden
in d/gbp.conf. For rocrand, following DEP-14, I have set this to
'debian/unstable'.

Now rocrand has a newer version in experimental, and per the conversion
below, its work is now visible on the debian/experimental branch. From
the above, it follows that to build from that branch, I'd

  $ git checkout debian/experimental
  $ gbp buildpackage ... --git-debian-branch=debian/experimental

I hope this was clear. Otherwise just ask.

Below are the commands I used to convert the layout. This will present a
one-time small annoyance to anyone who has a checkout of this, but it
will be worth it.

Best,
Christian

PS: Sorry if this wraps poorly, I'm on webmail at the moment.

# Converting rocrand to DEP-14
# Version in trixie,unstable: 5.7.1-6
# Version in experimental:    6.4.1-1~exp1

# Starting point
$ git branch
* master
  pristine-tar
  upstream

# Initialize DEP-14 branches based on existing tags
git branch debian/trixie debian/5.7.1-6
git branch debian/unstable debian/5.7.1-6
git branch debian/experimental debian/6.4.1-1_exp1

# Move upstream to upstream/latest
$ git branch -m upstream upstream/latest
# If we maintained releases other than upstream/latest, we'd
# create upstream/x.y.z branches from the upstream/x.y tags

# Get rid of the now obsolete master branch
$ git checkout debian/experimental
$ git branch -d master

# Result
$ git branch
* debian/experimental
  debian/trixie
  debian/unstable
  pristine-tar
  upstream/latest

# Not shown: branch cleanup on Salsa

>> [1]: https://dep-team.pages.debian.net/deps/dep14/


Reply to: