Skip to content
Snippets Groups Projects
Unverified Commit 38863663 authored by boklm's avatar boklm
Browse files

Re-zip the omni.ja files

Re-zipping the omni.ja files is not needed to make them reproductible,
however if we don't re-zip them, the files become corrupt when we
update them using 'zip' (we are doing that when we update the
000-tor-browser.js preference file to set the locale) and firefox will
silently fail to load some parts.
parent a89da94e
No related branches found
No related tags found
No related merge requests found
......@@ -146,10 +146,19 @@ do
done
[% END %]
# TODO:
# ~/build/re-dzip.sh Browser/omni.ja
# ~/build/re-dzip.sh Browser/webapprt/omni.ja
# ~/build/re-dzip.sh Browser/browser/omni.ja
# Re-zipping the omni.ja files is not needed to make them reproductible,
# however if we don't re-zip them, the files become corrupt when we
# update them using 'zip' and firefox will silently fail to load some
# parts.
[% IF c("var/windows") || c("var/linux") %]
[% c("var/rezip", { rezip_file => 'Browser/omni.ja' }) %]
[% c("var/rezip", { rezip_file => 'Browser/browser/omni.ja' }) %]
[% IF c("var/linux") %][% c("var/rezip", { rezip_file => 'Browser/webapprt/omni.ja' }) %][% END %]
[% ELSIF c("var/osx") %]
[% c("var/rezip", { rezip_file => 'TorBrowser.app/Contents/Resources/omni.ja' }) %]
[% c("var/rezip", { rezip_file => 'TorBrowser.app/Contents/Resources/webapprt/omni.ja' }) %]
[% c("var/rezip", { rezip_file => 'TorBrowser.app/Contents/Resources/browser/omni.ja' }) %]
[% END %]
[% IF c("var/windows") %]
cp $rootdir/msvcr100.dll Browser/
......
......@@ -54,6 +54,18 @@ var:
sign_build: '[% ENV.RBM_SIGN_BUILD %]'
sign_build_gpg_opts: '[% ENV.RBM_GPG_OPTS %]'
rezip: |
rezip_tmpdir=$(mktemp -d)
mkdir -p "$rezip_tmpdir/z"
unzip -d "$rezip_tmpdir/z" -- [% c("rezip_file") %] || [ $? -lt 3 ]
pushd "$rezip_tmpdir/z"
[% c("zip", {
zip_src => [ '.' ],
zip_args => '$rezip_tmpdir/new.zip',
}) %]
popd
mv -f -- "$rezip_tmpdir/new.zip" [% c("rezip_file") %]
rm -Rf "$rezip_tmpdir"
targets:
notarget: linux-x86_64
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment