[Pkg-privacy-maintainers] Bug#805634: jessie-pu: torbrowser-launcher/0.2.2-2~deb8u1
Holger Levsen
holger at layer-acht.org
Sun Jan 3 13:07:01 UTC 2016
Hi,
On Sonntag, 3. Januar 2016, Adam D. Barratt wrote:
> The diff attached to the mail I was replying to has
> -torbrowser-launcher (0.1.9-1+deb8u1) jessie; urgency=high
> +torbrowser-launcher (0.2.2-2) sid; urgency=medium
at first I was thinking to get 0.2.2-2 into stable would be preferred but then I realized that backporting the needed fixes was indeed possible
and probably more reasonable…
> Would it be possible to have a diff that does represent what you're
> planning to upload, please?
sure! (the following still has "UNRELEASED" but thats about it.)
Also, these branches are all tested regularily on
https://jenkins.debian.net/view/torbrowser/
$ git log --oneline debian/0.1.9-1+deb8u1..debian/jessie
0ee180c Document changes in 0.1.9-1+deb8u2 and bump version.
28f68e5 Only convert unicode URLs to strings if they are actually unicode (#205)
aacab8a Force download URLs to be strings and not unicode (#205)
3ab30bc Eek, removed testing code that never should have been committed
2983839 Stop using sha256sums.txt and sha256sums.txt.asc (fixes #180)
fa5d9db Get stable version using torbrowser updater xml
7e1911d Set-torbrowser.start-tor-browser-and-usr.bin.torbrow.patch: new patch, that sets torbrowser.start-tor-browser and usr.bin.torbrowser-
launcher AppArmor profiles to co
f3d8373 AppArmor-allow-Tor-Browser-to-use-shared-libraries-s.patch: new patch, that extends the torbrowser.Browser.firefox AppArmor profile so
that Tor Browser 4.5 and 5.0 c
42c3551 Stop confining start-tor-browser script with AppArmor, and fix profiles to work with TBB 4.5+ (#181)
dd4603c execute ./start-tor-browser.desktop instead of ./Browser/start-tor-browser (#176)
ed905d9 Update location of start-tor-browser for TBB 4.5, and remove accept_links feature #176
$ git diff debian/0.1.9-1+deb8u1..debian/jessie
diff --git a/apparmor/torbrowser.Browser.firefox b/apparmor/torbrowser.Browser.firefox
index 0df7ad9..32c9151 100644
--- a/apparmor/torbrowser.Browser.firefox
+++ b/apparmor/torbrowser.Browser.firefox
@@ -43,14 +43,15 @@
owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/components/*.so mr,
owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/browser/components/*.so mr,
owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/firefox rix,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Data/Browser/profiles.ini r,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Data/Browser/profile.default/ r,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Data/Browser/profile.default/** rwk,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Tor/tor Px,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Desktop/ rw,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Desktop/** rwk,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Downloads/ rw,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Downloads/** rwk,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/TorBrowser/Data/Browser/profiles.ini r,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/TorBrowser/Data/Browser/profile.default/ r,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/TorBrowser/Data/Browser/profile.default/** rwk,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/TorBrowser/Tor/tor Px,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/TorBrowser/Tor/libstdc++.so.6 m,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/Desktop/ rw,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/Desktop/** rwk,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/Downloads/ rw,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/Downloads/** rwk,
/etc/mailcap r,
/etc/mime.types r,
diff --git a/apparmor/torbrowser.start-tor-browser b/apparmor/torbrowser.start-tor-browser
deleted file mode 100644
index 3ca6368..0000000
--- a/apparmor/torbrowser.start-tor-browser
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <tunables/global>
-
-/home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}start-tor-browser {
- #include <abstractions/base>
- #include <abstractions/bash>
- #include <abstractions/fonts>
- #include <abstractions/freedesktop.org>
-
- capability sys_ptrace,
-
-
- /bin/cat rix,
- /bin/bash r,
- /bin/dash rix,
- /bin/grep rix,
- /bin/ln rix,
- /bin/mkdir rix,
- /bin/ps rix,
- /bin/readlink ix,
- /bin/sed rix,
- /dev/pts/[0-9]* rw,
- /dev/tty rw,
- /etc/magic r,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/.config/ w,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/.config/ibus/ w,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/.config/ibus/bus w,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/Browser/firefox Px,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Tor/tor r,
- owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}start-tor-browser r,
- @{PROC}/ r,
- @{PROC}/[0-9]*/status r,
- @{PROC}/[0-9]*/stat r,
- @{PROC}/[0-9]*/cmdline r,
- @{PROC}/meminfo r,
- @{PROC}/sys/kernel/pid_max r,
- @{PROC}/tty/drivers r,
- @{PROC}/uptime r,
- /{,var/}run/utmp r,
- /dev/ptmx rw,
- /usr/bin/dirname rix,
- /usr/bin/expr rix,
- /usr/bin/file rix,
- /usr/bin/getconf rix,
- /usr/bin/id rix,
- /usr/bin/ldd rix,
- /usr/bin/realpath ix,
- /usr/bin/zenity ix,
- /usr/lib{,32,64}/** mr,
- /usr/share/file/magic.mgc r,
- /usr/share/file/magic/ r,
- /usr/share/zenity/zenity.ui r,
-
-}
diff --git a/apparmor/usr.bin.torbrowser-launcher b/apparmor/usr.bin.torbrowser-launcher
index 424aa5a..3eb61f9 100644
--- a/apparmor/usr.bin.torbrowser-launcher
+++ b/apparmor/usr.bin.torbrowser-launcher
@@ -27,7 +27,7 @@
@{HOME}/.local/share/torbrowser/ rw,
@{HOME}/.local/share/torbrowser/** mrwk,
@{HOME}/.local/share/torbrowser/gnupg_homedir/* l,
- @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}start-tor-browser Px,
+ @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/start-tor-browser.desktop Ux,
@{PROC}/ r,
@{PROC}/[0-9]*/{cmdline,mountinfo,stat,status} r,
diff --git a/debian/changelog b/debian/changelog
index 0997511..9567bb8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,29 @@
+torbrowser-launcher (0.1.9-1+deb8u2) UNRELEASED; urgency=medium
+
+ * Merge the following patches from between debian/0.1.9-1+deb8u1..debian/sid
+ 3d9f4ed Update location of start-tor-browser for TBB 4.5, and remove
+ accept_links feature #176
+ 5f833d7 execute ./start-tor-browser.desktop instead of
+ ./Browser/start-tor-browser (#176)
+ 39901c6 Stop confining start-tor-browser script with AppArmor, and fix
+ profiles to work with TBB 4.5+ (#181)
+ 803f34c AppArmor-allow-Tor-Browser-to-use-shared-libraries-s.patch:
+ new patch, that extends the torbrowser.Browser.firefox AppArmor
+ profile
+ 70c750e Set-torbrowser.start-tor-browser-and-usr.bin.torbrow.patch:
+ new patch, that sets torbrowser.start-tor-browser and
+ usr.bin.torbrowser-lau
+ e07beac Get stable version using torbrowser updater xml
+ ab141ee Stop using sha256sums.txt and sha256sums.txt.asc (fixes #180)
+ 7829f3e Ensure that the version is a string, not unicode (#205)
+ 7371fdc Eek, removed testing code that never should have been committed
+ 3155723 Force download URLs to be strings and not unicode (#205)
+ 513b3a9 Only convert unicode URLs to strings if they are actually unicode
+ (#205)
+ * Version bump to 0.1.9-1+deb8u2.
+
+ -- Holger Levsen <holger at debian.org> Sat, 05 Dec 2015 17:19:11 +0100
+
torbrowser-launcher (0.1.9-1+deb8u1) jessie; urgency=high
* Apply 3d9f4ed and 5f833d7 from 0.2.0 upstream release to deal with changed
diff --git a/debian/patches/AppArmor-allow-Tor-Browser-to-use-shared-libraries-s.patch b/debian/patches/AppArmor-allow-Tor-Browser-to-use-
shared-libraries-s.patch
new file mode 100644
index 0000000..962d2c9
--- /dev/null
+++ b/debian/patches/AppArmor-allow-Tor-Browser-to-use-shared-libraries-s.patch
@@ -0,0 +1,25 @@
+From: intrigeri <intrigeri at boum.org>
+Date: Wed, 12 Aug 2015 08:33:41 +0000
+Bug: https://github.com/micahflee/torbrowser-launcher/issues/181#issuecomment-130213776
+Subject: AppArmor: allow Tor Browser to use shared libraries shipped in the
+ bundled Tor directory.
+
+This makes Tor Browser 4.5 and 5.0 start fine, at least when run with
+./start-tor-browser.desktop (since torbrowser-launcher itself is broken,
+see Debian#793791).
+---
+ apparmor/torbrowser.Browser.firefox | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apparmor/torbrowser.Browser.firefox b/apparmor/torbrowser.Browser.firefox
+index 7e68a08..c2de426 100644
+--- a/apparmor/torbrowser.Browser.firefox
++++ b/apparmor/torbrowser.Browser.firefox
+@@ -47,6 +47,7 @@
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Data/Browser/profile.default/ r,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Data/Browser/profile.default/** rwk,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Tor/tor Px,
++ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/TorBrowser/,}Tor/*.so{,.[0-9]*} mr,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Desktop/ rw,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Desktop/** rwk,
+ owner @{HOME}/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}Downloads/ rw,
diff --git a/debian/patches/Set-torbrowser.start-tor-browser-and-usr.bin.torbrow.patch b/debian/patches/Set-torbrowser.start-tor-browser-and-
usr.bin.torbrow.patch
new file mode 100644
index 0000000..6160697
--- /dev/null
+++ b/debian/patches/Set-torbrowser.start-tor-browser-and-usr.bin.torbrow.patch
@@ -0,0 +1,40 @@
+From: intrigeri <intrigeri at boum.org>
+Date: Wed, 12 Aug 2015 09:21:28 +0000
+Forwarded: not-needed
+Bug: https://github.com/micahflee/torbrowser-launcher/issues/181
+Subject: Set torbrowser.start-tor-browser and usr.bin.torbrowser-launcher
+ AppArmor profiles to complain mode.
+
+They have been broken for three months now. Patches have been discussed on
+GitHub for a while, but no clean solution has been implemented yet,
+so for the time being, let's make torbrowser-launcher *work*.
+---
+ apparmor/torbrowser.start-tor-browser | 2 +-
+ apparmor/usr.bin.torbrowser-launcher | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/apparmor/torbrowser.start-tor-browser b/apparmor/torbrowser.start-tor-browser
+index 49487dc..4148c06 100644
+--- a/apparmor/torbrowser.start-tor-browser
++++ b/apparmor/torbrowser.start-tor-browser
+@@ -1,6 +1,6 @@
+ #include <tunables/global>
+
+-/home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}start-tor-browser {
++/home/*/.local/share/torbrowser/tbb/{i686,x86_64}/tor-browser_*/{Browser/,}start-tor-browser flags=(complain) {
+ #include <abstractions/base>
+ #include <abstractions/bash>
+ #include <abstractions/fonts>
+diff --git a/apparmor/usr.bin.torbrowser-launcher b/apparmor/usr.bin.torbrowser-launcher
+index b8e081e..80aace4 100644
+--- a/apparmor/usr.bin.torbrowser-launcher
++++ b/apparmor/usr.bin.torbrowser-launcher
+@@ -1,7 +1,7 @@
+ # Last Modified: Thu Jan 2 15:12:38 2014
+ #include <tunables/global>
+
+-/usr/bin/torbrowser-launcher {
++/usr/bin/torbrowser-launcher flags=(complain) {
+ #include <abstractions/base>
+ #include <abstractions/nameservice>
+ #include <abstractions/python>
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..90b543f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+AppArmor-allow-Tor-Browser-to-use-shared-libraries-s.patch
+Set-torbrowser.start-tor-browser-and-usr.bin.torbrow.patch
diff --git a/setup.py b/setup.py
index 0e47152..3211ea3 100644
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,6 @@ if distro != 'Ubuntu':
# we're not in a virtualenv, so we can probably write to /etc
datafiles += [('/etc/apparmor.d/', [
'apparmor/torbrowser.Browser.firefox',
- 'apparmor/torbrowser.start-tor-browser',
'apparmor/torbrowser.Tor.tor',
'apparmor/usr.bin.torbrowser-launcher'])]
diff --git a/share/torbrowser-launcher/version b/share/torbrowser-launcher/version
index 1a03094..3b781ac 100644
--- a/share/torbrowser-launcher/version
+++ b/share/torbrowser-launcher/version
@@ -1 +1 @@
-0.1.9
+0.1.9-1+deb8u2
diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 505a4b3..86243b0 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@ -119,10 +119,9 @@ class Common:
self.paths['tarball_filename'] = tarball_filename
# sig
- self.paths['sha256_file'] = tbb_cache+'/download/sha256sums.txt'
- self.paths['sha256_sig_file'] = tbb_cache+'/download/sha256sums.txt.asc'
- self.paths['sha256_url'] = '{0}torbrowser/'+tbb_version+'/sha256sums.txt'
- self.paths['sha256_sig_url'] = '{0}torbrowser/'+tbb_version+'/sha256sums.txt.asc'
+ self.paths['sig_url'] = '{0}torbrowser/'+tbb_version+'/'+tarball_filename+'.asc'
+ self.paths['sig_file'] = tbb_cache+'/download/'+tarball_filename+'.asc'
+ self.paths['sig_filename'] = tarball_filename+'.asc'
else:
self.paths = {
'dirs': {
@@ -141,11 +140,12 @@ class Common:
'download_dir': tbb_cache+'/download',
'gnupg_homedir': tbb_local+'/gnupg_homedir',
'settings_file': tbb_config+'/settings',
- 'update_check_url': 'https://www.torproject.org/projects/torbrowser/RecommendedTBBVersions',
- 'update_check_file': tbb_cache+'/download/RecommendedTBBVersions',
+ 'update_check_url': 'https://dist.torproject.org/torbrowser/update_2/release/Linux_x86_64-gcc3/x/en-US',
+ 'update_check_file': tbb_cache+'/download/release.xml',
'tbb': {
'dir': tbb_local+'/tbb/'+self.architecture,
- 'start': tbb_local+'/tbb/'+self.architecture+'/tor-browser_'+self.language+'/start-tor-browser',
+ 'dir_tbb': tbb_local+'/tbb/'+self.architecture+'/tor-browser_'+self.language,
+ 'start': tbb_local+'/tbb/'+self.architecture+'/tor-browser_'+self.language+'/start-tor-browser.desktop',
'versions': tbb_local+'/tbb/'+self.architecture+'/tor-browser_'+self.language+'/Browser/TorBrowser/Docs/sources/versions',
},
}
@@ -198,8 +198,7 @@ class Common:
'check_for_updates': False,
'modem_sound': False,
'last_update_check_timestamp': 0,
- 'mirror': self.default_mirror,
- 'accept_links': False
+ 'mirror': self.default_mirror
}
if os.path.isfile(self.paths['settings_file']):
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index 00bc5a4..2f17f2c 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -26,7 +26,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
"""
-import os, subprocess, time, json, tarfile, hashlib, lzma, threading, re
+import os, subprocess, time, json, tarfile, hashlib, lzma, threading, re, unicodedata
from twisted.internet import reactor
from twisted.web.client import Agent, RedirectAgent, ResponseDone, ResponseFailed
from twisted.web.http_headers import Headers
@@ -34,6 +34,8 @@ from twisted.internet.protocol import Protocol
from twisted.internet.ssl import ClientContextFactory
from twisted.internet.error import DNSLookupError
+import xml.etree.ElementTree as ET
+
import OpenSSL
import pygtk
@@ -155,8 +157,7 @@ class Launcher:
print _('TBB is out of date, attempting to upgrade to {0}'.format(latest_version))
# there is a tbb upgrade available
self.set_gui('task', _("Your Tor Browser is out of date. Upgrading from {0} to {1}.".format(installed_version,
latest_version)),
- ['download_sha256',
- 'download_sha256_sig',
+ ['download_sig',
'download_tarball',
'verify',
'extract',
@@ -169,8 +170,7 @@ class Launcher:
else:
print _('TBB is not installed, attempting to install {0}'.format(latest_version))
self.set_gui('task', _("Downloading and installing Tor Browser for the first time."),
- ['download_sha256',
- 'download_sha256_sig',
+ ['download_sig',
'download_tarball',
'verify',
'extract',
@@ -315,13 +315,9 @@ class Launcher:
print _('Checking to see if update is needed')
self.attempt_update()
- elif task == 'download_sha256':
- print _('Downloading'), self.common.paths['sha256_url'].format(self.common.settings['mirror'])
- self.download('signature', self.common.paths['sha256_url'], self.common.paths['sha256_file'])
-
- elif task == 'download_sha256_sig':
- print _('Downloading'), self.common.paths['sha256_sig_url'].format(self.common.settings['mirror'])
- self.download('signature', self.common.paths['sha256_sig_url'], self.common.paths['sha256_sig_file'])
+ elif task == 'download_sig':
+ print _('Downloading'), self.common.paths['sig_url'].format(self.common.settings['mirror'])
+ self.download('signature', self.common.paths['sig_url'], self.common.paths['sig_file'])
elif task == 'download_tarball':
print _('Downloading'), self.common.paths['tarball_url'].format(self.common.settings['mirror'])
@@ -439,8 +435,13 @@ class Launcher:
self.current_download_path = path
self.current_download_url = url
- # initialize the progress bar
mirror_url = url.format(self.common.settings['mirror'])
+
+ # convert mirror_url from unicode to string, if needed (#205)
+ if isinstance(mirror_url, unicode):
+ mirror_url = unicodedata.normalize('NFKD', mirror_url).encode('ascii','ignore')
+
+ # initialize the progress bar
self.progressbar.set_fraction(0)
self.progressbar.set_text(_('Downloading {0}').format(name))
self.progressbar.show()
@@ -492,38 +493,19 @@ class Launcher:
subprocess.Popen([self.common.paths['tbl_bin']])
self.destroy(False)
+ def get_stable_version(self):
+ tree = ET.parse(self.common.paths['update_check_file'])
+ for up in tree.getroot():
+ if up.tag == 'update' and up.attrib['appVersion']:
+ return up.attrib['appVersion']
+ return None
+
def attempt_update(self):
# load the update check file
try:
- versions = json.load(open(self.common.paths['update_check_file']))
- latest = None
-
- # filter linux versions
- valid = []
- for version in versions:
- if '-Linux' in version:
- valid.append(str(version))
- valid.sort()
- if len(valid):
- versions = valid
-
- if len(versions) == 1:
- latest = versions.pop()
- else:
- stable = []
- # remove alphas/betas
- for version in versions:
- if not re.search(r'a\d-Linux', version) and not re.search(r'b\d-Linux', version):
- stable.append(version)
- if len(stable):
- latest = stable.pop()
- else:
- latest = versions.pop()
-
+ latest = self.get_stable_version()
if latest:
latest = str(latest)
- if latest.endswith('-Linux'):
- latest = latest.rstrip('-Linux')
self.common.settings['latest_version'] = latest
self.common.settings['last_update_check_timestamp'] = int(time.time())
@@ -550,16 +532,13 @@ class Launcher:
self.progressbar.set_text(_('Verifying Signature'))
self.progressbar.show()
+ # verify the PGP signature
verified = False
- # check the sha256 file's sig, and also take the sha256 of the tarball and compare
- p = subprocess.Popen(['/usr/bin/gpg', '--homedir', self.common.paths['gnupg_homedir'], '--verify',
self.common.paths['sha256_sig_file']])
+ FNULL = open(os.devnull, 'w')
+ p = subprocess.Popen(['/usr/bin/gpg', '--homedir', self.common.paths['gnupg_homedir'], '--verify', self.common.paths['sig_file']],
stdout=FNULL, stderr=subprocess.STDOUT)
self.pulse_until_process_exits(p)
if p.returncode == 0:
- # compare with sha256 of the tarball
- tarball_sha256 = hashlib.sha256(open(self.common.paths['tarball_file'], 'r').read()).hexdigest()
- for line in open(self.common.paths['sha256_file'], 'r').readlines():
- if tarball_sha256.lower() in line.lower() and self.common.paths['tarball_filename'] in line:
- verified = True
+ verified = True
if verified:
self.run_task()
@@ -634,10 +613,7 @@ class Launcher:
gtk.main_iteration_do(True)
# run Tor Browser
- if self.common.settings['accept_links']:
- subprocess.call([self.common.paths['tbb']['start'], '-allow-remote'] + self.url_list)
- else:
- subprocess.call([self.common.paths['tbb']['start']])
+ subprocess.call([self.common.paths['tbb']['start']], cwd=self.common.paths['tbb']['dir_tbb'])
if run_next_task:
self.run_task()
@@ -674,4 +650,3 @@ class Launcher:
delattr(self, 'current_download_url')
if reactor.running:
reactor.stop()
-
diff --git a/torbrowser_launcher/settings.py b/torbrowser_launcher/settings.py
index a29c41a..00e521d 100644
--- a/torbrowser_launcher/settings.py
+++ b/torbrowser_launcher/settings.py
@@ -95,15 +95,6 @@ class Settings:
self.update_checkbox.set_active(False)
self.update_checkbox.show()
- # accept links
- self.accept_links = gtk.CheckButton(_("Allow opening links with Tor Browser\n(this doesn't work if you use Firefox)"))
- self.settings_box.pack_start(self.accept_links, True, True, 0)
- if self.common.settings['accept_links']:
- self.accept_links.set_active(True)
- else:
- self.accept_links.set_active(False)
- self.accept_links.show()
-
# modem sound
self.modem_checkbox = gtk.CheckButton(_("Play modem sound, because Tor is slow :]"))
self.settings_box.pack_start(self.modem_checkbox, True, True, 0)
@@ -222,7 +213,6 @@ class Settings:
# checkbox options
self.common.settings['update_over_tor'] = self.tor_update_checkbox.get_active()
self.common.settings['check_for_updates'] = self.update_checkbox.get_active()
- self.common.settings['accept_links'] = self.accept_links.get_active()
self.common.settings['modem_sound'] = self.modem_checkbox.get_active()
# figure out the selected mirror
@@ -237,5 +227,3 @@ class Settings:
def destroy(self, widget, data=None):
gtk.main_quit()
-
-
cheers,
Holger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-privacy-maintainers/attachments/20160103/84cec485/attachment-0001.sig>
More information about the Pkg-privacy-maintainers
mailing list