summaryrefslogtreecommitdiff
path: root/utils/apparmor/patches/070-python-3.10.patch
diff options
context:
space:
mode:
authorMichal Vasilek <michal.vasilek@nic.cz>2021-11-12 17:02:51 +0100
committerMichal Vasilek <michal.vasilek@nic.cz>2022-01-13 11:59:58 +0100
commitaae551544bcd4c49a203a2ad0406b17bacd1b8cc (patch)
tree40b44c6385f367232392918f08a5dfcc9edf5d9a /utils/apparmor/patches/070-python-3.10.patch
parentdafb96c14837bf133e5215cf65fc7ed1439a375a (diff)
apparmor: cleanup
* replace 020-fix-ss-path.patch with an upstream patch 020-remove-which-dep.patch * remove 030-remove-pynotify2-dep.patch and do not install aa-notify * simplify 060-openwrt-dnsmasq-profile.patch * add two upstream patches for Python 3.10 compatibility * add an upstream patch to move from deprecated distutils which broke the build with Python 3.10+ Signed-off-by: Michal Vasilek <michal.vasilek@nic.cz>
Diffstat (limited to 'utils/apparmor/patches/070-python-3.10.patch')
-rw-r--r--utils/apparmor/patches/070-python-3.10.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/utils/apparmor/patches/070-python-3.10.patch b/utils/apparmor/patches/070-python-3.10.patch
new file mode 100644
index 000000000..8e80dea0c
--- /dev/null
+++ b/utils/apparmor/patches/070-python-3.10.patch
@@ -0,0 +1,81 @@
+From 6cfc6eeec22d3c9ffae413819654359b76680150 Mon Sep 17 00:00:00 2001
+From: John Johansen <john@jjmx.net>
+Date: Fri, 13 Aug 2021 20:13:59 +0000
+Subject: [PATCH] Merge Update abstractions/python and profiles for python 3.10
+
+Add support for python 3.10 in abstractions and profiles.
+
+Fixes: https://gitlab.com/apparmor/apparmor/-/issues/187
+MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/783
+Acked-by: John Johansen <john.johansen@canonical.com>
+(cherry picked from commit 31fda3eee7b1e5f936b31d3578ed596789d5fcce)
+Signed-off-by: John Johansen <john.johansen@canonical.com>
+---
+ profiles/apparmor.d/abstractions/python | 18 +++++++++---------
+ profiles/apparmor.d/lsb_release | 2 +-
+ .../profiles/extras/usr.bin.chromium-browser | 4 ++--
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+--- a/profiles/apparmor.d/abstractions/python
++++ b/profiles/apparmor.d/abstractions/python
+@@ -12,18 +12,18 @@
+
+ abi <abi/3.0>,
+
+- /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/**.{pyc,so} mr,
+- /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/**.{egg,py,pth} r,
+- /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/{site,dist}-packages/ r,
++ /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/**.{pyc,so} mr,
++ /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/**.{egg,py,pth} r,
++ /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/{site,dist}-packages/ r,
+ /usr/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
+
+- /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/**.{pyc,so} mr,
+- /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/**.{egg,py,pth} r,
+- /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/{site,dist}-packages/ r,
+- /usr/local/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
++ /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/**.{pyc,so} mr,
++ /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/**.{egg,py,pth} r,
++ /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/{site,dist}-packages/ r,
++ /usr/local/lib{,32,64}/python3.{1,}[0-9]/lib-dynload/*.so mr,
+
+ # Site-wide configuration
+- /etc/python{2.[4-7],3.[0-9]}/** r,
++ /etc/python{2.[4-7],3.[0-9],3.1[0-9]}/** r,
+
+ # shared python paths
+ /usr/share/{pyshared,pycentral,python-support}/** r,
+@@ -36,7 +36,7 @@
+ /usr/lib/wx/python/*.pth r,
+
+ # python build configuration and headers
+- /usr/include/python{2.[4-7],3.[0-9]}*/pyconfig.h r,
++ /usr/include/python{2.[4-7],3.[0-9],3.1[0-9]}*/pyconfig.h r,
+
+ # Include additions to the abstraction
+ include if exists <abstractions/python.d>
+--- a/profiles/apparmor.d/lsb_release
++++ b/profiles/apparmor.d/lsb_release
+@@ -18,7 +18,7 @@ profile lsb_release {
+ /dev/tty rw,
+
+ /usr/bin/lsb_release r,
+- /usr/bin/python3.[0-9] mr,
++ /usr/bin/python3.{1,}[0-9] mr,
+
+ /etc/debian_version r,
+ /etc/default/apport r,
+--- a/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
++++ b/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
+@@ -267,9 +267,9 @@ profile chromium_browser /usr/lib/@{chro
+ /usr/share/distro-info/** r,
+ /var/lib/dpkg/** r,
+
+- /usr/local/lib/python3.[0-9]/dist-packages/ r,
++ /usr/local/lib/python3.{1,}[0-9]/dist-packages/ r,
+ /usr/bin/ r,
+- /usr/bin/python3.[0-9] mr,
++ /usr/bin/python3.{1,}[0-9] mr,
+ }
+
+ profile sandbox {