Commit 4ce22a87 authored by intrigeri's avatar intrigeri
Browse files

Merge branch 'feature/17402-tor-browser-9.0.3+force-all-tests' into stable

Closes: #17400, #17402
parents a3ba6f92 4c5a5f0e
......@@ -17,9 +17,9 @@ echo "Install the Tor Browser"
. /usr/local/lib/tails-shell-library/build.sh
download_and_verify_files() {
local base_url bundles destination apt_proxy
local base_url target_files destination apt_proxy
base_url="${1}"
bundles="${2}"
target_files="${2}"
destination="${3}"
# Use the builder's caching APT proxy, if any
......@@ -31,7 +31,7 @@ download_and_verify_files() {
export https_proxy="${apt_proxy}"
fi
echo "${bundles}" | while read expected_sha256 tarball; do
echo "${target_files}" | while read expected_sha256 tarball; do
(
cd "${destination}"
echo "Fetching ${base_url}/${tarball} ..."
......@@ -277,23 +277,21 @@ strip_nondeterminism () {
done
}
install_langpacks_from_bundles() {
local bundles_dir destination
bundles_dir="${1}"
install_langpacks() {
local langpacks_tarball destination tmp
langpacks_tarball="${1}"
destination="${2}"
for tarball in "${bundles_dir}"/tor-browser-*.tar.xz; do
locale="$(echo "${tarball}" | sed "s@^.*/tor-browser-.*_\(.*\)\.tar\.xz@\1@")"
if [ "${locale}" = en-US ]; then
continue
fi
xpi="tor-browser_${locale}/Browser/TorBrowser/Data/Browser/profile.default/extensions/langpack-${locale}@firefox.mozilla.org.xpi"
(
cd "${bundles_dir}"
tar -xf "${tarball}" "${xpi}"
mv "${xpi}" "${destination}"
)
tmp="$(mktemp -d)"
tar --directory="${tmp}" -xf "${langpacks_tarball}"
for xpi in "${tmp}"/*.xpi; do
locale="$(basename "${xpi}" .xpi)"
dest_basename="langpack-${locale}@firefox.mozilla.org.xpi"
[ "${locale}" = en-US ] || mv "${xpi}" "${destination}/${dest_basename}"
done
rm -r "${tmp}"
}
get_firefox_version() {
......@@ -335,9 +333,8 @@ TBB_TIMESTAMP="$(date --date='2000-01-01 00:00:00' +%s)"
TBB_SHA256SUMS_FILE=/usr/share/tails/tbb-sha256sums.txt
TBB_TARBALLS="$(grep "\<tor-browser-linux64-.*\.tar.xz$" "${TBB_SHA256SUMS_FILE}")"
# We'll use the en-US bundle as our basis; only langpacks will be
# installed from the other bundles.
MAIN_TARBALL="$(echo "${TBB_TARBALLS}" | grep -o "tor-browser-linux64-.*_en-US.tar.xz" || :)"
# We'll use the en-US bundle as our basis
MAIN_TARBALL="$(echo "${TBB_TARBALLS}" | grep -o "tor-browser-linux64-.*_en-US\.tar\.xz" || :)"
NIGHTLY_BUILD=
if [ -z "${MAIN_TARBALL}" ] && [ "$(echo $TBB_TARBALLS | awk '{ print $2 }')" = 'tor-browser-linux64-tbb-nightly_ALL.tar.xz' ]; then
# Except for TBB nightly builds; then there is only one bundle
......@@ -363,7 +360,8 @@ install_tor_launcher "${TBB_INSTALL}" "${TOR_LAUNCHER_INSTALL}"
mkdir -p "${TBB_EXT}"
if [ "${NIGHTLY_BUILD}" != yes ]; then
install_langpacks_from_bundles "${TMP}" "${TBB_EXT}"
LANGPACKS_TARBALL="$(echo "${TBB_TARBALLS}" | grep -o "langpacks-tor-browser-linux64-.*\.tar\.xz")"
install_langpacks "${TMP}/${LANGPACKS_TARBALL}" "${TBB_EXT}"
fi
rm -r "${TMP}"
......
http://torbrowser-archive.tails.boum.org/9.0.2-build2/
http://torbrowser-archive.tails.boum.org/9.0.3-build4/
88c739f9525fc4b5b70b825ff8d9bb9dabcdcf3728cbaa3bd02c11afae53e8f6 tor-browser-linux64-9.0.2_ar.tar.xz
503a38403af3380e012a1253151f7d151a1437849a34a5282dd9dc5dab8dfcc8 tor-browser-linux64-9.0.2_ca.tar.xz
e79ae559f71614877c8cb5c57b03585858b6a44821f1dbfbe46cddf31f2244c6 tor-browser-linux64-9.0.2_cs.tar.xz
e864db5638ec5ca9a2e56683c7164cf2c00d6f34a3d1d0046f4b7d64d30ce95b tor-browser-linux64-9.0.2_da.tar.xz
4a2304afcbcb3d9a0a8f71a79ab1705139ec2f254b3f892de153a327e2644e21 tor-browser-linux64-9.0.2_de.tar.xz
efa56988c13fd6fbd6907152d8280d12aa15c142411c1c2d2ca0092105181fe7 tor-browser-linux64-9.0.2_el.tar.xz
0b2617471dcdfbf264a1bc791b2be8599b11dd685c1e91b6e79f1fa9e1c5b6f5 tor-browser-linux64-9.0.2_en-US.tar.xz
6bfb675e7e30783162cd248c066b74d5eccbf286edf3503cd4259a988597b06e tor-browser-linux64-9.0.2_es-AR.tar.xz
21cf363515605b71febe37e31362ba35fa8794092778561dc0d117b42abe12f7 tor-browser-linux64-9.0.2_es-ES.tar.xz
8f840b6120f1c61aa4b30cdebc22bdd07fc8bae5d406116324299b172a63c049 tor-browser-linux64-9.0.2_fa.tar.xz
5cd599710da92b746ff6d90aa0e83f42f841c64268a4b66a68a7b8cf4edf1e4d tor-browser-linux64-9.0.2_fr.tar.xz
f40a887dff5949c24f82ed97bda1fa1008d377858472398759ca28165d9cc846 tor-browser-linux64-9.0.2_ga-IE.tar.xz
7e61742c4dc0b32c1b2d14f691a0de03281f1401ca0bbcddc5122bf6e76156c7 tor-browser-linux64-9.0.2_he.tar.xz
da17e25749e57a35d8dc52ae66b3086bf4826f24e1a029072553012572f3ec10 tor-browser-linux64-9.0.2_hu.tar.xz
6c47fc80ce16a60cb4cbb84be013fc56bab5573ab3081a4f1c8c20c20f3f2791 tor-browser-linux64-9.0.2_id.tar.xz
b4a4c361aacebb95fe2f88312abf3558cf0d49f79f6b24a387500688887fe7b4 tor-browser-linux64-9.0.2_is.tar.xz
ec150281b082a1dbc41f2b663c04f8d93cef63b677ae39eafd62ed828504c1f0 tor-browser-linux64-9.0.2_it.tar.xz
59d49c87ca193882307a407ae1f08c291c04b10712fc06a4471f3b255ec1b988 tor-browser-linux64-9.0.2_ja.tar.xz
4fbe0c16d410e027ee22592aebba3b66d14f1f8ead0b36be6efe5bd8187aec9f tor-browser-linux64-9.0.2_ka.tar.xz
fcfa44269e7b3ce73115dd746b48610b6cc476d3d8f42c11bcb124a990f13a04 tor-browser-linux64-9.0.2_ko.tar.xz
d98e26bb8b647e3eb86cdcecee79dc2e342035a4e0ace5eb0d07f69a17ee7ccc tor-browser-linux64-9.0.2_mk.tar.xz
09384f67e05372fb6ab8f079bf99a86ff8df3094df543edf14de76211eba2c54 tor-browser-linux64-9.0.2_nb-NO.tar.xz
532fa59b4b084d1b0bff3aec655dd7d9679b7ffc596b98e3b03cf0b9038c864d tor-browser-linux64-9.0.2_nl.tar.xz
09721ff6e933851d477bf5e6f2ebc353c3bac4ee32db338776abe425b30b4a41 tor-browser-linux64-9.0.2_pl.tar.xz
e84c4c6160a9c01d3507ec0a21353361ad6b7330538328ce584dad661eadf31a tor-browser-linux64-9.0.2_pt-BR.tar.xz
e6f907c543184629dc28cebd51b23f76978a779b90f383c7fa90a225c7723214 tor-browser-linux64-9.0.2_ro.tar.xz
174f7ddadf267ed076d9227ed7f65a4cee856e7d59b585b260f6dea837a9ed60 tor-browser-linux64-9.0.2_ru.tar.xz
88df1baadc368c5e0bc18225cf8e6e6bb62e7bc91eb6b3bdbe0184e3f85d2f4d tor-browser-linux64-9.0.2_sv-SE.tar.xz
b5fc4185b9dc4f8f4e615aafd02fc50dff4a1f9e7125058e0eaf2afbc09d3f92 tor-browser-linux64-9.0.2_tr.tar.xz
790cec1066073c593b83e5b34c42daf5c683177f68c73f761340b8106ad574b2 tor-browser-linux64-9.0.2_vi.tar.xz
6fdedf602adfa53bd105302ff5773341897e2acdc91663894fe173b479563f58 tor-browser-linux64-9.0.2_zh-CN.tar.xz
e110b592f4d6efca652250d90ce6b09b0320adb00dea373b367dbf00e9107516 tor-browser-linux64-9.0.2_zh-TW.tar.xz
8983d3784b9563b67e54ed46c74839aa486013fbc3568441cf1c3b09abbd5169 tor-browser-linux64-9.0.3_en-US.tar.xz
951e26f04276f816773b74f32747e8d56556e62c5b1ffa1e0852968cbeaf97fc langpacks-tor-browser-linux64-9.0.3.tar.xz
......@@ -61,13 +61,18 @@ with GnuPG:
wget ${TBB_DIST_URL:?}/sha256sums-unsigned-build.txt{.asc,} && \
gpg --verify sha256sums-unsigned-build.txt{.asc,}
Filter the tarballs we want and make them available at build time,
Build the list of tarballs we want and their hashes,
so this information is available at build time,
when the tarballs are fetched:
grep --color=never -E \
"\s(langpacks-)?tor-browser-linux64-[0-9].*\.tar.xz$" \
sha256sums-unsigned-build.txt \
> config/chroot_local-includes/usr/share/tails/tbb-sha256sums.txt
(
grep --color=never -E \
"\stor-browser-linux64-[0-9].*_en-US\.tar\.xz$" \
sha256sums-unsigned-build.txt \
&& grep --color=never -E \
"\slangpacks-tor-browser-linux64-.*\.tar\.xz$" \
sha256sums-unsigned-build.txt \
) > config/chroot_local-includes/usr/share/tails/tbb-sha256sums.txt
Then update the URL to the one chosen above:
......@@ -206,7 +211,8 @@ Commit and push your changes
cd "${TBB_ARCHIVE:?}" && \
git commit -m "Add Tor Browser ${TBB_VERSION:?}." && \
git annex sync && \
git annex copy --to origin -- "${TBB_VERSION:?}"
git annex copy --to origin -- "${TBB_VERSION:?}" && \
git annex sync
Wait for the synchronization
----------------------------
......@@ -240,4 +246,6 @@ Clean up
cd "${TBB_ARCHIVE:?}" && \
git annex drop -- "${TBB_VERSION:?}" && \
rm -rf "${DL_DIR:?}"
git annex sync && \
rm -rf "${DL_DIR:?}" && \
rm "${TAILS_GIT_REPO:?}"/sha256sums-unsigned-build.txt{,.asc}
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