[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-messenger-build/master] Use tor-launcher@0.2.9.4
commit 35190115d6155a770e5b59dc61684f593e9c0343
Author: Arlo Breault <arlolra@xxxxxxxxx>
Date: Tue Nov 15 16:07:46 2016 -0800
Use tor-launcher@0.2.9.4
* Requested the patches be uplifted in trac 20678
---
...emove-special-handling-for-Instantbird-Th.patch | 71 ++++++++++++++++++++++
...-Set-CurProcD-for-Thunderbird-Instantbird.patch | 42 +++++++++++++
projects/tor-launcher/build | 2 +
projects/tor-launcher/config | 10 +--
4 files changed, 121 insertions(+), 4 deletions(-)
diff --git a/projects/tor-launcher/0001-Bug-19432-Remove-special-handling-for-Instantbird-Th.patch b/projects/tor-launcher/0001-Bug-19432-Remove-special-handling-for-Instantbird-Th.patch
new file mode 100644
index 0000000..366cde0
--- /dev/null
+++ b/projects/tor-launcher/0001-Bug-19432-Remove-special-handling-for-Instantbird-Th.patch
@@ -0,0 +1,71 @@
+From 985b87cb1c6e6e0d70adb9279232423bd105eb4f Mon Sep 17 00:00:00 2001
+From: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
+Date: Fri, 24 Jun 2016 12:04:39 -0400
+Subject: [PATCH 1/2] Bug 19432: Remove special handling for
+ Instantbird/Thunderbird
+
+These applications now use the same directory structure as Tor Browser.
+---
+ src/components/tl-process.js | 39 +++++++++++++--------------------------
+ 1 file changed, 13 insertions(+), 26 deletions(-)
+
+diff --git a/src/components/tl-process.js b/src/components/tl-process.js
+index ba50310..4f9928a 100644
+--- a/src/components/tl-process.js
++++ b/src/components/tl-process.js
+@@ -32,8 +32,6 @@ TorProcessService.prototype =
+ kContractID : "@torproject.org/torlauncher-process-service;1",
+ kServiceName : "Tor Launcher Process Service",
+ kClassID: Components.ID("{FE7B4CAF-BCF4-4848-8BFF-EFA66C9AFDA1}"),
+- kThunderbirdID: "{3550f703-e582-4d05-9a08-453d09bdfdc6}",
+- kInstantbirdID: "{33cb9019-c295-46dd-be21-8c4936574bee}",
+ kTorLauncherExtPath: "tor-launcher@xxxxxxxxxxxxxx", // This could vary.
+
+ kPrefPromptAtStartup: "extensions.torlauncher.prompt_at_startup",
+@@ -868,30 +866,19 @@ TorProcessService.prototype =
+ .getService(Ci.nsIProperties).get("CurProcD", Ci.nsIFile);
+ let appInfo = Cc["@mozilla.org/xre/app-info;1"]
+ .getService(Ci.nsIXULAppInfo);
+- if ((appInfo.ID == this.kThunderbirdID) ||
+- (appInfo.ID == this.kInstantbirdID))
+- {
+- // For TorBirdy and Tor Messenger the Tor Launcher extension
+- // directory is returned.
+- topDir.append("extensions");
+- topDir.append(this.kTorLauncherExtPath);
+- }
+- else // Tor Browser
+- {
+- // On Linux and Windows, we want to return the Browser/ directory.
+- // Because topDir ("CurProcD") points to Browser/browser on those
+- // platforms, we need to go up one level.
+- // On Mac OS, we want to return the TorBrowser.app/ directory.
+- // Because topDir points to Contents/Resources/browser on Mac OS,
+- // we need to go up 3 levels.
+- let tbbBrowserDepth = (TorLauncherUtil.isMac) ? 3 : 1;
+- while (tbbBrowserDepth > 0)
+- {
+- let didRemove = (topDir.leafName != ".");
+- topDir = topDir.parent;
+- if (didRemove)
+- tbbBrowserDepth--;
+- }
++ // On Linux and Windows, we want to return the Browser/ directory.
++ // Because topDir ("CurProcD") points to Browser/browser on those
++ // platforms, we need to go up one level.
++ // On Mac OS, we want to return the TorBrowser.app/ directory.
++ // Because topDir points to Contents/Resources/browser on Mac OS,
++ // we need to go up 3 levels.
++ let tbbBrowserDepth = (TorLauncherUtil.isMac) ? 3 : 1;
++ while (tbbBrowserDepth > 0)
++ {
++ let didRemove = (topDir.leafName != ".");
++ topDir = topDir.parent;
++ if (didRemove)
++ tbbBrowserDepth--;
+ }
+
+ this.mAppDir = topDir;
+--
+2.10.2
+
diff --git a/projects/tor-launcher/0002-Bug-19568-Set-CurProcD-for-Thunderbird-Instantbird.patch b/projects/tor-launcher/0002-Bug-19568-Set-CurProcD-for-Thunderbird-Instantbird.patch
new file mode 100644
index 0000000..0e45ae1
--- /dev/null
+++ b/projects/tor-launcher/0002-Bug-19568-Set-CurProcD-for-Thunderbird-Instantbird.patch
@@ -0,0 +1,42 @@
+From 44c1cc246e8736e88906c74058f2c582aa6178ed Mon Sep 17 00:00:00 2001
+From: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
+Date: Mon, 4 Jul 2016 11:59:34 -0400
+Subject: [PATCH 2/2] Bug 19568: Set CurProcD for Thunderbird/Instantbird
+
+For Thunderbird/Instantbird, the CurProcD (topDir) is not browser/,
+so we need to iterate one level less than Firefox.
+---
+ src/components/tl-process.js | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/components/tl-process.js b/src/components/tl-process.js
+index 4f9928a..8e42feb 100644
+--- a/src/components/tl-process.js
++++ b/src/components/tl-process.js
+@@ -31,6 +31,8 @@ TorProcessService.prototype =
+ {
+ kContractID : "@torproject.org/torlauncher-process-service;1",
+ kServiceName : "Tor Launcher Process Service",
++ kThunderbirdID: "{3550f703-e582-4d05-9a08-453d09bdfdc6}",
++ kInstantbirdID: "{33cb9019-c295-46dd-be21-8c4936574bee}",
+ kClassID: Components.ID("{FE7B4CAF-BCF4-4848-8BFF-EFA66C9AFDA1}"),
+ kTorLauncherExtPath: "tor-launcher@xxxxxxxxxxxxxx", // This could vary.
+
+@@ -873,6 +875,14 @@ TorProcessService.prototype =
+ // Because topDir points to Contents/Resources/browser on Mac OS,
+ // we need to go up 3 levels.
+ let tbbBrowserDepth = (TorLauncherUtil.isMac) ? 3 : 1;
++ if ((appInfo.ID == this.kThunderbirdID) ||
++ (appInfo.ID == this.kInstantbirdID))
++ {
++ // On Thunderbird/Instantbird, the topDir is the root dir and not
++ // browser/, so we need to iterate one level less than Firefox.
++ --tbbBrowserDepth;
++ }
++
+ while (tbbBrowserDepth > 0)
+ {
+ let didRemove = (topDir.leafName != ".");
+--
+2.10.2
+
diff --git a/projects/tor-launcher/build b/projects/tor-launcher/build
index 5b11d89..c6f47fc 100644
--- a/projects/tor-launcher/build
+++ b/projects/tor-launcher/build
@@ -2,6 +2,8 @@
set -e
tar xvf [% project %]-[% c('version') %].tar.gz
cd [% project %]-[% c('version') %]
+patch -p1 < ../0001-Bug-19432-Remove-special-handling-for-Instantbird-Th.patch
+patch -p1 < ../0002-Bug-19568-Set-CurProcD-for-Thunderbird-Instantbird.patch
[% IF c("var/tor_control_port") -%]
patch -p1 < ../controlport.patch
[% END -%]
diff --git a/projects/tor-launcher/config b/projects/tor-launcher/config
index f4dc4ee..0749395 100644
--- a/projects/tor-launcher/config
+++ b/projects/tor-launcher/config
@@ -1,11 +1,13 @@
# vim: filetype=yaml sw=2
-version: 0.2.9.3
+version: 0.2.9.4
git_url: https://git.torproject.org/tor-launcher.git
-git_hash: 44c1cc246e8736e88906c74058f2c582aa6178ed
-#gpg_keyring: gk.gpg
-#tag_gpg_id: 1
+git_hash: '[% c("version") %]'
+gpg_keyring: gk.gpg
+tag_gpg_id: 1
filename: "[% project %]-[% c('version') %]-[% c('var/build_id') %].xpi"
input_files:
+ - filename: 0001-Bug-19432-Remove-special-handling-for-Instantbird-Th.patch
+ - filename: 0002-Bug-19568-Set-CurProcD-for-Thunderbird-Instantbird.patch
- filename: torbirdy.png
- filename: messenger.png
- filename: default48.png
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits