[Pkg-privacy-commits] [Git][pkg-privacy-team/torbrowser-launcher][debian/sid] 2 commits: d/patches: Update patch 03 and add patch 08-10

Roger Shimizu (@rosh) rosh at debian.org
Sat May 15 15:33:48 BST 2021



Roger Shimizu pushed to branch debian/sid at Privacy Maintainers / torbrowser-launcher


Commits:
e58c938f by Roger Shimizu at 2021-04-26T00:48:01+09:00
d/patches: Update patch 03 and add patch 08-10

- Update patch 03 to adapt python >= 3.8
- Add patch 08 to update apparmor profile.
- Add patch 09 to fix failure in detect installed torbrowser.
- Add patch 10 to enable keyboard input to communicate with ibus.

Closes: #980155, #983198, #976084

- - - - -
f6b0eee1 by Roger Shimizu at 2021-05-15T23:32:13+09:00
Prepare to release 0.3.3-4

- - - - -


7 changed files:

- debian/changelog
- + debian/patches/03-Remove-use-of-deprecated-platform.dist-fixes-446.patch
- − debian/patches/03-Update-setup.py.patch
- + debian/patches/08-Update-apparmor-profile.patch
- + debian/patches/09-fix-failure-in-detect-installed-torbrowser.patch
- + debian/patches/10-keyboard-input-need-this-patch-to-communicate-with-ibu.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,17 @@
+torbrowser-launcher (0.3.3-4) unstable; urgency=medium
+
+  * debian/control:
+    - Update homepage.
+  * debian/patches:
+    - Update patch 03 to adapt python >= 3.8
+    - Add patch 08 to update apparmor profile (Closes: #980155).
+    - Add patch 09 to fix failure in detect installed torbrowser.
+      (Closes: #983198)
+    - Add patch 10 to enable keyboard input to communicate with ibus.
+      (Closes: #976084)
+
+ -- Roger Shimizu <rosh at debian.org>  Sat, 15 May 2021 23:32:12 +0900
+
 torbrowser-launcher (0.3.3-3) unstable; urgency=medium
 
   * debian/patches:


=====================================
debian/patches/03-Remove-use-of-deprecated-platform.dist-fixes-446.patch
=====================================
@@ -0,0 +1,67 @@
+From: Milkey Mouse <milkeymouse at meme.institute>
+Date: Sun, 10 May 2020 16:47:50 -0700
+Subject: Remove use of deprecated platform.dist() (fixes #446)
+Forwarded: https://github.com/micahflee/torbrowser-launcher/pull/470
+
+platform.dist was deprecated a while ago and finally removed in Python
+3.8. It was only used for a workaround for issue #128 (and #215) which
+is no longer necessary, so just remove the use altogether.
+---
+ setup.py | 37 ++++++++++++++++---------------------
+ 1 file changed, 16 insertions(+), 21 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 1649eb4..5f58f82 100644
+--- a/setup.py
++++ b/setup.py
+@@ -34,9 +34,6 @@ from distutils.core import setup
+ 
+ SHARE = "share"
+ 
+-# detect linux distribution
+-distro = platform.dist()[0]
+-
+ 
+ def file_list(path):
+     files = []
+@@ -72,24 +69,22 @@ for root, dirs, files in os.walk(SHARE):
+     if files:
+         datafiles.append((root, [os.path.join(root, f) for f in files]))
+ 
+-# disable shipping apparmor profiles until they work in ubuntu (#128)
+-if distro != "Ubuntu":
+-    if not hasattr(sys, "real_prefix"):
+-        # we're not in a virtualenv, so we can probably write to /etc
+-        datafiles += [
+-            (
+-                "/etc/apparmor.d/",
+-                ["apparmor/torbrowser.Browser.firefox", "apparmor/torbrowser.Tor.tor"],
+-            ),
+-            (
+-                "/etc/apparmor.d/local/",
+-                [
+-                    "apparmor/local/torbrowser.Browser.firefox",
+-                    "apparmor/local/torbrowser.Tor.tor",
+-                ],
+-            ),
+-            ("/etc/apparmor.d/tunables/", ["apparmor/tunables/torbrowser"]),
+-        ]
++if not hasattr(sys, "real_prefix"):
++    # we're not in a virtualenv, so we can probably write to /etc
++    datafiles += [
++        (
++            "/etc/apparmor.d/",
++            ["apparmor/torbrowser.Browser.firefox", "apparmor/torbrowser.Tor.tor"],
++        ),
++        (
++            "/etc/apparmor.d/local/",
++            [
++                "apparmor/local/torbrowser.Browser.firefox",
++                "apparmor/local/torbrowser.Tor.tor",
++            ],
++        ),
++        ("/etc/apparmor.d/tunables/", ["apparmor/tunables/torbrowser"]),
++    ]
+ 
+ datafiles += [(os.path.dirname(f), [f]) for f in create_mo_files()]
+ 


=====================================
debian/patches/03-Update-setup.py.patch deleted
=====================================
@@ -1,30 +0,0 @@
-From: Carl Joseph Hirner III <k.j.hirner.wisdom at gmail.com>
-Date: Sat, 16 Nov 2019 02:08:30 -0800
-Subject: Update setup.py
-
-modified to enable getting distro for python3.8 while maintaining ability to use python3.7 and below
----
- setup.py | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 1649eb4..2aa08b8 100644
---- a/setup.py
-+++ b/setup.py
-@@ -33,9 +33,13 @@ import subprocess
- from distutils.core import setup
- 
- SHARE = "share"
--
--# detect linux distribution
--distro = platform.dist()[0]
-+try:
-+    #for distributions that use python3.8
-+    import distro as d
-+    distro=d.LinuxDistribution()._os_release_info['name']
-+except:
-+    # detect linux distribution on python >=3.7
-+    distro = platform.dist()[0]
- 
- 
- def file_list(path):


=====================================
debian/patches/08-Update-apparmor-profile.patch
=====================================
@@ -0,0 +1,29 @@
+From: Roger Shimizu <rosh at debian.org>
+Date: Sun, 25 Apr 2021 22:51:12 +0900
+Subject: Update apparmor profile
+
+Closes: #980155
+---
+ apparmor/torbrowser.Browser.firefox | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/apparmor/torbrowser.Browser.firefox b/apparmor/torbrowser.Browser.firefox
+index 57c0359..095b110 100644
+--- a/apparmor/torbrowser.Browser.firefox
++++ b/apparmor/torbrowser.Browser.firefox
+@@ -90,6 +90,7 @@ profile torbrowser_firefox @{torbrowser_firefox_executable} {
+   /usr/share/gnome/applications/ r,
+   /usr/share/gnome/applications/kde4/ r,
+   /usr/share/poppler/cMap/ r,
++  /etc/xdg/mimeapps.list r,
+ 
+   # Distribution homepage
+   /usr/share/homepage/ r,
+@@ -121,6 +122,7 @@ profile torbrowser_firefox @{torbrowser_firefox_executable} {
+   deny @{HOME}/.cache/fontconfig/** rw,
+   deny @{HOME}/.config/gtk-2.0/ rw,
+   deny @{HOME}/.config/gtk-2.0/** rw,
++  deny @{PROC}/@{pid}/cgroup r,
+   deny @{PROC}/@{pid}/net/route r,
+   deny /sys/devices/system/cpu/cpufreq/policy[0-9]*/cpuinfo_max_freq r,
+   deny /sys/devices/system/cpu/*/cache/index[0-9]*/size r,


=====================================
debian/patches/09-fix-failure-in-detect-installed-torbrowser.patch
=====================================
@@ -0,0 +1,47 @@
+From: Marcelo Soares Mota <motasmarcelo at gmail.com>
+Date: Sat, 20 Feb 2021 21:14:12 -0300
+Subject: fix failure in detect installed torbrowser
+
+I believe i found an issue with the launcher (somehow related with #842021)
+
+It happens that though the launcher works it doesn't detect torbrowser
+as installed. It causes two issues:
+  - The 'Settings' window points status as Not Installed;
+  - The 'Browser launcher' keeps running the routines to download and
+verify the 'first installation'.
+
+I realized that reload the settings after rebuilding paths makes the
+launcher works as expected.
+
+Plus, load_settings() is not checking changes at 'installed' directive
+to rewrite the settings file ('settings.json').
+
+Closes: #983198
+---
+ torbrowser_launcher/common.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
+index e8e8d39..fb8ad50 100644
+--- a/torbrowser_launcher/common.py
++++ b/torbrowser_launcher/common.py
+@@ -64,6 +64,7 @@ class Common(object):
+         self.load_mirrors()
+         self.load_settings()
+         self.build_paths()
++        self.load_settings()
+         self.mkdir(self.paths["download_dir"])
+         self.mkdir(self.paths["tbb"]["dir"])
+         self.init_gnupg()
+@@ -371,7 +372,10 @@ class Common(object):
+             resave = False
+ 
+             # detect installed
+-            settings["installed"] = os.path.isfile(self.paths["tbb"]["start"])
++            installed = os.path.isfile(self.paths["tbb"]["start"])
++            if settings["installed"] != installed:
++                settings["installed"] = installed
++                resave = True
+ 
+             # make sure settings file is up-to-date
+             for setting in default_settings:


=====================================
debian/patches/10-keyboard-input-need-this-patch-to-communicate-with-ibu.patch
=====================================
@@ -0,0 +1,22 @@
+From: Roger Shimizu <rosh at debian.org>
+Date: Mon, 26 Apr 2021 00:27:32 +0900
+Subject: keyboard input need this patch to communicate with ibus.
+
+Closes: #976084
+---
+ apparmor/torbrowser.Browser.firefox | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/apparmor/torbrowser.Browser.firefox b/apparmor/torbrowser.Browser.firefox
+index 095b110..f1368db 100644
+--- a/apparmor/torbrowser.Browser.firefox
++++ b/apparmor/torbrowser.Browser.firefox
+@@ -150,5 +150,8 @@ profile torbrowser_firefox @{torbrowser_firefox_executable} {
+   # Yubikey NEO also needs this:
+   /sys/devices/**/hidraw/hidraw*/uevent r,
+ 
++  # ibus
++  owner @{HOME}/.config/ibus/bus/* r,
++
+   #include <local/torbrowser.Browser.firefox>
+ }


=====================================
debian/patches/series
=====================================
@@ -12,8 +12,11 @@ po/11-Add-Chinese-Traditional-translation.patch
 po/12-Add-Czech-translation-to-desktop-files.patch
 01-show-gui-only-if-tbb-not-installed.patch
 02-remove-double-common-assignment.patch
-03-Update-setup.py.patch
+03-Remove-use-of-deprecated-platform.dist-fixes-446.patch
 04-Set-language-from-LC_MESSAGES-not-LC_CTYPE.patch
 05-Fix-use-case-that-enforce-install-of-EN-version-on-n.patch
 06-Fix-language-fallback-for-Chinese-Hong-Kong.patch
 07-Use-gpg-instead-of-gpg2.patch
+08-Update-apparmor-profile.patch
+09-fix-failure-in-detect-installed-torbrowser.patch
+10-keyboard-input-need-this-patch-to-communicate-with-ibu.patch



View it on GitLab: https://salsa.debian.org/pkg-privacy-team/torbrowser-launcher/-/compare/34e50bcfcdb6f619331d20531bb55f695abbe7c0...f6b0eee14fbcdd77474ff0ad4d9093b94567fd48

-- 
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/torbrowser-launcher/-/compare/34e50bcfcdb6f619331d20531bb55f695abbe7c0...f6b0eee14fbcdd77474ff0ad4d9093b94567fd48
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20210515/8206f257/attachment-0001.htm>


More information about the Pkg-privacy-commits mailing list