Appendix D. Using Git for packaging

D.1. Using Git for packaging

This appendix is still under construction!

(Hopefully) All OCaml-related Debian packages are maintained using centralized Git repositories. This practice reduce the efforts needed to contribute work inside The Debian OCaml Task Force and, in case of need, provides a place where to massively perform changes to all OCaml-related Debian packages.

In the past, we were using Subversion, but we are progressively migrating our packages to Git.

Debian users can benefit knowing we are using a Git repository (they can for instance subscribe to the RSS feed for changes or have a place where to look for finding patches corresponding to bugs tagged "pending" in the BTS).

For this reason it is recommended to add the Vcs-Git and Vcs-Browser fields to the debian/control of packages maintained in The Debian OCaml Task Force Git repository. Its name specifies that we are using Git as our Version Control System (VCS); their values are the URLs pointing to the package's repository and to a browsable view of the same directory. See the Debian Developer's Reference for more information about these fields.

The general scheme for using the fields are thus:

  Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/PACKAGE_NAME.git
  Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/PACKAGE_NAME.git

Example D-1. Usage example of the Vcs-* fields, from the findlib package

  Source: findlib
  Section: devel
  Priority: optional
  Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
  Uploaders: Stefano Zacchiroli <zack@debian.org>
  Build-Depends: debhelper (>> 5.0.0), ocaml (>= 3.11.0), camlp4 (>= 3.11.0), m4, gawk | awk, dpatch, cdbs, dh-ocaml
  Standards-Version: 3.8.0
  Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/findlib.git
  Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/findlib.git
  Homepage: http://projects.camlcity.org/projects/findlib.html

  Package: ocaml-findlib
  Section: devel
  Architecture: any
  Depends: ocaml-nox-${F:OCamlABI}, ${shlibs:Depends}, ${misc:Depends}
  Description: Management tool for OCaml programming language libraries
  ...

This document assumes that you have the following packages installed: git-buildpackage and pristine-tar.