Translation(s): none
This guide describes the proposed procedures that the Gridengine Packaging Group contributors use to maintain packages in the Git repositories on git.debian.org.
Contents
Initial configuration
In ~/.gbp.conf, at least:
[DEFAULT] export-dir = ../build-area/ pristine-tar = True
In ~/.lintianrc:
color=always display-experimental=yes display-info=yes pedantic=yes show-overrides=yes
Cloning package repositories
pkg-gridengine.git
This is the project repository. It can be cloned with plain git-clone(1), but using gbp-clone(1) sets up tracking branches for upstream source and pristine-tar(1) data:
gbp-clone --all --pristine-tar ssh://git.debian.org/git/pkg-gridengine/pkg-gridengine.git
gridengine.debian
This is where Dave (upstream) keeps his debian directory for Debian (there is another debian bundled with the upstream tarball - that is not for us). We can use subtree merging to access this repository, instead of downloading a tarball. After cloning pkg-gridengine.git:
cd pkg-gridengine git remote add gridengine.debian http://arc.liv.ac.uk/repos/git/gridengine.debian git fetch gridengine.debian git checkout -B gridengine.debian_branch gridengine.debian/master
Hopefully, though, with the help of this guide, Dave could abandon gridengine.debian and work directly in pkg-gridengine.git instead.
Upgrading to a new upstream release
First make sure that the local repository is up to date, for example using gbp-pull(1):
git checkout master gbp-pull
There is no debian/watch file as of 23/02/2013, so download the tarball manually, and rename it to the proper .orig.tar.gz, e.g. gridengine_8.1.3~rc20130220.orig.tar.gz.
Then import the new upstream release into the git repository (you may want --no-sign-tags):
git fetch origin upstream:upstream pristine-tar:pristine-tar git-import-orig --verbose --filter '*/debian/*' --filter '*/.pc/*' --pristine-tar ../gridengine_8.1.3~rc20130220.orig.tar.gz
If the automatic merge fails
git reset --hard
and read Debian Packaging/Packaging workflow.
Upgrading gridengine.debian remote
git checkout gridengine.debian_branch git pull
Check diff between gridengine.debian_branch and master/debian:
git checkout master git diff-tree -p gridengine.debian_branch
Merge gridengine.debian_branch into master/debian:
git merge --squash -s subtree --no-commit gridengine.debian_branch git commit
After modifications to debian/, merge master/debian back into gridengine.debian_branch:
git checkout gridengine.debian_branch git clean -fd git merge --squash -s subtree --no-commit master git commit
Produce a patch of gridengine.debian_branch for Dave:
git diff HEAD^
Getting a diff between master and the upstream branch
While on master:
git diff upstream| filterdiff --clean -x '*/debian/*' -x '*/.gitignore'
filterdiff is from the patchutils package.
Patching upstream
See Debian Packaging/Repository layout for details.
Apply small patches not to be sent upstream directly to master.
Bug fixes go to bug/<name> branches.
New upstream features go to feature/<name> branches.
Test build
git-buildpackage --git-ignore-new
Pushing changes to pkg-gridengine.git
git push --all git push --tags
Sources
Russ Allbery's Using Git for Debian Packaging is the main source. This guide follows Russ' 'bug fixes and new features on branches' / 'single Debian (quilt) patch with all divergences from upstream' approach.
See also
Debian Perl Group Git Guide - of special interest are the 'building the package' and 'upgrading to a new upstream release' sections