-
Notifications
You must be signed in to change notification settings - Fork 687
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
Bundle mod_wsgi in securedrop-app-code package #4518
Changes from all commits
adf0c18
3815680
b27ef8d
6b73b27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ Homepage: https://securedrop.org | |
|
||
Package: securedrop-app-code | ||
Architecture: amd64 | ||
Depends: python-pip,apparmor-utils,gnupg2,haveged,python,secure-delete,sqlite3,${dist:Depends},libapache2-mod-wsgi,libapache2-mod-xsendfile,redis-server,supervisor,securedrop-keyring,securedrop-config,libpython2.7-dev | ||
Depends: ${dist:Depends}, apparmor-utils, gnupg2, haveged, libapache2-mod-xsendfile, libapache2-mod-wsgi (= 4.3.0-1.1build1), python3, python3-pip, redis-server, secure-delete, securedrop-config, securedrop-keyring, sqlite3, supervisor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so if we deployed this change using #4355 then we wouldn't need to install There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've only read the dh-virtualenv docs but yes, it looks like that would be a better way to get this done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once we switch to |
||
Description: Packages the SecureDrop application code pip dependencies and apparmor profiles. This package will put the apparmor profiles in enforce mode. This package does use pip to install the pip wheelhouse |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,7 +124,7 @@ case "$1" in | |
|
||
chown -R www-data:www-data /var/lib/securedrop /var/www/securedrop | ||
|
||
pip install --no-index --find-links=/var/securedrop/wheelhouse --upgrade \ | ||
pip3 install --no-index --find-links=/var/securedrop/wheelhouse --upgrade \ | ||
-r /var/www/securedrop/requirements/securedrop-app-code-requirements-packaged.txt | ||
|
||
chown -R www-data:www-data /var/www/securedrop | ||
|
@@ -142,6 +142,9 @@ case "$1" in | |
# the ability to send signals to unconfined peers. | ||
service apache2 stop | ||
|
||
# Point Apache to our bundled mod_wsgi | ||
mod_wsgi-express module-config > /etc/apache2/mods-available/wsgi.load | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a config test to assert the contents of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do. |
||
|
||
# If the profile was disabled enabled it. | ||
if [ -e "/etc/apparmor.d/disable/usr.sbin.apache2" ]; then | ||
rm /etc/apparmor.d/disable/usr.sbin.apache2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
update | ||
install -y securedrop-app-code |
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.
These py3 dependencies are in addition to the py2 dependencies declared in
molecule/builder-xenial/Dockerfile
. We should instead modify the dependencies in the Dockerfile for the build, push a new image, and store the hash as part of this PR. Happy to append to this PR if you agree. Storing the dependencies in the container image definition will help keep local builds snappy, leveraging the cached layers.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.
I've left this in for now, but as soon as we can get the image updated I'll remove this step.