Skip to content

Conversation

@deeplow
Copy link
Contributor

@deeplow deeplow commented Jul 15, 2025

Description of Changes

Towards #1245. Base Qubes 4.3 compatibility. Opening so we can iterate on OpenQA.

NOTES:

  • Keeps Debian 12 templates -- even though debian 13 is officially installed in 4.3, debian 12 will still be available.
  • Inplace upgrade from Qubes 4.2 is out of scope for this PR)

Testing

Requirements:

  • Debian 13 dev env is needed after 5ce36cb (or equivalent after rebase)
  • Machine running Qubes 4.3 (but feel free to test on 4.2 first)

Preparation:

  1. Follow tests in 4.2 machine
  2. Install Qubes 4.3 and create workstation build environment
  3. Temporary: until the fix debian-12-minimal in Qubes 4.3 has held broken Packages QubesOS/qubes-issues#10598 is in the stable repos, you need to enable debian-12-minimal's testing repos:
    • download debian-12-minimal template manually
    • in dom0: qvm-run -u root debian-12-minimal xterm
  4. sd-dev:
    • Set correct poetry env: poetry env use python3.13
    • Checkout out this branch
  5. dom0:
    • Download and install dom0 keyring RPM (e.g. from 4.2 repos — it is not yet available in 4.3 repos)
    • make clone
    • make dev

Testing:

  • Qubes 4.2: smoke testing workstation
  • Qubes 4.3
    • make dev succeeds
    • Opening document in disposable makes use of preloaded disposable (document opens within ~5 seconds as opposed to the usual longer delay )

Deployment

Any special considerations for deployment? Consider both:

  1. Upgrading existing pilot instances
  2. New installs

Checklist

If you have made changes to the provisioning logic

  • All tests (make test) pass in dom0

If you have added or removed files

  • I have updated MANIFEST.in and rpm-build/SPECS/securedrop-workstation-dom0-config.spec

If documentation is required

  • I have opened a PR in the docs repo for these changes, or will do so later
  • I would appreciate help with the documentation

@deeplow deeplow force-pushed the 1245-qubes-4.3-compat branch 6 times, most recently from 5dfd030 to 3ecdfbb Compare July 17, 2025 15:55
@deeplow deeplow force-pushed the 1245-qubes-4.3-compat branch 2 times, most recently from cd02e0b to 8eeae1a Compare August 14, 2025 11:29
@deeplow deeplow force-pushed the 1245-qubes-4.3-compat branch 11 times, most recently from 9d9303f to e31a66b Compare October 14, 2025 12:16
@deeplow
Copy link
Contributor Author

deeplow commented Oct 14, 2025

This is now passing installation with a few hacks. It's only running into issues in the tests, but I haven't taken a look at those yet.

@deeplow deeplow force-pushed the 1245-qubes-4.3-compat branch from fb4a50c to 501505c Compare January 16, 2026 16:14
@deeplow
Copy link
Contributor Author

deeplow commented Jan 16, 2026

The hanging CI jobs are due to the fact that these made mandatory by policy, but their names have changed.

Screenshot 2026-01-16 at 16-19-54 Qubes 4 3 base compatibility by deeplow · Pull Request #1373 · freedomofpress_securedrop-workstation

This is similar to https://github.com/freedomofpress/infrastructure/issues/6177 (internal). Once the new names / arguments are OK from the reviewer's standpoint, we can file a ticket with infra to fix these.

@deeplow
Copy link
Contributor Author

deeplow commented Jan 20, 2026

The previous test was failing on the keyring. It should go away once I rebase on top of #1533.

@deeplow
Copy link
Contributor Author

deeplow commented Jan 20, 2026

I'm rebasing and testing on 4.3 locally. I'll force-push once that's one.

@deeplow deeplow force-pushed the 1245-qubes-4.3-compat branch from 501505c to de93d9c Compare January 20, 2026 20:21
@deeplow deeplow added the 4.2-openqa-pending Run on OpenQA (Qubes 4.2) label Jan 20, 2026
@deeplow
Copy link
Contributor Author

deeplow commented Jan 20, 2026

I was running into issues with sdw-admin --apply after the inplace upgrade. Basically there are dependency issues with qubes-vm-recommended on debian-12-xfce. I think it's unrelated. I'll have to further explore this tomorrow and possibly report the issue upstream.

Launcher tests showed a warning about warnings that should use 'warning'
instead of 'warn()'
When running "sdw-admin --apply" "run-prep-upgrade-scripts" in
"sd-upgrade-templates.sls" and "sd-remove-unused-templates" as it fails
with the message:

  stdout: Please specify prepare or remove

This indicated that the 'args' parameter is not being properly
recognized. I looked at the saltstack documentation for the cmd module
and nothing indicates an 'args' parameters change. I've checked with
changelogs as well comparing the version in Qubes 4.2 with the one in
Qubes 4.3.

Instead of investigating how to get "cmd.script" this simply uses
another way to call the command as a temporary fix. For a more permanent
solution we need to fix this in all different places and if we choose to
go the 'cmd.run' route, we should place the script in some place other
than '/srv/salt/'.

Fixes #1499
Preloaded qubes do not need to be configured as they automatically get
restarted when its template is changed and saved to disk. These
preloaded sd-viewer qubes were getting included for configuration due to
the inheritance of the 'sd-workstation' tag.

Fruthermore, this attempt at configuration was causing issues as
preloaded qubes would time-out when ordered to shut down (See #1475).

The implementation choice was to include this fix in configure() rather
than pre-filtering out preloaded qubes from the list of targets before
passing them on to the 'configure()' function. This was due to the fact
that the calling function should not need to be aware that preloaded
qubes do not (and should not) have configurations applied to them.

Fixes #1475
Presence of preloaded qubes was interfering with the expected test
results [1]. For the most part, preloaded qubes are background elements,
whose management can be largely ignore.
Build the correct RPM for the dom0 Fedora version in dom0. If building
on Qubes 4.3, it'll internall call 'build-rpm' with 'FEDORA_VERSION=41'.
This is implemented in a way that should work also for future Qubes
versions (assuming dom0 is still Fedora, of course).

Implementation takes advantage of '%{fedora}' RPM macro, made available
by the qubes-release package [1].

[1]: https://github.com/QubesOS/qubes-qubes-release/blob/26f2a3c/qubes-release.spec.in#L97
Upon test failure, from an error message, it's not possible to easily
understand what VM failed:

>               assert not policy_exists(vm, "sd-log", "securedrop.Log")
E               AssertionError: assert not True
E                +  where True = policy_exists(<qubesadmin.vm.QubesVM object at 0x77effbba0d10>, 'sd-log', 'securedrop.Log')

In the future, this will be made more apparent with the use of pytest
fixture, but for the time being, this is already an improvement, without
modifying much of test code (out of scope for this PR).
Used in strategy matrix to ensure there is one single place where the
Qubes version needs to be updated.
@deeplow deeplow force-pushed the 1245-qubes-4.3-compat branch from de93d9c to 575fc06 Compare January 22, 2026 16:57
@deeplow deeplow added 4.2-openqa-pending Run on OpenQA (Qubes 4.2) and removed 4.2-openqa-pending Run on OpenQA (Qubes 4.2) labels Jan 22, 2026
@deeplow
Copy link
Contributor Author

deeplow commented Jan 26, 2026

NOTE: while running locally on 4.2 I was sometimes running into test failures on test_logs_are_flowing. I think it's unrelated to this PR. I've filed a dedicated ticket at #1549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.2-openqa-pending Run on OpenQA (Qubes 4.2) Qubes 4.3

Projects

Status: Under Review

Development

Successfully merging this pull request may close these issues.

debian-12-minimal in Qubes 4.3 has held broken Packages

4 participants