Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

4 changed files:

Changes:

  • projects/go/0001-Use-fixed-go-build-tmp-directory.patch deleted
    1
    -From 2c1c98d6404284df744a194dd23bd3660f365387 Mon Sep 17 00:00:00 2001
    
    2
    -From: Georg Koppen <gk@torproject.org>
    
    3
    -Date: Fri, 17 Apr 2020 10:24:23 +0000
    
    4
    -Subject: [PATCH] Use fixed go-build tmp directory
    
    5
    -
    
    6
    -Use fixed go-build tmp directory, when the directory does not exist, in
    
    7
    -order to avoid some reproducibility issues where build directory gets
    
    8
    -embedded in generated binaries.
    
    9
    ----
    
    10
    - src/cmd/go/internal/work/action.go | 10 +++++++---
    
    11
    - 1 file changed, 7 insertions(+), 3 deletions(-)
    
    12
    -
    
    13
    -diff --git a/src/cmd/go/internal/work/action.go b/src/cmd/go/internal/work/action.go
    
    14
    -index 8beb1345d0..dccf39c1c1 100644
    
    15
    ---- a/src/cmd/go/internal/work/action.go
    
    16
    -+++ b/src/cmd/go/internal/work/action.go
    
    17
    -@@ -279,9 +279,13 @@ func NewBuilder(workDir string) *Builder {
    
    18
    - 		if !buildInitStarted {
    
    19
    - 			panic("internal error: NewBuilder called before BuildInit")
    
    20
    - 		}
    
    21
    --		tmp, err := os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build")
    
    22
    --		if err != nil {
    
    23
    --			base.Fatalf("go: creating work dir: %v", err)
    
    24
    -+		tmp := filepath.Join(cfg.Getenv("GOTMPDIR"), "go-build-workdir")
    
    25
    -+		_, err := os.Stat(tmp)
    
    26
    -+		if !os.IsNotExist(err) {
    
    27
    -+			tmp, err = os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build")
    
    28
    -+			if err != nil {
    
    29
    -+				base.Fatalf("go: creating work dir: %v", err)
    
    30
    -+			}
    
    31
    - 		}
    
    32
    - 		if !filepath.IsAbs(tmp) {
    
    33
    - 			abs, err := filepath.Abs(tmp)
    
    34
    --- 
    
    35
    -2.39.2
    
    36
    -

  • projects/go/README.md
    ... ... @@ -7,7 +7,5 @@ We use it to build the various pluggable transports.
    7 7
       We have another project (`go-bootstrap`) to provide it, and we make all
    
    8 8
       targets use the `linux-x86_64` bootstrapper, since we don't need to
    
    9 9
       cross-compile anything with it.
    
    10
    -- On Android, we include a patch to fix a temporary directory whose path might
    
    11
    -  end up on binaries under some circumstances.
    
    12 10
     - We create a compiler wrapper to include our custom arguments on macOS and on
    
    13 11
       Windows because the `make.bash` script seems to lose our arguments.

  • projects/go/build
    ... ... @@ -43,7 +43,6 @@ cd /var/tmp/dist/go/src
    43 43
       chmod +x "$CC_FOR_TARGET"
    
    44 44
       CGO_ENABLED=1 CC_FOR_TARGET="$CC_FOR_TARGET" CC= CFLAGS= LDFLAGS= ./make.bash
    
    45 45
     [% ELSIF c("var/android") -%]
    
    46
    -  patch -p2 < $rootdir/0001-Use-fixed-go-build-tmp-directory.patch
    
    47 46
       CGO_ENABLED=1 CC_FOR_TARGET=[% c("var/CC") %] CC= CFLAGS= LDFLAGS= ./make.bash
    
    48 47
     [% END -%]
    
    49 48
     
    

  • projects/go/config
    ... ... @@ -92,5 +92,3 @@ input_files:
    92 92
         name: go-bootstrap
    
    93 93
         target_replace:
    
    94 94
           '^.*browser-(?!testbuild).*': 'basebrowser-linux-x86_64'
    95
    -  - filename: 0001-Use-fixed-go-build-tmp-directory.patch
    
    96
    -    enable: '[% c("var/android") %]'