[tbb-commits] [tor-browser-bundle/master] Set the bundle version in the bundle descriptor.

gk at torproject.org gk at torproject.org
Thu Apr 17 12:30:47 UTC 2014


commit 62ca5505e07fd86add646b97f82caf136e39b348
Author: Georg Koppen <gk at torproject.org>
Date:   Thu Apr 17 14:06:38 2014 +0000

    Set the bundle version in the bundle descriptor.
    
    We used to set the bundle version in the browser descriptor which had
    the bad side-effect that we needed to rebuild the whole Tor Browser just
    in order to change the bundle version. We do that now in the bundle
    descriptor instead.
---
 gitian/descriptors/linux/gitian-bundle.yml    |    5 +++++
 gitian/descriptors/linux/gitian-firefox.yml   |    6 +-----
 gitian/descriptors/mac/gitian-bundle.yml      |    5 +++++
 gitian/descriptors/mac/gitian-firefox.yml     |    4 ----
 gitian/descriptors/windows/gitian-bundle.yml  |    5 +++++
 gitian/descriptors/windows/gitian-firefox.yml |    6 +-----
 6 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml
index fa78928..39a7747 100644
--- a/gitian/descriptors/linux/gitian-bundle.yml
+++ b/gitian/descriptors/linux/gitian-bundle.yml
@@ -41,6 +41,7 @@ files:
 - "bundle.inputs"
 - "versions"
 - "tbb-docs.zip"
+- "torbrowser.version"
 script: |
   INSTDIR="$HOME/install"
   source versions
@@ -118,6 +119,10 @@ script: |
   #
   pushd tor-browser_en-US/Browser/browser/
   unzip omni.ja defaults/preferences/000-tor-browser.js
+  # Set the version of the bundle.
+  grep -v '^pref(\"torbrowser.version\",' defaults/preferences/000-tor-browser.js > defaults/preferences/000-tor-browser.js.fixed
+  cat ~/build/torbrowser.version >> defaults/preferences/000-tor-browser.js.fixed
+  mv defaults/preferences/000-tor-browser.js.fixed defaults/preferences/000-tor-browser.js
   cp defaults/preferences/000-tor-browser.js ~/build/
   # Set the locale of the bundle.
   echo "pref(\"general.useragent.locale\", \"en-US\");" >> defaults/preferences/000-tor-browser.js
diff --git a/gitian/descriptors/linux/gitian-firefox.yml b/gitian/descriptors/linux/gitian-firefox.yml
index 282ea49..1f2cf12 100644
--- a/gitian/descriptors/linux/gitian-firefox.yml
+++ b/gitian/descriptors/linux/gitian-firefox.yml
@@ -5,7 +5,7 @@ suites:
 architectures:
 - "i386"
 - "amd64"
-packages: 
+packages:
 - "faketime"
 - "unzip"
 - "zip"
@@ -29,7 +29,6 @@ remotes:
 - "url": "https://git.torproject.org/tor-browser.git"
   "dir": "tor-browser"
 files:
-- "torbrowser.version"
 - "re-dzip.sh"
 - "dzip.sh"
 - "python.tar.bz2"
@@ -73,9 +72,6 @@ script: |
   fi
   #
   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
-  mv browser/app/profile/000-tor-browser.js.fixed browser/app/profile/000-tor-browser.js
   # .git and the src takes up a lot of useless space, and we need the space to build
   #git archive HEAD | tar -x -C $OUTDIR/src
   rm -rf .git
diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml
index 4928acb..b7ecf3a 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -46,6 +46,7 @@ files:
 - "versions"
 - "tbb-docs.zip"
 - "mac-tor.sh"
+- "torbrowser.version"
 script: |
   INSTDIR="$HOME/install"
   source versions
@@ -146,6 +147,10 @@ script: |
   #
   pushd $TORBROWSER_NAME.app/Contents/MacOS/TorBrowser.app/Contents/MacOS/browser/
   unzip omni.ja defaults/preferences/000-tor-browser.js
+  # Set the version of the bundle.
+  grep -v '^pref(\"torbrowser.version\",' defaults/preferences/000-tor-browser.js > defaults/preferences/000-tor-browser.js.fixed
+  cat ~/build/torbrowser.version >> defaults/preferences/000-tor-browser.js.fixed
+  mv defaults/preferences/000-tor-browser.js.fixed defaults/preferences/000-tor-browser.js
   cp defaults/preferences/000-tor-browser.js ~/build/
   # Set the locale of the bundle.
   echo "pref(\"general.useragent.locale\", \"en-US\");" >> defaults/preferences/000-tor-browser.js
diff --git a/gitian/descriptors/mac/gitian-firefox.yml b/gitian/descriptors/mac/gitian-firefox.yml
index e252888..1832f55 100644
--- a/gitian/descriptors/mac/gitian-firefox.yml
+++ b/gitian/descriptors/mac/gitian-firefox.yml
@@ -17,7 +17,6 @@ remotes:
 - "url": "https://git.torproject.org/tor-browser.git"
   "dir": "tor-browser"
 files:
-- "torbrowser.version"
 - "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
 - "x86_64-apple-darwin10.tar.xz"
 - "re-dzip.sh"
@@ -51,9 +50,6 @@ script: |
   #
   cd tor-browser
   mv .mozconfig-mac .mozconfig
-  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
-  mv browser/app/profile/000-tor-browser.js.fixed browser/app/profile/000-tor-browser.js
   # .git and the src takes up a lot of useless space, and we need the space to build
   #git archive HEAD | tar -x -C $OUTDIR/src
   rm -rf .git
diff --git a/gitian/descriptors/windows/gitian-bundle.yml b/gitian/descriptors/windows/gitian-bundle.yml
index ac79d58..fddb611 100644
--- a/gitian/descriptors/windows/gitian-bundle.yml
+++ b/gitian/descriptors/windows/gitian-bundle.yml
@@ -39,6 +39,7 @@ files:
 - "bundle.inputs"
 - "versions"
 - "tbb-docs.zip"
+- "torbrowser.version"
 script: |
   INSTDIR="$HOME/install"
   source versions
@@ -115,6 +116,10 @@ script: |
   #
   pushd "Tor Browser"/Browser/browser/
   unzip omni.ja defaults/preferences/000-tor-browser.js
+  # Set the version of the bundle.
+  grep -v '^pref(\"torbrowser.version\",' defaults/preferences/000-tor-browser.js > defaults/preferences/000-tor-browser.js.fixed
+  cat ~/build/torbrowser.version >> defaults/preferences/000-tor-browser.js.fixed
+  mv defaults/preferences/000-tor-browser.js.fixed 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
diff --git a/gitian/descriptors/windows/gitian-firefox.yml b/gitian/descriptors/windows/gitian-firefox.yml
index 1c151ea..fefb677 100644
--- a/gitian/descriptors/windows/gitian-firefox.yml
+++ b/gitian/descriptors/windows/gitian-firefox.yml
@@ -4,7 +4,7 @@ suites:
 - "precise"
 architectures:
 - "i386"
-packages: 
+packages:
 - "git-core"
 - "unzip"
 - "zip"
@@ -25,7 +25,6 @@ files:
 - "mingw-w64-svn-snapshot.zip"
 - "binutils.tar.bz2"
 - "gcc.tar.bz2"
-- "torbrowser.version"
 - "re-dzip.sh"
 - "dzip.sh"
 - "i686-w64-mingw32-gcc"
@@ -137,9 +136,6 @@ script: |
   # Our flags don't get passed to NSS. We need to do that manually using an
   # obscure one.
   export DLLFLAGS="-specs=/home/ubuntu/build/msvcr100.spec"
-  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
-  mv browser/app/profile/000-tor-browser.js.fixed browser/app/profile/000-tor-browser.js
   # .git and the src takes up a lot of useless space, and we need the space to build
   #git archive HEAD | tar -x -C $OUTDIR/src
   rm -rf .git



More information about the tbb-commits mailing list