A new user interface for you! Read more...

File better_socket_path.patch of Package gitaly

Index: gitaly-v1.47.0/internal/rubyserver/rubyserver.go
===================================================================
--- gitaly-v1.47.0.orig/internal/rubyserver/rubyserver.go
+++ gitaly-v1.47.0/internal/rubyserver/rubyserver.go
@@ -3,7 +3,7 @@ package rubyserver
 import (
 	"context"
 	"fmt"
-	"io/ioutil"
+	//	"io/ioutil"
 	"net"
 	"os"
 	"path"
@@ -52,7 +52,8 @@ func prepareSocketPath() {
 	// will later want to set its permissions to 0700. The permission change
 	// is done in the Ruby child process.
 	var err error
-	socketDir, err = ioutil.TempDir("", "gitaly-ruby")
+	socketDir = filepath.Clean("/srv/www/vhosts/gitlab-ce/tmp/sockets/private/gitaly/")
+	err = os.MkdirAll(socketDir, 0700)
 	if err != nil {
 		log.Fatalf("create ruby server socket directory: %v", err)
 	}
Index: gitaly-v1.47.0/ruby/bin/gitaly-ruby
===================================================================
--- gitaly-v1.47.0.orig/ruby/bin/gitaly-ruby
+++ gitaly-v1.47.0/ruby/bin/gitaly-ruby
@@ -20,9 +20,9 @@ def main
   abort "invalid PPID: #{ppid.inspect}" unless ppid_i > 0
 
   FileUtils.rm_f(socket_path)
-  socket_dir = File.dirname(socket_path)
-  FileUtils.mkdir_p(socket_dir)
-  File.chmod(0700, socket_dir)
+  # socket_dir = File.dirname(socket_path)
+  # FileUtils.mkdir_p(socket_dir)
+  # File.chmod(0700, socket_dir)
 
   load_distributed_tracing