[tor-commits] [tor-browser-bundle/master] Bug #9828: Firefix 24 fixes.

mikeperry at torproject.org mikeperry at torproject.org
Tue Nov 12 06:29:46 UTC 2013


commit 9a2042d4b5d0963cc26f8beb97bfb92f6ce11284
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Mon Nov 11 22:10:29 2013 -0800

    Bug #9828: Firefix 24 fixes.
    
    Build python2.7 and perform some omni.ja hacks.
---
 gitian/descriptors/linux/gitian-bundle.yml  |   19 +++++++++++++++----
 gitian/descriptors/linux/gitian-firefox.yml |   15 +++++++++++++++
 gitian/fetch-inputs.sh                      |   12 ++++++++----
 gitian/versions                             |    3 +++
 gitian/versions.alpha                       |    3 +++
 5 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml
index 060f1a4..68e01ec 100644
--- a/gitian/descriptors/linux/gitian-bundle.yml
+++ b/gitian/descriptors/linux/gitian-bundle.yml
@@ -108,12 +108,17 @@ script: |
   cp bundle.inputs tor-browser/Docs/sources/bundle.inputs
   #
   cp -a tor-browser tor-browser_en-US
-  cd tor-browser_en-US/Browser
+  # FF24 puts the prefs in a different jar:
+  if [ -f tor-browser_en-US/Browser/browser/omni.ja ]; then
+     pushd tor-browser_en-US/Browser/browser/
+  else
+     pushd tor-browser_en-US/Browser/
+  fi
   unzip omni.ja defaults/preferences/000-tor-browser.js
   echo "pref(\"general.useragent.locale\", \"en-US\");" >> defaults/preferences/000-tor-browser.js
   zip -Xd omni.ja defaults/preferences/000-tor-browser.js
   zip -Xm omni.ja defaults/preferences/000-tor-browser.js
-  cd ../../
+  popd
   #7z a -sfx tor-browser.exe tor-browser_en-US
   #mv tor-browser.exe $OUTDIR/tor-browser-linux${GBUILD_BITS}_en-US.7z-selfextract
   ~/build/dtar.sh $OUTDIR/tor-browser-linux${GBUILD_BITS}-${TORBROWSER_VERSION}_en-US.tar.xz tor-browser_en-US
@@ -128,12 +133,18 @@ script: |
     cp $i ../tor-browser_$LANG/Data/Browser/profile.default/extensions/langpack-$LANG at firefox.mozilla.org.xpi
     cd ..
 
-    cd tor-browser_$LANG/Browser
+    # FF24 puts the prefs in a different jar:
+    if [ -f tor-browser_$LANG/Browser/browser/omni.ja ]; then
+       pushd tor-browser_$LANG/Browser/browser/
+    else
+       pushd tor-browser_$LANG/Browser/
+    fi
+
     unzip omni.ja defaults/preferences/000-tor-browser.js
     echo "pref(\"general.useragent.locale\", \"$LANG\");" >> defaults/preferences/000-tor-browser.js
     zip -Xd omni.ja defaults/preferences/000-tor-browser.js
     zip -Xm omni.ja defaults/preferences/000-tor-browser.js
-    cd ../../
+    popd
 
     #7z a -sfx tor-browser.exe tor-browser_$LANG
     #mv tor-browser.exe $OUTDIR/tor-browser-linux${GBUILD_BITS}_$LANG.7z-selfextract
diff --git a/gitian/descriptors/linux/gitian-firefox.yml b/gitian/descriptors/linux/gitian-firefox.yml
index 41684ee..d852e73 100644
--- a/gitian/descriptors/linux/gitian-firefox.yml
+++ b/gitian/descriptors/linux/gitian-firefox.yml
@@ -23,6 +23,7 @@ packages:
 - "libtool"
 - "libiw-dev"
 - "hardening-wrapper"
+- "libgstreamer-plugins-base0.10-dev"
 reference_datetime: "2000-01-01 00:00:00"
 remotes:
 - "url": "https://git.torproject.org/tor-browser.git"
@@ -31,6 +32,7 @@ files:
 - "torbrowser.version"
 - "re-dzip.sh"
 - "dzip.sh"
+- "python.tar.bz2"
 script: |
   INSTDIR="$HOME/install"
   export LIBRARY_PATH="$INSTDIR/lib"
@@ -56,6 +58,16 @@ script: |
   mkdir -p $INSTDIR/Browser/
   mkdir -p $INSTDIR/Debug/Browser/
   #
+  # Fx 24 ESR does not work with Python < 2.7 anymore. But 10.04 does only ship
+  # with Python 2.6. Thus, we compile 2.7 ourselves...
+  mkdir python
+  cd python
+  tar -xjvf ../python.tar.bz2
+  Python-*/configure
+  make
+  sudo make install
+  cd ..
+  #
   cd tor-browser
   grep -v '^pref(\"torbrowser.version\",' browser/app/profile/000-tor-browser.js > browser/app/profile/000-tor-browser.js.fixed
   cat ../torbrowser.version >> browser/app/profile/000-tor-browser.js.fixed
@@ -91,6 +103,9 @@ script: |
   done
   ~/build/re-dzip.sh Browser/omni.ja
   ~/build/re-dzip.sh Browser/webapprt/omni.ja
+  if [ -f Browser/browser/omni.ja ]; then # FF24 includes a third .ja
+    ~/build/re-dzip.sh Browser/browser/omni.ja
+  fi
   ~/build/dzip.sh tor-browser-linux$GBUILD_BITS-gbuilt.zip Browser/
   ~/build/dzip.sh tor-browser-linux$GBUILD_BITS-debug.zip Debug/
   cp tor-browser-linux$GBUILD_BITS-gbuilt.zip $OUTDIR/
diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh
index 9295a1f..535a797 100755
--- a/gitian/fetch-inputs.sh
+++ b/gitian/fetch-inputs.sh
@@ -118,11 +118,15 @@ update_git() {
 #  fi
 #done
 
-for i in BINUTILS GCC
+for i in BINUTILS GCC PYTHON
 do
   PACKAGE="${i}_PACKAGE"
-  URL="${i}_URL" 
-  SUFFIX="sig"
+  URL="${i}_URL"
+  if [ "${i}" == "PYTHON" ]; then
+    SUFFIX="asc"
+  else
+    SUFFIX="sig"
+  fi
   get "${!PACKAGE}" "${!URL}"
   get "${!PACKAGE}.$SUFFIX" "${!URL}.$SUFFIX"
 
@@ -216,7 +220,7 @@ ln -sf "$NOSCRIPT_PACKAGE" noscript at noscript.net.xpi
 ln -sf "$PDFJS_PACKAGE" uriloader at pdf.js.xpi
 ln -sf "$BINUTILS_PACKAGE" binutils.tar.bz2
 ln -sf "$GCC_PACKAGE" gcc.tar.bz2
- 
+ln -sf "$PYTHON_PACKAGE" python.tar.bz2
 
 # Fetch latest gitian-builder itself
 # XXX - this is broken if a non-standard inputs dir is selected using the command line flag.
diff --git a/gitian/versions b/gitian/versions
index f2b712a..4128288 100755
--- a/gitian/versions
+++ b/gitian/versions
@@ -20,6 +20,7 @@ GITIAN_TAG=tor-browser-builder-3.0-4
 FIREFOX_LANG_VER=17.0.10esr
 BINUTILS_VER=2.22
 GCC_VER=4.6.3
+PYTHON_VER=2.7.5
 
 ## File names for the source packages
 # OPENSSL_PACKAGE=openssl-${OPENSSL_VER}.tar.gz
@@ -31,6 +32,7 @@ MINGW_PACKAGE=mingw-w64-svn-snapshot.zip
 MSVCR100_PACKAGE=msvcr100.dll
 BINUTILS_PACKAGE=binutils-${BINUTILS_VER}.tar.bz2
 GCC_PACKAGE=gcc-${GCC_VER}.tar.bz2
+PYTHON_PACKAGE=Python-${PYTHON_VER}.tar.bz2
 
 # Hashes for packages with weak sigs or no sigs
 # OPENSSL_HASH=f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3
@@ -48,3 +50,4 @@ OSXSDK_URL=https://launchpad.net/~flosoft/+archive/cross-apple/+files/${OSXSDK_P
 BINUTILS_URL=https://ftp.gnu.org/gnu/binutils/${BINUTILS_PACKAGE}
 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/${GCC_PACKAGE}
 NOSCRIPT_URL=https://addons.cdn.mozilla.net/storage/public-staging/722/${NOSCRIPT_PACKAGE}
+PYTHON_URL=http://www.python.org/ftp/python/${PYTHON_VER}/${PYTHON_PACKAGE}
diff --git a/gitian/versions.alpha b/gitian/versions.alpha
index 07c1d8e..d70d289 100755
--- a/gitian/versions.alpha
+++ b/gitian/versions.alpha
@@ -20,6 +20,7 @@ GITIAN_TAG=tor-browser-builder-3.0-4
 FIREFOX_LANG_VER=24.1.0esr
 BINUTILS_VER=2.22
 GCC_VER=4.6.3
+PYTHON_VER=2.7.5
 
 ## File names for the source packages
 # OPENSSL_PACKAGE=openssl-${OPENSSL_VER}.tar.gz
@@ -31,6 +32,7 @@ MINGW_PACKAGE=mingw-w64-svn-snapshot.zip
 MSVCR100_PACKAGE=msvcr100.dll
 BINUTILS_PACKAGE=binutils-${BINUTILS_VER}.tar.bz2
 GCC_PACKAGE=gcc-${GCC_VER}.tar.bz2
+PYTHON_PACKAGE=Python-${PYTHON_VER}.tar.bz2
 
 # Hashes for packages with weak sigs or no sigs
 # OPENSSL_HASH=f74f15e8c8ff11aa3d5bb5f276d202ec18d7246e95f961db76054199c69c1ae3
@@ -48,3 +50,4 @@ OSXSDK_URL=https://launchpad.net/~flosoft/+archive/cross-apple/+files/${OSXSDK_P
 BINUTILS_URL=https://ftp.gnu.org/gnu/binutils/${BINUTILS_PACKAGE}
 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VER}/${GCC_PACKAGE}
 NOSCRIPT_URL=https://addons.cdn.mozilla.net/storage/public-staging/722/${NOSCRIPT_PACKAGE}
+PYTHON_URL=http://www.python.org/ftp/python/${PYTHON_VER}/${PYTHON_PACKAGE}





More information about the tor-commits mailing list