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

Commits:

3 changed files:

Changes:

  • projects/conjure/build
    ... ... @@ -19,11 +19,6 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_ta
    19 19
     cd /var/tmp/build/[% project %]-[% c('version') %]
    
    20 20
     
    
    21 21
     tar -xf $rootdir/[% c('input_files_by_name/go_vendor') %]
    
    22
    -[% IF c("var/windows") -%]
    
    23
    -  pushd vendor/github.com/refraction-networking/conjure
    
    24
    -  patch -p1 < $rootdir/conjure-pr-267.patch
    
    25
    -  popd
    
    26
    -[% END -%]
    
    27 22
     
    
    28 23
     cd client
    
    29 24
     go build -ldflags '-s[% IF c("var/android") %] -checklinkname=0[% END %]' -tags 'protoreflect'
    

  • projects/conjure/config
    ... ... @@ -22,9 +22,5 @@ steps:
    22 22
               sha256sum: d43631d17d8b6f78152bb4341f867bb22ad4444fec5573be1d34dac968202cda
    
    23 23
             target_replace:
    
    24 24
               '^torbrowser-(?!testbuild).*': 'torbrowser-linux-x86_64'
    
    25
    -      # https://github.com/refraction-networking/conjure/pull/267
    
    26
    -      # Remove this once the depdency is updated.
    
    27
    -      - filename: conjure-pr-267.patch
    
    28
    -        enable: '[% c("var/windows") %]'
    
    29 25
           - name: go-licenses
    
    30 26
             project: go-licenses

  • projects/conjure/conjure-pr-267.patch deleted
    1
    -From e5968e71e3ce40e24a5108d2dea7a9bc1d050559 Mon Sep 17 00:00:00 2001
    
    2
    -From: Rod Hynes <rod-hynes@users.noreply.github.com>
    
    3
    -Date: Mon, 29 Jan 2024 13:34:44 -0500
    
    4
    -Subject: [PATCH] Fix Windows build
    
    5
    -
    
    6
    ----
    
    7
    - pkg/transports/connecting/dtls/nat.go                |  5 ++---
    
    8
    - pkg/transports/connecting/dtls/setsockopt_other.go   | 12 ++++++++++++
    
    9
    - pkg/transports/connecting/dtls/setsockopt_windows.go | 12 ++++++++++++
    
    10
    - 3 files changed, 26 insertions(+), 3 deletions(-)
    
    11
    - create mode 100644 pkg/transports/connecting/dtls/setsockopt_other.go
    
    12
    - create mode 100644 pkg/transports/connecting/dtls/setsockopt_windows.go
    
    13
    -
    
    14
    -diff --git a/pkg/transports/connecting/dtls/nat.go b/pkg/transports/connecting/dtls/nat.go
    
    15
    -index 8860316b..ab3716b9 100644
    
    16
    ---- a/pkg/transports/connecting/dtls/nat.go
    
    17
    -+++ b/pkg/transports/connecting/dtls/nat.go
    
    18
    -@@ -5,7 +5,6 @@ import (
    
    19
    - 	"fmt"
    
    20
    - 	"net"
    
    21
    - 	"os"
    
    22
    --	"syscall"
    
    23
    - 	"time"
    
    24
    - 
    
    25
    - 	"github.com/pion/stun"
    
    26
    -@@ -58,7 +57,7 @@ func openUDPLimitTTL(ctx context.Context, laddr, addr string, dialer dialFunc) e
    
    27
    - 	defer fd.Close()
    
    28
    - 
    
    29
    - 	// Set the TTL
    
    30
    --	err = syscall.SetsockoptInt(int(fd.Fd()), syscall.IPPROTO_IP, syscall.IP_TTL, ttl)
    
    31
    -+	err = setSocketTTL(fd, ttl)
    
    32
    - 	if err != nil {
    
    33
    - 		return err
    
    34
    - 	}
    
    35
    -@@ -70,7 +69,7 @@ func openUDPLimitTTL(ctx context.Context, laddr, addr string, dialer dialFunc) e
    
    36
    - 	}
    
    37
    - 
    
    38
    - 	// reset TTL
    
    39
    --	err = syscall.SetsockoptInt(int(fd.Fd()), syscall.IPPROTO_IP, syscall.IP_TTL, defaultTTL)
    
    40
    -+	err = setSocketTTL(fd, defaultTTL)
    
    41
    - 	if err != nil {
    
    42
    - 		return err
    
    43
    - 	}
    
    44
    -diff --git a/pkg/transports/connecting/dtls/setsockopt_other.go b/pkg/transports/connecting/dtls/setsockopt_other.go
    
    45
    -new file mode 100644
    
    46
    -index 00000000..eeba1ed6
    
    47
    ---- /dev/null
    
    48
    -+++ b/pkg/transports/connecting/dtls/setsockopt_other.go
    
    49
    -@@ -0,0 +1,12 @@
    
    50
    -+//go:build !windows
    
    51
    -+
    
    52
    -+package dtls
    
    53
    -+
    
    54
    -+import (
    
    55
    -+	"os"
    
    56
    -+	"syscall"
    
    57
    -+)
    
    58
    -+
    
    59
    -+func setSocketTTL(f *os.File, ttl int) error {
    
    60
    -+	return syscall.SetsockoptInt(int(f.Fd()), syscall.IPPROTO_IP, syscall.IP_TTL, ttl)
    
    61
    -+}
    
    62
    -diff --git a/pkg/transports/connecting/dtls/setsockopt_windows.go b/pkg/transports/connecting/dtls/setsockopt_windows.go
    
    63
    -new file mode 100644
    
    64
    -index 00000000..6ab835ea
    
    65
    ---- /dev/null
    
    66
    -+++ b/pkg/transports/connecting/dtls/setsockopt_windows.go
    
    67
    -@@ -0,0 +1,12 @@
    
    68
    -+//go:build windows
    
    69
    -+
    
    70
    -+package dtls
    
    71
    -+
    
    72
    -+import (
    
    73
    -+	"os"
    
    74
    -+	"syscall"
    
    75
    -+)
    
    76
    -+
    
    77
    -+func setSocketTTL(f *os.File, ttl int) error {
    
    78
    -+	return syscall.SetsockoptInt(syscall.Handle(f.Fd()), syscall.IPPROTO_IP, syscall.IP_TTL, ttl)
    
    79
    -+}