[tbb-commits] [tor-browser-bundle/master] Add golang.org/x/crypto to the build process.

gk at torproject.org gk at torproject.org
Thu Jan 22 08:27:32 UTC 2015


commit e33339c763c212a09f9976d5c04f033c1ec7c18c
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Wed Jan 21 19:34:00 2015 +0000

    Add golang.org/x/crypto to the build process.
    
    This is required for any of:
     * Go >= 1.4.x (It is backwards compatible though).
     * obfs4proxy >= cdeda5724124ca393c87be6d01c84fe4f906d612
    
    And replaces go.crypto (the developers moved/renamed the package).  As
    there is no formal release process as far as I can tell for the
    codebase the current tip of tree commit is used for versions.alpha, and
    master for versions.nightly.
    
    When obfs4proxy 0.0.4 is tagged, the old go.crypto code can be removed
    from the build process after the new tag is added to all the
    versions.foo files.
    
    Fixes #14316.
---
 gitian/descriptors/linux/gitian-pluggable-transports.yml |   14 +++++++++++++-
 gitian/descriptors/mac/gitian-pluggable-transports.yml   |   14 +++++++++++++-
 .../descriptors/windows/gitian-pluggable-transports.yml  |   14 +++++++++++++-
 gitian/fetch-inputs.sh                                   |    1 +
 gitian/mkbundle-linux.sh                                 |    2 +-
 gitian/mkbundle-mac.sh                                   |    2 +-
 gitian/mkbundle-windows.sh                               |    2 +-
 gitian/versions.alpha                                    |    1 +
 gitian/versions.nightly                                  |    1 +
 9 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/gitian/descriptors/linux/gitian-pluggable-transports.yml b/gitian/descriptors/linux/gitian-pluggable-transports.yml
index e79e8af..d180f97 100644
--- a/gitian/descriptors/linux/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/linux/gitian-pluggable-transports.yml
@@ -36,6 +36,8 @@ remotes:
   "dir": "ed25519"
 - "url": "https://github.com/dchest/siphash.git"
   "dir": "siphash"
+- "url": "https://go.googlesource.com/crypto"
+  "dir": "goxcrypto"
 - "url": "https://git.torproject.org/pluggable-transports/obfs4.git"
   "dir": "obfs4"
 files:
@@ -242,7 +244,17 @@ script: |
   go install github.com/dchest/siphash
   cd ..
 
-  # Building go.crypto
+  # Building golang.org/x/crypto (obfs4proxy > 0.0.3 || Go >= 1.4)
+  cd goxcrypto
+  find -type f | xargs touch --date="$REFERENCE_DATETIME"
+  mkdir -p "$GOPATH/src/golang.org/x/"
+  ln -sf "$PWD" "$GOPATH/src/golang.org/x/crypto"
+  go install golang.org/x/crypto/curve25519
+  go install golang.org/x/crypto/hkdf
+  go install golang.org/x/crypto/nacl/secretbox
+  cd ..
+
+  # Building go.crypto (obfs4proxy <= 0.0.3)
   tar xjf go.crypto.tar.bz2
   cd go.crypto
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
diff --git a/gitian/descriptors/mac/gitian-pluggable-transports.yml b/gitian/descriptors/mac/gitian-pluggable-transports.yml
index 0931c59..9a86b1a 100644
--- a/gitian/descriptors/mac/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/mac/gitian-pluggable-transports.yml
@@ -34,6 +34,8 @@ remotes:
   "dir": "ed25519"
 - "url": "https://github.com/dchest/siphash.git"
   "dir": "siphash"
+- "url": "https://go.googlesource.com/crypto"
+  "dir": "goxcrypto"
 - "url": "https://git.torproject.org/pluggable-transports/obfs4.git"
   "dir": "obfs4"
 files:
@@ -270,7 +272,17 @@ script: |
   go install github.com/dchest/siphash
   cd ..
 
-  # Building go.crypto
+  # Building golang.org/x/crypto (obfs4proxy > 0.0.3 || Go >= 1.4)
+  cd goxcrypto
+  find -type f | xargs touch --date="$REFERENCE_DATETIME"
+  mkdir -p "$GOPATH/src/golang.org/x/"
+  ln -sf "$PWD" "$GOPATH/src/golang.org/x/crypto"
+  go install golang.org/x/crypto/curve25519
+  go install golang.org/x/crypto/hkdf
+  go install golang.org/x/crypto/nacl/secretbox
+  cd ..
+
+  # Building go.crypto (obfs4proxy <= 0.0.3)
   tar xjf go.crypto.tar.bz2
   cd go.crypto
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
diff --git a/gitian/descriptors/windows/gitian-pluggable-transports.yml b/gitian/descriptors/windows/gitian-pluggable-transports.yml
index 70d4b91..6e3c3a7 100644
--- a/gitian/descriptors/windows/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/windows/gitian-pluggable-transports.yml
@@ -33,6 +33,8 @@ remotes:
   "dir": "ed25519"
 - "url": "https://github.com/dchest/siphash.git"
   "dir": "siphash"
+- "url": "https://go.googlesource.com/crypto"
+  "dir": "goxcrypto"
 - "url": "https://git.torproject.org/pluggable-transports/obfs4.git"
   "dir": "obfs4"
 files:
@@ -348,7 +350,17 @@ script: |
   go install github.com/dchest/siphash
   cd ..
 
-  # Building go.crypto
+  # Building golang.org/x/crypto (obfs4proxy > 0.0.3 || Go >= 1.4)
+  cd goxcrypto
+  find -type f | xargs touch --date="$REFERENCE_DATETIME"
+  mkdir -p "$GOPATH/src/golang.org/x/"
+  ln -sf "$PWD" "$GOPATH/src/golang.org/x/crypto"
+  go install golang.org/x/crypto/curve25519
+  go install golang.org/x/crypto/hkdf
+  go install golang.org/x/crypto/nacl/secretbox
+  cd ..
+
+  # Building go.crypto (obfs4proxy <= 0.0.3)
   tar xjf go.crypto.tar.bz2
   cd go.crypto
   find -type f | xargs touch --date="$REFERENCE_DATETIME"
diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh
index 049824a..3311547 100755
--- a/gitian/fetch-inputs.sh
+++ b/gitian/fetch-inputs.sh
@@ -309,6 +309,7 @@ meek                  https://git.torproject.org/pluggable-transports/meek.git $
 faketime              https://github.com/wolfcw/libfaketime $FAKETIME_TAG
 ed25519               https://github.com/agl/ed25519.git $GOED25519_TAG
 siphash               https://github.com/dchest/siphash.git $GOSIPHASH_TAG
+goxcrypto             https://go.googlesource.com/crypto  $GO_X_CRYPTO_TAG
 obfs4                 https://git.torproject.org/pluggable-transports/obfs4.git $OBFS4_TAG
 EOF
 
diff --git a/gitian/mkbundle-linux.sh b/gitian/mkbundle-linux.sh
index 4a773b8..0dba906 100755
--- a/gitian/mkbundle-linux.sh
+++ b/gitian/mkbundle-linux.sh
@@ -224,7 +224,7 @@ then
   echo "****** Starting Pluggable Transports Component of Linux Bundle (4/5 for Linux) ******"
   echo
 
-  ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit pyptlib=$PYPTLIB_TAG,obfsproxy=$OBFSPROXY_TAG,flashproxy=$FLASHPROXY_TAG,libfte=$LIBFTE_TAG,fteproxy=$FTEPROXY_TAG,txsocksx=$TXSOCKSX_TAG,goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/linux/gitian-pluggable-transports.yml
+  ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit pyptlib=$PYPTLIB_TAG,obfsproxy=$OBFSPROXY_TAG,flashproxy=$FLASHPROXY_TAG,libfte=$LIBFTE_TAG,fteproxy=$FTEPROXY_TAG,txsocksx=$TXSOCKSX_TAG,goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,goxcrypto=$GO_X_CRYPTO_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/linux/gitian-pluggable-transports.yml
   if [ $? -ne 0 ];
   then
     #mv var/build.log ./pluggable-transports-fail-linux.log.`date +%Y%m%d%H%M%S`
diff --git a/gitian/mkbundle-mac.sh b/gitian/mkbundle-mac.sh
index ed54dc6..09b3172 100755
--- a/gitian/mkbundle-mac.sh
+++ b/gitian/mkbundle-mac.sh
@@ -190,7 +190,7 @@ then
   echo "****** Starting Pluggable Transports Component of Mac Bundle (4/5 for Mac) ******"
   echo
 
-  ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit pyptlib=$PYPTLIB_TAG,obfsproxy=$OBFSPROXY_TAG,flashproxy=$FLASHPROXY_TAG,libfte=$LIBFTE_TAG,fteproxy=$FTEPROXY_TAG,txsocksx=$TXSOCKSX_TAG,goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/mac/gitian-pluggable-transports.yml
+  ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit pyptlib=$PYPTLIB_TAG,obfsproxy=$OBFSPROXY_TAG,flashproxy=$FLASHPROXY_TAG,libfte=$LIBFTE_TAG,fteproxy=$FTEPROXY_TAG,txsocksx=$TXSOCKSX_TAG,goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,goxcrypto=$GO_X_CRYPTO_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/mac/gitian-pluggable-transports.yml
   if [ $? -ne 0 ];
   then
     #mv var/build.log ./firefox-fail-mac.log.`date +%Y%m%d%H%M%S`
diff --git a/gitian/mkbundle-windows.sh b/gitian/mkbundle-windows.sh
index 945511b..39c57ce 100755
--- a/gitian/mkbundle-windows.sh
+++ b/gitian/mkbundle-windows.sh
@@ -194,7 +194,7 @@ then
   echo "****** Starting Pluggable Transports Component of Windows Bundle (4/5 for Windows) ******"
   echo
 
-  ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit pyptlib=$PYPTLIB_TAG,obfsproxy=$OBFSPROXY_TAG,flashproxy=$FLASHPROXY_TAG,libfte=$LIBFTE_TAG,fteproxy=$FTEPROXY_TAG,txsocksx=$TXSOCKSX_TAG,goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/windows/gitian-pluggable-transports.yml
+  ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit pyptlib=$PYPTLIB_TAG,obfsproxy=$OBFSPROXY_TAG,flashproxy=$FLASHPROXY_TAG,libfte=$LIBFTE_TAG,fteproxy=$FTEPROXY_TAG,txsocksx=$TXSOCKSX_TAG,goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,goxcrypto=$GO_X_CRYPTO_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/windows/gitian-pluggable-transports.yml
   if [ $? -ne 0 ];
   then
     #mv var/build.log ./pluggable-transports-fail-win32.log.`date +%Y%m%d%H%M%S`
diff --git a/gitian/versions.alpha b/gitian/versions.alpha
index 890b6a3..a0af194 100755
--- a/gitian/versions.alpha
+++ b/gitian/versions.alpha
@@ -29,6 +29,7 @@ MEEK_TAG=0.15
 FAKETIME_TAG=70aa6b394d9341522dffe8a5a5cf5929e82cc6b9 # unsigned v0.9.6
 GOED25519_TAG=c4161f4c7483313562781c61b9a20aba73daf9de
 GOSIPHASH_TAG=42ba037e748c9062a75e0924705c43b893edefcd
+GO_X_CRYPTO_TAG=4ed45ec682102c643324fae5dff8dab085b6c300
 OBFS4_TAG=obfs4proxy-0.0.3
 
 GITIAN_TAG=tor-browser-builder-3.x-7
diff --git a/gitian/versions.nightly b/gitian/versions.nightly
index d200f54..cb6e53a 100755
--- a/gitian/versions.nightly
+++ b/gitian/versions.nightly
@@ -33,6 +33,7 @@ MEEK_TAG=master
 FAKETIME_TAG=70aa6b394d9341522dffe8a5a5cf5929e82cc6b9 # unsigned v0.9.6
 GOED25519_TAG=c4161f4c7483313562781c61b9a20aba73daf9de
 GOSIPHASH_TAG=42ba037e748c9062a75e0924705c43b893edefcd
+GO_X_CRYPTO_TAG=master
 OBFS4_TAG=master
 
 GITIAN_TAG=tor-browser-builder-3.x-7





More information about the tbb-commits mailing list