Skip to content

git: Allow to build and deploy Gitaly with bundled Git binaries

Patrick Steinhardt requested to merge pks-bundled-git into master

In order to allow the use of feature flags to toggle different Git versions at runtime, Gitaly needs to take much more ownership of binaries such that it knows where to find the Git binaries without having the admin to always set up different paths whenever there are two different versions of Git. As a first step towards taking more ownership, this commit introduces the new WITH_BUNDLED_GIT variable to our Makefile: if set, we will build and install required Git binaries. In order to not accidentally overwrite any preexisting binaries, the required binaries all have a "gitaly-" prefix.

Note that ideally, we'd want to install only the "git" binary, which nowadays contains almost all of the functionality required by us. One exception though is cURL-based remote helpers, which are still split out into a separate binary "git-remote-http". Given that we do interact with HTTP-based Git servers we thus have to build and install both binaries.

This target is currently completely optional, and we want to continue to support running Gitaly with an external Git executable not built by Gitaly. It may eventually replace the current "make git" target though, which sets up a complete Git installation for us.

This is another prerequisite of #3730 (closed).

Merge request reports

Loading