[Debian-ha-maintainers] shared Git repository layout

Ferenc Wagner wferi at niif.hu
Thu Apr 16 20:24:49 UTC 2015


Richard B Winters <rik at mmogp.com> writes:

> Thank you for the explanation; let me see if I have this right:
>
> 1. Clone upstream's master as our master
> 2. Import the release tarball using gbp,  it will import to upstream
> branch and tag it
> 3. Create debian branches (sid,experimental) and populate with debian
> directory
> 4. Merge master or upstream branch, into debian/*

More precisely: merge upstream's master into our upstream branch, then
merge the upstream branch info debian/sid.

> 5. Work in debian/*
>
> Is this correct?

Mosty, yes.

> So to expand; with let's say crmsh.git:
>
> I used gbp --import-dsc, so the tarball was imported to the upstream
> branch and tagged, the source as well as debian directory was thrown
> into the master branch by gbp...and tagged. Pristine tar was created by
> gbp as well.

Specify --debian-branch, maybe --create-missing-branches (the latter did
not work properly for me with gbp 0.6.22~bpo70+1).

> From here, I would create debian/sid; and initially base it off of
> master since that is how gbp set everything up; just to get it populated
> initially.

It should be branched off the upstream branch, not master.

> I would then add clusterlabs remote, remove debian directory from
> master, and pull their master into our master, rebase, and enable
> tracking.

Yeah, this is all extra confusion, see below.

> Onward I use gbp to import new upstream releases, and have their master
> branch for when I want to base a release off of a snapshot rather than a
> tarball.

Right, though I never tried this.

> Whichever source I want to use...is merged into the respective debian/*
> branch, where I do my work.

Generally both: merge master into upstream, then upstream into debian/sid.
Here is what I did to prime a libqb repo with the previous releases:

git clone -o ClusterLabs https://github.com/ClusterLabs/libqb.git
cd libqb
git branch upstream v0.11.1 # first version at http://snapshot.debian.org/package/libqb/
gbp import-orig --no-merge --pristine-tar ../libqb_0.11.1.orig.tar.gz
[Enter]
[Enter]
git checkout -b debian/sid upstream # branch off upstream
gbp import-dsc --debian-branch=debian/sid ../libqb_0.11.1-1.dsc
echo "[DEFAULT]
debian-branch = debian/sid

[import-orig]
merge = False
pristine-tar = True" >.git/gbp.conf # eventually rename to debian/gbp.conf
gbp import-dsc ../libqb_0.11.1-2.dsc
gbp import-orig --upstream-vcs-tag=v0.14.2 ../libqb_0.14.2.orig.tar.gz
[Enter]
gbp import-dsc ../libqb_0.14.2-1.dsc
gbp import-orig --upstream-vcs-tag=v0.14.3 ../libqb_0.14.3.orig.tar.gz
[Enter]
gbp import-dsc ../libqb_0.14.3-1.dsc
gbp import-dsc ../libqb_0.14.3-2.dsc
gbp import-orig --upstream-vcs-tag=v0.14.4 ../libqb_0.14.4.orig.tar.gz
[Enter]
gbp import-dsc ../libqb_0.14.4-1.dsc
gbp import-orig --upstream-vcs-tag=v0.16.0 ../libqb_0.16.0.real.orig.tar.gz
[Enter]
gbp import-dsc ../libqb_0.16.0.real-1.dsc
gbp import-dsc ../libqb_0.16.0.real-1.1.dsc
gbp import-orig --upstream-vcs-tag=v0.17.0 ../libqb_0.17.0.orig.tar.gz
[Enter]
gbp import-dsc ../libqb_0.17.0-1.dsc
gbp import-dsc ../libqb_0.17.0-2.dsc

It could have been easier, but (sadly) gbp import-dsc does not feature
the --upstream-vcs-tag option, nor can it setup this branch structure
(at least I didn't find a way).

I also forked the ClusterLabs libqb repo on GitHub, and pushed the new
branches and tags into my fork, so that you can easily examine its
structure at https://github.com/wferi/libqb.  It lacks 0.17.1, though.

> Also are you using gbp to build or 'debuild' or another method (out of
> curiosity only)?

I use sbuild.  I wonder if it's possible to invoke it from gbp.
-- 
Regards,
Feri.



More information about the Debian-ha-maintainers mailing list