Skip to content
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

Fixes #4036 #4037 #4038 Fixes gnupg and setuptools related errors #4042

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion securedrop/crypto_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import io
import scrypt
import platform
import subprocess
from random import SystemRandom

Expand Down Expand Up @@ -79,7 +80,11 @@ def __init__(self,

self.do_runtime_tests()

self.gpg = gnupg.GPG(binary='gpg2', homedir=gpg_key_dir)
os_details = platform.linux_distribution()
if os_details[1] == "16.04":
self.gpg = gnupg.GPG(binary='gpg', homedir=gpg_key_dir)
else:
self.gpg = gnupg.GPG(binary='gpg2', homedir=gpg_key_dir)

# map code for a given language to a localized wordlist
self.__language2words = {} # type: Dict[Text, List[str]]
Expand Down
2 changes: 2 additions & 0 deletions securedrop/dockerfiles/xenial/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ COPY requirements requirements
RUN pip install -r requirements/securedrop-app-code-requirements.txt && \
pip install -r requirements/test-requirements.txt

RUN pip install --upgrade setuptools

RUN if test $USER_NAME != root ; then useradd --no-create-home --home-dir /tmp --uid $USER_ID $USER_NAME && echo "$USER_NAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers ; fi

STOPSIGNAL SIGKILL
Expand Down