diff options
author | Florian Klink <flokli@flokli.de> | 2018-11-23 15:29:38 +0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2018-11-23 17:59:38 +0100 |
commit | 293a631081baf9a5973e2583f4602512bfcb6c5f (patch) | |
tree | 83aeefa1a8342fd4fb01c9a6cb2c7c1df6a21ebd /pkgs/applications/version-management/gitlab/gitlab-shell | |
parent | 625e66d879fab8a771e1635185be8f69b785f638 (diff) | |
download | nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.tar nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.tar.gz nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.tar.bz2 nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.tar.lz nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.tar.xz nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.tar.zst nixlib-293a631081baf9a5973e2583f4602512bfcb6c5f.zip |
gitlab-shell: 8.3.3 -> 8.4.1
Diffstat (limited to 'pkgs/applications/version-management/gitlab/gitlab-shell')
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitlab-shell/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch | 44 |
2 files changed, 33 insertions, 15 deletions
diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix index 69c4b9a255e3..c9f21047e5b6 100644 --- a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix @@ -1,14 +1,14 @@ { stdenv, ruby, bundler, fetchFromGitLab, go }: stdenv.mkDerivation rec { - version = "8.3.3"; + version = "8.4.1"; name = "gitlab-shell-${version}"; src = fetchFromGitLab { owner = "gitlab-org"; repo = "gitlab-shell"; rev = "v${version}"; - sha256 = "1qapw0yvlw1nxjik7jpbbbl3yx299sfvdx67zsd5ai7bhk1gd8xl"; + sha256 = "00jzrpdfqgrba2qi5ngc0g07p7gmip7my563hw542gg8l88d27xq"; }; buildInputs = [ ruby bundler go ]; diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch index 38181399eec8..6d29f5f9e6c5 100644 --- a/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch @@ -1,23 +1,41 @@ diff --git a/go/internal/config/config.go b/go/internal/config/config.go -index c57b4de..88cfc95 100644 +index 435cb29..078c1df 100644 --- a/go/internal/config/config.go +++ b/go/internal/config/config.go -@@ -27,7 +27,7 @@ func New() (*Config, error) { - } - cfg.RootDir = dir - -- configBytes, err := ioutil.ReadFile(path.Join(cfg.RootDir, configFile)) -+ configBytes, err := ioutil.ReadFile("/run/gitlab/shell-config.yml") - if err != nil { - return nil, err - } +@@ -2,7 +2,6 @@ package config + + import ( + "io/ioutil" +- "os" + "path" + + yaml "gopkg.in/yaml.v2" +@@ -26,16 +25,13 @@ type Config struct { + } + + func New() (*Config, error) { +- dir, err := os.Getwd() +- if err != nil { +- return nil, err +- } ++ dir := "/run/gitlab" + + return NewFromDir(dir) + } + + func NewFromDir(dir string) (*Config, error) { +- return newFromFile(path.Join(dir, configFile)) ++ return newFromFile(path.Join(dir, "shell-config.yml")) + } + + func newFromFile(filename string) (*Config, error) { diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb -index 1452f95..2b40327 100644 +index 57c70f5..700569b 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb -@@ -180,7 +180,8 @@ class GitlabShell - end +@@ -187,7 +187,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength + args = [executable, gitaly_address, json_args] # We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is. - Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH) + # Except we don't, because we're already in the right directory on nixos! |