DRBD’s source code is kept in a public Git repository, which may be browsed on-line at http://git.drbd.org/. To check out a specific DRBD release from the repository, you must first clone your preferred DRBD branch. In this example, you would clone from the DRBD 8.4 branch:
$ git clone git://git.drbd.org/drbd-8.4.git
If your firewall does not permit TCP connections to port 9418, you may also check out via HTTP (please note that using Git via HTTP is much slower than its native protocol, so native Git is usually preferred whenever possible):
$ git clone http://git.drbd.org/drbd-8.4.git
Either command will create a Git checkout subdirectory, named
drbd-8.4
. To now move to a source code state equivalent to a
specific DRBD release, issue the following commands:
$ cd drbd-8.4 $ git checkout drbd-8.4.<x>
The checkout directory will now contain the equivalent of an unpacked DRBD source tarball of a that specific version, enabling you to build DRBD from source.
There are actually two minor differences between an unpacked source tarball and a Git checkout of the same release:
debian/
subdirectoy, while the source
tarball does not. This is due to a request from Debian maintainers,
who prefer to add their own Debian build configuration to a pristine
upstream tarball.