-
Notifications
You must be signed in to change notification settings - Fork 46
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
Use bullseye templates on 4.1 and and use apt-test+nightlies repos for dev apt-test+main packages for staging #784
Conversation
* `make dev` now defaults to installing nightlies, which restores the old behavior before the apt-test component split. * Running qa-switch will now configure templates to use the "main" component, which is where release candidates go. * Fix the list of templates that qa-switch modifies, so it actually works. Co-authored-by: Cory Francis Myers <cory@freedom.press>
It's a weird tool that we don't really use in our current strategy and would introduce unnecessary complexity if we want to keep compatibility with 4.0 and 4.1 at the same time as we have done so far.
* dev environment uses apt-test nightlies repo for Debian, and yum-test for dom0 * staging environment uses apt-test main repo for Debian, and yum-test for dom0 * prod environment uses apt main repo for Debian and yum for dom0
cfd6baa
to
9d57526
Compare
0954d44
to
0b790cd
Compare
0b790cd
to
62224e7
Compare
Test Plan
|
Deployment
|
As of 62224e7: Qubes OS R4.0
Exits
Qubes OS R4.1
With the following patch, passes except for tests:
diff --git a/tests/test_dom0_rpm_repo.py b/tests/test_dom0_rpm_repo.py
index 99cb395..5362e58 100644
--- a/tests/test_dom0_rpm_repo.py
+++ b/tests/test_dom0_rpm_repo.py
@@ -2,6 +2,14 @@ import json
import unittest
+DEBIAN_VERSION = "bullseye"
+FEDORA_VERSION = "f32"
+with open("/etc/qubes-release") as qubes_release:
+ if "R4.0" in qubes_release.read():
+ DEBIAN_VERSION = "buster"
+ FEDORA_VERSION = "f25"
+
+
class SD_Dom0_Rpm_Repo_Tests(unittest.TestCase):
pubkey_wanted = ""
@@ -9,8 +17,8 @@ class SD_Dom0_Rpm_Repo_Tests(unittest.TestCase):
pubkey_actual = "/etc/pki/rpm-gpg/RPM-GPG-KEY-securedrop-workstation" # noqa
pubkey_wanted_prod = "sd-workstation/securedrop-release-signing-pubkey-2021.asc"
pubkey_wanted_test = "sd-workstation/apt-test-pubkey.asc"
- yum_repo_url_prod = "https://yum.securedrop.org/workstation/dom0/f25"
- yum_repo_url_test = "https://yum-test.securedrop.org/workstation/dom0/f25"
+ yum_repo_url_prod = f"https://yum.securedrop.org/workstation/dom0/{FEDORA_VERSION}"
+ yum_repo_url_test = f"https://yum-test.securedrop.org/workstation/dom0/{FEDORA_VERSION}"
def setUp(self):
# Enable full diff output in test report, to aid in debugging
diff --git a/tests/test_vms_exist.py b/tests/test_vms_exist.py
index 90cc499..0d7295c 100644
--- a/tests/test_vms_exist.py
+++ b/tests/test_vms_exist.py
@@ -5,7 +5,7 @@ from qubesadmin import Qubes
from base import WANTED_VMS
-EXPECTED_KERNEL_VERSION = "4.14.241-grsec-workstation"
+EXPECTED_KERNEL_VERSION = "5.15.41-grsec-workstation" # whoops; make conditional!
DEBIAN_VERSION = "bullseye"
with open("/etc/qubes-release") as qubes_release:
diff --git a/tests/test_vms_platform.py b/tests/test_vms_platform.py
index 31d7e2a..25917c5 100644
--- a/tests/test_vms_platform.py
+++ b/tests/test_vms_platform.py
@@ -6,13 +6,15 @@ from qubesadmin import Qubes
from base import WANTED_VMS, CURRENT_FEDORA_TEMPLATE
+BULLSEYE_STRING = "Debian GNU/Linux 11 (bullseye)"
+BUSTER_STRING = "Debian GNU/Linux 10 (buster)"
with open("/etc/qubes-release") as qubes_release:
if "R4.1" in qubes_release.read():
- SUPPORTED_SD_PLATFORMS = ["Debian GNU/Linux 11 (bullseye)"]
+ SUPPORTED_SD_PLATFORMS = [BULLSEYE_STRING]
else:
- SUPPORTED_SD_PLATFORMS = ["Debian GNU/Linux 10 (buster)"]
+ SUPPORTED_SD_PLATFORMS = [BUSTER_STRING]
-SUPPORTED_WHONIX_PLATFORMS = ["Debian GNU/Linux 11 (bullseye)"]
+SUPPORTED_WHONIX_PLATFORMS = [BULLSEYE_STRING]
apt_url = ""
@@ -29,10 +31,9 @@ class SD_VM_Platform_Tests(unittest.TestCase):
if "environment" not in config:
config["environment"] = "dev"
- if "buster" in SUPPORTED_SD_PLATFORMS:
+ dist = "bullseye"
+ if BUSTER_STRING in SUPPORTED_SD_PLATFORMS:
dist = "buster"
- elif "bullseye" in SUPPORTED_SD_PLATFORMS:
- dist = "bullseye"
if config["environment"] == "prod":
self.apt_url = FPF_APT_SOURCES.format(dist=dist, component="main") |
`fedora-35-dvm` does not magically come into existence just by installing the `fedora-35` template, but we do want to update the sys-vms that use disposable templates to the most recent Fedora template we support, so we just create it before updating the qube preferences. We also create `sd-fedora-dvm`, which we need to customize to support consistent USB auto-attach to sd-devices
62224e7
to
2225bfa
Compare
14bb418
to
0fdbed4
Compare
Trying to
It looks like the |
Dropping support for 4.0 to avoid unnecessary complexity. This removes 4.0 support from: salt states, scripts, Makefile, and tests. (Also removes sd-devices from sd-workstation.top as it's a DispVM rather than a DispVM template)
6743412
to
3181092
Compare
Update to signing key with 2023 expiry
Running through the test plan in #786 (comment) for Qubes 4.1, and will update here in case there are any issues. |
266cbe4
to
621696f
Compare
I took the liberty to remove a tiny print statement (8060842), for testing purposes it should not matter whether you're including that commit or not. |
"remove", | ||
"qubes-template-securedrop-workstation-buster", | ||
] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be removed, or updated to remove the Bullseye template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's happening here is that while the qubes-template-securedrop-workstation-bullseye rpm exists, it's not installed via DNF and doesn't show up when you list installed packages. As far as I can tell, the qvm-template tool installs the relevant template files but then discards the downloaded package, which saves space when compared to 4.0. So the keep template functionality would have to be implemented in a different manner to avoid repeated downloads. I'll file a new ticket for this, but I don't think it's a problem for the first 4.1 release as it's a developer convenience feature
securedrop-workstation/tests/vars/sd-viewer.mimeapps Lines 24 to 28 in f1f3a88
|
Beyond that, things are looking great so far.
(I've not tested client functionality yet as this workstation is provisioned with a dummy configuration for now.) |
After freedomofpress/securedrop-builder#349, this change is required for SD_Viewer_Tests.test_mime_types() to pass on Debian bullseye (thus, Qubes 4.1) and will fail on Debian buster (thus, Qubes 4.0).
933ae9e
to
d2a2a52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beyond @eloquence's findings, I'm able to sign off on the test plan as below! I'm approving but leaving for @eaon or @creviera to do the merging honors tomorrow. :-)
-
make dev
installs without errors, withbullseye
based templates which in turn usebullseye
+nightlies
repositories
After make clean
, make dev
passed after several runs encountered transient failures:
-
in DNS resolution (probably due to something weird with my
sys-net
); and -
from
qvm-sync-appmenus
insd-devices-template-sync-appmenus
. -
make test
in dom0 passes except for 1 failure about asecuredrop-workstation-grsec
that is not up to date (seems to be a nightly package/apt problem, the package hasn't been changed, there's no negative effects to this failure)
With d2a2a52. Following 3181092, this entails that SD_Viewer_Tests.test_mime_types()
will begin to fail on buster. If this is not acceptable, this commit should be refactored to parameterize the test.
Thanks everyone for all the hard work 🚀 |
…-repo-magic Use bullseye templates on 4.1 and and use apt-test+nightlies repos for dev apt-test+main packages for staging
Description of Changes
Towards #600
Draft PR for now, but this will include a collection of 4.1 bullseye template related changes to salt state logic, as well as @legoktm's work from the
bullseye-nightlies
branch. It also removes theqa-switch.sh
utility (at least for now) as it would introduce unnecessary complexity for keeping 4.0 compatibility, and at least for this upcoming stage of testing it isn't useful to us and could probably be implemented in a cleaner way if we need it again in the future.Fixes #787
Testing
Qubes OS R4.1 only:
make dev
installs without errors, withbullseye
based templates which in turn usebullseye
+nightlies
repositoriesmake test
in dom0 passes except for 1 failure about asecuredrop-workstation-grsec
that is not up to date (seems to be a nightly package/apt problem, the package hasn't been changed, there's no negative effects to this failure)Checklist
MANIFEST.in
andrpm-build/SPECS/securedrop-workstation-dom0-config.spec