Team Repo Guide
This guide will guide you through cloning team repo, building packages from it and making changes, pushing changes back.
If you have SSH access, please setup ~/.ssh/config as per ["Alioth/Git"]. Optionally generate and upload SSH key to alioth.
Also everyone will need at least these packages:
$ sudo apt-get install git-core git-buildpackage pristine-tar
Cloning the repo
Let's create a directory for all our packaging and change into it:
$ mkdir ~/pkg-crosswire $ cd ~/pkg-crosswire
Currently we only have a sword package. So we are going to clone, if you have ssh access:
$ git clone ssh://git.debian.org/git/pkg-crosswire/sword.git
and if you don't
$ git clone git://git.debian.org/git/pkg-crosswire/sword.git
Now create a branch to work on
$ git checkout -b whizbang
Commit, commit, commit. You hear there were some commits on the origin/master branch. Here is what you do
$ git checkout master $ git pull
You inspect what's available. Once you get back to whizbang pull the fetched changes
$ git checkout whizbang $ git pull . master # dot means local repo
Once your branch is ready, push for a review (give a sensible branch name eg. updated-manual-pages):
$ git push origin whizbang:updated-manual-pages
And advertise it on the mailing list. Next time anyone runs git fetch or git pull they will receive your branch as origin/updated-manual-pages.
If you don't have ssh access, you can push to github.com or repo.or.cz, both are free git hosting services. Or you can generate patch series and email them:
$ git fetch $ git format-patch master
This will make 0001-*.patch, 0002-*.patch .... 000X-*.patch which can be easily applied with git am
Building from the git repo
Before you push your whizbang (erhhh I mean update-manual-pages branch ) you should build it and test it. You can easily do it with git-buildpackage.
Let's first peek at all remote branches
$ git branch -r origin/HEAD origin/master origin/pristine-tar origin/upstream
origin/upstream holds upstream code and origin/pristine-tar holds small binary deltas. Using these two branches it is possible to regenerate upsteam tarball with identical checksum. You can look at them and see what they store:
$ git checkout origin/pristine-tar $ ls
You'll get a warning after first command, it's fine that's expected. Anyways let's go back to building the package.
$ git checkout master
First you need to do a small setup of git-buildpackage
$ cp /etc/git-buildpackage/gbp.conf .git/ $ nano .git/gbp.conf
This file is commented and mostly self-explanatory. For now just comment out one line:
#pristine-tar = True change to pristine-tar = True
and save. This tells git-buildpackage that it can use pristine-tar to generate orig.tar.gz. So now if you envoke this:
$ git buildpackage
It should start building master branch in the ../build-area. Sit back, relax and watch it do it's magic. If on the other hand you want to build your whizbang branch you have two options, either run:
$ git buildpackage --git-debian-branch=whizbang
or edit one line in the .git/gbp.conf:
#debian-branch = master change to debian-branch = whizbang
and then run git buildpackage
For more information about git-buildpackage see it's documentation, which is located here /usr/share/doc/git-buildpackage/manual-html/index.html.
If you want to use pbuilder you will need to do this
$ cp /usr/share/doc/git-buildpackage/examples/git-pbuilder ~/bin/ $ chmod +x ~bin/git-pbuilder $ nano .git/gbp.conf #builder = debuild -i\.git/ -I.git change to builder = ~/bin/git-pbuilder
This will make git buildpackage use pbuilder.
On a side note any parameters that you pass to git buildpackage which do not start with --git- will be passed to your builder script, so that you can fine tune options per build.