freedomofpress / securedrop-docs

Documentation for the SecureDrop project
https://docs.securedrop.org/
Other
22 stars 26 forks source link

Document how to recover from Tails errors with "Additional software" #446

Open eloquence opened 1 year ago

eloquence commented 1 year ago

As documented upstream in https://gitlab.tails.boum.org/tails/tails/-/issues/18620, Tails sometimes fails to install the "Additional software" (Debian packages) that users have previously requested to persist.

When this happens, securedrop-admin will no longer work correctly due to missing dependencies.

We should add troubleshooting instructions in our docs to help users recover from this issue.

eloquence commented 1 year ago

I've opened this as a docs issue, but it might make sense to expose bootstrap.py's install_apt_dependencies as a securedrop-admin subcommand to aid in recovery. I'll poke to see if that recovers from a dirty state.

zenmonkeykstop commented 1 year ago

Whould it work to just rerun securedrop-admin setup in that scenario?

eloquence commented 1 year ago

By my read it currently only installs the apt dependencies if the venv does not exist: https://github.com/freedomofpress/securedrop/blob/develop/admin/bootstrap.py#LL164C9-L164C21

eloquence commented 1 year ago

@huertanix resolved this via the following steps:

  1. sudo rm /var/lib/apt/lists/*
  2. sudo apt update
  3. Remove installed "Additional software" packages via Synaptic

When I've encountered the issue, this was not necessary. I was able to resolve by installing packages with sudo apt install <missing-package>. Removing the admin/.venv3 directory and re-running securedrop-admin setup should have the same effect.

So far I've not been able to induce the broken state. It may sometimes occur due to a race condition or similar timing issue.

So I would suggest, next time anyone encounters this, try:

  1. cd ~/Persistent/securedrop
  2. rm -rf admin/.venv3
  3. ./securedrop-admin setup