[tor-commits] [tor-messenger-build/updater] Add patch for #18900 (Linux updater library search path)

sukhbir at torproject.org sukhbir at torproject.org
Fri Aug 5 19:40:24 UTC 2016


commit ef3f49487c566d9a18d18191a2e9cb999ff78295
Author: Sukhbir Singh <sukhbir at torproject.org>
Date:   Fri Aug 5 15:39:36 2016 -0400

    Add patch for #18900 (Linux updater library search path)
---
 .../Updater-Linux-search-path-bug-18900.mozpatch   | 42 ++++++++++++++++++++++
 projects/instantbird/config                        |  1 +
 2 files changed, 43 insertions(+)

diff --git a/projects/instantbird/Updater-Linux-search-path-bug-18900.mozpatch b/projects/instantbird/Updater-Linux-search-path-bug-18900.mozpatch
new file mode 100644
index 0000000..3c46bd7
--- /dev/null
+++ b/projects/instantbird/Updater-Linux-search-path-bug-18900.mozpatch
@@ -0,0 +1,42 @@
+From 82cfa7c8786c1ad1421666365bd71f3594861328 Mon Sep 17 00:00:00 2001
+From: Kathy Brade <brade at pearlcrescent.com>
+Date: Tue, 26 Apr 2016 14:25:35 -0400
+Subject: Bug 18900: updater doesn't work on Linux (cannot find libraries)
+
+Revert "Bug 1159090 - Only append library path for updater if it is a unique value. r=rstrong"
+
+This reverts commit 5c4fcaf37f8e479b5d3c46a21b8a48ad1fe567d8.
+
+diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp
+index 0c7b6b0..d256f2a 100644
+--- a/toolkit/xre/nsUpdateDriver.cpp
++++ b/toolkit/xre/nsUpdateDriver.cpp
+@@ -488,20 +488,20 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir,
+ static void
+ AppendToLibPath(const char *pathToAppend)
+ {
++  char *s = nullptr;
+   char *pathValue = getenv(LD_LIBRARY_PATH_ENVVAR_NAME);
+   if (nullptr == pathValue || '\0' == *pathValue) {
+-    char *s = PR_smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend);
+-    PR_SetEnv(s);
+-  } else if (!strstr(pathValue, pathToAppend)) {
+-    char *s = PR_smprintf("%s=%s" PATH_SEPARATOR "%s",
++    s = PR_smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend);
++  } else {
++    s = PR_smprintf("%s=%s" PATH_SEPARATOR "%s",
+                     LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend, pathValue);
+-    PR_SetEnv(s);
+   }
+ 
+   // The memory used by PR_SetEnv is not copied to the environment on all
+   // platform, it can be used by reference directly. So we purposely do not
+   // call PR_smprintf_free on s.  Subsequent calls to PR_SetEnv will free
+   // the old memory first.
++  PR_SetEnv(s);
+ }
+ #endif
+ 
+-- 
+cgit v0.10.2
+
diff --git a/projects/instantbird/config b/projects/instantbird/config
index 676bf14..3acde39 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -131,6 +131,7 @@ input_files:
   - filename: Sign-MAR-files-bug-13379.mozpatch
   - filename: Update-load-local-changes-bug-14392-first.mozpatch
   - filename: Update-load-local-changes-bug-16940-second.mozpatch
+  - filename: Updater-Linux-search-path-bug-18900.mozpatch
   - filename: aboutTBUpdateLogo.png
   - filename: trac-16475.mozpatch
   - filename: OSX-package-as-tar.bz2.mozpatch



More information about the tor-commits mailing list