Subject: [PATCH 3/3] gnu: torbrowser: Update to 13.5.

From: André Batista <[email-masked]>
Date: Wed, 26 Jun 2024 10:47:48 -0300

* gnu/packages/tor-browsers.scm (%torbrowser-build-date): Update to
20240611120000.
(%torbrowser-version): Update to 13.5.
(%torbrowser-firefox-version): Update to 115.12.0esr-13.5-1-build3.
(torbrowser-translation-base): Update to
dc59db634f066298e903142227834da483ec197d.
(torbrowser-translation-specific): Update to
de4f91a5020d637ab5d66459718525a5f9207be2.
(lld-as-ld-wrapper-16): New variable.
(make-torbrowser)[native-inputs]: Add lld-as-ld-wrapper-16. Use
llvm-16 and clang-16. [arguments] <#:phases>:  Remove add-bridges.

Change-Id: Ic08578fa1b0f33a8f426c60ca65db3c9102ad554

---
 gnu/packages/tor-browsers.scm | 35 ++++++++++++++++-------------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/tor-browsers.scm b/gnu/packages/tor-browsers.scm
index 3d01346c8c..0407cc39dc 100644
--- a/gnu/packages/tor-browsers.scm
+++ b/gnu/packages/tor-browsers.scm
@@ -151,16 +151,16 @@ (define %torbrowser-locales
 
 ;; We copy the official build id, which is defined at
 ;; tor-browser-build/rbm.conf (browser_release_date).
-(define %torbrowser-build-date "20240510190000")
+(define %torbrowser-build-date "20240611120000")
 
 ;; To find the last version, look at https://www.torproject.org/download/.
-(define %torbrowser-version "13.0.16")
+(define %torbrowser-version "13.5")
 
 ;; To find the last Firefox version, browse
 ;; https://archive.torproject.org/tor-package-archive/torbrowser/<%torbrowser-version>
 ;; There should be only one archive that starts with
 ;; "src-firefox-tor-browser-".
-(define %torbrowser-firefox-version "115.12.0esr-13.0-1-build1")
+(define %torbrowser-firefox-version "115.12.0esr-13.5-1-build3")
 
 ;; See tor-browser-build/projects/translation/config.
 (define torbrowser-translation-base
@@ -168,11 +168,11 @@ (define torbrowser-translation-base
     (method git-fetch)
     (uri (git-reference
           (url "https://gitlab.torproject.org/tpo/translation.git")
-          (commit "f28525699864f4e3d764c354130bd898ce5b20aa")))
+          (commit "dc59db634f066298e903142227834da483ec197d")))
     (file-name "translation-base-browser")
     (sha256
      (base32
-      "1vf6nl7fdmlmg2gskf3w1xlsgcm0pxi54z2daz5nwr6q9gyi0lkf"))))
+      "11lbw2lpsjm0r2lwmy8i2db40r5ypf8fhn4jh59l927g40ch6dxw"))))
 
 ;; See tor-browser-build/projects/translation/config.
 (define torbrowser-translation-specific
@@ -180,11 +180,11 @@ (define torbrowser-translation-specific
     (method git-fetch)
     (uri (git-reference
           (url "https://gitlab.torproject.org/tpo/translation.git")
-          (commit "b5d79336411e5a59c4861341ef9aa7353e0bcad9")))
+          (commit "de4f91a5020d637ab5d66459718525a5f9207be2")))
     (file-name "translation-tor-browser")
     (sha256
      (base32
-      "0ahz69pxhgik7ynmdkbnx7v5l2v392i6dswjz057g4hwnd7d34fb"))))
+      "0q8nnqf4zhqivv3rjlvcsbac5254ingw98qwrbnhz3m5gl78vpcf"))))
 
 (define torbrowser-assets
   ;; This is a prebuilt Torbrowser from which we take the assets we need.
@@ -200,7 +200,7 @@ (define torbrowser-assets
          version "/tor-browser-linux-x86_64-" version ".tar.xz"))
        (sha256
         (base32
-         "1kffam66bsaahzx212hw9lb03jwfr24hivzg067iyzilsldpc9c1"))))
+         "0fqqzrwpqzadgi24qarpnj8aac5w57qlfb4vy2cwga5h40dsp6ly"))))
     (arguments
      (list
       #:install-plan
@@ -215,6 +215,10 @@ (define torbrowser-assets
 Browser.")
     (license license:silofl1.1)))
 
+;;; A LLD wrapper that can be used as a (near) drop-in replacement to GNU ld.
+(define lld-as-ld-wrapper-16
+  (make-lld-wrapper lld-16 #:lld-as-ld? #t))
+
 (define* (make-torbrowser #:key
                           moz-app-name
                           moz-app-remotingname
@@ -238,7 +242,7 @@ (define* (make-torbrowser #:key
          ".tar.xz"))
        (sha256
         (base32
-         "1b70zyjyai6kk4y1kkl8jvrs56gg7z31kkad6bmdpd8jw4n71grx"))))
+         "0i5fmippmzhd1nlhzk46rnhv2rgb2ari071m8yww7gk8lfnn5x5f"))))
     (build-system mozilla-build-system)
     (inputs
      (list go-gitlab-torproject-org-tpo-anti-censorship-pluggable-transports-lyrebird
@@ -293,8 +297,9 @@ (define* (make-torbrowser #:key
       rust
       `(,rust "cargo")
       rust-cbindgen
-      llvm-15
-      clang-15
+      lld-as-ld-wrapper-16  ; for cargo rustc
+      llvm-16
+      clang-16
       perl
       node-lts
       python-wrapper
@@ -632,14 +637,6 @@ (define (runpaths-of-input label)
               (substitute*
                   "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl"
                 (("addons.mozilla.org") "gnuzilla.gnu.org"))))
-          (add-before 'build 'add-bridges ;see deploy.sh
-            (lambda _
-              (let ((port (open-file
-                           "browser/app/profile/000-tor-browser.js" "a")))
-                (display
-                 "#include ../../../tools/torbrowser/bridges.js" port)
-                (newline port)
-                (close port))))
           (replace 'build
             (lambda* (#:key (make-flags '()) (parallel-build? #t)
                       #:allow-other-keys)
-- 
2.45.1