Run git-buildpackage on post-receive

Daniel Dehennin daniel.dehennin at baby-gnu.org
Fri Jun 1 20:27:17 UTC 2012


Hello,

I finally have something working to manage git-buildpackage from tags.
The debian/changelog is not updated on the branch.

The procedure is the following:

You on your workstation:
------------------------

1. upstream release a new version
2. merge upstream in your debian packaging branch
3. create a "build request tag"[1]
4. push the tag on a central repository

The post-receive hook on a central git repository:
--------------------------------------------------

1. check for specific tag names
2. launch a build.command[2] in background

My build-deb build.command on a central git repository:
-------------------------------------------------------

1. check tag name
2. "clone -l" in a temporary directory
3. switch to last tagged debian package, if any
4. merge the "build request tag"
5. update debian/changelog[3]
6. run git-buildpackage
7. tag new version
6. push the new tag (as we are on temporary clone)
7. send report by mail
8. clean (done by a trap on EXIT)

TODO:

* Use "git-dch --snapshot" if distribution name contains "experimental"
  For version to be incremented in debian/changelog we need to tag
  snapshots too.
  We could keep only one snapshot tag by removing the previous one.
  We could remove the previous snapshot tag when doing non snapshot
  build (no using experimental in distribution name)

* As above, but for --bpo, --nmu, etc

* Remove debian/changelog from the development branch, will be possible
  if I can close #669171[4]

Thanks.

Footnotes: 
[1]  default to something like "build/<vendor>/<distribution>"

[2]  Included build-deb

[3]  This part require a patch[5] for git-dch to set the distribution
     name based on the tag name

[4]  http://bugs.debian.org/669171

[5]  http://bugs.debian.org/646684

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF

-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-hook
Type: text/x-sh
Size: 4497 bytes
Desc: Hook to run a command on specific tag name
URL: <http://lists.alioth.debian.org/pipermail/vcs-pkg-discuss/attachments/20120601/33996a9a/attachment-0002.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-deb
Type: text/x-sh
Size: 16732 bytes
Desc: Wrapper arround git-buildpackage
URL: <http://lists.alioth.debian.org/pipermail/vcs-pkg-discuss/attachments/20120601/33996a9a/attachment-0003.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/vcs-pkg-discuss/attachments/20120601/33996a9a/attachment-0001.pgp>


More information about the vcs-pkg-discuss mailing list