mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
Currently snaps that use python3.10 from core22 will fail on older
releases of ubuntu:
```
$ sudo snap install test-snapd-sh-core22
$ test-snapd-sh-core22.sh -c 'python3 -c "import ssl"'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.10/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: /usr/lib/python3.10/lib-dynload/_ssl.cpython-310-x86_64-linux-gnu.so: failed to map segment from shared object
```
It turns out our apparmor template only allows:
```
/usr/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
```
so anything beyond `python3.9` will not work. This commit adds a
regression test and allows for `/python3.[0-9]*/` to fix the
issue.