Skip to content
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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0-rc2
0.5.0-rc3
18 changes: 10 additions & 8 deletions dom0/sd-logging-setup.sls
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :

{% if "template" in grains['id'] or grains['id'] in ["securedrop-workstation-buster", "sd-small-buster-template", "sd-large-buster-template", "whonix-gw-15"] %}
{% if grains['id'] in ["securedrop-workstation-buster", "sd-small-buster-template", "sd-large-buster-template", "whonix-gw-15"] %}
include:
- fpf-apt-test-repo

Expand All @@ -12,9 +12,16 @@ install-securedrop-log-package:
- securedrop-log
- require:
- sls: fpf-apt-test-repo

# configure all VMs to send to sd-log - excluded on a per-VM basis below via /rw
configure-rsyslog-for-sd:
file.managed:
- name: /etc/sd-rsyslog.conf
- source: "salt://sd-rsyslog.conf.j2"

{% endif %}

{% if grains['id'] in ["sd-small-buster-template", "sd-large-buster-template"] %}
{% if grains['id'] == "sd-small-buster-template" %}
install-redis-for-sd-log-template:
pkg.installed:
- pkgs:
Expand All @@ -36,6 +43,7 @@ sd-log-remove-rsyslog-qubes-plugin:
systemctl restart rsyslog
systemctl start redis
systemctl start securedrop-log
exit 0
cmd.run:
- name: /rw/config/rc.local
- require:
Expand All @@ -62,12 +70,6 @@ sd-gpg-remove-rsyslog-qubes-plugin:
- require:
- file: sd-gpg-remove-rsyslog-qubes-plugin

{% else %}
# For all other VMs, configure to send to sd-log
configure-rsyslog-for-sd:
file.managed:
- name: /etc/sd-rsyslog.conf
- source: "salt://sd-rsyslog.conf.j2"
{% endif %}

# Remove outdated configuration that was previously used to configure the
Expand Down
9 changes: 6 additions & 3 deletions rpm-build/SPECS/securedrop-workstation-dom0-config.spec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Name: securedrop-workstation-dom0-config
Version: 0.5.0
Release: 0.rc2.1%{?dist}
Release: 0.rc3.1%{?dist}
Summary: SecureDrop Workstation

Group: Library
License: GPLv3+
URL: https://github.com/freedomofpress/securedrop-workstation
Source0: securedrop-workstation-dom0-config-0.5.0rc2.tar.gz
Source0: securedrop-workstation-dom0-config-0.5.0rc3.tar.gz

BuildArch: noarch
BuildRequires: python3-setuptools
Expand All @@ -28,7 +28,7 @@ configuration over time.
%undefine py_auto_byte_compile

%prep
%setup -n securedrop-workstation-dom0-config-0.5.0rc2
%setup -n securedrop-workstation-dom0-config-0.5.0rc3

%build
%{__python3} setup.py build
Expand Down Expand Up @@ -107,6 +107,9 @@ find /srv/salt -maxdepth 1 -type f -iname '*.top' \
| xargs qubesctl top.enable > /dev/null

%changelog
* Wed Nov 04 2020 SecureDrop Team <securedrop@freedom.press> - 0.5.0-3
- Fixing log collection for first-time installs

* Tue Oct 27 2020 SecureDrop Team <securedrop@freedom.press> - 0.5.0-2
- Removes qa-switcher testing logic from RPM

Expand Down
8 changes: 8 additions & 0 deletions tests/test_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ def test_sd_viewer_libreoffice_installed(self):
def test_logging_configured(self):
self.logging_configured()

def test_redis_packages_not_installed(self):
"""
Only the log collector, i.e. sd-log, needs redis, so redis will be
present in small template, but not in large.
"""
self.assertFalse(self._package_is_installed("redis"))
self.assertFalse(self._package_is_installed("redis-server"))

def test_mime_types(self):
filepath = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "vars", "sd-viewer.mimeapps"
Expand Down