commit 15fb918cae1e97b1886ba85289a90afb70bf0f4f
Author: Mike Perry <mikeperry-git(a)torproject.org>
Date: Wed Nov 27 20:12:26 2013 -0800
Bug #9828: Fix python and omni.ja for Mac and Windows.
Firefox requires python 2.7 now, and has a new omni.ja.
---
gitian/descriptors/mac/gitian-bundle.yml | 9 +++++++--
gitian/descriptors/mac/gitian-firefox.yml | 19 +++++++++++++++++++
gitian/descriptors/windows/gitian-bundle.yml | 9 +++++++--
gitian/descriptors/windows/gitian-firefox.yml | 21 +++++++++++++++++++++
4 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml
index ade303b..2ef8834 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -105,12 +105,17 @@ script: |
cp versions TorBrowserBundle.app/Docs/sources/
cp bundle.inputs TorBrowserBundle.app/Docs/sources/bundle.inputs
#
- cd TorBrowserBundle.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/
+ # FF24 puts the prefs in a different jar:
+ if [ -f TorBrowserBundle.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/omni.ja ]; then
+ pushd TorBrowserBundle.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/
+ else
+ pushd TorBrowserBundle.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/
+ fi
unzip omni.ja defaults/preferences/000-tor-browser.js
cp defaults/preferences/000-tor-browser.js ~/build/
echo "pref(\"general.useragent.locale\", \"en-US\");" >> defaults/preferences/000-tor-browser.js
zip -Xm omni.ja defaults/preferences/000-tor-browser.js
- cd ../../../../../../
+ popd
# XXX: DMG plz
cp -a TorBrowserBundle.app TorBrowserBundle_en-US.app
~/build/dzip.sh $OUTDIR/TorBrowserBundle-${TORBROWSER_VERSION}-osx${GBUILD_BITS}_en-US.zip TorBrowserBundle_en-US.app
diff --git a/gitian/descriptors/mac/gitian-firefox.yml b/gitian/descriptors/mac/gitian-firefox.yml
index 8230abc..d6e5b4a 100644
--- a/gitian/descriptors/mac/gitian-firefox.yml
+++ b/gitian/descriptors/mac/gitian-firefox.yml
@@ -26,10 +26,13 @@ files:
- "i686-apple-darwin11-ld"
- "re-dzip.sh"
- "dzip.sh"
+- "python.tar.bz2"
+- "versions"
#- "apple-x86-gcc_4.2.1~5646.1flosoft2_i386.deb"
#- "apple-x86-odcctools_758.159-0flosoft11_i386.deb"
script: |
INSTDIR="$HOME/install/"
+ source versions
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
@@ -43,6 +46,19 @@ script: |
mkdir -p $INSTDIR/TorBrowser.app/Contents/MacOS/
mkdir -p $OUTDIR/
#
+ # XXX: Refactor this out into a separate descriptor
+ # 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...
+ if [ ${TORBROWSER_VERSION::3} != "3.0" ]; then
+ mkdir python
+ cd python
+ tar -xjvf ../python.tar.bz2
+ Python-*/configure
+ make
+ sudo make install
+ cd ..
+ fi
+ #
sudo dpkg -i *.deb
chmod 755 i686*
sudo cp i686* /usr/bin/
@@ -84,5 +100,8 @@ script: |
cd $INSTDIR
~/build/re-dzip.sh TorBrowser.app/Contents/MacOS/omni.ja
~/build/re-dzip.sh TorBrowser.app/Contents/MacOS/webapprt/omni.ja
+ if [ -f TorBrowser.app/Contents/MacOS/browser/omni.ja ]; then # FF24 includes a third .ja
+ ~/build/re-dzip.sh TorBrowser.app/Contents/MacOS/browser/omni.ja
+ fi
~/build/dzip.sh tor-browser-mac${GBUILD_BITS}-gbuilt.zip ./TorBrowser.app
cp tor-browser-mac${GBUILD_BITS}-gbuilt.zip $OUTDIR
diff --git a/gitian/descriptors/windows/gitian-bundle.yml b/gitian/descriptors/windows/gitian-bundle.yml
index 44e1662..5ee9056 100644
--- a/gitian/descriptors/windows/gitian-bundle.yml
+++ b/gitian/descriptors/windows/gitian-bundle.yml
@@ -107,12 +107,17 @@ script: |
cp ../versions "Tor Browser"/Docs/sources/
cp ../bundle.inputs "Tor Browser"/Docs/sources/
#
- cd "Tor Browser"/Browser
+ # FF24 puts the prefs in a different jar:
+ if [ -f "Tor Browser"/Browser/browser/omni.ja ]; then
+ pushd "Tor Browser"/Browser/browser/
+ else
+ pushd "Tor Browser"/Browser/
+ fi
unzip omni.ja defaults/preferences/000-tor-browser.js
cp defaults/preferences/000-tor-browser.js ~/build/
echo "pref(\"general.useragent.locale\", \"en-US\");" >> defaults/preferences/000-tor-browser.js
zip -Xm omni.ja defaults/preferences/000-tor-browser.js
- cd ../../
+ popd
makensis torbrowser.nsi
mv torbrowser-install.exe $OUTDIR/torbrowser-install-${TORBROWSER_VERSION}_en-US.exe
#
diff --git a/gitian/descriptors/windows/gitian-firefox.yml b/gitian/descriptors/windows/gitian-firefox.yml
index 31e782f..94b6ba0 100644
--- a/gitian/descriptors/windows/gitian-firefox.yml
+++ b/gitian/descriptors/windows/gitian-firefox.yml
@@ -32,8 +32,11 @@ files:
- "i686-w64-mingw32-g++"
- "i686-w64-mingw32-ld"
- "msvcr100.dll"
+- "python.tar.bz2"
+- "versions"
script: |
INSTDIR="$HOME/install"
+ source versions
export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
export FAKETIME=$REFERENCE_DATETIME
export TZ=UTC
@@ -55,6 +58,21 @@ script: |
# linked against msvcrt by default. See bug 9084 for a more detailed
# discussion.
+ #
+ # XXX: Refactor this out into a separate descriptor
+ # 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...
+ if [ ${TORBROWSER_VERSION::3} != "3.0" ]; then
+ mkdir python
+ cd python
+ tar -xjvf ../python.tar.bz2
+ Python-*/configure
+ make
+ sudo make install
+ cd ..
+ fi
+ #
+
# FIXME: We need sudo for all of this because otherwise
# the toolchain can't find the alternate prefix for the CRT headers :/
@@ -180,5 +198,8 @@ script: |
if [ -f Browser/webapprt/omni.ja ]; then
~/build/re-dzip.sh Browser/webapprt/omni.ja
fi
+ if [ -f Browser/browser/omni.ja ]; then
+ ~/build/re-dzip.sh Browser/browser/omni.ja
+ fi
~/build/dzip.sh tor-browser-win32-gbuilt.zip Browser
cp tor-browser-win32-gbuilt.zip $OUTDIR