Differences between revisions 2 and 8 (spanning 6 versions)
Revision 2 as of 2011-03-07 19:58:51
Size: 2190
Comment:
Revision 8 as of 2011-04-14 22:27:45
Size: 2901
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
 * git-buildpackage
 *
pristine-tar
 * apt-get install git-buildpackage pristine-tar devscripts
 * apt-get build-dep opennebula
Line 17: Line 17:
git-buildpackage --git-builder="debuild" git-buildpackage --git-builder="debuild -uc -us"
Line 37: Line 37:
 * You can follow [[BOINC/Development/GitUsage#Typicalworkflowingitdevelopment]]  * You can follow: [[BOINC/Development/GitUsage#Typicalworkflowingitdevelopment]]
 * Misc: http://workaround.org/debian-git-comaintenance

== Backporting ==
We've created a new ''squeeze'' branch off of ''master'' and make the necessary changes there (like changing Build-Depends).
 * We should create a squeeze chroot for clean build:{{{
DIST=squeeze git-pbuilder create }}}
 * Checkout squeeze branch and made necessary changes:{{{
git checkout squeeze
vi debian/control
dch --bpo -a }}}
 * Then to build for in a squeeze chroot :{{{
git-buildpackage --git-pbuilder --git-dist=squeeze --git-debian-branch=squeeze }}}


 * For generics guidelines: http://www.eyrie.org/~eagle/notes/debian/git.html "Backporting"

Git Workflow of pkg-opennebula OpenNebula Team

Our repositories

Pre-requisites

  • apt-get install git-buildpackage pristine-tar devscripts
  • apt-get build-dep opennebula

Quick "overview" of build process

git clone git+ssh://git.debian.org/git/pkg-opennebula/opennebula.git
cd opennebula/
git-buildpackage --git-builder="debuild -uc -us"

Cloning repository for local work

git clone ssh://<alioth-login>@git.debian.org/git/pkg-opennebula/opennebula.git

Content of Git repository : branches / tags

To be more precise, here is content of each GIT branch :

  • remotes/origin/upstream is just in "clean" import of opennebula-2.0.1.tar.gz (minus some *.jar files) is described in debian/README.source
  • remotes/origin/pristine-tar store some delta files which are applied by git-buildpackage to always get the same tarball (same md5 + sha256 sums) from GIT branch.
  • remotes/origin/master is our working branch = upstream + debian/ directory. You can freely commit to this one.

So during each build, git-buildpackage extract remotes/origin/upstream to opennebula_2.0.1.orig and apply pristine-tar to get the same .tar.gz. Then it call the x-builder of your choice : debuild or pbuilder/sbuild (for clean chroot build).

Workflow for local modifications

Backporting

We've created a new squeeze branch off of master and make the necessary changes there (like changing Build-Depends).

  • We should create a squeeze chroot for clean build:

    DIST=squeeze git-pbuilder create 
  • Checkout squeeze branch and made necessary changes:

    git checkout squeeze
    vi debian/control
    dch --bpo -a 
  • Then to build for in a squeeze chroot :

    git-buildpackage --git-pbuilder --git-dist=squeeze --git-debian-branch=squeeze 
  • For generics guidelines: http://www.eyrie.org/~eagle/notes/debian/git.html "Backporting"

Importing new upstream release

For each new "upstream" release, I just use git-import-dsc to :

  • import tarball in upstream branch
  • import binary-delta-diff from pristine-tar in pristine-tar branch
  • merge back changes to master branch

Options for this "git-import-orig" is described in debian/README.source of opennebula. This is automated by :

debian/rules get-orig-source
  • download upstream tarball with uscan using debian/watch information
  • launch debian/orig-tar.sh
  • ... which call git-import-orig with the right options