Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not teleport compiled Python code when running dz.ConvertDev on Qubes #723

Closed
apyrgio opened this issue Feb 20, 2024 · 0 comments · Fixed by #743
Closed

Do not teleport compiled Python code when running dz.ConvertDev on Qubes #723

apyrgio opened this issue Feb 20, 2024 · 0 comments · Fixed by #743
Labels
bug Something isn't working development Development-focused changes P:Qubes QubesOS integration

Comments

@apyrgio
Copy link
Contributor

apyrgio commented Feb 20, 2024

Our dz.ConvertDev Qubes policy, which runs in a disposable qube, expects a Python zipfile. This zipfile is created in the dev qube where the ./dev_scripts/dangerzone* command runs, and it contains the Python compiled files for the dangerzone.conversion module.

The problem here is that the disposable qube and the main qube may have different Python versions. This can happen if e.g., the dev qube is based on Fedora 38 (Python 3.11), and the disposable qube is based on Fedora 39 (Python 3.12).

@apyrgio apyrgio added bug Something isn't working P:Qubes QubesOS integration development Development-focused changes labels Feb 20, 2024
deeplow added a commit that referenced this issue Mar 5, 2024
On Qubes the conversion in dev mode would fail when converting from a
Fedora 38 development qube via a Fedora 39 disposable qube. The reason
was that dz.ConvertDev was receiving `.pyc` files, which were compiled
for python 3.11 but running on python 3.12.

Unfortunately PyZipFile objects cannot send source python files, even
though the documentation is a little bit unclear on this [1].

Fixes #723

[1]: https://docs.python.org/3/library/zipfile.html#pyzipfile-objects
deeplow added a commit that referenced this issue Mar 5, 2024
On Qubes the conversion in dev mode would fail when converting from a
Fedora 38 development qube via a Fedora 39 disposable qube. The reason
was that dz.ConvertDev was receiving `.pyc` files, which were compiled
for python 3.11 but running on python 3.12.

Unfortunately PyZipFile objects cannot send source python files, even
though the documentation is a little bit unclear on this [1].

Fixes #723

[1]: https://docs.python.org/3/library/zipfile.html#pyzipfile-objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working development Development-focused changes P:Qubes QubesOS integration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant