gitlab-shell: 13.15.1 -> 13.17.0

Only the version had been updated previously, not the hashes and
patches.

talyz 7377a1df 6da2f72f

+23 -32
+4 -1
pkgs/applications/version-management/gitlab/default.nix
··· 122 122 rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler tzdata git nettools 123 123 ]; 124 124 125 - patches = [ ./remove-hardcoded-locations.patch ]; 125 + patches = [ 126 + # Change hardcoded paths to the NixOS equivalent 127 + ./remove-hardcoded-locations.patch 128 + ]; 126 129 127 130 postPatch = '' 128 131 ${lib.optionalString (!gitlabEnterprise) ''
+2 -2
pkgs/applications/version-management/gitlab/gitlab-shell/default.nix
··· 7 7 owner = "gitlab-org"; 8 8 repo = "gitlab-shell"; 9 9 rev = "v${version}"; 10 - sha256 = "sha256-wDZLcCBbWjG6wIcEj02eqwWVfAYy1TuAo/xvJB8tt+0="; 10 + sha256 = "sha256-j/80AIIJdRSisu2fNXcqazb4oIzAQP5CfxHX3l6yijY="; 11 11 }; 12 12 13 13 buildInputs = [ ruby ]; 14 14 15 15 patches = [ ./remove-hardcoded-locations.patch ]; 16 16 17 - vendorSha256 = "16fa3bka0008x2yazahc6xxcv4fa6yqg74kk64v8lrp7snbvjf4d"; 17 + vendorSha256 = "sha256-/jJTMtS5fcbQroWuaPPfvYxy6znNS0FOXVN7IcE/spQ="; 18 18 19 19 postInstall = '' 20 20 cp -r "$NIX_BUILD_TOP/source"/bin/* $out/bin
+17 -29
pkgs/applications/version-management/gitlab/gitlab-shell/remove-hardcoded-locations.patch
··· 1 1 diff --git a/internal/config/config.go b/internal/config/config.go 2 - index 79c2a36..12ba31e 100644 2 + index 36f8625..72ede08 100644 3 3 --- a/internal/config/config.go 4 4 +++ b/internal/config/config.go 5 - @@ -3,7 +3,6 @@ package config 6 - import ( 7 - "io/ioutil" 8 - "net/url" 9 - - "os" 10 - "path" 11 - "path/filepath" 12 - 13 - @@ -59,16 +58,13 @@ func (c *Config) GetHttpClient() *client.HttpClient { 14 - } 15 - 16 - func New() (*Config, error) { 17 - - dir, err := os.Getwd() 18 - - if err != nil { 19 - - return nil, err 20 - - } 21 - + dir := "/run/gitlab" 22 - 23 - return NewFromDir(dir) 24 - } 5 + @@ -12,7 +12,7 @@ import ( 6 + ) 25 7 26 - func NewFromDir(dir string) (*Config, error) { 27 - - return newFromFile(path.Join(dir, configFile)) 28 - + return newFromFile("/run/gitlab/shell-config.yml") 29 - } 8 + const ( 9 + - configFile = "config.yml" 10 + + configFile = "shell-config.yml" 11 + defaultSecretFileName = ".gitlab_shell_secret" 12 + ) 30 13 31 - func newFromFile(filename string) (*Config, error) { 14 + @@ -91,7 +91,7 @@ func (c *Config) GetHttpClient() *client.HttpClient { 15 + // NewFromDirExternal returns a new config from a given root dir. It also applies defaults appropriate for 16 + // gitlab-shell running in an external SSH server. 17 + func NewFromDirExternal(dir string) (*Config, error) { 18 + - cfg, err := newFromFile(filepath.Join(dir, configFile)) 19 + + cfg, err := newFromFile(filepath.Join("/run/gitlab", configFile)) 20 + if err != nil { 21 + return nil, err 22 + } 32 23 diff --git a/internal/keyline/key_line.go b/internal/keyline/key_line.go 33 24 index c6f2422..fb0426b 100644 34 25 --- a/internal/keyline/key_line.go ··· 55 46 end 56 47 57 48 def auth_file 58 - -- 59 - 2.28.0 60 -