Commit b498b5be authored by Tails developers's avatar Tails developers
Browse files

Separate data from TBB installation script.

parent 969edf54
......@@ -167,35 +167,23 @@ create_default_profile() {
done
}
# Get the below with `grep "tor-browser-linux32-.*\.tar.xz" sha256sums.txt`
BUNDLES="$(cat <<EOF
473780a5145859a8d516e76cb27be25b0baf16007ba50cd8ba78a536bc806fc5 tor-browser-linux32-tbb-nightly_ar.tar.xz
3e3d6fd1ea47067fc00625b8cd62d23079ef71dc91734bfb823542c26ce192cf tor-browser-linux32-tbb-nightly_en-US.tar.xz
df4745725e7b3fe99c218166ffbe38eef8e9d636c42b72c8a2b8229fc3bdd83b tor-browser-linux32-tbb-nightly_ru.tar.xz
b624b1f9a16e4ff4cffb3478f63249ed73ae902732b64fca0f183ad73ed1b5ac tor-browser-linux32-tbb-nightly_zh-CN.tar.xz
EOF
)"
TBB_SHA256SUMS=/usr/share/tails/tbb-sha256sums.txt
TBB_BUNDLES="$(grep "\<tor-browser-linux32-.*\.tar.xz$" "${TBB_SHA256SUMS}")"
# We'll use the en-US bundle as our basis; only langpacks will be
# installed from the other bundles.
MAIN_BUNDLE="$(echo "${BUNDLES}" | grep -o "tor-browser-linux32-.*_en-US.tar.xz")"
MAIN_BUNDLE="$(echo "${TBB_BUNDLES}" | grep -o "tor-browser-linux32-.*_en-US.tar.xz")"
#VERSION="$(echo "${MAIN_BUNDLE}" | sed 's/tor-browser-linux32-\(.*\)_en-US.tar.xz/\1/')"
VERSION=tbb-nightly-2014-10-07
# 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
# the checksums of each file downloaded.
#TBB_DIST_URL="http://archive.torproject.org/tor-package-archive/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/~gk/testbuilds/${VERSION}"
TBB_DIST_URL="http://people.torproject.org/~linus/builds/${VERSION}"
TBB_DIST_URL=/usr/share/tails/tbb-dist-url.txt
TBB_BUNDLES_BASE_URL="$(cat "${TBB_DIST_URL}")/${VERSION}"
# The Debian Iceweasel extensions we want to install and make
# available in the Tor Browser.
DEBIAN_EXT="xul-ext-adblock-plus xul-ext-torbutton"
TMP="$(mktemp -d)"
download_and_verify_files "${TBB_DIST_URL}" "${BUNDLES}" "${TMP}"
download_and_verify_files "${TBB_BUNDLES_BASE_URL}" "${TBB_BUNDLES}" "${TMP}"
install_tor_browser "${TMP}/${MAIN_BUNDLE}" "${TBB_INSTALL}"
......
......@@ -13,3 +13,7 @@ find /usr/share/doc -type f -name NEWS.Debian.gz -delete
# Remove .in files managed by intltool
rm $POTFILES_DOT_IN
# These files are not needed after the Tor Browser has been installed
# (by the 10-tbb hook)
rm /usr/share/tails/tbb-*.txt
http://people.torproject.org/~linus/builds/
473780a5145859a8d516e76cb27be25b0baf16007ba50cd8ba78a536bc806fc5 tor-browser-linux32-tbb-nightly_ar.tar.xz
3e3d6fd1ea47067fc00625b8cd62d23079ef71dc91734bfb823542c26ce192cf tor-browser-linux32-tbb-nightly_en-US.tar.xz
df4745725e7b3fe99c218166ffbe38eef8e9d636c42b72c8a2b8229fc3bdd83b tor-browser-linux32-tbb-nightly_ru.tar.xz
b624b1f9a16e4ff4cffb3478f63249ed73ae902732b64fca0f183ad73ed1b5ac tor-browser-linux32-tbb-nightly_zh-CN.tar.xz
......@@ -4,20 +4,28 @@
Have a look at
* https://archive.torproject.org/tor-package-archive/torbrowser/
* http://archive.torproject.org/tor-package-archive/torbrowser/
* http://www.torproject.org/dist/torbrowser/
* http://people.torproject.org/~mikeperry/builds/
* https://people.torproject.org/~linus/builds/
* http://people.torproject.org/~linus/builds/
and see if the desired version is available. We prefer
`archive.torproject.org` since the other sources periodically cleans
up old releases.
Fetch the version's `sha256sums.txt` (and verify it with
`sha256sums.txt.asc`) and then update the variables in
`config/chroot_local-hooks/10-tbb` as follows:
Fetch the version's `sha256sums.txt` and `sha256sums.txt.asc`, verify
with `gpg`, and:
* set `TBB_DIST_URL` to the url chosen above.
* set `BUNDLES` to the output of:
grep "\<tor-browser-linux32-.*\.tar.xz$" sha256sums.txt > \
config/chroot_local-includes/usr/share/tails/tbb-sha256sums.txt
grep "tor-browser-linux32-.*\.tar.xz" sha256sums.txt
to make the checksums available at build time, when the tarballs are
fetched. Then update the url to the one chosen above:
echo "http://archive.torproject.org/tor-package-archive/torbrowser/" > \
config/chroot_local-includes/usr/share/tails/tbb-dist-url.txt
NOTE: We must use http (not http**s**) due to limitations/bugs in
`apt-cacher-ng`, which often is used in Tails build
environments. However, it is of no consequence since we verify the
checksum file.
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