commit fef35058f76c5605fd631ff86f65adfa9bb78be7 Author: Kathy Brade brade@pearlcrescent.com Date: Fri Mar 18 15:03:55 2016 -0400
Bug 18455: modify Tor Browser packaging to avoid language prompt.
When not building a multi-lingual bundle, disable Tor Launcher's language prompt by appending these two preference values to the extension-overrides.js file: intl.locale.matchOS = false extensions.torlauncher.prompt_for_locale = false --- gitian/descriptors/linux/gitian-bundle.yml | 8 +++++++- gitian/descriptors/mac/gitian-bundle.yml | 5 +++++ gitian/descriptors/windows/gitian-bundle.yml | 8 +++++++- 3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml index 28e94b4..28bd006 100644 --- a/gitian/descriptors/linux/gitian-bundle.yml +++ b/gitian/descriptors/linux/gitian-bundle.yml @@ -159,12 +159,18 @@ script: | unzip ~/build/tor-linux$GBUILD_BITS-gbuilt.zip unzip ~/build/linux-skeleton.zip unzip ~/build/tbb-docs.zip + EXTOVERRIDESPATH=Data/Browser/profile.default/preferences/extension-overrides.js if [ $BUILD_PT_BUNDLES ]; then unzip ~/build/pluggable-transports-linux$GBUILD_BITS-gbuilt.zip cat ~/build/torrc-defaults-appendix-linux >> Data/Tor/torrc-defaults - cat ~/build/bridge_prefs.js >> Data/Browser/profile.default/preferences/extension-overrides.js + cat ~/build/bridge_prefs.js >> $EXTOVERRIDESPATH cat ~/build/meek-http-helper-user.js >> Data/Browser/profile.meek-http-helper/user.js fi + # If not building a multi-lingual package, suppress the language prompt. + if [ "z$MULTI_LINGUAL" != "z1" ]; then + echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> $EXTOVERRIDESPATH + echo 'pref("intl.locale.matchOS", false);' >> $EXTOVERRIDESPATH + fi chmod 700 Data/Browser chmod 700 Data/Tor cd ../../.. diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml index aa6a09d..a7ef7bc 100644 --- a/gitian/descriptors/mac/gitian-bundle.yml +++ b/gitian/descriptors/mac/gitian-bundle.yml @@ -180,6 +180,11 @@ script: | cat ~/build/bridge_prefs.js >> $EXTOVERRIDESPATH cat ~/build/meek-http-helper-user.js >> $MEEKPROFILEPATH/user.js fi + # If not building a multi-lingual package, suppress the language prompt. + if [ "z$MULTI_LINGUAL" != "z1" ]; then + echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> $EXTOVERRIDESPATH + echo 'pref("intl.locale.matchOS", false);' >> $EXTOVERRIDESPATH + fi # Install a "tor" shim that sets the working directory. See #10030. mv $TORBINPATH/tor $TORBINPATH/tor.real if [ "z$DATA_OUTSIDE_APP_DIR" = "z1" ]; then diff --git a/gitian/descriptors/windows/gitian-bundle.yml b/gitian/descriptors/windows/gitian-bundle.yml index 51565bf..5a165a7 100644 --- a/gitian/descriptors/windows/gitian-bundle.yml +++ b/gitian/descriptors/windows/gitian-bundle.yml @@ -140,12 +140,18 @@ script: | unzip ~/build/tor-win32-gbuilt.zip unzip ~/build/windows-skeleton.zip unzip ~/build/tbb-docs.zip + EXTOVERRIDESPATH=Data/Browser/profile.default/preferences/extension-overrides.js if [ $BUILD_PT_BUNDLES ]; then unzip ~/build/pluggable-transports-win32-gbuilt.zip cat ~/build/torrc-defaults-appendix-windows >> Data/Tor/torrc-defaults - cat ~/build/bridge_prefs.js >> Data/Browser/profile.default/preferences/extension-overrides.js + cat ~/build/bridge_prefs.js >> $EXTOVERRIDESPATH cat ~/build/meek-http-helper-user.js >> Data/Browser/profile.meek-http-helper/user.js fi + # If not building a multi-lingual package, suppress the language prompt. + if [ "z$MULTI_LINGUAL" != "z1" ]; then + echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> $EXTOVERRIDESPATH + echo 'pref("intl.locale.matchOS", false);' >> $EXTOVERRIDESPATH + fi cd ../../.. # # Copy reproducibility info
tor-commits@lists.torproject.org