[tor-packagers] torbrowser package on NetBSD

Thomas Klausner wiz at NetBSD.org
Thu Mar 14 22:50:37 UTC 2019


I've updated the very outdated tor-browser package in pkgsrc (on
NetBSD). I used the patches we have for firefox-60esr and one
additional one (see later in this mail).

I have a couple of questions.

There are no tarballs. Please provide some! :)

I used the git tag 'tor-browser-60.5.1esr-8.5-1-build2' but I'm not
sure to which tor-browser version that corresponds. "8.5"? What is the
"-1"? What is the "-build2"? What version should I call that? Is there
a different tag I should have used instead?

tor-browser defaults to using socks port 9150, but tor defaults to
port 9050. Why is that so? Is there an intended way (configure flag?)
to change the tor-browser default?

I've inherited the attached patch from the previous version of the
package. It changes the default directory to one in the user's home,
which makes more sense to me on a Unix system where the program is
installed in a public path. Would this patch be acceptable for
inclusion, or what do you suggest?

I've tested the package by browsing random webpages, some onion sites
and check.torproject.org. Is there anything else I can do test that
the tor-browser package is functional and doesn't leak stuff it

Thanks for any feedback!
-------------- next part --------------
$NetBSD: patch-xpcom_io_TorFileUtils.cpp,v 1.2 2019/02/25 15:32:24 wiz Exp $

--- xpcom/io/TorFileUtils.cpp.orig	2019-02-23 20:01:00.000000000 +0000
+++ xpcom/io/TorFileUtils.cpp
@@ -20,7 +20,17 @@ TorBrowser_GetUserDataDir(nsIFile *aExeF
   nsCOMPtr<nsIFile> tbDataDir;
+  const char *homeDir = getenv("HOME");
+  if (!homeDir || !*homeDir)
+    return NS_ERROR_FAILURE;
+  nsresult rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true,
+                                      getter_AddRefs(tbDataDir));
+  nsAutoCString leafSubdir(NS_LITERAL_CSTRING("TorBrowser-Data"));
+  rv = tbDataDir->AppendNative(leafSubdir);
   nsAutoCString tbDataLeafName(NS_LITERAL_CSTRING("TorBrowser-Data"));
   nsCOMPtr<nsIFile> appRootDir;
   nsresult rv = GetAppRootDir(aExeFile, getter_AddRefs(appRootDir));

More information about the tor-packagers mailing list