You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
3.3 KiB

  1. From 6cfc6eeec22d3c9ffae413819654359b76680150 Mon Sep 17 00:00:00 2001
  2. From: John Johansen <john@jjmx.net>
  3. Date: Fri, 13 Aug 2021 20:13:59 +0000
  4. Subject: [PATCH] Merge Update abstractions/python and profiles for python 3.10
  5. Add support for python 3.10 in abstractions and profiles.
  6. Fixes: https://gitlab.com/apparmor/apparmor/-/issues/187
  7. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/783
  8. Acked-by: John Johansen <john.johansen@canonical.com>
  9. (cherry picked from commit 31fda3eee7b1e5f936b31d3578ed596789d5fcce)
  10. Signed-off-by: John Johansen <john.johansen@canonical.com>
  11. ---
  12. profiles/apparmor.d/abstractions/python | 18 +++++++++---------
  13. profiles/apparmor.d/lsb_release | 2 +-
  14. .../profiles/extras/usr.bin.chromium-browser | 4 ++--
  15. 3 files changed, 12 insertions(+), 12 deletions(-)
  16. --- a/profiles/apparmor.d/abstractions/python
  17. +++ b/profiles/apparmor.d/abstractions/python
  18. @@ -12,18 +12,18 @@
  19. abi <abi/3.0>,
  20. - /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/**.{pyc,so} mr,
  21. - /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/**.{egg,py,pth} r,
  22. - /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/{site,dist}-packages/ r,
  23. + /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/**.{pyc,so} mr,
  24. + /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/**.{egg,py,pth} r,
  25. + /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/{site,dist}-packages/ r,
  26. /usr/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
  27. - /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/**.{pyc,so} mr,
  28. - /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/**.{egg,py,pth} r,
  29. - /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/{site,dist}-packages/ r,
  30. - /usr/local/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
  31. + /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/**.{pyc,so} mr,
  32. + /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/**.{egg,py,pth} r,
  33. + /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/{site,dist}-packages/ r,
  34. + /usr/local/lib{,32,64}/python3.{1,}[0-9]/lib-dynload/*.so mr,
  35. # Site-wide configuration
  36. - /etc/python{2.[4-7],3.[0-9]}/** r,
  37. + /etc/python{2.[4-7],3.[0-9],3.1[0-9]}/** r,
  38. # shared python paths
  39. /usr/share/{pyshared,pycentral,python-support}/** r,
  40. @@ -36,7 +36,7 @@
  41. /usr/lib/wx/python/*.pth r,
  42. # python build configuration and headers
  43. - /usr/include/python{2.[4-7],3.[0-9]}*/pyconfig.h r,
  44. + /usr/include/python{2.[4-7],3.[0-9],3.1[0-9]}*/pyconfig.h r,
  45. # Include additions to the abstraction
  46. include if exists <abstractions/python.d>
  47. --- a/profiles/apparmor.d/lsb_release
  48. +++ b/profiles/apparmor.d/lsb_release
  49. @@ -18,7 +18,7 @@ profile lsb_release {
  50. /dev/tty rw,
  51. /usr/bin/lsb_release r,
  52. - /usr/bin/python3.[0-9] mr,
  53. + /usr/bin/python3.{1,}[0-9] mr,
  54. /etc/debian_version r,
  55. /etc/default/apport r,
  56. --- a/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
  57. +++ b/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
  58. @@ -267,9 +267,9 @@ profile chromium_browser /usr/lib/@{chro
  59. /usr/share/distro-info/** r,
  60. /var/lib/dpkg/** r,
  61. - /usr/local/lib/python3.[0-9]/dist-packages/ r,
  62. + /usr/local/lib/python3.{1,}[0-9]/dist-packages/ r,
  63. /usr/bin/ r,
  64. - /usr/bin/python3.[0-9] mr,
  65. + /usr/bin/python3.{1,}[0-9] mr,
  66. }
  67. profile sandbox {