Commit 55766776 authored by anonym's avatar anonym
Browse files

Tor Browser: workaround broken `7z u`?

For reasons that still are elusive to me, the `7z u` this commit
replaces with `7z a` seems to be broken. I inserted `md5sum omni.ja`
before and after the `7z u` and it printed the same value, despite `7z
u` saying that that the expected files were changed and updated.
parent 114fa644
......@@ -128,9 +128,7 @@ apply_extension_code_signing_hacks () {
tmp="$(mktemp -d)"
(
cd "${tmp}"
7z x -tzip "${TBB_INSTALL}/omni.ja" \
modules/addons/XPIProvider.jsm \
chrome/toolkit/content/mozapps/extensions/extensions.js
7z x -tzip "${TBB_INSTALL}/omni.ja"
patch -p1 <<EOF
diff -Naur a/chrome/toolkit/content/mozapps/extensions/extensions.js b/chrome/toolkit/content/mozapps/extensions/extensions.js
--- a/chrome/toolkit/content/mozapps/extensions/extensions.js 2000-01-01 00:00:00.000000000 +0000
......@@ -169,12 +167,14 @@ diff -Naur a/modules/addons/XPIProvider.jsm b/modules/addons/XPIProvider.jsm
EOF
touch --date="@${tbb_timestamp}" modules/addons/XPIProvider.jsm \
chrome/toolkit/content/mozapps/extensions/extensions.js
7z u -mtc=off -tzip "${TBB_INSTALL}/omni.ja" \
modules/addons/XPIProvider.jsm \
chrome/toolkit/content/mozapps/extensions/extensions.js
7z x -tzip "${TBB_INSTALL}/browser/omni.ja" \
components/nsBrowserGlue.js
rm "${TBB_INSTALL}/omni.ja"
7z a -mtc=off -tzip "${TBB_INSTALL}/omni.ja" *
)
rm -r "${tmp}"
tmp="$(mktemp -d)"
(
cd "${tmp}"
7z x -tzip "${TBB_INSTALL}/browser/omni.ja"
patch -p1 <<EOF
diff -Naur x/components/nsBrowserGlue.js y/components/nsBrowserGlue.js
--- a/components/nsBrowserGlue.js 2000-01-01 00:00:00.000000000 +0000
......@@ -191,22 +191,22 @@ diff -Naur x/components/nsBrowserGlue.js y/components/nsBrowserGlue.js
}
EOF
touch --date="@${tbb_timestamp}" components/nsBrowserGlue.js
7z u -mtc=off -tzip "${TBB_INSTALL}/browser/omni.ja" \
components/nsBrowserGlue.js
# These binaries are generated from the above modified files
# so we have to remove them. This will have a performance
# impact that probably is unnoticeable for humans, but TBB 7.5
# won't ship any of these binaries any way, so we'll converge.
7z d -mtc=off -tzip "${TBB_INSTALL}/omni.ja" \
jsloader/resource/gre/modules/addons/XPIProvider.jsm
7z d -mtc=off -tzip "${TBB_INSTALL}/browser/omni.ja" \
jsloader/resource/app/components/nsBrowserGlue.js
for archive in "${TBB_INSTALL}/omni.ja" "${TBB_INSTALL}/browser/omni.ja"; do
strip_nondeterminism_wrapper --type zip --timestamp "${tbb_timestamp}" \
"${archive}" 2>/dev/null
done
rm "${TBB_INSTALL}/browser/omni.ja"
7z a -mtc=off -tzip "${TBB_INSTALL}/browser/omni.ja" *
)
rm -r "${tmp}"
# These binaries are generated from the above modified files
# so we have to remove them. This will have a performance
# impact that probably is unnoticeable for humans, but TBB 7.5
# won't ship any of these binaries any way, so we'll converge.
7z d -mtc=off -tzip "${TBB_INSTALL}/omni.ja" \
jsloader/resource/gre/modules/addons/XPIProvider.jsm
7z d -mtc=off -tzip "${TBB_INSTALL}/browser/omni.ja" \
jsloader/resource/app/components/nsBrowserGlue.js
for archive in "${TBB_INSTALL}/omni.ja" "${TBB_INSTALL}/browser/omni.ja"; do
strip_nondeterminism_wrapper --type zip --timestamp "${tbb_timestamp}" \
"${archive}" 2>/dev/null
done
}
# Modern Firefox doesn't apply browser.search.defaultenginename on
......
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