canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.39k stars 930 forks source link

LXD snap contains duplicated copies of some python modules #14293

Open simondeziel opened 1 month ago

simondeziel commented 1 month ago

The following Python modules are duplicated between LXD's snap and core24:

$ grep -Fxf <(ls -1 /snap/lxd/current/lib/python3/dist-packages/) <(ls -1 /snap/core24/current/usr/lib/python3/dist-packages/) 
certifi
certifi-2023.11.17.egg-info
chardet
chardet-5.2.0.dist-info
idna
idna-3.6.dist-info
PyYAML-6.0.1.dist-info
requests
requests-2.31.0.egg-info
urllib3
urllib3-2.0.7.dist-info
_yaml
yaml

Ideally, those would be removed from LXD's snap and the PYTHONPATH would be augmented to include the /snap/coreXY/current/usr/lib/python3/dist-packages/. Doing that should avoid issues like https://github.com/canonical/lxd/security/code-scanning/693 and https://github.com/canonical/lxd/security/code-scanning/694

tomponline commented 1 month ago

Sounds like a plan!