Skip to content

Commit

Permalink
Creates a symlink to the .so file in postint for mod_wsgi
Browse files Browse the repository at this point in the history
On Focal, mod_wsgi expects a shared library for the python
module at:
$VENV/lib/python3.8/site-packages/mod_wsgi/server/mod_wsgi-py38.so

But, the real shared library path is

$VENV/lib/python3.8/site-packages/mod_wsgi/server/mod_wsgi-py38.cpython-38-x86_64-linux-gnu.so"

So we are creating a symlink with the proper path if we are using
Python 3.8
  • Loading branch information
kushaldas committed Aug 11, 2020
1 parent f1b495e commit b9e0d5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions install_files/securedrop-app-code/debian/postinst
Expand Up @@ -93,6 +93,14 @@ function adjust_wsgi_configuration {
perl -pi -e 's/^WSGIProcessGroup journalist.*\n//' "$journalist_conf"
fi
fi
# Create the WSGI so file link if only on Python3.8
wsgi_so_link="/opt/venvs/securedrop-app-code/lib/python3.8/site-packages/mod_wsgi/server/mod_wsgi-py38.so"
wsgi_so="/opt/venvs/securedrop-app-code/lib/python3.8/site-packages/mod_wsgi/server/mod_wsgi-py38.cpython-38-x86_64-linux-gnu.so"
if test -f "/usr/bin/python3.8"; then
if test ! -L $wsgi_so_link; then
ln -s $wsgi_so $wsgi_so_link
fi
fi
}

# Manage PaX flags for web app, only required under Xenial.
Expand Down

0 comments on commit b9e0d5b

Please sign in to comment.