commit f79412dffd134cb89d463229a5875e53e4274991 Author: Nicolas Vigier boklm@torproject.org Date: Mon Jan 14 19:11:20 2019 +0100
Bug 27531: Add separate LD_LIBRARY_PATH for fteproxy --- projects/fteproxy/build | 2 ++ projects/fteproxy/config | 2 ++ projects/fteproxy/fteproxy.wrapper | 10 ++++++++++ projects/libfte/build | 4 ++-- .../Bundle-Data/PTConfigs/linux/torrc-defaults-appendix | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/projects/fteproxy/build b/projects/fteproxy/build index 310c9a5..6b6a82f 100644 --- a/projects/fteproxy/build +++ b/projects/fteproxy/build @@ -22,6 +22,8 @@ cd /var/tmp/build/[% project %]-[% c('version') %] cp -a fteproxy/defs/*.json $PTDIR/fteproxy/defs rm -Rf $pydir [% ELSE -%] + cp -a $rootdir/fteproxy.wrapper $PTDIR/fteproxy.wrapper + chmod +x $PTDIR/fteproxy.wrapper cp -a bin/fteproxy $PTDIR/fteproxy.bin cp -ra fteproxy $PTDIR/ [% END -%] diff --git a/projects/fteproxy/config b/projects/fteproxy/config index d58095e..06ea149 100644 --- a/projects/fteproxy/config +++ b/projects/fteproxy/config @@ -28,3 +28,5 @@ input_files: - name: '[% c("var/compiler") %]' project: '[% c("var/compiler") %]' enable: '[% c("var/windows") %]' + - filename: fteproxy.wrapper + enable: '[% c("var/linux") %]' diff --git a/projects/fteproxy/fteproxy.wrapper b/projects/fteproxy/fteproxy.wrapper new file mode 100644 index 0000000..ca10086 --- /dev/null +++ b/projects/fteproxy/fteproxy.wrapper @@ -0,0 +1,10 @@ +#!/bin/sh +basedir=$(dirname "$0") +libdir=$(cd "$basedir"/fteproxy-lib ; pwd) +if test -z "$LD_LIBRARY_PATH" +then + export LD_LIBRARY_PATH="$libdir" +else + export LD_LIBRARY_PATH="$libdir:$LD_LIBRARY_PATH" +fi +exec "$basedir/fteproxy.bin" "$@" diff --git a/projects/libfte/build b/projects/libfte/build index 4f3455f..5d62453 100644 --- a/projects/libfte/build +++ b/projects/libfte/build @@ -28,8 +28,8 @@ tar -C $distdir -xf $rootdir/[% c('input_files_by_name/obfsproxy') %] export PYTHON=python2 make cp -ra fte $PTDIR/ - mkdir -p $distdir/TorBrowser/Tor - cp /var/tmp/dist/gmp/lib/libgmp.so.10 $distdir/TorBrowser/Tor/ + mkdir -p $PTDIR/fteproxy-lib + cp /var/tmp/dist/gmp/lib/libgmp.so.10 $PTDIR/fteproxy-lib [% END -%] cp -a {LICENSE,README.md} $DOCSDIR/ cp -a thirdparty/re2/LICENSE $DOCSDIR/LICENSE.re2 diff --git a/projects/tor-browser/Bundle-Data/PTConfigs/linux/torrc-defaults-appendix b/projects/tor-browser/Bundle-Data/PTConfigs/linux/torrc-defaults-appendix index 12b8aad..d9988fb 100644 --- a/projects/tor-browser/Bundle-Data/PTConfigs/linux/torrc-defaults-appendix +++ b/projects/tor-browser/Bundle-Data/PTConfigs/linux/torrc-defaults-appendix @@ -1,5 +1,5 @@ ## fteproxy configuration -ClientTransportPlugin fte exec ./TorBrowser/Tor/PluggableTransports/fteproxy.bin --managed +ClientTransportPlugin fte exec ./TorBrowser/Tor/PluggableTransports/fteproxy.wrapper --managed
## obfs4proxy configuration ClientTransportPlugin obfs2,obfs3,obfs4,scramblesuit exec ./TorBrowser/Tor/PluggableTransports/obfs4proxy