
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: b484354a by Pier Angelo Vendrame at 2025-08-19T18:44:06+02:00 Bug 40551: Remove our patch for the Go compiler. - - - - - 4 changed files: - − projects/go/0001-Use-fixed-go-build-tmp-directory.patch - projects/go/README.md - projects/go/build - projects/go/config Changes: ===================================== projects/go/0001-Use-fixed-go-build-tmp-directory.patch deleted ===================================== @@ -1,36 +0,0 @@ -From 2c1c98d6404284df744a194dd23bd3660f365387 Mon Sep 17 00:00:00 2001 -From: Georg Koppen <gk@torproject.org> -Date: Fri, 17 Apr 2020 10:24:23 +0000 -Subject: [PATCH] Use fixed go-build tmp directory - -Use fixed go-build tmp directory, when the directory does not exist, in -order to avoid some reproducibility issues where build directory gets -embedded in generated binaries. ---- - src/cmd/go/internal/work/action.go | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go -index 8beb1345d0..dccf39c1c1 100644 ---- a/src/cmd/go/internal/work/action.go -+++ b/src/cmd/go/internal/work/action.go -@@ -279,9 +279,13 @@ func NewBuilder(workDir string) *Builder { - if !buildInitStarted { - panic("internal error: NewBuilder called before BuildInit") - } -- tmp, err := os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build") -- if err != nil { -- base.Fatalf("go: creating work dir: %v", err) -+ tmp := filepath.Join(cfg.Getenv("GOTMPDIR"), "go-build-workdir") -+ _, err := os.Stat(tmp) -+ if !os.IsNotExist(err) { -+ tmp, err = os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build") -+ if err != nil { -+ base.Fatalf("go: creating work dir: %v", err) -+ } - } - if !filepath.IsAbs(tmp) { - abs, err := filepath.Abs(tmp) --- -2.39.2 - ===================================== projects/go/README.md ===================================== @@ -7,7 +7,5 @@ We use it to build the various pluggable transports. We have another project (`go-bootstrap`) to provide it, and we make all targets use the `linux-x86_64` bootstrapper, since we don't need to cross-compile anything with it. -- On Android, we include a patch to fix a temporary directory whose path might - end up on binaries under some circumstances. - We create a compiler wrapper to include our custom arguments on macOS and on Windows because the `make.bash` script seems to lose our arguments. ===================================== projects/go/build ===================================== @@ -43,7 +43,6 @@ cd /var/tmp/dist/go/src chmod +x "$CC_FOR_TARGET" CGO_ENABLED=1 CC_FOR_TARGET="$CC_FOR_TARGET" CC= CFLAGS= LDFLAGS= ./make.bash [% ELSIF c("var/android") -%] - patch -p2 < $rootdir/0001-Use-fixed-go-build-tmp-directory.patch CGO_ENABLED=1 CC_FOR_TARGET=[% c("var/CC") %] CC= CFLAGS= LDFLAGS= ./make.bash [% END -%] ===================================== projects/go/config ===================================== @@ -92,5 +92,3 @@ input_files: name: go-bootstrap target_replace: '^.*browser-(?!testbuild).*': 'basebrowser-linux-x86_64' - - filename: 0001-Use-fixed-go-build-tmp-directory.patch - enable: '[% c("var/android") %]' View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/b4... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/b4... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
Pier Angelo Vendrame (@pierov)