From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id aGyeIzEFqmX5BQEAqHPOHw:P1 (envelope-from ) for ; Fri, 19 Jan 2024 06:14:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aGyeIzEFqmX5BQEAqHPOHw (envelope-from ) for ; Fri, 19 Jan 2024 06:14:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lassieur.org header.s=fm2 header.b="d mVt7BF"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="Z WYn1rB"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705641265; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jm4CZD1c/WekaUeqXugE8ShVVtnB2/1hGOGXCEJzp8Q=; b=jJBoOpnyVSE3NUjuHJmJdTBB2pxfqt44Aizaew9s7tfMCYEbXF8ZJRJYWurxwA8zsnnxep v/aDKKCx64pUGZEdZ/siLjXEdEJC5cgcqQTWzdjP8k434CWw39umVz1Vlz+GYsAtEnHgKT rb9kLYQlOWe8VAMKLiSMg0saqacm6DoLQvwU+taYlysgpz69LrD1EflawJdMhy27JlGZR+ qfqOV0xefdr6E0ZQidLrd/T07XFRA53fP5BmDRqyetIAvcd0xwrvoYL30VIctTdko21IzL gVR42O4FiUwoWZzLONey8p6Yc6zeqsfS+ixR6LbMqF2hRNjMXeVSjcEFnWMq5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lassieur.org header.s=fm2 header.b="d mVt7BF"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="Z WYn1rB"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705641265; a=rsa-sha256; cv=none; b=ljtJZRPBxtDVt3CFXwIHmXRZiWGMifp+ZriY1ePo9qZU6yvEOIEH31G/cKUCIA939wbdlX m2/WxgBR99YjrEeIvRfpExV1emiFWVnWy37ZcBzsjJAXGQNfYaIedoTIzzZrUPnSCni+XY H1AAyN6+emOCYmHjNp1wKfZRz3NPD9Vr7XiMrk6v754q+eiBfQBZtwubwbSMxevPbZTMOU MERAC1VYQDlXP+m+dBkbWd9VmXcB7pOdDcHWOXr0ayv1OaKi0DfdMCWPzgGU4e5G0xOKwv 4Oy0SbZKUZQ3uBa9LGBW0x0VuaukjsilWYgW7OsWFNyEKNcgOb/QUub/TF7aVQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13BDD15D80 for ; Fri, 19 Jan 2024 06:14:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQhCc-0005GB-Cm; Fri, 19 Jan 2024 00:14:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQhCa-0005Fi-Tp for guix-patches@gnu.org; Fri, 19 Jan 2024 00:14:00 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQhCa-0006ad-L7 for guix-patches@gnu.org; Fri, 19 Jan 2024 00:14:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQhCc-0002Rz-Kw for guix-patches@gnu.org; Fri, 19 Jan 2024 00:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68577] [PATCH v2 2/2] gnu: Add mullvadbrowser. Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Jan 2024 05:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68577 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68577@debbugs.gnu.org Cc: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Received: via spool by 68577-submit@debbugs.gnu.org id=B68577.17056411939323 (code B ref 68577); Fri, 19 Jan 2024 05:14:02 +0000 Received: (at 68577) by debbugs.gnu.org; 19 Jan 2024 05:13:13 +0000 Received: from localhost ([127.0.0.1]:57234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQhBo-0002QH-UV for submit@debbugs.gnu.org; Fri, 19 Jan 2024 00:13:13 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:53875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQhBk-0002Pq-5M for 68577@debbugs.gnu.org; Fri, 19 Jan 2024 00:13:09 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6AEF63200A70; Fri, 19 Jan 2024 00:13:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 19 Jan 2024 00:13:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lassieur.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1705641180; x= 1705727580; bh=jm4CZD1c/WekaUeqXugE8ShVVtnB2/1hGOGXCEJzp8Q=; b=d mVt7BFplQTkhCF+UpiMyUzPAoX+Qn8eiXo0unUgLsRbZ9734kTd7AWpNC//tT4/O dqM5227H08UnhO+dKn1kwWuvI+1Qj5+UBr8yXOKIOAIKNPA76ke8UMhQeBJjzX2j LQa42MrWzzLbmXloQ0kvShk4LIfLtrXFcE5RVkS8tpGUVmgaJAHMLmBKKjEzgQgW V5hMbBA5tqjk838CyI0fI0YMIyi0PgDFwLwfLQa8xK4l3DiWncrc+J5uSRmVmOON eg1ZqiZGTZrbzV4wr3kbAqJ6pGrjT1LA+49e7IEg+J33UK7gpsfAwIXmz8hwWfBv UE8lEaRc/zeO5DnwNajTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1705641180; x= 1705727580; bh=jm4CZD1c/WekaUeqXugE8ShVVtnB2/1hGOGXCEJzp8Q=; b=Z WYn1rBDIFOWC48TqWi98oD2OWHNdRdaFCSeytsbhadqwzBNWFFTKTxvvTD2kN0a9 1gdrPAtRhczjPcD1MKs7mfSsZGApBev9laj23GWYiRYjzv+5NVVH2UOSSM/zdPBr zdtcOL3jfXbK9lNW3JgyS+VfP8GaIUWNqK3WtKWNrVOdIkg8nme9EsdnaHapSmQf KwsTOT/XjXiiRXQCzSxNgZBEWcOyiTyXXT8kcxEdGuPcweDZO3YuhC6gjHVxggD7 HypQFr6TLBilmN8Nu8sfmeSrrUaHhNBoyQmAX56xWbt5g+qoHR6Z/5fhhEPX33qM Occ1r9oXQ3i5pTnOo0HgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejledgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertdejnecuhfhrohhmpeevlhormhgvnhhtucfnrghsshhivghurhcuoegtlhgvmhgv nhhtsehlrghsshhivghurhdrohhrgheqnecuggftrfgrthhtvghrnheptdejleegkeevie evhfduudfgvefggeejvdejtedutedtvedujeetffefheffieejnecuffhomhgrihhnpehm uhhllhhvrggurdhnvghtpdhtohhrphhrohhjvggtthdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegtlhgvmhgvnhhtsehlrghsshhi vghurhdrohhrgh X-ME-Proxy: Feedback-ID: i4c21472a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 19 Jan 2024 00:12:58 -0500 (EST) From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Date: Fri, 19 Jan 2024 06:12:52 +0100 Message-ID: <35881ec56cdda1e6fafc237250bf5b9ac0509efa.1705641113.git.clement@lassieur.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.27 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -1.27 X-Migadu-Queue-Id: 13BDD15D80 X-TUID: N+gV1i4z089C * gnu/packages/tor.scm (%mullvadbrowser-version, %mullvadbrowser-firefox-version, %mullvadbrowser-locales, translation-mullvad-browser, mullvadbrowser-assets, mullvadbrowser-base, mullvadbrowser): New variables. Change-Id: Ie6d48823b3794710f60f0ae201a0297925221f66 --- gnu/packages/tor.scm | 132 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index 8cd806fce9d3..96c4970dc843 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -879,3 +879,135 @@ (define-public torbrowser #:assets torbrowser-assets #:locales %torbrowser-locales #:base-browser-version %torbrowser-version)) + +;; To find the last version, look at +;; https://mullvad.net/en/download/browser/linux. +(define %mullvadbrowser-version "13.0.7") + +;; To find the last Firefox version, browse +;; https://archive.torproject.org/tor-package-archive/mullvadbrowser/<%mullvadbrowser-version> +;; There should be only one archive that starts with +;; "src-firefox-mullvad-browser-". +(define %mullvadbrowser-firefox-version "115.6.0esr-13.0-1-build1") + +;; Use the list in tor-browser-build/rbm.conf. +(define %mullvadbrowser-locales + '("ar" "da" "de" "es-ES" "fa" "fi" "fr" "it" "ja" "ko" "my" "nb-NO" "nl" + "pl" "pt-BR" "ru" "sv-SE" "th" "tr" "zh-CN" "zh-TW")) + +;; See tor-browser-build/projects/translation/config. +(define translation-mullvad-browser + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.torproject.org/tpo/translation.git") + (commit "57de1569da0e2c48fd999a13e555f6b522041993"))) + (file-name "translation-mullvad-browser") + (sha256 + (base32 + "1q3979ac92c5mib573hx9w06x3hrfw7r52wzmj9r75sz2hhsmrq3")))) + +(define mullvadbrowser-assets + ;; This is a prebuilt Mullvad Browser from which we take the assets we need. + (package + (name "mullvadbrowser-assets") + (version %mullvadbrowser-version) + (source + (origin + (method url-fetch) + (uri + (string-append + "https://archive.torproject.org/tor-package-archive/mullvadbrowser/" + version "/mullvad-browser-linux-x86_64-" version ".tar.xz")) + (sha256 + (base32 + "1i7vf7cn6s5iajsp4999jpxxn8qblljrrmfs4nswmc2swdmi07gk")))) + (arguments + (list + #:install-plan + ''(("Browser" "." #:include-regexp + ("^\\./fonts/" + "^\\./fontconfig/fonts.conf" + ;; Mullvad Browser Extension + "^\\./distribution/extensions/\\{d19a89b9-76c1-4a61-bcd4-49e8de916403\\}.xpi" + ))))) + (build-system copy-build-system) + (home-page "https://www.torproject.org") + (synopsis "Mullvad Browser assets") + (description "This package contains fonts and configuration files for +Mullvad Browser.") + (license license:silofl1.1))) + +(define mullvadbrowser-base + (make-torbrowser #:moz-app-name "mullvadbrowser" + #:moz-app-remotingname "Mullvad Browser" + #:branding-directory "browser/branding/mb-release" + #:assets mullvadbrowser-assets + #:locales %mullvadbrowser-locales + #:base-browser-version %mullvadbrowser-version)) + +(define-public mullvadbrowser + (package + (inherit mullvadbrowser-base) + (name "mullvadbrowser") + (version %mullvadbrowser-version) + (source + (origin + (method url-fetch) + (uri + (string-append + "https://archive.torproject.org/tor-package-archive/mullvadbrowser/" + version "/src-firefox-mullvad-browser-" + %mullvadbrowser-firefox-version ".tar.xz")) + (sha256 + (base32 + "1hhmq0sh949vzs3mhh0pmpd2llgw149mv7kzzg2ylj8h2628y0px")))) + (arguments + (substitute-keyword-arguments (package-arguments mullvadbrowser-base) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'ublock-private-allowed + (lambda _ + (substitute* "toolkit/components/extensions/Extension.sys.mjs" + ;; The code that gives the correct permission only applies to + ;; distribution add-ons (see installDistributionAddon() in + ;; XPIProvider.jsm). + (("this.isNoScript") + "this.isNoScript || this.id === \"uBlock0@raymondhill.net\"")))) + ;; See tor-browser-build/projects/firefox/build. + (replace 'copy-torbrowser-locales + (lambda _ + (for-each + (lambda (lang) + (system + (format #f "cp -Lr ~a/~a .mozbuild/l10n-central/" + #$translation-mullvad-browser lang))) + '#$%mullvadbrowser-locales))) + (add-before 'build 'fix-profiles + ;; Otherwise the profile would change every time the install + ;; location changes, that is: at every package update. These + ;; values are already the default values for Icecat and Tor + ;; Browser. + (lambda _ + (substitute* "browser/moz.configure" + (("\"MOZ_DEDICATED_PROFILES\", True") + "\"MOZ_DEDICATED_PROFILES\", False") + (("\"MOZ_BLOCK_PROFILE_DOWNGRADE\", True") + "\"MOZ_BLOCK_PROFILE_DOWNGRADE\", False")))) + (add-after 'deploy-fonts 'deploy-extension + (lambda* (#:key inputs #:allow-other-keys) + (let ((lib (in-vicinity #$output "lib/mullvadbrowser"))) + ;; Mullvad Browser Extension (FIXME: package it) + (copy-recursively + (in-vicinity #$mullvadbrowser-assets "distribution") + (in-vicinity lib "distribution"))))) + (delete 'deploy-tor-assets) + (delete 'autoconfig-tor))))) + (inputs (package-inputs icecat-minimal)) + (propagated-inputs + (list noscript/icecat + ublock-origin/icecat)) + (home-page "https://mullvad.net/en/browser") + (synopsis "Privacy-focused browser") + (description "Mullvad Browser is a privacy-focused web browser designed to +be used with a trustworthy VPN instead of the Tor Network."))) -- 2.41.0