patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 8746f97e5d9b36d4960a64544af08f57ff89ce9a 1999 bytes (raw)
name: Documentation/development/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
31
32
33
34
35
36
37
38
39
40
41
42
 
= Updating the OS
:page-parent: Development

// 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

Right now, there is no official update server or update signing key.
However, it is possible to run your own update server.  See
xref:../development/build-configuration.adoc[build configuration]
for how to enable updates for your own Spectrum images.

== Updating the system

If you have built your image with updates enabled, you can update the
system using the `spectrum-update` command.  This takes the path to a
staging directory as argument.  This directory must be on a BTRFS
filesystem.  It is strongly recommended to not use this directory
for any other purpose.  However, it's safe to rename the directory
and use `spectrum-update` with the new path afterwards.

If there is a problem with the update, it's safe to try again.
If that still doesn't work, you can delete the directory and
try again with an empty one.  This will cause `spectrum-update`
to download the latest version even if it is already installed, but
is otherwise harmless.

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.  It is safe to resume
an interrupted update.

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.

See the documentation of
https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html[systemd-sysupdate].
for some of the details.

debug log:

solving 8746f97e5d9b36d4960a64544af08f57ff89ce9a ...
found 8746f97e5d9b36d4960a64544af08f57ff89ce9a in https://inbox.spectrum-os.org/spectrum-devel/20251129-updates-v6-7-9edb87a2e509@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-12-40c438d2dcaf@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-12-fd746748febd@gmail.com/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251129-updates-v6-7-9edb87a2e509@gmail.com/
diff --git a/Documentation/development/updates.adoc b/Documentation/development/updates.adoc
new file mode 100644
index 0000000000000000000000000000000000000000..8746f97e5d9b36d4960a64544af08f57ff89ce9a

Checking patch Documentation/development/updates.adoc...
Applied patch Documentation/development/updates.adoc cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-12-40c438d2dcaf@gmail.com/ for 8746f97e5d9b36d4960a64544af08f57ff89ce9a
skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-12-fd746748febd@gmail.com/ for 8746f97e5d9b36d4960a64544af08f57ff89ce9a
index at:
100644 8746f97e5d9b36d4960a64544af08f57ff89ce9a	Documentation/development/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).