commit 38863663120244e4becc66fe7a10cce92d8e639b Author: Nicolas Vigier boklm@torproject.org Date: Mon Feb 27 17:46:28 2017 +0100
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. --- projects/firefox/build | 17 +++++++++++++---- rbm.conf | 12 ++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-)
diff --git a/projects/firefox/build b/projects/firefox/build index 42752d1..7610510 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -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/ diff --git a/rbm.conf b/rbm.conf index e9f7b6d..b137595 100644 --- a/rbm.conf +++ b/rbm.conf @@ -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
tbb-commits@lists.torproject.org