Commit 0788b1b2 authored by Tails developers's avatar Tails developers
Browse files

Migrate to TBB 4.x.

Note that the browser profile has been moved location inside the
tarball, and the bundled firefox will look for the default profile
accordingly.
parent 8c176bbb
...@@ -4,23 +4,23 @@ set -eu ...@@ -4,23 +4,23 @@ set -eu
echo "Install the Tor Browser" echo "Install the Tor Browser"
# Get the below with `grep "tor-browser-linux32-linux32-.*\.tar.xz" sha256sums.txt` # Get the below with `grep "tor-browser-linux32-.*\.tar.xz" sha256sums.txt`
BUNDLES="$(cat <<EOF BUNDLES="$(cat <<EOF
6d45a3592f14c5d9db76d8567722cf21339ee87bb6a24e79899e8f1b1a65fb09 tor-browser-linux32-3.6.5_ar.tar.xz 3a33a3ad31b6d84e3c3aafe3036a6142999cde2d34241284ca39a73231423d34 tor-browser-linux32-4.0-alpha-2_ar.tar.xz
57cb7ec7031ccdd6f045b075e51653078aa5040065dde75398eb2d57ef1bd035 tor-browser-linux32-3.6.5_de.tar.xz 5a4782b36ebbbeb5ee389a02492cee061660621a4a65159e8cd0bebdad5159c3 tor-browser-linux32-4.0-alpha-2_de.tar.xz
ce9ee66dbde246acac9e2574317fc983b7ed1086591d60e7124a446d6dd1fea5 tor-browser-linux32-3.6.5_en-US.tar.xz 79c718c1b0faeff2f0746f38a437de520b2fbae46bf1c799bf59bfa6f28a787e tor-browser-linux32-4.0-alpha-2_en-US.tar.xz
9953c8ccd95981e83ff6f22ed6cdfa54a114323d43d78a8a2ab1aa7a4d727cf6 tor-browser-linux32-3.6.5_es-ES.tar.xz 993fea315635b84b7d42d285426528a4694f80f2e2b72adb9f4014b18a9eb539 tor-browser-linux32-4.0-alpha-2_es-ES.tar.xz
e2bf78eaaec3ca4e9e1bc52db6077676c2bd6e0a624283ec37cc70aad9c65730 tor-browser-linux32-3.6.5_fa.tar.xz f2c633f7e0c3bb1dbf532aabbd12057a7a4f308827eb1887b8b6670c6e7e165a tor-browser-linux32-4.0-alpha-2_fa.tar.xz
30f2dc943fb1ff0aaaf3ea7d7f1c869b5a85127f594322c1ec637fa43c8a5ceb tor-browser-linux32-3.6.5_fr.tar.xz f147305b1997bcc5a13c724ff94f3a53a887d53541055801d699034798f12169 tor-browser-linux32-4.0-alpha-2_fr.tar.xz
d28adc1385b412ef06deb8d1f46cf123f7f582b3d0c057effc342bbbba613a29 tor-browser-linux32-3.6.5_it.tar.xz e2df844002e0c0d34c3c6005149bbe8aa12f3a4aac0aab3852a1a07dc09138f4 tor-browser-linux32-4.0-alpha-2_it.tar.xz
689d387bdaf21d2b92ba59b298e863ca0be011e63538e4948b4f445c7461fa4e tor-browser-linux32-3.6.5_ko.tar.xz 909b4a44624a3080a38cd34b4c1a271078611259ecb97ade91725665d4e6f818 tor-browser-linux32-4.0-alpha-2_ko.tar.xz
dc940b23531616f11cc1a8d36a077ccd6d0bd1cf16ade8a1688d791f5465b1ce tor-browser-linux32-3.6.5_nl.tar.xz 4a28ea7d086196fb80f20e0cd430455c5b750a95f327f5f537b2bdbe087ef675 tor-browser-linux32-4.0-alpha-2_nl.tar.xz
f5a9ad3801d9102a4a32e7abd3f35c341d4a98e80bd83149aa1023c86f1c3fc4 tor-browser-linux32-3.6.5_pl.tar.xz fb85361495d17c4cc81c63386796116e57820f128c427acdefb7b3f7d6e1d577 tor-browser-linux32-4.0-alpha-2_pl.tar.xz
1a56594213ece5fb28f4f7d7ed02b9d87fd2ab0699fae4f11aa9c307a711afcd tor-browser-linux32-3.6.5_pt-PT.tar.xz 6f3e5ec7c2ad6e6f26f48f7ba6b5946e2e3add6f7492000671b33941c8679d35 tor-browser-linux32-4.0-alpha-2_pt-PT.tar.xz
8c86bd7c40f95d50ce572aa61301001d76882e8f024507b82e0797121e3a00cd tor-browser-linux32-3.6.5_ru.tar.xz 8e4158c1d5e6916a8d7514fc94cb995ffcbaab0b3e516dba93d909a9110fb4ec tor-browser-linux32-4.0-alpha-2_ru.tar.xz
e4fad4cb87950dce71e663541cb2ba412eac3ced74f74b5e6317381ab67b6a09 tor-browser-linux32-3.6.5_tr.tar.xz 55b91b84f0afc37c695dc89ff057eed7cd415e0c3f28a5a7ed9dd7d2e2d7be0d tor-browser-linux32-4.0-alpha-2_tr.tar.xz
6f2e40b14f81fbd44f78a9c6c2aa7bda3164b679497ff1043bb4e0e4a4eeb087 tor-browser-linux32-3.6.5_vi.tar.xz 1e8df88b043b8e3ae610cb560e0d05676be6b5fd27b112317a952e8aa3bf1198 tor-browser-linux32-4.0-alpha-2_vi.tar.xz
26a258feceebef43c789425fd0810141400504e117ea8229c36fbce76921b14c tor-browser-linux32-3.6.5_zh-CN.tar.xz 323fe636ea4dc0b6b039ec50a812fdeebb2291bcf9dc481dd2cce5ba767b8889 tor-browser-linux32-4.0-alpha-2_zh-CN.tar.xz
EOF EOF
)" )"
...@@ -29,8 +29,8 @@ VERSION="$(echo "${MAIN_BUNDLE}" | sed 's/tor-browser-linux32-\(.*\)_en-US.tar.x ...@@ -29,8 +29,8 @@ VERSION="$(echo "${MAIN_BUNDLE}" | sed 's/tor-browser-linux32-\(.*\)_en-US.tar.x
# Note that we cannot use https here since apt-cacher-ng (used by vagrant) # Note that we cannot use https here since apt-cacher-ng (used by vagrant)
# gets confused and throws a 403. It doesn't matter, though, since we verify # gets confused and throws a 403. It doesn't matter, though, since we verify
# the checksums of each file downloaded. # the checksums of each file downloaded.
TBB_DIST_URL="http://www.torproject.org/dist/torbrowser/${VERSION}/" #TBB_DIST_URL="http://www.torproject.org/dist/torbrowser/${VERSION}/"
#TBB_DIST_URL="http://people.torproject.org/~mikeperry/builds/${VERSION}/" TBB_DIST_URL="http://people.torproject.org/~mikeperry/builds/${VERSION}/"
# Later we're gonna split TBB's actual browser (binaries etc), user # Later we're gonna split TBB's actual browser (binaries etc), user
# data and extension into these folders, respectively # data and extension into these folders, respectively
...@@ -75,7 +75,7 @@ for tarball in "${TMP}"/tor-browser-*.tar.xz; do ...@@ -75,7 +75,7 @@ for tarball in "${TMP}"/tor-browser-*.tar.xz; do
if [ "${locale}" = en-US ]; then if [ "${locale}" = en-US ]; then
continue continue
fi fi
xpi="tor-browser_${locale}/Data/Browser/profile.default/extensions/langpack-${locale}@firefox.mozilla.org.xpi" xpi="tor-browser_${locale}/Browser/TorBrowser/Data/Browser/profile.default/extensions/langpack-${locale}@firefox.mozilla.org.xpi"
( (
cd "${TMP}" cd "${TMP}"
tar -xf "${tarball}" "${xpi}" tar -xf "${tarball}" "${xpi}"
...@@ -85,24 +85,24 @@ done ...@@ -85,24 +85,24 @@ done
# We don't want tor-launcher to be part of the browser, and we need our # We don't want tor-launcher to be part of the browser, and we need our
# patched stand-alone version any way (see #6840). # patched stand-alone version any way (see #6840).
rm "${TBB_PREP}/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi" rm "${TBB_PREP}/Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-launcher@torproject.org.xpi"
# Remove TBB's torbutton since the "Tor test" will fail and about:tor # Remove TBB's torbutton since the "Tor test" will fail and about:tor
# will report an error. We'll install our own Torbutton later, which # will report an error. We'll install our own Torbutton later, which
# has the extensions.torbutton.test_enabled boolean pref as a workaround. # has the extensions.torbutton.test_enabled boolean pref as a workaround.
rm "${TBB_PREP}/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi" rm "${TBB_PREP}/Browser/TorBrowser/Data/Browser/profile.default/extensions/torbutton@torproject.org.xpi"
# See comment below why we need the Browser sub-dir # See comment below why we need the Browser sub-dir
mv "${TBB_PREP}/Browser" "${TBB_INSTALL}"/Browser mv "${TBB_PREP}/Browser" "${TBB_INSTALL}"/Browser
# The Tor Browser will fail, complaining about an incomplete profile, # The Tor Browser will fail, complaining about an incomplete profile,
# unless there's a readable Data/Browser/Caches in the parent # unless there's a readable Browser/TorBrowser/Data/Browser/Caches
# directory of where the firefox executable is located. # in the directory where the firefox executable is located.
mkdir -p "${TBB_INSTALL}"/Data/Browser/Caches mkdir -p "${TBB_INSTALL}"/Browser/TorBrowser/Data/Browser/Caches
# Let's put all the bundled extensions in the global extensions directory # Let's put all the bundled extensions in the global extensions directory
mv "${TBB_PREP}"/Data/Browser/profile.default/extensions/* "${TBB_EXT}" mv "${TBB_INSTALL}"/Browser/TorBrowser/Data/Browser/profile.default/extensions/* "${TBB_EXT}"
rmdir "${TBB_PREP}"/Data/Browser/profile.default/extensions rmdir "${TBB_INSTALL}"/Browser/TorBrowser/Data/Browser/profile.default/extensions
# Create and install a fake iceweasel package so we can install our # Create and install a fake iceweasel package so we can install our
# desired Debian-packaged Iceweasel addons # desired Debian-packaged Iceweasel addons
...@@ -134,7 +134,7 @@ ln -s /usr/share/xul-ext/adblock-plus/ "${TBB_EXT}"/'{d10d0bf8-f5b5-c8b4-a8b2-2b ...@@ -134,7 +134,7 @@ ln -s /usr/share/xul-ext/adblock-plus/ "${TBB_EXT}"/'{d10d0bf8-f5b5-c8b4-a8b2-2b
ln -s /usr/share/xul-ext/foxyproxy-standard/ "${TBB_EXT}"/foxyproxy@eric.h.jung ln -s /usr/share/xul-ext/foxyproxy-standard/ "${TBB_EXT}"/foxyproxy@eric.h.jung
ln -s /usr/share/xul-ext/torbutton/ "${TBB_EXT}"/torbutton@torproject.org ln -s /usr/share/xul-ext/torbutton/ "${TBB_EXT}"/torbutton@torproject.org
cp -a "${TBB_PREP}"/Data/Browser/profile.default/* "${TBB_PROFILE}"/ cp -a "${TBB_INSTALL}"/Browser/TorBrowser/Data/Browser/profile.default/* "${TBB_PROFILE}"/
mkdir -p "${TBB_PROFILE}"/extensions mkdir -p "${TBB_PROFILE}"/extensions
for ext in "${TBB_EXT}"/*; do for ext in "${TBB_EXT}"/*; do
ln -s "${ext}" "${TBB_PROFILE}"/extensions/ ln -s "${ext}" "${TBB_PROFILE}"/extensions/
......
...@@ -8,11 +8,10 @@ set -e ...@@ -8,11 +8,10 @@ set -e
# whole Tor Launcher application (just ~350 KB) into the user's home # whole Tor Launcher application (just ~350 KB) into the user's home
# so we can get the profile directory in a sane place. # so we can get the profile directory in a sane place.
if [ ! -e "${HOME}"/.tor-launcher ]; then if [ ! -e "${HOME}"/.tor-launcher ]; then
mkdir -p "${HOME}"/.tor-launcher/application mkdir -p "${HOME}"/.tor-launcher
cp -r /usr/share/tor-launcher-standalone \ cp -r /usr/share/tor-launcher-standalone "${HOME}"/.tor-launcher/tor-launcher-standalone
"${HOME}"/.tor-launcher/application/ mkdir -p "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/
mkdir -p "${HOME}"/.tor-launcher/Data/Browser/ cat << EOF > "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profiles.ini
cat << EOF > "${HOME}"/.tor-launcher/Data/Browser/profiles.ini
[General] [General]
StartWithLastProfile=1 StartWithLastProfile=1
...@@ -21,8 +20,8 @@ Name=default ...@@ -21,8 +20,8 @@ Name=default
IsRelative=1 IsRelative=1
Path=profile.default Path=profile.default
EOF EOF
mkdir -p "${HOME}"/.tor-launcher/Data/Browser/profile.default/preferences mkdir -p "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences
ln -s /var/lib/tails-user-session/browser-locale.js \ ln -s /var/lib/tails-user-session/browser-locale.js \
"${HOME}"/.tor-launcher/Data/Browser/profile.default/preferences/locale.js "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences/locale.js
fi fi
/usr/local/lib/tor-browser/Browser/firefox --app "${HOME}"/.tor-launcher/application/tor-launcher-standalone/application.ini /usr/local/lib/tor-browser/Browser/firefox --app "${HOME}"/.tor-launcher/tor-launcher-standalone/application.ini
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment