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

Handle mimetypes for sd-app, sd-viewer and sd-devices in private volume #605

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

emkll
Copy link
Contributor

@emkll emkll commented Aug 28, 2020

Status

Ready for review

Description of Changes

Fixes #603

Testing

The changes to the securedrop-workstation-config do not adversely impact mime handling

PKG_VERSION=0.1.4 make securedrop-workstation-config
  • Copy the built deb to sd-workstation folder in the clone of this repo/branch for testing
cp /home/user/debbuild/packaging/securedrop-workstation-config_0.1.4+buster_all.deb sd-workstation/
  • Apply the following diff to ensure this version of the package is installed in all VMs:
diff --git a/dom0/fpf-apt-test-repo.sls b/dom0/fpf-apt-test-repo.sls
index 6299198..1ef3f75 100644
--- a/dom0/fpf-apt-test-repo.sls
+++ b/dom0/fpf-apt-test-repo.sls
@@ -42,3 +42,11 @@ install-securedrop-keyring-package:
       - securedrop-keyring
     - require:
       - pkgrepo: configure-apt-test-apt-repo
+
+test-updated-securedrop-config-package:
+   file.managed:
+     - name: /opt/securedrop-config.deb
+     - source: salt://sd/sd-workstation/securedrop-workstation-config_0.1.4+buster_all.deb
+     - mode: 644
+   cmd.run:
+     - name: apt install -y /opt/securedrop-config.deb
  • make clone, make all, and make test
  • make all completes successfully
  • make test completes successfully

Using the changes introduced here, private volume mime handling

PKG_VERSION=0.1.4 make securedrop-workstation-config
  • Copy the built deb to sd-workstation folder in the clone of this repo/branch for testing
cp /home/user/debbuild/packaging/securedrop-workstation-config_0.1.4+buster_all.deb sd-workstation/
  • Apply the following diff to ensure this version of the package is installed in all VMs:
diff --git a/dom0/fpf-apt-test-repo.sls b/dom0/fpf-apt-test-repo.sls
index 6299198..1ef3f75 100644
--- a/dom0/fpf-apt-test-repo.sls
+++ b/dom0/fpf-apt-test-repo.sls
@@ -42,3 +42,11 @@ install-securedrop-keyring-package:
       - securedrop-keyring
     - require:
       - pkgrepo: configure-apt-test-apt-repo
+
+test-updated-securedrop-config-package:
+   file.managed:
+     - name: /opt/securedrop-config.deb
+     - source: salt://sd/sd-workstation/securedrop-workstation-config_0.1.4+buster_all.deb
+     - mode: 644
+   cmd.run:
+     - name: apt install -y /opt/securedrop-config.deb
  • make clone, make all, and make test
  • make all completes successfully
  • make test completes successfully
  • manual test of mime precedence: in sd-app: cp /opt/sdw/mimeapps.list.sd-viewer /usr/share/applications/mimeapps.list: xdg-open a file should still open in a DispVM. rm ~/.local/share/applications/mimeapps.list should cause xdg-open to open files in sd-app. Recreating the symlink resolves.

Checklist

If you have made code changes

  • Linter (make flake8) passes in the development environment (this box may
    be left unchecked, as flake8 also runs in CI)

If you have made changes to the provisioning logic

  • All tests (make test) pass in dom0 of a Qubes install

  • This PR adds/removes files, and includes required updates to the packaging
    logic in MANIFEST.in and rpm-build/SPECS/securedrop-workstation-dom0-config.spec

@emkll emkll added this to Ready for Review in SecureDrop Team Board Aug 28, 2020
@sssoleileraaa
Copy link
Contributor

Didn't get to this today but will run through the test plan in the morning.

Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now make dev fails during the test plan from the section called: The changes to the securedrop-workstation-config do not adversely impact mime handling. Here are the errors:

ID: test-updated-securedrop-config-package
Function: file.managed
Name: apt install -y /opt/securedrop-config.deb
Result: False
Comment: Specified file apt install -y /opt/securedrop-config.deb is not an absolute path
ID: install-securedrop-log-package
Function: pkg.installed
Result: False
Comment: One or more requisite failed: fpf-apt-test-repo.test-updated-securedrop-config-package

Going to double check that I followed the test plan accurately and also look at logs in dom0, but maybe you'll see the issue already.

@sssoleileraaa
Copy link
Contributor

Update: Looks like I had a typo (of course!) on the step to apply the diff in the comment. Will run through this again.

@sssoleileraaa sssoleileraaa moved this from Ready for Review to Under Review in SecureDrop Team Board Sep 9, 2020
Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - ran throuh the test plan successfully and files can still be opened from the client in a dispvm (sorry for the long delay - had to recreate my qubes workstation but now back in action!)

@sssoleileraaa sssoleileraaa merged commit e31a089 into main Sep 9, 2020
SecureDrop Team Board automation moved this from Under Review to Done Sep 9, 2020
@legoktm legoktm deleted the 603-private-volume-mimetypes branch May 28, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Activate AppVM MIME type configuration via securedrop-workstation-config package
2 participants