[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-messenger-build/master] Some cleanup in tor-messenger/build*
commit c4f8bc7d46074f734223dccba4c1b360de10e858
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date: Sat Oct 14 08:52:43 2017 -0400
Some cleanup in tor-messenger/build*
---
projects/tor-messenger/build | 50 ++++++++++++++++++++--------------------
projects/tor-messenger/build.osx | 46 +++++++++++++++++++-----------------
2 files changed, 50 insertions(+), 46 deletions(-)
diff --git a/projects/tor-messenger/build b/projects/tor-messenger/build
index 2ae3953..cffd8a1 100755
--- a/projects/tor-messenger/build
+++ b/projects/tor-messenger/build
@@ -40,6 +40,8 @@ mv Bundle-Data/linux/* bundle/Browser/TorBrowser/
mv Bundle-Data/windows/* bundle/Browser/TorBrowser/
[% END -%]
+cp cert_override.txt bundle/Browser/TorBrowser/Data/Browser/profile.default/
+
[% IF c("var/linux") %]
tar xf [% c('input_files_by_name/gcc') %]
chmod 755 start-tor-messenger start-tor-messenger.desktop execdesktop
@@ -53,33 +55,19 @@ mkdir -p bundle/Browser/lib
cp -L gcc/lib[% c('arch') == 'x86_64' ? '64' : '' %]/libstdc++.so.6 bundle/Browser/lib/
[% END %]
-cp cert_override.txt bundle/Browser/TorBrowser/Data/Browser/profile.default/
-
-cd bundle/Browser/TorBrowser/Data/Browser/profile.default/
-mkdir extensions
-cd extensions/
-tar xf ../../../../../../../[% c('input_files_by_name/ctypes-otr') %]
-mv ctypes-otr* 'ctypes-otr@tormessenger'
-
-mkdir tor-launcher@xxxxxxxxxxxxxx
-7z x -y -otor-launcher@xxxxxxxxxxxxxx ../../../../../../../[% c('input_files_by_name/tor-launcher') %]
-cat $rootdir/Bundle-Data/PTConfigs/bridge_prefs.js >> \
- tor-launcher@xxxxxxxxxxxxxx/defaults/preferences/prefs.js
-
[% IF c("var/windows") -%]
-7z x ../../../../../../../[% c('input_files_by_name/tor-browser') %]
+7z x [% c('input_files_by_name/tor-browser') %]
# The version of 7z (9.02) we are using for the builds creates redundant $PLUGINSDIR which we remove.
rm -rf \$PLUGINSDIR Browser/\$PLUGINSDIR
mv \$_OUTDIR tor-browser_en-US
cp -pf tor-browser_en-US/Browser/libssp-0.dll tor-browser_en-US/Browser/TorBrowser/Tor/
-
[% ELSE -%]
-tar xf ../../../../../../../[% c('input_files_by_name/tor-browser') %]
-
+tar xf [% c('input_files_by_name/tor-browser') %]
[% END -%]
sed -i 's/^SocksPort .*/SocksPort [% c("var/tor_socks_port") %]/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults
sed -i 's/^ControlPort .*/ControlPort [% c("var/tor_control_port") %]/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults
+# meek
[% IF c("var/windows") -%]
# use meek in standalone mode: https://lists.torproject.org/pipermail/tor-dev/2015-November/009887.html
sed -i 's/\(ClientTransportPlugin meek exec\) [^ ]\+ [^ ]\+ -- /\1 /' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults
@@ -90,20 +78,32 @@ sed -i 's/\(ClientTransportPlugin meek exec\) [^ ]\+ -- /\1 /' tor-browser_en-US
rm -f tor-browser_en-US/Browser/TorBrowser/Tor/PluggableTransports/meek-client-torbrowser
[% END -%]
-cd ../../../../../../
+mv tor-browser_en-US/Browser/TorBrowser/Tor bundle/Browser/TorBrowser/
+cp tor-browser_en-US/Browser/TorBrowser/Data/Tor/* bundle/Browser/TorBrowser/Data/Tor/
-mv Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-browser_en-US/Browser/TorBrowser/Tor Browser/TorBrowser/
-cp Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-browser_en-US/Browser/TorBrowser/Data/Tor/* Browser/TorBrowser/Data/Tor/
+# extensions
+extdir=$rootdir/bundle/Browser/TorBrowser/Data/Browser/profile.default/extensions
+mkdir -p $extdir
-rm -Rf Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-browser_en-US
+# tor-launcher
+mkdir tor-launcher@xxxxxxxxxxxxxx
+7z x -y -otor-launcher@xxxxxxxxxxxxxx [% c('input_files_by_name/tor-launcher') %]
+cat $rootdir/Bundle-Data/PTConfigs/bridge_prefs.js >> \
+ tor-launcher@xxxxxxxxxxxxxx/defaults/preferences/prefs.js
+mv tor-launcher@xxxxxxxxxxxxxx $extdir
+
+# ctypes-otr
+mkdir ctypes-otr
+cd ctypes-otr
+tar xf ../[% c('input_files_by_name/ctypes-otr') %]
+mv ctypes-otr* $extdir/ctypes-otr@tormessenger
+cd ..
# Recreate precomplete file (needs to be accurate for full MAR updates).
-cd Browser
+cd tor-browser_en-US/Browser
rm -f precomplete
python $MARTOOLS/createprecomplete.py
-cd ..
-
-cd ..
+cd ../..
mv bundle tor-messenger
OUTDIR='[% dest_dir _ "/" _ c("filename") %]'
diff --git a/projects/tor-messenger/build.osx b/projects/tor-messenger/build.osx
index 59ed644..317daa7 100755
--- a/projects/tor-messenger/build.osx
+++ b/projects/tor-messenger/build.osx
@@ -11,40 +11,44 @@ tar xf [% c('input_files_by_name/bundle-data') %]
mkdir torbrowser
cd torbrowser
-mkdir tor-launcher@xxxxxxxxxxxxxx
-7z x -y -otor-launcher@xxxxxxxxxxxxxx $rootdir/[% c('input_files_by_name/tor-launcher') %]
-
-# FTE is disabled on OS X. See #13252.
-sed -i '/default_bridge\.fte/d' $rootdir/Bundle-Data/PTConfigs/bridge_prefs.js
-
-cat $rootdir/Bundle-Data/PTConfigs/bridge_prefs.js >> \
- tor-launcher@xxxxxxxxxxxxxx/defaults/preferences/prefs.js
7z x $rootdir/[% c('input_files_by_name/tor-browser') %]
bsdtar xf '0.unknown partition'
sed -i 's/^SocksPort .*/SocksPort [% c("var/tor_socks_port") %]/' TorBrowser.app/Contents/Resources/TorBrowser/Tor/torrc-defaults
sed -i 's/^ControlPort .*/ControlPort [% c("var/tor_control_port") %]/' TorBrowser.app/Contents/Resources/TorBrowser/Tor/torrc-defaults
+cd ..
+
+# meek
# use meek in standalone mode: https://lists.torproject.org/pipermail/tor-dev/2015-November/009887.html
-sed -i 's/\(ClientTransportPlugin meek exec\) [^ ]\+ -- /\1 /' TorBrowser.app/Contents/Resources/TorBrowser/Tor/torrc-defaults
+sed -i 's/\(ClientTransportPlugin meek exec\) [^ ]\+ -- /\1 /' torbrowser/TorBrowser.app/Contents/Resources/TorBrowser/Tor/torrc-defaults
+# Trac 17476: These files aren't being used because we're running meek in
+# standalone mode above. Remove the bloat.
+rm -Rf torbrowser/TorBrowser.app/Contents/Resources/TorBrowser/Tor/PluggableTransports/template-profile.meek-http-helper/
+rm -f torbrowser/TorBrowser.app/Contents/MacOS/Tor/PluggableTransports/meek-client-torbrowser
+
+mkdir TorMessenger.app/TorBrowser/
+mv torbrowser/TorBrowser.app/Contents/Resources/TorBrowser/ $rootdir/TorMessenger.app/Contents/Resources/
+mv torbrowser/TorBrowser.app/Contents/MacOS/Tor/ $rootdir/TorMessenger.app/Contents/MacOS/
-# trac 17476
-rm -Rf TorBrowser.app/Contents/Resources/TorBrowser/Tor/PluggableTransports/template-profile.meek-http-helper/
-rm -f TorBrowser.app/Contents/MacOS/Tor/PluggableTransports/meek-client-torbrowser
+# extensions
+extdir=$rootdir/TorMessenger.app/Contents/Resources/distribution/extensions
+mkdir -p $extdir
-mkdir -p $rootdir/TorMessenger.app/Contents/Resources/distribution/extensions/
-mv tor-launcher@xxxxxxxxxxxxxx $rootdir/TorMessenger.app/Contents/Resources/distribution/extensions/
-cd ..
+# tor-launcher
+mkdir tor-launcher@xxxxxxxxxxxxxx
+7z x -y -otor-launcher@xxxxxxxxxxxxxx $rootdir/[% c('input_files_by_name/tor-launcher') %]
+# FTE is disabled on OS X. See #13252.
+sed -i '/default_bridge\.fte/d' $rootdir/Bundle-Data/PTConfigs/bridge_prefs.js
+cat $rootdir/Bundle-Data/PTConfigs/bridge_prefs.js >> \
+ tor-launcher@xxxxxxxxxxxxxx/defaults/preferences/prefs.js
+mv tor-launcher@xxxxxxxxxxxxxx $extdir
+# ctypes-otr
mkdir ctypes-otr
cd ctypes-otr
tar xf $rootdir/[% c('input_files_by_name/ctypes-otr') %]
-mv ctypes-otr* $rootdir/TorMessenger.app/Contents/Resources/distribution/extensions/ctypes-otr@tormessenger
+mv ctypes-otr* $extdir/ctypes-otr@tormessenger
cd ..
-mkdir TorMessenger.app/TorBrowser/
-mv torbrowser/TorBrowser.app/Contents/Resources/TorBrowser/ $rootdir/TorMessenger.app/Contents/Resources/
-
-mv torbrowser/TorBrowser.app/Contents/MacOS/Tor/ $rootdir/TorMessenger.app/Contents/MacOS/
-
# Adjust the Info.plist file
INFO_PLIST=$rootdir/TorMessenger.app/Contents/Info.plist
mv $INFO_PLIST tmp.plist
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits