GNU bug report logs - #68067
gnu: torbrowser: Add bridges.

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Wed, 27 Dec 2023 21:07:02 UTC

Severity: normal

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Clément Lassieur <clement <at> lassieur.org>
To: 68067 <at> debbugs.gnu.org
Cc: Clément Lassieur <clement <at> lassieur.org>
Subject: [bug#68067] [PATCH 8/8] gnu: torbrowser: Add bridges.
Date: Wed, 27 Dec 2023 22:12:14 +0100
* gnu/packages/tor.scm (torbrowser)[arguments]: Add an 'add-bridges' phase,
update the 'deploy-assets' phase so to fix the lyrebird path.
[inputs]: Add
go-gitlab-torproject-org-tpo-anti-censorship-pluggable-transports-lyrebird.

Change-Id: I17c85486ab44178be9eab31a078f6392857a044f
---
 gnu/packages/tor.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm
index bbcc9e15d607..ad44b8f3a2e0 100644
--- a/gnu/packages/tor.scm
+++ b/gnu/packages/tor.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021-2023 Danial Behzadi <dani.behzi <at> ubuntu.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022 Jim Newsome <jnewsome <at> torproject.org>
+;;; Copyright © 2023 Clément Lassieur <clement <at> lassieur.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -52,6 +53,7 @@ (define-module (gnu packages tor)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages golang)
   #:use-module (gnu packages gnuzilla)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -595,14 +597,27 @@ (define-public torbrowser
                 (substitute*
                     "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl"
                   (("addons.mozilla.org") "gnuzilla.gnu.org"))))
-            (add-after 'install 'deploy-assets
+            (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))))
+            (add-after 'install 'deploy-assets
+              (lambda* (#:key inputs #:allow-other-keys)
                 (let ((assets #$(this-package-input "torbrowser-assets"))
                       (lib (in-vicinity #$output "lib/torbrowser"))
                       (tor #$(this-package-input "tor-client")))
                   ;; TorBrowser/Data/Tor/torrc-defaults
                   (copy-recursively (in-vicinity assets "TorBrowser")
                                     (in-vicinity lib "TorBrowser"))
+                  (substitute*
+                      (in-vicinity lib "TorBrowser/Data/Tor/torrc-defaults")
+                    (("exec ./TorBrowser/Tor/PluggableTransports/lyrebird")
+                     (string-append
+                      "exec " (search-input-file inputs "bin/lyrebird"))))
                   ;; The geoip and geoip6 files are in the same directory as
                   ;; torrc-defaults.  (See TorProcess.sys.mjs.)
                   (mkdir-p (in-vicinity lib "TorBrowser/Data/Tor"))
@@ -752,6 +767,7 @@ (define-public torbrowser
     (inputs
      (modify-inputs (package-inputs icecat-minimal)
        (append bash-minimal
+               go-gitlab-torproject-org-tpo-anti-censorship-pluggable-transports-lyrebird
                tor-client
                torbrowser-assets)))
     (propagated-inputs
-- 
2.41.0





This bug report was last modified 1 year and 208 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.