File: remove-go-embed.patch

package info (click to toggle)
gitaly 16.11.6%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,623,944 kB
  • sloc: cpp: 33,732; java: 20,579; sh: 5,372; cs: 3,973; javascript: 3,426; python: 3,053; makefile: 2,303; ansic: 1,729; php: 1,455; asm: 1,217; xml: 838; ruby: 452; sql: 431; yacc: 22; sed: 1
file content (49 lines) | stat: -rw-r--r-- 2,232 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Description: Removes //go:embed line to fix build.
 This was working in the past but started throwing "no matching files" error now.
 The build seems to check the embedded binaries before they are even built. Removing this
 line since we're building those embedded binaries as well. Also disable calling
 UnpackAuxiliaryBinaries when running the main gitaly binary
Author: Mohammed Bilal <rmb@debian.org>
Bug-Debian: https://bugs.debian.org/1052627
Forwarded: not-needed
Last-Update: 2023-10-04
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/packed_binaries.go
+++ b/packed_binaries.go
@@ -17,7 +17,6 @@
 // packedBinariesFS contains embedded binaries. If you modify the above embeddings, you must also update
 // GITALY_PACKED_EXECUTABLES in Makefile and packedBinaries in internal/gitaly/config/config.go.
 //
-//go:embed _build/bin/gitaly-hooks _build/bin/gitaly-ssh _build/bin/gitaly-lfs-smudge _build/bin/gitaly-gpg
 var packedBinariesFS embed.FS
 
 // UnpackAuxiliaryBinaries unpacks the packed auxiliary binaries of Gitaly into destination directory.
--- a/internal/cli/gitaly/serve.go
+++ b/internal/cli/gitaly/serve.go
@@ -11,7 +11,7 @@
 	"github.com/prometheus/client_golang/prometheus"
 	"github.com/prometheus/client_golang/prometheus/promauto"
 	"github.com/urfave/cli/v2"
-	"gitlab.com/gitlab-org/gitaly/v16"
+//	"gitlab.com/gitlab-org/gitaly/v16"
 	"gitlab.com/gitlab-org/gitaly/v16/internal/backup"
 	"gitlab.com/gitlab-org/gitaly/v16/internal/bootstrap"
 	"gitlab.com/gitlab-org/gitaly/v16/internal/bootstrap/starter"
@@ -183,11 +183,11 @@
 		}
 	}()
 
-	began = time.Now()
-	if err := gitaly.UnpackAuxiliaryBinaries(cfg.RuntimeDir); err != nil {
-		return fmt.Errorf("unpack auxiliary binaries: %w", err)
-	}
-	logger.WithField("duration_ms", time.Since(began).Milliseconds()).Info("finished unpacking auxiliary binaries")
+//	began = time.Now()
+//	if err := gitaly.UnpackAuxiliaryBinaries(cfg.RuntimeDir); err != nil {
+//		return fmt.Errorf("unpack auxiliary binaries: %w", err)
+//	}
+//	logger.WithField("duration_ms", time.Since(began).Milliseconds()).Info("finished unpacking auxiliary binaries")
 
 	began = time.Now()
 	b, err := bootstrap.New(logger, promauto.NewCounterVec(