Commit b55fff9f authored by intrigeri's avatar intrigeri
Browse files

Adjust extensions prefs patching: they're now bundled in omni.ja (refs: #15023).

parent 618e8740
...@@ -227,6 +227,28 @@ if (engineName) { ...@@ -227,6 +227,28 @@ if (engineName) {
EOF EOF
} }
apply_extension_prefs_hacks() {
local tbb_install tmp tbb_timestamp
tbb_install="${1}"
# For consistency we'll set timestamps of files we modify to the
# same one used by the Tor Browser instead of SOURCE_DATE_EPOCH.
tbb_timestamp="$(date --date='2000-01-01 00:00:00' +%s)"
tmp="$(mktemp -d)"
(
cd "${tmp}"
7z x -tzip "${tbb_install}/browser/omni.ja"
# Remove TBB's Tor Launcher settings since we don't enable it in
# our Tor Browser.
sed -i '/extensions\.torlauncher\./d' defaults/preferences/000-tor-browser.js
touch --date="@${tbb_timestamp}" defaults/preferences/000-tor-browser.js
rm "${tbb_install}/browser/omni.ja"
7z a -mtc=off -tzip "${tbb_install}/browser/omni.ja" *
)
rm -r "${tmp}"
}
strip_nondeterminism () { strip_nondeterminism () {
local tbb_install local tbb_install
tbb_install="${1}" tbb_install="${1}"
...@@ -280,10 +302,6 @@ create_default_profile() { ...@@ -280,10 +302,6 @@ create_default_profile() {
rsync -a --exclude bookmarks.html --exclude extensions \ rsync -a --exclude bookmarks.html --exclude extensions \
"${tbb_profile}"/ "${destination}"/ "${tbb_profile}"/ "${destination}"/
# Remove TBB's Tor Launcher settings since we don't enable it in
# our Tor Browser.
sed -i '/extensions\.torlauncher\./d' "${destination}"/preferences/extension-overrides.js
mkdir -p "${destination}"/extensions mkdir -p "${destination}"/extensions
for ext in "${tbb_extensions_dir}"/*; do for ext in "${tbb_extensions_dir}"/*; do
ln -s "${ext}" "${destination}"/extensions/ ln -s "${ext}" "${destination}"/extensions/
...@@ -316,6 +334,7 @@ download_and_verify_files "${TBB_TARBALLS_BASE_URL}" "${TBB_TARBALLS}" "${TMP}" ...@@ -316,6 +334,7 @@ download_and_verify_files "${TBB_TARBALLS_BASE_URL}" "${TBB_TARBALLS}" "${TMP}"
install_tor_browser "${TMP}/${MAIN_TARBALL}" "${TBB_INSTALL}" install_tor_browser "${TMP}/${MAIN_TARBALL}" "${TBB_INSTALL}"
apply_extension_code_signing_hacks "${TBB_INSTALL}" apply_extension_code_signing_hacks "${TBB_INSTALL}"
apply_default_searchengine_hacks "${TBB_INSTALL}" apply_default_searchengine_hacks "${TBB_INSTALL}"
apply_extension_prefs_hacks "${TBB_INSTALL}"
strip_nondeterminism "${TBB_INSTALL}" strip_nondeterminism "${TBB_INSTALL}"
mkdir -p "${TBB_EXT}" mkdir -p "${TBB_EXT}"
......
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