[tbb-commits] [tor-browser-bundle/master] Bug 21343: Remove unused FTE related parts for macOS
gk at torproject.org
gk at torproject.org
Tue Jan 31 08:42:22 UTC 2017
commit fc71d02f70b8bd05fbd4cd09650b175ea29fe186
Author: Georg Koppen <gk at torproject.org>
Date: Mon Jan 30 12:46:01 2017 +0000
Bug 21343: Remove unused FTE related parts for macOS
---
Bundle-Data/PTConfigs/mac/torrc-defaults-appendix | 3 -
.../mac/gitian-pluggable-transports.yml | 148 ---------------------
gitian/descriptors/mac/gitian-utils.yml | 21 ---
gitian/mkbundle-mac.sh | 18 +--
4 files changed, 4 insertions(+), 186 deletions(-)
diff --git a/Bundle-Data/PTConfigs/mac/torrc-defaults-appendix b/Bundle-Data/PTConfigs/mac/torrc-defaults-appendix
index f5eb5e4..271b36c 100644
--- a/Bundle-Data/PTConfigs/mac/torrc-defaults-appendix
+++ b/Bundle-Data/PTConfigs/mac/torrc-defaults-appendix
@@ -1,6 +1,3 @@
-## fteproxy configuration
-ClientTransportPlugin fte exec PluggableTransports/fteproxy.bin --managed
-
## obfs4proxy configuration
ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec PluggableTransports/obfs4proxy
diff --git a/gitian/descriptors/mac/gitian-pluggable-transports.yml b/gitian/descriptors/mac/gitian-pluggable-transports.yml
index 8fc4df7..5f47b47 100644
--- a/gitian/descriptors/mac/gitian-pluggable-transports.yml
+++ b/gitian/descriptors/mac/gitian-pluggable-transports.yml
@@ -7,21 +7,9 @@ architectures:
- "i386"
packages:
- "unzip"
-- "python-setuptools"
-- "python-dev"
- "zip"
reference_datetime: "2000-01-01 00:00:00"
remotes:
-- "url": "https://git.torproject.org/pluggable-transports/pyptlib.git"
- "dir": "pyptlib"
-- "url": "https://git.torproject.org/pluggable-transports/obfsproxy.git"
- "dir": "obfsproxy"
-- "url": "https://github.com/kpdyer/libfte.git"
- "dir": "libfte"
-- "url": "https://github.com/kpdyer/fteproxy.git"
- "dir": "fteproxy"
-- "url": "https://github.com/habnabit/txsocksx.git"
- "dir": "txsocksx"
- "url": "https://git.torproject.org/pluggable-transports/goptlib.git"
"dir": "goptlib"
- "url": "https://git.torproject.org/pluggable-transports/meek.git"
@@ -38,20 +26,11 @@ remotes:
"dir": "obfs4"
files:
- "versions"
-- "pycrypto.tar.gz"
-- "argparse.tar.gz"
-- "pyyaml.tar.gz"
-- "zope.interface.zip"
-- "twisted.tar.bz2"
-- "parsley.tar.gz"
- "go14.tar.gz"
- "go.tar.gz"
-- "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
- "MacOSX10.7.sdk.tar.gz"
- "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
- "dzip.sh"
-- "gmp-mac64-utils.zip"
-- "openssl-mac64-utils.zip"
script: |
INSTDIR="$HOME/install"
source versions
@@ -60,13 +39,10 @@ script: |
PTDIR="$TBDIR/Contents/MacOS/Tor/PluggableTransports"
DOCSDIR="$TBDIR/Contents/Resources/TorBrowser/Docs"
TORBINDIR="$TBDIR/Contents/MacOS/Tor"
- # TODO: Fix packaging of fte so it can be included. See bug 18495.
- INCLUDE_FTE=0
else
PTDIR="$TBDIR/TorBrowser/Tor/PluggableTransports"
DOCSDIR="$TBDIR/TorBrowser/Docs"
TORBINDIR="$TBDIR/TorBrowser/Tor"
- INCLUDE_FTE=1
fi
export LIBRARY_PATH="$INSTDIR/lib"
export REFERENCE_DATETIME
@@ -77,29 +53,14 @@ script: |
mkdir -p $PTDIR/
mkdir -p $OUTDIR/
#
- # dpkg requires sbin directories in the PATH
- export PATH="/usr/sbin:/sbin:$PATH"
- sudo dpkg -i *.deb
tar xaf multiarch-darwin*tar.xz
# The 10.7 SDK is needed for Go: https://bugs.torproject.org/20023#comment:6
tar xaf MacOSX10.7.sdk.tar.gz
export PATH="$PATH:$HOME/build/apple-osx/bin/"
- if [ "z$INCLUDE_FTE" = "z1" ]; then
- unzip -d $INSTDIR gmp-mac64-utils.zip
- unzip -d $INSTDIR openssl-mac64-utils.zip
- # FTE only needs libgmp.10.dylib and no libgmpxx anymore.
- cp $INSTDIR/gmp/lib/libgmp.10.dylib $TORBINDIR/
- FTE_EXTRA_CFLAGS=" -I$INSTDIR/gmp/include -L$INSTDIR/gmp/lib"
- else
- FTE_EXTRA_CFLAGS=""
- fi
-
#
export AR=$HOME/build/apple-osx/bin/i686-apple-darwin11-ar
export CC=$HOME/build/apple-osx/bin/i686-apple-darwin11-gcc
export CXX=$HOME/build/apple-osx/bin/i686-apple-darwin11-g++
- # http://bugs.python.org/issue9437
- export LDSHARED="$CC -pthread -shared"
# Building go 1.4.x
# This is needed to bootstrap the go that we actually use
@@ -134,115 +95,6 @@ script: |
cd ../..
export PATH="$PATH:$PWD/go/bin"
- if [ "z$INCLUDE_FTE" = "z1" ]; then
-
- # Building pyptlib
- cd pyptlib
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- python setup.py build --build-lib build
- cp -a build/pyptlib $PTDIR/
- cd ..
-
- # Building PyCrypto
- tar xzf pycrypto.tar.gz
- cd pycrypto-*
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- # https://bugs.launchpad.net/pycrypto/+bug/1096207 for ac_cv_func_malloc_0_nonnull.
- ac_cv_func_malloc_0_nonnull=yes sh configure --host=i686-apple-darwin11
- LDSHARED="$LDSHARED -framework Python" python setup.py build_ext --build-lib build -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Python.framework/Headers
- python setup.py build --build-lib build
- cp -a build/Crypto $PTDIR/
- cd ..
-
- # Building argparse
- tar xzf argparse.tar.gz
- cd argparse-*
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- python setup.py build --build-lib build
- cp -a build/argparse.py $PTDIR/
- cd ..
-
- # Building Zope interfaces
- unzip zope.interface.zip
- cd zope.interface-*
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- python setup.py build --build-lib build
- cp -a build/zope $PTDIR/
- cd ..
-
- # Building PyYAML
- tar xzf pyyaml.tar.gz
- cd PyYAML-*
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- python setup.py build --build-lib build
- cp -a build/yaml $PTDIR/
- cd ..
-
- # Building Twisted
- tar xjf twisted.tar.bz2
- cd Twisted-*
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- LDSHARED="$LDSHARED -framework Python" python setup.py build_ext --build-lib build -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Python.framework/Headers
- python setup.py build --build-lib build
- cp -a build/twisted $PTDIR/
- cd ..
-
- # Building Parsley
- tar xzf parsley.tar.gz
- cd Parsley-*
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- python setup.py build --build-lib build
- cp -a build/parsley.py $PTDIR/
- cp -a build/ometa $PTDIR/
- cp -a build/terml $PTDIR/
- cd ..
-
- # Building txsocksx
- cd txsocksx
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- # Let's pretend we have the setup dependency already as we don't want to get
- # it downloaded during building. Just pretending and thus avoiding another
- # dependency should be fine here as txsocksx catches the exception due to
- # missing __version__ and __sha__ .
- mkdir vcversioner-1.14.1.1-py2.7.egg
- python setup.py build --build-lib build
- cp -a build/txsocksx $PTDIR/
- cd ..
-
- # Building obfsproxy
- cd obfsproxy
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- python setup.py build --build-lib build
- cp -a build/obfsproxy $PTDIR/
- cp -a bin/obfsproxy $PTDIR/obfsproxy.bin
- mkdir -p $DOCSDIR/Obfsproxy
- cp -a {LICENSE,README} $DOCSDIR/Obfsproxy
- # XXX: Workaround for bug 11190
- sed 's/python2/python/' -i $PTDIR/obfsproxy.bin
- cd ..
-
- # Building libfte
- cd libfte
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- CFLAGS="-L$INSTDIR/Tor -I$INSTDIR/gmp/include $CFLAGS" CXXFLAGS="-L$INSTDIR/Tor -I$INSTDIR/gmp/include $CXXFLAGS" make
- cp -ra fte $PTDIR/
- mkdir -p $DOCSDIR/libfte
- cp -a {LICENSE,README.md} $DOCSDIR/libfte
- cp -an thirdparty/re2/LICENSE $DOCSDIR/libfte/LICENSE.re2
- cd ..
-
- # Building fteproxy
- cd fteproxy
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- cp -a bin/fteproxy $PTDIR/fteproxy.bin
- cp -ra fteproxy $PTDIR/
- mkdir -p $DOCSDIR/fteproxy
- cp -a {COPYING,README.md} $DOCSDIR/fteproxy
- cd ..
-
- fi
- # end of 'INCLUDE_FTE' section
-
# Building goptlib
cd goptlib
find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
diff --git a/gitian/descriptors/mac/gitian-utils.yml b/gitian/descriptors/mac/gitian-utils.yml
index f54d5cb..55d6c7f 100644
--- a/gitian/descriptors/mac/gitian-utils.yml
+++ b/gitian/descriptors/mac/gitian-utils.yml
@@ -27,7 +27,6 @@ files:
- "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
- "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
- "openssl.tar.gz"
-- "gmp.tar.bz2"
- "versions"
- "dzip.sh"
- "libfaketime.patch"
@@ -78,8 +77,6 @@ script: |
export PATH="$PATH:$HOME/build/apple-osx/bin/"
# For OpenSSL
ln -s ~/build/apple-osx/bin/apple-osx-gcc ~/build/apple-osx/bin/i686-apple-darwin11-cc
- #For gmp, need to trick it so it knows we're doing a 64 bit build
- for i in ~/build/apple-osx/bin/i686-apple-darwin11-*; do j=`echo $i | sed 's/i686/x86_64/'`; ln -s $i $j; done;
# XXX Clean up these flags?
export CFLAGS="-m64 -I/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/include/ -I/usr/lib/gcc/i686-apple-darwin10/4.2.1/include/ -I. -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/ -L/usr/lib/apple/SDKs/MacOSX10.6.sdk/usr/lib/system/ -mmacosx-version-min=10.5"
@@ -109,27 +106,9 @@ script: |
make install
cd ..
- # Building GMP
- tar xjf gmp.tar.bz2
- cd gmp-*
- # |configure| can't cope with nano seconds faked. And even if we would revert
- # that feature it would hang sometimes for unknown but to libfaketime related
- # reasons.
- export LD_PRELOAD=""
- find -type f -print0 | xargs -0 touch --date="$REFERENCE_DATETIME"
- # Even if we are not shipping libgmpxx anymore we still need --enable-xcc
- # during compile time.
- ./configure --host=x86_64-apple-darwin11 --prefix=$INSTDIR/gmp --disable-static --enable-shared --enable-cxx
- export LD_PRELOAD="$INSTDIR/faketime/usr/local/lib/faketime/libfaketime.so.1"
- make
- make install
- cd ..
-
# Grabbing the results
cd $INSTDIR
~/build/dzip.sh openssl-$OPENSSL_VER-mac64-utils.zip openssl
~/build/dzip.sh libevent-${LIBEVENT_TAG#release-}-mac64-utils.zip libevent
- ~/build/dzip.sh gmp-$GMP_VER-mac64-utils.zip gmp
-
cp *utils.zip $OUTDIR/
fi
diff --git a/gitian/mkbundle-mac.sh b/gitian/mkbundle-mac.sh
index 3536553..789cc80 100755
--- a/gitian/mkbundle-mac.sh
+++ b/gitian/mkbundle-mac.sh
@@ -55,17 +55,10 @@ rm -f $GITIAN_DIR/inputs/tbb-docs.zip
$WRAPPER_DIR/build-helpers/dzip.sh $GITIAN_DIR/inputs/tbb-docs.zip ./Docs/
rm -f $GITIAN_DIR/inputs/TorBrowser.app.meek-http-helper.zip
(cd PTConfigs/mac && $WRAPPER_DIR/build-helpers/dzip.sh $GITIAN_DIR/inputs/TorBrowser.app.meek-http-helper.zip TorBrowser.app.meek-http-helper)
-if [ "z$DATA_OUTSIDE_APP_DIR" = "z1" ]; then
-# FTE is temporarily disabled due to bug 18495 and snowflake is Linux-only for
+cp PTConfigs/mac/torrc-defaults-appendix $GITIAN_DIR/inputs/torrc-defaults-appendix-mac
+# FTE is temporarily removed due to bug 18495 and snowflake is Linux-only for
# now.
- grep -v 'fteproxy' PTConfigs/mac/torrc-defaults-appendix > $GITIAN_DIR/inputs/torrc-defaults-appendix-mac
grep -Ev 'default_bridge\.fte|default_bridge\.snowflake' PTConfigs/bridge_prefs.js > $GITIAN_DIR/inputs/bridge_prefs.js
-else
- cp PTConfigs/mac/torrc-defaults-appendix $GITIAN_DIR/inputs/torrc-defaults-appendix-mac
- # We don't have snowflake available on macOS yet.
- grep -v 'default_bridge\.snowflake' PTConfigs/bridge_prefs.js > $GITIAN_DIR/inputs/bridge_prefs.js
-
-fi
cp PTConfigs/meek-http-helper-user.js $GITIAN_DIR/inputs/
cp mac-tor.sh $GITIAN_DIR/inputs/
@@ -144,8 +137,7 @@ cd $GITIAN_DIR
if [ ! -f inputs/clang-$CLANG_VER-linux64-wheezy-utils.zip -o \
! -f inputs/openssl-$OPENSSL_VER-mac64-utils.zip -o \
- ! -f inputs/libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip -o \
- ! -f inputs/gmp-$GMP_VER-mac64-utils.zip ];
+ ! -f inputs/libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip ];
then
echo
echo "****** Starting Utilities Component of Mac Bundle (1/5 for Mac) ******"
@@ -162,7 +154,6 @@ then
ln -sf clang-$CLANG_VER-linux64-wheezy-utils.zip clang-linux64-wheezy-utils.zip
ln -sf openssl-$OPENSSL_VER-mac64-utils.zip openssl-mac64-utils.zip
ln -sf libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip libevent-mac64-utils.zip
- ln -sf gmp-$GMP_VER-mac64-utils.zip gmp-mac64-utils.zip
cd ..
#cp -a result/utils-mac-res.yml inputs/
else
@@ -176,7 +167,6 @@ else
ln -sf clang-$CLANG_VER-linux64-wheezy-utils.zip clang-linux64-wheezy-utils.zip
ln -sf openssl-$OPENSSL_VER-mac64-utils.zip openssl-mac64-utils.zip
ln -sf libevent-${LIBEVENT_TAG_ORIG#release-}-mac64-utils.zip libevent-mac64-utils.zip
- ln -sf gmp-$GMP_VER-mac64-utils.zip gmp-mac64-utils.zip
cd ..
fi
@@ -229,7 +219,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,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,goxnet=$GO_X_NET_TAG,obfs4=$OBFS4_TAG $DESCRIPTOR_DIR/mac/gitian-pluggable-transports.yml
+ ./bin/gbuild -j $NUM_PROCS -m $VM_MEMORY --commit goptlib=$GOPTLIB_TAG,meek=$MEEK_TAG,ed25519=$GOED25519_TAG,siphash=$GOSIPHASH_TAG,goxcrypto=$GO_X_CRYPTO_TAG,goxnet=$GO_X_NET_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`
More information about the tbb-commits
mailing list