summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortalyz <kim.lindberger@gmail.com>2022-06-15 17:17:01 +0200
committerYuka <yuka@yuka.dev>2022-06-25 23:29:11 +0200
commit20a21437498b70a63d587b83374d9df5c07a4463 (patch)
tree68f94ed9617ff58fa016885e268e18a3a8541655
parentMerge pull request #179033 from NixOS/backport-178703-to-release-22.05 (diff)
downloadnixpkgs-20a21437498b70a63d587b83374d9df5c07a4463.tar.gz
nixos/gitlab: Use Git 2.35.x to work around git bug
Git 2.36.1 seemingly contains a commit-graph related bug which is easily triggered through GitLab, so let's downgrade it to 2.35.x until this issue is solved. See https://gitlab.com/gitlab-org/gitlab/-/issues/360783#note_992870101. (cherry picked from commit f94d14899d70150abcf2823e243524397b0c1806)
-rw-r--r--nixos/modules/services/misc/gitlab.nix28
1 files changed, 22 insertions, 6 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index 24eefb7bf302..0b8bd08a22bc 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -13,6 +13,22 @@ let
else
pkgs.postgresql_12;
+ # Git 2.36.1 seemingly contains a commit-graph related bug which is
+ # easily triggered through GitLab, so we downgrade it to 2.35.x
+ # until this issue is solved. See
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/360783#note_992870101.
+ gitPackage =
+ let
+ version = "2.35.3";
+ in
+ pkgs.git.overrideAttrs (oldAttrs: rec {
+ inherit version;
+ src = pkgs.fetchurl {
+ url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
+ sha256 = "sha256-FenbT5vy7Z//MMtioAxcfAkBAV9asEjNtOiwTd7gD6I=";
+ };
+ });
+
gitlabSocket = "${cfg.statePath}/tmp/sockets/gitlab.socket";
gitalySocket = "${cfg.statePath}/tmp/sockets/gitaly.socket";
pathUrlQuote = url: replaceStrings ["/"] ["%2F"] url;
@@ -41,7 +57,7 @@ let
prometheus_listen_addr = "localhost:9236"
[git]
- bin_path = "${pkgs.git}/bin/git"
+ bin_path = "${gitPackage}/bin/git"
[gitaly-ruby]
dir = "${cfg.packages.gitaly.ruby}"
@@ -137,7 +153,7 @@ let
};
workhorse.secret_file = "${cfg.statePath}/.gitlab_workhorse_secret";
gitlab_kas.secret_file = "${cfg.statePath}/.gitlab_kas_secret";
- git.bin_path = "git";
+ git.bin_path = "${gitPackage}/bin/git";
monitoring = {
ip_whitelist = [ "127.0.0.0/8" "::1/128" ];
sidekiq_exporter = {
@@ -1275,7 +1291,7 @@ in {
});
path = with pkgs; [
postgresqlPackage
- git
+ gitPackage
ruby
openssh
nodejs
@@ -1306,7 +1322,7 @@ in {
path = with pkgs; [
openssh
procps # See https://gitlab.com/gitlab-org/gitaly/issues/1562
- git
+ gitPackage
cfg.packages.gitaly.rubyEnv
cfg.packages.gitaly.rubyEnv.wrappedRuby
gzip
@@ -1351,7 +1367,7 @@ in {
partOf = [ "gitlab.target" ];
path = with pkgs; [
exiftool
- git
+ gitPackage
gnutar
gzip
openssh
@@ -1412,7 +1428,7 @@ in {
environment = gitlabEnv;
path = with pkgs; [
postgresqlPackage
- git
+ gitPackage
openssh
nodejs
procps