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

[RFE] Isolate yourself from the system Python #3407

Closed
dstufft opened this issue May 14, 2018 · 4 comments
Closed

[RFE] Isolate yourself from the system Python #3407

dstufft opened this issue May 14, 2018 · 4 comments

Comments

@dstufft
Copy link

dstufft commented May 14, 2018

Feature request

Description

As I understand it, SecureDrop is currently installing all of it's dependencies into the system Python . This is generally considered a poor practice for reasons such as the system providing outdated or otherwise incompatible versions of libraries that you depend on. However, attempting to actually update those libraries that the system provide tends to have a cascading failure effect where you end up further breaking your system because other items installed by the distribution rely on that older version.

Further more, the new installed version is not known to the system package manager, so they will often times step on each other toes, overwriting files so that you end up with the old version the next time the system publishes a patched version of that library.

My recommendation would be to isolate yourself using a virtual environment. If you're currently building or using system packages, then something like dh-virtualenv can be used to help marry the virtual environment with the system packaging tools. This will let you gain the isolation from virtualenv while still using the system tooling (including things like depending on system C libraries, etc).

@ghost ghost added the feature label May 14, 2018
@ghost
Copy link

ghost commented May 14, 2018

IMHO this is an interesting topic which would make a great forum topic

@doko42
Copy link

doko42 commented May 15, 2018

"the system providing outdated or otherwise incompatible versions of libraries"

make that "stable and security supported, and being tested in the system environment", and I can agree with that.

But yes, the practice replacing components installed with the system package manager (apt, rpm, ...) is terribly wrong, breaking either the system installed components, or your pip-installed app, when updating the system components.

@msheiny
Copy link
Contributor

msheiny commented May 15, 2018

@dstufft thank you making this ticket. i believe this issue highly aligns with the first point brought up in #3095 which was:

the current strategy allowing deployed securedrop instances to directly grab the latest updates from upstream ubuntu repos [...] has the possibility to break the system in un-foreseen ways.

dh-virtualenv in particular seems like an interesting tool for us to investigate 👀

@redshiftzero
Copy link
Contributor

redshiftzero commented Aug 1, 2019

as of #4355 (PR #4622) we are using dh-virtualenv, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants