Improve specification of securedrop-app-code dependencies #4876
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
Ready for review
Description of Changes
Fixes #4875.
Fixes #4864.
The
securedrop-app-code
Debian package didn't fully specify its dependencies, cruciallylibpython3.5
, which is almost always installed on SecureDrop servers built according to our instructions, but doesn't have to be. This fixes that, and makes thesecuredrop-app-code
package the sole source of truth about its dependencies, eliminating the out-of-band installation of some of them via theapp
Ansible role.This also fixes a few dependency specifications in the instructions for setting up a development environment.
Testing
The upgrade scenario is the easiest way to test this:
make build-debs
make upgrade-start
molecule login -s upgrade -h app-staging
sudo apt remove libpython3.5
sudo service apache2 restart
The Apache restart should fail, and in the output of
journalctl -xe --no-pager
you should see a failure to locatelibpython3.5m.so.1.0
:To fix this, install the packages you just built:
make upgrade-test-local
molecule login -s upgrade -h app-staging
dpkg -l securedrop-app-code libpython3.5
Confirm that
securedrop-app-code
was upgraded and thatlibpython3.5
is installed.curl http://127.0.0.1
to confirm that the source interface is working again.Deployment
This ensures that
securedrop-app-code
dependencies are present. It should have no effect on most SecureDrop installations, where they should already installed, but will make installation more robust on atypical systems.Checklist
If you made changes to the server application code:
make lint
) and tests (make test
) pass in the development containerIf you made changes to
securedrop-admin
:make -C admin test
) pass in the admin development containerIf you made changes to the system configuration:
If you made non-trivial code changes:
If you made changes to documentation:
make docs-lint
) passed locally