commit 94c6a1c73291f8f456249d9719de57ff002fe6fe Author: Georg Koppen gk@torproject.org Date: Wed May 11 19:37:29 2016 +0000
Bug 18915: Use our search plugins in localized builds
We are preparing the language packs we ship for using our search engines in the order we want. This is necessary due to https://bugzilla.mozilla.org/show_bug.cgi?id=1162569. --- gitian/descriptors/linux/gitian-bundle.yml | 19 +++++++++++++ gitian/descriptors/mac/gitian-bundle.yml | 19 +++++++++++++ gitian/descriptors/windows/gitian-bundle.yml | 40 +++++++++++++++++++++------- 3 files changed, 68 insertions(+), 10 deletions(-)
diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml index d5aaec4..39ad811 100644 --- a/gitian/descriptors/linux/gitian-bundle.yml +++ b/gitian/descriptors/linux/gitian-bundle.yml @@ -194,6 +194,10 @@ script: | cp -a ${TB_STAGE_DIR} ${PKG_DIR} # pushd ${PKG_DIR}/Browser/browser/ + # For the proper search engines in our language packs + unzip omni.ja chrome/en-US/locale/browser/searchplugins* + mv chrome/en-US/locale/browser/searchplugins ~/build + rm -rf chrome unzip omni.ja defaults/preferences/000-tor-browser.js cp defaults/preferences/000-tor-browser.js ~/build/ # Set the locale of the bundle. @@ -204,6 +208,21 @@ script: | # unzip linux-langpacks.zip LINUX_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_LINUX" + # Prepare our language packs for using the proper search engines. See bug + # 18915 for more details. + for LANG in $LINUX_LOCALES + do + xpi=linux-langpacks/$LANG.xpi + unzip -d prep_$LANG $xpi + search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser + rm -rf $search_plugins_path/searchplugins + cp -rf ~/build/searchplugins $search_plugins_path + rm $xpi + cd prep_$LANG + zip -r9 ../$xpi * + cd .. + rm -rf prep_$LANG + done # If we are building a multi-lingual package, add all of the language packs. if [ "z$MULTI_LINGUAL" = "z1" ]; then pushd linux-langpacks diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml index 00cd4d1..ff17520 100644 --- a/gitian/descriptors/mac/gitian-bundle.yml +++ b/gitian/descriptors/mac/gitian-bundle.yml @@ -213,6 +213,10 @@ script: | cd .. # pushd $TORBROWSER_NAME.app/Contents/Resources/browser/ + # For the proper search engines in our language packs + unzip omni.ja chrome/en-US/locale/browser/searchplugins* + mv chrome/en-US/locale/browser/searchplugins ~/build + rm -rf chrome unzip omni.ja defaults/preferences/000-tor-browser.js cp defaults/preferences/000-tor-browser.js ~/build/ if [ "z$DATA_OUTSIDE_APP_DIR" = "z1" ]; then @@ -245,6 +249,21 @@ script: |
unzip mac-langpacks.zip MAC_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_MAC" + # Prepare our language packs for using the proper search engines. See bug + # 18915 for more details. + for LANG in $MAC_LOCALES + do + xpi=mac-langpacks/$LANG.xpi + unzip -d prep_$LANG $xpi + search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser + rm -rf $search_plugins_path/searchplugins + cp -rf ~/build/searchplugins $search_plugins_path + rm $xpi + cd prep_$LANG + zip -r9 ../$xpi * + cd .. + rm -rf prep_$LANG + done PKG_LOCALE="en-US" # If we are building a multi-lingual package, add all of the language packs # and use "ALL" in the package name and as the locale for update purposes. diff --git a/gitian/descriptors/windows/gitian-bundle.yml b/gitian/descriptors/windows/gitian-bundle.yml index 4fe4bb6..da65142 100644 --- a/gitian/descriptors/windows/gitian-bundle.yml +++ b/gitian/descriptors/windows/gitian-bundle.yml @@ -161,8 +161,38 @@ script: | cp ../versions "Tor Browser"/Browser/TorBrowser/Docs/sources/ cp ../bundle.inputs "Tor Browser"/Browser/TorBrowser/Docs/sources/
+ # + pushd "Tor Browser"/Browser/browser/ + # For the proper search engines in our language packs + unzip omni.ja chrome/en-US/locale/browser/searchplugins* + mv chrome/en-US/locale/browser/searchplugins ~/build + rm -rf chrome + unzip omni.ja defaults/preferences/000-tor-browser.js + cp defaults/preferences/000-tor-browser.js ~/build/ + # Set the locale bundle. + echo "pref("general.useragent.locale", "en-US");" >> defaults/preferences/000-tor-browser.js + zip -Xm omni.ja defaults/preferences/000-tor-browser.js + rm -rf defaults + popd + # + unzip ../win32-langpacks.zip WIN32_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_WIN32" + # Prepare our language packs for using the proper search engines. See bug + # 18915 for more details. + for LANG in $WIN32_LOCALES + do + xpi=win32-langpacks/$LANG.xpi + unzip -d prep_$LANG $xpi + search_plugins_path=prep_$LANG/browser/chrome/$LANG/locale/browser + rm -rf $search_plugins_path/searchplugins + cp -rf ~/build/searchplugins $search_plugins_path + rm $xpi + cd prep_$LANG + zip -r9 ../$xpi * + cd .. + rm -rf prep_$LANG + done PKG_LOCALE="en-US" # If we are building a multi-lingual package, add all of the language packs # and use "ALL" in the package name and as the locale for update purposes. @@ -184,16 +214,6 @@ script: | popd fi
- # - pushd "Tor Browser"/Browser/browser/ - unzip omni.ja defaults/preferences/000-tor-browser.js - cp defaults/preferences/000-tor-browser.js ~/build/ - # Set the locale bundle. - echo "pref("general.useragent.locale", "en-US");" >> defaults/preferences/000-tor-browser.js - zip -Xm omni.ja defaults/preferences/000-tor-browser.js - rm -rf defaults - popd - # # Recreate precomplete file (needs to be accurate for full MAR updates). pushd "Tor Browser"/Browser/ rm -f precomplete
tbb-commits@lists.torproject.org