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

Converts all SDW AppVMs to Debian 9 #155

Closed
wants to merge 11 commits into from
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ sd-whonix: prep-salt ## Provisions SD Whonix VM

sd-svs-disp: prep-salt ## Provisions SD Submission Viewing VM
sudo qubesctl top.enable sd-svs-disp
sudo qubesctl top.enable sd-svs-disp-files
sudo qubesctl --targets debian-9 state.highstate
sudo qubesctl --targets sd-svs-disp state.highstate

clean-salt: assert-dom0 ## Purges SD Salt configuration from dom0
Expand Down
2 changes: 1 addition & 1 deletion dom0/sd-gpg.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sd-gpg:
qvm.vm:
- name: sd-gpg
- present:
- template: fedora-28
- template: debian-9
- label: purple
- prefs:
- netvm: ""
2 changes: 1 addition & 1 deletion dom0/sd-journalist.sls
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sd-journalist:
#
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'
- name: qvm-run -a whonix-ws-14 'sudo apt-get update && sudo apt-get install -qq python-futures python3-pyqt4 gvfs-bin libgnomevfs2-bin'

# When our Qubes bug is fixed, this will *not* be used
sd-journalist-dom0-qubes.OpenInVM:
Expand Down
27 changes: 27 additions & 0 deletions dom0/sd-svs-disp-files.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :

##
# sd-svs-disp-files
# ========
#
# Moves files into place on sd-svs-disp
#
##

# xdg-open falls back to run-mailcap on debian-9, so CLI invocations
# will not use gedit as intended. Let's force use of gedit via mailcap.
sd-svs-force-gedit-for-xdg-open:
file.insert:
- name: /etc/mailcap
# User-defined (non-package-provided) overrides must be placed
# in a specific section of the mailcap file, otherwise they won't
# take precedence.
- after: "# ----- User Section Begins ----- #"
- text: "text/plain; gedit %s; test=test -x /usr/bin/gedit"

sudo update-mime-database /usr/local/share/mime:
cmd.run

sudo update-desktop-database /usr/local/share/applications:
cmd.run
7 changes: 7 additions & 0 deletions dom0/sd-svs-disp-files.top
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :

base:
# Target Debian-9, since changes to sd-svs-disp won't persist
debian-9:
- sd-svs-disp-files
2 changes: 1 addition & 1 deletion dom0/sd-svs-disp.sls
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sd-svs-disp:
qvm.vm:
- name: sd-svs-disp
- present:
- template: fedora-28
- template: debian-9
- label: green
- prefs:
- netvm: ""
Expand Down
2 changes: 1 addition & 1 deletion dom0/sd-svs.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sd-svs:
qvm.vm:
- name: sd-svs
- present:
- template: fedora-28
- template: debian-9
- label: yellow
- prefs:
- netvm: ""
Expand Down
8 changes: 6 additions & 2 deletions tests/test_gpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ def find_fp_from_gpg_output(gpg):
lines = gpg.split("\n")

for line in lines:
m = re.match('\s*Key fingerprint = (.*)$', line)
# dom0 uses Fedora25 with gpg 1.4.22, whereas AppVMs
# use Debian9 with gpg 2.1.18, so we'll match fingerprint
# by a loose regex rather than substring match.
regex = '\s*(Key fingerprint = )?([A-F0-9\s]{50})$'
m = re.match(regex, line)
if m is not None:
fp = m.groups()[0]
fp = m.groups()[1]
return fp


Expand Down
1 change: 0 additions & 1 deletion tests/test_vms_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


SUPPORTED_PLATFORMS = [
"Fedora 28 (Twenty Eight)",
"Debian GNU/Linux 9 (stretch)",
]

Expand Down