patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 64f085bf1e721b46076b86228adb8e86b3e5c57d 1438 bytes (raw)
name: Documentation/using-spectrum/updates.adoc 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
= Updating the OS
:page-parent: Using Spectrum

// SPDX-FileCopyrightText: 2025 Demi Marie Obenour <demiobenour@gmail.com>
// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0

Spectrum supports updates via the `spectrum-update` command.  This
takes the path to a staging directory as argument.  This directory
must be on a BTRFS filesystem.

Updates are atomic and take effect after the system reboots.
If the system is rebooted, crashes, or loses power during an
update, the update will not take effect.  Updates are digitally
signed and Spectrum will refuse to install an update that does
not have a trusted signature.

See xref:../development/build-configuration.adoc[build configuration]
for what is needed for updates to work.  The actual update is done using
https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html[systemd-sysupdate].
See its documentation for the details.

== Technical Note

Since Spectrum's host has no network access, the VM that does the
updates (`sys.appvm-systemd-sysupdate`) is given a BTRFS subvolume to
write the updates into.  It uses `systemd-sysupdate` to download the updates
into this directory.  Once it exits, the host snapshots this directory and
checks it for malicious filenames or non-regular files.  If the check
passes, this directory is used as the source for `systemd-sysupdate`,
which installs the updates to the OS volume and EFI system partition.

debug log:

solving 64f085bf1e721b46076b86228adb8e86b3e5c57d ...
found 64f085bf1e721b46076b86228adb8e86b3e5c57d in https://inbox.spectrum-os.org/spectrum-devel/20251121-updates-v4-13-d4561c42776e@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251119-updates-v3-13-b88a99915509@gmail.com/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251121-updates-v4-13-d4561c42776e@gmail.com/
diff --git a/Documentation/using-spectrum/updates.adoc b/Documentation/using-spectrum/updates.adoc
new file mode 100644
index 0000000000000000000000000000000000000000..64f085bf1e721b46076b86228adb8e86b3e5c57d

Checking patch Documentation/using-spectrum/updates.adoc...
Applied patch Documentation/using-spectrum/updates.adoc cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251119-updates-v3-13-b88a99915509@gmail.com/ for 64f085bf1e721b46076b86228adb8e86b3e5c57d
index at:
100644 64f085bf1e721b46076b86228adb8e86b3e5c57d	Documentation/using-spectrum/updates.adoc

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).