Commit 402c5834 authored by anonym's avatar anonym
Browse files

Install Tor Browser's bundled Torbutton instead of custom .deb.

As of Torbutton our extensions.torbutton.test_enabled pref is
part of upstream, so we don't have to maintain our custom .deb any
more! Note that we still patch our custom Torbutton with
0001-restore-status-panel-on-ff4.patch (inherited from Debian's
packaging) but it seems irrelevant for Tails.
parent 510f3561
......@@ -42,7 +42,7 @@ download_and_verify_files() {
install_tor_browser() {
local bundle destination tmp prep torbutton_xpi_path
local bundle destination tmp prep
......@@ -72,18 +72,6 @@ install_tor_browser() {
# really is not useful for us.
rm "${prep}/TorBrowser/Data/Browser/profile.default/extensions/"
# 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
# has the extensions.torbutton.test_enabled boolean pref as a workaround.
TORBUTTON_BUNDLED_VERSION="$(7z e -so ${torbutton_xpi_path} install.rdf | \
sed -n 's,^ <em:version>\([0-9\.]\+\)</em:version>,\1,p')"
if [ -z "${TORBUTTON_BUNDLED_VERSION}" ]; then
echo "Couldn't extract Torbutton's bundled version" >&2
exit 1
rm "${torbutton_xpi_path}"
# The Tor Browser will fail, complaining about an incomplete profile,
# unless there's a readable TorBrowser/Data/Browser/Caches
# in the directory where the firefox executable is located.
......@@ -156,8 +144,6 @@ install_debian_extensions() {
apt-get install --yes "${@}"
ln -s /usr/share/xul-ext/adblock-plus/ \
ln -s /usr/share/xul-ext/torbutton/ \
create_default_profile() {
......@@ -190,7 +176,7 @@ TBB_TARBALLS_BASE_URL="$(cat "${TBB_DIST_URL_FILE}")/${VERSION}"
# The Debian Iceweasel extensions we want to install and make
# available in the Tor Browser.
DEBIAN_EXT_PKGS="xul-ext-adblock-plus xul-ext-torbutton"
TMP="$(mktemp -d)"
download_and_verify_files "${TBB_TARBALLS_BASE_URL}" "${TBB_TARBALLS}" "${TMP}"
......@@ -214,15 +200,6 @@ FAKE_ICEWEASEL_VERSION=${FIREFOX_VERSION}+fake1
install_fake_iceweasel_pkg "${FAKE_ICEWEASEL_VERSION}"
install_debian_extensions "${TBB_EXT}" ${DEBIAN_EXT_PKGS}
# Make sure that we have installed a Torbutton based on the same
# version as the one bundled with the Tor Browser
TORBUTTON_VERSION="$(dpkg -s xul-ext-torbutton | \
sed -n 's/^Version: \(.*\)-[0-9]\+$/\1/p')"
echo "We have installed a Torbutton based on version '${TORBUTTON_VERSION}' but the version bundled with the Tor Browser is version '${TORBUTTON_BUNDLED_VERSION}'" >&2
exit 1
mkdir -p "${TBB_PROFILE}"
create_default_profile "${TBB_INSTALL}"/TorBrowser/Data/Browser/profile.default "${TBB_EXT}" "${TBB_PROFILE}"
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