-
Notifications
You must be signed in to change notification settings - Fork 690
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
Conversation
admin/bootstrap.py
Outdated
@@ -75,6 +76,34 @@ def is_tails(): | |||
return id == 'Tails' | |||
|
|||
|
|||
def clean_up_tails3_venv(VENV_DIR): |
There was a problem hiding this comment.
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.
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? |
There was a problem hiding this 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
[1.1.0] Backport of #4914 Remove Tails 3 Python 3 venv in Tails 4
Status
Ready for review
Description of Changes
Closes #4910
Testing
Starting from a Tails 3.16 drive with securedrop repo cloned:
./securedrop-admin setup
./securedrop-admin setup
./securedrop-admin
./securedrop-admin setup
./securedrop-admin setup
./securedrop-admin
now worksDeployment
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
commandChecklist
If you made changes to
securedrop-admin
:make -C admin test
) pass in the admin development containerIf you made non-trivial code changes: