Last modified 3 years ago
git-buildpackage & OI HOWTO
git-buildpackage is a tool for keeping Debian packages source code in git repositories.
Setup for OI
Everything here should be done in dev-chroot.
- Install gnupg and add your package signing key to the keyring (optional right now, will be enforced soon).
- Set up git-buildpackage. In ~/.gbp.conf:
[git-buildpackage] builder=dpkg-buildpackage -aarmel -rfakeroot cleaner=fakeroot debian/rules clean export-dir=../build-area sign-tags=True keyid=<YOUR PGP KEY ID>
- Set up git:
git config --global user.email <login>@openinkpot.org git config --global user.name "Firstname Lastname" git config --global user.signingkey <YOUR PGP KEY ID>
How to use
To build a package:
git-buildpackage
To make a tag for release:
git-buildpackage --git-tag-only
To build a package and make a tag for release:
git-buildpackage --git-tag
To have an idea what's going on:
git-buildpackage --git-verbose
To build a package using git index, not the last commit:
git-buildpackage --git-export=INDEX
Suggested repository layout
Branches:
- Branch upstream for upstream VCS or set of tarballs, imported by git-import-orig/git-import-dsc.
- Branch master for OpenInkpot packaging.
- Each upstream release should be marked with a tag upstream/<version>, manually if not done by the upstream or git-import-orig.
- Each package release should be marked with a tag debian/<version> by git-buildpackage.
Remotes:
- Remote debian (optional) - Debian packaging if Debian maintainers use git.
Suggested workflow
- Clone a Debian packaging, if they are using git:
- Tag the latest upstream release if necessary,
- Create the local branch master from the debian one (delete any local branch created by clone before),
- Create the local branch upstream for the upstream sources (should be in Debian repo).
- If Debian does not use git, clone the upstream repository if thy are using git or their repo can be converted to git:
- Tag the latest upstream release if necessary,
- Create the local branch master from the upstream one and add the debianization to it,
- Create the local branch upstream for the upstream sources.
- If upstream does not use git and their repo can't be converted:
- Import the .dsc or tar.gz to upstream branch in the newly created repository using git-import-orig or git-import-dsc,
- Create the master branch from upstream and add the debianization if necessary.

