[tbb-commits] [tor-browser-bundle/hardened-builds] Bug 20735: Inline fetch --dry-run to pass a revision to gclient sync

gk at torproject.org gk at torproject.org
Mon Jan 9 08:28:42 UTC 2017


commit 96836418e9686ea775759bbe15c39cbc3855969d
Author: Arlo Breault <arlolra at gmail.com>
Date:   Sat Jan 7 09:35:07 2017 -0800

    Bug 20735: Inline fetch --dry-run to pass a revision to gclient sync
    
     * Recent upstream changes require manual intervention when doing the
       initial fetch, which we'd like to avoid.  For now, just sync as far
       as we need.
---
 gitian/fetch-inputs.sh | 29 +++++++++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh
index 01ec802..9059336 100755
--- a/gitian/fetch-inputs.sh
+++ b/gitian/fetch-inputs.sh
@@ -313,17 +313,38 @@ PATH="$PATH:$PWD/depot_tools"
 # Use --no-history because the whole checkout with history is about 12 GB.
 export GYP_CROSSCOMPILE=1
 export GYP_DEFINES="use_x11=0"
+# JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
+# default-java comes from the package default-jdk-headless.
+export JAVA_HOME=/usr/lib/jvm/default-java
 mkdir -p "$dir"
 cd "$dir"
 if [ ! -d "src" ];
 then
   # "fetch" is part of depot_tools.
-  fetch --nohooks --no-history webrtc
+  #fetch --nohooks --no-history webrtc
+  # FIXME: To avoid the unconditional `gclient sync` in the call to fetch,
+  # we inline the result of a `fetch --dry-run`
+  gclient root
+  gclient config --spec 'solutions = [
+  {
+    "managed": False,
+    "name": "src",
+    "url": "https://chromium.googlesource.com/external/webrtc.git",
+    "custom_deps": {},
+    "deps_file": "DEPS",
+    "safesync_url": "",
+  },
+]
+'
+  gclient sync --nohooks --no-history --with_branch_heads -r $WEBRTC_TAG
+  cd src
+  git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
+  git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
+  git config diff.ignoreSubmodules all
+  cd ..
 fi
 # "gclient" is part of depot_tools. This download takes a long time the first time.
-# JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
-# default-java comes from the package default-jdk-headless.
-JAVA_HOME=/usr/lib/jvm/default-java gclient sync --with_branch_heads --no-history -r $WEBRTC_TAG
+gclient sync --no-history --with_branch_heads -r $WEBRTC_TAG
 cd ..
 tar --exclude .git -czf webrtc.tar.gz webrtc
 



More information about the tbb-commits mailing list