Commit 8580ba82 authored by anonym's avatar anonym
Browse files

Store complete URL in tbb-dist-url.txt.

Our installation script determines the Tor Browser version from the
tarball filenames and then looks in "$(cat
tbb-dist-url.txt)/$VERSION", which isn't very flexible. For instance,
for the pre-release of Tor Browser 4.5 our script looks in:

    http://people.torproject.org/~mikeperry/builds/4.5/

when they in fact were stored in

    http://people.torproject.org/~mikeperry/builds/4.5-build5/

So let's just store the full URL to the directory storing the
tarballs.
parent 5f751d1c
...@@ -170,9 +170,8 @@ TBB_TARBALLS="$(grep "\<tor-browser-linux32-.*\.tar.xz$" "${TBB_SHA256SUMS_FILE} ...@@ -170,9 +170,8 @@ TBB_TARBALLS="$(grep "\<tor-browser-linux32-.*\.tar.xz$" "${TBB_SHA256SUMS_FILE}
# We'll use the en-US bundle as our basis; only langpacks will be # We'll use the en-US bundle as our basis; only langpacks will be
# installed from the other bundles. # installed from the other bundles.
MAIN_TARBALL="$(echo "${TBB_TARBALLS}" | grep -o "tor-browser-linux32-.*_en-US.tar.xz")" MAIN_TARBALL="$(echo "${TBB_TARBALLS}" | grep -o "tor-browser-linux32-.*_en-US.tar.xz")"
VERSION="$(echo "${MAIN_TARBALL}" | sed 's/tor-browser-linux32-\(.*\)_en-US.tar.xz/\1/')"
TBB_DIST_URL_FILE=/usr/share/tails/tbb-dist-url.txt TBB_DIST_URL_FILE=/usr/share/tails/tbb-dist-url.txt
TBB_TARBALLS_BASE_URL="$(cat "${TBB_DIST_URL_FILE}")/${VERSION}" TBB_TARBALLS_BASE_URL="$(cat "${TBB_DIST_URL_FILE}")"
# The Debian Iceweasel extensions we want to install and make # The Debian Iceweasel extensions we want to install and make
# available in the Tor Browser. # available in the Tor Browser.
......
http://people.torproject.org/~mikeperry/builds/ http://people.torproject.org/~mikeperry/builds/4.5-build5/
...@@ -49,13 +49,13 @@ and see if the desired version is available. Set `DIST_URL` to the ...@@ -49,13 +49,13 @@ and see if the desired version is available. Set `DIST_URL` to the
chosen URL, and set `VERSION` to the desired Tor Browser version, for chosen URL, and set `VERSION` to the desired Tor Browser version, for
example: example:
DIST_URL=https://people.torproject.org/~mikeperry/builds/ DIST_URL=https://people.torproject.org/~mikeperry/builds/4.5-build5/
VERSION=4.0 VERSION=4.5
Fetch the version's hash file and its detached signature, and verify Fetch the version's hash file and its detached signature, and verify
with GnuPG: with GnuPG:
wget ${DIST_URL}/${VERSION}/sha256sums.txt{,.asc} && \ wget ${DIST_URL}/sha256sums.txt{,.asc} && \
gpg --verify sha256sums.txt.asc sha256sums.txt gpg --verify sha256sums.txt.asc sha256sums.txt
Filter the tarballs we want and make them available at build time, Filter the tarballs we want and make them available at build time,
...@@ -141,7 +141,7 @@ Import a new set of Tor Browser tarballs ...@@ -141,7 +141,7 @@ Import a new set of Tor Browser tarballs
CHROOT_INCLUDES="${TAILS_GIT_REPO}/config/chroot_local-includes" CHROOT_INCLUDES="${TAILS_GIT_REPO}/config/chroot_local-includes"
TBB_SHA256SUMS_FILE="${CHROOT_INCLUDES}/usr/share/tails/tbb-sha256sums.txt" TBB_SHA256SUMS_FILE="${CHROOT_INCLUDES}/usr/share/tails/tbb-sha256sums.txt"
TBB_DIST_URL_FILE="${CHROOT_INCLUDES}/usr/share/tails/tbb-dist-url.txt" TBB_DIST_URL_FILE="${CHROOT_INCLUDES}/usr/share/tails/tbb-dist-url.txt"
TBB_TARBALLS_BASE_URL="$(cat "${TBB_DIST_URL_FILE}" | sed "s,^http://,https://,")/${VERSION}" TBB_TARBALLS_BASE_URL="$(cat "${TBB_DIST_URL_FILE}" | sed "s,^http://,https://,")"
cat "$TBB_SHA256SUMS_FILE" | while read expected_sha256 tarball; do cat "$TBB_SHA256SUMS_FILE" | while read expected_sha256 tarball; do
( (
cd "$TMPDIR" cd "$TMPDIR"
......
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