commit e5874651a275739fc47fa96b4bab5cb2e723aec0 Author: Nicolas Vigier boklm@torproject.org Date: Sun Mar 22 23:35:17 2015 +0100
Use different port numbers for Tor Mail and Tor Messenger --- projects/tor-launcher/build | 2 ++ projects/tor-launcher/config | 3 +++ projects/tor-launcher/controlport.patch | 25 ------------------------- projects/tor-launcher/controlport.patch.tmpl | 25 +++++++++++++++++++++++++ projects/tor-mail/build | 4 ++-- projects/tor-messenger/build | 4 ++-- rbm.conf | 4 ++++ 7 files changed, 38 insertions(+), 29 deletions(-)
diff --git a/projects/tor-launcher/build b/projects/tor-launcher/build index efee0f2..9a4a96f 100644 --- a/projects/tor-launcher/build +++ b/projects/tor-launcher/build @@ -3,6 +3,8 @@ set -e tar xvf [% project %]-[% c('version') %].tar.gz cd [% project %]-[% c('version') %] patch -d src -p1 < ../topdir.patch +[% IF c("var/tor_control_port") -%] patch -p1 < ../controlport.patch +[% END -%] make package mv pkg/*.xpi [% dest_dir _ '/' _ c('filename') %] diff --git a/projects/tor-launcher/config b/projects/tor-launcher/config index dd2f1d1..7aca5ec 100644 --- a/projects/tor-launcher/config +++ b/projects/tor-launcher/config @@ -8,3 +8,6 @@ filename: "[% project %]-[% c('version') %]-[% c('var/build_id') %].xpi" input_files: - filename: topdir.patch - filename: controlport.patch + content: '[% INCLUDE controlport.patch.tmpl -%]' + refresh_input: 1 + enable: '[% c("var/tor_control_port") %]' diff --git a/projects/tor-launcher/controlport.patch b/projects/tor-launcher/controlport.patch deleted file mode 100644 index 7c9b904..0000000 --- a/projects/tor-launcher/controlport.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 08800fd6f225b05817e134fa465d1b83fb42be8e Mon Sep 17 00:00:00 2001 -From: Sukhbir Singh sukhbir@torproject.org -Date: Mon, 17 Nov 2014 22:50:47 +0530 -Subject: [PATCH 1/1] Set ControlPort to 9153 - ---- - src/defaults/preferences/prefs.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/defaults/preferences/prefs.js b/src/defaults/preferences/prefs.js -index 34bf1a7..b95b00f 100644 ---- a/src/defaults/preferences/prefs.js -+++ b/src/defaults/preferences/prefs.js -@@ -3,7 +3,7 @@ pref("extensions.torlauncher.logmethod", 1); // 0=stdout, 1=errorconsole, 2=deb - pref("extensions.torlauncher.max_tor_log_entries", 1000); - - pref("extensions.torlauncher.control_host", "127.0.0.1"); --pref("extensions.torlauncher.control_port", 9151); -+pref("extensions.torlauncher.control_port", 9153); - - pref("extensions.torlauncher.start_tor", true); - pref("extensions.torlauncher.prompt_at_startup", true); --- -2.1.3 - diff --git a/projects/tor-launcher/controlport.patch.tmpl b/projects/tor-launcher/controlport.patch.tmpl new file mode 100644 index 0000000..cc5656b --- /dev/null +++ b/projects/tor-launcher/controlport.patch.tmpl @@ -0,0 +1,25 @@ +From 08800fd6f225b05817e134fa465d1b83fb42be8e Mon Sep 17 00:00:00 2001 +From: Sukhbir Singh sukhbir@torproject.org +Date: Mon, 17 Nov 2014 22:50:47 +0530 +Subject: [PATCH 1/1] Set ControlPort to [% c("var/tor_control_port") %] + +--- + src/defaults/preferences/prefs.js | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/defaults/preferences/prefs.js b/src/defaults/preferences/prefs.js +index 34bf1a7..b95b00f 100644 +--- a/src/defaults/preferences/prefs.js ++++ b/src/defaults/preferences/prefs.js +@@ -3,7 +3,7 @@ pref("extensions.torlauncher.logmethod", 1); // 0=stdout, 1=errorconsole, 2=deb + pref("extensions.torlauncher.max_tor_log_entries", 1000); + + pref("extensions.torlauncher.control_host", "127.0.0.1"); +-pref("extensions.torlauncher.control_port", 9151); ++pref("extensions.torlauncher.control_port", [% c("var/tor_control_port") %]); + + pref("extensions.torlauncher.start_tor", true); + pref("extensions.torlauncher.prompt_at_startup", true); +-- +2.1.3 + diff --git a/projects/tor-mail/build b/projects/tor-mail/build index 135f9fe..c2b7498 100644 --- a/projects/tor-mail/build +++ b/projects/tor-mail/build @@ -28,8 +28,8 @@ mv $_OUTDIR tor-browser_en-US [% ELSE -%] tar xf ../../../[% c('input_files_by_name/tor-browser') %] [% END -%] -sed -i 's/^SocksPort .*/SocksPort 9152/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults -sed -i 's/^ControlPort .*/ControlPort 9153/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults +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 mv tor-browser_en-US/Browser/TorBrowser/Tor tor-launcher@torproject.org/TorBrowser/Tor mv tor-browser_en-US/Browser/TorBrowser/Data/Tor tor-launcher@torproject.org/TorBrowser/Data/Tor rm -Rf tor-browser_en-US diff --git a/projects/tor-messenger/build b/projects/tor-messenger/build index 60cb99c..4cceecc 100644 --- a/projects/tor-messenger/build +++ b/projects/tor-messenger/build @@ -30,8 +30,8 @@ mv $_OUTDIR tor-browser_en-US [% ELSE -%] tar xf ../../../[% c('input_files_by_name/tor-browser') %] [% END -%] -sed -i 's/^SocksPort .*/SocksPort 9152/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults -sed -i 's/^ControlPort .*/ControlPort 9153/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults +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 mv tor-browser_en-US/Browser/TorBrowser/Tor tor-launcher@torproject.org/TorBrowser/Tor mv tor-browser_en-US/Browser/TorBrowser/Data/Tor tor-launcher@torproject.org/TorBrowser/Data/Tor rm -Rf tor-browser_en-US diff --git a/rbm.conf b/rbm.conf index d4bdf8f..715be53 100644 --- a/rbm.conf +++ b/rbm.conf @@ -70,10 +70,14 @@ targets: tor-messenger: var: tor-messenger: 1 + tor_socks_port: 9152 + tor_control_port: 9153
tor-mail: var: tor-mail: 1 + tor_socks_port: 9154 + tor_control_port: 9155
# The no_build_id target can be useful if you want to quickly display # a build template or other option but don't want to spend time to
tor-commits@lists.torproject.org