You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When that's a symlink to the system Python, AppArmor will deny execution.
This is similar to what happened with the SecureDrop Client 0.5.0 release: a build environment discrepancy caused the Python binary to be symlinked, which caused AppArmor denials. At the time this was resolved with a hotfix release; see freedomofpress/securedrop-client#1367
Is there a difference in how we use dh-virtualenv between Bullseye and Buster, or a difference in behavior in the versions used to build the different packages?
The text was updated successfully, but these errors were encountered:
Just for reference, this was a change in the new version of virtualenv included in bullseye.
Compare (buster):
root@fd180608f788:/# python3 -m virtualenv -p python3 test && tree test/bin | grep python
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
/usr/lib/python3/dist-packages/virtualenv.py:1091: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
New python executable in /test/bin/python3
Also creating executable in /test/bin/python
Installing setuptools, pip, wheel...done.
|-- python -> python3
|-- python-config
|-- python3
|-- python3.7 -> python3
nothing to do with packaging, just one of those subtle changes when everything gets upgraded. Updating the apparmor profile seems like the correct fix to me.
Note the contents of this package:
https://apt-test.freedom.press/pool/nightlies/s/securedrop-client/securedrop-client_0.7.0-dev-20220616-215030%2Bbullseye_all.deb
In contrast, note the contents of the
buster
version:https://apt-test.freedom.press/pool/nightlies/s/securedrop-client/securedrop-client_0.7.0-dev-20220616-213732%2Bbuster_all.deb
In short, the Bullseye version symlinks to the system Python, while the Buster version links to a binary that's shipped with the package itself.
Our AppArmor rules for the
securedrop-client
binary just specify thepython3
binary that's part of/opt
:https://github.com/freedomofpress/securedrop-client/blob/7357a268fa797cdefce3a92b2ad0b43834831700/files/usr.bin.securedrop-client#L23
When that's a symlink to the system Python, AppArmor will deny execution.
This is similar to what happened with the SecureDrop Client 0.5.0 release: a build environment discrepancy caused the Python binary to be symlinked, which caused AppArmor denials. At the time this was resolved with a hotfix release; see freedomofpress/securedrop-client#1367
Is there a difference in how we use
dh-virtualenv
between Bullseye and Buster, or a difference in behavior in the versions used to build the different packages?The text was updated successfully, but these errors were encountered: