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

Remove Tails 3 Python 3 venv in Tails 4 #4914

Merged
merged 3 commits into from
Oct 17, 2019

Conversation

emkll
Copy link
Contributor

@emkll emkll commented Oct 16, 2019

Status

Ready for review

Description of Changes

Closes #4910

Testing

Starting from a Tails 3.16 drive with securedrop repo cloned:

  • Check out 1.1.0-rc2 tag
  • ./securedrop-admin setup
  • Python 3 venv is present in ~/persistent/securedrop/admin/.venv3
  • Upgrade Tails drive to Tails 4.0-rc1
  • Run ./securedrop-admin setup
  • Observe failure described in securedrop-admin (setup) fails in Tails 4.0-rc1 #4910
  • Check out this branch
  • Run ./securedrop-admin
  • The venv should be deleted and you should be prompted to run ./securedrop-admin setup
  • Run ./securedrop-admin setup
  • Venv is recreated under Tails 4.0, ./securedrop-admin now works

Deployment

Admins upgrading both admin and journalist (if ./securedrop-admin tailsconfig is needed, for example when migrating to v3 onions) workstations will need to run ./securedrop-admin setup after upgrading their workstations to Tails 4.0. The user should now be prompted to do so when they run any ./securedrop-admin command

Checklist

If you made changes to securedrop-admin:

  • Linting and tests (make -C admin test) pass in the admin development container

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

@emkll emkll added this to the 1.1.0 milestone Oct 16, 2019
@@ -75,6 +76,34 @@ def is_tails():
return id == 'Tails'


def clean_up_tails3_venv(VENV_DIR):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heads up best to replace def clean_up_tails3_venv(VENV_DIR) with def clean_up_tails3_venv(virtualenv_path=VENV_DIR) and use virtualenv_path within the function. otherwise there are going to be two VENV_DIR variables with different scopes (one global, one local) - this will work as python's scope resolution will select the local first but this could cause confusion in the future

Adds a "checkenv" argument to admin/bootstrap.py, used in
securedrop-admin to ensure that the admin virtualenv is
functional. Also make sure bootstrap.py runs under Python 3.
@emkll
Copy link
Contributor Author

emkll commented Oct 16, 2019

Changes introduced by @rmol look good to me, since i opened the PR and have authored some commits, I cannot formally review. Could someone else please review this?

Copy link
Contributor

@kushaldas kushaldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting from a Tails 3.16 drive with securedrop repo cloned:

  • Check out 1.1.0-rc2 tag
  • ./securedrop-admin setup
  • Python 3 venv is present in ~/persistent/securedrop/admin/.venv3
  • Upgrade Tails drive to Tails 4.0-rc1
  • Run ./securedrop-admin setup
  • Observe failure described in securedrop-admin (setup) fails in Tails 4.0-rc1 #4910
  • Check out this branch
  • Run ./securedrop-admin
  • The venv should be deleted and you should be prompted to run ./securedrop-admin setup
  • Run ./securedrop-admin setup
  • Venv is recreated under Tails 4.0, ./securedrop-admin now works

@kushaldas kushaldas merged commit 5e3dc0f into develop Oct 17, 2019
emkll added a commit that referenced this pull request Oct 17, 2019
[1.1.0] Backport of #4914 Remove Tails 3 Python 3 venv in Tails 4
@emkll emkll deleted the 4910-remove-tails3-venv-in-tails4 branch October 18, 2019 19:56
@emkll emkll mentioned this pull request Oct 21, 2019
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

securedrop-admin (setup) fails in Tails 4.0-rc1
4 participants