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 GUI feedback in sd-journalist #149

Merged
merged 3 commits into from
Sep 14, 2018
Merged
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
11 changes: 8 additions & 3 deletions dom0/sd-journalist.sls
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@ require:
- group: root
- mode: 644

# Temporary workaround to bootstrap Salt support on target.
qvm-run -a whonix-ws-14 "sudo apt-get install -qq python-futures":
cmd.run
# Temporary workarounds for sd-journalist:
#
# * python-futures required bootstrap Salt support
# * python-qt4 required for sd-process-feedback GUI integration
#
install python-qt4 and python-futures:
cmd.run:
- name: qvm-run -a whonix-ws-14 'sudo apt-get update && sudo apt-get install -qq python-futures python-qt4'

# When our Qubes bug is fixed, this will *not* be used
sd-journalist-dom0-qubes.OpenInVM:
Expand Down
2 changes: 1 addition & 1 deletion sd-decrypt/decrypt-sd-submission
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def send_progress(msg):
"sd-process.Feedback"],
close_fds=True,
stdin=subprocess.PIPE)
p.communicate(msg)
p.communicate(bytes(msg.encode('utf-8')))


input = sys.argv[1]
Expand Down
4 changes: 2 additions & 2 deletions sd-journalist/sd-process-download
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ wait_for_sigfile(sigfile)
if os.path.isfile(fn) is False:
c = subprocess.Popen(["/usr/local/bin/sd-process-feedback"],
stdin=subprocess.PIPE)
c.communicate('DOWNLOAD_FILE_MISSING\n')
c.communicate(bytes("DOWNLOAD_FILE_MISSING\n".encode('utf-8')))
sys.exit()

fh = tempfile.NamedTemporaryFile(suffix=".sd-xfer", delete=False)
Expand All @@ -81,7 +81,7 @@ fh.close()
# from the same machine? This can only happen on sd-journalist.
c = subprocess.Popen(["/usr/local/bin/sd-process-feedback"],
stdin=subprocess.PIPE)
c.communicate(input="DOWNLOAD_BUNDLE_CREATED\n")
c.communicate(bytes("DOWNLOAD_BUNDLE_CREATED\n".encode('utf-8')))

# ship this to the next phase
subprocess.call(["qvm-open-in-vm", "sd-decrypt", fh.name])
Expand Down
2 changes: 1 addition & 1 deletion sd-journalist/sd-process-feedback
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import posix
import sys
import os

arg = sys.stdin.readline()
arg = sys.stdin.readline().encode('utf-8')

try:
fifo = os.open('/home/user/sdfifo', posix.O_WRONLY | posix.O_NONBLOCK)
Expand Down
2 changes: 1 addition & 1 deletion sd-svs/accept-sd-xfer-extracted
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def send_progress(msg):
"sd-process.Feedback"],
close_fds=True,
stdin=subprocess.PIPE)
p.communicate(msg)
p.communicate(bytes(msg.encode('utf-8')))


send_progress("DECRYPTED_BUNDLE_ON_SVS")
Expand Down