From d05fed16d4f4d4c3563e3950f0e8a8839b7ebc81 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Fri, 17 Jun 2016 07:53:31 -0700 Subject: [PATCH 1/4] add python3-nose for ubuntu 16.04 --- BUILD.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.md b/BUILD.md index 6c25c76e..ad992050 100644 --- a/BUILD.md +++ b/BUILD.md @@ -27,7 +27,7 @@ After that you can try both the CLI and the GUI version of OnionShare: A script to build a .deb package and install OnionShare easily is also provided for your convenience: ```sh -sudo apt-get install -y build-essential fakeroot python3-all python3-stdeb dh-python python-nautilus +sudo apt-get install -y build-essential fakeroot python3-all python3-stdeb dh-python python-nautilus python3-nose ./install/build_deb.sh sudo dpkg -i deb_dist/onionshare_*.deb ``` From c74d8929681f1e6555d8c54ad9831b725e5fea47 Mon Sep 17 00:00:00 2001 From: anonym Date: Thu, 22 Sep 2016 11:25:42 +0200 Subject: [PATCH 2/4] Try to get the Tor ControlPort from the environment. ... via the TOR_CONTROL_PORT variable. If set, onionshare will only try this port. --- onionshare/onion.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/onionshare/onion.py b/onionshare/onion.py index 5370fe2d..2bfd4888 100644 --- a/onionshare/onion.py +++ b/onionshare/onion.py @@ -57,7 +57,11 @@ class Onion(object): # connect to the tor controlport found_tor = False self.c = None - ports = [9151, 9153, 9051] + env_port = os.environ.get('TOR_CONTROL_PORT') + if env_port: + ports = [int(env_port)] + else: + ports = [9151, 9153, 9051] for port in ports: try: self.c = Controller.from_port(port=port) From 4f464aaf2c84fc88d330ad31f1276bdc24b2b3ab Mon Sep 17 00:00:00 2001 From: xSmurf Date: Wed, 28 Sep 2016 17:24:28 +0000 Subject: [PATCH 3/4] Only check if we are in the sys prefix but not the actual executable name as this could be renamed or wrapped --- onionshare/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare/helpers.py b/onionshare/helpers.py index aaa1c999..33a46ce7 100644 --- a/onionshare/helpers.py +++ b/onionshare/helpers.py @@ -34,7 +34,7 @@ def get_resource_path(filename): systemwide, and whether regardless of platform """ p = get_platform() - if p == 'Linux' and sys.argv and sys.argv[0].startswith('/usr/bin/onionshare'): + if p == 'Linux' and sys.argv and sys.argv[0].startswith(sys.prefix): # OnionShare is installed systemwide in Linux resources_dir = os.path.join(sys.prefix, 'share/onionshare') elif getattr(sys, 'frozen', False): # Check if app is "frozen" with cx_Freeze From ae760a15c81fa268981751be3cfe6383aa85d565 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 13 Nov 2016 13:07:14 -0800 Subject: [PATCH 4/4] Update changelog and version bump to 0.9.2 --- CHANGELOG.md | 5 +++++ resources/version.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22254631..58ac90d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # OnionShare Changelog +## 0.9.2 (Linux only) + +* Looks for `TOR_CONTROL_PORT` environment variable, to help Tails integration +* Change how OnionShare checks to see if it's installed system-wide, to help Subgraph OS integration + ## 0.9.1 * Added Nautilus extension, so you can right-click on a file and choose "Share via OnionShare", thanks to Subgraph developers diff --git a/resources/version.txt b/resources/version.txt index f374f666..2003b639 100644 --- a/resources/version.txt +++ b/resources/version.txt @@ -1 +1 @@ -0.9.1 +0.9.2