Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 20:43:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 03 16:43:30 2021 Received: from localhost ([127.0.0.1]:44795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1louBd-0002rm-OA for submit <at> debbugs.gnu.org; Thu, 03 Jun 2021 16:43:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1louBc-0002ra-1K for 42380 <at> debbugs.gnu.org; Thu, 03 Jun 2021 16:43:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39776) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1louBV-00026j-Ik; Thu, 03 Jun 2021 16:43:21 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36084 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1louBV-0000Ca-9s; Thu, 03 Jun 2021 16:43:21 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: =?utf-8?Q?Andr=C3=A9?= Batista <nandre@HIDDEN> Subject: Re: [bug#42380] Wow! References: <20200715211547.GA17146@andel> <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> <20200915152332.GJ13296@andel> <87zgwic0qc.fsf@HIDDEN> <YK1MClOxWNySPXCM@HIDDEN> <87tumqwlqm.fsf@HIDDEN> <YLBLT5y08LIuYQba@andel> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Prairial an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 03 Jun 2021 22:43:19 +0200 In-Reply-To: <YLBLT5y08LIuYQba@andel> (=?utf-8?Q?=22Andr=C3=A9?= Batista"'s message of "Thu, 27 May 2021 22:45:51 -0300") Message-ID: <874keeu1aw.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42380 Cc: Raghav Gururajan <raghavgururajan@HIDDEN>, Xinglu Chen <public@HIDDEN>, 42380 <at> debbugs.gnu.org, Leo Famulari <leo@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Andr=C3=A9 Batista <nandre@HIDDEN> skribis: > Apart from noscript which Tor Browser itself does not build from source > and https-everywhere which at the time I thought I'd be able to build > from source but I got stuck on rust dependency nightmare and had to > delay. Unfortunately, this issue still remains to be solved. OK, not too bad. >> > My understanding is that the Tor people discourage anyone else from >> > distributing builds of the Tor browser. > > That's also my understanding, however I do think that building from > source is: 1. the very core of software freedom, despite the relevance > other concerns such as diminishing anonymity set; 2. one of the main > strenghts and what Guix strives for. +1 > In the mean time, I'll take this as an invitation to send a new patch > version with the latest Tor Browser stable. I've made some minor > improvements such as using tarballs from archive.torproject.org instead > of {git|dist}.torproject.org. > > Since they are planning a new stable release in the next few days, I'll > take the time to work on a reproducibility issue that have arised with > the new zip routine to package extensions inside omni.ja which affected > the timestamps, at least the way I did it. Exciting, thank you! Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 04:11:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 03 00:11:41 2021 Received: from localhost ([127.0.0.1]:41794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1loehg-0002Rt-JP for submit <at> debbugs.gnu.org; Thu, 03 Jun 2021 00:11:41 -0400 Received: from mx1.riseup.net ([198.252.153.129]:58618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1loehc-0002Re-PL for 42380 <at> debbugs.gnu.org; Thu, 03 Jun 2021 00:11:31 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwXWv0bFbzDq9F for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 21:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622693483; bh=67dS5pAUG7pxOX6jgAi+vXfV+Ef5JViUWK8qvmlamM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gCTIoDFODsEwQ+QFBrsmzYZTHbAAZxldtgKzSQbe+T0Yb4SnTiTIWCPTCCr5u9daL OK5XdxD4o+XV+NgMbczE67pIoHJjDshdRZTJbmuTasi4BrP7uQbTV4rnCt1POXn3CW /PD6pnb6qEiKKv9RytIS7Cv4CjigMTRVMR0Ty0cI= X-Riseup-User-ID: 4D9E26DF02AB2C464B05DA989E68488147DDBECC58A00EB8121706CB3D3F9024 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4FwXWs66Klz1y6h; Wed, 2 Jun 2021 21:11:21 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v5 9/9] gnu: Add torbrowser-unbundle. Date: Thu, 3 Jun 2021 01:10:35 -0300 Message-Id: <347e91d0ce7f96882f70a081b208c388153cd6b8.1622693271.git.nandre@HIDDEN> In-Reply-To: <88c9104dbc255f94f73b0dae2dad41ae23cc3448.1622687706.git.nandre@HIDDEN> References: <88c9104dbc255f94f73b0dae2dad41ae23cc3448.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/packages/tor.scm (torbrowser-unbundle): New variable. * gnu/packages/patches/torbrowser-start-desktop.patch: New file. * gnu/packages/patches/torbrowser-start-script.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. create mode 100644 gnu/packages/patches/torbrowser-start-desktop.patch create mode 100644 gnu/packages/patches/torbrowser-start-script.patch diff --git a/gnu/local.mk b/gnu/local.mk index a5820b5827..c5fdb8fc16 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -42,6 +42,7 @@ # Copyright © 2021 Björn Höfling <bjoern.hoefling@HIDDEN> # Copyright © 2021 Philip McGrath <philip@HIDDEN> # Copyright © 2021 Arun Isaac <arunisaac@HIDDEN> +# Copyright © 2021 André Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1739,6 +1740,8 @@ dist_patch_DATA = \ %D%/packages/patches/tipp10-qt5.patch \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/tla2tools-build-xml.patch \ + %D%/packages/patches/torbrowser-start-desktop.patch \ + %D%/packages/patches/torbrowser-start-script.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ diff --git a/gnu/packages/patches/torbrowser-start-desktop.patch b/gnu/packages/patches/torbrowser-start-desktop.patch new file mode 100644 index 0000000000..6832ed363b --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser.desktop.orig 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser.desktop 2020-07-24 14:36:37.720579884 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the shell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=Web Browser + Comment=Tor Browser is +1 for privacy and −1 for mass surveillance + Categories=Network;WebBrowser;Security; +-Exec=sh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/start-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach +-Icon=web-browser ++Exec=sh -c start-tor-browser ++X-TorBrowser-ExecShell=start-tor-browser --detach ++Icon=torbrowser + StartupWMClass=Tor Browser diff --git a/gnu/packages/patches/torbrowser-start-script.patch b/gnu/packages/patches/torbrowser-start-script.patch new file mode 100644 index 0000000000..b8c8d9a26a --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-script.patch @@ -0,0 +1,181 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser.orig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser 2020-07-23 18:13:32.426282743 -0300 +@@ -5,6 +5,14 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. + ++TBB_HOME="${HOME}/.local/share/torbrowser" ++TBB_LOGFILE="${TBB_HOME}/torbrowser.log" ++TBB_DATA="${TBB_HOME}/Data" ++TBB_PROFILE="${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=$(dirname $(realpath "$0")) ++TBB_STORE_DATA="${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC="${TBB_DATA}/Tor/torrc-defaults" ++ + complain_dialog_title="Tor Browser" + + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -134,8 +142,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" == "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser.log\n" +- logfile="../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.log\n" ++ logfile="${TBB_LOGFILE}" + elif [ "${2:0:1}" == "/" -o "${2:0:1}" == "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile="$2" +@@ -187,41 +195,22 @@ + export XAUTHORITY + fi + +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname="$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name="`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname="$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname="`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this operating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files are on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TORRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi + +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir="`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,16 +225,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi + +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=.*,Name=Tor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=.*,Icon=$PWD/browser/chrome/icons/default/default128.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=.*,Exec=sh -c '\"$PWD/start-tor-browser\" --detach || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Browser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- + if [ "$register_desktop_app" -eq 1 ]; then + mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" ++ cp "${TBB_STORE_PATH}/start-tor-browser.desktop" "$HOME/.local/share/applications/" + update-desktop-database "$HOME/.local/share/applications/" + printf "Tor Browser has been registered as a desktop app for this user in ~/.local/share/applications/\n" + exit 0 +@@ -265,21 +247,6 @@ + HOME="${PWD}" + export HOME + +-SYSARCHITECTURE=$(getconf LONG_BIT) +-TORARCHITECTURE=$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit:]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'll get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS="detect_leaks=0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=$1 + +@@ -342,13 +309,15 @@ + # your password in the following line where the word “secret” is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:='"secret"'} + +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH="${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE="fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=memory + ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE="${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" + + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +326,23 @@ + + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/null ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/null ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null + fi + + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index 52d78cba79..d5832b19df 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -28,31 +28,71 @@ (define-module (gnu packages tor) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix monads) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix store) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix build-system gnu) + #:use-module (guix build-system cargo) #:use-module (guix build-system go) + #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gnuzilla) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages autotools) + #:use-module (gnu packages readline) + #:use-module (gnu packages rsync) ; for httpse + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages version-control) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages w3m) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) ; for httpse + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) (define-public tor (package @@ -498,3 +538,677 @@ incorporates ideas and concepts from Philipp Winter's ScrambleSuit protocol. The obfs naming was chosen primarily because it was shorter, in terms of protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") (license license:gpl3+))) + +;; torbrowser and tor-browser-builder build versions are not always in sync +(define %torbrowser-version "78.11.0esr-10.0-1") +(define %tbb-build-version "10.0.17") +(define %torbrowser-build "build1") +(define %tbb-build "build1") +(define %torbrowser-build-id "20210602000000");must be of the form YYYYMMDDhhmmss + +;; Fonts for Tor Browser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on Tor Browser release tarball. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + (version %tbb-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.torproject.org/tor-package-archive/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "13x38n1cvqmxjz0jf2fda8lx2k25szzmg7gvv08z3q5na7109m2m")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (fonts (string-append %output "/share/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p fonts) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" fonts "--strip-components=3" + (string-append "--use-compress-program=" xz "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "Tor Browser bundled fonts") + (description "Free fonts bundled with Tor Browser. Includes a subset of Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define tor-browser-build + (let ((commit (string-append "tbb-desktop-" %tbb-build-version + "-" %tbb-build))) + (package + (name "tor-browser-build") + (version %tbb-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-build.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qwgghy79wx0w1yz132yyaln4g42s72133n6gbdf07rkf5n44izc")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying build scripts ...~%") + (copy-recursively (string-append + (assoc-ref %build-inputs "source") + "/projects/tor-browser") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser build scripts") + (description "Tor Browser runtime scripts.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define tor-launcher + (package + (name "tor-launcher") + (version "0.2.28") + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.torproject.org/tor-package-archive/torbrowser/" + %tbb-build-version "/src-" name "-" + version ".tar.xz")) + (sha256 + (base32 + "0mbd1q46d8nqisn6n79sp6m29332ymb2pf13xzgq1ml7rfcy6jjy")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Extracting source ...~%") + (let ((src (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p %output) + (format #t "Extracting source ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" %output "--strip-components=1" + (string-append "--use-compress-program=" xz "/bin/xz")))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in controler extension") + (description "Browser extension that starts the tor process (which +connects the browser and other applications to the Tor Network), and +which helps people configure and use @code{tor}. The first window that +you see when you start Tor Browser is displayed by this extension.") + (license (license:non-copyleft "file://src/LICENSE")))) + +(define https-everywhere-lib-wasm + (let ((commit "45b1622f1240659aca4762fa336aad1322d6d50f")) + (package + (name "https-everywhere-lib-wasm") + (version "2021.4.15") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/EFForg/https-everywhere-lib-wasm") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lq62rzypdzmnnzvfns3ccvv1g7p7g9s8jx788zzigr3gnmkpffx")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://github.com/EFForg/https-everywhere-lib-wasm") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, clickjack and +makes possible for the users to block or choose on a per site basis which remote +javascript to run while browsing the web.") + (license license:gpl2+)))) + +;; Both https-everywhere and noscript are rellying on some precompiled code for now. +;; Also read on the work on chromium extensions on gnu/build/chromium-extensions.scm +;; to see if can be adapted. +(define-public https-everywhere + (package + (name "https-everywhere") + (version "2021.4.15") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/" name "/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1bknx8l8gxmpwb13pvn6pdbavknci8q0jhygdaz50ilc1xld89i3")))) + (build-system trivial-build-system) + (native-inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("findutils" ,findutils) + ("git" ,git) + ("grep" ,grep) + ("gzip" ,gzip) + ("https-everywhere-lib-wasm" + ,https-everywhere-lib-wasm) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("openssl" ,openssl) + ("python" ,python) + ("rsync" ,rsync) + ("sed" ,sed) + ("tar" ,tar) + ("util-linux" ,util-linux) ; for getopt + ("xxd" ,xxd) + ("which" ,which) + ("zip" ,zip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (httpse-libwasm (assoc-ref %build-inputs + "https-everywhere-lib-wasm")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (python (assoc-ref %build-inputs "python")) + (openssl (assoc-ref %build-inputs "openssl")) + (git (assoc-ref %build-inputs "git")) + (grep (assoc-ref %build-inputs "grep")) + (findutils (assoc-ref %build-inputs "findutils")) + (sed (assoc-ref %build-inputs "sed")) + (which (assoc-ref %build-inputs "which")) + (rsync (assoc-ref %build-inputs "rsync")) + (libxml2 (assoc-ref %build-inputs "libxml2")) + (libxslt (assoc-ref %build-inputs "libxslt")) + (util-linux (assoc-ref %build-inputs "util-linux")) + (xxd (assoc-ref %build-inputs "xxd")) + (zip (assoc-ref %build-inputs "zip")) + (tar (assoc-ref %build-inputs "tar")) + (gzip (assoc-ref %build-inputs "gzip"))) + (setenv "SHELL" (string-append bash "/bin/bash")) + (set-path-environment-variable + "PATH" '("bin") + (list bash sed findutils which git python tar openssl rsync + libxml2 libxslt util-linux grep xxd gzip zip coreutils)) + (set-path-environment-variable + "LIBRARY_PATH" '("lib") + (list bash sed findutils which git python tar openssl rsync + libxml2 libxslt util-linux grep xxd gzip zip coreutils)) + (format #t "Untaring source tarball ...~%") + (invoke "tar" "-xf" src "--strip-components=1") + ;; Python3.6 is hardcoded on these scripts. Using v3.8 appears to + ;; be harmless. + (substitute* '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/rules/src/https_everywhere_checker/check_rules.py" + "test/script.py" + "test/validations.sh" + "test/validations/filename/run.py" + "test/validations/relaxng/run.py" + "test/validations/securecookie/run.py" + "test/validations/special/run.py" + "utils/create_zip.py" + "utils/chromium-translations.py" + "utils/create-platform-certs/split_combined_cert_file.py" + ;; "utils/mk-client-whitelist/dbconnect.py" + ;; "utils/mk-client-whitelist/run.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + (make-file-writable "lib-wasm") + (copy-recursively httpse-libwasm + "lib-wasm" + #:log (%make-void-port "w")) + ;; Remove precompiled binaries from source. This breaks + ;; http-everywhere at runtime, but building is successful. + ;; For now building takes the precompiled version included with sources. + ;; Tor Browser upstream does the same. In case you want to remove the + ;; precompiled version, use the routine below. It successfully builds + ;; but at run time rules seem to be broken. + ;(with-directory-excursion "lib-wasm/pkg" + ; (for-each (lambda (file) + ; (if (file-exists? file) + ; (delete-file file) + ; (display (string-append + ; "Warning: file " file + ; " not found! Skipping...\n")))) + ; '("https_everywhere_lib_wasm.js" + ; "https_everywhere_lib_wasm_bg.wasm"))) + (for-each patch-shebang + (find-files "." + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat))) + #:stat lstat)) + ;; Failing to generate the xpi, but copy-dir appears to be enough. + ;; Failing on missing 'wasm'? Not generating rulesets. Once lib-wasm + ;; gets cross-compiled, try to move the '.xpi' extension instead. + (invoke "./make.sh") + (copy-recursively "pkg/xpi-eff" %output + #:log (%make-void-port "w")) + #t)))) + (home-page "https://www.eff.org/https-everywhere") + (synopsis "Browser extension for automatic HTTPS usage") + (description "Browser extension that automatically makes the browser to use +HTTPS instead of plain HTTP when the remote destination makes it available to users.") + (license license:gpl2+))) + +(define noscript + (package + (name "noscript") + (version "11.2.8") + (source + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/releases/" + name "-" version ".xpi")) + (sha256 + (base32 + "0rrlhlzljlmgns7j49c43ilb8wij2zcysrbpap1xxsfbkbczji27")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + ;; Fake build for now. Upstream Tor Browser does not build it as well. + (format #t "Copying source ...~%") + (copy-file (assoc-ref %build-inputs "source") + %output)))) + (home-page "https://noscript.net") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, clickjack and +makes possible for the users to block or choose on a per site basis which remote +javascript to run while browsing the web.") + (license license:gpl2+))) + +;; (Un)fortunatly Tor Browser has it's own reproducible build system - RBM - which +;; automates the build process for them and compiles Tor Browser from a range of +;; repositories and produces a range of tarballs for different architectures and +;; locales. So we need to cherry-pick what is needed for guix and produce our own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.git/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. See also +;; the Hacking on Tor Browser document for a high level introduction at +;; https://trac.torproject.org/projects/tor/wiki/doc/Tor Browser/Hacking). +;; +;; TODO: Import langpacks from https://archive.torproject.org/tor-package-archive/\ +;; torbrowser/'version'/langpacks-tor-browser-linux64-version.tar.xz +(define-public torbrowser-unbundle + (let ((commit (string-append "tor-browser-" %torbrowser-version + "-" %torbrowser-build))) + (package + (inherit icecat) + (name "torbrowser-unbundle") + (version %tbb-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.torproject.org/tor-package-archive/torbrowser/" + %tbb-build-version + "/src-firefox-tor-browser-" + %torbrowser-version "-" %torbrowser-build + ".tar.xz")) + (sha256 + (base32 + "1jnb7v9zn7y2fk7gqvq1ijlwl16i7wf83y1xn2djqcp1j42n1yvq")))) + (build-system gnu-build-system) + (inputs + `(("obfs4" ,obfs4) + ("tor" ,tor-client) + ,@(package-inputs icecat))) + (native-inputs + `(("https-everywhere" ,https-everywhere) + ("noscript" ,noscript) + ("tor-browser-build" ,tor-browser-build) + ("tor-launcher" ,tor-launcher) + ("torbrowser-fonts" ,torbrowser-fonts) + ("torbrowser-start-script.patch" + ,(search-patch "torbrowser-start-script.patch")) + ("torbrowser-start-desktop.patch" + ,(search-patch "torbrowser-start-desktop.patch")) + ,@(package-native-inputs icecat))) + (properties '()) + (arguments + (substitute-keyword-arguments (package-arguments icecat) + ((#:phases phases) + `(modify-phases ,phases + ;; On mach build system this is done on configure. + (delete 'bootstrap) + ;; Doesn't seem to be needed for TorBrowser + (delete 'fix-ffmpeg-runtime-linker) + ;; Tried to make use of these using let, but inheritance appears to block it. + (delete 'install-icons) + (delete 'install-desktop-entry) + (add-after 'unpack 'make-bundle + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((tor-launcher (assoc-ref inputs "tor-launcher")) + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb (assoc-ref inputs "tor-browser-build")) + (tbb-scripts-dir "tbb-scripts")) + + (format #t "Copying tor-launcher ...~%") + (copy-recursively tor-launcher tor-launcher-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-browser-build ...~%") + (mkdir tbb-scripts-dir) + (copy-recursively tbb tbb-scripts-dir + #:log (%make-void-port "w")) + (make-file-writable "browser/app/profile/000-tor-browser.js") + (make-file-writable (string-append tbb-scripts-dir + "/RelativeLink/start-tor-browser")) + (make-file-writable (string-append tbb-scripts-dir + "/RelativeLink/start-tor-browser.desktop"))) + #t)) + (replace 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inputs) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + ;; Only difference to icecat is browser name. + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + (add-after 'apply-guix-specific-patches 'merge-bridge-preferences + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (begin + (let ((tbb-prefs (open-file + "browser/app/profile/000-tor-browser.js" "a")) + (bridge-prefs + (open-input-file + "tbb-scripts/Bundle-Data/PTConfigs/bridge_prefs.js"))) + (display (get-string-all bridge-prefs) tbb-prefs) + (close-output-port tbb-prefs))) + #t)) + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=" out) + ,@configure-flags))) + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append (assoc-ref inputs "python-2") + "/bin/python")) + (setenv "CC" "gcc") ; needed when Stylo is enabled + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid timestamp. + (setenv "LDFLAGS" (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") + "/lib")) + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=dev-build") + ;; If we decide to rebrand this browser, here is the place to do it. + (string-append + "ac_add_options --with-tor-browser-version=org.gnu\n" + "ac_add_options --with-unsigned-addon-scopes=app,system\n" + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\n" + "ac_add_options --disable-updater\n" + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + "ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + "ac_add_options --with-system-libevent\n" + ;;"ac_add_options --with-system-nspr\n" ;; broken for now, see icecat. + ;;"ac_add_options --with-system-nss\n" + "ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=" + (assoc-ref %build-inputs "clang") "/bin/clang\n" + "ac_add_options --with-libclang-path=" + (assoc-ref %build-inputs "clang") "/lib\n"))) + (substitute* "browser/app/profile/000-tor-browser.js" + ;; Tor Browser updates are disabled on mozconfig, but let's make sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\").*" _ m) + (string-append m ",false);\n")) + ;; Snowflake is not built on gnu targets. + (("pref\\(\"extensions.torlauncher.default_bridge.snowflake.1\".*") + "\n")) + (substitute* + "browser/extensions/tor-launcher/src/defaults/preferences/torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Currently disabled on + ;; tor-launcher, but let's make sure while missing langpacks. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\").*" _ m) + (string-append m ", false);\n"))) + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + (add-after 'configure 'install-desk-icons + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion "browser/branding/official" + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicolor/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.png")))) + '("default16.png" "default22.png" "default24.png" + "default32.png" "default48.png" "default64.png" + "default128.png" "default256.png" "default512.png")) + #t)))) + (replace 'build + (lambda _ + (make-file-writable "Cargo.lock") + (invoke "./mach" "build") + #t)) + (replace 'neutralise-store-references + (lambda _ + ;; difference from icecat "objdir" preffix. We could use find-files there. + (substitute* + "objdir/dist/bin/chrome/toolkit/content/global/buildconfig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ store hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime dependency -->" + (string-drop hash 8)))) + #t)) + ;; Tor Browser just do a stage-package here and copy files to its places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs + configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications")) + (build "objdir/dist/firefox") + (bin (string-append out "/bin")) + (lib (string-append out "/lib")) + (start-script "tbb-scripts/RelativeLink/start-tor-browser") + (desktop-file "tbb-scripts/RelativeLink/start-tor-browser.desktop")) + (invoke "./mach" "build" "stage-package") + ;; Tor Browser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (format #t "Deleting spurious files ...~%") + (with-directory-excursion build + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("firefox-bin" "fonts/TwemojiMozilla.ttf"))) + (rmdir (string-append build "/fonts")) + (format #t "Creating install dirs ...~%") + (mkdir-p applications) + (mkdir-p lib) + (mkdir bin) + (format #t "Copying files to install dirs ...~%") + (copy-recursively build (string-append lib "/") + #:log (%make-void-port "w")) + (copy-file start-script + (string-append lib "/start-tor-browser")) + (copy-file desktop-file + (string-append lib "/start-tor-browser.desktop")) + (chmod (string-append lib "/start-tor-browser") #o555) + (chmod (string-append lib "/start-tor-browser.desktop") #o555) + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append lib "/start-tor-browser") + (string-append bin "/start-tor-browser")) + (format #t "Installing desktop file ...~%") + (install-file desktop-file applications)) + #t)) + (add-after 'install 'install-fonts + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/")) + (fonts (string-append (or (assoc-ref native-inputs + "torbrowser-fonts") + (assoc-ref inputs + "torbrowser-fonts")) + "/share"))) + (copy-recursively fonts lib + #:log (%make-void-port "w")) + (symlink (string-append lib "/fonts") + (string-append out "/share/fonts"))) + #t)) + (add-after 'install-fonts 'install-extensions + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (ext (string-append lib "/browser/extensions")) + (torb-ext (string-append lib + "/chrome/torbutton/content/extensions")) + (httpse-id "https-everywhere") + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}") + (httpse (assoc-ref inputs "https-everywhere")) + (noscript (assoc-ref inputs "noscript"))) + (mkdir-p ext) + (mkdir-p torb-ext) + (copy-file noscript (string-append + ext "/" noscript-id ".xpi")) + (copy-recursively httpse + (string-append torb-ext "/" httpse-id) + #:log (%make-void-port "w")) + (chmod (string-append ext "/" noscript-id ".xpi") #o555) + ;; Make httpse available as a builtin extension. This step is + ;; changing some timestamps and making everything non-deterministic. + ;; To check insert 'resource://torbutton/content/extensions/https-everywhere/' + ;; on the browser address field. Check 'reset-gzip-timestamps' to see what + ;; can be done. + ;; https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/\ + ;; tor-browser/build?h=tbb-desktop-10.0.17-build1&id=16fa8c3bf91a9c1a827a7d23be344de599cd10bb#n77g + (with-directory-excursion lib + (make-file-writable "omni.ja") + (for-each (lambda (file) + (invoke "zip" "-X" "omni.ja" file)) + (find-files "chrome" ".*")))) + #t)) + (add-after 'install-extensions 'link-binaries + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tordir (string-append out "/lib/TorBrowser/Tor")) + (ptdir (string-append tordir "/PluggableTransports")) + (obfs4 (string-append (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (tor (string-append (assoc-ref inputs "tor") + "/bin/tor"))) + (mkdir-p ptdir) + (symlink tor (string-append tordir "/tor")) + (symlink obfs4 (string-append ptdir "/obfs4proxy"))) + #t)) + (add-after 'link-binaries 'copy-bundle-data + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (tbb "tbb-scripts") + (ptconf (string-append tbb "/Bundle-Data/PTConfigs")) + (docs (string-append lib "/TorBrowser/Docs")) + (data (string-append lib "/TorBrowser/Data"))) + (mkdir-p data) + (mkdir docs) + (with-directory-excursion + (string-append tbb "/Bundle-Data/linux/Data") + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" file) + #:log (%make-void-port "w"))) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconf "/linux/torrc-defaults-appendix") + (string-append data "/Tor/torrc-defaults-appendix")) + (copy-recursively (string-append tbb "/Bundle-Data/Docs") + (string-append docs "/") + #:log (%make-void-port "w"))) + #t)) + ;; This fixes the file chooser crash that happens with GTK 3 + (replace 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (gtk (assoc-ref inputs "gtk+")) + (gtk-share (string-append gtk "/share")) + (mesa (assoc-ref inputs "mesa")) + (mesa-lib (string-append mesa "/lib")) + (pulseaudio (assoc-ref inputs "pulseaudio")) + (pulseaudio-lib (string-append pulseaudio "/lib")) + (libxscrnsaver (assoc-ref inputs "libxscrnsaver")) + (libxscrnsaver-lib (string-append libxscrnsaver "/lib"))) + ;; Only difference to icecat is browser name. + (wrap-program (car (find-files lib "^firefox$")) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib ,mesa-lib + ,libxscrnsaver-lib)))) + #t)))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "Tor Browser is the Tor Project version of Firefox browser. It is the only +recommended way to anonymously browse the web that is supported by the project. +It modifies Firefox in order to avoid many know application level attacks on +the privacy of Tor users. + +WARNING: This is not the official Tor Browser and is currently on testing. Use +at your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0)))) ;and others, see toolkit/content/license.html -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:20:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:20:05 2021 Received: from localhost ([127.0.0.1]:41763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtk-0001An-EQ for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:20:05 -0400 Received: from mx1.riseup.net ([198.252.153.129]:55546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtg-0001A3-Hi for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:54 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWNM0rntzDqtG for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690387; bh=qlHnJ5cfacjaMdcze/GxJ5QjrOkKLZnyfxGAJpkyY04=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sd2jgAo0jAL1KYlBwEthPzgTxJ9LiRPMVWeQRp9cgpX13zHYzcm/BroE+mE9EtZZA nEFBrVb1v9qFseMiMNloLhgUXGwVGArpIi7iQ4/imj1LamrRBwVNUzwkSOHvXAIzfh Io+MxyaFfJl251x9P0/TtQ7sE0Z6/bh9deAm0jXc= X-Riseup-User-ID: 4F0DF199C4195AABE72955EA64718360CF760E49A40BA04239FE0786AF4A4508 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWNK6Xd5z5vks; Wed, 2 Jun 2021 20:19:45 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 9/9] gnu: Add torbrowser-unbundle. Date: Thu, 3 Jun 2021 00:17:46 -0300 Message-Id: <88c9104dbc255f94f73b0dae2dad41ae23cc3448.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * gnu/packages/tor.scm (torbrowser-unbundle): New variable. * gnu/packages/patches/torbrowser-start-desktop.patch: New file. * gnu/packages/patches/torbrowser-start-script.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. create mode 100644 gnu/packages/patches/torbrowser-start-desktop.patch create mode 100644 gnu/packages/patches/torbrowser-start-script.patch diff --git a/gnu/local.mk b/gnu/local.mk index a5820b5827..c5fdb8fc16 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -42,6 +42,7 @@ # Copyright © 2021 Björn Höfling <bjoern.hoefling@HIDDEN> # Copyright © 2021 Philip McGrath <philip@HIDDEN> # Copyright © 2021 Arun Isaac <arunisaac@HIDDEN> +# Copyright © 2021 André Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1739,6 +1740,8 @@ dist_patch_DATA = \ %D%/packages/patches/tipp10-qt5.patch \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/tla2tools-build-xml.patch \ + %D%/packages/patches/torbrowser-start-desktop.patch \ + %D%/packages/patches/torbrowser-start-script.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ diff --git a/gnu/packages/patches/torbrowser-start-desktop.patch b/gnu/packages/patches/torbrowser-start-desktop.patch new file mode 100644 index 0000000000..6832ed363b --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser.desktop.orig 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser.desktop 2020-07-24 14:36:37.720579884 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the shell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=Web Browser + Comment=Tor Browser is +1 for privacy and −1 for mass surveillance + Categories=Network;WebBrowser;Security; +-Exec=sh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/start-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach +-Icon=web-browser ++Exec=sh -c start-tor-browser ++X-TorBrowser-ExecShell=start-tor-browser --detach ++Icon=torbrowser + StartupWMClass=Tor Browser diff --git a/gnu/packages/patches/torbrowser-start-script.patch b/gnu/packages/patches/torbrowser-start-script.patch new file mode 100644 index 0000000000..b8c8d9a26a --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-script.patch @@ -0,0 +1,181 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser.orig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser 2020-07-23 18:13:32.426282743 -0300 +@@ -5,6 +5,14 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. + ++TBB_HOME="${HOME}/.local/share/torbrowser" ++TBB_LOGFILE="${TBB_HOME}/torbrowser.log" ++TBB_DATA="${TBB_HOME}/Data" ++TBB_PROFILE="${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=$(dirname $(realpath "$0")) ++TBB_STORE_DATA="${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC="${TBB_DATA}/Tor/torrc-defaults" ++ + complain_dialog_title="Tor Browser" + + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -134,8 +142,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" == "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser.log\n" +- logfile="../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.log\n" ++ logfile="${TBB_LOGFILE}" + elif [ "${2:0:1}" == "/" -o "${2:0:1}" == "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile="$2" +@@ -187,41 +195,22 @@ + export XAUTHORITY + fi + +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname="$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name="`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname="$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname="`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this operating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files are on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TORRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit exec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi + +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir="`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,16 +225,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi + +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=.*,Name=Tor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=.*,Icon=$PWD/browser/chrome/icons/default/default128.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=.*,Exec=sh -c '\"$PWD/start-tor-browser\" --detach || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Browser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- + if [ "$register_desktop_app" -eq 1 ]; then + mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" ++ cp "${TBB_STORE_PATH}/start-tor-browser.desktop" "$HOME/.local/share/applications/" + update-desktop-database "$HOME/.local/share/applications/" + printf "Tor Browser has been registered as a desktop app for this user in ~/.local/share/applications/\n" + exit 0 +@@ -265,21 +247,6 @@ + HOME="${PWD}" + export HOME + +-SYSARCHITECTURE=$(getconf LONG_BIT) +-TORARCHITECTURE=$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit:]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'll get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS="detect_leaks=0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=$1 + +@@ -342,13 +309,15 @@ + # your password in the following line where the word “secret” is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:='"secret"'} + +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH="${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE="fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=memory + ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE="${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" + + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +326,23 @@ + + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/null ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/null ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ./firefox --class "Tor Browser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null + fi + + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index 52d78cba79..bfb1ac1841 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -498,3 +498,677 @@ incorporates ideas and concepts from Philipp Winter's ScrambleSuit protocol. The obfs naming was chosen primarily because it was shorter, in terms of protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") (license license:gpl3+))) + +;; torbrowser and tor-browser-builder build versions are not always in sync +(define %torbrowser-version "78.11.0esr-10.0-1") +(define %tbb-build-version "10.0.17") +(define %torbrowser-build "build1") +(define %tbb-build "build1") +(define %torbrowser-build-id "20210602000000");must be of the form YYYYMMDDhhmmss + +;; Fonts for Tor Browser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on Tor Browser release tarball. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + (version %tbb-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.torproject.org/tor-package-archive/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "13x38n1cvqmxjz0jf2fda8lx2k25szzmg7gvv08z3q5na7109m2m")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (fonts (string-append %output "/share/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p fonts) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" fonts "--strip-components=3" + (string-append "--use-compress-program=" xz "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "Tor Browser bundled fonts") + (description "Free fonts bundled with Tor Browser. Includes a subset of Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define tor-browser-build + (let ((commit (string-append "tbb-desktop-" %tbb-build-version + "-" %tbb-build))) + (package + (name "tor-browser-build") + (version %tbb-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-build.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qwgghy79wx0w1yz132yyaln4g42s72133n6gbdf07rkf5n44izc")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying build scripts ...~%") + (copy-recursively (string-append + (assoc-ref %build-inputs "source") + "/projects/tor-browser") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser build scripts") + (description "Tor Browser runtime scripts.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define tor-launcher + (package + (name "tor-launcher") + (version "0.2.28") + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.torproject.org/tor-package-archive/torbrowser/" + %tbb-build-version "/src-" name "-" + version ".tar.xz")) + (sha256 + (base32 + "0mbd1q46d8nqisn6n79sp6m29332ymb2pf13xzgq1ml7rfcy6jjy")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Extracting source ...~%") + (let ((src (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p %output) + (format #t "Extracting source ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" %output "--strip-components=1" + (string-append "--use-compress-program=" xz "/bin/xz")))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in controler extension") + (description "Browser extension that starts the tor process (which +connects the browser and other applications to the Tor Network), and +which helps people configure and use @code{tor}. The first window that +you see when you start Tor Browser is displayed by this extension.") + (license (license:non-copyleft "file://src/LICENSE")))) + +(define https-everywhere-lib-wasm + (let ((commit "45b1622f1240659aca4762fa336aad1322d6d50f")) + (package + (name "https-everywhere-lib-wasm") + (version "2021.4.15") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/EFForg/https-everywhere-lib-wasm") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lq62rzypdzmnnzvfns3ccvv1g7p7g9s8jx788zzigr3gnmkpffx")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://github.com/EFForg/https-everywhere-lib-wasm") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, clickjack and +makes possible for the users to block or choose on a per site basis which remote +javascript to run while browsing the web.") + (license license:gpl2+)))) + +;; Both https-everywhere and noscript are rellying on some precompiled code for now. +;; Also read on the work on chromium extensions on gnu/build/chromium-extensions.scm +;; to see if can be adapted. +(define-public https-everywhere + (package + (name "https-everywhere") + (version "2021.4.15") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/" name "/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1bknx8l8gxmpwb13pvn6pdbavknci8q0jhygdaz50ilc1xld89i3")))) + (build-system trivial-build-system) + (native-inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("findutils" ,findutils) + ("git" ,git) + ("grep" ,grep) + ("gzip" ,gzip) + ("https-everywhere-lib-wasm" + ,https-everywhere-lib-wasm) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("openssl" ,openssl) + ("python" ,python) + ("rsync" ,rsync) + ("sed" ,sed) + ("tar" ,tar) + ("util-linux" ,util-linux) ; for getopt + ("xxd" ,xxd) + ("which" ,which) + ("zip" ,zip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (httpse-libwasm (assoc-ref %build-inputs + "https-everywhere-lib-wasm")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (python (assoc-ref %build-inputs "python")) + (openssl (assoc-ref %build-inputs "openssl")) + (git (assoc-ref %build-inputs "git")) + (grep (assoc-ref %build-inputs "grep")) + (findutils (assoc-ref %build-inputs "findutils")) + (sed (assoc-ref %build-inputs "sed")) + (which (assoc-ref %build-inputs "which")) + (rsync (assoc-ref %build-inputs "rsync")) + (libxml2 (assoc-ref %build-inputs "libxml2")) + (libxslt (assoc-ref %build-inputs "libxslt")) + (util-linux (assoc-ref %build-inputs "util-linux")) + (xxd (assoc-ref %build-inputs "xxd")) + (zip (assoc-ref %build-inputs "zip")) + (tar (assoc-ref %build-inputs "tar")) + (gzip (assoc-ref %build-inputs "gzip"))) + (setenv "SHELL" (string-append bash "/bin/bash")) + (set-path-environment-variable + "PATH" '("bin") + (list bash sed findutils which git python tar openssl rsync + libxml2 libxslt util-linux grep xxd gzip zip coreutils)) + (set-path-environment-variable + "LIBRARY_PATH" '("lib") + (list bash sed findutils which git python tar openssl rsync + libxml2 libxslt util-linux grep xxd gzip zip coreutils)) + (format #t "Untaring source tarball ...~%") + (invoke "tar" "-xf" src "--strip-components=1") + ;; Python3.6 is hardcoded on these scripts. Using v3.8 appears to + ;; be harmless. + (substitute* '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/rules/src/https_everywhere_checker/check_rules.py" + "test/script.py" + "test/validations.sh" + "test/validations/filename/run.py" + "test/validations/relaxng/run.py" + "test/validations/securecookie/run.py" + "test/validations/special/run.py" + "utils/create_zip.py" + "utils/chromium-translations.py" + "utils/create-platform-certs/split_combined_cert_file.py" + ;; "utils/mk-client-whitelist/dbconnect.py" + ;; "utils/mk-client-whitelist/run.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + (make-file-writable "lib-wasm") + (copy-recursively httpse-libwasm + "lib-wasm" + #:log (%make-void-port "w")) + ;; Remove precompiled binaries from source. This breaks + ;; http-everywhere at runtime, but building is successful. + ;; For now building takes the precompiled version included with sources. + ;; Tor Browser upstream does the same. In case you want to remove the + ;; precompiled version, use the routine below. It successfully builds + ;; but at run time rules seem to be broken. + ;(with-directory-excursion "lib-wasm/pkg" + ; (for-each (lambda (file) + ; (if (file-exists? file) + ; (delete-file file) + ; (display (string-append + ; "Warning: file " file + ; " not found! Skipping...\n")))) + ; '("https_everywhere_lib_wasm.js" + ; "https_everywhere_lib_wasm_bg.wasm"))) + (for-each patch-shebang + (find-files "." + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat))) + #:stat lstat)) + ;; Failing to generate the xpi, but copy-dir appears to be enough. + ;; Failing on missing 'wasm'? Not generating rulesets. Once lib-wasm + ;; gets cross-compiled, try to move the '.xpi' extension instead. + (invoke "./make.sh") + (copy-recursively "pkg/xpi-eff" %output + #:log (%make-void-port "w")) + #t)))) + (home-page "https://www.eff.org/https-everywhere") + (synopsis "Browser extension for automatic HTTPS usage") + (description "Browser extension that automatically makes the browser to use +HTTPS instead of plain HTTP when the remote destination makes it available to users.") + (license license:gpl2+))) + +(define noscript + (package + (name "noscript") + (version "11.2.8") + (source + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/releases/" + name "-" version ".xpi")) + (sha256 + (base32 + "0rrlhlzljlmgns7j49c43ilb8wij2zcysrbpap1xxsfbkbczji27")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + ;; Fake build for now. Upstream Tor Browser does not build it as well. + (format #t "Copying source ...~%") + (copy-file (assoc-ref %build-inputs "source") + %output)))) + (home-page "https://noscript.net") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, clickjack and +makes possible for the users to block or choose on a per site basis which remote +javascript to run while browsing the web.") + (license license:gpl2+))) + +;; (Un)fortunatly Tor Browser has it's own reproducible build system - RBM - which +;; automates the build process for them and compiles Tor Browser from a range of +;; repositories and produces a range of tarballs for different architectures and +;; locales. So we need to cherry-pick what is needed for guix and produce our own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.git/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. See also +;; the Hacking on Tor Browser document for a high level introduction at +;; https://trac.torproject.org/projects/tor/wiki/doc/Tor Browser/Hacking). +;; +;; TODO: Import langpacks from https://archive.torproject.org/tor-package-archive/\ +;; torbrowser/'version'/langpacks-tor-browser-linux64-version.tar.xz +(define-public torbrowser-unbundle + (let ((commit (string-append "tor-browser-" %torbrowser-version + "-" %torbrowser-build))) + (package + (inherit icecat) + (name "torbrowser-unbundle") + (version %tbb-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://archive.torproject.org/tor-package-archive/torbrowser/" + %tbb-build-version + "/src-firefox-tor-browser-" + %torbrowser-version "-" %torbrowser-build + ".tar.xz")) + (sha256 + (base32 + "1jnb7v9zn7y2fk7gqvq1ijlwl16i7wf83y1xn2djqcp1j42n1yvq")))) + (build-system gnu-build-system) + (inputs + `(("obfs4" ,obfs4) + ("tor" ,tor-client) + ,@(package-inputs icecat))) + (native-inputs + `(("https-everywhere" ,https-everywhere) + ("noscript" ,noscript) + ("tor-browser-build" ,tor-browser-build) + ("tor-launcher" ,tor-launcher) + ("torbrowser-fonts" ,torbrowser-fonts) + ("torbrowser-start-script.patch" + ,(search-patch "torbrowser-start-script.patch")) + ("torbrowser-start-desktop.patch" + ,(search-patch "torbrowser-start-desktop.patch")) + ,@(package-native-inputs icecat))) + (properties '()) + (arguments + (substitute-keyword-arguments (package-arguments icecat) + ((#:phases phases) + `(modify-phases ,phases + ;; On mach build system this is done on configure. + (delete 'bootstrap) + ;; Doesn't seem to be needed for TorBrowser + (delete 'fix-ffmpeg-runtime-linker) + ;; Tried to make use of these using let, but inheritance appears to block it. + (delete 'install-icons) + (delete 'install-desktop-entry) + (add-after 'unpack 'make-bundle + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((tor-launcher (assoc-ref inputs "tor-launcher")) + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb (assoc-ref inputs "tor-browser-build")) + (tbb-scripts-dir "tbb-scripts")) + + (format #t "Copying tor-launcher ...~%") + (copy-recursively tor-launcher tor-launcher-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-browser-build ...~%") + (mkdir tbb-scripts-dir) + (copy-recursively tbb tbb-scripts-dir + #:log (%make-void-port "w")) + (make-file-writable "browser/app/profile/000-tor-browser.js") + (make-file-writable (string-append tbb-scripts-dir + "/RelativeLink/start-tor-browser")) + (make-file-writable (string-append tbb-scripts-dir + "/RelativeLink/start-tor-browser.desktop"))) + #t)) + (replace 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inputs) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + ;; Only difference to icecat is browser name. + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + (add-after 'apply-guix-specific-patches 'merge-bridge-preferences + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (begin + (let ((tbb-prefs (open-file + "browser/app/profile/000-tor-browser.js" "a")) + (bridge-prefs + (open-input-file + "tbb-scripts/Bundle-Data/PTConfigs/bridge_prefs.js"))) + (display (get-string-all bridge-prefs) tbb-prefs) + (close-output-port tbb-prefs))) + #t)) + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=" out) + ,@configure-flags))) + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append (assoc-ref inputs "python-2") + "/bin/python")) + (setenv "CC" "gcc") ; needed when Stylo is enabled + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid timestamp. + (setenv "LDFLAGS" (string-append "-Wl,-rpath=" + (assoc-ref outputs "out") + "/lib")) + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=dev-build") + ;; If we decide to rebrand this browser, here is the place to do it. + (string-append + "ac_add_options --with-tor-browser-version=org.gnu\n" + "ac_add_options --with-unsigned-addon-scopes=app,system\n" + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\n" + "ac_add_options --disable-updater\n" + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + "ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + "ac_add_options --with-system-libevent\n" + ;;"ac_add_options --with-system-nspr\n" ;; broken for now, see icecat. + ;;"ac_add_options --with-system-nss\n" + "ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=" + (assoc-ref %build-inputs "clang") "/bin/clang\n" + "ac_add_options --with-libclang-path=" + (assoc-ref %build-inputs "clang") "/lib\n"))) + (substitute* "browser/app/profile/000-tor-browser.js" + ;; Tor Browser updates are disabled on mozconfig, but let's make sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\").*" _ m) + (string-append m ",false);\n")) + ;; Snowflake is not built on gnu targets. + (("pref\\(\"extensions.torlauncher.default_bridge.snowflake.1\".*") + "\n")) + (substitute* + "browser/extensions/tor-launcher/src/defaults/preferences/torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Currently disabled on + ;; tor-launcher, but let's make sure while missing langpacks. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\").*" _ m) + (string-append m ", false);\n"))) + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + (add-after 'configure 'install-desk-icons + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion "browser/branding/official" + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicolor/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.png")))) + '("default16.png" "default22.png" "default24.png" + "default32.png" "default48.png" "default64.png" + "default128.png" "default256.png" "default512.png")) + #t)))) + (replace 'build + (lambda _ + (make-file-writable "Cargo.lock") + (invoke "./mach" "build") + #t)) + (replace 'neutralise-store-references + (lambda _ + ;; difference from icecat "objdir" preffix. We could use find-files there. + (substitute* + "objdir/dist/bin/chrome/toolkit/content/global/buildconfig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ store hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime dependency -->" + (string-drop hash 8)))) + #t)) + ;; Tor Browser just do a stage-package here and copy files to its places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs + configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications")) + (build "objdir/dist/firefox") + (bin (string-append out "/bin")) + (lib (string-append out "/lib")) + (start-script "tbb-scripts/RelativeLink/start-tor-browser") + (desktop-file "tbb-scripts/RelativeLink/start-tor-browser.desktop")) + (invoke "./mach" "build" "stage-package") + ;; Tor Browser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (format #t "Deleting spurious files ...~%") + (with-directory-excursion build + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("firefox-bin" "fonts/TwemojiMozilla.ttf"))) + (rmdir (string-append build "/fonts")) + (format #t "Creating install dirs ...~%") + (mkdir-p applications) + (mkdir-p lib) + (mkdir bin) + (format #t "Copying files to install dirs ...~%") + (copy-recursively build (string-append lib "/") + #:log (%make-void-port "w")) + (copy-file start-script + (string-append lib "/start-tor-browser")) + (copy-file desktop-file + (string-append lib "/start-tor-browser.desktop")) + (chmod (string-append lib "/start-tor-browser") #o555) + (chmod (string-append lib "/start-tor-browser.desktop") #o555) + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append lib "/start-tor-browser") + (string-append bin "/start-tor-browser")) + (format #t "Installing desktop file ...~%") + (install-file desktop-file applications)) + #t)) + (add-after 'install 'install-fonts + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/")) + (fonts (string-append (or (assoc-ref native-inputs + "torbrowser-fonts") + (assoc-ref inputs + "torbrowser-fonts")) + "/share"))) + (copy-recursively fonts lib + #:log (%make-void-port "w")) + (symlink (string-append lib "/fonts") + (string-append out "/share/fonts"))) + #t)) + (add-after 'install-fonts 'install-extensions + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (ext (string-append lib "/browser/extensions")) + (torb-ext (string-append lib + "/chrome/torbutton/content/extensions")) + (httpse-id "https-everywhere") + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}") + (httpse (assoc-ref inputs "https-everywhere")) + (noscript (assoc-ref inputs "noscript"))) + (mkdir-p ext) + (mkdir-p torb-ext) + (copy-file noscript (string-append + ext "/" noscript-id ".xpi")) + (copy-recursively httpse + (string-append torb-ext "/" httpse-id) + #:log (%make-void-port "w")) + (chmod (string-append ext "/" noscript-id ".xpi") #o555) + ;; Make httpse available as a builtin extension. This step is + ;; changing some timestamps and making everything non-deterministic. + ;; To check insert 'resource://torbutton/content/extensions/https-everywhere/' + ;; on the browser address field. Check 'reset-gzip-timestamps' to see what + ;; can be done. + ;; https://gitweb.torproject.org/builders/tor-browser-build.git/tree/projects/\ + ;; tor-browser/build?h=tbb-desktop-10.0.17-build1&id=16fa8c3bf91a9c1a827a7d23be344de599cd10bb#n77g + (with-directory-excursion lib + (make-file-writable "omni.ja") + (for-each (lambda (file) + (invoke "zip" "-X" "omni.ja" file)) + (find-files "chrome" ".*")))) + #t)) + (add-after 'install-extensions 'link-binaries + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tordir (string-append out "/lib/TorBrowser/Tor")) + (ptdir (string-append tordir "/PluggableTransports")) + (obfs4 (string-append (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (tor (string-append (assoc-ref inputs "tor") + "/bin/tor"))) + (mkdir-p ptdir) + (symlink tor (string-append tordir "/tor")) + (symlink obfs4 (string-append ptdir "/obfs4proxy"))) + #t)) + (add-after 'link-binaries 'copy-bundle-data + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (tbb "tbb-scripts") + (ptconf (string-append tbb "/Bundle-Data/PTConfigs")) + (docs (string-append lib "/TorBrowser/Docs")) + (data (string-append lib "/TorBrowser/Data"))) + (mkdir-p data) + (mkdir docs) + (with-directory-excursion + (string-append tbb "/Bundle-Data/linux/Data") + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" file) + #:log (%make-void-port "w"))) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconf "/linux/torrc-defaults-appendix") + (string-append data "/Tor/torrc-defaults-appendix")) + (copy-recursively (string-append tbb "/Bundle-Data/Docs") + (string-append docs "/") + #:log (%make-void-port "w"))) + #t)) + ;; This fixes the file chooser crash that happens with GTK 3 + (replace 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (gtk (assoc-ref inputs "gtk+")) + (gtk-share (string-append gtk "/share")) + (mesa (assoc-ref inputs "mesa")) + (mesa-lib (string-append mesa "/lib")) + (pulseaudio (assoc-ref inputs "pulseaudio")) + (pulseaudio-lib (string-append pulseaudio "/lib")) + (libxscrnsaver (assoc-ref inputs "libxscrnsaver")) + (libxscrnsaver-lib (string-append libxscrnsaver "/lib"))) + ;; Only difference to icecat is browser name. + (wrap-program (car (find-files lib "^firefox$")) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib ,mesa-lib + ,libxscrnsaver-lib)))) + #t)))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "Tor Browser is the Tor Project version of Firefox browser. It is the only +recommended way to anonymously browse the web that is supported by the project. +It modifies Firefox in order to avoid many know application level attacks on +the privacy of Tor users. + +WARNING: This is not the official Tor Browser and is currently on testing. Use +at your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0)))) ;and others, see toolkit/content/license.html -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:51 2021 Received: from localhost ([127.0.0.1]:41760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtf-0001AU-0L for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:51 -0400 Received: from mx1.riseup.net ([198.252.153.129]:53386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtd-00019t-Rt for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:50 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWNJ3zKmzDq8t for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690384; bh=oTEtKk3vm1WhLN21XOcLTvg09YSk5SypoKyq1od5iAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/J5K5DbQMUzLBW+pVbiWgX9YSw2V41hxFzxtJYKKMHqoBqnPJZrUJViwyfILZz8f WFN7DgoRqhNyT2AluAHEC3f5Vc6ebHHPzRKv60GydeAk0ZtLV5xLe2aKuIL1keV/g1 XTTuyJTm3bosZzI6O5t/TJE/7zfabCkZgu0APhxg= X-Riseup-User-ID: 54FAF121C34F5EFB976165D446D468B486D1DC1329717DC03B8876B970DA135C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWNH4Qggz5vks; Wed, 2 Jun 2021 20:19:43 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 8/9] gnu: Add obfs4. Date: Thu, 3 Jun 2021 00:17:45 -0300 Message-Id: <66abc6eeaeab68a209c54740678b64f1d96ecd87.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/tor.scm (obfs4): New variable. * Alphabetically order module imports. diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index bd11dd3a75..52d78cba79 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2018 Ricardo Wurmus <rekado@HIDDEN> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@HIDDEN> ;;; Copyright © 2020 Brice Waegeneire <brice@HIDDEN> -;;; Copyright © 2020 André Batista <nandre@HIDDEN> +;;; Copyright © 2020, 2021 André Batista <nandre@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,13 +33,16 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) - #:use-module (gnu packages libevent) - #:use-module (gnu packages linux) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages golang) + #:use-module (gnu packages libevent) + #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -423,3 +426,75 @@ statistics and status reports on: Potential client and exit connections are scrubbed of sensitive information.") (license license:gpl3+))) + +(define-public obfs4 + (package + (name "obfs4") + (version "0.0.11") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/obfs4.git") + (commit (string-append "obfs4proxy-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1y2kjwrk64l1h8b87m4iqsanib5rn68gzkdri1vd132qrlypycjn")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/obfs4.git" + #:tests? #f ;; No test files + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively + "src/git.torproject.org/pluggable-transports/obfs4.git" + "src/gitlab.com/yawning/obfs4.git" + #:log (%make-void-port "w")) + (with-directory-excursion + "src/git.torproject.org/pluggable-transports/obfs4.git/obfs4proxy" + (invoke "go" "build" "-ldflags" "-s")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (src "src/git.torproject.org/pluggable-transports/obfs4.git") + (bin (string-append out "/bin")) + (share (string-append out "/share")) + (doc (string-append share "/doc")) + (man (string-append share "/man/man1"))) + (mkdir-p man) + (mkdir bin) + (mkdir doc) + (with-directory-excursion + (string-append src "/obfs4proxy") + (copy-file "obfs4proxy" + (string-append bin "/obfs4proxy"))) + (with-directory-excursion + (string-append src "/doc") + (copy-file "obfs4proxy.1" + (string-append man "/obfs4proxy.1")) + (copy-file "obfs4-spec.txt" + (string-append doc "/obfs4-spec.txt"))) + #t)))))) + (propagated-inputs + `(("go-torproject-org-ptlib" ,go-torproject-org-ptlib) + ("go-github-com-agl-ed25519" ,go-github-com-agl-ed25519) + ("go-github-com-dchest-siphash" ,go-github-com-dchest-siphash) + ("go-github-com-dchest-uniuri" ,go-github-com-dchest-uniuri) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsaes) + ("go-gitlab-com-yawning-utls" ,go-gitlab-com-yawning-utls) + ("go-golang-org-x-net" ,go-golang-org-x-net) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-golang-org-x-text" ,go-golang-org-x-text))) + (home-page "https://git.torproject.org/pluggable-transports/obfs4.git") + (synopsis "Obfs4 implements an obfuscation protocol") + (description "This is a look-like nothing obfuscation protocol that +incorporates ideas and concepts from Philipp Winter's ScrambleSuit protocol. +The obfs naming was chosen primarily because it was shorter, in terms of +protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") + (license license:gpl3+))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:48 2021 Received: from localhost ([127.0.0.1]:41757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtc-0001AG-Og for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:48 -0400 Received: from mx1.riseup.net ([198.252.153.129]:51476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtb-00019b-Eo for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:47 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWNG1C9vzDqgb for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690382; bh=2B0o7o4a2hJ41l5gV/zHCauJVMugw8Y/mxWRz5sa44c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O47FJWE6CdNbWizXCtMHQfV9Sg8ILeeeLmvk+W/rtM1MYaRkUt6zRfYgd/thy2Rsv QNTlO3lL9ZZ22Qf8lkZALWjkg1/zcCcPAr/crbmVJtCY5nvEin11vBuhzLGeYYS0qa xOy4yz8XXZVCuiz4JxMYqOS79gpWpl31aDxj6JjY= X-Riseup-User-ID: 7FCD7028AE8FC31E66241C53B1004E58E8AF8112460D53E41BEEE42D73EEE84B Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWNF1v9qz5vks; Wed, 2 Jun 2021 20:19:41 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 7/9] gnu: Add go-gitlab-com-yawning-utls. Date: Thu, 3 Jun 2021 00:17:44 -0300 Message-Id: <0b503bc2bfa00635409e47182aa575ebc4448c3d.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-gitlab-com-yawning-utls): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 6cf7ffc90c..b4e8c1f338 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7203,3 +7203,34 @@ with hardware support for AES New Instructions (AES-NI) and a sufficiently recent Go runtime, it will transparently call crypto/aes when NewCipher is invoked.") (license (license:non-copyleft "file://LICENSE.txt"))))) + +(define-public go-gitlab-com-yawning-utls + (package + (name "go-gitlab-com-yawning-utls") + (version "0.0.10-1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/yawning/utls.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15c46s56r45n22rmq9spnczydnkqrnxff28h5mpnk5yvcqif3lgb")))) + (build-system go-build-system) + (arguments + '(#:tests? #f ;; Tries to connect and fails. + #:import-path "gitlab.com/yawning/utls.git")) + (propagated-inputs + `(("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsaes) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) + (home-page "https://gitlab.com/yawning/utls.git") + (synopsis "Go library for uTLS") + (description "This library is a fork of the main Transport Layer Security +protocol in Go (crypto/tls) which provides ClientHello fingerprinting resistance, +low level access to handshakes and fake session tickets among other features. +This fork was made for the specific purpose of improving obfs4proxy's meek_lite +transport protocol.") + (license license:gpl3+))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:47 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:47 2021 Received: from localhost ([127.0.0.1]:41754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtb-0001A2-CW for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:47 -0400 Received: from mx1.riseup.net ([198.252.153.129]:49278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtZ-00019Q-1g for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:45 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWNC5Ll9zDqtG for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690379; bh=XEbSQTUMQ/PAjYPEpqfxb+MLH/ZiUpmriPVhhyc8c2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fzyKb9yYusxmM53EKJH/Nye3zIJYen+Q1APmdiTd0c2gFQk62sD7Y1peI5oiZCmv6 Bbwn3dlqLeiulqftouocicX6ERMgnQBIwtgeyoTfIe8Rm3TLKCa4Fm5nZs1g25fEVn UaAzpFVCAu5Px5YP/nrVboW3DXrnx68Dm9rDHFdI= X-Riseup-User-ID: 016955451BFD80454E8AD292281590A58AFED098D18D6D0FCB429E9DBAEB61DF Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWNB605jz5vks; Wed, 2 Jun 2021 20:19:38 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 6/9] gnu: Add go-schwanenlied-me-yawning-bsaes. Date: Thu, 3 Jun 2021 00:17:43 -0300 Message-Id: <b572a429973f81504bf35aa905d046bf6aa13dc5.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-schwanenlied-me-yawning-bsaes): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index f554a8305e..6cf7ffc90c 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7174,3 +7174,32 @@ Universal Resource Identifiers to uniquely identify objects.") The goal of this project is to provide pure Go implementations for popular compression algorithms bey ond what the Go standard library provides.") (license (license:non-copyleft "file://LICENSE.md"))))) + +(define-public go-schwanenlied-me-yawning-bsaes + (let ((commit "26d1add596b6d800bdeeb3bc3b2c7b316c056b6d") + (revision "0")) + (package + (name "go-schwanenlied-me-yawning-bsaes") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.schwanenlied.me/yawning/bsaes.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0h4dsyw54n9rcwprqy93wv2v1gcvlq1vfqdp1g7wxdkq457rhvys")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.schwanenlied.me/yawning/bsaes.git")) + (home-page "https://git.schwanenlied.me/yawning/bsaes.git") + (synopsis "Go AES library") + (description "Portable pure-Go constant time Advanced Encryption +Standard (AES) for eletronic data encryption. This implementation if +based on code from [BearSSL](https://bearssl.org/). On AMD64 systems +with hardware support for AES New Instructions (AES-NI) and a +sufficiently recent Go runtime, it will transparently call crypto/aes +when NewCipher is invoked.") + (license (license:non-copyleft "file://LICENSE.txt"))))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:44 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:44 2021 Received: from localhost ([127.0.0.1]:41751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtY-00019l-59 for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:44 -0400 Received: from mx1.riseup.net ([198.252.153.129]:46838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtW-00019C-1q for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:42 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWN84S6yzDq8t for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690376; bh=xKqqIfDFEEIsP0ZWOpxK8VjDOcOZOaIag6JKr0HK3KQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oK0EB1feOp6/RZ8bTwzJWXt15d916C7SO5t5qMNKyv2WsMRd8PAfAr5WEHDsceIer fcNvbn0NQ6BGqTJ5dtfT6/IKAy95JGRiaKhI6+o48PF+3NafusdmWE7uO6oTq3hH+7 qs8y91hZgFKTawvhg/wYlPoEDO6M3kCXbAKbuE5U= X-Riseup-User-ID: F82E41AC3E7DC83291FA3344A60F2B2982E79AC236D3CEB208AF4B7DD555046D Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWN752YWz5vks; Wed, 2 Jun 2021 20:19:35 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 5/9] gnu: Add go-github-com-dsnet-compress. Date: Thu, 3 Jun 2021 00:17:42 -0300 Message-Id: <e6be05ea33f1acae969c44a8426e7953735e57ae.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-github-com-dsnet-compress): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 08b5b6ba9b..f554a8305e 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7148,3 +7148,29 @@ J. Bernstein. ") (description "Package uniuri generates random strings good for use in Universal Resource Identifiers to uniquely identify objects.") (license license:cc0)))) + +(define-public go-github-com-dsnet-compress + (let ((commit "cc9eb1d7ad760af14e8f918698f745e80377af4f") + (revision "0")) + (package + (name "go-github-com-dsnet-compress") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dsnet/compress") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dsnet/compress")) + (home-page "https://github.com/dsnet/compress") + (synopsis "Go library for extended compression") + (description "This is a collection of compression related libraries. +The goal of this project is to provide pure Go implementations for popular +compression algorithms bey ond what the Go standard library provides.") + (license (license:non-copyleft "file://LICENSE.md"))))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:40 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:40 2021 Received: from localhost ([127.0.0.1]:41748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtT-00019R-U8 for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:40 -0400 Received: from mx1.riseup.net ([198.252.153.129]:43380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtS-000192-J5 for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:38 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWN524LbzDqgb for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690373; bh=oHcML74qaAh7gacIWbJnoxuSAmKRzwbd6wUWR45VWjs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PuA5SwIiTTMUx+7mXbI3PqO8l1OnlH9wC0l79Ltf+V5vVL4B6OE8XYXbAr+Sb0ZW9 QtnCgsG+NARHLHagM3ls/IlDngSY7yzBQEmq6ipa+n6tFmHevLjp9Zy9bsS9C4TR/a 4FXKEP2m9mk4e+VxxQa7eHcFYEBlOW1/n0ZhJX84= X-Riseup-User-ID: 1A6E9F68E556D246A4CA6DDF1DF54D30FAAE58AA97AE9A2A4F58ED0724E528F5 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWN42lcLz5vks; Wed, 2 Jun 2021 20:19:32 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 4/9] gnu: Add go-github-com-dchest-uniuri. Date: Thu, 3 Jun 2021 00:17:41 -0300 Message-Id: <b2cc6770b58badbe54a7f476bf87b9ba2058bc42.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-github-com-dchest-uniuri): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 037163766d..08b5b6ba9b 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7123,3 +7123,28 @@ Pseudo Random Function which is suitable for usage in message authentication codes and was based on the design created by Jean-Philippe Aumasson and Daniel J. Bernstein. ") (license license:cc0)))) + +(define-public go-github-com-dchest-uniuri + (let ((commit "8902c56451e9b58ff940bbe5fec35d5f9c04584a") + (revision "0")) + (package + (name "go-github-com-dchest-uniuri") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/uniuri") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1x5bsbm1nlphsv96zd0rbclfaa1swpz5bp14x7s5dbxp0awk2gd4")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/uniuri")) + (home-page "https://github.com/dchest/uniuri") + (synopsis "Go library for random URIs") + (description "Package uniuri generates random strings good for use in +Universal Resource Identifiers to uniquely identify objects.") + (license license:cc0)))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:36 2021 Received: from localhost ([127.0.0.1]:41745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtQ-00019A-Mt for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:36 -0400 Received: from mx1.riseup.net ([198.252.153.129]:40964) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtP-00018r-GG for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:35 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWN21WnNzDq8t for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690370; bh=8ZMIZbJtQWc3sJBKWFNNgCTsIgRJxQ9Zdstx0v9ayiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UXM4/w3NBZ6RFtOXG/EGoqm5qDqTFRt5lNPqpcntvnUL1dV32hxv46fvGD5cxA0LT 89lkw2a4DjxwfxrTlaacH1nVpdfP+Qjj5Vl2XJNxQ+McpaIjrtu31bxKYl4DSPgput uHBw3dNQPOUqW6O131hwBVz6ih5+b7YSHmvBFqCQ= X-Riseup-User-ID: 72A072990D84B83BC8982F6FFFE195649ACCEE9EE650F9AE361CBAFBB09DD955 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWN1243jz5vks; Wed, 2 Jun 2021 20:19:29 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 3/9] gnu: Add go-github-com-dchest-siphash. Date: Thu, 3 Jun 2021 00:17:40 -0300 Message-Id: <61cb1458a6f5a8f42637e08b0d76837b65aeb57b.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-github-com-dchest-siphash): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 2569d450b2..037163766d 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7096,3 +7096,30 @@ is unmaintained. Newer software should use x-crypto instead.") ;; License file is referred but it is missing. Probably because the ;; author decided to discontinue the project. (license (license:non-copyleft "file://ed25519.go"))))) + +(define-public go-github-com-dchest-siphash + (let ((commit "34f201214d993633bb24f418ba11736ab8b55aa7") + (revision "0")) + (package + (name "go-github-com-dchest-siphash") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/siphash") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "08s076y7vmjqnq7jz0762hkm896r6r31v8b31a3gy0n8rfa01k8k")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/siphash")) + (home-page "https://github.com/dchest/siphash") + (synopsis "Go library for siphash") + (description "Go implementation of SipHash-2-4, a fast short-input +Pseudo Random Function which is suitable for usage in message authentication +codes and was based on the design created by Jean-Philippe Aumasson and Daniel +J. Bernstein. ") + (license license:cc0)))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:30 2021 Received: from localhost ([127.0.0.1]:41742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtK-00018s-Ew for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:30 -0400 Received: from mx1.riseup.net ([198.252.153.129]:35696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtJ-00018X-5x for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:29 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWMv6FBdzDqgb for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690363; bh=C18qLTrrDRys1b/YaxSfp+/wfv6ougr7XOIAxLbtrk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NV3fHlGH+56DCFuPJFiPrAFw9eIT50SwrTiaY18QrdZlhYONb4V9mJ7geEcUyGUNu GOpgDNzzPAFVYADZdzzU9F2RQtspZsW5NDAnmqvY0pJlPdTq1LnDmM4YuASGn7FPMG GI3/Jd9urpn/CMU9hsrlc8NHePEUhtFCphvh5zGo= X-Riseup-User-ID: 56FF0D3A6E5663DCE1FEA5751F3529B5F0F04C10969B6C90FA8C414C17798B2C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWMt6qZLz5vks; Wed, 2 Jun 2021 20:19:22 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 2/9] gnu: Add go-github-com-agl-ed25519. Date: Thu, 3 Jun 2021 00:17:39 -0300 Message-Id: <99af7879a93ec3f94030b3e3cb266949f67d824b.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-github-com-agl-ed25519): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 940f38af76..2569d450b2 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -7058,3 +7058,41 @@ Go.") Transports are a means of connecting to the Tor Network from places where it is censored.") (license license:cc0))) + +(define-public go-github-com-agl-ed25519 + (let ((commit "c4161f4c7483313562781c61b9a20aba73daf9de") + (revision "0")) + (package + (name "go-github-com-agl-ed25519") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/agl/ed25519") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1wjlbzi0w63rmlzgk3amw274wsl0zhcn4yx2lraffbkhqappahxc")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/agl/ed25519" + #:phases + (modify-phases %standard-phases + (add-before 'reset-gzip-timestamps 'make-files-writable + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) (chmod file #o644)) + (find-files out "\\.gz")) + #t)))))) + (home-page "https://github.com/agl/ed25519") + (synopsis "Go library for ed25519 public-key signatures") + (description "This library is a Go implementation of ed25519 public-key +signature system which was designed to be faster than previous digital signature +systems without sacrificing security. It is currently used in the +implementation of obfs4 and should be not be used on newer projects since it +is unmaintained. Newer software should use x-crypto instead.") + ;; License file is referred but it is missing. Probably because the + ;; author decided to discontinue the project. + (license (license:non-copyleft "file://ed25519.go"))))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:25 2021 Received: from localhost ([127.0.0.1]:41739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodtF-00018Z-50 for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:25 -0400 Received: from mx1.riseup.net ([198.252.153.129]:58340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodtD-00018M-0x for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:23 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWMn59RXzDqgb for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690357; bh=xvHpty23XPQGvXLaGqUS0DmL3LtyzW5M7ygNTnuszdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EMSfcN5osKT4JeGQAQ6uHau4Yvhwt3tQP3avZPXYRGaoZbkspNQyffZB8LBSoNJ1r /p41kSauu5YsGOznibITj2SDblEfEND5WZqS6Oc00yrlnajvRLp3tu8XZx1IFZZqaU j8LRa65rGP0YFk7eRNfEww4rGb+c9o5FJabOUjxs= X-Riseup-User-ID: CF5F485FC5774CF4FCFF130B8A67C58C6E5BC3ABF43C7DF1717D8B78C39B8D4C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWMm5S08z5vks; Wed, 2 Jun 2021 20:19:16 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 1/9] gnu: Add go-torproject-org-ptlib. Date: Thu, 3 Jun 2021 00:17:38 -0300 Message-Id: <e45bafa36d125947224ceed1dffc6e8f8e0e8438.1622687706.git.nandre@HIDDEN> In-Reply-To: <cover.1622687706.git.nandre@HIDDEN> References: <20201007155154.GA5226@andel> <cover.1622687706.git.nandre@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) * gnu/packages/golang.scm (go-torproject-org-ptlib): New variable. diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 8c3c81ceda..940f38af76 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2020 Martin Becze <mjbecze@HIDDEN> ;;; Copyright © 2021 Ricardo Wurmus <rekado@HIDDEN> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@HIDDEN> +;;; Copyright © 2021 André Batista <nandre@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -7033,3 +7034,27 @@ simplifications, and enforces style rules.") "This package provides a library for fast, structured, leveled logging in Go.") (license license:expat))) + +(define-public go-torproject-org-ptlib + (package + (name "go-torproject-org-ptlib") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/goptlib.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lh938194hvkf8pqgnxwf6hvjv9rv0j3kasi07r2ckrj8sxzk4jc")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/goptlib.git")) + (home-page "https://git.torproject.org/pluggable-transports/goptlib.git") + (synopsis "Go library for Tor Pluggable Transports") + (description "Library for writing Tor Pluggable Transports in Go. Pluggable +Transports are a means of connecting to the Tor Network from places where it +is censored.") + (license license:cc0))) -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Jun 2021 03:19:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 02 23:19:17 2021 Received: from localhost ([127.0.0.1]:41736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lodt6-00018D-T5 for submit <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:17 -0400 Received: from mx1.riseup.net ([198.252.153.129]:53626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lodt4-00017z-Rv for 42380 <at> debbugs.gnu.org; Wed, 02 Jun 2021 23:19:15 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FwWMd1k0RzDqtG for <42380 <at> debbugs.gnu.org>; Wed, 2 Jun 2021 20:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622690349; bh=NSf/6cMDwF2IfEQleo+x/9uEjZjIYFvQpQN05hSBjpg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kq+ssak2Ju1iqYFVMqTnXUmp3IQiqrEC4eCsx74H3rylMM3wdXQgt8KMHbTJycjuR bIvDzw8VfUvqBuuLfWby+wtISFAZNA6QA/zG/uCsmtDksOsLJl9dZ9hHwKJPGNKgPF 9+qt8U1JbZmnaxmpvf5D+yQKrXpfYDMN9hYSYTW8= X-Riseup-User-ID: 0BC5F69B81D0180275854D0B776B50A6EA51E3CCBC8E497A311C9AC8A7002B2E Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FwWMc2F3Yz5vks; Wed, 2 Jun 2021 20:19:08 -0700 (PDT) From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: [PATCH v4 0/9] gnu: Add torbrowser-unbundle. Date: Thu, 3 Jun 2021 00:17:37 -0300 Message-Id: <cover.1622687706.git.nandre@HIDDEN> In-Reply-To: <20201007155154.GA5226@andel> References: <20201007155154.GA5226@andel> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) *** Updated patch series to add torbrowser-unbundle current stable *** The first 8 patches are identical to the previous versions, except they've been updated to reflect line number changes on current guix. Tor Browser is now built mainly from tarballs, except for tor-browser-builder which needs a git repo. torbutton is not defined anymore since it's already bundled. The browser is fully working, but there are still two issues I'd like to solve: 1. build extensions from source; 2. make it deterministic again. I've left comments on code if anyone cares to try and solve them before I get the time to give it another go. Cheers, André Batista (9): gnu: Add go-torproject-org-ptlib. gnu: Add go-github-com-agl-ed25519. gnu: Add go-github-com-dchest-siphash. gnu: Add go-github-com-dchest-uniuri. gnu: Add go-github-com-dsnet-compress. gnu: Add go-schwanenlied-me-yawning-bsaes. gnu: Add go-gitlab-com-yawning-utls. gnu: Add obfs4. gnu: Add torbrowser-unbundle. gnu/local.mk | 3 + gnu/packages/golang.scm | 201 +++++ .../patches/torbrowser-start-desktop.patch | 22 + .../patches/torbrowser-start-script.patch | 181 +++++ gnu/packages/tor.scm | 755 +++++++++++++++++- 5 files changed, 1159 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/torbrowser-start-desktop.patch create mode 100644 gnu/packages/patches/torbrowser-start-script.patch -- 2.31.1
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 28 May 2021 01:46:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 27 21:46:12 2021 Received: from localhost ([127.0.0.1]:53275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lmRZj-0007Wi-LA for submit <at> debbugs.gnu.org; Thu, 27 May 2021 21:46:12 -0400 Received: from mx1.riseup.net ([198.252.153.129]:37682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1lmRZg-0007Ot-G8 for 42380 <at> debbugs.gnu.org; Thu, 27 May 2021 21:46:10 -0400 Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4FrnZy46nvzDsdc; Thu, 27 May 2021 18:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1622166362; bh=vdA0JMa1vVyST99WQLcQthxgSZwE1cQ+b32jyp5kGM4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aKqfwStCzXTE/p4PIvEaxjrs16H2XK2UuwbDJ3BibQvpB92driMgCsT8nm3zsW+nR 2YosRQ3G+D425UTP19+aNd8ZR3yxZOHuDjvdWtMMidn03TvamjxBTZ27rc3auKBmCe aMaIC4GvkW+gQqIPZcpU1qaaRfeuX+bN+zYN6O6M= X-Riseup-User-ID: BD35962DCF622FB04B2D560F95F0294FEA82EAAB23F592965792A3BE9F6895F1 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4FrnZw6tzPz5vVf; Thu, 27 May 2021 18:46:00 -0700 (PDT) Date: Thu, 27 May 2021 22:45:51 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN> Subject: Re: [bug#42380] Wow! Message-ID: <YLBLT5y08LIuYQba@andel> References: <20200715211547.GA17146@andel> <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> <20200915152332.GJ13296@andel> <87zgwic0qc.fsf@HIDDEN> <YK1MClOxWNySPXCM@HIDDEN> <87tumqwlqm.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87tumqwlqm.fsf@HIDDEN> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: Raghav Gururajan <raghavgururajan@HIDDEN>, Xinglu Chen <public@HIDDEN>, 42380 <at> debbugs.gnu.org, Leo Famulari <leo@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Hi, ter 25 mai 2021 às 23:24:01 (1621995841), ludo@HIDDEN enviou: > Leo Famulari <leo@HIDDEN> skribis: > > > Does this package build the Tor browser from source? Or is it just a > > launcher, like the Debian package? > > It builds from source. Apart from noscript which Tor Browser itself does not build from source and https-everywhere which at the time I thought I'd be able to build from source but I got stuck on rust dependency nightmare and had to delay. Unfortunately, this issue still remains to be solved. > And sorry for dropping the ball, André! If anyone’s willing to give it > a try and report back, or to comment on the patch, that’d be great. No problem, Ludo, it was lacking feedback and I know it's somewhat a big and delicate piece of software to be merging without it. > > My understanding is that the Tor people discourage anyone else from > > distributing builds of the Tor browser. That's also my understanding, however I do think that building from source is: 1. the very core of software freedom, despite the relevance other concerns such as diminishing anonymity set; 2. one of the main strenghts and what Guix strives for. > > If it builds from source, we should probably call it something besides > > "Tor browser", since it will be different from the official Tor browser > > due to the unbundling and other changes. I've initially called the package definition "torbrowser-unbundle" and also inserted a warning that it was _not_ official Tor Browser, but I did not try to patch sources to rename the browser as it appears after installed. I can both agree to another name that makes it clearly appart from the official browser by Tor Project ("nottorbrowser?", "onionbrowser?") and to work on a patching sources to remove the user visible name and logo, if it's deemed necessary. (That may take a while however). > > Also, if it builds from source, it will be easy to identify users of > > this package as being Guix users and since the Guix userbase is > > relatively small, it will be much easier than usual to positively > > identify the person using the package. I've tested it with panopticlick.eff.org and it's user identifying bits remain the same as the official Tor Browser. That said, panopticlick is certainly not a silver bullet and you have grounds to be concerned. If someone were to need/want the very best assurances on anonymity set, I'd advise not to risk it and go with the larger crowd. On the other hand, until not long ago and maybe currently still, guix users were using IceCat with tor and that's a much more telling tale. > Good points. I think we could ask the Tor Browser folks (we met with a > couple of them at Reproducible Builds Summits in the past and I’m > confident we’d understand each other :-)). That would be great :) In the mean time, I'll take this as an invitation to send a new patch version with the latest Tor Browser stable. I've made some minor improvements such as using tarballs from archive.torproject.org instead of {git|dist}.torproject.org. Since they are planning a new stable release in the next few days, I'll take the time to work on a reproducibility issue that have arised with the new zip routine to package extensions inside omni.ja which affected the timestamps, at least the way I did it. Cheers,
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 25 May 2021 21:24:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 17:24:14 2021 Received: from localhost ([127.0.0.1]:47189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1lleX8-00037m-Fw for submit <at> debbugs.gnu.org; Tue, 25 May 2021 17:24:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1lleX5-00037W-2D for 42380 <at> debbugs.gnu.org; Tue, 25 May 2021 17:24:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36984) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1lleWy-0006HP-Jo; Tue, 25 May 2021 17:24:04 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41698 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1lleWx-0002ui-8M; Tue, 25 May 2021 17:24:04 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Leo Famulari <leo@HIDDEN> Subject: Re: [bug#42380] Wow! References: <20200715211547.GA17146@andel> <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> <20200915152332.GJ13296@andel> <87zgwic0qc.fsf@HIDDEN> <YK1MClOxWNySPXCM@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Prairial an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 25 May 2021 23:24:01 +0200 In-Reply-To: <YK1MClOxWNySPXCM@HIDDEN> (Leo Famulari's message of "Tue, 25 May 2021 15:12:10 -0400") Message-ID: <87tumqwlqm.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42380 Cc: =?utf-8?Q?Andr=C3=A9?= Batista <nandre@HIDDEN>, Raghav Gururajan <raghavgururajan@HIDDEN>, Xinglu Chen <public@HIDDEN>, 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Leo Famulari <leo@HIDDEN> skribis: > On Tue, May 25, 2021 at 05:05:47PM +0200, Xinglu Chen wrote: >> What=E2=80=99s the status of these patches? I would love to see Tor Bro= wser in >> Guix! > > Does this package build the Tor browser from source? Or is it just a > launcher, like the Debian package? It builds from source. And sorry for dropping the ball, Andr=C3=A9! If anyone=E2=80=99s willing t= o give it a try and report back, or to comment on the patch, that=E2=80=99d be great. > My understanding is that the Tor people discourage anyone else from > distributing builds of the Tor browser. > > If it builds from source, we should probably call it something besides > "Tor browser", since it will be different from the official Tor browser > due to the unbundling and other changes. > > Also, if it builds from source, it will be easy to identify users of > this package as being Guix users and since the Guix userbase is > relatively small, it will be much easier than usual to positively > identify the person using the package. Good points. I think we could ask the Tor Browser folks (we met with a couple of them at Reproducible Builds Summits in the past and I=E2=80=99m confident we=E2=80=99d understand each other :-)). Thanks, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 25 May 2021 19:12:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 15:12:19 2021 Received: from localhost ([127.0.0.1]:46805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1llcTT-00014X-FO for submit <at> debbugs.gnu.org; Tue, 25 May 2021 15:12:19 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <leo@HIDDEN>) id 1llcTS-00014L-1A for 42380 <at> debbugs.gnu.org; Tue, 25 May 2021 15:12:18 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0172E5C00C5; Tue, 25 May 2021 15:12:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 25 May 2021 15:12:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=NfjQjW6UUgF+8UMuedYjLRrM +teXpO24doMUfrDyTNU=; b=oEb1A3UEWM0XIcJz9bUcJk55Oi3PFew5y5dbKbMP ODl8oe7gAvFOqjVKn7Y1Q6KQPbEk00lNvma6E/oFXUPbfECQ7ZDMWz4nF8W/j4Jj Lo9mjThzUV6xqZoG+fpMnCEBEw3lPCs5spHKFsDy7THNL/+Orlql0TacCL+MK+YS k6g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=NfjQjW 6UUgF+8UMuedYjLRrM+teXpO24doMUfrDyTNU=; b=Kn3DNTVaceK7IxJ8OcQWVB kWu/ia/SJ2Mo+JnOjSBUi3zu4JWiLnp/pRk0JunNbx2JST15UEHxkbjMPgPIr8w6 u9khd8wJpFzVZsLqU1vgG+MKHw2BxKaxMYq+VHoXLaEHwie4OghwLcQQ2986WR9r SSJ2jygI8q5s/HQWrpOz0sZLtnLpUbEsZtiEYHnW94Aimd+MvD11cGRbw50BEkwT md69VMbuF6FnCaMWWz5dL2jrP4pOF3c4/M5GqKCbn6Be3svmWlV1U+Pu6Qm1Bspp Ya8vJNpj+uq/6A/f2NF4InZjoL7jFPHEl/vJnB8+ItY1QhzQR5JpxNQQINqaYN+g == X-ME-Sender: <xms:DEytYCRJp6v1mT46VJYnr2Wo6v3oHoNTSs6qM0yFjIU0N_VRFURK9w> <xme:DEytYHyYFk9CeK_WEjj41gbnFPirEAkDJvNALJpSxOrYP-wDRrgzB-VMdHVZD9ZXj uMRNovvJghNVVPj6A> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekuddgudefiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepnfgvohcu hfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrth htvghrnhepiefghfeffedtffekveektddtieekfeffledtgfevkeekteeufedtfefhgefh keefnecukfhppedutddtrdduuddrudeiledruddukeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: <xmx:DEytYP2sTgvvYzOwkVXVu8re1H36fKTJkweGoLiY2YrNOWe1TSJ3lA> <xmx:DEytYOBhCqQS3btCbQIpRETKh4DwreO2vLcpb02xm8uoUjresLTKNQ> <xmx:DEytYLiwHuOu7nVZCbSq3mG_0XDFQ2gdnqMAZi0FgnJL7WXIUPLlkg> <xmx:DEytYOscGuYquAkmzBMPvIpV_83yKukMFQFGQ_C8diAinbL-f74qvg> Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 May 2021 15:12:11 -0400 (EDT) Date: Tue, 25 May 2021 15:12:10 -0400 From: Leo Famulari <leo@HIDDEN> To: Xinglu Chen <public@HIDDEN> Subject: Re: [bug#42380] Wow! Message-ID: <YK1MClOxWNySPXCM@HIDDEN> References: <20200715211547.GA17146@andel> <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> <20200915152332.GJ13296@andel> <87zgwic0qc.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zqOzaRD/mtCg/Kna" Content-Disposition: inline In-Reply-To: <87zgwic0qc.fsf@HIDDEN> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN>, Raghav Gururajan <raghavgururajan@HIDDEN>, Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --zqOzaRD/mtCg/Kna Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 25, 2021 at 05:05:47PM +0200, Xinglu Chen wrote: > What=E2=80=99s the status of these patches? I would love to see Tor Brow= ser in > Guix! Does this package build the Tor browser from source? Or is it just a launcher, like the Debian package? My understanding is that the Tor people discourage anyone else from distributing builds of the Tor browser. If it builds from source, we should probably call it something besides "Tor browser", since it will be different from the official Tor browser due to the unbundling and other changes. Also, if it builds from source, it will be easy to identify users of this package as being Guix users and since the Guix userbase is relatively small, it will be much easier than usual to positively identify the person using the package. --zqOzaRD/mtCg/Kna Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmCtTAoACgkQJkb6MLrK fwhm9w/9ExpGL0cHdCwAAAgHxF80ID1W+CSAquENFHuwgBp5h8wZ34G9B4vd8q5j GDR5/fHJSZgftRiRgAH5yXxqg/tm0xzrFqGn4pFDyv24yybBd76YvlAoN5j/i1Hd dRIY9oAkTHjF6XmT+wWciVNOEG/ScTstmtkaJvhzML4L5wfFJlm+naJ2DTOT+PnH RLMO/civaHXpKXYC9EzRCrTTJpYRJEftLyKUY6OMYBVv0pChU4ZkL/jqzXahx140 TUtyJJt5Fw97LlsCbEkgutb29ouoc8XFxsoha0uzsTZ3fR66WhOHPduYcuHUk05B AnSAAMj17FCtD2c/cd+DK9QEHeRHxtM2tz7HU+NzS7MRPjCdzacYS9bxi9MpLJle 4xL8xZZ2d2XxT/W0GNCjyVx/Co0QyWnFzWyYMxcwmBl4lA4kAOdbV0Q5iApg6QnZ OvHp2C42Y7T4H37DBBSYxDMsY4fNwoBnOMZJVOu7kSHJ5E/koBOSTwGzdiwOwLdX E7wrbuLWNWsUAMb5sZIrrwYluWeaU3uHHpv7YCNBEy4nvAJ9fIoIbi8zS7IeESeE gxNIYyU0Ma5eOoOXD/8vxPKviAmc//n+sIxcAsdt7vL0Ss9EjzRcOvY+g8WD/5He Vk4NjBwzJyZMyr/rQva0v7FkBSK33XGo9k8IYMIdCHN6OwwT++o= =pZWh -----END PGP SIGNATURE----- --zqOzaRD/mtCg/Kna--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 25 May 2021 15:06:03 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 25 11:06:03 2021 Received: from localhost ([127.0.0.1]:46549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1llYd8-0000yq-S3 for submit <at> debbugs.gnu.org; Tue, 25 May 2021 11:06:03 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:53856 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <public@HIDDEN>) id 1llYd6-0000yJ-Qq for 42380 <at> debbugs.gnu.org; Tue, 25 May 2021 11:06:01 -0400 From: Xinglu Chen <public@HIDDEN> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1621955154; bh=GEPzG+CwqFROrXXtD5LaXwB/8wMlN30Mlxl8s//pqvo=; h=From:To:Subject:In-Reply-To:References:cc:Date; b=ZhiDSE0vMEvtdGXtBRikNSghj1h6hmLHAnG4Xj7VyHtUTRVpBttqwhLWJVdUHTQHj V6J3JHab9eCsnphxPj2Tptl42qXyl+Ne+Huo6Rwmi/NQbi9dc7R2MindBPSsuqnJJa Xkn3HjBKDCWcQzAiuNRY4hTnOEJTH34ze4618RYs= To: =?utf-8?Q?Andr=C3=A9?= Batista <nandre@HIDDEN>, Raghav Gururajan <raghavgururajan@HIDDEN>, Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: [bug#42380] Wow! In-Reply-To: <20200915152332.GJ13296@andel> References: <20200715211547.GA17146@andel> <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> <20200915152332.GJ13296@andel> Date: Tue, 25 May 2021 17:05:47 +0200 Message-ID: <87zgwic0qc.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: What’s the status of these patches? I would love to see Tor Browser in Guix! Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS X-Debbugs-Envelope-To: 42380 Cc: 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: What’s the status of these patches? I would love to see Tor Browser in Guix! Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable What=E2=80=99s the status of these patches? I would love to see Tor Browse= r in Guix! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmCtEksVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5M2EQALpc+Ot1lSCgCFl9I2Xi8PbhDER+ LKhLz4j1F2cKCiTirQDLeL4Kj5nNrZepAG/xmPhp4tBqW3yEKpB88ZGBVkw9R+01 88AKk9mmv8/ntYJxyJcSFQpr6ykiYpU0OpHGsO8eWafWeJUputou/yxJgI9j5mZ+ qNmqQLmwWPmsPILf5v9eZGws0lxKlWZW+0xJ0ncqlRXdjZQ9ItLIluQClVvxEdxO VRzposL1dTGpAes4EoWHH26wvMkIeuIXcgY5e+jV73BlS93iamOUxHgK3f0GJYI8 RtxHot36f2ZfmbQfCu0V3CGVropnZXAS2pvEjFsxkgbscDgq5wTUlgZjw0a5BmA3 fJdHbuwWNrC/0LNrYR0PXM7pSkgqH4RJeQgSRbiC7SaNSSJssR0OtaIHfJQAuO3B igeKy6wyYKvv7jta+cgqWvTcS3zlaTNa9hBWl6aUaJ5NujwI3zyVrXf1tn7vm5Ay ZmOeUiaKSiNZ0NJxnfMlzpl/AZYlbQZhGNSevLiMPytpqnPIdXIV7q+7HE3FzugA j7HZ4sR0sRQPdpDlqAQOpGjIzBfwH6+Na2YQESnFsJ4pKKNskSCUk8fkTin+y+sk 9pIRL+TwItaByR2P7iBC1ZcFy5QAihJuHIisxxlD0HB496MLGcZNCCXzpxR12tBz LlHilrTkIVwoo0zE =Haxm -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 7 Oct 2020 15:52:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 07 11:52:24 2020 Received: from localhost ([127.0.0.1]:57777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kQBjj-0007B5-S5 for submit <at> debbugs.gnu.org; Wed, 07 Oct 2020 11:52:23 -0400 Received: from mx1.riseup.net ([198.252.153.129]:45262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kQBje-0007Au-K8 for 42380 <at> debbugs.gnu.org; Wed, 07 Oct 2020 11:52:14 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4C5zNn46jqzDsYk for <42380 <at> debbugs.gnu.org>; Wed, 7 Oct 2020 08:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1602085929; bh=f9SnDCBOOayhM892wK19PKP5uCAQJwgLSZrFJIsKu8o=; h=Date:From:To:Subject:References:In-Reply-To:From; b=WL06TuIX/hd3XeH+B7pj3Kmi/tVhtDYwzTjwNRxeW/5DSrit22GNsewaA7TaGsPcj X+myH9flE6C0sTD17jpT5ATzSm9KKHIqQ9WFZoOghIttbmQBsYDBOoaoC+UQ+QC8pe uZkeywy40eP+RkBkXNwV2rm+0B8VameFo19SsRe0= X-Riseup-User-ID: C3348F9FED29862731067AB0F2B0D48885E3CE6F3D86538BE6EF36908900F273 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4C5zNm3P4CzJr3l for <42380 <at> debbugs.gnu.org>; Wed, 7 Oct 2020 08:52:08 -0700 (PDT) Date: Wed, 7 Oct 2020 12:51:54 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCHv3 9/9] gnu: Add torbrowser-unbundle. Message-ID: <20201007155154.GA5226@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> <20200915151614.GI13296@andel> <20200924231814.GA29727@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <20200924231814.GA29727@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --uQr8t48UFsdbeI+V Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello Guix, This new version of the patch addresses the following: - inherits definition from icecat[1]; - use source tarballs for tor-browser and tor-launcher[2]; - does not define torbutton anymore (it is bundled with tor-browser); - unbundles some system libs (nss, nspr, zlib, libevent and icu) 1. There are four phases which are almost exact copies from icecat. I've tried to use let, define and package-properties to remove the hardcoded strings which are in the way of inheritance, but I've had no success. The phases are: 'install-icons, 'apply-guix-specific-patches, 'neutralise-store-references and 'wrap-program. Maybe someone here can shed a light. 2. Those tarballs and also the one used for fonts are not kept for long on dist.torproject.org. Usually they are removed when there is a new browser version. So this will be a problem for time-machine. On the other hand, the git repos for fonts and torbrowser source are huge, so I'm unsure which would be preferable. --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename="0001-gnu-Add-torbrowser-unbundle.patch" Content-Transfer-Encoding: quoted-printable =46rom 2daf59f3a3d12d1c2ea8c94d9a0d748d26e5b1c7 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Wed, 7 Oct 2020 11:52:21 -0300 Subject: [PATCH] gnu: Add torbrowser-unbundle. To: 42380 <at> debbugs.gnu.org * gnu/packages/tor.scm (torbrowser-unbundle): New variable. * gnu/packages/patches/torbrowser-start-desktop.patch: New file. * gnu/packages/patches/torbrowser-start-script.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 3 + .../patches/torbrowser-start-desktop.patch | 22 + .../patches/torbrowser-start-script.patch | 181 +++++ gnu/packages/tor.scm | 691 +++++++++++++++++- 4 files changed, 896 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/torbrowser-start-desktop.patch create mode 100644 gnu/packages/patches/torbrowser-start-script.patch diff --git a/gnu/local.mk b/gnu/local.mk index 83d2d72ab1..7cfc2e901f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -37,6 +37,7 @@ # Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN> # Copyright =C2=A9 2020 Tanguy Le Carrour <tanguy@HIDDEN> # Copyright =C2=A9 2020 Martin Becze <mjbecze@HIDDEN> +# Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1629,6 +1630,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/tipp10-fix-compiling.patch \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tk-find-library.patch \ + %D%/packages/patches/torbrowser-start-desktop.patch \ + %D%/packages/patches/torbrowser-start-script.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ diff --git a/gnu/packages/patches/torbrowser-start-desktop.patch b/gnu/pack= ages/patches/torbrowser-start-desktop.patch new file mode 100644 index 0000000000..6832ed363b --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop.orig 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop 2020-07-24 14:36:37.720579884 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the sh= ell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=3DWeb Browser + Comment=3DTor Browser is +1 for privacy and =E2=88=921 for mass surveilla= nce + Categories=3DNetwork;WebBrowser;Security; +-Exec=3Dsh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ = ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/sta= rt-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=3D./Browser/start-tor-browser --detach +-Icon=3Dweb-browser ++Exec=3Dsh -c start-tor-browser ++X-TorBrowser-ExecShell=3Dstart-tor-browser --detach ++Icon=3Dtorbrowser + StartupWMClass=3DTor Browser diff --git a/gnu/packages/patches/torbrowser-start-script.patch b/gnu/packa= ges/patches/torbrowser-start-script.patch new file mode 100644 index 0000000000..b8c8d9a26a --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-script.patch @@ -0,0 +1,181 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Eorig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= 2020-07-23 18:13:32.426282743 -0300 +@@ -5,6 +5,14 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. +=20 ++TBB_HOME=3D"${HOME}/.local/share/torbrowser" ++TBB_LOGFILE=3D"${TBB_HOME}/torbrowser.log" ++TBB_DATA=3D"${TBB_HOME}/Data" ++TBB_PROFILE=3D"${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=3D$(dirname $(realpath "$0")) ++TBB_STORE_DATA=3D"${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC=3D"${TBB_DATA}/Tor/torrc-defaults" ++ + complain_dialog_title=3D"Tor Browser" +=20 + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -134,8 +142,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" =3D=3D "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser= =2Elog\n" +- logfile=3D"../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.= log\n" ++ logfile=3D"${TBB_LOGFILE}" + elif [ "${2:0:1}" =3D=3D "/" -o "${2:0:1}" =3D=3D "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile=3D"$2" +@@ -187,41 +195,22 @@ + export XAUTHORITY + fi +=20 +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname=3D"$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name=3D"`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname=3D"$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname=3D"`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this oper= ating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files ar= e on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TO= RRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit e= xec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi +=20 +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir=3D"`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,16 +225,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi +=20 +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from = the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=3D.*,Name=3DTor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=3D.*,Icon=3D$PWD/browser/chrome/icons/default/default1= 28.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=3D.*,Exec=3Dsh -c '\"$PWD/start-tor-browser\" --detach= || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Brow= ser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- + if [ "$register_desktop_app" -eq 1 ]; then + mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" ++ cp "${TBB_STORE_PATH}/start-tor-browser.desktop" "$HOME/.local/share/app= lications/" + update-desktop-database "$HOME/.local/share/applications/" + printf "Tor Browser has been registered as a desktop app for this user i= n ~/.local/share/applications/\n" + exit 0 +@@ -265,21 +247,6 @@ + HOME=3D"${PWD}" + export HOME +=20 +-SYSARCHITECTURE=3D$(getconf LONG_BIT) +-TORARCHITECTURE=3D$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit= :]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'l= l get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS=3D"detect_leaks=3D0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=3D$1 +=20 +@@ -342,13 +309,15 @@ + # your password in the following line where the word =E2=80=9Csecret=E2= =80=9D is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:=3D'"secret"'} +=20 +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH=3D"${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE=3D"fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=3Dmemory +=20 ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE=3D"${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" +=20 + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +326,23 @@ +=20 + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfil= e" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </d= ev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </de= v/null | \ ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfi= le" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </= dev/null + fi +=20 + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index b1e417f29c..5f88a0968e 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -32,26 +32,64 @@ #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gnuzilla) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) + #:use-module (gnu packages readline) + #:use-module (gnu packages rsync) ; for httpse + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages version-control) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages w3m) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) ; for httpse + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) =20 (define-public tor (package @@ -398,3 +436,654 @@ incorporates ideas and concepts from Philipp Winter's= ScrambleSuit protocol. The obfs naming was chosen primarily because it was shorter, in terms of protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") (license license:gpl3+))) + +;; Upstream does not seem to keep tor-browser and tor-browser-build versio= ns +;; in sync +(define %torbrowser-version "78.3.0esr-10.0-2") +(define %torbrowser-build-version "10.0") +(define %torbrowser-build "build2") +(define %tbb-build "build3") +(define %torbrowser-build-id "20201001000000");must be of the form YYYYMMD= Dhhmmss + +;; Fonts for Tor Browser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on Tor Browser release tarball. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + (version %torbrowser-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "1l2rfknffnh6hsi16dzps1wav5s723vyk57fzv9y5vjmbcbf7l2l")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (fonts (string-append %output "/share/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p fonts) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" fonts "--strip-components=3D3" + (string-append "--use-compress-program=3D" xz= "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "Tor Browser bundled fonts") + (description "Free fonts bundled with Tor Browser. Includes a subset = of Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define tor-browser-build + (let ((commit (string-append "tbb-" %torbrowser-build-version + "-" %tbb-build))) + (package + (name "tor-browser-build") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-build= =2Egit") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14wawaf555dvr3dznphyz4sd3r8q53klhrcb8igiadmdx8wqc33m")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying build scripts ...~%") + (copy-recursively (string-append + (assoc-ref %build-inputs "source") + "/projects/tor-browser") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser build scripts") + (description "Tor Browser runtime scripts.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define tor-launcher + (package + (name "tor-launcher") + (version "0.2.25") + (source + (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + %torbrowser-build-version "/src-" name "-" + version ".tar.xz")) + (sha256 + (base32 + "1d7137ffx5vgycnk1fb6n5fc8ppndcygyx0jvylbd9bmrs2426rv")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p %output) + (format #t "Extracting source ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" %output "--strip-components=3D1" + (string-append "--use-compress-program=3D" xz= "/bin/xz")))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in controler extension") + (description "Browser extension that starts the tor process (which +connects the browser and other applications to the Tor Network), and +which helps people configure and use @code{tor}. The first window that +you see when you start Tor Browser is displayed by this extension.") + (license (license:non-copyleft "file://src/LICENSE")))) + +(define https-everywhere-lib-wasm + (let ((commit "af199004083ce200f285735f68a5a57c47eed0e6")) + (package + (name "https-everywhere-lib-wasm") + (version "2020.08.13") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/EFForg/https-everywhere-lib-wasm") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14xv637hf9kzdyr2w0cvx0g5if9nrzflf29p1spdl228yqlv9d5r")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://github.com/EFForg/https-everywhere-lib-wasm") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, click= jack and +makes possible for the users to block or choose on a per site basis which = remote +javascript to run while browsing the web.") + (license license:gpl2+)))) + +(define-public https-everywhere + (package + (name "https-everywhere") + (version "2020.8.13") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/" name "/archive/" + version ".tar.gz")) + (sha256 + (base32 + "0xb8q7izlyq80zzvj2j7wqp3srxxmi0wgwrb47lc5w38r7yzqjjd")))) + (build-system trivial-build-system) + (native-inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("findutils" ,findutils) + ("git" ,git) + ("grep" ,grep) + ("gzip" ,gzip) + ("https-everywhere-lib-wasm" + ,https-everywhere-lib-wasm) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("openssl" ,openssl) + ("python" ,python) + ("rsync" ,rsync) + ("sed" ,sed) + ("tar" ,tar) + ("util-linux" ,util-linux) ; for getopt + ("xxd" ,xxd) + ("which" ,which) + ("zip" ,zip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (httpse-libwasm (assoc-ref %build-inputs + "https-everywhere-lib-= wasm")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (python (assoc-ref %build-inputs "python")) + (openssl (assoc-ref %build-inputs "openssl")) + (git (assoc-ref %build-inputs "git")) + (grep (assoc-ref %build-inputs "grep")) + (findutils (assoc-ref %build-inputs "findutils")) + (sed (assoc-ref %build-inputs "sed")) + (which (assoc-ref %build-inputs "which")) + (rsync (assoc-ref %build-inputs "rsync")) + (libxml2 (assoc-ref %build-inputs "libxml2")) + (libxslt (assoc-ref %build-inputs "libxslt")) + (util-linux (assoc-ref %build-inputs "util-linux"= )) + (xxd (assoc-ref %build-inputs "xxd")) + (zip (assoc-ref %build-inputs "zip")) + (tar (assoc-ref %build-inputs "tar")) + (gzip (assoc-ref %build-inputs "gzip"))) + (setenv "SHELL" (string-append bash "/bin/bash")) + (set-path-environment-variable + "PATH" '("bin") + (list bash sed findutils which git python tar openss= l rsync + libxml2 libxslt util-linux grep xxd gzip zip c= oreutils)) + (set-path-environment-variable + "LIBRARY_PATH" '("lib") + (list bash sed findutils which git python tar openss= l rsync + libxml2 libxslt util-linux grep xxd gzip zip c= oreutils)) + (format #t "Untaring source tarball ...~%") + (invoke "tar" "-xf" src "--strip-components=3D1") + ;; Python3.6 is hardcoded on these scripts. Using v3.= 8 appears to + ;; be harmless. + (substitute* '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/rules/src/https_everywhere_check= er/check_rules.py" + "test/script.py" + "test/validations.sh" + "test/validations/filename/run.py" + "test/validations/relaxng/run.py" + "test/validations/securecookie/run.py" + "test/validations/special/run.py" + "utils/create_zip.py" + "utils/chromium-translations.py" + "utils/create-platform-certs/split_com= bined_cert_file.py" + "utils/mk-client-whitelist/dbconnect.p= y" + "utils/mk-client-whitelist/run.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + (make-file-writable "lib-wasm") + (copy-recursively httpse-libwasm + "lib-wasm" + #:log (%make-void-port "w")) + ;; Remove precompiled binaries from source. This brea= ks + ;; http-everywhere at runtime, but building is succes= sful. + ;; Once lib-wasm is successfuly cross-compiled to was= m, + ;; remove this. + (with-directory-excursion "lib-wasm/pkg" + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\= n")))) + '("https_everywhere_lib_wasm.js" + "https_everywhere_lib_wasm_bg.wasm"))) + (for-each patch-shebang + (find-files "." + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat= ))) + #:stat lstat)) + ;; Failing to generate the xpi, but copy-dir appears = to be enough. + ;; Failing on missing 'wasm'? Not generating rulesets. + (invoke "./make.sh") + (copy-recursively "pkg/xpi-eff" %output + #:log (%make-void-port "w")) + #t)))) + (home-page "https://www.eff.org/https-everywhere") + (synopsis "Browser extension for automatic HTTPS usage") + (description "Browser extension that automatically makes the browser t= o use +HTTPS instead of plain HTTP when the remote destination makes it available= to users.") + (license license:gpl2+))) + +(define noscript + (package + (name "noscript") + (version "11.0.46") + (source + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/relea= ses/" + name "-" version ".xpi")) + (sha256 + (base32 + "1gbhzc4jldsc11fxpjkvlvixdlpmqz774vhni08lmszyqbjzim0s")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (format #t "Copying source ...~%") + (copy-file (assoc-ref %build-inputs "source") + %output)))) + (home-page "https://noscript.net") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, click= jack and +makes possible for the users to block or choose on a per site basis which = remote +javascript to run while browsing the web.") + (license license:gpl2+))) + +;; (Un)fortunatly Tor Browser has it's own reproducible build system - RBM= - which +;; automates the build process for them and compiles Tor Browser from a ra= nge of +;; repositories and produces a range of tarballs for different architectur= es and +;; locales. So we need to cherry-pick what is needed for guix and produce = our own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.g= it/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. Se= e also +;; the Hacking on Tor Browser document for a high level introduction at +;; https://trac.torproject.org/projects/tor/wiki/doc/Tor Browser/Hacking). +;; +;; TODO: Import langpacks. +(define-public torbrowser-unbundle + (package + (inherit icecat) + (name "torbrowser-unbundle") + (version %torbrowser-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + %torbrowser-build-version + "/src-firefox-tor-browser-" + %torbrowser-version "-" %torbrowser-build + ".tar.xz")) + (sha256 + (base32 + "0w4p53rnswdrknxaprzqg0w4mhpvagdhj3ksh5l0alv8w4cfjd4c")))) + (build-system gnu-build-system) + (inputs + `(("obfs4" ,obfs4) + ("nspr" ,nspr) + ("nss" ,nss-3.57) + ("tor" ,tor-client) + ,@(package-inputs icecat))) + (native-inputs + `(("https-everywhere" ,https-everywhere) + ("noscript" ,noscript) + ("tor-browser-build" ,tor-browser-build) + ("tor-launcher" ,tor-launcher) + ("torbrowser-fonts" ,torbrowser-fonts) + ("torbrowser-start-script.patch" + ,(search-patch "torbrowser-start-script.patch")) + ("torbrowser-start-desktop.patch" + ,(search-patch "torbrowser-start-desktop.patch")) + ,@(package-native-inputs icecat))) + (properties '()) + (arguments + (substitute-keyword-arguments (package-arguments icecat) + ((#:phases phases) + `(modify-phases ,phases + ;; On mach build system this is done on configure. + (delete 'bootstrap) + ;; Doesn't seem to be needed for TorBrowser + (delete 'fix-ffmpeg-runtime-linker) + ;; Tried to make use of these using let, but inheritance appear= s to block it. + (delete 'install-icons) + (delete 'install-desktop-entry) + (add-after 'unpack 'make-bundle + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((tor-launcher (assoc-ref inputs "tor-launcher")) + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb (assoc-ref inputs "tor-browser-build")) + (tbb-scripts-dir "tbb-scripts")) + (format #t "Copying tor-launcher ...~%") + (copy-recursively tor-launcher tor-launcher-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-browser-build ...~%") + (mkdir tbb-scripts-dir) + (copy-recursively tbb tbb-scripts-dir + #:log (%make-void-port "w"))) + #t)) + (replace 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs in= puts) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + ;; Only difference to icecat is browser name. + (when (and (string-prefix? "torbrowser-" lab= el) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mi= smatch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + (add-after 'apply-guix-specific-patches 'merge-bridge-preferenc= es + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (begin + (let ((tbb-prefs (open-file + "browser/app/profile/000-tor-browser.js= " "a")) + (bridge-prefs + (open-input-file + "tbb-scripts/Bundle-Data/PTConfigs/bridge_prefs.j= s"))) + (display (get-string-all bridge-prefs) tbb-prefs) + (close-output-port tbb-prefs))) + #t)) + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-= keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags))) + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append (assoc-ref inputs "python= -2") + "/bin/python")) + (setenv "CC" "gcc") ; needed when Stylo is enabled + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid t= imestamp. + (setenv "LDFLAGS" (string-append "-Wl,-rpath=3D" + (assoc-ref outputs "out") + "/lib")) + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=3D@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=3Ddev-buil= d") + (string-append + "ac_add_options --with-tor-browser-version=3Dorg.gnu\= n" + "ac_add_options --with-unsigned-addon-scopes=3Dapp,sy= stem\n" + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\n" + "ac_add_options --disable-updater\n" + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + "ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + "ac_add_options --with-system-libevent\n" + "ac_add_options --with-system-nspr\n" + "ac_add_options --with-system-nss\n" + "ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=3D" + (assoc-ref %build-inputs "clang") "/bin/clang\n" + "ac_add_options --with-libclang-path=3D" + (assoc-ref %build-inputs "clang") "/lib\n"))) + (substitute* "browser/app/profile/000-tor-browser.js" + ;; Tor Browser updates are disabled on mozconfig, but l= et's make sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\= ").*" _ m) + (string-append m ",false);\n")) + ;; Snowflake is not built on gnu targets. + (("pref\\(\"extensions.torlauncher.default_bridge.snowf= lake.1\".*") + "\n")) + (substitute* + "browser/extensions/tor-launcher/src/defaults/prefere= nces/torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Current= ly disabled on + ;; tor-launcher, but let's make sure while missing lang= packs. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\"= ).*" _ m) + (string-append m ", false);\n"))) + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ = m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + (add-after 'configure 'install-desk-icons + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion "browser/branding/official" + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicol= or/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.= png")))) + '("default16.png" "default22.png" "default24.png" + "default32.png" "default48.png" "default64.png" + "default128.png" "default256.png" "default512.png")) + #t)))) + (replace 'build + (lambda _ (invoke "./mach" "build") + #t)) + (replace 'neutralise-store-references + (lambda _ + ;; difference from icecat "objdir" preffix. We could use fi= nd-files there. + (substitute* + "objdir/dist/bin/chrome/toolkit/content/global/buildcon= fig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ store hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime dependency -->" + (string-drop hash 8)))) + #t)) + ;; Tor Browser just do a stage-package here and copy files to i= ts places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs + configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/application= s")) + (build "objdir/dist/firefox") + (bin (string-append out "/bin")) + (lib (string-append out "/lib")) + (start-script "tbb-scripts/RelativeLink/start-tor-br= owser") + (desktop-file "tbb-scripts/RelativeLink/start-tor-br= owser.desktop")) + (invoke "./mach" "build" "stage-package") + ;; Tor Browser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (format #t "Deleting spurious files ...~%") + (with-directory-excursion build + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n"))= )) + '("firefox-bin" "fonts/TwemojiMozilla.ttf"))) + (rmdir (string-append build "/fonts")) + (format #t "Creating install dirs ...~%") + (mkdir-p applications) + (mkdir-p lib) + (mkdir bin) + (format #t "Copying files to install dirs ...~%") + (copy-recursively build (string-append lib "/") + #:log (%make-void-port "w")) + (copy-file start-script + (string-append lib "/start-tor-browser")) + (copy-file desktop-file + (string-append lib "/start-tor-browser.desktop= ")) + (chmod (string-append lib "/start-tor-browser") #o555) + (chmod (string-append lib "/start-tor-browser.desktop") #= o555) + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append lib "/start-tor-browser") + (string-append bin "/start-tor-browser")) + (format #t "Installing desktop file ...~%") + (install-file desktop-file applications)) + #t)) + + (add-after 'install 'install-fonts + (lambda* (#:key inputs native-inputs outputs #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/")) + (fonts (string-append (or (assoc-ref native-inputs + "torbrowser-fo= nts") + (assoc-ref inputs + "torbrowser-fo= nts")) + "/share"))) + (copy-recursively fonts lib + #:log (%make-void-port "w")) + (symlink (string-append lib "/fonts") + (string-append out "/share/fonts"))) + #t)) + (add-after 'install-fonts 'install-extensions + (lambda* (#:key inputs native-inputs outputs #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (ext (string-append lib "/browser/extensions")) + (torb-ext (string-append lib + "/chrome/torbutton/content/= extensions")) + (httpse-id "https-everywhere") + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}= ") + (httpse (assoc-ref inputs "https-everywhere")) + (noscript (assoc-ref inputs "noscript"))) + (mkdir-p ext) + (mkdir-p torb-ext) + (copy-file noscript (string-append + ext "/" noscript-id ".xpi")) + (copy-recursively httpse + (string-append torb-ext "/" httpse-id) + #:log (%make-void-port "w")) + (chmod (string-append ext "/" noscript-id ".xpi") #o555) + ;; Make httpse available as a builtin extension. + (with-directory-excursion lib + (make-file-writable "omni.ja") + (for-each (lambda (file) + (invoke "zip" "-X" "omni.ja" file)) + (find-files "chrome" ".*")))) + #t)) + (add-after 'install-extensions 'link-binaries + (lambda* (#:key inputs native-inputs outputs #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (tordir (string-append out "/lib/TorBrowser/Tor")) + (ptdir (string-append tordir "/PluggableTransports")) + (obfs4 (string-append (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (tor (string-append (assoc-ref inputs "tor") + "/bin/tor"))) + (mkdir-p ptdir) + (symlink tor (string-append tordir "/tor")) + (symlink obfs4 (string-append ptdir "/obfs4proxy"))) + #t)) + (add-after 'link-binaries 'copy-bundle-data + (lambda* (#:key inputs native-inputs outputs #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (tbb "tbb-scripts") + (ptconf (string-append tbb "/Bundle-Data/PTConfigs")) + (docs (string-append lib "/TorBrowser/Docs")) + (data (string-append lib "/TorBrowser/Data"))) + (mkdir-p data) + (mkdir docs) + (with-directory-excursion + (string-append tbb "/Bundle-Data/linux/Data") + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" f= ile) + #:log (%make-void-port "w= "))) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconf "/linux/torrc-defaults-a= ppendix") + (string-append data "/Tor/torrc-defaults-appen= dix")) + (copy-recursively (string-append tbb "/Bundle-Data/Docs") + (string-append docs "/") + #:log (%make-void-port "w"))) + #t)) + ;; This fixes the file chooser crash that happens with GTK 3 + (replace 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (gtk (assoc-ref inputs "gtk+")) + (gtk-share (string-append gtk "/share")) + (mesa (assoc-ref inputs "mesa")) + (mesa-lib (string-append mesa "/lib")) + (pulseaudio (assoc-ref inputs "pulseaudio")) + (pulseaudio-lib (string-append pulseaudio "/lib")) + (libxscrnsaver (assoc-ref inputs "libxscrnsaver")) + (libxscrnsaver-lib (string-append libxscrnsaver "/li= b"))) + ;; Only difference to icecat is browser name. + (wrap-program (car (find-files lib "^firefox$")) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib ,mesa-lib + ,libxscrnsa= ver-lib)))) + #t)))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "Tor Browser is the Tor Project version of Firefox browser. It is th= e only +recommended way to anonymously browse the web that is supported by the pro= ject. +It modifies Firefox in order to avoid many know application level attacks = on +the privacy of Tor users. + +WARNING: This is not the official Tor Browser and is currently on testing.= Use +at your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0))) ;and others, see toolkit/content/license.ht= ml --=20 2.28.0 --ZPt4rx8FFjLCG7dd-- --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl995BgFgwPCZwAACgkQ YrJ+WmBEwoIPjg/+MTXmNKaGr7v6ic5Srea6X7irui9QqX/cNA6M6d4CoO0uCfFf /9oMoVBGTpCSXVo4YtX2Imrha3WR+aXw1qoA6bZzsnncTbbL0IKlMVStrFJIRcaT jDogvlVqoES31d0wWWSnCf3V8iZ+u9HkOVCxbNtt6KFR1defU57/TrkEaVDksdwZ 2EMNRZIRl7yWTF2MCuJf9QqwwalJBHmEB9G/72xgitCT68CEus24EIaBQcBAfyYV eR9JsTTEAsHHznN+oq1OXKIAqApYXOPaDJ6qb+OnpIl9I3BmriujczKmXQjqk43F RBqBCEwEiyNOSarLYz6WDb3xVw+VCm9sum+YC4J43xRcK1LVO+EePDbRc4XbM7gR llVgNSZ8fpM9lQ9EYZITFUe+Rvp6h+zC4y0TahRFbuk3QQxX+SSS7N7xQGFjaZ7r ubLyp7+7cijQHf87hp65Cf6SxgLQJDJ5Zj1vASMf51omzSLZ1/LEhdM0tfnzUiXN YIF7gVjRph3IfJf8+nZGeyIY/iaoNTzOeEys3LB7d+kyYqBsu9Bas28/SScOkylz Bx2JraGnaU9CJRWwYmtpGThp/3vkjAfU8yqFwGs4P8fZRmVIJSlto5/2MPADIZfE Vf9GmCjZU36t5hRPAazGYoWHWSVWIn0mAKWSqRVlDxVpJXfxvTouFPymRQE= =ZV9i -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 24 Sep 2020 23:18:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 24 19:18:41 2020 Received: from localhost ([127.0.0.1]:42005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kLaVW-0000Ps-Kv for submit <at> debbugs.gnu.org; Thu, 24 Sep 2020 19:18:41 -0400 Received: from mx1.riseup.net ([198.252.153.129]:33396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kLaVP-0000PQ-Jc for 42380 <at> debbugs.gnu.org; Thu, 24 Sep 2020 19:18:31 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4By9vk4BzZzFdjr for <42380 <at> debbugs.gnu.org>; Thu, 24 Sep 2020 16:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600989506; bh=fsFfaKKpiuOBXeEFyCB83WhJqAia0KnOl7HEWU0wBF4=; h=Date:From:To:Subject:References:In-Reply-To:From; b=YMFrr6wjYkRoxElMYoqDuNpOo866gTnsE0JLh2vOU/6hZt9JTbUU/QBmx4TLEOdND 7dvX8UGAFDKjZSP7LnsdE5ZPRGzyANON2Yft/MX+LFTYGjDnMBZojpbxFPWJXMkQv8 68II9hFI+6a/goNNrDm/zabr4s+oEpaoKlSifqkY= X-Riseup-User-ID: 2325281948781B9FFD5CCEECDDFFF119C49AED525822A1DF0143085CBB23FB8B Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4By9vd6Vk3zJqk0 for <42380 <at> debbugs.gnu.org>; Thu, 24 Sep 2020 16:18:21 -0700 (PDT) Date: Thu, 24 Sep 2020 20:18:14 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCHv2 9/9] gnu: Add torbrowser-unbundle Message-ID: <20200924231814.GA29727@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> <20200915151614.GI13296@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1UWUbFP1cBYEclgG" Content-Disposition: inline In-Reply-To: <20200915151614.GI13296@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --1UWUbFP1cBYEclgG Content-Type: multipart/mixed; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, This patch updates Tor Browser to version 10.0. I've done some minor testing and everything seems to working. One thing that will need attention in the future is the cleaning of the profile dir, as the upgrade process does not touch it and so older configs and extensions remain on user profile. Main changes from the previous version are: - added a new phase to merge pluggable transports preferences into default tor-browser preferences before configuring the build instead of applying them on user preferences at runtime. - https-everywhere is now a builtin extension and requires further steps to be available at the right place. - defined %tbb-build in order to further differentiate tor-browser and tor-browser-build version tags. --/04w6evG8XlLl3ft Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename="0001-gnu-Add-torbrowser-unbundle.patch" Content-Transfer-Encoding: quoted-printable =46rom f0e529147d7481c48395c741022e5ef8b3bc1c9b Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Thu, 24 Sep 2020 19:59:26 -0300 Subject: [PATCH] gnu: Add torbrowser-unbundle To: 42380 <at> debbugs.gnu.org * gnu/packages/tor.scm (torbrowser-unbundle): New variable. * gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch: New file. * gnu/packages/patches/torbrowser-start-tor-browser.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 3 + ...torbrowser-start-tor-browser.desktop.patch | 22 + .../torbrowser-start-tor-browser.patch | 183 ++++ gnu/packages/tor.scm | 866 +++++++++++++++++- 4 files changed, 1073 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.deskt= op.patch create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.patch diff --git a/gnu/local.mk b/gnu/local.mk index f3b5b17e84..9331af8ce6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -37,6 +37,7 @@ # Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN> # Copyright =C2=A9 2020 Tanguy Le Carrour <tanguy@HIDDEN> # Copyright =C2=A9 2020 Martin Becze <mjbecze@HIDDEN> +# Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1623,6 +1624,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/tipp10-fix-compiling.patch \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tk-find-library.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.desktop.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patc= h b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch new file mode 100644 index 0000000000..336115b33a --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop.orign 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop 2020-07-25 02:54:44.603431160 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the sh= ell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=3DWeb Browser + Comment=3DTor Browser is +1 for privacy and =E2=88=921 for mass surveilla= nce + Categories=3DNetwork;WebBrowser;Security; +-Exec=3Dsh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ = ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/sta= rt-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=3D./Browser/start-tor-browser --detach +-Icon=3Dweb-browser ++Exec=3Dbash -c start-tor-browser ++X-TorBrowser-ExecShell=3Dstart-tor-browser --detach ++Icon=3Dtorbrowser + StartupWMClass=3DTor Browser diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.patch b/gnu/= packages/patches/torbrowser-start-tor-browser.patch new file mode 100644 index 0000000000..a8403b09fa --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.patch @@ -0,0 +1,183 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Eorig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= 2020-08-01 20:22:08.901737325 -0300 +@@ -5,6 +5,15 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. +=20 ++TBB_HOME=3D"${HOME}/.local/share/torbrowser" ++TBB_LOGFILE=3D"${TBB_HOME}/torbrowser.log" ++TBB_DATA=3D"${TBB_HOME}/Data" ++TBB_PROFILE=3D"${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=3D$(dirname $(realpath "$0")) ++TBB_STORE_DATA=3D"${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC=3D"${TBB_DATA}/Tor/torrc-defaults" ++##PT_PREFS=3D"${TBB_DATA}/Browser/bridge-prefs-js-appendix" ++ + complain_dialog_title=3D"Tor Browser" +=20 + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -134,8 +143,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" =3D=3D "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser= =2Elog\n" +- logfile=3D"../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.= log\n" ++ logfile=3D"${TBB_LOGFILE}" + elif [ "${2:0:1}" =3D=3D "/" -o "${2:0:1}" =3D=3D "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile=3D"$2" +@@ -187,41 +196,23 @@ + export XAUTHORITY + fi +=20 +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname=3D"$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name=3D"`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname=3D"$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname=3D"`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this oper= ating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files ar= e on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TO= RRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++## grep -v 'default_bridge\.snowflake' "${PT_PREFS}" >> "${TBB_PROFILE}= /user.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit e= xec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi +=20 +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir=3D"`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,16 +227,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi +=20 +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from = the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=3D.*,Name=3DTor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=3D.*,Icon=3D$PWD/browser/chrome/icons/default/default1= 28.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=3D.*,Exec=3Dsh -c '\"$PWD/start-tor-browser\" --detach= || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Brow= ser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- + if [ "$register_desktop_app" -eq 1 ]; then + mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" ++ cp "${TBB_STORE_PATH}/start-tor-browser.desktop" "$HOME/.local/share/app= lications/" + update-desktop-database "$HOME/.local/share/applications/" + printf "Tor Browser has been registered as a desktop app for this user i= n ~/.local/share/applications/\n" + exit 0 +@@ -265,21 +249,6 @@ + HOME=3D"${PWD}" + export HOME +=20 +-SYSARCHITECTURE=3D$(getconf LONG_BIT) +-TORARCHITECTURE=3D$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit= :]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'l= l get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS=3D"detect_leaks=3D0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=3D$1 +=20 +@@ -342,13 +311,15 @@ + # your password in the following line where the word =E2=80=9Csecret=E2= =80=9D is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:=3D'"secret"'} +=20 +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH=3D"${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE=3D"fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=3Dmemory +=20 ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE=3D"${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" +=20 + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +328,23 @@ +=20 + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfil= e" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </d= ev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </de= v/null | \ ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfi= le" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </= dev/null + fi +=20 + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index b1e417f29c..13ee611385 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -32,26 +32,63 @@ #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) + #:use-module (gnu packages readline) + #:use-module (gnu packages rsync) ; for httpse + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages version-control) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages w3m) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) ; for httpse + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) =20 (define-public tor (package @@ -398,3 +435,830 @@ incorporates ideas and concepts from Philipp Winter's= ScrambleSuit protocol. The obfs naming was chosen primarily because it was shorter, in terms of protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") (license license:gpl3+))) + +;; Upstream does not seem to keep tor-browser and tor-browser-build versio= ns +;; in sync +(define %torbrowser-version "78.3.0esr-10.0-2") +(define %torbrowser-build-version "10.0") +(define %torbrowser-build "build2") +(define %tbb-build "build3") +(define %torbrowser-build-id "20200820000000");must be of the form YYYYMMD= Dhhmmss + +;; Fonts for Tor Browser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on Tor Browser release tarball. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + ; Tor Browser fonts did not change since last release and were not avai= lable + ; when this version was built, the previous version were kept. + ; (version %torbrowser-build-version) + (version "9.5.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "1kqvr0sag94xdkq85k426qq1hz2b52m315yz51w6hvc87d8332b4")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (fonts (string-append %output "/share/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p fonts) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" fonts "--strip-components=3D3" + (string-append "--use-compress-program=3D" xz = "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "Tor Browser bundled fonts") + (description "Free fonts bundled with Tor Browser. Includes a subset o= f Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define tor-browser-build + (let ((commit (string-append "tbb-" %torbrowser-build-version + "-" %tbb-build))) + (package + (name "tor-browser-build") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-build.g= it") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14wawaf555dvr3dznphyz4sd3r8q53klhrcb8igiadmdx8wqc33m")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying build scripts ...~%") + (copy-recursively (string-append + (assoc-ref %build-inputs "source") + "/projects/tor-browser") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser build scripts") + (description "Tor Browser runtime scripts.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define torbutton + (let ((commit "4e67ee2ef26e28da0f02a0e43e22a61ee33c6d4d")) + (package + (name "torbutton") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/torbutton.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0md7lsspmji8wj1gx1mfy1wiqa28hjy3w1vdn5df1mv7g846jbbb")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in extension") + (description "Browser extension needed to build and run Tor Browser.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define tor-launcher + (package + (name "tor-launcher") + (version "0.2.25") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-launcher.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "02vqwqhmwp9kr58qqjll5m4i8fqjqis7hr7zcbgb1ndgmfk2b8gr")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in controler extension") + (description "Browser extension that starts the tor process (which +connects the browser and other applications to the Tor Network), and +which helps people configure and use @code{tor}. The first window that +you see when you start Tor Browser is displayed by this extension.") + (license (license:non-copyleft "file://src/LICENSE")))) + +;; This package is actually a cargo crate, so it should be moved to +;; crates-io.scm and made public once the cross building to wasm32 is +;; successful. +(define https-everywhere-lib-wasm + (let ((commit "af199004083ce200f285735f68a5a57c47eed0e6")) + (package + (name "https-everywhere-lib-wasm") + (version "2020.08.13") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/EFForg/https-everywhere-lib-wasm") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14xv637hf9kzdyr2w0cvx0g5if9nrzflf29p1spdl228yqlv9d5r")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://github.com/EFForg/https-everywhere-lib-wasm") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, click= jack and +makes possible for the users to block or choose on a per site basis which = remote +javascript to run while browsing the web.") + (license license:gpl2+)))) + +;; This should probably go elsewhere on the file system and made +;; public in order to be shared between Tor Browser and IceCat once +;; lib-wasm gets fixed. +(define-public https-everywhere + (package + (name "https-everywhere") + (version "2020.8.13") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/" name "/archive/" + version ".tar.gz")) + (sha256 + (base32 + "0xb8q7izlyq80zzvj2j7wqp3srxxmi0wgwrb47lc5w38r7yzqjjd")))) + (build-system trivial-build-system) + (native-inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("findutils" ,findutils) + ("git" ,git) + ("grep" ,grep) + ("gzip" ,gzip) + ("https-everywhere-lib-wasm" + ,https-everywhere-lib-wasm) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("openssl" ,openssl) + ("python" ,python) + ("rsync" ,rsync) + ("sed" ,sed) + ("tar" ,tar) + ("util-linux" ,util-linux) ; for getopt + ("xxd" ,xxd) + ("which" ,which) + ("zip" ,zip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (httpse-libwasm (assoc-ref %build-inputs "https-ev= erywhere-lib-wasm")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (python (assoc-ref %build-inputs "python")) + (openssl (assoc-ref %build-inputs "openssl")) + (git (assoc-ref %build-inputs "git")) + (grep (assoc-ref %build-inputs "grep")) + (findutils (assoc-ref %build-inputs "findutils")) + (sed (assoc-ref %build-inputs "sed")) + (which (assoc-ref %build-inputs "which")) + (rsync (assoc-ref %build-inputs "rsync")) + (libxml2 (assoc-ref %build-inputs "libxml2")) + (libxslt (assoc-ref %build-inputs "libxslt")) + (util-linux (assoc-ref %build-inputs "util-linux")) + (xxd (assoc-ref %build-inputs "xxd")) + (zip (assoc-ref %build-inputs "zip")) + (tar (assoc-ref %build-inputs "tar")) + (gzip (assoc-ref %build-inputs "gzip"))) + (setenv "SHELL" (string-append bash "/bin/bash")) + (set-path-environment-variable + "PATH" '("bin") + (list bash sed findutils which git python tar openssl= rsync libxml2 libxslt + util-linux grep xxd gzip zip coreutils)) + (set-path-environment-variable + "LIBRARY_PATH" '("lib") + (list bash sed findutils which git python tar openssl= rsync libxml2 libxslt + util-linux grep xxd gzip zip coreutils)) + (format #t "Untaring source tarball ...~%") + (invoke "tar" "-xf" src "--strip-components=3D1") + ;; Python3.6 is hardcoded on these scripts. Using v3.8= appears to + ;; be harmless. + (substitute* '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/rules/src/https_everywhere_checke= r/check_rules.py" + "test/script.py" + "test/validations.sh" + "test/validations/filename/run.py" + "test/validations/relaxng/run.py" + "test/validations/securecookie/run.py" + "test/validations/special/run.py" + "utils/create_zip.py" + "utils/chromium-translations.py" + "utils/create-platform-certs/split_comb= ined_cert_file.py" + "utils/mk-client-whitelist/dbconnect.py" + "utils/mk-client-whitelist/run.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + (make-file-writable "lib-wasm") + (copy-recursively httpse-libwasm + "lib-wasm" + #:log (%make-void-port "w")) + ;; Remove precompiled binaries from source. This breaks + ;; http-everywhere at runtime, but building is success= ful. + ;; Once lib-wasm is successfuly cross-compiled to wasm, + ;; remove this. + (with-directory-excursion "lib-wasm/pkg" + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("https_everywhere_lib_wasm.js" + "https_everywhere_lib_wasm_bg.wasm"))) + (for-each patch-shebang + (find-files "." + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat)= )) + #:stat lstat)) + ;; Failing to generate the xpi, but copy-dir appears t= o be enough. + ;; Failing on missing 'wasm'? Not generating rulesets. + (invoke "./make.sh") + (copy-recursively "pkg/xpi-eff" %output + #:log (%make-void-port "w")) + #t)))) + (home-page "https://www.eff.org/https-everywhere") + (synopsis "Browser extension for automatic HTTPS usage") + (description "Browser extension that automatically makes the browser to= use +HTTPS instead of plain HTTP when the remote destination makes it available= to users.") + (license license:gpl2+))) + +;; Currently there seems to be no binaries on this package, but in +;; order to avoid the possibility of one getting silently added, +;; this needs reworking to make it build from source. +(define noscript + (package + (name "noscript") + (version "11.0.46") + (source + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/release= s/" + name "-" version ".xpi")) + (sha256 + (base32 + "1gbhzc4jldsc11fxpjkvlvixdlpmqz774vhni08lmszyqbjzim0s")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (format #t "Copying source ...~%") + (copy-file (assoc-ref %build-inputs "source") + %output)))) + (home-page "https://noscript.net") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, click= jack and +makes possible for the users to block or choose on a per site basis which = remote +javascript to run while browsing the web.") + (license license:gpl2+))) + +;; (Un)fortunatly Tor Browser has it's own reproducible build system - RBM= - which +;; automates the build process for them and compiles Tor Browser from a ra= nge of +;; repositories and produces a range of tarballs for different architectur= es and +;; locales. So we need to cherry-pick what is needed for guix and produce = our own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.g= it/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. Se= e also +;; the Hacking on Tor Browser document for a high level introduction at +;; https://trac.torproject.org/projects/tor/wiki/doc/Tor Browser/Hacking). +;; +;; TODO: Import langpacks. +(define-public torbrowser-unbundle + (let ((commit (string-append "tor-browser-" %torbrowser-version + "-" %torbrowser-build))) + (package + (name "torbrowser-unbundle") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-browser.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17fa3p6rpqirdm8arb7j73sl54rhw89ssn6pyg6v7kl6hpp7v0wc")))) + (build-system gnu-build-system) + (inputs + `(("alsa-lib" ,alsa-lib) + ("bzip2" ,bzip2) + ("cups" ,cups) + ("dbus-glib" ,dbus-glib) + ("ffmpeg" ,ffmpeg) + ("freetype" ,freetype) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("gtk+-2" ,gtk+-2) + ;("graphite2" ,graphite2) + ;("harfbuzz" ,harfbuzz) + ;("icu4c" ,icu4c-67) + ("libcanberra" ,libcanberra) + ("libgnome" ,libgnome) + ("libjpeg-turbo" ,libjpeg-turbo) + ;("libogg" ,libogg) + ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released + ;("libvorbis" ,libvorbis) + ("libxft" ,libxft) + ("libevent" ,libevent) + ("libxinerama" ,libxinerama) + ("libxscrnsaver" ,libxscrnsaver) + ("libxcomposite" ,libxcomposite) + ("libxt" ,libxt) + ("libffi" ,libffi) + ;("libvpx" ,libvpx) + ("mesa" ,mesa) + ("mit-krb5" ,mit-krb5) + ;; See <https://bugs.gnu.org/32833> + ;; and related comments in the 'remove-bundled-libraries' phase. + ;; UNBUNDLE-ME! ("nspr" ,nspr) + ;; UNBUNDLE-ME! ("nss" ,nss) + ("obfs4" ,obfs4) + ("pango" ,pango) + ("pixman" ,pixman) + ("pulseaudio" ,pulseaudio) + ("shared-mime-info" ,shared-mime-info) + ;("sqlite" ,sqlite) + ("startup-notification" ,startup-notification) + ("tor" ,tor-client) + ("unzip" ,unzip) + ("zip" ,zip))) + (native-inputs + `(("autoconf" ,autoconf-2.13) + ("bash" ,bash) + ("cargo" ,rust-1.41 "cargo") + ("clang" ,clang) + ("https-everywhere" ,https-everywhere) + ("llvm" ,llvm) + ("patch" ,(canonical-package patch)) + ("torbrowser-start-tor-browser.patch" + ,(search-patch "torbrowser-start-tor-browser.patch")) + ("torbrowser-start-tor-browser.desktop.patch" + ,(search-patch "torbrowser-start-tor-browser.desktop.patch")) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("python2" ,python-2.7) + ("python2-pysqlite" ,python2-pysqlite) + ("nasm" ,nasm) ; XXX FIXME: only needed on x86_64 and i686 + ("node" ,node-10.22) + ("noscript" ,noscript) + ("rust" ,rust-1.41) + ("rust-cbindgen" ,rust-cbindgen-0.14) + ("tor-browser-build" ,tor-browser-build) + ("torbrowser-fonts" ,torbrowser-fonts) + ("tor-launcher" ,tor-launcher) + ("torbutton" ,torbutton) + ("which" ,which) + ("yasm" ,yasm))) + (arguments + `(#:tests? #f ; Some tests are autodone by mach on build fase. + + ;; XXX: There are RUNPATH issues such as + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.= so, + ;; which is not in its RUNPATH, but they appear to be harmless in + ;; practice somehow. See <http://hydra.gnu.org/build/378133>. + #:validate-runpath? #f + #:imported-modules ,%cargo-utils-modules ;for `generate-all-checks= ums' + #:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 regex) + (ice-9 match) + (srfi srfi-34) + (srfi srfi-35) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + (guix build utils) + (sxml simple) + ,@%gnu-build-system-modules) + + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-bundle + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((torbutton (assoc-ref inputs "torbutton")) + (torbutton-dir "toolkit/torproject/torbutton") + (tor-launcher (assoc-ref inputs "tor-launcher")) + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb (assoc-ref inputs "tor-browser-build")) + (tbb-scripts-dir "tbb-scripts")) + (format #t "Copying torbutton source to default path ...~%= ") + (make-file-writable torbutton-dir) + (copy-recursively torbutton torbutton-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-launcher ...~%") + (copy-recursively tor-launcher tor-launcher-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-browser-build ...~%") + (mkdir tbb-scripts-dir) + (copy-recursively tbb tbb-scripts-dir + #:log (%make-void-port "w")) + (make-file-writable (string-append tbb-scripts-dir + "/RelativeLink/start-tor-browser")) + (make-file-writable (string-append tbb-scripts-dir + "/RelativeLink/start-tor-browser.desk= top"))) + #t)) + + (add-after 'make-bundle 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inp= uts) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + + (add-after 'apply-guix-specific-patches 'merge-pt-prefs + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (begin + (make-file-writable "browser/app/profile/000-tor-browser.j= s") + (let ((tbb-prefs (open-file "browser/app/profile/000-tor-b= rowser.js" + "a")) + (pt-prefs (open-input-file + "tbb-scripts/Bundle-Data/PTConfigs/bridge= _prefs.js"))) + (display (get-string-all pt-prefs) tbb-prefs) + (close-output-port tbb-prefs))) + #t)) + ;; On mach build system this is done on configure. + (delete 'bootstrap) + + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649= b934ca495991b7852b855")) + (for-each (lambda (file) + (format #t "patching checksums in ~a~%" file) + (substitute* (find-files "." "Cargo.lock$") + (("^checksum =3D \".*\"") + (string-append "checksum =3D \"" null-hash "= \"")))) + (find-files "." "Cargo.lock$")) + (for-each generate-all-checksums + '("services" + "js" + "third_party/rust" + "dom/media" + "dom/webauthn" + "toolkit" + "gfx" + "storage" + "modules" + "xpcom/rust" + "media" + "mozglue/static/rust" + "netwerk" + "remote" + "intl" + "servo" + "security/manager/ssl" + "build"))) + #t)) + + (add-after 'build 'neutralize-store-references + (lambda _ + ;; Mangle the store references to compilers & other build to= ols in + ;; about:buildconfig, reducing Tor Browser's closure signifi= cant. + ;; The resulting files are saved in lib/firefox/omni.ja + (substitute* "objdir/dist/bin/chrome/toolkit/content/global/= buildconfig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ store hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime dependency -->" + (string-drop hash 8)))) + #t)) + + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-k= eys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags))) + + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append + (assoc-ref inputs "python2") + "/bin/python")) + (setenv "CC" "gcc") ; needed when Stylo is enabled + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid ti= mestamp. + (setenv "LDFLAGS" (string-append + "-Wl,-rpath=3D" + (assoc-ref outputs "out") + "/lib/firefox")) + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=3D@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=3Ddev-build= ") + (string-append "ac_add_options --with-tor-browser-versi= on=3Dorg.gnu\n" + "ac_add_options --with-unsigned-addon-sc= opes=3Dapp,system\n" + "ac_add_options --allow-addon-sideload\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\= n" + "ac_add_options --disable-updater\n" + ;; Unknown in 10.0 + ;;"ac_add_options --disable-gconf\n" + ;; Other syslibs that can be unbundled? = (nss, nspr) + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + ;; Unknown in 10.0 + ;;"ac_add_options --with-system-bz2\n" + ;"ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + ;"ac_add_options --with-system-libevent\= n" + ;"ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=3D" + (assoc-ref %build-inputs "clang") "/bin= /clang\n" + "ac_add_options --with-libclang-path=3D" + (assoc-ref %build-inputs "clang") "/lib\= n"))) + + (substitute* "browser/app/profile/000-tor-browser.js" + ;; Tor Browser updates are disabled on mozconfig, but le= t's make sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\"= ).*" _ m) + (string-append m ",false);\n")) + ;; Snowflake is not built on gnu targets. + (("pref\\(\"extensions.torlauncher.default_bridge.snowfl= ake.1\".*") + "\n")) + + (substitute* + "browser/extensions/tor-launcher/src/defaults/preferences= /torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Currentl= y disabled on + ;; tor-launcher, but let's make sure while missing langp= acks. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\").= *" _ m) + (string-append m ", false);\n"))) + + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + + (replace 'build + (lambda _ + ;; Build fails without this. Does it make the build nondeter= ministic? + (make-file-writable "Cargo.lock") + (invoke "./mach" "build") + #t)) + + ;; Tor Browser just do a stage-package here and copy files to it= s places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs + configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications= ")) + (build "objdir/dist/firefox") + (bin (string-append out "/bin")) + (lib (string-append out "/lib/firefox")) + (start-script + "tbb-scripts/RelativeLink/start-tor-browser") + (desktop-file + "tbb-scripts/RelativeLink/start-tor-browser.desktop"= )) + (invoke "./mach" "build" "stage-package") + ;; Tor Browser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (format #t "Deleting spurious files ...~%") + (with-directory-excursion build + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("firefox-bin" "libfreeblpriv3.chk" "libnssdb= m3.chk" + "libsoftokn3.chk" "fonts/TwemojiMozilla.ttf"= ))) + (rmdir (string-append build "/fonts")) + (format #t "Creating install dirs ...~%") + (mkdir-p applications) + (mkdir-p lib) + (mkdir bin) + (format #t "Copying files to install dirs ...~%") + (copy-recursively build (string-append lib "/") + #:log (%make-void-port "w")) + (copy-file start-script + (string-append lib "/start-tor-browser")) + (copy-file desktop-file + (string-append lib "/start-tor-browser.desktop"= )) + (chmod (string-append lib "/start-tor-browser") #o555) + (chmod (string-append lib "/start-tor-browser.desktop") #o= 555) + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append lib "/start-tor-browser") + (string-append bin "/start-tor-browser")) + (format #t "Installing desktop file ...~%") + (install-file desktop-file applications)) + #t)) + + (add-after 'install 'install-icons + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (icons-src (string-append + out "/lib/firefox/browser/chrome/icons/de= fault"))) + (with-directory-excursion + icons-src + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicolo= r/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.p= ng")))) + '("default16.png" "default32.png" "default48.png" "defa= ult64.png" + "default128.png")))) + #t)) + + (add-after 'install-icons 'install-fonts + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox/")) + (fonts (string-append (or (assoc-ref native-inputs + "torbrowser-fon= ts") + (assoc-ref inputs + "torbrowser-fon= ts")) + "/share"))) + (copy-recursively fonts lib + #:log (%make-void-port "w")) + (symlink (string-append lib "/fonts") + (string-append out "/share/fonts"))) + #t)) + + (add-after 'install-fonts 'install-extensions + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (ext (string-append out "/lib/firefox/browser/extensi= ons")) + (torb-ext (string-append out + "/lib/firefox/chrome/torbutton/content/ex= tensions")) + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}") + (httpse-id "https-everywhere") + (noscript (assoc-ref inputs "noscript")) + (httpse (assoc-ref inputs "https-everywhere"))) + (mkdir-p ext) + (mkdir-p torb-ext) + (copy-file noscript (string-append + ext "/" noscript-id ".xpi")) + (copy-recursively httpse + (string-append torb-ext "/" httpse-id) + #:log (%make-void-port "w")) + (chmod (string-append ext "/" noscript-id ".xpi") #o555) + ;; Make httpse available as a builtin extension. + (with-directory-excursion lib + (make-file-writable "omni.ja") + (for-each (lambda (file) + (invoke "zip" "-X" "omni.ja" file)) + (find-files "chrome" ".*")))) + #t)) + + (add-after 'install-extensions 'link-binaries + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (tordir (string-append out "/lib/firefox/TorBrowser/T= or")) + (ptdir (string-append tordir "/PluggableTransports")) + (obfs4 (string-append (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (tor (string-append (assoc-ref inputs "tor") + "/bin/tor"))) + (mkdir-p ptdir) + (symlink tor (string-append tordir "/tor")) + (symlink obfs4 (string-append ptdir "/obfs4proxy"))) + #t)) + + (add-after 'link-binaries 'copy-bundle-data + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (tbb "tbb-scripts") + (ptconf (string-append tbb "/Bundle-Data/PTConfigs")) + (docs (string-append lib "/TorBrowser/Docs")) + (data (string-append lib "/TorBrowser/Data"))) + (mkdir-p data) + (mkdir docs) + (with-directory-excursion + (string-append tbb "/Bundle-Data/linux/Data") + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" fil= e) + #:log (%make-void-port "w")= )) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconf "/linux/torrc-defaults-ap= pendix") + (string-append data "/Tor/torrc-defaults-append= ix")) + (copy-file (string-append ptconf "/bridge_prefs.js") + (string-append + data "/Browser/bridge-prefs-js-appendix")) + (copy-recursively (string-append tbb "/Bundle-Data/Docs") + (string-append docs "/") + #:log (%make-void-port "w"))) + #t)) + + ;; This fixes the file chooser crash that happens with GTK 3 + (add-after 'copy-bundle-data 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (gtk (assoc-ref inputs "gtk+")) + (gtk-share (string-append gtk "/share")) + (mesa (assoc-ref inputs "mesa")) + (mesa-lib (string-append mesa "/lib")) + (pulseaudio (assoc-ref inputs "pulseaudio")) + (pulseaudio-lib (string-append pulseaudio "/lib")) + (libxscrnsaver (assoc-ref inputs "libxscrnsaver")) + (libxscrnsaver-lib (string-append libxscrnsaver "/lib= "))) + (wrap-program (car (find-files lib "^firefox$")) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib ,mesa-lib + ,libxscrnsaver-lib)))) + #t))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "Tor Browser is the Tor Project version of Firefox browser. It is t= he only +recommended way to anonymously browse the web that is supported by the pro= ject. +It modifies Firefox in order to avoid many know application level attacks = on +the privacy of Tor users. + +WARNING: This is not the official Tor Browser and is currently on testing.= Use +at your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0)))) ;and others, see toolkit/content/license.= html --=20 2.28.0 --/04w6evG8XlLl3ft-- --1UWUbFP1cBYEclgG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9tKTQFgwPCZwAACgkQ YrJ+WmBEwoLTcBAAoXcLdICQ4EJtxUSV2UeEaajxtBzGwjBLe1mwVDqELkilsQUW akCa6Ix7+G2yWKioSHreJFaEjNGg9uyI1LjUTfH/3WXy6YUm5VyRe5JH+BTYKOPK 10B2ACQJceH4xfvLypWmgCijrNGwgH1yXxlAr15ivZ+wi4o3yza5i/13B8kLEIqP KT9OEE507e0S954LREf5X7wam5x5YbiIfR3tQKBmQ4jEMAOfo4hWZ2H1ioXQaGlc 9ol1dtfAz1BQ6nVGG3qxEINsB/u+os1tikwHioOrMecpmv26ecHX1f6T5oXHwpGV WEfYAT4fM2+kjRqlIogjmpmomDN/PRUZkNSbmL1P6o4rDGA+6yf5S68Nf+4D3uQ5 PXJGvHodtn4GNXU3OKzi12DOCGAJ6DLoVKphnpys4mMQ5XZI792Tuc9yG1pxRZHp y+TtKod57sZJAWX8zENod72HcNaj4tO6M+0xDNfTJ9EXxQmNy82EWiw2yy1Y2z3t ZpciG6XStVlVtJe9fy/Rfq0BTc6q5dwOAKM2dSB8bpuPNYXaDkShZwRQQsfoRXRs Q09ZjnAWoy9aFfrpBsT87JhfumYf84dxGSKNfV8mb3G0C/ITE08gjFcRMvWcJjeC tWpTYH8qvJiM0HN01/+0yeEF1/sDnKBHM6TVCk/f38++7a+rWo1VYX1k4f0= =9051 -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 22:54:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 18:54:22 2020 Received: from localhost ([127.0.0.1]:60837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kIJqA-0008CB-CY for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 18:54:22 -0400 Received: from mx1.riseup.net ([198.252.153.129]:54398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kIJq8-0008C2-Rs for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 18:54:21 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4Brdp42WLQzDsXn for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 15:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600210460; bh=rDgESVJgen0HcCM0/7NBBhihOHZfYRhCPx2XyBR46N0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=LX6iJ6PimyIXoP4jJFjsPnTU6ocrwQZ7st419gF+EKLVsNkogI8Vm0xOR4TeiYv1Z 9mahj8vuPipmijvBsuJ+GII1bLB+lLgjKrRxzooR9oEsHeMmR8fx3UlkkTX2/HjLCs gAsI9Aak1keht655T2mcM/55Jkuov5aYEqmz99iY= X-Riseup-User-ID: C680E990B426FD9A608E752E40498623A4B130077FED3CC0D2A2C8C067632362 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4Brdp31NvRzJn4L for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 15:54:18 -0700 (PDT) Date: Tue, 15 Sep 2020 19:53:39 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 3/9] gnu: Add go-github-com-dchest-siphash Message-ID: <20200915225339.GB19089@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> <20200915150607.GC13296@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yVhtmJPUSI46BTXb" Content-Disposition: inline In-Reply-To: <20200915150607.GC13296@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --yVhtmJPUSI46BTXb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Just in case, the 'zero' on the subject was a mistake. My apologies for the noise. --yVhtmJPUSI46BTXb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9hRfIFgwPCZwAACgkQ YrJ+WmBEwoJnRQ/+OpiRMFQNliCt2aO0tm8ebPH4OOvaN/ZUHi9ELhPHy+8KbQ4h e3gHIO4bjXBg2P8aFOr2ZkM/fQqVNV8Elq5jBQOKw0qXMbb5wbnmN1X43B5ictrM m+HTXULPuSMkgaOD9YvHN/0v/kP3giHQ3ECZI6No3e/2NyzVg7LOrYPSLNGHE0kX b4NGaGSv7LbxXXea/OjjBWu9FG8v7AXSki5I8HU0FLBrp0UjfPK1KTCuRI0rrFf8 K3FVFrepfN17QT2G8eEAR2Xrk4Kv6QrOAHQtQBMY9kl4G5eduTVHxVBKBmF5l5Zu DIIYVgeO4cKQ20zhgVSyY3dJ/I2hlfCkihDT0I/DbzW1huGoSTYTaxP5RzUs8CG0 /dlMv8cm27VRtcT/rBfZTmBbnzT4UtrPZAA8mKkxysHh2gFSi+33Zp1GPnU507Co feWKE1q1npjfiUXCaJqfKD8O8KIyEU3F3h5GArG3pROdjCxKXJP9sJNXp5v/oMgG 9PJZwIRSquCWlvs6Xrt9CDWgMpDDzdE2cBJyY/FfuF9X4X4Q+j2jNfcDTD/N7Tu8 IcGdhn64ElXqEN9IsERCmLJYLsi6Ox/nSXtTt//34+dxH3P9ueKzkRVBBWG3ZpGo uUDhSUZBWJWvWqKw+EPzglD1GCMV5Cu1cYXx+5xXKPSOBUZinnQHSpsT2ys= =r7NT -----END PGP SIGNATURE----- --yVhtmJPUSI46BTXb--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 22:50:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 18:50:56 2020 Received: from localhost ([127.0.0.1]:60833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kIJmp-00087E-QR for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 18:50:56 -0400 Received: from mx1.riseup.net ([198.252.153.129]:53000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kIJmn-000876-7Z for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 18:50:55 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4Brdk43x8LzFct2 for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 15:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600210252; bh=fsX6PICMlep/TQL+HkWspKsGDxnNLWbne21noE1Z1O8=; h=Date:From:To:Subject:References:In-Reply-To:From; b=qatsfAgcyYNTGp/FwgaRWOSYc/GPPM9sWMoeYIZ+PynlBIRgBo5P2aLpvQuwNVrsj eIk+VfUi/0YAVHltonLJ/+F7rAwlUTk4HBFQz1yZZiIFgox999fsOD4IBbzn5korLX fL1TVMPYXJV2geiKR6CmdlhnpYxLKZNkRISp2kNU= X-Riseup-User-ID: A99413FA9AF17D15C6CFC2F9906E60E8005FFDA383E6F82B7BC99A6BAC1BAED2 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4Brdk33LJczJp4x for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 15:50:51 -0700 (PDT) Date: Tue, 15 Sep 2020 19:50:04 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 2v2/9] gnu: Add go-github-com-agl-ed25519 Message-ID: <20200915225004.GA19089@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> <20200915150421.GB13296@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aVD9QWMuhilNxW9f" Content-Disposition: inline In-Reply-To: <20200915150421.GB13296@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --aVD9QWMuhilNxW9f Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline There was an indentation error which is fixed on this version. --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-github-com-agl-ed25519.patch" Content-Transfer-Encoding: quoted-printable =46rom eee248ad09b5c90522be5cb3cb3f40d8ad73ec20 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Tue, 15 Sep 2020 19:35:56 -0300 Subject: [PATCH] gnu: Add go-github-com-agl-ed25519. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-github-com-agl-ed25519): New variable. --- gnu/packages/golang.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 0bcb01fd2f..877295de72 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5680,3 +5680,41 @@ error messages.") Transports are a means of connecting to the Tor Network from places where = it is censored.") (license license:cc0))) + +(define-public go-github-com-agl-ed25519 + (let ((commit "c4161f4c7483313562781c61b9a20aba73daf9de") + (revision "0")) + (package + (name "go-github-com-agl-ed25519") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/agl/ed25519") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1wjlbzi0w63rmlzgk3amw274wsl0zhcn4yx2lraffbkhqappahxc")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/agl/ed25519" + #:phases + (modify-phases %standard-phases + (add-before 'reset-gzip-timestamps 'make-files-writable + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) (chmod file #o644)) + (find-files out "\\.gz")) + #t)))))) + (home-page "https://github.com/agl/ed25519") + (synopsis "Go library for ed25519 public-key signatures") + (description "This library is a Go implementation of ed25519 public-k= ey +signature system which was designed to be faster than previous digital sig= nature +systems without sacrificing security. It is currently used in the +implementation of obfs4 and should be not be used on newer projects since = it +is unmaintained. Newer software should use x-crypto instead.") + ;; License file is referred but it is missing. Probably because the + ;; author decided to discontinue the project. + (license (license:non-copyleft "file://ed25519.go"))))) --=20 2.27.0 --k1lZvvs/B4yU6o8G-- --aVD9QWMuhilNxW9f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9hRRoFgwPCZwAACgkQ YrJ+WmBEwoKMQw/+PKcY+cngB+hTyWXVAEW/3knNzriJczAY7UOnYqgHtjo0qukI luWS21qF5ECB0kxCb5j5A3a+UxCq9rbJ7Skid2BTliKVXP3PSAlWjLHpf79ZuBJx MOHQRN9QE3I3vymYwrEaASs/IA75V//3FK+xjTyrxffq6GrWXBsgPdZoTpIrWkb2 r6ZnkMTBSkmWiAdfsu/5f/XzcPo8AGccSAofostcUPsMgVJKNXDjcFL4D7syMZRw 0AUb+hmx66O4mDwVRELzRUNoz81F/NDIuMobOMiAKG/HT9ggWdZJUjPzjduvaD13 27Ehj+MNGL/4hGUF+/8QD6pxUCrJF/83VfR4qmNoITdlXeI7RhbFB8OmbWwf7X9R G/Y/QlF6Imi9GIgvc3e/IZ1uGVji4bwo9dI6aNFV5ephzASVfAcI3XyicUedBCvG UYmwOsLbAv5XQIJrW5hlLoS2Xj7+vAmYu6IuoppF/C2YT/63mVX6k0+dUjee/x4Z +D46QK5kV33LjTeI4M1Zl63RekIY3ZDqBboz5OxAyzNhbtYRWEhJjLxbAwwSjjk0 fkPqmIgik7feQyZV41IslxSXgDJ/5eWgKOIBM06vCcmrDqROPFhT36o1lz7N+Xe4 uxzL5yWHBwGb73d+5c9o3mnt8EQDpoJWlCpbShAoaSlpMGDEpoodAJVmYFc= =Z7ih -----END PGP SIGNATURE----- --aVD9QWMuhilNxW9f--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:24:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:24:16 2020 Received: from localhost ([127.0.0.1]:60223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICoa-000183-5B for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:24:16 -0400 Received: from mx1.riseup.net ([198.252.153.129]:47250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICoX-00017v-TY for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:24:14 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRpj1Q3QzFgrR; Tue, 15 Sep 2020 08:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600183453; bh=qlEHcHCnAYICUC3XF8YVQaGl0keXeGh3J0R5/dxkLdY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BbeUdfI7kUydrBYkUwLhKuv/Xq4SEpUQZAWLqB7ueZ7FySB3nPwawfy6BDyj7GCCu YGx2QhPu6lQ8v8dWxebwo1ahHdugfRL626nHlk9fxSrqgDJ5pTbGOmvO8ur6WyjxuM b7h6WD5N1msbvKjGzpNp79ZZosebsWiGvd5Vi8t8= X-Riseup-User-ID: 0FE1A4C354AAA5DDB1C3D3B698CC7029095B31FD73063A09DB08F0A3985CB5A8 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4BrRpg6V12z8ty7; Tue, 15 Sep 2020 08:24:11 -0700 (PDT) Date: Tue, 15 Sep 2020 12:23:32 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: Raghav Gururajan <raghavgururajan@HIDDEN> Subject: Re: [bug#42380] Wow! Message-ID: <20200915152332.GJ13296@andel> References: <20200715211547.GA17146@andel> <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IpljlC28XhFjURzf" Content-Disposition: inline In-Reply-To: <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --IpljlC28XhFjURzf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Raghav, s=E1b 12 set 2020 =E0s 09:35:17 (1599914117), raghavgururajan@HIDDEN e= nviou: >=20 > Thank you all for the hard work. This is a high-time package. Thank you as well. :) > Any idea on when it can be merged to master?, at-least a minimally > viable package? As of now, I think it's a viable package, but there's still room for improvement on its definition. If you also care that this package is available on Guix, I guess the easiest and most important thing to do right now is to apply the patch series that I've sent, try it out and report back on your experience. Happy hacking! --IpljlC28XhFjURzf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g3HMFgwPCZwAACgkQ YrJ+WmBEwoLTiBAAkEE12XTXYe15W4Z/u116sVByrHkXFhKQA8FNwnBxF3tnUlJk xXXH6O3u6EQlkwSDbktqSSzpf0U27U7+/fGgLVS2OIG4FYlkxOw1cIM0ehkmcG5X KgYoFHuibz059PZh+BYSr+Yu7gz+Hf7XwrySkgcBQlIo8OCI06t0VSuZMFZDoDre k3nc/Up4idMZVmht/U/VLQ2ExANmYTb+IdM41WbdCZH3novMtch/0T1yciy4vDNl 3cYc/pAdVSILDPZVUl3ZsixcBKfRSGTuBs6k/GfmT41RFcm6t4Pc4sQW5jsPNToj Rs1QCHIdlw148E/B7emsgulbNBCOG6dKeI6TTXukXC5351PsjiTt8puzZKXClR4k GALFJJvo4U/EAG172F6wpkm8+BBUWLR1BzwNKjNWxAJA4zh2LRprenU/Gfq15i0H Ooh2k4L5E/Zh6Cgi6InGdK2b21DTGGi0deszXO2zq+Zc9Fmm78ETNPodfSZhNdDe +h+4YQLosAgjcjnRKUDQLCMbAXJOMkesIHRTQWz/iabC/UKUIIPhTDs676Ta2PSs 15nM1bmS0yQP893J32kiFeAVwo2xTcLeKCILlMP0tHrHEzArw1Y/lFNkUvLAyn2+ 8m6sWlBX8UAhLwm/oSW//3BfmX/vhe0RFhs6M9JxRuoZTDn6Emm39ErVCHo= =qajb -----END PGP SIGNATURE----- --IpljlC28XhFjURzf--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:17:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:17:13 2020 Received: from localhost ([127.0.0.1]:60208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kIChb-0000UL-WF for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:17:13 -0400 Received: from mx1.riseup.net ([198.252.153.129]:42644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kIChW-0000Oq-92 for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:17:01 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRfK1rTCzFpRv; Tue, 15 Sep 2020 08:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600183017; bh=sp0bWO+xui+6kVc5rZn74KIgjhErs5zxZ6OROAyVi3E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n4C40RyauaAX4FO7zQGKfM020g3R+K7yfVAA8OU1j7gVJr30MGkiVc786HYsKnKCf lIy4ygsXaGGWnq0WkYX0UOkJi0qg6eJu/qA/A7PPyMrxFVk9fqoL1Jm/Qgxs0WLshs piYCpsPFd1bUwDJaiNYWMxR1WO05fKa1Wse4u+rY= X-Riseup-User-ID: 4669BCADC750F1F8EAEE308571374531C7EB33E2F01D70FB956B0033BC874049 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4BrRfG1zTDz8ty7; Tue, 15 Sep 2020 08:16:54 -0700 (PDT) Date: Tue, 15 Sep 2020 12:16:14 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN> Subject: Re: [bug#42380] [PATCH 9/9] gnu: Add torbrowser-unbundle Message-ID: <20200915151614.GI13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gV1yUYniiDLxW66s" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: Efraim Flashner <efraim@HIDDEN>, 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --gV1yUYniiDLxW66s Content-Type: multipart/mixed; boundary="BouVgDkIlpb7X6Bk" Content-Disposition: inline --BouVgDkIlpb7X6Bk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --BouVgDkIlpb7X6Bk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename="0001-gnu-Add-torbrowser-unbundle.patch" Content-Transfer-Encoding: quoted-printable =46rom 84070de582d33d47f2684bdee69b1e0b478c2352 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 22:39:59 -0300 Subject: [PATCH] gnu: Add torbrowser-unbundle To: 42380 <at> debbugs.gnu.org * gnu/packages/tor.scm (torbrowser-unbundle): New variable. * gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch: New file. * gnu/packages/patches/torbrowser-start-tor-browser.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 3 + ...torbrowser-start-tor-browser.desktop.patch | 22 + .../torbrowser-start-tor-browser.patch | 226 +++++ gnu/packages/tor.scm | 830 +++++++++++++++++- 4 files changed, 1080 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.deskt= op.patch create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.patch diff --git a/gnu/local.mk b/gnu/local.mk index 1baa8405c5..1715068b6c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -37,6 +37,7 @@ # Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN> # Copyright =C2=A9 2020 Tanguy Le Carrour <tanguy@HIDDEN> # Copyright =C2=A9 2020 Martin Becze <mjbecze@HIDDEN> +# Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1615,6 +1616,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/tipp10-fix-compiling.patch \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tk-find-library.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.desktop.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patc= h b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch new file mode 100644 index 0000000000..336115b33a --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop.orign 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop 2020-07-25 02:54:44.603431160 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the sh= ell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=3DWeb Browser + Comment=3DTor Browser is +1 for privacy and =E2=88=921 for mass surveilla= nce + Categories=3DNetwork;WebBrowser;Security; +-Exec=3Dsh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ = ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/sta= rt-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=3D./Browser/start-tor-browser --detach +-Icon=3Dweb-browser ++Exec=3Dbash -c start-tor-browser ++X-TorBrowser-ExecShell=3Dstart-tor-browser --detach ++Icon=3Dtorbrowser + StartupWMClass=3DTor Browser diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.patch b/gnu/= packages/patches/torbrowser-start-tor-browser.patch new file mode 100644 index 0000000000..c563f94003 --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.patch @@ -0,0 +1,226 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Eorig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= 2020-08-01 20:22:08.901737325 -0300 +@@ -5,6 +5,15 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. +=20 ++TBB_HOME=3D"${HOME}/.local/share/torbrowser" ++TBB_LOGFILE=3D"${TBB_HOME}/torbrowser.log" ++TBB_DATA=3D"${TBB_HOME}/Data" ++TBB_PROFILE=3D"${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=3D$(dirname $(realpath "$0")) ++TBB_STORE_DATA=3D"${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC=3D"${TBB_DATA}/Tor/torrc-defaults" ++PT_PREFS=3D"${TBB_DATA}/Browser/bridge-prefs-js-appendix" ++ + complain_dialog_title=3D"Tor Browser" +=20 + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -106,14 +115,11 @@ + printf " --verbose Display Tor and Firefox output in the ter= minal\n" + printf " --log [file] Record Tor and Firefox output in file (de= fault: tor-browser.log)\n" + printf " --detach Detach from terminal and run Tor Browser = in the background.\n" +- printf " --register-app Register Tor Browser as a desktop app for= this user\n" +- printf " --unregister-app Unregister Tor Browser as a desktop app f= or this user\n" + } + log_output=3D0 + show_output=3D0 + detach=3D0 + show_usage=3D0 +-register_desktop_app=3D0 + logfile=3D/dev/null + while : + do +@@ -134,8 +140,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" =3D=3D "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser= =2Elog\n" +- logfile=3D"../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.= log\n" ++ logfile=3D"${TBB_LOGFILE}" + elif [ "${2:0:1}" =3D=3D "/" -o "${2:0:1}" =3D=3D "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile=3D"$2" +@@ -148,16 +154,6 @@ + log_output=3D1 + shift + ;; +- --register-app) +- register_desktop_app=3D1 +- show_output=3D1 +- shift +- ;; +- --unregister-app) +- register_desktop_app=3D-1 +- show_output=3D1 +- shift +- ;; + *) # No more options + break + ;; +@@ -187,41 +183,23 @@ + export XAUTHORITY + fi +=20 +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname=3D"$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name=3D"`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname=3D"$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname=3D"`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this oper= ating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files ar= e on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TO= RRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++ grep -v 'default_bridge\.snowflake' "${PT_PREFS}" >> "${TBB_PROFILE}/u= ser.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit e= xec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi +=20 +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir=3D"`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,50 +214,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi +=20 +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from = the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=3D.*,Name=3DTor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=3D.*,Icon=3D$PWD/browser/chrome/icons/default/default1= 28.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=3D.*,Exec=3Dsh -c '\"$PWD/start-tor-browser\" --detach= || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Brow= ser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- +-if [ "$register_desktop_app" -eq 1 ]; then +- mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" +- update-desktop-database "$HOME/.local/share/applications/" +- printf "Tor Browser has been registered as a desktop app for this user i= n ~/.local/share/applications/\n" +- exit 0 +-fi +- +-if [ "$register_desktop_app" -eq -1 ]; then +- if [ -e "$HOME/.local/share/applications/start-tor-browser.desktop" ]; t= hen +- rm -f "$HOME/.local/share/applications/start-tor-browser.desktop" +- update-desktop-database "$HOME/.local/share/applications/" +- printf "Tor Browser has been removed as a user desktop app (from ~/.loc= al/share/applications/)\n" +- else +- printf "Tor Browser does not appear to be a desktop app (not present in= ~/.local/share/applications/)\n" +- fi +- exit 0 +-fi +- + HOME=3D"${PWD}" + export HOME +=20 +-SYSARCHITECTURE=3D$(getconf LONG_BIT) +-TORARCHITECTURE=3D$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit= :]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'l= l get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS=3D"detect_leaks=3D0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=3D$1 +=20 +@@ -342,13 +279,15 @@ + # your password in the following line where the word =E2=80=9Csecret=E2= =80=9D is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:=3D'"secret"'} +=20 +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH=3D"${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE=3D"fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=3Dmemory +=20 ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE=3D"${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" +=20 + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +296,23 @@ +=20 + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfil= e" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </d= ev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </de= v/null | \ ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfi= le" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </= dev/null + fi +=20 + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index dd362d3af8..bc7a3486f8 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -32,26 +32,63 @@ #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) + #:use-module (gnu packages readline) + #:use-module (gnu packages rsync) ; for httpse + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages version-control) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages w3m) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) ; for httpse + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) =20 (define-public tor (package @@ -398,3 +435,794 @@ incorporates ideas and concepts from Philipp Winter's= ScrambleSuit protocol. The obfs naming was chosen primarily because it was shorter, in terms of protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") (license license:gpl3+))) + +;; Upstream does not seem to keep tor-browser and tor-browser-build versio= ns +;; in sync +(define %torbrowser-version "68.12.0esr-9.5-1") +(define %torbrowser-build-version "9.5.4") +(define %torbrowser-build "build1") +(define %torbrowser-build-id "20200729000000");must be of the form YYYYMMD= Dhhmmss + +;; Fonts for Tor Browser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on Tor Browser release tarball. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + ; Tor Browser fonts did not change since last release and were not avai= lable + ; when this version was built, the previous version were kept. + ;(version %torbrowser-build-version) + (version "9.5.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "1kqvr0sag94xdkq85k426qq1hz2b52m315yz51w6hvc87d8332b4")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (fonts (string-append %output "/share/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p fonts) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" fonts "--strip-components=3D3" + (string-append "--use-compress-program=3D" xz = "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "Tor Browser bundled fonts") + (description "Free fonts bundled with Tor Browser. Includes a subset o= f Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define tor-browser-build + (let ((commit (string-append "tbb-" %torbrowser-build-version + "-" %torbrowser-build))) + (package + (name "tor-browser-build") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-build.g= it") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0mq9ml8p0l2nnwjgr6dqn00pzk7h5zpi3hhr093hq99bapxs3wcs")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying build scripts ...~%") + (copy-recursively (string-append + (assoc-ref %build-inputs "source") + "/projects/tor-browser") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser Builder scripts") + (description "Tor Browser build and runtime scripts.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define torbutton + (let ((commit "ebe2bedab44e38f18c7968bd327d99eef7660f34")) + (package + (name "torbutton") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/torbutton.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03xdyszab1a8j98xv6440v4lq58jkfqgmhxc2a62qz8q085d2x83")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in extension") + (description "Browser extension needed to build and run Tor Browser.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define tor-launcher + (package + (name "tor-launcher") + (version "0.2.21.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-launcher.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1mm1z7gv9dv6ymbr3vsg0lsnhnn84zrb6qsa164hmaxcfrwfhz5d")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in controler extension") + (description "Browser extension that starts the tor process (which +connects the browser and other applications to the Tor Network), and +which helps people configure and use @code{tor}. The first window that +you see when you start Tor Browser is displayed by this extension.") + (license (license:non-copyleft "file://src/LICENSE")))) + +;; This package is actually a cargo crate, so it should be moved to +;; crates-io.scm and made public once the cross building to wasm32 is +;; successful. +(define https-everywhere-lib-wasm + (let ((commit "af199004083ce200f285735f68a5a57c47eed0e6")) + (package + (name "https-everywhere-lib-wasm") + (version "2020.08.13") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/EFForg/https-everywhere-lib-wasm") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14xv637hf9kzdyr2w0cvx0g5if9nrzflf29p1spdl228yqlv9d5r")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://github.com/EFForg/https-everywhere-lib-wasm") + (synopsis "Rust library for https-everywhere browser extension") + (description "Rust library for https-everywhere browser +extension.") + (license license:gpl2+)))) + +;; This should probably go elsewhere on the file system and made +;; public in order to be shared between Tor Browser and IceCat once +;; lib-wasm gets fixed. +(define https-everywhere + (package + (name "https-everywhere") + (version "2020.8.13") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/" name + "/archive/" version ".tar.gz")) + (sha256 + (base32 + "0xb8q7izlyq80zzvj2j7wqp3srxxmi0wgwrb47lc5w38r7yzqjjd")))) + (build-system trivial-build-system) + (native-inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("findutils" ,findutils) + ("git" ,git) + ("grep" ,grep) + ("gzip" ,gzip) + ("https-everywhere-lib-wasm" + ,https-everywhere-lib-wasm) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("openssl" ,openssl) + ("python" ,python) + ("rsync" ,rsync) + ("sed" ,sed) + ("tar" ,tar) + ("util-linux" ,util-linux) ; for getopt + ("which" ,which) + ("xxd" ,xxd) + ("zip" ,zip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (httpse-libwasm (assoc-ref %build-inputs + "https-everywhere-lib-w= asm")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (findutils (assoc-ref %build-inputs "findutils")) + ;; Might be worth patching make.sh and remove this. + (git (assoc-ref %build-inputs "git")) + (grep (assoc-ref %build-inputs "grep")) + (gzip (assoc-ref %build-inputs "gzip")) + (libxml2 (assoc-ref %build-inputs "libxml2")) + (libxslt (assoc-ref %build-inputs "libxslt")) + (openssl (assoc-ref %build-inputs "openssl")) + (python (assoc-ref %build-inputs "python")) + ;; Possibly not needed and used to update rules at + ;; build time. + (rsync (assoc-ref %build-inputs "rsync")) + (sed (assoc-ref %build-inputs "sed")) + (tar (assoc-ref %build-inputs "tar")) + (util-linux (assoc-ref %build-inputs "util-linux")) + (which (assoc-ref %build-inputs "which")) + (xxd (assoc-ref %build-inputs "xxd")) + (zip (assoc-ref %build-inputs "zip"))) + (setenv "SHELL" (string-append bash "/bin/bash")) + (set-path-environment-variable + "PATH" '("bin") + (list bash sed findutils which git python tar openssl= rsync + libxml2 libxslt util-linux grep xxd gzip zip co= reutils)) + (set-path-environment-variable + "LIBRARY_PATH" '("lib") + (list bash sed findutils which git python tar openssl= rsync + libxml2 libxslt util-linux grep xxd gzip zip co= reutils)) + (format #t "Untaring source tarball ...~%") + (invoke "tar" "-xf" src "--strip-components=3D1") + ;; Python3.6 is hardcoded on these scripts. Using v3.8= appears + ;; to be harmless. + (substitute* + '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/rules/src/https_everywhere_checker/check_rule= s.py" + "test/script.py" + "test/validations.sh" + "test/validations/filename/run.py" + "test/validations/relaxng/run.py" + "test/validations/securecookie/run.py" + "test/validations/special/run.py" + "utils/create_zip.py" + "utils/chromium-translations.py" + "utils/create-platform-certs/split_combined_cert_fi= le.py" + "utils/mk-client-whitelist/dbconnect.py" + "utils/mk-client-whitelist/run.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + (make-file-writable "lib-wasm") + (copy-recursively httpse-libwasm + "lib-wasm" + #:log (%make-void-port "w")) + ;; Remove precompiled binaries from source. This breaks + ;; http-everywhere at runtime, but building is success= ful. + ;; Once lib-wasm is successfuly cross-compiled to wasm, + ;; remove this. + (with-directory-excursion "lib-wasm/pkg" + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("https_everywhere_lib_wasm.js" + "https_everywhere_lib_wasm_bg.wasm"))) + (for-each patch-shebang + (find-files "." + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat)= )) + #:stat lstat)) + ;; Failing to generate the xpi, but copy-dir appears t= o be + ;; enough. + (invoke "./make.sh") + (copy-recursively "pkg/xpi-eff" %output + #:log (%make-void-port "w")) + #t)))) + (home-page "https://www.eff.org/https-everywhere") + (synopsis "Browser extension for automatic HTTPS usage") + (description "Browser extension that automatically makes the browser to +use HTTPS instead of plain HTTP when the remote destination makes it +available to users.") + (license license:gpl2+))) + +;; Currently there seems to be no binaries on this package, but in +;; order to avoid the possibility of one getting silently added, +;; this needs reworking to make it build from source. +(define noscript + (package + (name "noscript") + (version "11.0.38") + (source + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/release= s/" + name "-" version ".xpi")) + (sha256 + (base32 + "0f77dh1qj02ayrxiz98px0kl0dlza65fpjzq56nsmhrxmmyrby4c")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (format #t "Copying source ...~%") + (copy-file (assoc-ref %build-inputs "source") + %output)))) + (home-page "https://noscript.net") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, click= jack +and makes possible for the users to block or choose on a per site basis wh= ich +remote javascript to run while browsing the web.") + (license license:gpl2+))) + +;; (Un)fortunatly Tor Browser has it's own reproducible build system - RBM= - +;; which automates the build process for them and compiles Tor Browser fro= m a +;; range of repositories and produces a range of tarballs for different +;; architectures and locales. So we need to cherry-pick what is needed for +;; guix and produce our own tarball. See +;; https://gitweb.torproject.org/builders/tor-browser-build.git/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. See +;; also the Hacking on Tor Browser document for a high level introduction = at +;; https://trac.torproject.org/projects/tor/wiki/doc/Tor Browser/Hacking. +;; +;; TODO: Import langpacks. +(define-public torbrowser-unbundle + (let ((commit (string-append "tor-browser-" %torbrowser-version + "-" %torbrowser-build))) + (package + (name "torbrowser-unbundle") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-browser.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "02pxbhv64l575p2s2i365v53qyqynn272f64b6gqfrcvhn920g09")))) + (build-system gnu-build-system) + (inputs + `(("alsa-lib" ,alsa-lib) + ("bzip2" ,bzip2) + ("cups" ,cups) + ("dbus-glib" ,dbus-glib) + ("ffmpeg" ,ffmpeg) + ("freetype" ,freetype) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("gtk+-2" ,gtk+-2) + ("graphite2" ,graphite2) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libcanberra" ,libcanberra) + ("libgnome" ,libgnome) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libogg" ,libogg) + ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released + ("libvorbis" ,libvorbis) + ("libxft" ,libxft) + ("libevent" ,libevent) + ("libxinerama" ,libxinerama) + ("libxscrnsaver" ,libxscrnsaver) + ("libxcomposite" ,libxcomposite) + ("libxt" ,libxt) + ("libffi" ,libffi) + ("libvpx" ,libvpx) + ("mesa" ,mesa) + ("mit-krb5" ,mit-krb5) + ;; See <https://bugs.gnu.org/32833> + ;; and related comments in the 'remove-bundled-libraries' phase. + ;; UNBUNDLE-ME! ("nspr" ,nspr) + ;; UNBUNDLE-ME! ("nss" ,nss) + ("obfs4" ,obfs4) + ("pango" ,pango) + ("pixman" ,pixman) + ("pulseaudio" ,pulseaudio) + ("shared-mime-info" ,shared-mime-info) + ("sqlite" ,sqlite) + ("startup-notification" ,startup-notification) + ("tor" ,tor-client) + ("unzip" ,unzip) + ("zip" ,zip) + ("zlib" ,zlib))) + (native-inputs + `(("autoconf" ,autoconf-2.13) + ("bash" ,bash) + ("cargo" ,rust "cargo") + ("clang" ,clang) + ("https-everywhere" ,https-everywhere) + ("llvm" ,llvm) + ("patch" ,(canonical-package patch)) + ("torbrowser-start-tor-browser.patch" + ,(search-patch "torbrowser-start-tor-browser.patch")) + ("torbrowser-start-tor-browser.desktop.patch" + ,(search-patch "torbrowser-start-tor-browser.desktop.patch")) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("python2" ,python-2.7) + ("python2-pysqlite" ,python2-pysqlite) + ("nasm" ,nasm) ; XXX FIXME: only needed on x86_64 and i686 + ("node" ,node) + ("noscript" ,noscript) + ("rust" ,rust) + ("rust-cbindgen" ,rust-cbindgen) + ("tor-browser-build" ,tor-browser-build) + ("torbrowser-fonts" ,torbrowser-fonts) + ("tor-launcher" ,tor-launcher) + ("torbutton" ,torbutton) + ("which" ,which) + ("yasm" ,yasm))) + (arguments + `(#:tests? #f ; Some tests are autodone by mach on build fase. + + ;; XXX: There are RUNPATH issues such as + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.= so, + ;; which is not in its RUNPATH, but they appear to be harmless in + ;; practice somehow. See <http://hydra.gnu.org/build/378133>. + #:validate-runpath? #f + #:imported-modules ,%cargo-utils-modules ;for `generate-all-checks= ums' + ;; This modules where copied from IceCat package definition and so= me + ;; of them are probably not needed anymore. TODO: verify if/which + ;; are still needed. + #:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 regex) + (ice-9 match) + (srfi srfi-34) + (srfi srfi-35) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + (guix build utils) + (sxml simple) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-bundle + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((torbutton (assoc-ref inputs "torbutton")) + (torbutton-dir "toolkit/torproject/torbutton") + (tor-launcher (assoc-ref inputs "tor-launcher")) + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb (assoc-ref inputs "tor-browser-build")) + (tbb-scripts-dir "tbb-scripts")) + (format #t "Copying torbutton source to default path ...~%= ") + (make-file-writable torbutton-dir) + (copy-recursively torbutton torbutton-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-launcher ...~%") + (copy-recursively tor-launcher tor-launcher-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-browser-build ...~%") + (mkdir tbb-scripts-dir) + (copy-recursively tbb tbb-scripts-dir + #:log (%make-void-port "w")) + (make-file-writable (string-append + tbb-scripts-dir + "/RelativeLink/start-tor-browser")) + (make-file-writable (string-append + tbb-scripts-dir + "/RelativeLink/start-tor-browser.desk= top"))) + #t)) + + (add-after 'make-bundle 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inp= uts) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + + ;; On mach build system this is done on configure. + (delete 'bootstrap) + + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495= 991b7852b855")) + (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock") + (("(\"checksum .* =3D )\".*\"" all name) + (string-append name "\"" null-hash "\""))) + (generate-all-checksums "third_party/rust")) + #t)) + + (add-after 'build 'neutralize-store-references + (lambda _ + ;; Mangle the store references to compilers & other build to= ols in + ;; about:buildconfig, reducing Tor Browser's closure signifi= cant. + ;; The resulting files are saved in lib/firefox/omni.ja + (substitute* + "objdir/dist/bin/chrome/toolkit/content/global/buildconfig.= html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ store hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime dependency -->" + (string-drop hash 8)))) + #t)) + + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-k= eys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags))) + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append + (assoc-ref inputs "python2") + "/bin/python")) + (setenv "MOZ_BUILD_DATE" + ,%torbrowser-build-id) ; avoid timestamp. + (setenv "LDFLAGS" (string-append + "-Wl,-rpath=3D" + (assoc-ref outputs "out") + "/lib/firefox")) + ;; This needs reworking to use the mozconfig available on + ;; tor-browser-builder repo which is the one Tor Project + ;; actually uses and which warranted some of the changes + ;; below. + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=3D@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=3Ddev-build= ") + (string-append + "ac_add_options --with-tor-browser-version=3Dorg.gnu\n" + "ac_add_options --with-unsigned-addon-scopes=3Dapp\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\n" + "ac_add_options --disable-updater\n" + "ac_add_options --disable-gconf\n" + ;; Other syslibs that can be unbundled? (nss, nspr) + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + "ac_add_options --with-system-bz2\n" + "ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + "ac_add_options --with-system-libevent\n" + "ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=3D" + (assoc-ref %build-inputs "clang") "/bin/clang\n" + "ac_add_options --with-libclang-path=3D" + (assoc-ref %build-inputs "clang") "/lib\n"))) + + (substitute* "browser/app/profile/000-tor-browser.js" + ;; Tor Browser updates are disabled on mozconfig, but le= t's be sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\"= ).*" _ m) + (string-append m ",false);\n"))) + + (substitute* + "browser/extensions/tor-launcher/src/defaults/preferences= /torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Currentl= y disabled on + ;; tor-launcher, but let's make sure while missing langp= acks. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\").= *" _ m) + (string-append m ", false);\n"))) + + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + + (replace 'build + (lambda _ (invoke "./mach" "build") + #t)) + + ;; Tor Browser just do a stage-package here and copy files to it= s places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs + configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications= ")) + (build "objdir/dist/firefox") + (bin (string-append out "/bin")) + (lib (string-append out "/lib/firefox")) + (start-script + "tbb-scripts/RelativeLink/start-tor-browser") + (desktop-file + "tbb-scripts/RelativeLink/start-tor-browser.desktop"= )) + (invoke "./mach" "build" "stage-package") + ;; Tor Browser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (format #t "Deleting spurious files ...~%") + (with-directory-excursion build + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("firefox-bin" "libfreeblpriv3.chk" "libnssdb= m3.chk" + "libsoftokn3.chk" "fonts/TwemojiMozilla.ttf"= ))) + (rmdir (string-append build "/fonts")) + (format #t "Creating install dirs ...~%") + (mkdir-p applications) + (mkdir-p lib) + (mkdir bin) + (format #t "Copying files to install dirs ...~%") + (copy-recursively build (string-append lib "/") + #:log (%make-void-port "w")) + (copy-file start-script + (string-append lib "/start-tor-browser")) + (copy-file desktop-file + (string-append lib "/start-tor-browser.desktop"= )) + (chmod (string-append lib "/start-tor-browser") #o555) + (chmod (string-append lib "/start-tor-browser.desktop") #o= 555) + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append lib "/start-tor-browser") + (string-append bin "/start-tor-browser")) + (format #t "Installing desktop file ...~%") + (install-file desktop-file applications)) + #t)) + + (add-after 'install 'install-icons + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (icons-src (string-append + out "/lib/firefox/browser/chrome/icons/de= fault"))) + (with-directory-excursion + icons-src + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicolo= r/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.p= ng")))) + '("default16.png" "default32.png" "default48.png" "defa= ult64.png" + "default128.png")))) + #t)) + + (add-after 'install-icons 'install-fonts + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox/")) + (fonts (string-append (or (assoc-ref native-inputs + "torbrowser-fon= ts") + (assoc-ref inputs + "torbrowser-fon= ts")) + "/share"))) + (copy-recursively fonts lib + #:log (%make-void-port "w")) + (symlink (string-append lib "/fonts") + (string-append out "/share/fonts"))) + #t)) + + (add-after 'install-fonts 'install-extensions + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (ext (string-append out "/lib/firefox/browser/extensi= ons")) + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}") + (httpse-id "https-everywhere-eff@HIDDEN") + (noscript (assoc-ref inputs "noscript")) + (httpse (assoc-ref inputs "https-everywhere"))) + (mkdir-p ext) + (copy-file noscript (string-append + ext "/" noscript-id ".xpi")) + (copy-recursively httpse + (string-append ext "/" httpse-id) + #:log (%make-void-port "w")) + (chmod (string-append ext "/" noscript-id ".xpi") #o555)) + #t)) + + (add-after 'install-extensions 'link-binaries + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (tordir (string-append out "/lib/firefox/TorBrowser/T= or")) + (ptdir (string-append tordir "/PluggableTransports")) + (obfs4 (string-append (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (tor (string-append (assoc-ref inputs "tor") + "/bin/tor"))) + (mkdir-p ptdir) + (symlink tor (string-append tordir "/tor")) + (symlink obfs4 (string-append ptdir "/obfs4proxy"))) + #t)) + + (add-after 'link-binaries 'copy-bundle-data + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (tbb "tbb-scripts") + (ptconf (string-append tbb "/Bundle-Data/PTConfigs")) + (docs (string-append lib "/TorBrowser/Docs")) + (data (string-append lib "/TorBrowser/Data"))) + (mkdir-p data) + (mkdir docs) + (with-directory-excursion + (string-append tbb "/Bundle-Data/linux/Data") + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" fil= e) + #:log (%make-void-port "w")= )) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconf "/linux/torrc-defaults-ap= pendix") + (string-append data "/Tor/torrc-defaults-append= ix")) + (copy-file (string-append ptconf "/bridge_prefs.js") + (string-append + data "/Browser/bridge-prefs-js-appendix")) + (copy-recursively (string-append tbb "/Bundle-Data/Docs") + (string-append docs "/") + #:log (%make-void-port "w"))) + #t)) + + ;; This fixes the file chooser crash that happens with GTK 3 + (add-after 'copy-bundle-data 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (gtk (assoc-ref inputs "gtk+")) + (gtk-share (string-append gtk "/share")) + (mesa (assoc-ref inputs "mesa")) + (mesa-lib (string-append mesa "/lib")) + (pulseaudio (assoc-ref inputs "pulseaudio")) + (pulseaudio-lib (string-append pulseaudio "/lib")) + (libxscrnsaver (assoc-ref inputs "libxscrnsaver")) + (libxscrnsaver-lib (string-append libxscrnsaver "/lib= "))) + (wrap-program (car (find-files lib "^firefox$")) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib ,mesa-lib + ,libxscrnsaver-lib)))) + #t))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "Tor Browser is the Tor Project version of Firefox browser. It is +the only recommended way to anonymously browse the web that is supported by +the project. It modifies Firefox in order to avoid many know application +level attacks on the privacy of Tor users. + +WARNING: This is not the official Tor Browser and is currently on testing. +Https-everywhere browser extension is currently not working so use it at +your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0)))) ;and others, see toolkit/content/license.= html --=20 2.27.0 --BouVgDkIlpb7X6Bk-- --gV1yUYniiDLxW66s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2r0FgwPCZwAACgkQ YrJ+WmBEwoKGGw/9HRnrHlU+lbO14mMyBmsIrredmncbnRjEN7remBa6S18rpd+E 7BQhDFd/r4/xy8t/5nbwn92vb/IXfAaXfFiN5tB4OwE7rbjUwMz1ArlcrH+RmE4L qO8gH4MQqZvhm/ka0ISwnXRr077Jaz6eYQdh0vnffogoWuLLz8nzlCAr4R1Gvz2P v5DtGBlFqmpBGIC7Y4os3Ro9MI0aqsNdOcrtIm9NICALDOoo3O+Ik+0FeqrgcZFB gNC266E1oHY7UX4WIZV/dogBtYE8CXPsnDst+VHurtaxr0ExAkexAdcFKodHtQsN SwmTw5GgEAc+B3GXgqgSmfGFeXJjXmLxbtb5dkn/Vgl0n/9b+6B5AZpC26BYEcQ9 8Y/4ru64iT5jYlKveXCYe1gK0fvyQad8AOllmiGm6lq2anS2T02JMAgQ3xUXAvXw sqI0UADlW5OMLjwKrGAVIFb9MVXlfWEXzWwQ69gWH3So5kFFlHcWaaWkdAiE3hB5 5Jsdz8jfiWXWg2Pc7r2lEqsFDiRnO0Q1/U7WWuQg2tVpDkmSFZuSPs0GICBGjX/0 kW8lQehJhVJlYIEHss5bh8rR4Glc6svJt1notxcqM9mNHARPr6A9pbyFSctM0fgf fCObXFma6f6ZKj/TerhYSSYVLvfqdvNEG/t2ulxwzDyQBuRlP9rptIJ6ej4= =gmmN -----END PGP SIGNATURE----- --gV1yUYniiDLxW66s--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:16:11 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:16:10 2020 Received: from localhost ([127.0.0.1]:60202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICgk-0008FC-9y for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:16:10 -0400 Received: from mx1.riseup.net ([198.252.153.129]:41762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICgi-0008DT-NV for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:16:09 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRdN27y8zFqGm for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182968; bh=YMgHVSZod2ilAZHAbCdyl3cJ7n2AQv5HUQ8aE5hcg7Q=; h=Date:From:To:Subject:References:In-Reply-To:From; b=RbdQhpl8wsr1Y6JYnnxrZCbaN/oAweMxBMgribzvTdgNItk4oRmyuzKxmhX61W20G iMi8DsneeUfekzPI2Iu/BiicfzmTm6hTzu0KJBknGYfUS7vhZQXBYYTwf335BHcq1y IskMErn2zaHEcDnZBFR4kY/iVK0rXplEKNhsxN3Y= X-Riseup-User-ID: EFF7FF43AF4854D1EB860C9D7E9DC5706133713DB44E001B7FD2DF04206E791A Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4BrRdL706lz8t5D for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:16:06 -0700 (PDT) Date: Tue, 15 Sep 2020 12:15:25 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 8/9] gnu: obfs4 Message-ID: <20200915151525.GH13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G+DT6X5ssgZ56VG3" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --G+DT6X5ssgZ56VG3 Content-Type: multipart/mixed; boundary="oSMU0HVueUMCAvn0" Content-Disposition: inline --oSMU0HVueUMCAvn0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --oSMU0HVueUMCAvn0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-obfs4.patch" Content-Transfer-Encoding: quoted-printable =46rom 6e228ba965d65963456f3232cb8bd7fcc25bf822 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 19:05:45 -0300 Subject: [PATCH] gnu: Add obfs4. To: 42380 <at> debbugs.gnu.org * gnu/packages/tor.scm (obfs4): New variable. * Alphabetically order module imports. --- gnu/packages/tor.scm | 80 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index c852c54a5b..dd362d3af8 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -33,13 +33,16 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system go) #:use-module (guix build-system python) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) - #:use-module (gnu packages libevent) - #:use-module (gnu packages linux) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages golang) + #:use-module (gnu packages libevent) + #:use-module (gnu packages linux) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -47,7 +50,6 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages autotools) #:use-module (gnu packages tls) #:use-module (gnu packages w3m)) =20 @@ -324,3 +326,75 @@ statistics and status reports on: =20 Potential client and exit connections are scrubbed of sensitive informatio= n.") (license license:gpl3+))) + +(define-public obfs4 + (package + (name "obfs4") + (version "0.0.11") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/obfs4.git= ") + (commit (string-append "obfs4proxy-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1y2kjwrk64l1h8b87m4iqsanib5rn68gzkdri1vd132qrlypycjn")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/obfs4.git" + #:tests? #f ;; No test files + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively + "src/git.torproject.org/pluggable-transports/obfs4.git" + "src/gitlab.com/yawning/obfs4.git" + #:log (%make-void-port "w")) + (with-directory-excursion + "src/git.torproject.org/pluggable-transports/obfs4.git/obfs= 4proxy" + (invoke "go" "build" "-ldflags" "-s")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (src "src/git.torproject.org/pluggable-transports/obfs4= =2Egit") + (bin (string-append out "/bin")) + (share (string-append out "/share")) + (doc (string-append share "/doc")) + (man (string-append share "/man/man1"))) + (mkdir-p man) + (mkdir bin) + (mkdir doc) + (with-directory-excursion + (string-append src "/obfs4proxy") + (copy-file "obfs4proxy" + (string-append bin "/obfs4proxy"))) + (with-directory-excursion + (string-append src "/doc") + (copy-file "obfs4proxy.1" + (string-append man "/obfs4proxy.1")) + (copy-file "obfs4-spec.txt" + (string-append doc "/obfs4-spec.txt"))) + #t)))))) + (propagated-inputs + `(("go-torproject-org-ptlib" ,go-torproject-org-ptlib) + ("go-github-com-agl-ed25519" ,go-github-com-agl-ed25519) + ("go-github-com-dchest-siphash" ,go-github-com-dchest-siphash) + ("go-github-com-dchest-uniuri" ,go-github-com-dchest-uniuri) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsae= s) + ("go-gitlab-com-yawning-utls" ,go-gitlab-com-yawning-utls) + ("go-golang-org-x-net" ,go-golang-org-x-net) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-golang-org-x-text" ,go-golang-org-x-text))) + (home-page "https://git.torproject.org/pluggable-transports/obfs4.git") + (synopsis "Obfs4 implements an obfuscation protocol") + (description "This is a look-like nothing obfuscation protocol that +incorporates ideas and concepts from Philipp Winter's ScrambleSuit protoco= l. +The obfs naming was chosen primarily because it was shorter, in terms of +protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") + (license license:gpl3+))) --=20 2.27.0 --oSMU0HVueUMCAvn0-- --G+DT6X5ssgZ56VG3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2o0FgwPCZwAACgkQ YrJ+WmBEwoKlYg//Ya7faXpZVZgsJOLcEvw3OixhW1y0gnw26LBz/I8UWa2usAwN hyo77cu6Cf7UhgHuk525LH5djJ6JCgHK3SHKbWXlHGo3otFnq9iqbZuXlZWWquRi DQ0PWtvx2p1VxX7X2hERTeLix9Qjs4oR66WIbmNdgD5EsnYwcIowq65ZXRlBcc0B svF1SnO6DEXyC7reuORK2Y5K7I3m9i9wqgPTIaXFr98nJd7LMrwUYHNiS8J/cdJU qm0N0CpOiR8dntFD8laxrt3bnTGJqSdGP8yiRH7+K19w3WbPq2u3a0VXrsCkxcgl 5tKdSfbsKI2EA86pv0CeTMrkVfiRaflExFbYFQ1lL46eMIha34DTGVPNZ9bffZvQ wbZatYBt12wK6Lx1MH4/4sSkAa0kv9Y6n9TiI/idp85xsEIrzF7BeWxQR35bjaez UsGbCSG56pv6NZ1xU0dtPw482s/CLsTLF1p6gQdUfWlamES5udlD71kREtcjQVQg 8SLGTp/QcKUZCbN5El3RWQyVET0cJP6yZZjFuH6u67SzgYGtZqrZh4ThTozNU4BP xzTDnZKOwe17kt2kUiJOEsJg+PlPJfBma6HiUpnhKUqeGNiAEmC2rhMO7ouDGJ1j b37J7lHXGAf3Q12uAk4Rzo6H/y+6Y1UPhGYptexcQkmN+cPcZXbaf+PDfFY= =O46u -----END PGP SIGNATURE----- --G+DT6X5ssgZ56VG3--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:14:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:14:58 2020 Received: from localhost ([127.0.0.1]:60188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICfV-00079W-VJ for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:14:58 -0400 Received: from mx1.riseup.net ([198.252.153.129]:40570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICfU-00079O-7p for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:14:52 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRbv5f0DzFrNp for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182891; bh=1NKp+lyAVrEFT4deV2Ibk4jlTMmi19s4byCjZPP5rXE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=KztG/6QM5qOBoPDuYCZ0xOgqdJ6G4SIGhnRTE4fKmWv4LCN2aeQVK4SlDIuZ2Kwas FW1PzlGqcSW8mruzUjndgcB0nBQpOy07k5gT9WvwQgyHGS0VvcUufoyVox/cmULdAo 8uSsiNM9VoriS51C9fxfmZKTmsMa5f+M4Xl83SA4= X-Riseup-User-ID: CB88866184C288CCC82C1671946F2E4529C4C4EA37074172D8456DC0B990647D Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrRbt4Q4TzJmhL for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:14:50 -0700 (PDT) Date: Tue, 15 Sep 2020 12:14:11 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 7/9] gnu: Add go-gitlab-com-yawning-utls Message-ID: <20200915151411.GG13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AA9g+nFNFPYNJKiL" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --AA9g+nFNFPYNJKiL Content-Type: multipart/mixed; boundary="ICrdrp3pM9DyZLTK" Content-Disposition: inline --ICrdrp3pM9DyZLTK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --ICrdrp3pM9DyZLTK Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename="0001-gnu-Add-go-gitlab-com-yawning-utls.patch" Content-Transfer-Encoding: quoted-printable =46rom 4f31263215dffb94e47a4c9e7256e095fb68c1e4 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:47:38 -0300 Subject: [PATCH] gnu: Add go-gitlab-com-yawning-utls. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-gitlab-com-yawning-utls): New variable. --- gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 7c68f36c2a..55975d3e30 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -19,6 +19,7 @@ ;;; Copyright =C2=A9 2020 Jack Hill <jackhill@HIDDEN> ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka <kuba@HIDDEN> ;;; Copyright =C2=A9 2020 Nicolas Goaziou <mail@HIDDEN> +;;; Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -5825,3 +5826,34 @@ with hardware support for AES New Instructions (AES-= NI) and a sufficiently recent Go runtime, it will transparently call crypto/aes when NewCipher is invoked.") (license (license:non-copyleft "file://LICENSE.txt"))))) + +(define-public go-gitlab-com-yawning-utls + (package + (name "go-gitlab-com-yawning-utls") + (version "0.0.10-1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/yawning/utls.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15c46s56r45n22rmq9spnczydnkqrnxff28h5mpnk5yvcqif3lgb")))) + (build-system go-build-system) + (arguments + '(#:tests? #f ;; Tries to connect and fails. + #:import-path "gitlab.com/yawning/utls.git")) + (propagated-inputs + `(("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsae= s) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) + (home-page "https://gitlab.com/yawning/utls.git") + (synopsis "Go library for uTLS") + (description "This library is a fork of the main Transport Layer Securi= ty +protocol in Go (crypto/tls) which provides ClientHello fingerprinting resi= stance, +low level access to handshakes and fake session tickets among other featur= es. +This fork was made for the specific purpose of improving obfs4proxy's meek= _lite +transport protocol.") + (license license:gpl3+))) --=20 2.27.0 --ICrdrp3pM9DyZLTK-- --AA9g+nFNFPYNJKiL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2kIFgwPCZwAACgkQ YrJ+WmBEwoJL9hAAhXX+DfZ0JbFWDMi5FM+zQNJkeA4PcC+jrdjRR2qDhNovBk6D wb1y2Bx/uExkW4Byz2501klRlinXrXBoLqq3fv39e8EYc4AK3xDEmxGrvO65WwwO 1GvsDqwCgrl+kCuVADYA3NMWCvirCBYVE8tx37Psc8eLKXTzvTm2asoNiUhwtnQU R+SyIamP/Xma/SlSAdmrLoBxFfZ8FEh/aj9FLA+GNeLLgdDk+wlbVvgZXAX0tz9B jy9zN2IO/Ey06tL3ZGzPjMDlgI2YGaKkTMDkm0IGdtfosoOqveb3/yauPWJXeffW l04p7wwKLhd/X/sEQltD8UZzDzl7cfoLwcx1DYiC0gRQNzLFzU6gDTW3PUdn/jz8 PnNOT6Ry7h5+jJNrwxBcbuNoJv15Q5x3ZXqkm2G1sACd86H8Mnu5/R4BcyBeM8i0 C/uEWSKT0fO3OFgWOEbjpz0ZC0Xqpx7DPI6kkNIKex9X84AdTqLgz0C9fPZneab3 vTob3ZQuV83zi5Z8V/lapC0CND4Os53dSXJaaBSsSwWspu0isspegxM6pswEXH3D hNWvsooZipfJbnjge5EW7hOmBQxsS9BgqbM3GTmbwc+FgP31HIQ2MRtycJ1mPGVZ 6UtUbtGt5ie+9c63Qn7JI4TG3oz1pzAquQOBhJdMj/6LUyu4Ns82YDiFal8= =dWJA -----END PGP SIGNATURE----- --AA9g+nFNFPYNJKiL--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:12:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:12:59 2020 Received: from localhost ([127.0.0.1]:60181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICdf-00076H-G0 for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:12:59 -0400 Received: from mx1.riseup.net ([198.252.153.129]:39098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICde-000769-2Y for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:12:58 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRYj3TvYzFqFq for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182777; bh=8qg8D+MBg68ay+oQk10PzrQe+YV9zMih8UpoQmxDaAk=; h=Date:From:To:Subject:References:In-Reply-To:From; b=dRK+/oBeazkgd+Osv91a83nf5Snb2baXIV24D9MhjxtIPVm/Ird8dG/vG7kfl2CBX s6UMLKDC+zYT12GCwaX1I+YtoW5tk0qvDxpxUBe+5UHGVH6dO3Ftqd1tGywlwROEjQ kDz1K8mrw7vRRJD2d9UB//046+QK+cozMqs18tuY= X-Riseup-User-ID: A28A018B03CC009FB20893BA86558AE43FB3F9E04DF846393305C8D32F973CCD Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrRYh1MTXzJmhL for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:12:55 -0700 (PDT) Date: Tue, 15 Sep 2020 12:12:16 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 6/9] gnu: Add go-schwanenlied-me-yawning-bsaes Message-ID: <20200915151216.GF13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Z1OTrj3C7qypP14j" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --Z1OTrj3C7qypP14j Content-Type: multipart/mixed; boundary="sU4rRG038CsJurvk" Content-Disposition: inline --sU4rRG038CsJurvk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --sU4rRG038CsJurvk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-schwanenlied-me-yawning-bsaes.patch" Content-Transfer-Encoding: quoted-printable =46rom e88f0e94b84bd51ddf742577d60a5bcb19eff72b Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:33:55 -0300 Subject: [PATCH] gnu: Add go-schwanenlied-me-yawning-bsaes. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-schwanenlied-me-yawning-bsaes): New variable. --- gnu/packages/golang.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 06c9faa286..7c68f36c2a 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5796,3 +5796,32 @@ Universal Resource Identifiers to uniquely identify = objects.") The goal of this project is to provide pure Go implementations for popular compression algorithms bey ond what the Go standard library provides.") (license (license:non-copyleft "file://LICENSE.md"))))) + +(define-public go-schwanenlied-me-yawning-bsaes + (let ((commit "26d1add596b6d800bdeeb3bc3b2c7b316c056b6d") + (revision "0")) + (package + (name "go-schwanenlied-me-yawning-bsaes") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.schwanenlied.me/yawning/bsaes.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0h4dsyw54n9rcwprqy93wv2v1gcvlq1vfqdp1g7wxdkq457rhvys")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.schwanenlied.me/yawning/bsaes.git")) + (home-page "https://git.schwanenlied.me/yawning/bsaes.git") + (synopsis "Go AES library") + (description "Portable pure-Go constant time Advanced Encryption +Standard (AES) for eletronic data encryption. This implementation if +based on code from [BearSSL](https://bearssl.org/). On AMD64 systems +with hardware support for AES New Instructions (AES-NI) and a +sufficiently recent Go runtime, it will transparently call crypto/aes +when NewCipher is invoked.") + (license (license:non-copyleft "file://LICENSE.txt"))))) --=20 2.27.0 --sU4rRG038CsJurvk-- --Z1OTrj3C7qypP14j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2dAFgwPCZwAACgkQ YrJ+WmBEwoImxg/9GGJZjs/ZaaCYiSqJLoxwGob9la70qIYwRoxgxaGh/yGao4oa RyM3n0C5TdcP59TdyeK5S5fHKSjQkoaFKeG38RZX7Rzeg7YVRZkQ8ROTDj2B7qSA l4NWDom0dwijyFaQ/pgzCxr0+ctT0B8kwq45ZZOh4QvOGKJn55zGQxpRC9WOy2Wc fsTQCgPncatcotHX5F9lrrTw1rjUMyi0ENt5fDGU0cBnSSOB39fCmpDrqYCR+21B RPa4gafVAnAEP/otAWMDHY5ybM7HTqTmTO9kiELsvmFxTC1IUdP4MiRPiCw8KGxP YmSE6MW0vdEibFydtVJsVcIjFVZw2MRa7950RLkXneZrsR7FHsNaHMgWCHbl2Yu0 vfmbhgCmu74VDBpSQ2D4fNqrc0CWnohe4YZb30m1jJ2pG3Nn9SbgfoT6TljMcXrc NnNZSwaIQIf9wsjTwfbo6QmmQCg2C2Fv1+dQJKMZNgomBJaB5ZO6i/OjkncpAPEG oMzl5whJgGwuNDEWUz3ZMFS+qRRigoap0k6KnWnTMAJajlp17nBvb1fiVngtuq/6 QVP2YYIkeZAzt/khx2AXeH8CAUjR9FGYaVzEYmHnAsiuAxbmGIG1eU2QXl2w1HwE SyJXODwLVYhPhbLeK+3/C1Ld2h/fBeOOcEnHq75eUF3RPH9lG0DVSErAmYc= =bbe1 -----END PGP SIGNATURE----- --Z1OTrj3C7qypP14j--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:11:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:11:19 2020 Received: from localhost ([127.0.0.1]:60169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICc3-000732-Dk for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:11:19 -0400 Received: from mx1.riseup.net ([198.252.153.129]:37718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICc1-00072u-RS for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:11:18 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRWn2FXhzFrKq for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182677; bh=1qirJlF7SB4xAEsjd5rjhUrH0amj9y8i3WTeS7HbkGE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=U59TrmHziZWjGpGSfA2QUFOYNmhWq2yL522YjqpF48ORYPyClIDvMEnL2J3TPNqMr 7sZP/4PgAwS5hih2QE/h9fSDFOskW7Z/x7S7GhuiMPNzLZja1J+rCTMMGaqawRIw9y mMAF5npb9TOBNGP3B9Sij1dAG3xsxNvk3GvOO4zM= X-Riseup-User-ID: 4B78D16E25113577CEC5884D2756DA0E5386084769E39B06CF9C6DC94DC739C4 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrRWl6xVnzJnMs for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:11:15 -0700 (PDT) Date: Tue, 15 Sep 2020 12:10:36 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 5/9] gnu: Add go-github-com-dsnet-compress Message-ID: <20200915151036.GE13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d6iqOn7HZPWKXx18" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --d6iqOn7HZPWKXx18 Content-Type: multipart/mixed; boundary="ijf6z65S790CMqo8" Content-Disposition: inline --ijf6z65S790CMqo8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --ijf6z65S790CMqo8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-github-com-dsnet-compress.patch" Content-Transfer-Encoding: quoted-printable =46rom e539f026c99a4983713a60928b2be10d70dd3a91 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:31:36 -0300 Subject: [PATCH] gnu: Add go-github-com-dsnet-compress. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-github-com-dsnet-compress): New variable. --- gnu/packages/golang.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index da9a531665..06c9faa286 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5770,3 +5770,29 @@ J. Bernstein. ") (description "Package uniuri generates random strings good for use in Universal Resource Identifiers to uniquely identify objects.") (license license:cc0)))) + +(define-public go-github-com-dsnet-compress + (let ((commit "cc9eb1d7ad760af14e8f918698f745e80377af4f") + (revision "0")) + (package + (name "go-github-com-dsnet-compress") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dsnet/compress") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dsnet/compress")) + (home-page "https://github.com/dsnet/compress") + (synopsis "Go library for extended compression") + (description "This is a collection of compression related libraries. +The goal of this project is to provide pure Go implementations for popular +compression algorithms bey ond what the Go standard library provides.") + (license (license:non-copyleft "file://LICENSE.md"))))) --=20 2.27.0 --ijf6z65S790CMqo8-- --d6iqOn7HZPWKXx18 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2WsFgwPCZwAACgkQ YrJ+WmBEwoIoHg/+IcEBtjdaIrX9zGHF82rUHYMS3iYx0gm/+LnJJT1KyhPy13gl ur8HvufPUHT+Bdp9dhmOQRxR7spGzMlwuKeXy9BWOAMYbSkEauBvorDihRZ5NIXV oGQ1I+FPx0tZTDdkX4LS0V9FfQBdRtG7HnOFUWG04WMPuGrkxygTvjHYFC49+IWS lvxmSnmUWKMzSbz4slm57WN7nT7qWLG/HoKlG4MiSDE71CKjNohRF8Ga2mG+bXmY MGmqmuUocnM2k10je3jeNBi3Sc5uDN/wOV2CcQm9hvxHenSjl2qeV7gSJPZihgB3 1wo25rbrC/8Ay8s/685AEWvZyX5BOtzGKV105zxHBq1aTh6QQJGTg2CGYwHW1Ils gHirARjDYTO38fy4IuEQsEAYtBVYyy3o/7k6g+ZPDM1Sx5t0MXippuBM10Htod7l Oy1Xe+YFi2tONFTQn36Da4PV2EVA95/AzgbWZ2eimQyCYG08vQxjF1/dnkGwUPmB CDLy+t6c5ey4jlrDOMwxmWqeOhnpQh2Gyy8kPqGYK70UcZJ7nlbtYUFwyI+ZyXN4 MPaEpptdMyuJjpMADm+Lupa9myMy/R5OHE4TIZD0Svecu6ufJvaxp5mvsqCWHmhw 74DN/UwfyxinzIiR0jqDW5y+FEtPgrfttym8EHtmOX08ccttUWJ0Bg09+TI= =STG9 -----END PGP SIGNATURE----- --d6iqOn7HZPWKXx18--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:09:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:09:14 2020 Received: from localhost ([127.0.0.1]:60155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICa2-0006ye-DC for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:09:14 -0400 Received: from mx1.riseup.net ([198.252.153.129]:35648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICa0-0006yW-QG for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:09:13 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRTN37DmzFpcV for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182552; bh=4G7kYbf4zNMGLu65R4pBDKEHXAJ8SmUrEVtvOmP8m+g=; h=Date:From:To:Subject:References:In-Reply-To:From; b=pkhFZPjSEn121IBOBseg4OrpcMYNO23rV9uR3did9WqS7RY+rGXHp49RfdpCqyTzg 5m0o8a3eqc1QONPcTvjBrhTOkKdDfU0a7k+hTQQpP3KJI66eIGM8sOTYFiSKg9PSI6 oVHduDYG5Yj1hMWNwvAhg2j5W+Rfs97H1C78y6XE= X-Riseup-User-ID: 472FF2DEE35686AE1B4043B4E256F0D935DB1C54D0214D069435F027BA6FB859 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrRTM2J4xzJnC2 for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:09:11 -0700 (PDT) Date: Tue, 15 Sep 2020 12:08:32 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 4/9] gnu: Add go-github-com-dchest-uniuri Message-ID: <20200915150832.GD13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YrlhzR9YrZtruaFS" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --YrlhzR9YrZtruaFS Content-Type: multipart/mixed; boundary="2NLGdgz3UMHa/lqP" Content-Disposition: inline --2NLGdgz3UMHa/lqP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --2NLGdgz3UMHa/lqP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-github-com-dchest-uniuri.patch" Content-Transfer-Encoding: quoted-printable =46rom 46b0c175ce9c440c469c4456960adab9503c2bfa Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:27:56 -0300 Subject: [PATCH] gnu: Add go-github-com-dchest-uniuri. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-github-com-dchest-uniuri): New variable. --- gnu/packages/golang.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 471ed31965..da9a531665 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5745,3 +5745,28 @@ Pseudo Random Function which is suitable for usage i= n message authentication codes and was based on the design created by Jean-Philippe Aumasson and Da= niel J. Bernstein. ") (license license:cc0)))) + +(define-public go-github-com-dchest-uniuri + (let ((commit "8902c56451e9b58ff940bbe5fec35d5f9c04584a") + (revision "0")) + (package + (name "go-github-com-dchest-uniuri") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/uniuri") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1x5bsbm1nlphsv96zd0rbclfaa1swpz5bp14x7s5dbxp0awk2gd4")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/uniuri")) + (home-page "https://github.com/dchest/uniuri") + (synopsis "Go library for random URIs") + (description "Package uniuri generates random strings good for use in +Universal Resource Identifiers to uniquely identify objects.") + (license license:cc0)))) --=20 2.27.0 --2NLGdgz3UMHa/lqP-- --YrlhzR9YrZtruaFS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2O8FgwPCZwAACgkQ YrJ+WmBEwoJEIg//YOP5rAeag2yGs8Iv6twzYrbkjTs8WKP7KZz0KT2IQP6FTlr4 v58AlDG96Y30pUaB6rsyhqZxEgpI4MSRYB1Ldk/YHMlnqz1PIegDZ/DqDuUxzFhe tL3XwcgiIssnCboVmflDV0NS+3ezTfeH167jYu0ARN0iN3Qa5jgFCVPh6Y+fX1i6 BR+85bmZpECy/hZH67vR9VSBKZTkyrCOahCj/TyBFIOVs5OLJRbhLhYsnIXYeG/s G76K5z0W0e9yjf5S3QOy4xgHhfxZHh2TE7I1coIGvu+kP6Ji15VCtp7XBHf5TKqU tOj2i4oXjIEux4Ioic9rllgADTyqXURG7uk9XrqEBKIMbjOvoLyrjsUsaxKC71AW 6ZNPczqBz91DeiYrk2ass+xZh/utq9jtQTND0BhixBfwv7ztutviPLXiqQl8QDZi gbjp1GDZWOUpb7Aq/9o9H0oLjvPgOW0dyH4EJja1mM5m4hrBD/VngJUI1eUU1vJY kWPoCHXKPCYw8JMNEd9VboMa7XercTMrtt0ame6Yv6HWVLXVP5WOzVxKpSXsV3td tt2lWQEyv5H+QukRmyE+PNJaC22vQvpNrQTSeL6YXttG6/XbL5wQH9T1S89Vlzue HXoi+MA0ejHhOJR9NaRXNyqUv95pEuXvn0MPPx8taIZJdTjd7iShdo/FDjo= =Fh5j -----END PGP SIGNATURE----- --YrlhzR9YrZtruaFS--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:06:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:06:51 2020 Received: from localhost ([127.0.0.1]:60151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICXi-0006uO-OY for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:06:51 -0400 Received: from mx1.riseup.net ([198.252.153.129]:33672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICXh-0006uF-KR for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:06:50 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRQd1VTjzFrG5 for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182409; bh=BVUzSQwaFPR696a7jzCnfzdEafC96apjpAL4fC74f5U=; h=Date:From:To:Subject:References:In-Reply-To:From; b=SsoS80aC2zxz19Tsj+hUybUoJ+27dt0ZKOTpz71p0EfoTpBNuiABg20hIPA8iecPs OKVk4MxZk5lQJUuMCF5MSvcKizwqUgybShXOH21top9iEvcVQi4Basg60q0JQeeoAX w3WkYgPpzgako3WvaBMuVob9QCq5/hxdL3fw+HyM= X-Riseup-User-ID: 40F43DD4A1323CE134FFF7F5C57CE24ED9B21B7390C2F726A0D47A8A86DF4F37 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrRQb6LhqzJmhL for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:06:47 -0700 (PDT) Date: Tue, 15 Sep 2020 12:06:07 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 0/9] gnu: Add go-github-com-dchest-siphash. Message-ID: <20200915150607.GC13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WlEyl6ow+jlIgNUh" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --WlEyl6ow+jlIgNUh Content-Type: multipart/mixed; boundary="ytoMbUMiTKPMT3hY" Content-Disposition: inline --ytoMbUMiTKPMT3hY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --ytoMbUMiTKPMT3hY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-github-com-dchest-siphash.patch" Content-Transfer-Encoding: quoted-printable =46rom b1d59160bf4c444784f68b5b35d20c48cb1eb601 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:18:41 -0300 Subject: [PATCH] gnu: Add go-github-com-dchest-siphash. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-github-com-dchest-siphash): New variable. --- gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 8eab872814..471ed31965 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5718,3 +5718,30 @@ is unmaintained. Newer software should use x-crypto= instead.") ;; License file is referred but it is missing. Probably because the ;; author decided to discontinue the project. (license (license:non-copyleft "file://ed25519.go"))))) + +(define-public go-github-com-dchest-siphash + (let ((commit "34f201214d993633bb24f418ba11736ab8b55aa7") + (revision "0")) + (package + (name "go-github-com-dchest-siphash") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/siphash") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "08s076y7vmjqnq7jz0762hkm896r6r31v8b31a3gy0n8rfa01k8k")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/siphash")) + (home-page "https://github.com/dchest/siphash") + (synopsis "Go library for siphash") + (description "Go implementation of SipHash-2-4, a fast short-input +Pseudo Random Function which is suitable for usage in message authenticati= on +codes and was based on the design created by Jean-Philippe Aumasson and Da= niel +J. Bernstein. ") + (license license:cc0)))) --=20 2.27.0 --ytoMbUMiTKPMT3hY-- --WlEyl6ow+jlIgNUh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g2F4FgwPCZwAACgkQ YrJ+WmBEwoLEHQ//eim1QrKY4aNxskV89L25DRzFz5eDMQSlP3NQJCo7UxpN8fbx 6J6Sjus1WKIZlNDkuAXqMlgP0+H0ZHaUK9NQNITPGuwppgtnhnChQXgyu8bbtQjq fWRvRweZdhciQG2XcLGHQhLN0RF/V4samaJx9sS8w1hZ77LB4S4R+Fq2wJr49qDI SBNrS7RYqtROgYEoYEiTiz4MJMahPQFJtNkvqzo2TsZ3AZNDdCeMeUnF36tl/2yg szGv926oNHgUlVL4HDwNn/ZgOao6iAzKr5BZkqXLSbDvINK+5EpW/pDyXce54+Dq JCEMUXLOSAwB8kpvpDoo37O5coRONmsW1qDJZNhqgj+SHRzflfwhXlk857skDXIb Mri+rLXj0U0ihteGxQIneW9s9aZo/oPz4AKVJupjaGOc19FPVirrA5a+BnAhtfL3 Zu3770xU5NWRxqbvcQV7sJnrWDe+mdbe1fvFVIkoUTC9sJLwOw3+5lHPjePGP5KY 2pQY+TliCNUkwzLvMRyzXlAnH3HKNEDC2o92eF9NYwr9tuHsNLzYITANQnPFItN2 1ZVUJYZ8xD40HsQPDPSBKNkhKitpQnBiiff+ruwq1WmqzFOL6NQXWwwbwDOp2Svz OuLLbvkPlguQR2IphQ30EK3o5BlPIAT++MwZP0BsYbQQ8vntDglayG9dFzA= =g79z -----END PGP SIGNATURE----- --WlEyl6ow+jlIgNUh--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:05:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:05:39 2020 Received: from localhost ([127.0.0.1]:60146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICWZ-0006rw-CO for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:05:39 -0400 Received: from mx1.riseup.net ([198.252.153.129]:60334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICWW-0006rm-GL for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:05:37 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRNg4ShbzFrP7 for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182331; bh=N4bImFdG5rGuj4lVF0OYn7u3JXFw/EfRGckc3kDx9FA=; h=Date:From:To:Subject:References:In-Reply-To:From; b=Ow1XpFipZR0Gu2JVyoyQ1XWZ5Sk/Nh8LN03cs/aRK8LZWsGxaUNXQG+veJFkIww4w YenZ1OC2A6Uu9AOJkkfgZVMWgkuEPffdvxAwyTqSNWI2o+ApmIccLS8yNOC9s4gLLE 7B15GwdtUargKn+F4TxCRFERqfITd+Y9TMBQAa4A= X-Riseup-User-ID: 00FD3A2F2EE2938024C0E4493B1282AA2D51DA8BDAB7164D22C38427531DBC2D Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrRNf139TzJn23 for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:05:06 -0700 (PDT) Date: Tue, 15 Sep 2020 12:04:21 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 2/9] gnu: Add go-github-com-agl-ed25519 Message-ID: <20200915150421.GB13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jCrbxBqMcLqd4mOl" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --jCrbxBqMcLqd4mOl Content-Type: multipart/mixed; boundary="kfjH4zxOES6UT95V" Content-Disposition: inline --kfjH4zxOES6UT95V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --kfjH4zxOES6UT95V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-github-com-agl-ed25519.patch" Content-Transfer-Encoding: quoted-printable =46rom a9a38cf97812f18e1f39b9009d040f16af501efe Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:15:31 -0300 Subject: [PATCH] gnu: Add go-github-com-agl-ed25519. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-github-com-agl-ed25519): New variable. --- gnu/packages/golang.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 0bcb01fd2f..8eab872814 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5680,3 +5680,41 @@ error messages.") Transports are a means of connecting to the Tor Network from places where = it is censored.") (license license:cc0))) + +(define-public go-github-com-agl-ed25519 + (let ((commit "c4161f4c7483313562781c61b9a20aba73daf9de") + (revision "0")) + (package + (name "go-github-com-agl-ed25519") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/agl/ed25519") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1wjlbzi0w63rmlzgk3amw274wsl0zhcn4yx2lraffbkhqappahxc")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/agl/ed25519" + #:phases + (modify-phases %standard-phases + (add-before 'reset-gzip-timestamps 'make-files-writable + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) (chmod file #o644)) + (find-files out "\\.gz")) + #t)))))) + (home-page "https://github.com/agl/ed25519") + (synopsis "Go library for ed25519 public-key signatures") + (description "This library is a Go implementation of ed25519 public-k= ey +signature system which was designed to be faster than previous digital sig= nature +systems without sacrificing security. It is currently used in the +implementation of obfs4 and should be not be used on newer projects since = it +is unmaintained. Newer software should use x-crypto instead.") + ;; License file is referred but it is missing. Probably because the + ;; author decided to discontinue the project. + (license (license:non-copyleft "file://ed25519.go"))))) --=20 2.27.0 --kfjH4zxOES6UT95V-- --jCrbxBqMcLqd4mOl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g1/UFgwPCZwAACgkQ YrJ+WmBEwoJ6SBAApmWNIpeSmO7S62UaBpDG+UIsgGMFIjQ48BEmb/1fjkNMMobw ZK+nMIWOeWYMXerIY0vbhIStzErhu4QyrDaTemP19SKsOefaKdBA5zBQ/0H75Bce 1MqncokLB2byZTv7gpBKG0uN66tVJ1WRF9TVBneJK+GL4SXonSEYhv2IPbqx1Q7u 7Pym+pCD4oQFq78hIAfH8XDerlaYsFau69ivEWx77J12pa9NP0IDoDai44Xg/7vY Ajc/+cF9G7QciTlWf0d8SYrj9NVHsBTxibd751yIlfrhc14hArdzCdlVx0u6Xe4Z EhGIQYOXhlz4W4YWszicc7XNsUJgCk/FCcWPEOHSspfQCNxKv7j3O5xwYUOUjH6w 9W5qMwgxSYJXkF9ChIavMslhfZieIPLH6OFfIJEp9PLcnbPCoffko6Om7nqwwJwV 7KOgb8xGmITE0Up2ncrd4WlWAqeSvutLQ6mXb4rivEtCdopYiQIUh5hjnTwAOOJ9 egehbFVCn0Dk5zCqmn2z6zdnuakfDd93tYTRiiybTyV8dGWTb7cPYiH8e50zldHb scxa+Vrj8G/Ol3iHCOdfu9rbf2zbcKoQiJga6HGHCc1vg3kbLxk6Vof2v0ZAW5ir 4ep8EZuHe6ogHaSEkT5IEwF7I232vyhgfeW/J678YVxti03QvaKSdMWSdOA= =Zyh/ -----END PGP SIGNATURE----- --jCrbxBqMcLqd4mOl--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 15:01:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 11:01:59 2020 Received: from localhost ([127.0.0.1]:60138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kICT1-0006lp-Ce for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:01:59 -0400 Received: from mx1.riseup.net ([198.252.153.129]:57280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kICSy-0006lf-Fr for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 11:01:58 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrRJz4szwzFpHj for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600182115; bh=+JzayqEXOuL0SvMrZmGh12hqL05ivT+W9UGj9zq9tp0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=klbesk6NK1wS1n9QHwMvHcEb80rPXMHp9JVXCra+tGNC6+plSJaar9HmQe5MX23wF aWAOiMkEpyEQwKK0O1eKfbpfLc4ULbSZp4PYsV4ODQQ/Qeur10jH1BFFcp7MOJP6HB Q4EEfiadI1ZgyR10gVSvv5WSU+lBNCzV1KJ+j3ew= X-Riseup-User-ID: FE2F4EBBB94C8D185CC40DA35C27DA160E751E3D3D527DB0089C75CC15C2E684 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4BrRJy3DHkz8t5D for <42380 <at> debbugs.gnu.org>; Tue, 15 Sep 2020 08:01:54 -0700 (PDT) Date: Tue, 15 Sep 2020 12:01:14 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH 1/9] gnu: Add go-torproject-org-ptlib Message-ID: <20200915150114.GA13296@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> <20200915142128.GA12025@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MfFXiAuoTsnnDAfZ" Content-Disposition: inline In-Reply-To: <20200915142128.GA12025@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --MfFXiAuoTsnnDAfZ Content-Type: multipart/mixed; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-go-torproject-org-ptlib.patch" Content-Transfer-Encoding: quoted-printable =46rom f92795d45035e0423c69a5f6264e35f466840778 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 14 Sep 2020 18:03:28 -0300 Subject: [PATCH] gnu: Add go-torproject-org-ptlib. To: 42380 <at> debbugs.gnu.org * gnu/packages/golang.scm (go-torproject-org-ptlib): New variable. --- gnu/packages/golang.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 8723592b51..0bcb01fd2f 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5656,3 +5656,27 @@ Included are the following: except that it adds convenience functions that use the fmt package to form= at error messages.") (license license:bsd-3))) + +(define-public go-torproject-org-ptlib + (package + (name "go-torproject-org-ptlib") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/goptlib.g= it") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lh938194hvkf8pqgnxwf6hvjv9rv0j3kasi07r2ckrj8sxzk4jc")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/goptlib.git")) + (home-page "https://git.torproject.org/pluggable-transports/goptlib.git= ") + (synopsis "Go library for Tor Pluggable Transports") + (description "Library for writing Tor Pluggable Transports in Go. Plug= gable +Transports are a means of connecting to the Tor Network from places where = it +is censored.") + (license license:cc0))) --=20 2.27.0 --W/nzBZO5zC0uMSeA-- --MfFXiAuoTsnnDAfZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9g1yoFgwPCZwAACgkQ YrJ+WmBEwoJLgw//UpgdAgtcx9zZgf6Da2/oRwIimWEAJxWtD0VY9gb7Q8HZGcu1 3uZvxr2JB9VTwE4pNmUyrWsyT+o9HuKShFbWZRorab0k8puOkmsKUKRoqdz9VPmn 1uF/LNUXRlIs4+rAAqWLeN7408UW+13JuLpl9yj5CaIFXqqATzoEm8SVQ9IbFhHd HEanggiW+/82LKK+tnVgq4bGC/4HBlpjTfTmC+IjVuKMV+wACUggfYX/yD9eE7hK hzKxhe+WRfjUrmCebJcmhC8yPtHW6HZfuF2rxMa7zqi867nKKc5BdfYCo6KXfMGD KZlgcSW7oYLuB/FHRehCk+vTyPOIsXkIj1Vg8v5ozCxEx4q01WL9DYosNbrGrtXJ n1BCsJZAt7DyApmbJr0Z7jr5Qu+NAt+FH3LpG6g+53q/E91U9qs/10qlxWHFIiHE 1UELtNZ8iTvti5Mz8tdvt7pn8aGc0EWt4aD3ZK2FNVXJP/ykmtXnA2sMcFL/8Ow/ M8LNJLhkrMHJGMIBL4WhL1PBfZtodzFgiEvjmz7RWdRw7alwIT4a9KgTwUKHIYHK vSmID+RGCZtCmQVGyi+3VyKumAvhX+9P+8CY1vheMYXQV3Hb0JWXFuCGsyg9dW/o YjvuD0nO48j3iCy2HdIyFMHNlndxTjgskerDQpxqI6+n4LdXlxxzF9n6veI= =/UY9 -----END PGP SIGNATURE----- --MfFXiAuoTsnnDAfZ--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 15 Sep 2020 14:22:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 15 10:22:16 2020 Received: from localhost ([127.0.0.1]:59997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kIBqa-0005id-7P for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 10:22:16 -0400 Received: from mx1.riseup.net ([198.252.153.129]:60086) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kIBqY-0005iU-AX for 42380 <at> debbugs.gnu.org; Tue, 15 Sep 2020 10:22:14 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BrQR92t6lzFdvP; Tue, 15 Sep 2020 07:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1600179733; bh=3tFILz5UP9QXST2Ak7uDSs8D5+J/GNhP6HgJwBNxwQE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g/Wr1NQSy80EnTnG+zTNGAlld7LeqXZdgediRYzA42iQtnKUmN+kVH8hb8VBB4WD1 UsduowdNlq8gnCasavebAyZnx27cTHWpb9lpxgjADnQE5MfhADsFzmVBl6HAe3x3zF UtWqpZ5IoFWbH4N0uG9FAG6SjH3BzX5ldk5Jr32k= X-Riseup-User-ID: 1FE39216BE651DA6B6E89601595D1F7BBFCB2C1195562F1AC901BDA2CC2D04BF Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BrQR74QnZzJrrn; Tue, 15 Sep 2020 07:22:11 -0700 (PDT) Date: Tue, 15 Sep 2020 11:21:28 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN> Subject: Re: [bug#42380] [PATCH 0/9] gnu: Add torbrowser-unbundle. Message-ID: <20200915142128.GA12025@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <878sdjo1qv.fsf@HIDDEN> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: Efraim Flashner <efraim@HIDDEN>, 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) --azLHFNyN32YCQGCU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Ludo, qua 09 set 2020 =C3=A0s 09:20:08 (1599654008), ludo@HIDDEN enviou: > Hi Andr=C3=A9, >=20 > Andr=C3=A9 Batista <nandre@HIDDEN> skribis: >=20 > > For sure. I'll give it a few more tries and cleanup the mess > > here before sending this patch series. If I don't succeed, I'm > > planning on sending it anyway so at least the libs can be > > added and maybe someone can spot what I'm missing. But maybe > > it's wise to hold Tor Browser itself since there has been an > > announcement of some large percentage of exit relays messing > > with Tor traffic[7]. >=20 > I don=E2=80=99t think Guix users will radically increase traffic over Tor= , so I > think we can keep going. :-) Just to be sure: it's not so much about Guix users increasing the load on Tor Network as of Guix users not having the benefits of this extension and being prey to sslstriping. Since you're giving a green light and I've encountered further deterrence down the trail, I'll be sending this patch series which also updates Tor Browser to the latest version. I've left comments on code where I see room for improvement, in case someones wants to help. For now, I'm trying to solve this issue and I think I'll start a new thread for tracking it in order to avoid clutter here as https-everywhere requires a good many new rust libs. > >> Regarding Tor Browser itself, can you think of ways to factorize code > >> with IceCat? > > > > Other than sharing the https-everywhere definition, I was > > thinking maybe we could take a diff of Tor Browser and Firefox > > and avoid downloading firefox source twice when building both > > browsers. But I need to take a more careful look. I'll give > > this question some thought. >=20 > OK. I was expecting at least things like some of the build phases and > most/all of the inputs to be the same, but I haven=E2=80=99t checked. Indeed they both share many inputs and phases. I've actually started this definition from the IceCat one. I'll think on how to merge them back. Probably some inheritance is in need. > Thanks again for all the work! :) --- This patch series adds Tor Browser version 9.5.4 to Guix. Unsurprisignly, building it with '--rounds=3D2' seems to imply that it is deterministic. --azLHFNyN32YCQGCU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl9gzeUFgwPCZwAACgkQ YrJ+WmBEwoJQNxAAm4HsW2cN4Kt4XjM6WT1erGkwIMpegxHpPCFnIXL7RqFtXj2S DatADHACcO8sAv8oZCHX34OspezA+jlR8Snlw5RrEIOK2OVZtIHTyQilAmmw2maq qtTKtElF6eccLLj+Vlt/T/3rzNU4dlgPNBpTykDAvt7bgxfoLkxrZh1lici2zyp+ 7H2RsTA8NFMdrAZALwau65gbngGV4YqWUcuPR+xEcMooLXU2WAqJDxvP+wtiwN+K 4m/qACY0hzaqfh8rQdSCCQ/LTmU21rjbjMBFen8d4ogoKKWRjP3jIjs9nfS/RkRz EDpv1NUql58RQkyhMrC8IOg9pCgtmjgthTwVj2dAibrb2xZDJVDPCkNCqXwssLoO nzahqCQpB1UBQO77vFYpDkvol9mKSQImD/OgmjrARGbS4c/lQqCRXFBbiyQ3AFty pLkMzBEGWmBqMdMGRBmHxrNnCT6l1PDCRLGt0HrsKA1PbQDqJ+Xku/ZEURVrj/R7 8/Wfr7bgAlEOb2f4/3JvaGgvAm8o5Jdors0qV/m/7V2UgGiYq1ZmpoW34ZOWRQNF gK0S+3gL49qSc4qpTpd00/hBAbuPXqdfhEAgO4ZU4hdZ6x54D+1eXBOdDRgzo16r 8xWiKT1pDJp7D0pb1iAY+2f81EcvSbXirSU4pYHA0wBgZlWYKagb4dY6y4c= =yek4 -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 12 Sep 2020 13:37:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 12 09:37:48 2020 Received: from localhost ([127.0.0.1]:46575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kH5iu-00027H-HW for submit <at> debbugs.gnu.org; Sat, 12 Sep 2020 09:37:48 -0400 Received: from knopi.disroot.org ([178.21.23.139]:45996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <raghavgururajan@HIDDEN>) id 1kH5ip-000275-A1 for 42380 <at> debbugs.gnu.org; Sat, 12 Sep 2020 09:37:47 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E6C61529DB for <42380 <at> debbugs.gnu.org>; Sat, 12 Sep 2020 15:37:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ehcVV3jqtOVh for <42380 <at> debbugs.gnu.org>; Sat, 12 Sep 2020 15:37:40 +0200 (CEST) To: 42380 <at> debbugs.gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1599917860; bh=sHEpWBvaHw6gq+XSavftdzuY1gfHryeXRcJLRGNuNKo=; h=To:From:Subject:Date; b=XJwvUQryBCUZdU6O0ZVPjWAAEaNkSICitLxVWRMUZqeg3HinEFzPN/uwIgbbcDCnN /JaxrvDdUj0FHRu8V/xltReyeXnfFCp3I1aPZEv9xNcG+6zIS3OdmjRTO3zSuiwmGT 09ZuwgdAoS61cD0Bb7KRu4D8Ouq/96dPMbRS2oaDZWYlw22/NBAIWPxSvlK5DOeE1A B7T+r6dh9yYVCvO7VmbVWT2VJBPS5P9JQYxY+N+cKHhpShZY5BB/s/LBHXG9oEw2SM 4zC1wKUWJA4e8WXsTBGP+qjOk5xSPqM85UQhyE/g/0E0eJ0oPq1hi7fcLRCluSrJNU hNduVYCbTVGLg== From: Raghav Gururajan <raghavgururajan@HIDDEN> Subject: Wow! Autocrypt: addr=raghavgururajan@HIDDEN; prefer-encrypt=mutual; keydata= mQENBF9bXH8BCAC7baQP1wbhQBWr5vUKUs2iVJaSGpKcjUMij7xWpfhLKIVBwqrktbrQZ/2D OTvnoGi0oBxamFZ0JIdwKygD50azPiKQtgEewXoZxx+Q5amZMPCm49hJmxuun4QUWwm2UzXe qf03/P1CA1XvJ399pGOjzmbEZKfrP5k/9JMRWYMde9+mPnOo0f1UY0plgbgC6AeQINx+N/Da RcAyqKBd3eMhbK82ZGtoVVjzhQwhs7XxWOevTFyRxFdjqgOKGf5GEXPE4V9xcCxD2NN6ukk6 4ZPXGdTXsdURmWRpZPfSetGS0E4EoGd/y1hrn2SSk4rpzp/Ygn+zEj0PZVa+aYfKjk6jABEB AAG0LlJhZ2hhdiBHdXJ1cmFqYW4gPHJhZ2hhdmd1cnVyYWphbkBkaXNyb290Lm9yZz6JAU4E EwEIADgWIQSMM/Sm4O2cGgqRyauneFo59CKMnAUCX1tcfwIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAAKCRCneFo59CKMnAQDCACwmNH4amCI1fn5tuaTeFnMKK6e4vNYeYI7KuvTCadF ZgttKdrw6l4tOLHh97J3fUKksgk+Fh9uzqyv+NFeLnkbmwT+f7mzQalMRX42eaEbKn2JRoZk navjnJe0QxjxSYqIltbm360K8OIlaE5G90oaSZU4bvCkslVM1BMWi+vjWrL5jHwTPvOLtMLk 19+XN/eOzzJkXFSti6qsOqx1CUj6Ffmz8OG1ttOAGt2ZPX+QJtMOxbdcNtlqhEbH2HS1VBuC g6jgkgpCqxXdc8QXboQ4hxoSqoFkW64aq/ydkr+6e3JafKfY9rPc9yU5/k7wv6wmgNaMp+ZN aICDu8/fFkY+uQENBF9bXH8BCADGvjSiktvmm8Yswgli/e83Zq9Kxv/2adB+9Dhyz2jX2k4w 1wCMNrmg1Ld951CpukC9uW7V6aVbmv8WEdwE4IBe1kqlxGI9PFhAKT4i9fvEaun1b6grcS1t QC1rFwXiHiEUnJE7LLNcXbn0bBi810nSvuYv42kKLG7TwUuxWAIiPj+I5v4zwyyJ2+4jzPdR PuLFBG4YEX6ECqjeGBZq58cmOWL5u6Dm8IynXiv+vCgUGd5mnIAmzxXtP2P033n7+cwEuTz8 4IdWZZBY679RnLAz/LDNxZKGUjAINvEDCrvu9iNreuOu//cMYWdSCNYLh/N8LS/g+aFR4LHH mRiWslLvABEBAAGJATYEGAEIACAWIQSMM/Sm4O2cGgqRyauneFo59CKMnAUCX1tcfwIbDAAK CRCneFo59CKMnIWiCACuKyJOqA0C6tI94eAeBfy1UMC7CvfSBOwRyrzVMOF9B/YxnrvBmhk3 e8tMwwWNctsTwyPR3fZM1SgBghjGFzVZ4xMRjlN+lrTSu2sxdQgXfjWjmBYO9LsnfvwBLi7L +WoftGgLzHk/fdLF0DdZnt9Mfrx6dG0p1GSGyvvukHs4veGDUdDfc8ZnevtM+mJx7TSQN6Zd 1bFe4W7Xqy1Gfwy29Na3inl370Qwa9Hm7thk6ai4J59gN1MPyWhbSy+tXkGiYHMxHR3JOZmV gaD1lEQw1uvPsropMEKHQz6Qqr9ryVFkeSEbDv0PZwdMGGzdn+GBFxCxa2rloGEUKYUbVQGO Message-ID: <ecc4d8c1-92c7-7a81-9c92-2d87f001ddfc@HIDDEN> Date: Sat, 12 Sep 2020 09:35:17 -0400 Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="op4aV1eXTIFQ2DL56ixLaE6qz51JCixID" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --op4aV1eXTIFQ2DL56ixLaE6qz51JCixID Content-Type: multipart/mixed; boundary="bsoGtc0M3FGu5PU2ZyIbZRoDgafIaeKCh" --bsoGtc0M3FGu5PU2ZyIbZRoDgafIaeKCh Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hello Guix! Thank you all for the hard work. This is a high-time package. Any idea on when it can be merged to master?, at-least a minimally viable package? Regards, RG. --bsoGtc0M3FGu5PU2ZyIbZRoDgafIaeKCh-- --op4aV1eXTIFQ2DL56ixLaE6qz51JCixID Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEjDP0puDtnBoKkcmrp3haOfQijJwFAl9czpUACgkQp3haOfQi jJzVWAgArzt8AXgw9sJuc15tAaHrVJHkBfvZQxDVTO9XuzpuxkHhLOmmHWzfoBHB A4ClffLTKG5zl3Qr3iqlNwvNYj9ToCmqpltMMq29qzgJvpehR3cvgTGdJN1vowEl JYAKZnU1XwmZOzMw7xFNscztPfY4AqibMJCLUkkgAEhwFaojM4jG7nCdRfwH/Z0J c3zwzPUIz0jz1xMgjpXCs8uaLQOubI47Ywe/nvwHQ0NWByVouO3Z3gZzXglN7/Gv xLuP1JHdKUSof6GJ97dAtNTjjsYSuUakmy5asqmnUa/AqDSlaAAelLzloZqTP43k GP7ltRtJ++HNZX64oblsZ8CrBXvzQQ== =9ZfW -----END PGP SIGNATURE----- --op4aV1eXTIFQ2DL56ixLaE6qz51JCixID--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 9 Sep 2020 11:00:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 09 07:00:28 2020 Received: from localhost ([127.0.0.1]:57435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kFxq0-0007Xo-5s for submit <at> debbugs.gnu.org; Wed, 09 Sep 2020 07:00:28 -0400 Received: from flashner.co.il ([178.62.234.194]:49586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <efraim@HIDDEN>) id 1kFxpv-0007XV-I8 for 42380 <at> debbugs.gnu.org; Wed, 09 Sep 2020 07:00:27 -0400 Received: from localhost (unknown [31.210.181.177]) by flashner.co.il (Postfix) with ESMTPSA id ACC9A4034D; Wed, 9 Sep 2020 11:00:17 +0000 (UTC) Date: Wed, 9 Sep 2020 13:59:44 +0300 From: Efraim Flashner <efraim@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: [bug#42380] [PATCH] gnu: Add torbrowser-unbundle. Message-ID: <20200909105944.GQ1643@E5400> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> <878sdjo1qv.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZaW/dtY/7oMe/vLp" Content-Disposition: inline In-Reply-To: <878sdjo1qv.fsf@HIDDEN> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 42380 Cc: =?utf-8?B?QW5kcsOp?= Batista <nandre@HIDDEN>, 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --ZaW/dtY/7oMe/vLp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 09, 2020 at 09:20:08AM +0200, Ludovic Court=C3=A8s wrote: > Hi Andr=C3=A9, >=20 > Andr=C3=A9 Batista <nandre@HIDDEN> skribis: >=20 > > Just a small token of my appreciation for your years of work on > > guix. I'm glad to be able to give something back to this community. >=20 > Thank you. >=20 > > I've been using this package for the last month or so and did not > > hit any bugs so, though I'm not a heavy web user, I think it's fair > > to say the result is functional. > > > > On the down side, the https-everywhere extension is broken as is > > since it's missing lib-wasm. I've built but did not send here a > > version which just copies lib-wasm to its proper place before > > building the extension and this version works without further > > issues. > > > > The reason I did not send it to this list is that lib-wasm source > > provides a precompiled prepackaged file[1] which is then used on > > https-everywhere build script and it's source code is not actualy > > compiled[2]. As I understand it, the Tor Project just relies on > > this precompiled binary on its build procedure and the same seems > > to be true for IceCat[3][4]. >=20 > Oh, glad that you were able to identify that issue, which presumably had > been overlooked so far. >=20 > > In order to have everything compiled from source, I've had to > > define a lot of rust libs which were required for building > > wasm-pack and then to have a rustc with wasm32-unknown-unknown > > target enabled and compatible with wasm-pack (apparently newer > > versions changed compiler strings and wasm-pack errors out when > > trying to parse). For over two weeks I've been trying without > > success and always thinking that the next build would succeed. > > > > Long story short, maybe there's just one more issue pending when > > compiling lib-wasm. When wasm-pack is invoked, everything > > compiles but I'm getting the following error: > > > > note: lld: error: /gnu/store/kwdsf42z7ib6fr5vggqi9nc4jpi1znxy-rust-1.38= =2E0/lib/rustlib/wasm32-unknown-unknown/lib/libstd-373ca16e620a2f9a.rlib: a= rchive has no index; run ranlib to add one > > > > for a few rust libs. Without lld, it complains about a missing > > rust-lld binary. Also, this appears to be the rust standard > > nowadays[5]. >=20 > Ah. I=E2=80=99m Cc=E2=80=99ing Efraim, who=E2=80=99s been very much into= Rust packaging for > some time; does that ring a bell, Efraim? >=20 It's not something that I've come across before. My first guess would be to check the linking flags against the ones icecat/firefox uses and see if anything changed. Or if it needs a different version of rust. > > If I'm not terribly wrong, this issue[6] seems to suggest an > > approach for emscripten which could solve this issue without > > removing the 'strip' phase which was the work around suggested > > by some on the same thread. > > > > Another issue that is pending is that libwasm depends on rust > > multi-default-trait-impl crate. This crate defines lgpl2.1+ on > > its Cargo.toml file, but the sources does not contain neither a > > copy of the license. So I'm unsure if this is enough to make it > > free software. So I'm planning on sending some mails to both the > > maintainer and FSF to see if this needs improvement. >=20 > Great. >=20 > >> For the final submission, we=E2=80=99d need one patch per new package,= as is > >> customary. That will have the advantage of allowing review to proceed > >> one bit at a time. :-) > > > > For sure. I'll give it a few more tries and cleanup the mess > > here before sending this patch series. If I don't succeed, I'm > > planning on sending it anyway so at least the libs can be > > added and maybe someone can spot what I'm missing. But maybe > > it's wise to hold Tor Browser itself since there has been an > > announcement of some large percentage of exit relays messing > > with Tor traffic[7]. >=20 > I don=E2=80=99t think Guix users will radically increase traffic over Tor= , so I > think we can keep going. :-) >=20 > >> Regarding Tor Browser itself, can you think of ways to factorize code > >> with IceCat? > > > > Other than sharing the https-everywhere definition, I was > > thinking maybe we could take a diff of Tor Browser and Firefox > > and avoid downloading firefox source twice when building both > > browsers. But I need to take a more careful look. I'll give > > this question some thought. >=20 > OK. I was expecting at least things like some of the build phases and > most/all of the inputs to be the same, but I haven=E2=80=99t checked. >=20 > Thanks again for all the work! >=20 > Ludo=E2=80=99. --=20 Efraim Flashner <efraim@HIDDEN> =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --ZaW/dtY/7oMe/vLp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl9YtZ0ACgkQQarn3Mo9 g1G3TA/+MJXs7F3y2i5+YOi5WuWsCcpyRm1adlAYlexTjvEFm7zC5JkghHjSx8aN 6Sl6hV7K1KlV2qxT7veVsm0/+AC9XYMYqCtNpD3qbOX3H+0mo7qquZJAk9OS8axo BRgzH3AZZB3siOX/UNaJQzh/FF7MiTSMTrkhU+4lzPlGlpYiN3dcEbmUJuuNrdTp Nx7c4TStSyh8QU2OY9nA37LY2KbPgs1Wy3QmCApGNS/rI5wZ7SlnQW6OA3ASSqaj jFDU1M3vSj7WQ+GtwhRIb5MEKRzfKj3szTqgBVG45c0yZZxKzc1kPZyOxX4z0nlH xwjtJgJWfTpC+/Ubz0KHJX5R8QsCUfLgu0u1XF/MzN24XnfwN3fOxVFg8IYysS93 j3GFxgSOsj9jFf1GmJ94CsvpdRLrw4M0NId/vuNhUhMjch/YRmq826LpXNMdJ664 OLr1tgRrfAfGcaAooA46A1U+gQoSWcRKn8/Rb4MTzbfsWtrkwWabLDR61iFpWzhR JBz2gdV+VgifpsGFkkFfotLM0ivs4kTDzkMslPufVGnXNF7fJtmaJs3dYysgSH1A rYR1kxh8bzujLm+qznLwWF+uEpTphDZ0aNrZDRz5n1gXPxzsF4lS6Gb3SfU1ydFF zqavljCCAH50Z3pS6yNBwYoR9zQPiAEHpEjMgY00VKGfwWhx4yg= =om71 -----END PGP SIGNATURE----- --ZaW/dtY/7oMe/vLp--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 9 Sep 2020 07:20:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 09 03:20:24 2020 Received: from localhost ([127.0.0.1]:56990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kFuP2-0001ZH-3j for submit <at> debbugs.gnu.org; Wed, 09 Sep 2020 03:20:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1kFuOy-0001Z1-O2 for 42380 <at> debbugs.gnu.org; Wed, 09 Sep 2020 03:20:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57108) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1kFuOt-0004yE-BN; Wed, 09 Sep 2020 03:20:15 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54450 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1kFuOs-0005Q8-Qu; Wed, 09 Sep 2020 03:20:15 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: =?utf-8?Q?Andr=C3=A9?= Batista <nandre@HIDDEN> Subject: Re: [bug#42380] [PATCH] gnu: Add torbrowser-unbundle. References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> <20200909022429.GA24930@andel> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Fructidor an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 09 Sep 2020 09:20:08 +0200 In-Reply-To: <20200909022429.GA24930@andel> (=?utf-8?Q?=22Andr=C3=A9?= Batista"'s message of "Tue, 8 Sep 2020 23:24:29 -0300") Message-ID: <878sdjo1qv.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42380 Cc: Efraim Flashner <efraim@HIDDEN>, 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi Andr=C3=A9, Andr=C3=A9 Batista <nandre@HIDDEN> skribis: > Just a small token of my appreciation for your years of work on > guix. I'm glad to be able to give something back to this community. Thank you. > I've been using this package for the last month or so and did not > hit any bugs so, though I'm not a heavy web user, I think it's fair > to say the result is functional. > > On the down side, the https-everywhere extension is broken as is > since it's missing lib-wasm. I've built but did not send here a > version which just copies lib-wasm to its proper place before > building the extension and this version works without further > issues. > > The reason I did not send it to this list is that lib-wasm source > provides a precompiled prepackaged file[1] which is then used on > https-everywhere build script and it's source code is not actualy > compiled[2]. As I understand it, the Tor Project just relies on > this precompiled binary on its build procedure and the same seems > to be true for IceCat[3][4]. Oh, glad that you were able to identify that issue, which presumably had been overlooked so far. > In order to have everything compiled from source, I've had to > define a lot of rust libs which were required for building > wasm-pack and then to have a rustc with wasm32-unknown-unknown > target enabled and compatible with wasm-pack (apparently newer > versions changed compiler strings and wasm-pack errors out when > trying to parse). For over two weeks I've been trying without > success and always thinking that the next build would succeed. > > Long story short, maybe there's just one more issue pending when > compiling lib-wasm. When wasm-pack is invoked, everything > compiles but I'm getting the following error: > > note: lld: error: /gnu/store/kwdsf42z7ib6fr5vggqi9nc4jpi1znxy-rust-1.38.0= /lib/rustlib/wasm32-unknown-unknown/lib/libstd-373ca16e620a2f9a.rlib: archi= ve has no index; run ranlib to add one > > for a few rust libs. Without lld, it complains about a missing > rust-lld binary. Also, this appears to be the rust standard > nowadays[5]. Ah. I=E2=80=99m Cc=E2=80=99ing Efraim, who=E2=80=99s been very much into R= ust packaging for some time; does that ring a bell, Efraim? > If I'm not terribly wrong, this issue[6] seems to suggest an > approach for emscripten which could solve this issue without > removing the 'strip' phase which was the work around suggested > by some on the same thread. > > Another issue that is pending is that libwasm depends on rust > multi-default-trait-impl crate. This crate defines lgpl2.1+ on > its Cargo.toml file, but the sources does not contain neither a > copy of the license. So I'm unsure if this is enough to make it > free software. So I'm planning on sending some mails to both the > maintainer and FSF to see if this needs improvement. Great. >> For the final submission, we=E2=80=99d need one patch per new package, a= s is >> customary. That will have the advantage of allowing review to proceed >> one bit at a time. :-) > > For sure. I'll give it a few more tries and cleanup the mess > here before sending this patch series. If I don't succeed, I'm > planning on sending it anyway so at least the libs can be > added and maybe someone can spot what I'm missing. But maybe > it's wise to hold Tor Browser itself since there has been an > announcement of some large percentage of exit relays messing > with Tor traffic[7]. I don=E2=80=99t think Guix users will radically increase traffic over Tor, = so I think we can keep going. :-) >> Regarding Tor Browser itself, can you think of ways to factorize code >> with IceCat? > > Other than sharing the https-everywhere definition, I was > thinking maybe we could take a diff of Tor Browser and Firefox > and avoid downloading firefox source twice when building both > browsers. But I need to take a more careful look. I'll give > this question some thought. OK. I was expecting at least things like some of the build phases and most/all of the inputs to be the same, but I haven=E2=80=99t checked. Thanks again for all the work! Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 9 Sep 2020 02:25:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 08 22:25:30 2020 Received: from localhost ([127.0.0.1]:56833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kFpne-0002nT-6y for submit <at> debbugs.gnu.org; Tue, 08 Sep 2020 22:25:30 -0400 Received: from mx1.riseup.net ([198.252.153.129]:52996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1kFpnb-0002nK-H0 for 42380 <at> debbugs.gnu.org; Tue, 08 Sep 2020 22:25:28 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BmQpV1jb1zFdrN; Tue, 8 Sep 2020 19:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1599618326; bh=lHq7duuL3WzzLSLdKVHfmVsAvCAlJ3C24a5zn1hQNhY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lmYC7i0m1zNkmGb5AypxQftP9b8YIXQnxBSrqMpPdHN3tqE7vvNVauYgd0Stzhk5I MIFScwcmVcikkWNSFbDOpUZOZNO2x54feauVj8U48D5ccAi6U4s79cKuMhnSzX2pH/ ZwQHUzslSu2ZE9b3V22EzJA1rgUoMz4bwXWbdPd8= X-Riseup-User-ID: 4658DA0A8DCBE0F1E44ECFD97B3DC313A8085433941B2A54310658F48C3D5D81 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BmQpS5wNXzJmnT; Tue, 8 Sep 2020 19:25:04 -0700 (PDT) Date: Tue, 8 Sep 2020 23:24:29 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN> Subject: Re: [bug#42380] [PATCH] gnu: Add torbrowser-unbundle. Message-ID: <20200909022429.GA24930@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> <87blihhdz6.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87blihhdz6.fsf@HIDDEN> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 Cc: 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Hello, seg 07 set 2020 às 16:13:17 (1599505997), ludo@HIDDEN enviou: > Hello, > > Woow, thanks for working on this! The end result is functional, right? > Any important missing items? Just a small token of my appreciation for your years of work on guix. I'm glad to be able to give something back to this community. I've been using this package for the last month or so and did not hit any bugs so, though I'm not a heavy web user, I think it's fair to say the result is functional. On the down side, the https-everywhere extension is broken as is since it's missing lib-wasm. I've built but did not send here a version which just copies lib-wasm to its proper place before building the extension and this version works without further issues. The reason I did not send it to this list is that lib-wasm source provides a precompiled prepackaged file[1] which is then used on https-everywhere build script and it's source code is not actualy compiled[2]. As I understand it, the Tor Project just relies on this precompiled binary on its build procedure and the same seems to be true for IceCat[3][4]. In order to have everything compiled from source, I've had to define a lot of rust libs which were required for building wasm-pack and then to have a rustc with wasm32-unknown-unknown target enabled and compatible with wasm-pack (apparently newer versions changed compiler strings and wasm-pack errors out when trying to parse). For over two weeks I've been trying without success and always thinking that the next build would succeed. Long story short, maybe there's just one more issue pending when compiling lib-wasm. When wasm-pack is invoked, everything compiles but I'm getting the following error: note: lld: error: /gnu/store/kwdsf42z7ib6fr5vggqi9nc4jpi1znxy-rust-1.38.0/lib/rustlib/wasm32-unknown-unknown/lib/libstd-373ca16e620a2f9a.rlib: archive has no index; run ranlib to add one for a few rust libs. Without lld, it complains about a missing rust-lld binary. Also, this appears to be the rust standard nowadays[5]. If I'm not terribly wrong, this issue[6] seems to suggest an approach for emscripten which could solve this issue without removing the 'strip' phase which was the work around suggested by some on the same thread. Another issue that is pending is that libwasm depends on rust multi-default-trait-impl crate. This crate defines lgpl2.1+ on its Cargo.toml file, but the sources does not contain neither a copy of the license. So I'm unsure if this is enough to make it free software. So I'm planning on sending some mails to both the maintainer and FSF to see if this needs improvement. > For the final submission, we’d need one patch per new package, as is > customary. That will have the advantage of allowing review to proceed > one bit at a time. :-) For sure. I'll give it a few more tries and cleanup the mess here before sending this patch series. If I don't succeed, I'm planning on sending it anyway so at least the libs can be added and maybe someone can spot what I'm missing. But maybe it's wise to hold Tor Browser itself since there has been an announcement of some large percentage of exit relays messing with Tor traffic[7]. > Regarding Tor Browser itself, can you think of ways to factorize code > with IceCat? Other than sharing the https-everywhere definition, I was thinking maybe we could take a diff of Tor Browser and Firefox and avoid downloading firefox source twice when building both browsers. But I need to take a more careful look. I'll give this question some thought. Cheers, 1. https://docs.rs/crate/https-everywhere-lib-wasm/0.1.2/source/pkg/https_everywhere_lib_wasm_bg.wasm 2. https://github.com/EFForg/https-everywhere/blob/master/make.sh#L113 3. https://git.savannah.gnu.org/cgit/gnuzilla.git/tree/makeicecat?h=68#n565 4. https://git.savannah.gnu.org/cgit/gnuzilla.git/tree/data/extensions/https-everywhere@HIDDEN/wasm/https_everywhere_lib_wasm_bg.wasm?h=68 5. https://github.com/rust-lang/rust/pull/48125 6. https://github.com/emscripten-core/emscripten/issues/9705 7. https://blog.torproject.org/bad-exit-relays-may-june-2020
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 7 Sep 2020 14:13:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 07 10:13:37 2020 Received: from localhost ([127.0.0.1]:50327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1kFHtl-0001S2-Gi for submit <at> debbugs.gnu.org; Mon, 07 Sep 2020 10:13:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1kFHtg-0001Rj-0K for 42380 <at> debbugs.gnu.org; Mon, 07 Sep 2020 10:13:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42636) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1kFHta-0005Ao-Pc; Mon, 07 Sep 2020 10:13:22 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=44462 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1kFHtZ-0001jv-Tg; Mon, 07 Sep 2020 10:13:22 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: =?utf-8?Q?Andr=C3=A9?= Batista <nandre@HIDDEN> Subject: Re: [bug#42380] [PATCH] gnu: Add torbrowser-unbundle. References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> <20200803125556.GA18868@andel> Date: Mon, 07 Sep 2020 16:13:17 +0200 In-Reply-To: <20200803125556.GA18868@andel> (=?utf-8?Q?=22Andr=C3=A9?= Batista"'s message of "Mon, 3 Aug 2020 09:55:56 -0300") Message-ID: <87blihhdz6.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42380 Cc: 42380 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hello, Andr=C3=A9 Batista <nandre@HIDDEN> skribis: > This patch upgrades Tor Browser to version 9.5.3. I've also took this > opportunity to rework the code in order to improve readability, make > code review and maintainance easier and lower build time. > > Main changes: > - No longer relies on computed-origin-method > - Private package definitions > - Chopped down install phase > - New phases > - More detailed go library package descriptions > - Reviewed license definitions Woow, thanks for working on this! The end result is functional, right? Any important missing items? > From 2075c6a93a6b1918305323b369318425e05fc4f5 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> > Date: Mon, 3 Aug 2020 09:29:55 -0300 > Subject: [PATCH] gnu: Add torbrowser-unbundle > To: guix-patches@HIDDEN > > * gnu/packages/tor.scm (obfs4, torbrowser-unbundle): New variables. > * gnu/packages/golang.scm (go-torproject-org-ptlib, > go-github-com-agl-ed25519, go-github-com-dchest-siphash, > go-github-com-dchest-uniuri, go-github-com-dsnet-compress, > go-schwanenlied-me-yawning-bsaes, go-gitlab-com-yawning-utls): New variab= les. > * gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch: New fi= le. > * gnu/packages/patches/torbrowser-start-tor-browser.patch: New file. > * gnu/local.mk (dist_patch_DATA): Adjust accordingly. For the final submission, we=E2=80=99d need one patch per new package, as is customary. That will have the advantage of allowing review to proceed one bit at a time. :-) Regarding Tor Browser itself, can you think of ways to factorize code with IceCat? Thanks, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 3 Aug 2020 12:56:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 03 08:56:24 2020 Received: from localhost ([127.0.0.1]:44618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1k2a0l-0002DC-QE for submit <at> debbugs.gnu.org; Mon, 03 Aug 2020 08:56:24 -0400 Received: from mx1.riseup.net ([198.252.153.129]:38644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1k2a0g-0002D0-UY for 42380 <at> debbugs.gnu.org; Mon, 03 Aug 2020 08:56:15 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BKyYj4S5fzFdys for <42380 <at> debbugs.gnu.org>; Mon, 3 Aug 2020 05:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1596459370; bh=5QwxfJpQyDGqAACw5klrhh/LOhHVBNyMP+L6+PMj3VM=; h=Date:From:To:Subject:References:In-Reply-To:From; b=WwVDz3meZ4rheEcfrPS7AYw8i85KLvaAnMX9WRAqNd1vPPXW51iROoa/6R6oEYHI2 d770LynNIar9ZOVR86501KBWPRi0M+T0oiysKpaTW+QSBPA5fBS5j57HSJVgx43YPC 26sevwWeNaml5CLGYIaNUmhuq6ztMz0YedLj6sfo= X-Riseup-User-ID: 7B546B8BE37CB901E2DDFF638D92FFD7DE389FC293E9A46E333AF8BA07565B88 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BKyYf2nLbzJmhn for <42380 <at> debbugs.gnu.org>; Mon, 3 Aug 2020 05:56:06 -0700 (PDT) Date: Mon, 3 Aug 2020 09:55:56 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH] gnu: Add torbrowser-unbundle. Message-ID: <20200803125556.GA18868@andel> References: <20200715211547.GA17146@andel> <20200725144930.GA13751@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f2QGlHpHGjS2mn6Y" Content-Disposition: inline In-Reply-To: <20200725144930.GA13751@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --f2QGlHpHGjS2mn6Y Content-Type: multipart/mixed; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello Guix, This patch upgrades Tor Browser to version 9.5.3. I've also took this opportunity to rework the code in order to improve readability, make code review and maintainance easier and lower build time. Main changes: - No longer relies on computed-origin-method - Private package definitions - Chopped down install phase - New phases - More detailed go library package descriptions - Reviewed license definitions Cheers, --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename="0001-gnu-Add-torbrowser-unbundle.patch" Content-Transfer-Encoding: quoted-printable =46rom 2075c6a93a6b1918305323b369318425e05fc4f5 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Mon, 3 Aug 2020 09:29:55 -0300 Subject: [PATCH] gnu: Add torbrowser-unbundle To: guix-patches@HIDDEN * gnu/packages/tor.scm (obfs4, torbrowser-unbundle): New variables. * gnu/packages/golang.scm (go-torproject-org-ptlib, go-github-com-agl-ed25519, go-github-com-dchest-siphash, go-github-com-dchest-uniuri, go-github-com-dsnet-compress, go-schwanenlied-me-yawning-bsaes, go-gitlab-com-yawning-utls): New variable= s. * gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch: New file. * gnu/packages/patches/torbrowser-start-tor-browser.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 3 + gnu/packages/golang.scm | 201 +++++ ...torbrowser-start-tor-browser.desktop.patch | 22 + .../torbrowser-start-tor-browser.patch | 226 +++++ gnu/packages/tor.scm | 824 +++++++++++++++++- 5 files changed, 1272 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.deskt= op.patch create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.patch diff --git a/gnu/local.mk b/gnu/local.mk index f1a6c6a0d0..ccdcdc8e6a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -36,6 +36,7 @@ # Copyright =C2=A9 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.= pl> # Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN> # Copyright =C2=A9 2020 Tanguy Le Carrour <tanguy@HIDDEN> +# Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1587,6 +1588,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/tipp10-fix-compiling.patch \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tk-find-library.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.desktop.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/ttfautohint-source-date-epoch.patch \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 2c31632db6..63b090fbd8 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -18,6 +18,7 @@ ;;; Copyright =C2=A9 2019, 2020 Arun Isaac <arunisaac@HIDDEN> ;;; Copyright =C2=A9 2020 Jack Hill <jackhill@HIDDEN> ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka <kuba@HIDDEN> +;;; Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -4263,3 +4264,203 @@ used by other processes.") Porter2 stemmer}. It is written completely using finite state machines to= do suffix comparison, rather than the string-based or tree-based approaches.") (license license:asl2.0)))) + +(define-public go-torproject-org-ptlib + (package + (name "go-torproject-org-ptlib") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/goptlib.g= it") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lh938194hvkf8pqgnxwf6hvjv9rv0j3kasi07r2ckrj8sxzk4jc")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/goptlib.git")) + (home-page "https://git.torproject.org/pluggable-transports/goptlib.git= ") + (synopsis "Go library for Tor Pluggable Transports") + (description "Library for writing Tor Pluggable Transports in Go. Plug= gable +Transports are a means of connecting to the Tor Network from places where = it +is censored.") + (license license:cc0))) + +(define-public go-github-com-agl-ed25519 + (let ((commit "c4161f4c7483313562781c61b9a20aba73daf9de") + (revision "0")) + (package + (name "go-github-com-agl-ed25519") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/agl/ed25519") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1wjlbzi0w63rmlzgk3amw274wsl0zhcn4yx2lraffbkhqappahxc")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/agl/ed25519" + #:phases + (modify-phases %standard-phases + (add-before 'reset-gzip-timestamps 'make-files-writable + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) (chmod file #o644)) + (find-files out "\\.gz")) + #t)))))) + (home-page "https://github.com/agl/ed25519") + (synopsis "Go library for ed25519 public-key signatures") + (description "This library is a Go implementation of ed25519 public-k= ey +signature system which was designed to be faster than previous digital sig= nature +systems without sacrificing security. It is currently used in the +implementation of obfs4 and should be not be used on newer projects since = it +is unmaintained. Newer software should use x-crypto instead.") + ;; License file is referred but it is missing. Probably because the + ;; author decided to discontinue the project. + (license (license:non-copyleft "file://ed25519.go"))))) + +(define-public go-github-com-dchest-siphash + (let ((commit "34f201214d993633bb24f418ba11736ab8b55aa7") + (revision "0")) + (package + (name "go-github-com-dchest-siphash") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/siphash") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "08s076y7vmjqnq7jz0762hkm896r6r31v8b31a3gy0n8rfa01k8k")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/siphash")) + (home-page "https://github.com/dchest/siphash") + (synopsis "Go library for siphash") + (description "Go implementation of SipHash-2-4, a fast short-input +Pseudo Random Function which is suitable for usage in message authenticati= on +codes and was based on the design created by Jean-Philippe Aumasson and Da= niel +J. Bernstein. ") + (license license:cc0)))) + +(define-public go-github-com-dchest-uniuri + (let ((commit "8902c56451e9b58ff940bbe5fec35d5f9c04584a") + (revision "0")) + (package + (name "go-github-com-dchest-uniuri") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/uniuri") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1x5bsbm1nlphsv96zd0rbclfaa1swpz5bp14x7s5dbxp0awk2gd4")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/uniuri")) + (home-page "https://github.com/dchest/uniuri") + (synopsis "Go library for random URIs") + (description "Package uniuri generates random strings good for use in +Universal Resource Identifiers to uniquely identify objects.") + (license license:cc0)))) + +(define-public go-github-com-dsnet-compress + (let ((commit "cc9eb1d7ad760af14e8f918698f745e80377af4f") + (revision "0")) + (package + (name "go-github-com-dsnet-compress") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dsnet/compress") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dsnet/compress")) + (home-page "https://github.com/dsnet/compress") + (synopsis "Go library for extended compression") + (description "This is a collection of compression related libraries. +The goal of this project is to provide pure Go implementations for popular +compression algorithms bey ond what the Go standard library provides.") + (license (license:non-copyleft "file://LICENSE.md"))))) + +(define-public go-schwanenlied-me-yawning-bsaes + (let ((commit "26d1add596b6d800bdeeb3bc3b2c7b316c056b6d") + (revision "0")) + (package + (name "go-schwanenlied-me-yawning-bsaes") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.schwanenlied.me/yawning/bsaes.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0h4dsyw54n9rcwprqy93wv2v1gcvlq1vfqdp1g7wxdkq457rhvys")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.schwanenlied.me/yawning/bsaes.git")) + (home-page "https://git.schwanenlied.me/yawning/bsaes.git") + (synopsis "Go AES library") + (description "Portable pure-Go constant time Advanced Encryption +Standard (AES) for eletronic data encryption. This implementation if +based on code from [BearSSL](https://bearssl.org/). On AMD64 systems +with hardware support for AES New Instructions (AES-NI) and a +sufficiently recent Go runtime, it will transparently call crypto/aes +when NewCipher is invoked.") + (license (license:non-copyleft "file://LICENSE.txt"))))) + +(define-public go-gitlab-com-yawning-utls + (package + (name "go-gitlab-com-yawning-utls") + (version "0.0.10-1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/yawning/utls.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15c46s56r45n22rmq9spnczydnkqrnxff28h5mpnk5yvcqif3lgb")))) + (build-system go-build-system) + (arguments + '(#:tests? #f ;; Tries to connect and fails. + #:import-path "gitlab.com/yawning/utls.git")) + (propagated-inputs + `(("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsae= s) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) + (home-page "https://gitlab.com/yawning/utls.git") + (synopsis "Go library for uTLS") + (description "This library is a fork of the main Transport Layer Securi= ty +protocol in Go (crypto/tls) which provides ClientHello fingerprinting resi= stance, +low level access to handshakes and fake session tickets among other featur= es. +This fork was made for the specific purpose of improving obfs4proxy's meek= _lite +transport protocol.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patc= h b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch new file mode 100644 index 0000000000..336115b33a --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop.orign 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Edesktop 2020-07-25 02:54:44.603431160 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the sh= ell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=3DWeb Browser + Comment=3DTor Browser is +1 for privacy and =E2=88=921 for mass surveilla= nce + Categories=3DNetwork;WebBrowser;Security; +-Exec=3Dsh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ = ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/sta= rt-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=3D./Browser/start-tor-browser --detach +-Icon=3Dweb-browser ++Exec=3Dbash -c start-tor-browser ++X-TorBrowser-ExecShell=3Dstart-tor-browser --detach ++Icon=3Dtorbrowser + StartupWMClass=3DTor Browser diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.patch b/gnu/= packages/patches/torbrowser-start-tor-browser.patch new file mode 100644 index 0000000000..c563f94003 --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.patch @@ -0,0 +1,226 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= =2Eorig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/RelativeLink/start-tor-browser= 2020-08-01 20:22:08.901737325 -0300 +@@ -5,6 +5,15 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. +=20 ++TBB_HOME=3D"${HOME}/.local/share/torbrowser" ++TBB_LOGFILE=3D"${TBB_HOME}/torbrowser.log" ++TBB_DATA=3D"${TBB_HOME}/Data" ++TBB_PROFILE=3D"${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=3D$(dirname $(realpath "$0")) ++TBB_STORE_DATA=3D"${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC=3D"${TBB_DATA}/Tor/torrc-defaults" ++PT_PREFS=3D"${TBB_DATA}/Browser/bridge-prefs-js-appendix" ++ + complain_dialog_title=3D"Tor Browser" +=20 + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -106,14 +115,11 @@ + printf " --verbose Display Tor and Firefox output in the ter= minal\n" + printf " --log [file] Record Tor and Firefox output in file (de= fault: tor-browser.log)\n" + printf " --detach Detach from terminal and run Tor Browser = in the background.\n" +- printf " --register-app Register Tor Browser as a desktop app for= this user\n" +- printf " --unregister-app Unregister Tor Browser as a desktop app f= or this user\n" + } + log_output=3D0 + show_output=3D0 + detach=3D0 + show_usage=3D0 +-register_desktop_app=3D0 + logfile=3D/dev/null + while : + do +@@ -134,8 +140,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" =3D=3D "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser= =2Elog\n" +- logfile=3D"../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.= log\n" ++ logfile=3D"${TBB_LOGFILE}" + elif [ "${2:0:1}" =3D=3D "/" -o "${2:0:1}" =3D=3D "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile=3D"$2" +@@ -148,16 +154,6 @@ + log_output=3D1 + shift + ;; +- --register-app) +- register_desktop_app=3D1 +- show_output=3D1 +- shift +- ;; +- --unregister-app) +- register_desktop_app=3D-1 +- show_output=3D1 +- shift +- ;; + *) # No more options + break + ;; +@@ -187,41 +183,23 @@ + export XAUTHORITY + fi +=20 +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname=3D"$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name=3D"`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname=3D"$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname=3D"`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this oper= ating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files ar= e on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TO= RRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++ grep -v 'default_bridge\.snowflake' "${PT_PREFS}" >> "${TBB_PROFILE}/u= ser.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit e= xec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi +=20 +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir=3D"`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,50 +214,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi +=20 +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from = the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=3D.*,Name=3DTor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=3D.*,Icon=3D$PWD/browser/chrome/icons/default/default1= 28.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=3D.*,Exec=3Dsh -c '\"$PWD/start-tor-browser\" --detach= || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Brow= ser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- +-if [ "$register_desktop_app" -eq 1 ]; then +- mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" +- update-desktop-database "$HOME/.local/share/applications/" +- printf "Tor Browser has been registered as a desktop app for this user i= n ~/.local/share/applications/\n" +- exit 0 +-fi +- +-if [ "$register_desktop_app" -eq -1 ]; then +- if [ -e "$HOME/.local/share/applications/start-tor-browser.desktop" ]; t= hen +- rm -f "$HOME/.local/share/applications/start-tor-browser.desktop" +- update-desktop-database "$HOME/.local/share/applications/" +- printf "Tor Browser has been removed as a user desktop app (from ~/.loc= al/share/applications/)\n" +- else +- printf "Tor Browser does not appear to be a desktop app (not present in= ~/.local/share/applications/)\n" +- fi +- exit 0 +-fi +- + HOME=3D"${PWD}" + export HOME +=20 +-SYSARCHITECTURE=3D$(getconf LONG_BIT) +-TORARCHITECTURE=3D$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit= :]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'l= l get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS=3D"detect_leaks=3D0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=3D$1 +=20 +@@ -342,13 +279,15 @@ + # your password in the following line where the word =E2=80=9Csecret=E2= =80=9D is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:=3D'"secret"'} +=20 +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH=3D"${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE=3D"fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=3Dmemory +=20 ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE=3D"${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" +=20 + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +296,23 @@ +=20 + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfil= e" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </d= ev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </de= v/null | \ ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfi= le" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </= dev/null + fi +=20 + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index c852c54a5b..d3a0933ae4 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -28,28 +28,69 @@ =20 (define-module (gnu packages tor) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix monads) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix store) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cargo) + #:use-module (guix build-system go) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) - #:use-module (gnu packages libevent) - #:use-module (gnu packages linux) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) + #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) + #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages autotools) + #:use-module (gnu packages readline) + #:use-module (gnu packages rsync) ; for httpse + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages w3m) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) ; for httpse + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) =20 (define-public tor (package @@ -324,3 +365,778 @@ statistics and status reports on: =20 Potential client and exit connections are scrubbed of sensitive informatio= n.") (license license:gpl3+))) + +(define-public obfs4 + (package + (name "obfs4") + (version "0.0.11") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/obfs4.git= ") + (commit (string-append "obfs4proxy-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1y2kjwrk64l1h8b87m4iqsanib5rn68gzkdri1vd132qrlypycjn")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/obfs4.git" + #:tests? #f ;; No test files + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively + "src/git.torproject.org/pluggable-transports/obfs4.git" + "src/gitlab.com/yawning/obfs4.git" + #:log (%make-void-port "w")) + (with-directory-excursion + "src/git.torproject.org/pluggable-transports/obfs4.git/obfs= 4proxy" + (invoke "go" "build" "-ldflags" "-s")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (src "src/git.torproject.org/pluggable-transports/obfs4= =2Egit") + (bin (string-append out "/bin")) + (share (string-append out "/share")) + (doc (string-append share "/doc")) + (man (string-append share "/man/man1"))) + (mkdir-p man) + (mkdir bin) + (mkdir doc) + (with-directory-excursion + (string-append src "/obfs4proxy") + (copy-file "obfs4proxy" + (string-append bin "/obfs4proxy"))) + (with-directory-excursion + (string-append src "/doc") + (copy-file "obfs4proxy.1" + (string-append man "/obfs4proxy.1")) + (copy-file "obfs4-spec.txt" + (string-append doc "/obfs4-spec.txt"))) + #t)))))) + (propagated-inputs + `(("go-torproject-org-ptlib" ,go-torproject-org-ptlib) + ;; Currently uses this, but the readme on github is pointing + ;; users to start relying on x/crypto/ed25519 instead. + ("go-github-com-agl-ed25519" ,go-github-com-agl-ed25519) + ("go-github-com-dchest-siphash" ,go-github-com-dchest-siphash) + ("go-github-com-dchest-uniuri" ,go-github-com-dchest-uniuri) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsae= s) + ("go-gitlab-com-yawning-utls" ,go-gitlab-com-yawning-utls) + ("go-golang-org-x-net" ,go-golang-org-x-net) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-golang-org-x-text" ,go-golang-org-x-text))) + (home-page "https://git.torproject.org/pluggable-transports/obfs4.git") + (synopsis "Obfs4 implements an obfuscation protocol") + (description "This is a look-like nothing obfuscation protocol that +incorporates ideas and concepts from Philipp Winter's ScrambleSuit protoco= l. +The obfs naming was chosen primarily because it was shorter, in terms of +protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") + (license license:gpl3+))) + +;; Upstream does not seem to keep tor-browser and tor-browser-build versio= ns +;; in sync +(define %torbrowser-version "68.11.0esr-9.5-1") +(define %torbrowser-build-version "9.5.3") +(define %torbrowser-build "build1") +(define %torbrowser-build-id "20200729000000");must be of the form YYYYMMD= Dhhmmss + +;; Fonts for Tor Browser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on Tor Browser release tarball. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + (version %torbrowser-build-version) + (source + (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "1kqvr0sag94xdkq85k426qq1hz2b52m315yz51w6hvc87d8332b4")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (fonts (string-append %output "/share/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir-p fonts) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" fonts "--strip-components=3D3" + (string-append "--use-compress-program=3D" xz = "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "Tor Browser bundled fonts") + (description "Free fonts bundled with Tor Browser. Includes a subset o= f Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define tor-browser-build + (let ((commit (string-append "tbb-" %torbrowser-build-version + "-" %torbrowser-build))) + (package + (name "tor-browser-build") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-build.g= it") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1p291zqkvgsz9kk21s2p9v1bha3aam7z646v73dr06qmhdfhvgag")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying build scripts ...~%") + (copy-recursively (string-append + (assoc-ref %build-inputs "source") + "/projects/tor-browser") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser build scripts") + (description "Tor Browser runtime scripts.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define torbutton + (let ((commit "ebe2bedab44e38f18c7968bd327d99eef7660f34")) + (package + (name "torbutton") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/torbutton.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03xdyszab1a8j98xv6440v4lq58jkfqgmhxc2a62qz8q085d2x83")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in extension") + (description "Browser extension needed to build and run Tor Browser.") + (license (license:non-copyleft "file://LICENSE"))))) + +(define tor-launcher + (package + (name "tor-launcher") + (version "0.2.21.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-launcher.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1mm1z7gv9dv6ymbr3vsg0lsnhnn84zrb6qsa164hmaxcfrwfhz5d")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (format #t "Copying source ...~%") + (copy-recursively (assoc-ref %build-inputs "source") + %output + #:log (%make-void-port "w"))))) + (home-page "https://www.torproject.org") + (synopsis "Tor Browser built-in controler extension") + (description "Browser extension that starts the tor process (which +connects the browser and other applications to the Tor Network), and +which helps people configure and use @code{tor}. The first window that +you see when you start Tor Browser is displayed by this extension.") + (license (license:non-copyleft "file://src/LICENSE")))) + +(define https-everywhere + (package + (name "https-everywhere") + (version "2020.5.20") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/https-everywhere/archi= ve/" + version ".tar.gz")) + (sha256 + (base32 + "027lga3z0a4d7s95id861das7g0k29p7pqh9xd77jm87f7w4l763")))) + (build-system trivial-build-system) + (native-inputs + `(("bash" ,bash) + ("coreutils" ,coreutils) + ("gzip" ,gzip) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("openssl" ,openssl) + ("python" ,python) + ("rsync" ,rsync) + ("tar" ,tar) + ("util-linux" ,util-linux) ; for getopt + ("xxd" ,xxd) + ("zip" ,zip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (python (assoc-ref %build-inputs "python")) + (openssl (assoc-ref %build-inputs "openssl")) + (rsync (assoc-ref %build-inputs "rsync")) + (libxml2 (assoc-ref %build-inputs "libxml2")) + (libxslt (assoc-ref %build-inputs "libxslt")) + (util-linux (assoc-ref %build-inputs "util-linux")) + (xxd (assoc-ref %build-inputs "xxd")) + (zip (assoc-ref %build-inputs "zip")) + (tar (assoc-ref %build-inputs "tar")) + (gzip (assoc-ref %build-inputs "gzip"))) + (setenv "SHELL" (string-append bash "/bin/bash")) + (set-path-environment-variable + "PATH" '("bin") + (list bash python tar openssl rsync libxml2 libxslt + util-linux xxd gzip zip coreutils)) + (set-path-environment-variable + "LIBRARY_PATH" '("lib") + (list bash python tar openssl rsync libxml2 libxslt + util-linux xxd gzip zip coreutils)) + (format #t "Untaring source tarball ...~%") + (invoke "tar" "-xf" src "--strip-components=3D1") + ;; Python3.6 is hardcoded on these scripts. Using v3.8= appears to + ;; be harmless. + (substitute* '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/rules/src/https_everywhere_checke= r/check_rules.py" + "test/script.py" + "test/validations.sh" + "test/validations/filename/run.py" + "test/validations/relaxng/run.py" + "test/validations/securecookie/run.py" + "test/validations/special/run.py" + "utils/create_zip.py" + "utils/chromium-translations.py" + "utils/create-platform-certs/split_comb= ined_cert_file.py" + "utils/mk-client-whitelist/dbconnect.py" + "utils/mk-client-whitelist/run.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + (for-each patch-shebang + (find-files "." + (lambda (file stat) + ;; Filter out symlinks. + (eq? 'regular (stat:type stat)= )) + #:stat lstat)) + ;; Failing to generate the xpi, but copy-dir appears t= o be enough. + ;; Failing on missing 'wasm'? Not generating rulesets. + (invoke "./make.sh") + (copy-recursively "pkg/xpi-eff" %output + #:log (%make-void-port "w")) + #t)))) + (home-page "https://www.eff.org/https-everywhere") + (synopsis "Browser extension for automatic HTTPS usage") + (description "Browser extension that automatically makes the browser to= use +HTTPS instead of plain HTTP when the remote destination makes it available= to users.") + (license license:gpl2+))) + +(define noscript + (package + (name "noscript") + (version "11.0.34") + (source + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/release= s/noscript-" + version ".xpi")) + (sha256 + (base32 + "0y45925ms2bk9d42zbgwcdb2sif8kqlbaflkz15q08gi7vgki6km")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (format #t "Copying source ...~%") + (copy-file (assoc-ref %build-inputs "source") + %output)))) + (home-page "https://noscript.net") + (synopsis "Browser extension for protection against known attacks") + (description "Browser extension that protects users from a range of +known attacks on web browsing activity such as Cross-site scripting, click= jack and +makes possible for the users to block or choose on a per site basis which = remote +javascript to run while browsing the web.") + (license license:gpl2+))) + +;; (Un)fortunatly Tor Browser has it's own reproducible build system - RBM= - which +;; automates the build process for them and compiles Tor Browser from a ra= nge of +;; repositories and produces a range of tarballs for different architectur= es and +;; locales. So we need to cherry-pick what is needed for guix and produce = our own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.g= it/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. Se= e also +;; the Hacking on Tor Browser document for a high level introduction at +;; https://trac.torproject.org/projects/tor/wiki/doc/Tor Browser/Hacking). +;; +;; TODO: Import langpacks. +(define-public torbrowser-unbundle + (let ((commit (string-append "tor-browser-" %torbrowser-version + "-" %torbrowser-build))) + (package + (name "torbrowser-unbundle") + (version %torbrowser-build-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-browser.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12qq0mpqf0q2v3grz4kydngvddc4k0k12hqg8fg6h2fwyqivamrr")))) + (build-system gnu-build-system) + (inputs + `(("alsa-lib" ,alsa-lib) + ("bzip2" ,bzip2) + ("cups" ,cups) + ("dbus-glib" ,dbus-glib) + ("ffmpeg" ,ffmpeg) + ("freetype" ,freetype) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("gtk+-2" ,gtk+-2) + ("graphite2" ,graphite2) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libcanberra" ,libcanberra) + ("libgnome" ,libgnome) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libogg" ,libogg) + ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released + ("libvorbis" ,libvorbis) + ("libxft" ,libxft) + ("libevent" ,libevent) + ("libxinerama" ,libxinerama) + ("libxscrnsaver" ,libxscrnsaver) + ("libxcomposite" ,libxcomposite) + ("libxt" ,libxt) + ("libffi" ,libffi) + ("libvpx" ,libvpx) + ("mesa" ,mesa) + ("mit-krb5" ,mit-krb5) + ;; See <https://bugs.gnu.org/32833> + ;; and related comments in the 'remove-bundled-libraries' phase. + ;; UNBUNDLE-ME! ("nspr" ,nspr) + ;; UNBUNDLE-ME! ("nss" ,nss) + ("obfs4" ,obfs4) + ("pango" ,pango) + ("pixman" ,pixman) + ("pulseaudio" ,pulseaudio) + ("shared-mime-info" ,shared-mime-info) + ("sqlite" ,sqlite) + ("startup-notification" ,startup-notification) + ("tor" ,tor-client) + ("unzip" ,unzip) + ("zip" ,zip) + ("zlib" ,zlib))) + (native-inputs + `(("autoconf" ,autoconf-2.13) + ("bash" ,bash) + ("cargo" ,rust "cargo") + ("clang" ,clang) + ("https-everywhere" ,https-everywhere) + ("llvm" ,llvm) + ("patch" ,(canonical-package patch)) + ("torbrowser-start-tor-browser.patch" + ,(search-patch "torbrowser-start-tor-browser.patch")) + ("torbrowser-start-tor-browser.desktop.patch" + ,(search-patch "torbrowser-start-tor-browser.desktop.patch")) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("python2" ,python-2.7) + ("python2-pysqlite" ,python2-pysqlite) + ("nasm" ,nasm) ; XXX FIXME: only needed on x86_64 and i686 + ("node" ,node) + ("noscript" ,noscript) + ("rust" ,rust) + ("rust-cbindgen" ,rust-cbindgen) + ("tor-browser-build" ,tor-browser-build) + ("torbrowser-fonts" ,torbrowser-fonts) + ("tor-launcher" ,tor-launcher) + ("torbutton" ,torbutton) + ("which" ,which) + ("yasm" ,yasm))) + (arguments + `(#:tests? #f ; Some tests are autodone by mach on build fase. + + ;; XXX: There are RUNPATH issues such as + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.= so, + ;; which is not in its RUNPATH, but they appear to be harmless in + ;; practice somehow. See <http://hydra.gnu.org/build/378133>. + #:validate-runpath? #f + + #:imported-modules ,%cargo-utils-modules ;for `generate-all-checks= ums' + + #:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 regex) + (ice-9 match) + (srfi srfi-34) + (srfi srfi-35) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + (guix build utils) + (sxml simple) + ,@%gnu-build-system-modules) + + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-bundle + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((torbutton (assoc-ref inputs "torbutton")) + (torbutton-dir "toolkit/torproject/torbutton") + (tor-launcher (assoc-ref inputs "tor-launcher")) + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb (assoc-ref inputs "tor-browser-build")) + (tbb-scripts-dir "tbb-scripts")) + (format #t "Copying torbutton source to default path ...~%= ") + (make-file-writable torbutton-dir) + (copy-recursively torbutton torbutton-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-launcher ...~%") + (copy-recursively tor-launcher tor-launcher-dir + #:log (%make-void-port "w")) + (format #t "Copying tor-browser-build ...~%") + (mkdir tbb-scripts-dir) + (copy-recursively tbb tbb-scripts-dir + #:log (%make-void-port "w")) + (make-file-writable (string-append + tbb-scripts-dir + "/RelativeLink/start-tor-browser")) + (make-file-writable (string-append + tbb-scripts-dir + "/RelativeLink/start-tor-browser.desk= top"))) + #t)) + + (add-after 'make-bundle 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inp= uts) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + + ;; On mach build system this is done on configure. + (delete 'bootstrap) + + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e464= 9b934ca495991b7852b855")) + (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock") + (("(\"checksum .* =3D )\".*\"" all name) + (string-append name "\"" null-hash "\""))) + (generate-all-checksums "third_party/rust")) + #t)) + + (add-after 'build 'neutralize-store-references + (lambda _ + ;; Mangle the store references to compilers & other build to= ols in + ;; about:buildconfig, reducing Tor Browser's closure signifi= cant. + ;; The resulting files are saved in lib/firefox/omni.ja + (substitute* "objdir/dist/bin/chrome/toolkit/content/global/= buildconfig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ store hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime dependency -->" + (string-drop hash 8)))) + #t)) + + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-k= eys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags))) + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append + (assoc-ref inputs "python2") + "/bin/python")) + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid ti= mestamp. + (setenv "LDFLAGS" (string-append + "-Wl,-rpath=3D" + (assoc-ref outputs "out") + "/lib/firefox")) + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=3D@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=3Ddev-build= ") + (string-append "ac_add_options --with-tor-browser-versi= on=3Dorg.gnu\n" + "ac_add_options --with-unsigned-addon-sc= opes=3Dapp\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\= n" + "ac_add_options --disable-updater\n" + "ac_add_options --disable-gconf\n" + ;; Other syslibs that can be unbundled? = (nss, nspr) + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + "ac_add_options --with-system-bz2\n" + "ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + "ac_add_options --with-system-libevent\n" + "ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=3D" + (assoc-ref %build-inputs "clang") "/bin= /clang\n" + "ac_add_options --with-libclang-path=3D" + (assoc-ref %build-inputs "clang") "/lib= \n"))) + + (substitute* "browser/app/profile/000-tor-browser.js" + ;; Tor Browser updates are disabled on mozconfig, but le= t's make sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\"= ).*" _ m) + (string-append m ",false);\n"))) + + (substitute* + "browser/extensions/tor-launcher/src/defaults/preferences= /torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Currentl= y disabled on + ;; tor-launcher, but let's make sure while missing langp= acks. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\").= *" _ m) + (string-append m ", false);\n"))) + + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + + (replace 'build + (lambda _ (invoke "./mach" "build") + #t)) + + ;; Tor Browser just do a stage-package here and copy files to it= s places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications= ")) + (build "objdir/dist/firefox") + (bin (string-append out "/bin")) + (lib (string-append out "/lib/firefox")) + (start-script + "tbb-scripts/RelativeLink/start-tor-browser") + (desktop-file + "tbb-scripts/RelativeLink/start-tor-browser.desktop"= )) + (invoke "./mach" "build" "stage-package") + ;; Tor Browser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (format #t "Deleting spurious files ...~%") + (with-directory-excursion build + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append + "Warning: file " file + " not found! Skipping...\n")))) + '("firefox-bin" "libfreeblpriv3.chk" "libnssdb= m3.chk" + "libsoftokn3.chk" "fonts/TwemojiMozilla.ttf"= ))) + (rmdir (string-append build "/fonts")) + (format #t "Creating install dirs ...~%") + (mkdir-p applications) + (mkdir-p lib) + (mkdir bin) + (format #t "Copying files to install dirs ...~%") + (copy-recursively build (string-append lib "/") + #:log (%make-void-port "w")) + (copy-file start-script + (string-append lib "/start-tor-browser")) + (copy-file desktop-file + (string-append lib "/start-tor-browser.desktop"= )) + (chmod (string-append lib "/start-tor-browser") #o555) + (chmod (string-append lib "/start-tor-browser.desktop") #o= 555) + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append lib "/start-tor-browser") + (string-append bin "/start-tor-browser")) + (format #t "Installing desktop file ...~%") + (install-file desktop-file applications)) + #t)) + + (add-after 'install 'install-icons + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (icons-src (string-append + out "/lib/firefox/browser/chrome/icons/de= fault"))) + (with-directory-excursion + icons-src + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicolo= r/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.p= ng")))) + '("default16.png" "default32.png" "default48.png" "defa= ult64.png" + "default128.png")))) + #t)) + + (add-after 'install-icons 'install-fonts + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox/")) + (fonts (string-append (or (assoc-ref native-inputs + "torbrowser-fon= ts") + (assoc-ref inputs + "torbrowser-fon= ts")) + "/share"))) + (copy-recursively fonts lib + #:log (%make-void-port "w")) + (symlink (string-append lib "/fonts") + (string-append out "/share/fonts"))) + #t)) + + (add-after 'install-fonts 'install-extensions + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (ext (string-append out "/lib/firefox/browser/extensi= ons")) + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}") + (httpse-id "https-everywhere-eff@HIDDEN") + (noscript (assoc-ref inputs "noscript")) + (httpse (assoc-ref inputs "https-everywhere"))) + (mkdir-p ext) + (copy-file noscript (string-append + ext "/" noscript-id ".xpi")) + (copy-recursively httpse + (string-append ext "/" httpse-id) + #:log (%make-void-port "w")) + (chmod (string-append ext "/" noscript-id ".xpi") #o555)) + #t)) + + (add-after 'install-extensions 'link-binaries + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (tordir (string-append out "/lib/firefox/TorBrowser/T= or")) + (ptdir (string-append tordir "/PluggableTransports")) + (obfs4 (string-append (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (tor (string-append (assoc-ref inputs "tor") + "/bin/tor"))) + (mkdir-p ptdir) + (symlink tor (string-append tordir "/tor")) + (symlink obfs4 (string-append ptdir "/obfs4proxy"))) + #t)) + + (add-after 'link-binaries 'copy-bundle-data + (lambda* (#:key inputs native-inputs outputs #:allow-other-key= s) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (tbb "tbb-scripts") + (ptconf (string-append tbb "/Bundle-Data/PTConfigs")) + (docs (string-append lib "/TorBrowser/Docs")) + (data (string-append lib "/TorBrowser/Data"))) + (mkdir-p data) + (mkdir docs) + (with-directory-excursion + (string-append tbb "/Bundle-Data/linux/Data") + (for-each (lambda (file) + (copy-recursively file + (string-append data "/" fil= e) + #:log (%make-void-port "w")= )) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconf "/linux/torrc-defaults-ap= pendix") + (string-append data "/Tor/torrc-defaults-append= ix")) + (copy-file (string-append ptconf "/bridge_prefs.js") + (string-append + data "/Browser/bridge-prefs-js-appendix")) + (copy-recursively (string-append tbb "/Bundle-Data/Docs") + (string-append docs "/") + #:log (%make-void-port "w"))) + #t)) + + ;; This fixes the file chooser crash that happens with GTK 3 + (add-after 'copy-bundle-data 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/firefox")) + (gtk (assoc-ref inputs "gtk+")) + (gtk-share (string-append gtk "/share")) + (mesa (assoc-ref inputs "mesa")) + (mesa-lib (string-append mesa "/lib")) + (pulseaudio (assoc-ref inputs "pulseaudio")) + (pulseaudio-lib (string-append pulseaudio "/lib")) + (libxscrnsaver (assoc-ref inputs "libxscrnsaver")) + (libxscrnsaver-lib (string-append libxscrnsaver "/lib= "))) + (wrap-program (car (find-files lib "^firefox$")) + `("XDG_DATA_DIRS" prefix (,gtk-share)) + `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib ,mesa-lib ,l= ibxscrnsaver-lib)))) + #t))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "Tor Browser is the Tor Project version of Firefox browser. It is t= he only +recommended way to anonymously browse the web that is supported by the pro= ject. +It modifies Firefox in order to avoid many know application level attacks = on +the privacy of Tor users. + +WARNING: This is not the official Tor Browser and is currently on testing.= Use +at your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0)))) ;and others, see toolkit/content/license.= html --=20 2.27.0 --pWyiEgJYm5f9v55/-- --f2QGlHpHGjS2mn6Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl8oCVkFgwPCZwAACgkQ YrJ+WmBEwoJPOA//WR7G44J1GWSuQtoSo7tB6LuMkwKJ+9LqsnAp3uY64j8KdX/L 6fVGCQPoy7lzdGhU8ZBJOaC+icYilu3/c10WG7xdputtgkWJCyM8kyQzXSimTc7j bIO9UtgmzYZYuMv7ro9T+LzysevpkSkhupwKqzDVsp4QzQftUq4h4lk+LzITc4KE blcjJyog8M3rteCV4JR3Pgs1pdMp9NVkzPFprwQXGtvyxTmlEUVXxcZS24OCYzRk A+NQASaJO44bsmC299QvLuaCaki0BuhV/i/HTupLCwbeimz+4yvtBImaT53Vkqb9 Bu92IqYKFROpz03xCPCnyySbDR3n+ZloXQyamGwpdfjxPPV8+xlYoAhv2y16d4bM 308/IzBXrTk5+tfhR7Guk28g4hTYb23WtmqqqFf6Tebxj4MTvb7aXbWlNxWPp887 S4e1mkxfGVnnUBBE5wKDjygs1vA+Vs8xXxeQcA/JHTkH8KcVAoGgp6jRJyg7rKxI 3TaPodRFZFrou+whLtIskCg0Ndlfowx0qsRi8nkKCs03uOaWlsHrSMY1m7vCejrK VnK3r7Pp2HDuTV7pl56TsA1XNS3pUreGMq7hMAxTA8hktVM6IvK898rgb8ZriCMl qcYp4k8SdtYd8o5VE4LkD2VSl1AUcwALMvBNKdVhcaCaH+mwtppFzfYYbEQ= =FjJZ -----END PGP SIGNATURE----- --f2QGlHpHGjS2mn6Y--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at 42380) by debbugs.gnu.org; 25 Jul 2020 14:49:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 25 10:49:56 2020 Received: from localhost ([127.0.0.1]:50772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jzLUi-0002qK-US for submit <at> debbugs.gnu.org; Sat, 25 Jul 2020 10:49:56 -0400 Received: from mx1.riseup.net ([198.252.153.129]:44236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1jzLUe-0002q9-02 for 42380 <at> debbugs.gnu.org; Sat, 25 Jul 2020 10:49:47 -0400 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4BDTVt5fZSzFcs7 for <42380 <at> debbugs.gnu.org>; Sat, 25 Jul 2020 07:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1595688583; bh=BLNc05rgNO6/9EWutmHa06Jr/8CfxQTK8A0cMhRAipc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=BgMR5poix1bpQz5oRg1vYgpRh4zH2AL0WpLVZB310s4Hfxpgt9XFCEavGJlTU/BoM upIVp1CQolTZ8+LmuOWPMo5zK8mZte+2XzKvv7NxtF2yyLKfWgzW46l25orNpAqmMK C2XYnA/cxgAh/i5D4LD6fQV/tcpvfp/UUeN+SAPs= X-Riseup-User-ID: EA7EC06F054AAE5417A7C6AB8FDDF1B9B825D11F72736471FD180893E247E506 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4BDTVq4jpczJnmY for <42380 <at> debbugs.gnu.org>; Sat, 25 Jul 2020 07:49:39 -0700 (PDT) Date: Sat, 25 Jul 2020 11:49:30 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: 42380 <at> debbugs.gnu.org Subject: Re: [bug#42380] [PATCH] gnu: Add torbrowser-unbundle. Message-ID: <20200725144930.GA13751@andel> References: <20200715211547.GA17146@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0ntfKIWw70PvrIHh" Content-Disposition: inline In-Reply-To: <20200715211547.GA17146@andel> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42380 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0ntfKIWw70PvrIHh Content-Type: multipart/mixed; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Guix, The patch bellow adds TorBrowser, Obfs4 and related libraries. No more warnings, it should behave as expected. User files are stored under '~/.local/share/torbrowser'. Just two notes:=20 - some of the libraries do not have a named font and just claim BDS-Style. I've written bsd-2 for those and left a note. I'm no sure if there is need for a more appropriate description. - https-everywhere does not show rules on the browser, but the rules are there on the store path. There is no default address for autoupdating rules. And one important question: tor and obfs4 are inputs to torbrowser which are symlinked in the install phase. Do they need to be propagated so as to not be garbage collected? Happy Hacking! --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename="0001-gnu-Add-torbrowser-unbundle.patch" Content-Transfer-Encoding: quoted-printable =46rom d9b11fdfa62919fc5ebfd73c55a9dbbbc12596a0 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Sat, 25 Jul 2020 06:11:36 -0300 Subject: [PATCH] gnu: Add torbrowser-unbundle To: guix-patches@HIDDEN * gnu/packages/tor.scm (obfs4, torbrowser-unbundle): New variables. * gnu/packages/golang.scm (go-torproject-org-ptlib, go-github-com-agl-ed25519, go-github-com-dchest-siphash, go-github-com-dchest-uniuri, go-github-com-dsnet-compress, go-schwanenlied-me-yawning-bsaes, go-gitlab-com-yawning-utls): New variable= s. * gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch: New file. * gnu/packages/patches/torbrowser-start-tor-browser.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 3 + gnu/packages/golang.scm | 188 +++++ ...torbrowser-start-tor-browser.desktop.patch | 22 + .../torbrowser-start-tor-browser.patch | 184 +++++ gnu/packages/tor.scm | 752 +++++++++++++++++- 5 files changed, 1145 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.deskt= op.patch create mode 100644 gnu/packages/patches/torbrowser-start-tor-browser.patch diff --git a/gnu/local.mk b/gnu/local.mk index f2a7b6b984..7bff822c43 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -36,6 +36,7 @@ # Copyright =C2=A9 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.= pl> # Copyright =C2=A9 2020 Brice Waegeneire <brice@HIDDEN> # Copyright =C2=A9 2020 Tanguy Le Carrour <tanguy@HIDDEN> +# Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> # # This file is part of GNU Guix. # @@ -1587,6 +1588,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/tipp10-fix-compiling.patch \ %D%/packages/patches/tipp10-remove-license-code.patch \ %D%/packages/patches/tk-find-library.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.patch \ + %D%/packages/patches/torbrowser-start-tor-browser.desktop.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/ttfautohint-source-date-epoch.patch \ %D%/packages/patches/tomb-fix-errors-on-open.patch \ diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 2c31632db6..772b1e29f2 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -18,6 +18,7 @@ ;;; Copyright =C2=A9 2019, 2020 Arun Isaac <arunisaac@HIDDEN> ;;; Copyright =C2=A9 2020 Jack Hill <jackhill@HIDDEN> ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka <kuba@HIDDEN> +;;; Copyright =C2=A9 2020 Andr=C3=A9 Batista <nandre@HIDDEN> ;;; ;;; This file is part of GNU Guix. ;;; @@ -4263,3 +4264,190 @@ used by other processes.") Porter2 stemmer}. It is written completely using finite state machines to= do suffix comparison, rather than the string-based or tree-based approaches.") (license license:asl2.0)))) + +(define-public go-torproject-org-ptlib + (package + (name "go-torproject-org-ptlib") + (version "1.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/goptlib.g= it") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lh938194hvkf8pqgnxwf6hvjv9rv0j3kasi07r2ckrj8sxzk4jc")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/goptlib.git")) + (home-page "https://git.torproject.org/pluggable-transports/goptlib.git= ") + (synopsis "Go library for Tor pluggable transports") + (description "Library for writing Tor pluggable transports in Go.") + (license license:cc0))) + + +(define-public go-github-com-agl-ed25519 + (let ((commit "c4161f4c7483313562781c61b9a20aba73daf9de") + (revision "0")) + (package + (name "go-github-com-agl-ed25519") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/agl/ed25519") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1wjlbzi0w63rmlzgk3amw274wsl0zhcn4yx2lraffbkhqappahxc")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/agl/ed25519" + #:phases + (modify-phases %standard-phases + (add-before 'reset-gzip-timestamps 'make-files-writable + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) (chmod file #o644)) + (find-files out "\\.gz")) + #t)))))) + (home-page "https://github.com/agl/ed25519") + (synopsis "Go library for ed25519") + (description "This library is used in the implementation of obfs4.") + (license license:bsd-2))));; Repo does not contain license anymore. + ;; Only refered on file as BSD-Style. + +(define-public go-github-com-dchest-siphash + (let ((commit "34f201214d993633bb24f418ba11736ab8b55aa7") + (revision "0")) + (package + (name "go-github-com-dchest-siphash") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/siphash") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "08s076y7vmjqnq7jz0762hkm896r6r31v8b31a3gy0n8rfa01k8k")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/siphash")) + (home-page "https://github.com/dchest/siphash") + (synopsis "Go library for siphash") + (description "Go implementation of SipHash-2-4, a fast short-input PRF +created by Jean-Philippe Aumasson and Daniel J. Bernstein.") + (license license:cc0)))) + +(define-public go-github-com-dchest-uniuri + (let ((commit "8902c56451e9b58ff940bbe5fec35d5f9c04584a") + (revision "0")) + (package + (name "go-github-com-dchest-uniuri") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dchest/uniuri") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1x5bsbm1nlphsv96zd0rbclfaa1swpz5bp14x7s5dbxp0awk2gd4")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dchest/uniuri")) + (home-page "https://github.com/dchest/uniuri") + (synopsis "Go library for random URIs") + (description "Package uniuri generates random strings good for use in +URIs to identify unique objects.") + (license license:cc0)))) + +(define-public go-github-com-dsnet-compress + (let ((commit "cc9eb1d7ad760af14e8f918698f745e80377af4f") + (revision "0")) + (package + (name "go-github-com-dsnet-compress") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dsnet/compress") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx")))) + (build-system go-build-system) + (arguments + '(#:import-path "github.com/dsnet/compress")) + (home-page "https://github.com/dsnet/compress") + (synopsis "Go library for extended compression") + (description "This is a collection of compression related libraries. +The goal of this project is to provide pure Go implementations for popular +compression algorithms bey ond what the Go standard library provides.") + (license license:bsd-2))));; Unnamed. Go license? + +(define-public go-schwanenlied-me-yawning-bsaes + (let ((commit "26d1add596b6d800bdeeb3bc3b2c7b316c056b6d") + (revision "0")) + (package + (name "go-schwanenlied-me-yawning-bsaes") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.schwanenlied.me/yawning/bsaes.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0h4dsyw54n9rcwprqy93wv2v1gcvlq1vfqdp1g7wxdkq457rhvys")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.schwanenlied.me/yawning/bsaes.git")) + (home-page "https://git.schwanenlied.me/yawning/bsaes.git") + (synopsis "Go AES library") + (description "Portable pure-Go constant time AES implementation based= on +the excellent code from [BearSSL](https://bearssl.org/). On AMD64 systems +with AES-NI and a sufficiently recent Go runtime, it will transparently ca= ll +crypto/aes when NewCipher is invoked.") + (license license:bsd-2))));; Also unnamed. + +(define-public go-gitlab-com-yawning-utls + (package + (name "go-gitlab-com-yawning-utls") + (version "0.0.10-1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/yawning/utls.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15c46s56r45n22rmq9spnczydnkqrnxff28h5mpnk5yvcqif3lgb")))) + (build-system go-build-system) + (arguments + '(#:tests? #f ;; Tries to connect and fails. + #:import-path "gitlab.com/yawning/utls.git")) + (propagated-inputs + `(("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsae= s) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) + (home-page "https://gitlab.com/yawning/utls.git") + (synopsis "Go library for UTLS") + (description "UTLS fork for the specific purpose of improving obfs4prox= y's +meek_lite transport.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patc= h b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch new file mode 100644 index 0000000000..e65348b7f5 --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.desktop.patch @@ -0,0 +1,22 @@ +Change TorBrowser desktop file in order for it to be agnostic to the +path when invoked. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/projects/tor-browser/RelativeL= ink/start-tor-browser.desktop.orig 2020-07-05 18:47:40.689484877 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/projects/tor-browser/RelativeL= ink/start-tor-browser.desktop 2020-07-24 14:36:37.720579884 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env ./Browser/execdesktop ++#!/usr/bin/env bash + # + # This file is a self-modifying .desktop file that can be run from the sh= ell. + # It preserves arguments and environment for the start-tor-browser script. +@@ -28,7 +28,7 @@ + GenericName=3DWeb Browser + Comment=3DTor Browser is +1 for privacy and =E2=88=921 for mass surveilla= nce + Categories=3DNetwork;WebBrowser;Security; +-Exec=3Dsh -c '"$(dirname "$*")"/Browser/start-tor-browser --detach || ([ = ! -x "$(dirname "$*")"/Browser/start-tor-browser ] && "$(dirname "$*")"/sta= rt-tor-browser --detach)' dummy %k +-X-TorBrowser-ExecShell=3D./Browser/start-tor-browser --detach +-Icon=3Dweb-browser ++Exec=3Dbash -c start-tor-browser ++X-TorBrowser-ExecShell=3Dstart-tor-browser --detach ++Icon=3Dtorbrowser + StartupWMClass=3DTor Browser diff --git a/gnu/packages/patches/torbrowser-start-tor-browser.patch b/gnu/= packages/patches/torbrowser-start-tor-browser.patch new file mode 100644 index 0000000000..e3e29e61ed --- /dev/null +++ b/gnu/packages/patches/torbrowser-start-tor-browser.patch @@ -0,0 +1,184 @@ +Change TorBrowser startup script in order for it to setup needed files +outside guix store. Remove tests which are not needed on guix system. + +--- torbrowser-68.10.0esr-9.5-1/tbb-scripts/projects/tor-browser/RelativeL= ink/start-tor-browser.orig 2020-07-05 18:47:40.685485004 -0300 ++++ torbrowser-68.10.0esr-9.5-1/tbb-scripts/projects/tor-browser/RelativeL= ink/start-tor-browser 2020-07-23 18:13:32.426282743 -0300 +@@ -5,6 +5,16 @@ + # + # Copyright 2017 The Tor Project. See LICENSE for licensing information. +=20 ++TBB_HOME=3D"${HOME}/.local/share/torbrowser" ++TBB_LOGFILE=3D"${TBB_HOME}/torbrowser.log" ++TBB_DATA=3D"${TBB_HOME}/Data" ++TBB_PROFILE=3D"${TBB_DATA}/Browser/profile.default" ++TBB_STORE_PATH=3D$(dirname $(realpath "$0")) ++TBB_STORE_DATA=3D"${TBB_STORE_PATH}/TorBrowser/Data" ++TORRC=3D"${TBB_DATA}/Tor/torrc-defaults" ++#TORRC_BRIDGE=3D"${TORRC}-appendix" ++PT_PREFS=3D"${TBB_DATA}/Browser/bridge-prefs-js-appendix" ++ + complain_dialog_title=3D"Tor Browser" +=20 + # First, make sure DISPLAY is set. If it isn't, we're hosed; scream +@@ -134,8 +144,8 @@ + ;; + -l | --log) + if [ -z "$2" -o "${2:0:1}" =3D=3D "-" ]; then +- printf "Logging Tor Browser debug information to tor-browser= =2Elog\n" +- logfile=3D"../tor-browser.log" ++ printf "Logging Tor Browser debug information to torbrowser.= log\n" ++ logfile=3D"${TBB_LOGFILE}" + elif [ "${2:0:1}" =3D=3D "/" -o "${2:0:1}" =3D=3D "~" ]; then + printf "Logging Tor Browser debug information to %s\n" "$2" + logfile=3D"$2" +@@ -187,41 +197,23 @@ + export XAUTHORITY + fi +=20 +-# If this script is being run through a symlink, we need to know where +-# in the filesystem the script itself is, not where the symlink is. +-myname=3D"$0" +-if [ -L "$myname" ]; then +- # XXX readlink is not POSIX, but is present in GNU coreutils +- # and on FreeBSD. Unfortunately, the -f option (which follows +- # a whole chain of symlinks until it reaches a non-symlink +- # path name) is a GNUism, so we have to have a fallback for +- # FreeBSD. Fortunately, FreeBSD has realpath instead; +- # unfortunately, that's also non-POSIX and is not present in +- # GNU coreutils. +- # +- # If this launcher were a C program, we could just use the +- # realpath function, which *is* POSIX. Too bad POSIX didn't +- # make that function accessible to shell scripts. +- +- # If realpath is available, use it; it Does The Right Thing. +- possibly_my_real_name=3D"`realpath "$myname" 2>/dev/null`" +- if [ "$?" -eq 0 ]; then +- myname=3D"$possibly_my_real_name" +- else +- # realpath is not available; hopefully readlink -f works. +- myname=3D"`readlink -f "$myname" 2>/dev/null`" +- if [ "$?" -ne 0 ]; then +- # Ugh. +- complain "start-tor-browser cannot be run using a symlink on this oper= ating system." +- fi +- fi ++# Try to be agnostic to where we're being started from, check if files ar= e on its ++# default paths and chdir to TBB_HOME ++if [ -e "${TORRC}" ]; then ++ cd "${TBB_HOME}" ++else ++ mkdir -p "${TBB_HOME}" ++ cp -R "${TBB_STORE_DATA}" "${TBB_HOME}" ++ chmod -R 700 "${TBB_HOME}" ++ mkdir -p "${TBB_PROFILE}" ++ echo "user_pref(\"extensions.torlauncher.torrc-defaults_path\", \"${TO= RRC}\");"\ ++ > "${TBB_PROFILE}/user.js" ++ grep -v 'default_bridge\.snowflake' "${PT_PREFS}" >> "${TBB_PROFILE}/u= ser.js" ++ echo "ClientTransportPlugin meek_lite,obfs2,obfs3,obfs4,scramblesuit e= xec ${TBB_STORE_PATH}/TorBrowser/Tor/PluggableTransports/obfs4proxy"\ ++ >> "${TORRC}" ++ cd "${TBB_HOME}" + fi +=20 +-# Try to be agnostic to where we're being started from, chdir to where +-# the script is. +-mydir=3D"`dirname "$myname"`" +-test -d "$mydir" && cd "$mydir" +- + # If ${PWD} results in a zero length string, we can try something else... + if [ ! "${PWD}" ]; then + # "hacking around some braindamage" +@@ -236,16 +228,9 @@ + ln -nsf ~/.config/ibus/bus .config/ibus + fi +=20 +-# Fix up .desktop Icon and Exec Paths, and update the .desktop file from = the +-# canonical version if it was changed by the updater. +-cp start-tor-browser.desktop ../ +-sed -i -e "s,^Name=3D.*,Name=3DTor Browser,g" ../start-tor-browser.desktop +-sed -i -e "s,^Icon=3D.*,Icon=3D$PWD/browser/chrome/icons/default/default1= 28.png,g" ../start-tor-browser.desktop +-sed -i -e "s,^Exec=3D.*,Exec=3Dsh -c '\"$PWD/start-tor-browser\" --detach= || ([ ! -x \"$PWD/start-tor-browser\" ] \&\& \"\$(dirname \"\$*\")\"/Brow= ser/start-tor-browser --detach)' dummy %k,g" ../start-tor-browser.desktop +- + if [ "$register_desktop_app" -eq 1 ]; then + mkdir -p "$HOME/.local/share/applications/" +- cp ../start-tor-browser.desktop "$HOME/.local/share/applications/" ++ cp "${TBB_STORE_PATH}/start-tor-browser.desktop" "$HOME/.local/share/app= lications/" + update-desktop-database "$HOME/.local/share/applications/" + printf "Tor Browser has been registered as a desktop app for this user i= n ~/.local/share/applications/\n" + exit 0 +@@ -265,21 +250,6 @@ + HOME=3D"${PWD}" + export HOME +=20 +-SYSARCHITECTURE=3D$(getconf LONG_BIT) +-TORARCHITECTURE=3D$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit= :]]*\)') +- +-if [ $SYSARCHITECTURE -ne $TORARCHITECTURE ]; then +- complain "Wrong architecture? 32-bit vs. 64-bit." +- exit 1 +-fi +- +-[% IF c("var/asan") -%] +-# We need to disable LSan which is enabled by default now. Otherwise we'l= l get +-# a crash during shutdown: https://bugs.torproject.org/10599#comment:59 +-ASAN_OPTIONS=3D"detect_leaks=3D0" +-export ASAN_OPTIONS +-[% END -%] +- + function setControlPortPasswd() { + local ctrlPasswd=3D$1 +=20 +@@ -342,13 +312,15 @@ + # your password in the following line where the word =E2=80=9Csecret=E2= =80=9D is: + setControlPortPasswd ${TOR_CONTROL_PASSWD:=3D'"secret"'} +=20 +-# Set up custom bundled fonts. See fonts-conf(5). +-export FONTCONFIG_PATH=3D"${HOME}/TorBrowser/Data/fontconfig" +-export FONTCONFIG_FILE=3D"fonts.conf" +- + # Avoid overwriting user's dconf values. Fixes #27903. + export GSETTINGS_BACKEND=3Dmemory +=20 ++# Set up custom bundled fonts. See fonts-conf(5). ++export FONTCONFIG_FILE=3D"${HOME}/Data/fontconfig/fonts.conf" ++ ++sed -i "${FONTCONFIG_FILE}"\ ++ -e "s,<dir>fonts</dir>,<dir>${TBB_STORE_PATH}/fonts</dir>," ++ + cd "${HOME}" +=20 + # We pass all additional command-line arguments we get to Firefox. +@@ -357,23 +329,23 @@ +=20 + if [ "$show_usage" -eq 1 ]; then + # Display Firefox help, then our help +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default --help 2>/dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default --help 2>/dev/null + tbb_usage + elif [ "$detach" -eq 1 ] ; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfil= e" 2>&1 </dev/null & ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </d= ev/null & + disown "$!" + elif [ "$log_output" -eq 1 -a "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" 2>&1 </de= v/null | \ ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" 2>&1 </dev/null | \ + tee "$logfile" + elif [ "$show_output" -eq 1 ]; then +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" < /dev/nu= ll ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" < /dev/null + else +- TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ./firefox --class "Tor Bro= wser" \ +- -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfi= le" 2>&1 </dev/null ++ TOR_CONTROL_PASSWD=3D${TOR_CONTROL_PASSWD} ${TBB_STORE_PATH}/firefox = --class "Tor Browser" \ ++ -profile Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </= dev/null + fi +=20 + exit $? diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index c852c54a5b..4fe3f69ef3 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -28,28 +28,69 @@ =20 (define-module (gnu packages tor) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix monads) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix store) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cargo) + #:use-module (guix build-system go) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) + #:use-module (gnu packages autotools) #:use-module (gnu packages base) - #:use-module (gnu packages libevent) - #:use-module (gnu packages linux) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages golang) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) + #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) + #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) + #:use-module (gnu packages node) + #:use-module (gnu packages nss) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages autotools) + #:use-module (gnu packages readline) + #:use-module (gnu packages rsync) ; for httpse + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages video) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages w3m) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml) ; for httpse + #:use-module (ice-9 match) + #:use-module ((srfi srfi-1) #:hide (zip))) =20 (define-public tor (package @@ -324,3 +365,706 @@ statistics and status reports on: =20 Potential client and exit connections are scrubbed of sensitive informatio= n.") (license license:gpl3+))) + +(define-public obfs4 + (package + (name "obfs4") + (version "0.0.11") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/pluggable-transports/obfs4.git= ") + (commit (string-append "obfs4proxy-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1y2kjwrk64l1h8b87m4iqsanib5rn68gzkdri1vd132qrlypycjn")))) + (build-system go-build-system) + (arguments + '(#:import-path "git.torproject.org/pluggable-transports/obfs4.git" + #:tests? #f ;; No test files + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively + "src/git.torproject.org/pluggable-transports/obfs4.git" + "src/gitlab.com/yawning/obfs4.git" + #:log (%make-void-port "w")) + (with-directory-excursion + "src/git.torproject.org/pluggable-transports/obfs4.git/obfs= 4proxy" + (invoke "go" "build" "-ldflags" "-s")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (srcdir + "src/git.torproject.org/pluggable-transports/obfs4.git= ") + (bindir (string-append out "/bin")) + (sharedir (string-append out "/share/")) + (docdir (string-append sharedir "/doc")) + (mandir (string-append out "/man/man1"))) + (mkdir-p mandir) + (mkdir-p bindir) + (mkdir-p docdir) + (with-directory-excursion + (string-append srcdir "/obfs4proxy") + (copy-file "obfs4proxy" + (string-append bindir "/obfs4proxy"))) + (with-directory-excursion + (string-append srcdir "/doc") + (copy-file "obfs4proxy.1" + (string-append mandir "/obfs4proxy.1")) + (copy-file "obfs4-spec.txt" + (string-append docdir "/obfs4-spec.txt"))) + #t)))))) + (propagated-inputs + `(("go-torproject-org-ptlib" ,go-torproject-org-ptlib) + ;; Currently uses this, but the readme on github is pointing + ;; users to start relying on x/crypto/ed25519 instead. + ("go-github-com-agl-ed25519" ,go-github-com-agl-ed25519) + ("go-github-com-dchest-siphash" ,go-github-com-dchest-siphash) + ("go-github-com-dchest-uniuri" ,go-github-com-dchest-uniuri) + ("go-github-com-dsnet-compress" ,go-github-com-dsnet-compress) + ("go-schwanenlied-me-yawning-bsaes" ,go-schwanenlied-me-yawning-bsae= s) + ("go-gitlab-com-yawning-utls" ,go-gitlab-com-yawning-utls) + ("go-golang-org-x-net" ,go-golang-org-x-net) + ("go-golang-org-x-crypto" ,go-golang-org-x-crypto) + ("go-golang-org-x-text" ,go-golang-org-x-text))) + (home-page "https://git.torproject.org/pluggable-transports/obfs4.git") + (synopsis "Obfs4 implements an obfuscation protocol") + (description "This is a look-like nothing obfuscation protocol that +incorporates ideas and concepts from Philipp Winter's ScrambleSuit protoco= l. +The obfs naming was chosen primarily because it was shorter, in terms of +protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3.") + (license license:gpl3+))) + +(define* (computed-origin-method gexp-promise hash-algo hash + #:optional (name "source") + #:key (system (%current-system)) + (guile (default-guile))) + "Return a derivation that executes the G-expression that results +from forcing GEXP-PROMISE." + (mlet %store-monad ((guile (package->derivation guile system))) + (gexp->derivation (or name "computed-origin") + (force gexp-promise) + #:graft? #f ;nothing to graft + #:system system + #:guile-for-build guile))) + +;; Fonts for TorBrowser. Avoid downloading 4Gb+ git repo on +;; https://github.com/googlei18n/noto-fonts.git to use just a handful. +;; Use the fonts on TorBrowser package. +(define torbrowser-fonts + (package + (name "torbrowser-fonts") + (version "9.5.1") + (source (origin + (method url-fetch) + (uri (string-append "https://dist.torproject.org/torbrowser/" + version "/tor-browser-linux64-" + version "_en-US.tar.xz")) + (sha256 + (base32 + "18xv8pv2j55f78n4d7cz24zwhqlcxkpq8nbanl754k2k0s1w34dd")))) + (build-system trivial-build-system) + (native-inputs + `(("tar" ,tar) + ("xz" ,xz))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((src (assoc-ref %build-inputs "source")) + (src-dir "tor-browser_en-US/Browser/fonts") + (install-dir (string-append %output "/fonts")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + + (mkdir-p install-dir) + (format #t "Untaring torbrowser ball ...~%") + (invoke (string-append tar "/bin/tar") "-xf" src + "-C" install-dir "--strip-components=3D3" + (string-append "--use-compress-program=3D" xz = "/bin/xz") + src-dir) + #t)))) + (home-page "https://github.com/googlei18n/noto-fonts") + (synopsis "TorBrowser bundled fonts") + (description "Free fonts bundled with TorBrowser. Includes a subset of= Noto, +Arimo, Cousine, Tinos and STIX fonts.") + (license license:silofl1.1))) + +(define %torbrowser-version "68.10.0esr-9.5-1") +(define %torbrowser-build-id "20200709000000") ;must be of the form YYYYMM= DDhhmmss + +;; (Un)fortunatly TorBrowser has it's own reproducible build system - RBM = - which +;; automates the build process for them and compiles TorBrowser from a ran= ge of +;; repositories and produces a range of tarballs for different architectur= es and +;; locales. So we need to cherry-pick what is needed for guix and produce = our own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.g= it/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. Se= e also +;; the Hacking on TorBrowser document for a high level introduction at +;; https://trac.torproject.org/projects/tor/wiki/doc/TorBrowser/Hacking). +;; +;; TODO: Import langpacks. +(define torbrowser-source + (let* ((torbrowser-commit "75c2bb720d4ceb76231e8ecc3455754bf05ba19b") + (torbrowser-version %torbrowser-version) + (upstream-torbrowser-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-browser.git") + (commit torbrowser-commit))) + (file-name (git-file-name "tor-browser" torbrowser-version)) + (sha256 + (base32 + "19sk46k2bqa72il46pdl534nk2g3fi6l7m7kbglddccxv19ck0k4")))) + + (torbrowser-build-commit "e94ba3a7677f7051a14b2304427ec8393a450fd= c") + (torbrowser-build-version "9.5") + (upstream-torbrowser-build-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-bu= ild.git") + (commit torbrowser-build-commit))) + (file-name (git-file-name "tor-browser-build" + torbrowser-build-version)) + (sha256 + (base32 + "1jgkrsckcjgr1lgcwahzdrcasmpghs2ppz6w80fya89pa5d6r0gv")))) + + (torbutton-commit "ebe2bedab44e38f18c7968bd327d99eef7660f34") + (torbutton-version "9.5") + (upstream-torbutton-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/torbutton.git") + (commit torbutton-commit))) + (file-name (git-file-name "torbutton" torbutton-version)) + (sha256 + (base32 + "03xdyszab1a8j98xv6440v4lq58jkfqgmhxc2a62qz8q085d2x83")))) + + (tor-launcher-commit "b4838d339a84c5ebebd91a0ba6b22d44ecda97b1") + (tor-launcher-version "0.2.21") + (upstream-tor-launcher-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-launcher.git") + (commit tor-launcher-commit))) + (file-name (git-file-name "tor-launcher" tor-launcher-version)) + (sha256 + (base32 + "0xxwyw1j6dkm2a24kg1564k701p5ikfzs1f9n0gflvlzz9427haf")))) + + (https-everywhere-version "2020.5.20") + (upstream-https-everywhere-source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/https-everywher= e/archive/" + https-everywhere-version ".tar.gz")) + (sha256 + (base32 + "027lga3z0a4d7s95id861das7g0k29p7pqh9xd77jm87f7w4l763")))) + + (noscript-xpi-version "11.0.34") + (upstream-noscript-xpi + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/= releases/noscript-" + noscript-xpi-version ".xpi")) + (sha256 + (base32 + "0y45925ms2bk9d42zbgwcdb2sif8kqlbaflkz15q08gi7vgki6km"))))) + + ;; Now we bundle the grabbed sources. + (origin + (method computed-origin-method) + (file-name (string-append "torbrowser-" %torbrowser-version ".tar.xz= ")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((torbrowser-dir (string-append "torbrowser-" + #$torbrowser-version)) + (torbutton-dir "toolkit/torproject/torbutton") + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb-scripts-dir "tbb-scripts") + (https-everywhere "https-everywhere.tar.gz") + (noscript-xpi "noscript.xpi")) + + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package bash) + #+(canonical-package xz) + #+(canonical-package tar))) + + (format #t "Copying torbrowser source to writable path ...= ~%") + (force-output) + (copy-recursively #+upstream-torbrowser-source + torbrowser-dir + #:log (%make-void-port "w")) + + (with-directory-excursion torbrowser-dir + (format #t "Copying torbutton source to torbrowser...~%") + (force-output) + (make-file-writable torbutton-dir) + (copy-recursively #+upstream-torbutton-source + torbutton-dir + #:log (%make-void-port "w")) + + (format #t "Copying tor-launcher source to torbrowser...= ~%") + (force-output) + (copy-recursively #+upstream-tor-launcher-source + tor-launcher-dir + #:log (%make-void-port "w")) + + (format #t "Copying tor-browser-build source to torbrows= er...~%") + (force-output) + (mkdir tbb-scripts-dir) + (copy-recursively #+upstream-torbrowser-build-source + tbb-scripts-dir + #:log (%make-void-port "w")) + + (format #t "Copying https-everywhere source to torbrowse= r...~%") + (force-output) + (copy-file #+upstream-https-everywhere-source + https-everywhere) + + (format #t "Copying noscript xpi to torbrowser...~%") + (force-output) + (copy-file #+upstream-noscript-xpi + "noscript.xpi")) + + (invoke "tar" "cvfa" #$output + ;; Avoid non-determinism in the archive. + "--mtime=3D@315619200" ; 1980-01-02 UTC + "--owner=3Droot:0" + "--group=3Droot:0" + "--sort=3Dname" + torbrowser-dir) + #t)))))))) + +(define-public torbrowser-unbundle + (package + (name "torbrowser-unbundle") + (version %torbrowser-version) + (source torbrowser-source) + (build-system gnu-build-system) + (inputs + `(("alsa-lib" ,alsa-lib) + ("bzip2" ,bzip2) + ("cups" ,cups) + ("dbus-glib" ,dbus-glib) + ("ffmpeg" ,ffmpeg) + ("freetype" ,freetype) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("gtk+-2" ,gtk+-2) + ("graphite2" ,graphite2) + ("harfbuzz" ,harfbuzz) + ("icu4c" ,icu4c) + ("libcanberra" ,libcanberra) + ("libgnome" ,libgnome) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libogg" ,libogg) + ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released + ("libvorbis" ,libvorbis) + ("libxft" ,libxft) + ("libevent" ,libevent) + ("libxinerama" ,libxinerama) + ("libxscrnsaver" ,libxscrnsaver) + ("libxcomposite" ,libxcomposite) + ("libxt" ,libxt) + ("libffi" ,libffi) + ("libvpx" ,libvpx) + ("mesa" ,mesa) + ("mit-krb5" ,mit-krb5) + ;; See <https://bugs.gnu.org/32833> + ;; and related comments in the 'remove-bundled-libraries' phase. + ;; UNBUNDLE-ME! ("nspr" ,nspr) + ;; UNBUNDLE-ME! ("nss" ,nss) + ("obfs4" ,obfs4) + ("pango" ,pango) + ("pixman" ,pixman) + ("pulseaudio" ,pulseaudio) + ("shared-mime-info" ,shared-mime-info) + ("sqlite" ,sqlite) + ("startup-notification" ,startup-notification) + ("tor" ,tor-client) + ("unzip" ,unzip) + ("zip" ,zip) + ("zlib" ,zlib))) + (native-inputs + `(("autoconf" ,autoconf-2.13) + ("cargo" ,rust "cargo") + ("clang" ,clang) + ("libxml2" ,libxml2) ; for https-e + ("libxslt" ,libxslt) ; for https-e + ("llvm" ,llvm) + ("openssl" ,openssl) ; For hash+sig on https-everywhere + ("patch" ,(canonical-package patch)) + ("torbrowser-start-tor-browser.patch" + ,(search-patch "torbrowser-start-tor-browser.patch")) + ("torbrowser-start-tor-browser.desktop.patch" + ,(search-patch "torbrowser-start-tor-browser.desktop.patch")) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("python2" ,python-2.7) + ("python2-pysqlite" ,python2-pysqlite) + ("nasm" ,nasm) ; XXX FIXME: only needed on x86_64 and i686 + ("node" ,node) + ("rsync" ,rsync) ; for https-e build + ("rust" ,rust) + ("rust-cbindgen" ,rust-cbindgen) + ("tar" ,tar) ; for untaring extensions + ("torbrowser-fonts" ,torbrowser-fonts) + ("util-linux" ,util-linux) ; for getopt on https-everywhere build + ("which" ,which) + ("xxd" ,xxd) ; for https-everywhere build + ("yasm" ,yasm))) + (arguments + `(#:tests? #f ; Some tests are autodone by mach on build fas= e. + + ;; XXX: There are RUNPATH issues such as + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.s= o, + ;; which is not in its RUNPATH, but they appear to be harmless in + ;; practice somehow. See <http://hydra.gnu.org/build/378133>. + #:validate-runpath? #f + + #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksu= ms' + + #:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 regex) + (ice-9 match) + (srfi srfi-34) + (srfi srfi-35) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + (guix build utils) + (sxml simple) + ,@%gnu-build-system-modules) + + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-extensions + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((https-everywhere-archive "https-everywhere.tar.gz") + (https-everywhere-srcdir "https-everywhere-src") + (bash (which "bash"))) + (setenv "SHELL" bash) + (mkdir https-everywhere-srcdir) + (invoke "tar" "xf" https-everywhere-archive + "--strip-components=3D1" "-C" https-everywhere-srcd= ir)) + #t)) + + (add-after 'unpack-extensions 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inpu= ts) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mism= atch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + + ;; On mach build system this is done on configure. + (delete 'bootstrap) + + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649= b934ca495991b7852b855")) + (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock") + (("(\"checksum .* =3D )\".*\"" all name) + (string-append name "\"" null-hash "\""))) + (generate-all-checksums "third_party/rust")) + #t)) + + (add-after 'build 'neutralize-store-references + (lambda _ + ;; Mangle the store references to compilers & other build too= ls in + ;; about:buildconfig, reducing TorBrowser's closure significa= nt. + ;; The resulting files are saved in lib/firefox/omni.ja + (substitute* "objdir/dist/bin/chrome/toolkit/content/global/b= uildconfig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ s= tore hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime depend= ency -->" + (string-drop hash 8)))) + #t)) + + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags))) + + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append + (assoc-ref inputs "python2") + "/bin/python")) + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid tim= estamp. + (setenv "LDFLAGS" (string-append + "-Wl,-rpath=3D" + (assoc-ref outputs "out") + "/lib/firefox")) + + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=3D@TOPSRCDIR@/obj).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version=3Ddev-build") + (string-append "ac_add_options --with-tor-browser-versio= n=3Dorg.gnu\n" + "ac_add_options --with-unsigned-addon-sco= pes=3Dapp\n" + "ac_add_options --enable-pulseaudio\n" + "ac_add_options --disable-debug-symbols\n" + "ac_add_options --disable-updater\n" + "ac_add_options --disable-gconf\n" + ;; Other syslibs that can be unbundled? (= nss, nspr) + "ac_add_options --enable-system-pixman\n" + "ac_add_options --enable-system-ffi\n" + "ac_add_options --with-system-bz2\n" + "ac_add_options --with-system-icu\n" + "ac_add_options --with-system-jpeg\n" + "ac_add_options --with-system-libevent\n" + "ac_add_options --with-system-zlib\n" + ;; Without these clang is not found. + "ac_add_options --with-clang-path=3D" + (assoc-ref %build-inputs "clang") "/bin/= clang\n" + "ac_add_options --with-libclang-path=3D" + (assoc-ref %build-inputs "clang") "/lib\= n"))) + + (substitute* "browser/app/profile/000-tor-browser.js" + ;; TorBrowser updates are disabled on mozconfig, but let'= s make sure. + (("(pref\\(\"extensions.torbutton.versioncheck_enabled\")= =2E*" _ m) + (string-append m ",false);\n"))) + + (substitute* "browser/extensions/tor-launcher/src/defaults/= preferences/torlauncher-prefs.js" + ;; Not multilingual. See tor-browser/build:141. Currently= disabled on + ;; tor-launcher, but let's make sure while missing langpa= cks. + (("(pref\\(\"extensions.torlauncher.prompt_for_locale\").= *" _ m) + (string-append m ", false);\n"))) + + ;; For user data outside the guix store. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHER\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + + (format #t "Invoking mach configure ...~%") + (invoke "./mach" "configure")) + #t)) + + (add-after 'configure 'build-extensions + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((bash (which "bash"))) + (setenv "SHELL" bash) + ;; Python3.6 is hardcoded on these scripts. Using v3.8 appe= ars to + ;; be harmless. + (with-directory-excursion "https-everywhere-src" + (substitute* '("install-dev-dependencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/script.py" + "test/validations.sh" + "utils/create_zip.py" + "utils/merge-rulesets.py" + "utils/setversion.py" + "utils/zipfile_deterministic.py") + (("python3.6") "python3")) + + ;; Failing to generate the xpi, but copy-dir appears to b= e enough. + ;; Failing on missing 'wasm'? Not generating rulesets. + (invoke "./make.sh"))) + #t)) + + (replace 'build + (lambda _ (invoke "./mach" "build"))) + + ;; TorBrowser just do a stage-package here and copy files to its = places. + (replace 'install + (lambda* (#:key inputs native-inputs outputs + #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (applications (string-append out "/share/applications"= )) + (builddir "objdir/dist/firefox") + (bindir (string-append out "/bin")) + (libdir (string-append out "/lib/firefox")) + (extdir (string-append libdir "/browser/extensions")) + (tordir (string-append libdir "/TorBrowser/Tor")) + (ptdir (string-append tordir "/PluggableTransports")) + (tbbscripts-dir "tbb-scripts/projects/tor-browser") + (ptconfigsdir (string-append + tbbscripts-dir + "/Bundle-Data/PTConfigs")) + (torbrowser-fonts (or (assoc-ref native-inputs + "torbrowser-fonts") + (assoc-ref inputs + "torbrowser-fonts"))) + (obfs4bin (string-append + (assoc-ref inputs "obfs4") + "/bin/obfs4proxy")) + (torbin (string-append + (assoc-ref inputs "tor") + "/bin/tor")) + (tbb-start-script (string-append + tbbscripts-dir + "/RelativeLink/start-tor-browser")) + (tbb-desktop (string-append + tbbscripts-dir + "/RelativeLink/start-tor-browser.desktop= ")) + (tbbdocs-in (string-append tbbscripts-dir + "/Bundle-Data/Docs")) + (tbbdocs-out (string-append libdir + "/TorBrowser/Docs")) + (tordata-in (string-append + tbbscripts-dir + "/Bundle-Data/linux/Data")) + (tordata-out (string-append libdir + "/TorBrowser/Data")) + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}") + (httpse-id "https-everywhere-eff@HIDDEN")) + ;; Stage-package + (format #t "Staging package ...~%") + (invoke "./mach" "build" "stage-package") + ;; Now we start moving files to its default paths. + (format #t "Deleting spurious files ...~%") + ;; TorBrowser doesn't use those. + ;; See: tor-browser-build.git/projects/firefox/build:167 + (with-directory-excursion + builddir + (for-each (lambda (file) + (if (file-exists? file) + (delete-file file) + (display (string-append "Warning: file " + file " not found! Skipping...\n= ")))) + '("firefox-bin" "libfreeblpriv3.chk" "libnssdbm3= =2Echk" + "libsoftokn3.chk" "fonts/TwemojiMozilla.ttf"))) + (rmdir (string-append builddir "/fonts")) + + (format #t "Creating install dirs ...~%") + (mkdir-p libdir) + (mkdir bindir) + (mkdir-p applications) + (mkdir-p tordir) + (mkdir-p ptdir) + (mkdir-p tordata-out) + (mkdir-p tbbdocs-out) + (mkdir-p extdir) + (format #t "Copying files to install dirs ...~%") + (copy-recursively builddir (string-append libdir "/") + #:log (%make-void-port "w")) + (copy-file tbb-start-script + (string-append libdir "/start-tor-browser")) + (chmod (string-append libdir "/start-tor-browser") #o555) + (copy-file tbb-desktop + (string-append libdir + "/start-tor-browser.desktop")) + (chmod (string-append libdir + "/start-tor-browser.desktop") #o555) + (install-file tbb-desktop applications) + (with-directory-excursion + (string-append libdir "/browser/chrome/icons/default") + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicolor/" + size "x" size "/apps"))) + (mkdir-p icons) + (copy-file file (string-append icons "/torbrowser.png= ")))) + '("default16.png" "default32.png" "default48.png" "defaul= t64.png" + "default128.png"))) + + (format #t "Linking start-tor-browser script ...~%") + (symlink (string-append libdir "/start-tor-browser") + (string-append bindir "/start-tor-browser")) + (format #t "Copying fonts to install dirs ...~%") + (copy-recursively torbrowser-fonts + (string-append libdir "/") + #:log (%make-void-port "w")) + (format #t "Linking store tor binary ...~%") + (symlink torbin (string-append tordir + "/tor")) + (format #t "Linking store obfs4 binary ...~%") + (symlink obfs4bin (string-append ptdir + "/obfs4proxy")) + (format #t "Copying Bundle-Data to default path ...~%") + (with-directory-excursion + tordata-in + (for-each (lambda (file) + (copy-recursively file + (string-append + tordata-out "/" file) + #:log (%make-void-port "w"))) + '("Browser" "fontconfig" "Tor"))) + (copy-file (string-append ptconfigsdir + "/linux/torrc-defaults-appendix") + (string-append tordata-out + "/Tor/torrc-defaults-appendix")) + (copy-file (string-append ptconfigsdir + "/bridge_prefs.js") + (string-append tordata-out + "/Browser/bridge-prefs-js-appendi= x")) + + (format #t "Copying licenses and changelog to default path = =2E..~%") + (copy-recursively tbbdocs-in + (string-append tbbdocs-out "/") + #:log (%make-void-port "w")) + + (format #t "Copying noscript ...~%") + (copy-file "noscript.xpi" (string-append + extdir "/" noscript-id ".xpi")) + (format #t "Copying https-everywhere ...~%") + (if (file-exists? + "https-everywhere-src/pkg/https-everywhere-2020.5.20~p= re-eff.xpi") + (copy-file + "https-everywhere-src/pkg/https-everywhere-2020.5.20~p= re-eff.xpi" + (string-append extdir "/" httpse-id ".xpi")) + (copy-recursively "https-everywhere-src/pkg/xpi-eff" + (string-append extdir "/" httpse-id) + #:log (%make-void-port "w")))) + #t))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "TorBrowser is the Tor Project version of Firefox browser. It is the= only +recommended way to anonymously browse the web that is supported by the pro= ject. +It modifies Firefox in order to avoid many know application level attacks = on +the privacy of Tor users. + +WARNING: This is not the official TorBrowser and is currently on testing. = Use +at your own risk and please report back on guix channels if you find any +issues.") + (license license:mpl2.0))) ;and others, see toolkit/content/license.ht= ml --=20 2.27.0 --+HP7ph2BbKc20aGI-- --0ntfKIWw70PvrIHh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl8cRncFgwPCZwAACgkQ YrJ+WmBEwoKlKxAApUb+A/3pMUkIJfga9lIQOXWyQynDHL9UtYF0j4WkPADdUL9y XcfF3nTT9pLMevsWu7BcL6tpnctPbd5DcOUUIzSxcxBiVP7L6bKF4f4rmrJsYm7/ RVYGbWofaJF1rMyafqWkIAYYCxoCayLy8eEnnY1Rav6Jpz/FGP98M5QpyQiRujG1 DEUaMhgSkxBSacC8Mcm/+1n25BLeAHUwoAV3DhD14Et9jmzG1ZarWTWGC9ZZiGvQ 2G9xzdfkn018HXRuZSSYoFmsdtoiM14s/naWm1xSNLiBIn0kwqzQEwFVvLUvA2we 0PZx2G04M7GdZ9cf5jWhikZ7HTOaBW1gu/muXgt1e5HVEJgYeFWbSOCSkf1eWWld 5s9VJTmnh4kQBf/ekjD31NMpUrHxrfRD8AD+L4IxadJNWnGYKTUXQg8AzIWsuyb6 2qnK3+0FmrVjTJtOizvtuzJ+aqpao9uG3Vu99UJadcv1V68A3l4yYSTly+hqzBjd yNg1fHsZFucYdLPNKAru3ncaCICj/gr3jWG9/0wMiqHjKbGKj4bCQIv+LEy0sHgt l0jXxOZdy/jI1DEtT4/NGF2EottF0c9DcgqQaNKXFdOu4phYpeGwZDPmjYQPoMKM CSY5pQyWwXnve0MrcQtkQoKSynI3Le+h6iqK4gTtyHmH2LuohZtBzfRvHQw= =W84x -----END PGP SIGNATURE----- --0ntfKIWw70PvrIHh--
guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 15 Jul 2020 21:16:32 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 15 17:16:31 2020 Received: from localhost ([127.0.0.1]:53766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1jvolI-0004MI-Ta for submit <at> debbugs.gnu.org; Wed, 15 Jul 2020 17:16:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:35540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <nandre@HIDDEN>) id 1jvolE-0004M8-8X for submit <at> debbugs.gnu.org; Wed, 15 Jul 2020 17:16:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <nandre@HIDDEN>) id 1jvolE-0005N5-2q for guix-patches@HIDDEN; Wed, 15 Jul 2020 17:16:16 -0400 Received: from mx1.riseup.net ([198.252.153.129]:44422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <nandre@HIDDEN>) id 1jvol7-0007K9-Sy for guix-patches@HIDDEN; Wed, 15 Jul 2020 17:16:15 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4B6VYM1ztKzFdxM for <guix-patches@HIDDEN>; Wed, 15 Jul 2020 14:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1594847767; bh=SVlWcFrq/mhJe4ruNJLi/VsrCx9CxMLmIyB5MaQth2U=; h=Date:From:To:Subject:From; b=Xc0ks9PPkX03eqt8X8m7jkV+fWNlvtIWugTpgQOP82aAkL/Xq86ygNFjK3sevY0ev 3koO+hBZxEj+GO7ctDVl8xcfJNZJUg0sbs03LvbhSYCjbGx6bxKGunoQZbXKqN6CBp YbzILPve5XNA+U5THSfPZX1pk3XSV7gvwstmhDC0= X-Riseup-User-ID: 8CB70C45CD92722A3A815FDFEAC3B41DFF70BFD506D1B2428183B4D40B040602 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 4B6VYJ3R9Gz8sjr for <guix-patches@HIDDEN>; Wed, 15 Jul 2020 14:16:03 -0700 (PDT) Date: Wed, 15 Jul 2020 18:15:47 -0300 From: =?iso-8859-1?Q?Andr=E9?= Batista <nandre@HIDDEN> To: guix-patches@HIDDEN Subject: [WIP] gnu: Add torbrowser-unbundle. Message-ID: <20200715211547.GA17146@andel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Pd0ReVV5GZGQvF3a" Content-Disposition: inline Received-SPF: pass client-ip=198.252.153.129; envelope-from=nandre@HIDDEN; helo=mx1.riseup.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/15 17:16:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) --Pd0ReVV5GZGQvF3a Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello Guix! The patch bellow adds a torbrowser-unbundle variable, but it needs a bit of working before merging into master. I've inserted many comments on the code regarding issues which need attention and questions that remained. I've decided to send this early notice so I can ask some questions and get criticism before I go too deep on the wrong direction. As the name implies it does not bundle tor and to use it, you need to have a properly configured system instance. You also need to configure a ControlPort and a HashedControlPassword if you want to be able to get new identities while browsing and if you don't want to keep seeing a warning on startup page. It will create/change permissions on ${HOME}/Data and use the native Downloads dir. It does not have bundled fonts, so you will be fingerprintable on levels bellow safest. It does not have support for obfs4 bridges yet. There is no startup script for now, you are advised to invoke it with '--class "Tor Browser"'. Now for the questions: - Should it keep unbundled? If so, should we try to unbundle the https-everywhere and noscript extensions? - Is it acceptable to use to use the noscript .xpi, instead of building? Upstream just grabs it from addons.mozilla. There does not appear to be blobs and the GPL full text is inside it. - Should we try change the app name at build time or is it enough to adapt the name of the startup script (which is not the for now, but is certainly needed)? - Any other things that I've been blind to? If you don't have time to review the code, but has processing power available, build it with rounds=2 or try to cross compile for i686 and comment back. Thanks, --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="0001-gnu-Add-torbrowser-unbundle.patch" Content-Transfer-Encoding: quoted-printable =46rom 2a9d31c9422de3d7486da6c2ef3e15c3496c7e69 Mon Sep 17 00:00:00 2001 =46rom: =3D?UTF-8?q?Andr=3DC3=3DA9=3D20Batista?=3D <nandre@HIDDEN> Date: Wed, 15 Jul 2020 17:24:04 -0300 Subject: [PATCH] gnu: Add torbrowser-unbundle. To: guix-patches@HIDDEN * gnu/packages/tor.scm (torbrowser-unbundle): New variable. --- gnu/packages/tor.scm | 634 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 633 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tor.scm b/gnu/packages/tor.scm index c852c54a5b..528a528403 100644 --- a/gnu/packages/tor.scm +++ b/gnu/packages/tor.scm @@ -49,7 +49,49 @@ #:use-module (gnu packages qt) #:use-module (gnu packages autotools) #:use-module (gnu packages tls) - #:use-module (gnu packages w3m)) + #:use-module (gnu packages w3m) + ;; New flags start here. Verify if they are all needed. + #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 match) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix store) + #:use-module (guix monads) + #:use-module (guix build-system cargo) + #:use-module (guix build-system trivial) + #:use-module (gnu packages admin) + #:use-module (gnu packages audio) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bash) + #:use-module (gnu packages databases) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gnome) + #:use-module (gnu packages libcanberra) + #:use-module (gnu packages cups) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages perl) + #:use-module (gnu packages compression) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages libreoffice) ;for hunspell + #:use-module (gnu packages image) + #:use-module (gnu packages libffi) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages node) + #:use-module (gnu packages xorg) + #:use-module (gnu packages gl) + #:use-module (gnu packages assembly) + #:use-module (gnu packages rust) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages llvm) + #:use-module (gnu packages nss) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages video) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages readline) + #:use-module (gnu packages vim) ; for xxd + #:use-module (gnu packages sqlite)) =20 (define-public tor (package @@ -324,3 +366,593 @@ statistics and status reports on: =20 Potential client and exit connections are scrubbed of sensitive informatio= n.") (license license:gpl3+))) + +;; Imported from gnuzilla.scm, make it public there? +(define* (computed-origin-method gexp-promise hash-algo hash + #:optional (name "source") + #:key (system (%current-system)) + (guile (default-guile))) + "Return a derivation that executes the G-expression that results +from forcing GEXP-PROMISE." + (mlet %store-monad ((guile (package->derivation guile system))) + (gexp->derivation (or name "computed-origin") + (force gexp-promise) + #:graft? #f ;nothing to graft + #:system system + #:guile-for-build guile))) + +(define %torbrowser-version "68.10.0esr-9.5-1") +(define %torbrowser-build-id "20200709000000") ;must be of the form YYYYMM= DDhhmmss + +;; (Un)fortunatly TorBrowser has it's own reproducible build system - RBM = - which +;; automates the build process for them and compiles TorBrowser from a ran= ge of +;; repositories and produces a range of tarballs for different architectur= es and +;; locales. So we need to nit-pick what is needed for guix and produce our= own +;; tarball. See https://gitweb.torproject.org/builders/tor-browser-build.g= it/projects/\ +;; {tor-browser,firefox}/{build,config} for the rationale applied here. Wh= en built from its +;; unpatched repo, the 'mozconfig' is different and it errors out on missi= ng +;; torbutton source code. If we patch 'toolkit/moz.build', it compiles suc= cessfuly +;; but the browser does not run and even if it ran, it would be missing mo= st of +;; its funcionality. See also the Hacking on TorBrowser document for a hig= h level +;; introduction (https://trac.torproject.org/projects/tor/wiki/doc/TorBrow= ser/Hacking). +;; +;; WARNING: For now it still lacks the bundled fonts, obfs4 bridge and loc= ales. +;; If used on level below safest, the browser accessible fonts are fingerp= rintable. +;; On safest, it doesn't seem to be distinguishable from upstream bundle a= ccording +;; to https://panopticlick.eff.org. To access some features, users need to +;; configure the ControlPort and HashedControlPassword in system torrc and= set +;; TOR_CONTROL_PASSWD accordingly before launching the Browser (ControlPor= t defaults to +;; 9051). Without this, the browser will work (try https://check.torprojec= t.org) but +;; user is presented with a startup page that tells something is wrong. +(define torbrowser-source + (let* ((torbrowser-commit "75c2bb720d4ceb76231e8ecc3455754bf05ba19b") + (torbrowser-version %torbrowser-version) + (upstream-torbrowser-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-browser.git") + (commit torbrowser-commit))) + (file-name (git-file-name "tor-browser" torbrowser-version)) + ;; Substitute for hash syntax. + (sha256 + (base32 + "19sk46k2bqa72il46pdl534nk2g3fi6l7m7kbglddccxv19ck0k4")))) + + ;; Not used yet, mainly useful for references and for a patched s= tart-tor-browser + ;; script in the near future. + (torbrowser-build-commit "e94ba3a7677f7051a14b2304427ec8393a450fd= c") + (torbrowser-build-version "9.5") + (upstream-torbrowser-build-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/builders/tor-browser-bu= ild.git") + (commit torbrowser-build-commit))) + (file-name (git-file-name "tor-browser-build" torbrowser-build= -version)) + ;; Substitute for hash syntax. + (sha256 + (base32 + "1jgkrsckcjgr1lgcwahzdrcasmpghs2ppz6w80fya89pa5d6r0gv")))) + + (torbutton-commit "ebe2bedab44e38f18c7968bd327d99eef7660f34") + (torbutton-version "9.5") + (upstream-torbutton-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/torbutton.git") + (commit torbutton-commit))) + (file-name (git-file-name "torbutton" torbutton-version)) + ;; Substitute for hash syntax. + (sha256 + (base32 + "03xdyszab1a8j98xv6440v4lq58jkfqgmhxc2a62qz8q085d2x83")))) + + (tor-launcher-commit "b4838d339a84c5ebebd91a0ba6b22d44ecda97b1") + (tor-launcher-version "0.2.21") + (upstream-tor-launcher-source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.torproject.org/tor-launcher.git") + (commit tor-launcher-commit))) + (file-name (git-file-name "tor-launcher" tor-launcher-version)) + ;; Substitute for hash syntax. + (sha256 + (base32 + "0xxwyw1j6dkm2a24kg1564k701p5ikfzs1f9n0gflvlzz9427haf")))) + + ;; TorBrowser uses its own git repo but it appears to be unpatche= d from upstream + ;; and it does no provide a tarball, so let's try upstream for no= w. + (https-everywhere-version "2020.5.20") + (upstream-https-everywhere-source + (origin + (method url-fetch) + (uri (string-append "https://github.com/EFForg/https-everywher= e/archive/" + https-everywhere-version ".tar.gz")) + ;; Substitute for hash syntax. + (sha256 + (base32 + "027lga3z0a4d7s95id861das7g0k29p7pqh9xd77jm87f7w4l763")))) + + ;; TorBrowser 9.5.1 actualy uses v11.0.32, but let's get latest r= elease. + ;; TorProject uses the .xpi instead of compiling the source code. + (noscript-xpi-version "11.0.34") + (upstream-noscript-xpi + (origin + (method url-fetch) + (uri (string-append "https://secure.informaction.com/download/= releases/noscript-" + noscript-xpi-version ".xpi")) + (sha256 + (base32 + "0y45925ms2bk9d42zbgwcdb2sif8kqlbaflkz15q08gi7vgki6km")))) + + ;; Not used for now. It uses curl to update TLDs at build time wh= ich will make + ;; the build unreproducible. Also it uses LWM::Simple module whic= h is not available + ;; on guix. Moreover, it complains about perl not having regexp c= apabilities. Patch + ;; build script, translate it to guile or just use the .xpi as up= stream does? + (noscript-version "11.0.34") + (upstream-noscript-source + (origin + (method url-fetch) + (uri (string-append "https://github.com/hackademix/noscript/ar= chive/" + noscript-version ".tar.gz")) + ;; Substitute for hash syntax. + (sha256 + (base32 + "1amhdwc62cnp1i7vx4zyqd7iyj52rcr5ks9a39viczpqgfgk7hfy"))))) + + ;; Now we bundle the grabbed sources. + (origin + (method computed-origin-method) + (file-name (string-append "torbrowser-" %torbrowser-version ".tar.xz= ")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (let ((torbrowser-dir (string-append "torbrowser-" #$torbrow= ser-version)) + (torbutton-dir "toolkit/torproject/torbutton") + (tor-launcher-dir "browser/extensions/tor-launcher") + (tbb-scripts-dir "tbb-scripts") + (https-everywhere "https-everywhere.tar.gz") + (noscript "noscript.tar.gz") + (noscript-xpi "noscript.xpi")) + + (set-path-environment-variable + "PATH" '("bin") + (list #+(canonical-package bash) + #+(canonical-package xz) + #+(canonical-package tar))) + + (format #t "Copying torbrowser source to writable path ...= ~%") + (force-output) + (copy-recursively #+upstream-torbrowser-source + torbrowser-dir + #:log (%make-void-port "w")) + + (with-directory-excursion torbrowser-dir + (format #t "Setting torbutton to writable...~%") + (force-output) + (make-file-writable torbutton-dir) + + (format #t "Copying torbutton source to torbrowser...~%") + (force-output) + (copy-recursively #+upstream-torbutton-source + torbutton-dir + #:log (%make-void-port "w")) + + (format #t "Copying tor-launcher source to torbrowser...= ~%") + (force-output) + (copy-recursively #+upstream-tor-launcher-source + tor-launcher-dir + #:log (%make-void-port "w")) + + (format #t "Copying tor-browser-build source to torbrows= er...~%") + (force-output) + (mkdir tbb-scripts-dir) + (copy-recursively #+upstream-torbrowser-build-source + tbb-scripts-dir + #:log (%make-void-port "w")) + + (format #t "Copying https-everywhere source to torbrowse= r...~%") + (force-output) + (copy-file #+upstream-https-everywhere-source + https-everywhere) + + (format #t "Copying noscript source to torbrowser...~%") + (force-output) + (copy-file #+upstream-noscript-source + noscript) + + (format #t "Copying noscript xpi to torbrowser...~%") + (force-output) + (copy-file #+upstream-noscript-xpi + "noscript.xpi")) + + (invoke "tar" "cvfa" #$output + ;; Avoid non-determinism in the archive. For now j= ust copy icecat timestamp. + "--mtime=3D@315619200" ; 1980-01-02 UTC + "--owner=3Droot:0" + "--group=3Droot:0" + "--sort=3Dname" + torbrowser-dir) + #t)))))))) + +(define-public torbrowser-unbundle + (package + (name "torbrowser-unbundle") + (version %torbrowser-version) + (source torbrowser-source) + (build-system gnu-build-system) + (inputs + `(("alsa-lib" ,alsa-lib) + ("bzip2" ,bzip2) + ("cups" ,cups) + ("dbus-glib" ,dbus-glib) + ("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("gtk+-2" ,gtk+-2) + ("graphite2" ,graphite2) + ("pango" ,pango) + ("freetype" ,freetype) + ("harfbuzz" ,harfbuzz) + ("libcanberra" ,libcanberra) + ("libgnome" ,libgnome) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libogg" ,libogg) + ;; ("libtheora" ,libtheora) ; wants theora-1.2, not yet released + ("libvorbis" ,libvorbis) + ("libxft" ,libxft) + ("libevent" ,libevent) + ("libxinerama" ,libxinerama) + ("libxscrnsaver" ,libxscrnsaver) + ("libxcomposite" ,libxcomposite) + ("libxt" ,libxt) + ("libffi" ,libffi) + ("ffmpeg" ,ffmpeg) + ("libvpx" ,libvpx) + ("icu4c" ,icu4c) + ("pixman" ,pixman) + ("pulseaudio" ,pulseaudio) + ("mesa" ,mesa) + ("mit-krb5" ,mit-krb5) + ;; See <https://bugs.gnu.org/32833> + ;; and related comments in the 'remove-bundled-libraries' phase. + ;; UNBUNDLE-ME! ("nspr" ,nspr) + ;; UNBUNDLE-ME! ("nss" ,nss) + ("shared-mime-info" ,shared-mime-info) + ("sqlite" ,sqlite) + ("startup-notification" ,startup-notification) + ("unzip" ,unzip) + ("zip" ,zip) + ("zlib" ,zlib))) + (native-inputs + `(("patch" ,(canonical-package patch)) + ("rust" ,rust) + ("cargo" ,rust "cargo") + ("rust-cbindgen" ,rust-cbindgen) + ("llvm" ,llvm) + ("clang" ,clang) + ("perl" ,perl) + ("node" ,node) + ("openssl" ,openssl) ; Required for building https-everywhere + ("tar" ,tar) ; for untaring extensions + ("util-linux" ,util-linux) ; for getopt on https-everywhere build + ("xxd" ,xxd) ; for https-everywhere build + ("python" ,python) + ("python2" ,python-2.7) + ("python2-pysqlite" ,python2-pysqlite) + ("yasm" ,yasm) + ("nasm" ,nasm) ; XXX FIXME: only needed on x86_64 and i686 + ("pkg-config" ,pkg-config) + ("autoconf" ,autoconf-2.13) + ("which" ,which))) + (arguments + `(#:tests? #f ; Some tests are autodone by mach on build fas= e. + + ;; XXX: There are RUNPATH issues such as + ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.s= o, + ;; which is not in its RUNPATH, but they appear to be harmless in + ;; practice somehow. See <http://hydra.gnu.org/build/378133>. + ;; + ;; Is this needed? + #:validate-runpath? #f + + #:imported-modules ,%cargo-utils-modules ;for `generate-all-checksu= ms' + + ;; Verify which modules are actually needed. + #:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 regex) + (ice-9 match) + (srfi srfi-34) + (srfi srfi-35) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + (guix build utils) + (sxml simple) + ,@%gnu-build-system-modules) + + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-extensions + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((https-everywhere-archive "https-everywhere.tar.gz") + (https-everywhere-srcdir "https-everywhere-src") + (noscript-archive "noscript.tar.gz") + (noscript-srcdir "noscript-src") + (bash (which "bash"))) + + (setenv "SHELL" bash) + + (mkdir https-everywhere-srcdir) + (mkdir noscript-srcdir) + (invoke "tar" "xf" https-everywhere-archive "--strip-compo= nents=3D1" + "-C" https-everywhere-srcdir) + (invoke "tar" "xf" noscript-archive "--strip-components=3D= 1" + "-C" noscript-srcdir)))) + + ;; Not used yet. For start-tor-browser patch and possibly others. + (add-after 'unpack-extensions 'apply-guix-specific-patches + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((patch (string-append (assoc-ref (or native-inputs inpu= ts) + "patch") + "/bin/patch"))) + (for-each (match-lambda + ((label . file) + (when (and (string-prefix? "torbrowser-" label) + (string-suffix? ".patch" label)) + (format #t "applying '~a'...~%" file) + (invoke patch "--force" "--no-backup-if-mism= atch" + "-p1" "--input" file)))) + (or native-inputs inputs))) + #t)) + + ;; On mach build system this is done on configure. + (delete 'bootstrap) + + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649= b934ca495991b7852b855")) + (substitute* '("Cargo.lock" "gfx/wr/Cargo.lock") + (("(\"checksum .* =3D )\".*\"" all name) + (string-append name "\"" null-hash "\""))) + (generate-all-checksums "third_party/rust")) + #t)) + + (add-after 'build 'neutralize-store-references + (lambda _ + ;; Mangle the store references to compilers & other build too= ls in + ;; about:buildconfig, reducing TorBrowser's closure significa= nt. + ;; The resulting files are saved in lib/firefox/omni.ja + (substitute* "objdir/dist/bin/chrome/toolkit/content/global/b= uildconfig.html" + (((format #f "(~a/)([0-9a-df-np-sv-z]{32})" + (regexp-quote (%store-directory))) _ s= tore hash) + (string-append store + (string-take hash 8) + "<!-- Guix: not a runtime depend= ency -->" + (string-drop hash 8)))) + #t)) + + (replace 'configure + (lambda* (#:key inputs outputs configure-flags #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + ;; Is this needed? + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags))) + + (setenv "SHELL" bash) + (setenv "AUTOCONF" (string-append + (assoc-ref %build-inputs "autoconf") + "/bin/autoconf")) + (setenv "CONFIG_SHELL" bash) + (setenv "PYTHON" (string-append + (assoc-ref inputs "python2") + "/bin/python")) + (setenv "MOZ_BUILD_DATE" ,%torbrowser-build-id) ; avoid tim= estamp. + (setenv "LDFLAGS" (string-append + "-Wl,-rpath=3D" + (assoc-ref outputs "out") + "/lib/firefox")) + + ;; Maybe remove --disable-strip since tor-builder strips on= another step + ;; See tor-browser-build.git/projects/firefox/build:231. + ;; Add flag for changing app name to torbrowser or use this= name for the start script? + (substitute* ".mozconfig" + ;; Arch independent builddir. + (("(mk_add_options MOZ_OBJDIR=3D@TOPSRCDIR@/ob= j).*" _ m) + (string-append m "dir\n")) + (("ac_add_options --disable-tor-launcher") "") + ;; We won't be building incrementals. + (("ac_add_options --enable-signmar") "") + (("ac_add_options --enable-verify-mar") "") + (("ac_add_options --with-tor-browser-version= =3Ddev-build") + (string-append "ac_add_options --with-tor-bro= wser-version=3Dorg.gnu\n" + "ac_add_options --with-unsigne= d-addon-scopes=3Dapp\n" + "ac_add_options --enable-pulse= audio\n" + "ac_add_options --disable-debu= g-symbols\n" + "ac_add_options --disable-upda= ter\n" + "ac_add_options --disable-gcon= f\n" + ;; Other syslibs that can be u= nbundled? (nss, nspr) + "ac_add_options --enable-syste= m-pixman\n" + "ac_add_options --enable-syste= m-ffi\n" + "ac_add_options --with-system-= bz2\n" + "ac_add_options --with-system-= icu\n" + "ac_add_options --with-system-= jpeg\n" + "ac_add_options --with-system-= libevent\n" + "ac_add_options --with-system-= zlib\n" + ;; Without these clang is not = found. + "ac_add_options --with-clang-p= ath=3D" + (assoc-ref %build-inputs "clan= g") "/bin/clang\n" + "ac_add_options --with-libclan= g-path=3D" + (assoc-ref %build-inputs "clan= g") "/lib\n"))) + + ;; See tor-browser-build.git/projects/tor-browser/RelativeL= ink/start-tor-browser:307 on running + ;; with system tor instance. + (substitute* "browser/app/profile/000-tor-browser.js" + (("(pref\\(\"network.proxy.socks_port\").*" _ = m) + (string-append m ", 9050);\n")) + (("(pref\\(\"extensions.torbutton.loglevel\").= *" _ m) + (string-append m ",2);\n")) + (("(pref\\(\"extensions.torbutton.logmethod\")= =2E*" _ m) + (string-append m ",0);\n")) + (("(pref\\(\"extensions.torbutton.inserted_but= ton\").*" _ m) + (string-append m ",true);\n")) + (("(pref\\(\"extensions.torbutton.launch_warni= ng\").*" _ m) + (string-append m ",false);\n")) + ;; TorBrowser updates are disabled on mozconfi= g, but let's make sure. + (("(pref\\(\"extensions.torbutton.versioncheck= _enabled\").*" _ m) + (string-append m ",false);\n"))) + + (substitute* "browser/extensions/tor-launcher/src/defaults/= preferences/torlauncher-prefs.js" + (("(pref\\(\"extensions.torlauncher.start_tor\= ").*" _ m) + (string-append m ", false);\n")) + (("(pref\\(\"extensions.torlauncher.prompt_at_= startup\").*" _ m) + (string-append m ", false);\n")) + ;; Investigate this one: "extensions.torlaunch= er.only_configure_tor" + ;; on 'tl-util.jsm', would it be a nice additi= on? + (("(pref\\(\"extensions.torlauncher.should_rem= ove_meek_helper_profiles\").*" _ m) + (string-append m ", false);\n")) + (("(pref\\(\"extensions.torlauncher.loglevel\"= ).*" _ m) + (string-append m ", 2);\n")) + (("(pref\\(\"extensions.torlauncher.logmethod\= ").*" _ m) + (string-append m ", 0);\n")) + (("(pref\\(\"extensions.torlauncher.control_po= rt\").*" _ m) + (string-append m ", 9051);\n"))) + + ;; For user data outside the guix store. Dirty hack. Maybe = worth a patch upstream to create a + ;; configure flag for guix. It will create/modify permissio= ns on 'Data' dir on $HOME. It also + ;; means that TorBrowser will share the Downloads dir on ho= me and not keep its own. + ;; Work on start-tor-browser script to set a TorBrowser own= home. + (substitute* "xpcom/io/TorFileUtils.cpp" + (("ANDROID") "GNUGUIX")) + (substitute* "old-configure.in" + (("(AC_SUBST\\(TOR_BROWSER_DISABLE_TOR_LAUNCHE= R\\))" _ m) + (string-append m "\n AC_DEFINE(GNUGUIX)\n"))) + + ;; TODO: change prefs to block autoupdate app and extension= s. + + (newline) + (format #t "Invoking mach configure ...~%") + (force-output) + (invoke "./mach" "configure")))) + + ;; Building noscript from source is failing for now. So its sourc= es remain unused. + (add-after 'configure 'build-extensions + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let* ((bash (which "bash"))) + + (setenv "SHELL" bash) + + ;; Python3.6 is hardcoded on these scripts. Using v3.8 appe= ars to be harmless. + (with-directory-excursion "https-everywhere-src" + (substitute* '("install-dev-depen= dencies.sh" + "make.sh" + "hooks/precommit" + "test/firefox.sh" + "test/manual.sh" + "test/script.py" + "test/validations.= sh" + "utils/create_zip.= py" + "utils/merge-rules= ets.py" + "utils/setversion.= py" + "utils/zipfile_det= erministic.py") + (("python3.6") "pyth= on3")) + + ;; Failing to generate the xpi, b= ut copy-dir appears to be enough. + ;; Failing on missing 'wasm'? + (invoke "./make.sh"))))) + + (replace 'build + (lambda _ (invoke "./mach" "build"))) + + ;; TorBrowser just do a stage-package here and copy files to its = places. + (replace 'install + (lambda* (#:key inputs outputs configure-flags #:allow-other-ke= ys) + (let* ((out (assoc-ref outputs "out")) + (builddir "objdir/dist/firefox") + (libdir (string-append out "/lib/firefox")) + (bindir (string-append out "/bin")) + (noscript-id "{73a6fe31-595d-460b-a920-fcc0f8843232}.x= pi") + (extdir (string-append libdir "/browser/extensions"))) + + ;; (display "string\n") should be enough here, chage this. + (format #t "Staging package ...~%") + (force-output) + (invoke "./mach" "build" "stage-package") + (format #t "Deleting spurious files ...~%") + (force-output) + ;; TorBrowser doesn't use those. See: tor-browser-build.git= /projects/firefox/build:167 + (for-each delete-file `(,(string-append builddir "/firefox-= bin") + ,(string-append builddir "/libfreeb= lpriv3.chk") + ,(string-append builddir "/libnssdb= m3.chk") + ,(string-append builddir "/libsofto= kn3.chk"))) + + (format #t "Creating install dirs ...~%") + (force-output) + (mkdir-p libdir) + (mkdir bindir) + + (format #t "Copying files to install dirs ...~%") + (force-output) + (copy-recursively builddir (string-append libdir "/") + #:log (%make-void-port "w")) + + (format #t "Linking binary ...~%") + (force-output) + (symlink (string-append libdir "/firefox") + (string-append bindir "/firefox")) + + (format #t "Copying extensions to default path ...~%") + (force-output) + (mkdir-p extdir) + (format #t "Copying noscript ...~%") + (force-output) + (copy-file "noscript.xpi" (string-append extdir "/" noscrip= t-id)) + (format #t "Copying https-everywhere ...~%") + (force-output) + (if (file-exists? "https-everywhere-src/pkg/https-everywher= e-2020.5.20~pre-eff.xpi") + (copy-file "https-everywhere-src/pkg/https-everywhere-2= 020.5.20~pre-eff.xpi" + (string-append extdir "/https-everywhere-eff= @eff.org.xpi")) + (copy-recursively "https-everywhere-src/pkg/xpi-eff" + (string-append extdir "/https-everywh= ere-eff@HIDDEN"))) + #:log (%make-void-port "w"))))))) + + ;; Thunderbird doesn't provide any .desktop file, but TorBrowser = does, however it's staged not installed, let's see. + ;; + ;; Is this needed? Try to play webmedia! + ;;(add-after 'install 'wrap-program + ;; (lambda* (#:key inputs outputs #:allow-other-keys) + ;; (let* ((out (assoc-ref outputs "out")) + ;; (lib (string-append out "/lib")) + ;; (gtk (assoc-ref inputs "gtk+")) + ;; (gtk-share (string-append gtk "/share")) + ;; (pulseaudio (assoc-ref inputs "pulseaudio")) + ;; (pulseaudio-lib (string-append pulseaudio "/lib"))) + ;; (wrap-program (car (find-files lib "^firefox$")) + ;; `("XDG_DATA_DIRS" prefix (,gtk-share)) + ;; `("LD_LIBRARY_PATH" prefix (,pulseaudio-lib))) + ;; #t)))))) + (home-page "https://www.torproject.org") + (synopsis "Anonymous browser derived from Mozilla Firefox") + (description + "TorBrowser is the Tor Project version of the Firefox browser. It is +the only recommended way to anonymously browse the web that is supported by +the project. It modifies firefox in order to avoid many know application = level +attacks on the privacy of Tor users. + +WARNING: This is not the official TorBrowser and is currently on testing. +If you have issues using it, do not bother Tor Developers, as it is not the +official bundle provided by the Tor Project. Use at your own risk and ple= ase +report back on guix channels. This version does not bundle @code{tor}, yo= u need +to configure it as a system service and set ControlPort and HashedControlP= assword +to access some features.") + (license license:mpl2.0))) ;and others, see toolkit/content/licens= e.html --=20 2.27.0 --6c2NcOVqGQ03X4Wi-- --Pd0ReVV5GZGQvF3a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQI5BAABCgAjFiEEIBdLYNLH+F+MBdSrYrJ+WmBEwoIFAl8PcgAFgwPCZwAACgkQ YrJ+WmBEwoKG+Q//WNP/2bs87azCZfyCmRUPB5mgI5jq6QbTaj+MxBpVtb7laL1Y D/7SadHs79qF63ZwQWzOFbOjDdMVX/h+ZVydoFjIcoK5Idiu3erjyTAFklnMInTE eWY3buWfaPp0/isxlHfNBk7Xzum7mYSAUD4B/L+uCrSGrtTvy1PLHvdwB6SwSvao WB9oKhs0WGQo6pgYXjtE9JhU8MB7HoJfYICYE6dFKUC5EoHGxQl1BOmOeZY7Y8oc 0zVdNJ7SeCD7xvvR6wNbiKAfEo3tp4Np+yp2HI6HGnTFhmIcUI9iDoDo4RzNzC8O 7t1noPh9r9s7f1FGdsI01UnBPO5pzEJ1m3RYNmSEhQpQ3ZYCC3b69hxObjNRIatM lQFRpnZ6iH7ixKS6I4RCAtScyekmpVwr7R4K3j36kIFRct9vrUd/CP5/I4tvHTi9 JmZcyfko/MNMEeg0s+4mVrAftfGWrCCpV6p/uZhknZpSLbin7TFcnww6eMOrliQS 056s/yIq4uOSDVjDNVwJvqUKa63XXLijetpL6dSbOc5BLd7g004v55lQBz/NEfnG 6HK+vyZMQ5iaJpw+KbkpZ20ORrOFL/+3PLX1x8O2CV1UBiwmPFteyhvFBpuAHljf fVoNDm20tom+CJpWD7sqkwZqyAPTPSjz0FdhRzdXRhO1sMcuUcIBd3QcpYw= =kzRK -----END PGP SIGNATURE----- --Pd0ReVV5GZGQvF3a--
André Batista <nandre@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#42380
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.