Debian Codegraph @

upstream/debian-trixie/man5/sysupdate.d.5

raw
1 '\" t
2 .TH "SYSUPDATE\&.D" "5" "" "systemd 257.13" "sysupdate.d"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sysupdate.d \- Transfer Definition Files for Automatic Updates
24 .SH "SYNOPSIS"
25 .PP
26 .RS 4
27 /etc/sysupdate\&.d/*\&.transfer
28 .RE
29 .RS 4
30 /run/sysupdate\&.d/*\&.transfer
31 .RE
32 .RS 4
33 /usr/local/lib/sysupdate\&.d/*\&.transfer
34 .RE
35 .RS 4
36 /usr/lib/sysupdate\&.d/*\&.transfer
37 .RE
38 .SH "DESCRIPTION"
39 .PP
40 These files describe how specific resources on the local system shall be updated from a remote source\&. Each such file defines one such transfer: typically a remote HTTP/HTTPS resource as source; and a local file, directory or partition as target\&. This may be used as a simple, automatic, atomic update mechanism for the OS itself, for containers, portable services or system extension images \(em but in fact may be used to update any kind of file from a remote source\&.
41 .PP
42 The
43 \fBsystemd-sysupdate\fR(8)
44 command reads these files and uses them to determine which local resources should be updated, and then executes the update\&.
45 .PP
46 Both the remote HTTP/HTTPS source and the local target typically exist in multiple, concurrent versions, in order to implement flexible update schemes, e\&.g\&. A/B updating (or a superset thereof, e\&.g\&. A/B/C, A/B/C/D, \&...)\&.
47 .PP
48 Each
49 *\&.transfer
50 file defines one transfer, i\&.e\&. describes one resource to update\&. Typically, multiple of these files (i\&.e\&. multiple of such transfers) are defined together, and are bound together by a common version identifier in order to update multiple resources at once on each update operation, for example to update a kernel, a root file system and a Verity partition in a single, combined, synchronized operation, so that only a combined update of all three together constitutes a complete update\&. We\*(Aqll call such a collection of transfers a target\&.
51 \fBsystemd-sysupdate\fR(8)
52 always operates on a single target\&.
53 .PP
54 Transfers may be grouped together into sets that can be individually enabled or disabled by the system administrator, called "Optional Features":
55 \fBsysupdate.features\fR(5)\&.
56 .PP
57 Each
58 *\&.transfer
59 file contains three sections: [Transfer], [Source] and [Target]\&.
60 .SH "BASIC MODE OF OPERATION"
61 .PP
62 Disk\-image based OS updates typically consist of multiple different resources that need to be updated together, for example a secure OS update might consist of a root file system image to drop into a partition, a matching Verity integrity data partition image, and a kernel image prepared to boot into the combination of the two partitions\&. The first two resources are files that are downloaded and placed in a disk partition, the latter is a file that is downloaded and placed in a regular file in the boot file system (e\&.g\&. EFI system partition)\&. Hence, during an update of a hypothetical operating system "foobarOS" to a hypothetical version 47 the following operations should take place:
63 .sp
64 .RS 4
65 .ie n \{\
66 \h'-04' 1.\h'+01'\c
67 .\}
68 .el \{\
69 .sp -1
70 .IP " 1." 4.2
71 .\}
72 A file
73 "https://download\&.example\&.com/foobarOS_47\&.root\&.xz"
74 should be downloaded, decompressed and written to a previously unused partition with GPT partition type UUID 4f68bce3\-e8cd\-4db1\-96e7\-fbcaf984b709 for x86\-64, as per
75 \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[1]\d\s+2\&.
76 .RE
77 .sp
78 .RS 4
79 .ie n \{\
80 \h'-04' 2.\h'+01'\c
81 .\}
82 .el \{\
83 .sp -1
84 .IP " 2." 4.2
85 .\}
86 Similarly, a file
87 "https://download\&.example\&.com/foobarOS_47\&.verity\&.xz"
88 should be downloaded, decompressed and written to a previously empty partition with GPT partition type UUID of 2c7357ed\-ebd2\-46d9\-aec1\-23d437ec2bf5 (i\&.e\&. the partition type for Verity integrity information for x86\-64 root file systems)\&.
89 .RE
90 .sp
91 .RS 4
92 .ie n \{\
93 \h'-04' 3.\h'+01'\c
94 .\}
95 .el \{\
96 .sp -1
97 .IP " 3." 4.2
98 .\}
99 Finally, a file
100 "https://download\&.example\&.com/foobarOS_47\&.efi"
101 (a unified kernel, as per
102 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
103 Type #2) should be downloaded, decompressed and written to the $BOOT file system, i\&.e\&. to
104 EFI/Linux/foobarOS_47\&.efi
105 in the ESP or XBOOTLDR partition\&.
106 .RE
107 .PP
108 The version\-independent generalization of this would be (using the special marker
109 "@v"
110 as wildcard for the version identifier):
111 .sp
112 .RS 4
113 .ie n \{\
114 \h'-04' 1.\h'+01'\c
115 .\}
116 .el \{\
117 .sp -1
118 .IP " 1." 4.2
119 .\}
120 A transfer of a file
121 "https://download\&.example\&.com/foobarOS_@v\&.root\&.xz"
122 → a local, previously empty GPT partition of type 4f68bce3\-e8cd\-4db1\-96e7\-fbcaf984b709, with the label to be set to
123 "foobarOS_@v"\&.
124 .RE
125 .sp
126 .RS 4
127 .ie n \{\
128 \h'-04' 2.\h'+01'\c
129 .\}
130 .el \{\
131 .sp -1
132 .IP " 2." 4.2
133 .\}
134 A transfer of a file
135 "https://download\&.example\&.com/foobarOS_@v\&.verity\&.xz"
136 → a local, previously empty GPT partition of type 2c7357ed\-ebd2\-46d9\-aec1\-23d437ec2bf5, with the label to be set to
137 "foobarOS_@v_verity"\&.
138 .RE
139 .sp
140 .RS 4
141 .ie n \{\
142 \h'-04' 3.\h'+01'\c
143 .\}
144 .el \{\
145 .sp -1
146 .IP " 3." 4.2
147 .\}
148 A transfer of a file
149 "https://download\&.example\&.com/foobarOS_@v\&.efi"
150 → a local file
151 $BOOT/EFI/Linux/foobarOS_@v\&.efi\&.
152 .RE
153 .PP
154 An update can only complete if the relevant URLs provide their resources for the same version, i\&.e\&. for the same value of
155 "@v"\&.
156 .PP
157 The above may be translated into three
158 *\&.transfer
159 files in
160 sysupdate\&.d/, one for each resource to transfer\&. The
161 *\&.transfer
162 files configure the type of download, and what place to write the download to (i\&.e\&. whether to a partition or a file in the file system)\&. Most importantly these files contain the URL, partition name and filename patterns shown above that describe how these resources are called on the source and how they shall be called on the target\&.
163 .PP
164 In order to enumerate available versions and figuring out candidates to update to, a mechanism is necessary to list suitable files:
165 .sp
166 .RS 4
167 .ie n \{\
168 \h'-04'\(bu\h'+03'\c
169 .\}
170 .el \{\
171 .sp -1
172 .IP \(bu 2.3
173 .\}
174 For partitions: the surrounding GPT partition table contains a list of defined partitions, including a partition type UUID and a partition label (in this scheme the partition label plays a role for the partition similar to the filename for a regular file)\&.
175 .RE
176 .sp
177 .RS 4
178 .ie n \{\
179 \h'-04'\(bu\h'+03'\c
180 .\}
181 .el \{\
182 .sp -1
183 .IP \(bu 2.3
184 .\}
185 For regular files: the directory listing of the directory the files are contained in provides a list of existing files in a straightforward way\&.
186 .RE
187 .sp
188 .RS 4
189 .ie n \{\
190 \h'-04'\(bu\h'+03'\c
191 .\}
192 .el \{\
193 .sp -1
194 .IP \(bu 2.3
195 .\}
196 For HTTP/HTTPS sources a simple scheme is used: a manifest file
197 SHA256SUMS, following the format defined by
198 \fBsha256sum\fR(1), lists file names and their SHA256 hashes\&.
199 .RE
200 .PP
201 Transfers are done in the alphabetical order of the
202 \&.transfer
203 file names they are defined in\&. First, the resource data is downloaded directly into a target file/directory/partition\&. Once this is completed for all defined transfers, in a second step the files/directories/partitions are renamed to their final names as defined by the target
204 \fIMatchPattern=\fR, again in the order the
205 \&.transfer
206 transfer file names dictate\&. This step is not atomic, however it is guaranteed to be executed strictly in order with suitable disk synchronization in place\&. Typically, when updating an OS one of the transfers defines the entry point when booting\&. Thus it is generally a good idea to order the resources via the transfer configuration file names so that the entry point is written last, ensuring that any abnormal termination does not leave an entry point around whose backing is not established yet\&. In the example above it would hence make sense to establish the EFI kernel image last and thus give its transfer configuration file the alphabetically last name\&.
207 .PP
208 See below for an extended, more specific example based on the above\&.
209 .SH "RESOURCE TYPES"
210 .PP
211 Each transfer file defines one source resource to transfer to one target resource\&. The following resource types are supported:
212 .sp
213 .RS 4
214 .ie n \{\
215 \h'-04' 1.\h'+01'\c
216 .\}
217 .el \{\
218 .sp -1
219 .IP " 1." 4.2
220 .\}
221 Resources of type
222 "url\-file"
223 encapsulate a file on a web server, referenced via a HTTP or HTTPS URL\&. When an update takes place, the file is downloaded and decompressed and then written to the target file or partition\&. This resource type is only available for sources, not for targets\&. The list of available versions of resources of this type is encoded in
224 SHA256SUMS
225 manifest files, accompanied by
226 SHA256SUMS\&.gpg
227 detached signatures\&.
228 .RE
229 .sp
230 .RS 4
231 .ie n \{\
232 \h'-04' 2.\h'+01'\c
233 .\}
234 .el \{\
235 .sp -1
236 .IP " 2." 4.2
237 .\}
238 The
239 "url\-tar"
240 resource type is similar, but the file must be a
241 \&.tar
242 archive\&. When an update takes place, the file is decompressed and unpacked into a directory or btrfs subvolume\&. This resource type is only available for sources, not for targets\&. Just like
243 "url\-file",
244 "url\-tar"
245 version enumeration makes use of
246 SHA256SUMS
247 files, authenticated via
248 SHA256SUMS\&.gpg\&.
249 .RE
250 .sp
251 .RS 4
252 .ie n \{\
253 \h'-04' 3.\h'+01'\c
254 .\}
255 .el \{\
256 .sp -1
257 .IP " 3." 4.2
258 .\}
259 The
260 "regular\-file"
261 resource type encapsulates a local regular file on disk\&. During updates the file is uncompressed and written to the target file or partition\&. This resource type is available both as source and as target\&. When updating no integrity or authentication verification is done for resources of this type\&.
262 .RE
263 .sp
264 .RS 4
265 .ie n \{\
266 \h'-04' 4.\h'+01'\c
267 .\}
268 .el \{\
269 .sp -1
270 .IP " 4." 4.2
271 .\}
272 The
273 "partition"
274 resource type is similar to
275 "regular\-file", and encapsulates a GPT partition on disk\&. When updating, the partition must exist already, and have the correct GPT partition type\&. A partition whose GPT partition label is set to
276 "_empty"
277 is considered empty, and a candidate to place a newly downloaded resource in\&. The GPT partition label is used to store version information, once a partition is updated\&. This resource type is only available for target resources\&.
278 .RE
279 .sp
280 .RS 4
281 .ie n \{\
282 \h'-04' 5.\h'+01'\c
283 .\}
284 .el \{\
285 .sp -1
286 .IP " 5." 4.2
287 .\}
288 The
289 "tar"
290 resource type encapsulates local
291 \&.tar
292 archive files\&. When an update takes place, the files are uncompressed and unpacked into a target directory or btrfs subvolume\&. Behaviour of
293 "tar"
294 and
295 "url\-tar"
296 is generally similar, but the latter downloads from remote sources, and does integrity and authentication checks while the former does not\&. The
297 "tar"
298 resource type is only available for source resources\&.
299 .RE
300 .sp
301 .RS 4
302 .ie n \{\
303 \h'-04' 6.\h'+01'\c
304 .\}
305 .el \{\
306 .sp -1
307 .IP " 6." 4.2
308 .\}
309 The
310 "directory"
311 resource type encapsulates local directory trees\&. This type is available both for source and target resources\&. If an update takes place on a source resource of this type, a recursive copy of the directory is done\&.
312 .RE
313 .sp
314 .RS 4
315 .ie n \{\
316 \h'-04' 7.\h'+01'\c
317 .\}
318 .el \{\
319 .sp -1
320 .IP " 7." 4.2
321 .\}
322 The
323 "subvolume"
324 resource type is identical to
325 "directory", except when used as the target, in which case the file tree is placed in a btrfs subvolume instead of a plain directory, if the backing file system supports it (i\&.e\&. is btrfs)\&.
326 .RE
327 .PP
328 As already indicated, only a subset of source and target resource type combinations are supported:
329 .sp
330 .it 1 an-trap
331 .nr an-no-space-flag 1
332 .nr an-break-flag 1
333 .br
334 .B Table\ \&1.\ \&Resource Types
335 .TS
336 allbox tab(:);
337 lB lB lB lB lB lB lB lB.
338 T{
339 Identifier
340 T}:T{
341 Description
342 T}:T{
343 Usable as Source
344 T}:T{
345 When Used as Source: Compatible Targets
346 T}:T{
347 When Used as Source: Integrity + Authentication
348 T}:T{
349 When Used as Source: Decompression
350 T}:T{
351 Usable as Target
352 T}:T{
353 When Used as Target: Compatible Sources
354 T}
355 .T&
356 l l l l l l l l
357 l l l l l l l l
358 l l l l l l l l
359 l l l l l l l l
360 l l l l l l l l
361 l l l l l l l l
362 l l l l l l l l.
363 T{
364 \fBurl\-file\fR
365 T}:T{
366 HTTP/HTTPS files
367 T}:T{
368 yes
369 T}:T{
370 \fBregular\-file\fR, \fBpartition\fR
371 T}:T{
372 yes
373 T}:T{
374 yes
375 T}:T{
376 no
377 T}:T{
378 \-
379 T}
380 T{
381 \fBurl\-tar\fR
382 T}:T{
383 HTTP/HTTPS \&.tar archives
384 T}:T{
385 yes
386 T}:T{
387 \fBdirectory\fR, \fBsubvolume\fR
388 T}:T{
389 yes
390 T}:T{
391 yes
392 T}:T{
393 no
394 T}:T{
395 \-
396 T}
397 T{
398 \fBregular\-file\fR
399 T}:T{
400 Local files
401 T}:T{
402 yes
403 T}:T{
404 \fBregular\-file\fR, \fBpartition\fR
405 T}:T{
406 no
407 T}:T{
408 yes
409 T}:T{
410 yes
411 T}:T{
412 \fBurl\-file\fR, \fBregular\-file\fR
413 T}
414 T{
415 \fBpartition\fR
416 T}:T{
417 Local GPT partitions
418 T}:T{
419 no
420 T}:T{
421 \-
422 T}:T{
423 \-
424 T}:T{
425 \-
426 T}:T{
427 yes
428 T}:T{
429 \fBurl\-file\fR, \fBregular\-file\fR
430 T}
431 T{
432 \fBtar\fR
433 T}:T{
434 Local \&.tar archives
435 T}:T{
436 yes
437 T}:T{
438 \fBdirectory\fR, \fBsubvolume\fR
439 T}:T{
440 no
441 T}:T{
442 yes
443 T}:T{
444 no
445 T}:T{
446 \-
447 T}
448 T{
449 \fBdirectory\fR
450 T}:T{
451 Local directories
452 T}:T{
453 yes
454 T}:T{
455 \fBdirectory\fR, \fBsubvolume\fR
456 T}:T{
457 no
458 T}:T{
459 no
460 T}:T{
461 yes
462 T}:T{
463 \fBurl\-tar\fR, \fBtar\fR, \fBdirectory\fR, \fBsubvolume\fR
464 T}
465 T{
466 \fBsubvolume\fR
467 T}:T{
468 Local btrfs subvolumes
469 T}:T{
470 yes
471 T}:T{
472 \fBdirectory\fR, \fBsubvolume\fR
473 T}:T{
474 no
475 T}:T{
476 no
477 T}:T{
478 yes
479 T}:T{
480 \fBurl\-tar\fR, \fBtar\fR, \fBdirectory\fR, \fBsubvolume\fR
481 T}
482 .TE
483 .sp 1
484 .SH "MATCH PATTERNS"
485 .PP
486 Both the source and target resources typically exist in multiple versions concurrently\&. An update operation is done whenever the newest of the source versions is newer than the newest of the target versions\&. To determine the newest version of the resources a directory listing, partition listing or manifest listing is used, a subset of qualifying entries selected from that, and the version identifier extracted from the file names or partition labels of these selected entries\&. Subset selection and extraction of the version identifier (plus potentially other metadata) is done via match patterns, configured in
487 \fIMatchPattern=\fR
488 in the [Source] and [Target] sections\&. These patterns are strings that describe how files or partitions are named, with named wildcards for specific fields such as the version identifier\&. The following wildcards are defined:
489 .sp
490 .it 1 an-trap
491 .nr an-no-space-flag 1
492 .nr an-break-flag 1
493 .br
494 .B Table\ \&2.\ \&Match Pattern Wildcards
495 .TS
496 allbox tab(:);
497 lB lB lB lB.
498 T{
499 Wildcard
500 T}:T{
501 Description
502 T}:T{
503 Format
504 T}:T{
505 Notes
506 T}
507 .T&
508 l l l l
509 l l l l
510 l l l l
511 l l l l
512 l l l l
513 l l l l
514 l l l l
515 l l l l
516 l l l l
517 l l l l
518 l l l l
519 l l l l.
520 T{
521 "@v"
522 T}:T{
523 Version identifier
524 T}:T{
525 Valid version string
526 T}:T{
527 Mandatory
528 T}
529 T{
530 "@u"
531 T}:T{
532 GPT partition UUID
533 T}:T{
534 Valid 128\-Bit UUID string
535 T}:T{
536 Only relevant if target resource type chosen as \fBpartition\fR
537 T}
538 T{
539 "@f"
540 T}:T{
541 GPT partition flags
542 T}:T{
543 Formatted hexadecimal integer
544 T}:T{
545 Only relevant if target resource type chosen as \fBpartition\fR
546 T}
547 T{
548 "@a"
549 T}:T{
550 GPT partition flag NoAuto
551 T}:T{
552 Either "0" or "1"
553 T}:T{
554 Controls NoAuto bit of the GPT partition flags, as per \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[1]\d\s+2; only relevant if target resource type chosen as \fBpartition\fR
555 T}
556 T{
557 "@g"
558 T}:T{
559 GPT partition flag GrowFileSystem
560 T}:T{
561 Either "0" or "1"
562 T}:T{
563 Controls GrowFileSystem bit of the GPT partition flags, as per \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[1]\d\s+2; only relevant if target resource type chosen as \fBpartition\fR
564 T}
565 T{
566 "@r"
567 T}:T{
568 Read\-only flag
569 T}:T{
570 Either "0" or "1"
571 T}:T{
572 Controls ReadOnly bit of the GPT partition flags, as per \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[1]\d\s+2 and other output read\-only flags, see \fIReadOnly=\fR below
573 T}
574 T{
575 "@t"
576 T}:T{
577 File modification time
578 T}:T{
579 Formatted decimal integer, μs since UNIX epoch Jan 1st 1970
580 T}:T{
581 Only relevant if target resource type chosen as \fBregular\-file\fR
582 T}
583 T{
584 "@m"
585 T}:T{
586 File access mode
587 T}:T{
588 Formatted octal integer, in UNIX fashion
589 T}:T{
590 Only relevant if target resource type chosen as \fBregular\-file\fR
591 T}
592 T{
593 "@s"
594 T}:T{
595 File size after decompression
596 T}:T{
597 Formatted decimal integer
598 T}:T{
599 Useful for measuring progress and to improve partition allocation logic
600 T}
601 T{
602 "@d"
603 T}:T{
604 Tries done
605 T}:T{
606 Formatted decimal integer
607 T}:T{
608 Useful when operating with kernel image files, as per \m[blue]\fBAutomatic Boot Assessment\fR\m[]\&\s-2\u[3]\d\s+2
609 T}
610 T{
611 "@l"
612 T}:T{
613 Tries left
614 T}:T{
615 Formatted decimal integer
616 T}:T{
617 Useful when operating with kernel image files, as per \m[blue]\fBAutomatic Boot Assessment\fR\m[]\&\s-2\u[3]\d\s+2
618 T}
619 T{
620 "@h"
621 T}:T{
622 SHA256 hash of compressed file
623 T}:T{
624 64 hexadecimal characters
625 T}:T{
626 The SHA256 hash of the compressed file; not useful for \fBurl\-file\fR or \fBurl\-tar\fR where the SHA256 hash is already included in the manifest file anyway
627 T}
628 .TE
629 .sp 1
630 .PP
631 Of these wildcards only
632 "@v"
633 must be present in a valid pattern, all other wildcards are optional\&. Each wildcard may be used at most once in each pattern\&. A typical wildcard matching a file system source image could be
634 "MatchPattern=foobar_@v\&.raw\&.xz", i\&.e\&. any file whose name begins with
635 "foobar_", followed by a version ID and suffixed by
636 "\&.raw\&.xz"\&.
637 .PP
638 Do not confuse the
639 "@"
640 pattern matching wildcard prefix with the
641 "%"
642 specifier expansion prefix\&. The former encapsulate a variable part of a match pattern string, the latter are simple shortcuts that are expanded while the drop\-in files are parsed\&. For details about specifiers, see below\&.
643 .SH "[TRANSFER] SECTION OPTIONS"
644 .PP
645 This section defines general properties of this transfer\&.
646 .PP
647 \fIMinVersion=\fR
648 .RS 4
649 Specifies the minimum version to require for this transfer to take place\&. If the source or target patterns in this transfer definition match files older than this version they will be considered obsolete, and never be considered for the update operation\&.
650 .sp
651 Added in version 251\&.
652 .RE
653 .PP
654 \fIProtectVersion=\fR
655 .RS 4
656 Takes one or more version strings to mark as "protected"\&. Protected versions are never removed while making room for new, updated versions\&. This is useful to ensure that the currently booted OS version (or auxiliary resources associated with it) is not replaced/overwritten during updates, in order to avoid runtime file system corruptions\&.
657 .sp
658 Like many of the settings in these configuration files this setting supports specifier expansion\&. It\*(Aqs particularly useful to set this setting to one of the
659 "%A",
660 "%B"
661 or
662 "%w"
663 specifiers to automatically refer to the current OS version of the running system\&. See below for details on supported specifiers\&.
664 .sp
665 Added in version 251\&.
666 .RE
667 .PP
668 \fIVerify=\fR
669 .RS 4
670 Takes a boolean, defaults to yes\&. Controls whether to cryptographically verify downloaded resources (specifically: validate the GPG signatures for downloaded
671 SHA256SUMS
672 manifest files, via their detached signature files
673 SHA256SUMS\&.gpg
674 in combination with the system keyring
675 /usr/lib/systemd/import\-pubring\&.gpg
676 or
677 /etc/systemd/import\-pubring\&.gpg)\&.
678 .sp
679 This option is essential to provide integrity guarantees for downloaded resources and thus should be left enabled, outside of test environments\&.
680 .sp
681 Note that the downloaded payload files are unconditionally checked against the SHA256 hashes listed in the manifest\&. This option only controls whether the signatures of these manifests are verified\&.
682 .sp
683 This option only has an effect if the source resource type is selected as
684 \fBurl\-file\fR
685 or
686 \fBurl\-tar\fR, as integrity and authentication checking is only available for transfers from remote sources\&.
687 .sp
688 Added in version 251\&.
689 .RE
690 .PP
691 \fIChangeLog=\fR
692 .RS 4
693 Optionally takes a human\-presentable URL to a website containing a change\-log of the resource being updated\&.
694 .sp
695 This may be set multiple times in a single transfer definition\&. If set multiple times, the values are gathered into a list of URLs\&. Adding a value of the empty string will clear the existing list of all values\&.
696 .sp
697 This setting supports specifier expansion\&. See below for details on supported specifiers\&. This setting will also expand the
698 "@v"
699 wildcard pattern\&. See above for details\&.
700 .sp
701 Added in version 257\&.
702 .RE
703 .PP
704 \fIAppStream=\fR
705 .RS 4
706 Optionally takes a URL to an
707 \m[blue]\fBAppStream catalog\fR\m[]\&\s-2\u[4]\d\s+2
708 XML file\&. This may be used by software centers (such as GNOME Software or KDE Discover) to present rich metadata about the resources being updated\&. This includes display names, changelogs, icons, and more\&. The specified catalog must include
709 \m[blue]\fBspecial metadata\fR\m[]\&\s-2\u[5]\d\s+2
710 to be correctly associated with
711 \fBsystemd-sysupdate\fR(8)
712 by the software centers\&.
713 .sp
714 This setting supports specifier expansion\&. See below for details on supported specifiers\&.
715 .sp
716 Added in version 257\&.
717 .RE
718 .PP
719 \fIFeatures=\fR
720 .RS 4
721 A space\-separated list of
722 \fBsysupdate.features\fR(5)
723 that this transfer belongs to, by name\&. This option may be specified more than once, in which case the specified list of features is merged\&. If the empty string is assigned to this option, the list is reset and all prior assignments will have no effect\&. For example:
724 "Features=foo bar"
725 specifies that the transfer belongs to
726 "foo\&.feature"
727 and
728 "bar\&.feature"\&.
729 .sp
730 If the list of features is empty, then this transfer is always used\&. If this transfer belongs to more than one feature, then it will be used if
731 \fIany\fR
732 one of the listed features is enabled\&. A name that does not correspond to a defined feature will resolve to an implicit feature that is always disabled\&.
733 .sp
734 Added in version 257\&.
735 .RE
736 .PP
737 \fIRequisiteFeatures=\fR
738 .RS 4
739 This is like
740 \fIFeatures=\fR, except that
741 \fIall\fR
742 features listed here must be enabled for this transfer to be enabled\&. If both options are specified, then they both apply: the transfer will be enabled only if all features specified here are enabled, and at least one feature listed in
743 \fIFeatures=\fR
744 is enabled\&.
745 .sp
746 Added in version 257\&.
747 .RE
748 .SH "[SOURCE] SECTION OPTIONS"
749 .PP
750 This section defines properties of the transfer source\&.
751 .PP
752 \fIType=\fR
753 .RS 4
754 Specifies the resource type of the source for the transfer\&. Takes one of
755 \fBurl\-file\fR,
756 \fBurl\-tar\fR,
757 \fBtar\fR,
758 \fBregular\-file\fR,
759 \fBdirectory\fR
760 or
761 \fBsubvolume\fR\&. For details about the resource types, see above\&. This option is mandatory\&.
762 .sp
763 Note that only certain combinations of source and target resource types are supported, see above\&.
764 .sp
765 Added in version 251\&.
766 .RE
767 .PP
768 \fIPath=\fR
769 .RS 4
770 Specifies where to find source versions of this resource\&.
771 .sp
772 If the source type is selected as
773 \fBurl\-file\fR
774 or
775 \fBurl\-tar\fR
776 this must be a HTTP/HTTPS URL\&. The URL is suffixed with
777 /SHA256SUMS
778 to acquire the manifest file, with
779 /SHA256SUMS\&.gpg
780 to acquire the detached signature file for it, and with the file names listed in the manifest file in case an update is executed and a resource shall be downloaded\&.
781 .sp
782 For all other source resource types this must be a local path in the file system, referring to a local directory to find the versions of this resource in\&.
783 .sp
784 Added in version 251\&.
785 .RE
786 .PP
787 \fIMatchPattern=\fR
788 .RS 4
789 Specifies one or more file name match patterns that select the subset of files that are update candidates as source for this transfer\&. See above for details on match patterns\&.
790 .sp
791 This option is mandatory\&. Any pattern listed must contain at least the
792 "@v"
793 wildcard, so that a version identifier may be extracted from the filename\&. All other wildcards are optional\&.
794 .sp
795 If the source type is
796 \fBregular\-file\fR
797 or
798 \fBdirectory\fR, the pattern may contain slash characters\&. In this case, it will match the file or directory in corresponding subdirectory\&. For example
799 "MatchPattern=foo_@v/bar\&.efi"
800 will match
801 "bar\&.efi"
802 in directory
803 "foo_1"\&.
804 .sp
805 Added in version 251\&.
806 .RE
807 .SH "[TARGET] SECTION OPTIONS"
808 .PP
809 This section defines properties of the transfer target\&.
810 .PP
811 \fIType=\fR
812 .RS 4
813 Specifies the resource type of the target for the transfer\&. Takes one of
814 \fBpartition\fR,
815 \fBregular\-file\fR,
816 \fBdirectory\fR
817 or
818 \fBsubvolume\fR\&. For details about the resource types, see above\&. This option is mandatory\&.
819 .sp
820 Note that only certain combinations of source and target resource types are supported, see above\&.
821 .sp
822 Added in version 251\&.
823 .RE
824 .PP
825 \fIPath=\fR
826 .RS 4
827 Specifies a file system path where to look for already installed versions or place newly downloaded versions of this configured resource\&. If
828 \fIType=\fR
829 is set to
830 \fBpartition\fR, expects a path to a (whole) block device node, or the special string
831 "auto"
832 in which case the block device which contains the root file system of the currently booted system is automatically determined and used\&. If
833 \fIType=\fR
834 is set to
835 \fBregular\-file\fR,
836 \fBdirectory\fR
837 or
838 \fBsubvolume\fR, must refer to a path in the local file system referencing the directory to find or place the version files or directories under\&.
839 .sp
840 Note that this mechanism cannot be used to create or remove partitions, in case
841 \fIType=\fR
842 is set to
843 \fBpartition\fR\&. Partitions must exist already, and a special partition label
844 "_empty"
845 is used to indicate empty partitions\&. To automatically generate suitable partitions on first boot, use a tool such as
846 \fBsystemd-repart\fR(8)\&.
847 .sp
848 Added in version 251\&.
849 .RE
850 .PP
851 \fIPathRelativeTo=\fR
852 .RS 4
853 Specifies what anchor point
854 \fIPath=\fR
855 should be relative to\&. Takes one of
856 \fBroot\fR,
857 \fBesp\fR,
858 \fBxbootldr\fR,
859 \fBboot\fR
860 or
861 \fBdirectory\fR\&. If unspecified, defaults to
862 \fBroot\fR\&.
863 .sp
864 If set to
865 \fBroot\fR,
866 \fBesp\fR,
867 \fBxbootldr\fR, the specified
868 \fIPath=\fR
869 will be resolved relative to the mount point of the corresponding partition, as defined by the
870 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
871 .sp
872 If set to
873 \fBboot\fR, the specified
874 \fIPath=\fR
875 will be resolved relative to the mount point of the $BOOT partition (i\&.e\&. the ESP or XBOOTLDR), as defined by the
876 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2\&.
877 .sp
878 If set to
879 \fBexplicit\fR, the specified
880 \fIPath=\fR
881 will be resolved relative to the directory specified with
882 \fB\-\-transfer\-source=\fR
883 when invoking
884 \fBsystemd-sysupdate\fR(8)\&.
885 .sp
886 The values
887 \fBesp\fR,
888 \fBxbootldr\fR, and
889 \fBboot\fR
890 are only supported when
891 \fIType=\fR
892 is set to
893 \fBregular\-file\fR
894 or
895 \fBdirectory\fR\&.
896 .sp
897 Added in version 254\&.
898 .RE
899 .PP
900 \fIMatchPattern=\fR
901 .RS 4
902 Specifies one or more file name or partition label match patterns that select the subset of files or partitions that are update candidates as targets for this transfer\&. See above for details on match patterns\&.
903 .sp
904 This option is mandatory\&. Any pattern listed must contain at least the
905 "@v"
906 wildcard, so that a version identifier may be extracted from the filename\&. All other wildcards are optional\&.
907 .sp
908 This pattern is both used for matching existing installed versions and for determining the name of new versions to install\&. If multiple patterns are specified, the first specified is used for naming newly installed versions\&.
909 .sp
910 If the target type is
911 \fBregular\-file\fR
912 or
913 \fBdirectory\fR, the pattern may contain slash characters\&. In this case, it will match the file or directory in corresponding subdirectory\&. For example
914 "MatchPattern=foo_@v/bar\&.efi"
915 will match
916 "bar\&.efi"
917 in directory
918 "foo_1"\&. Directories in the path will be created when file is installed\&. Empty directories will be removed when file is removed\&.
919 .sp
920 Added in version 251\&.
921 .RE
922 .PP
923 \fIMatchPartitionType=\fR
924 .RS 4
925 When the target
926 \fIType=\fR
927 is chosen as
928 \fBpartition\fR, specifies the GPT partition type to look for\&. Only partitions of this type are considered, all other partitions are ignored\&. If not specified, the GPT partition type
929 \fBlinux\-generic\fR
930 is used\&. Accepts either a literal type UUID or a symbolic type identifier\&. For a list of supported type identifiers, see the
931 \fIType=\fR
932 setting in
933 \fBrepart.d\fR(5)\&.
934 .sp
935 Added in version 251\&.
936 .RE
937 .PP
938 \fIPartitionUUID=\fR, \fIPartitionFlags=\fR, \fIPartitionNoAuto=\fR, \fIPartitionGrowFileSystem=\fR
939 .RS 4
940 When the target
941 \fIType=\fR
942 is picked as
943 \fBpartition\fR, selects the GPT partition UUID and partition flags to use for the updated partition\&. Expects a valid UUID string, a hexadecimal integer, or booleans, respectively\&. If not set, but the source match pattern includes wildcards for these fields (i\&.e\&.
944 "@u",
945 "@f",
946 "@a", or
947 "@g"), the values from the patterns are used\&. If neither configured with wildcards or these explicit settings, the values are left untouched\&. If both the overall
948 \fIPartitionFlags=\fR
949 flags setting and the individual flag settings
950 \fIPartitionNoAuto=\fR
951 and
952 \fIPartitionGrowFileSystem=\fR
953 are used (or the wildcards for them), then the latter override the former, i\&.e\&. the individual flag bit overrides the overall flags value\&. See
954 \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[1]\d\s+2
955 for details about these flags\&.
956 .sp
957 Note that these settings are not used for matching, they only have effect on newly written partitions in case a transfer takes place\&.
958 .sp
959 Added in version 251\&.
960 .RE
961 .PP
962 \fIReadOnly=\fR
963 .RS 4
964 Controls whether to mark the resulting file, subvolume or partition read\-only\&. If the target type is
965 \fBpartition\fR
966 this controls the ReadOnly partition flag, as per
967 \m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[1]\d\s+2, similar to the
968 \fIPartitionNoAuto=\fR
969 and
970 \fIPartitionGrowFileSystem=\fR
971 flags described above\&. If the target type is
972 \fBregular\-file\fR, the writable bit is removed from the access mode\&. If the target type is
973 \fBsubvolume\fR, the subvolume will be marked read\-only as a whole\&. Finally, if the target
974 \fIType=\fR
975 is selected as
976 \fBdirectory\fR, the "immutable" file attribute is set, see
977 \fBchattr\fR(1)
978 for details\&.
979 .sp
980 Added in version 251\&.
981 .RE
982 .PP
983 \fIMode=\fR
984 .RS 4
985 The UNIX file access mode to use for newly created files in case the target resource type is picked as
986 \fBregular\-file\fR\&. Expects an octal integer, in typical UNIX fashion\&. If not set, but the source match pattern includes a wildcard for this field (i\&.e\&.
987 "@t"), the value from the pattern is used\&.
988 .sp
989 Note that this setting is not used for matching, it only has an effect on newly written files when a transfer takes place\&.
990 .sp
991 Added in version 251\&.
992 .RE
993 .PP
994 \fITriesDone=\fR, \fITriesLeft=\fR
995 .RS 4
996 These options take positive, decimal integers, and control the number of attempts done and left for this file\&. These settings are useful for managing kernel images, following the scheme defined in
997 \m[blue]\fBAutomatic Boot Assessment\fR\m[]\&\s-2\u[3]\d\s+2, and only have an effect if the target pattern includes the
998 "@d"
999 or
1000 "@l"
1001 wildcards\&.
1002 .sp
1003 Added in version 251\&.
1004 .RE
1005 .PP
1006 \fIInstancesMax=\fR
1007 .RS 4
1008 Takes a decimal integer equal to or greater than 2\&. This configures how many concurrent versions of the resource to keep\&. Whenever a new update is initiated it is made sure that no more than the number of versions specified here minus one exist in the target\&. Any excess versions are deleted (in case the target
1009 \fIType=\fR
1010 of
1011 \fBregular\-file\fR,
1012 \fBdirectory\fR,
1013 \fBsubvolume\fR
1014 is used) or emptied (in case the target
1015 \fIType=\fR
1016 of
1017 \fBpartition\fR
1018 is used; emptying in this case simply means to set the partition label to the special string
1019 "_empty"; note that no partitions are actually removed)\&. After an update is completed the number of concurrent versions of the target resources is equal to or below the number specified here\&.
1020 .sp
1021 Note that this setting may be set differently for each transfer\&. However, it generally is advisable to keep this setting the same for all transfers, since otherwise incomplete combinations of files or partitions will be left installed\&.
1022 .sp
1023 If the target
1024 \fIType=\fR
1025 is selected as
1026 \fBpartition\fR, the number of concurrent versions to keep is additionally restricted by the number of partition slots of the right type in the partition table\&. I\&.e\&. if there are only 2 partition slots for the selected partition type, setting this value larger than 2 is without effect, since no more than 2 concurrent versions could be stored in the image anyway\&.
1027 .sp
1028 Added in version 251\&.
1029 .RE
1030 .PP
1031 \fIRemoveTemporary=\fR
1032 .RS 4
1033 Takes a boolean argument\&. If this option is enabled (which is the default) before initiating an update, all left\-over, incomplete updates from a previous attempt are removed from the target directory\&. This only has an effect if the target resource
1034 \fIType=\fR
1035 is selected as
1036 \fBregular\-file\fR,
1037 \fBdirectory\fR
1038 or
1039 \fBsubvolume\fR\&.
1040 .sp
1041 Added in version 251\&.
1042 .RE
1043 .PP
1044 \fICurrentSymlink=\fR
1045 .RS 4
1046 Takes a symlink name as argument\&. If this option is used, as the last step of the update a symlink under the specified name is created/updated pointing to the completed update\&. This is useful in to provide a stable name always pointing to the newest version of the resource\&. This is only supported if the target resource
1047 \fIType=\fR
1048 is selected as
1049 \fBregular\-file\fR,
1050 \fBdirectory\fR
1051 or
1052 \fBsubvolume\fR\&.
1053 .sp
1054 Added in version 251\&.
1055 .RE
1056 .SH "SPECIFIERS"
1057 .PP
1058 Specifiers may be used in the
1059 \fIMinVersion=\fR,
1060 \fIProtectVersion=\fR,
1061 \fIPath=\fR,
1062 \fIMatchPattern=\fR
1063 and
1064 \fICurrentSymlink=\fR
1065 settings\&. The following expansions are understood:
1066 .sp
1067 .it 1 an-trap
1068 .nr an-no-space-flag 1
1069 .nr an-break-flag 1
1070 .br
1071 .B Table\ \&3.\ \&Specifiers available
1072 .TS
1073 allbox tab(:);
1074 lB lB lB.
1075 T{
1076 Specifier
1077 T}:T{
1078 Meaning
1079 T}:T{
1080 Details
1081 T}
1082 .T&
1083 l l l
1084 l l l
1085 l l l
1086 l l l
1087 l l l
1088 l l l
1089 l l l
1090 l l l
1091 l l l
1092 l l l
1093 l l l
1094 l l l
1095 l l l
1096 l l l
1097 l l l.
1098 T{
1099 "%a"
1100 T}:T{
1101 Architecture
1102 T}:T{
1103 A short string identifying the architecture of the local system\&. A string such as \fBx86\fR, \fBx86\-64\fR or \fBarm64\fR\&. See the architectures defined for \fIConditionArchitecture=\fR in \fBsystemd.unit\fR(5) for a full list\&.
1104 T}
1105 T{
1106 "%A"
1107 T}:T{
1108 Operating system image version
1109 T}:T{
1110 The operating system image version identifier of the running system, as read from the \fIIMAGE_VERSION=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
1111 T}
1112 T{
1113 "%b"
1114 T}:T{
1115 Boot ID
1116 T}:T{
1117 The boot ID of the running system, formatted as string\&. See \fBrandom\fR(4) for more information\&.
1118 T}
1119 T{
1120 "%B"
1121 T}:T{
1122 Operating system build ID
1123 T}:T{
1124 The operating system build identifier of the running system, as read from the \fIBUILD_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
1125 T}
1126 T{
1127 "%H"
1128 T}:T{
1129 Host name
1130 T}:T{
1131 The hostname of the running system\&.
1132 T}
1133 T{
1134 "%l"
1135 T}:T{
1136 Short host name
1137 T}:T{
1138 The hostname of the running system, truncated at the first dot to remove any domain component\&.
1139 T}
1140 T{
1141 "%m"
1142 T}:T{
1143 Machine ID
1144 T}:T{
1145 The machine ID of the running system, formatted as string\&. See \fBmachine-id\fR(5) for more information\&.
1146 T}
1147 T{
1148 "%M"
1149 T}:T{
1150 Operating system image identifier
1151 T}:T{
1152 The operating system image identifier of the running system, as read from the \fIIMAGE_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
1153 T}
1154 T{
1155 "%o"
1156 T}:T{
1157 Operating system ID
1158 T}:T{
1159 The operating system identifier of the running system, as read from the \fIID=\fR field of /etc/os\-release\&. See \fBos-release\fR(5) for more information\&.
1160 T}
1161 T{
1162 "%v"
1163 T}:T{
1164 Kernel release
1165 T}:T{
1166 Identical to \fBuname \-r\fR output\&.
1167 T}
1168 T{
1169 "%w"
1170 T}:T{
1171 Operating system version ID
1172 T}:T{
1173 The operating system version identifier of the running system, as read from the \fIVERSION_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
1174 T}
1175 T{
1176 "%W"
1177 T}:T{
1178 Operating system variant ID
1179 T}:T{
1180 The operating system variant identifier of the running system, as read from the \fIVARIANT_ID=\fR field of /etc/os\-release\&. If not set, resolves to an empty string\&. See \fBos-release\fR(5) for more information\&.
1181 T}
1182 T{
1183 "%T"
1184 T}:T{
1185 Directory for temporary files
1186 T}:T{
1187 This is either /tmp or the path "$TMPDIR", "$TEMP" or "$TMP" are set to\&. (Note that the directory may be specified without a trailing slash\&.)
1188 T}
1189 T{
1190 "%V"
1191 T}:T{
1192 Directory for larger and persistent temporary files
1193 T}:T{
1194 This is either /var/tmp or the path "$TMPDIR", "$TEMP" or "$TMP" are set to\&. (Note that the directory may be specified without a trailing slash\&.)
1195 T}
1196 T{
1197 "%%"
1198 T}:T{
1199 Single percent sign
1200 T}:T{
1201 Use "%%" in place of "%" to specify a single percent sign\&.
1202 T}
1203 .TE
1204 .sp 1
1205 .PP
1206 Do not confuse the
1207 "%"
1208 specifier expansion prefix with the
1209 "@"
1210 pattern matching wildcard prefix\&. The former are simple shortcuts that are expanded while the drop\-in files are parsed, the latter encapsulate a variable part of a match pattern string\&. For details about pattern matching wildcards, see above\&.
1211 .SH "EXAMPLES"
1212 .PP
1213 \fBExample\ \&1.\ \&Updates for a Verity Enabled Secure OS\fR
1214 .PP
1215 With the following three files we define a root file system partition, a matching Verity partition, and a unified kernel image to update as one\&. This example is an extension of the example discussed earlier in this man page\&.
1216 .PP
1217 .if n \{\
1218 .RS 4
1219 .\}
1220 .nf
1221 # /usr/lib/sysupdate\&.d/50\-verity\&.transfer
1222 [Transfer]
1223 ProtectVersion=%A
1224
1225 [Source]
1226 Type=url\-file
1227 Path=https://download\&.example\&.com/
1228 MatchPattern=foobarOS_@v_@u\&.verity\&.xz
1229
1230 [Target]
1231 Type=partition
1232 Path=auto
1233 MatchPattern=foobarOS_@v_verity
1234 MatchPartitionType=root\-verity
1235 PartitionFlags=0
1236 ReadOnly=1
1237 .fi
1238 .if n \{\
1239 .RE
1240 .\}
1241 .PP
1242 The above defines the update mechanism for the Verity partition of the root file system\&. Verity partition images are downloaded from
1243 "https://download\&.example\&.com/foobarOS_@v_@u\&.verity\&.xz"
1244 and written to a suitable local partition, which is marked read\-only\&. Under the assumption this update is run from the image itself the current image version (i\&.e\&. the
1245 "%A"
1246 specifier) is marked as protected, to ensure it is not corrupted while booted\&. Note that the partition UUID for the target partition is encoded in the source file name\&. Fixating the partition UUID can be useful to ensure that
1247 "roothash="
1248 on the kernel command line is sufficient to pinpoint both the Verity and root file system partition, and also encode the Verity root level hash (under the assumption the UUID in the file names match their top\-level hash, the way
1249 \fBsystemd-gpt-auto-generator\fR(8)
1250 suggests)\&.
1251 .PP
1252 .if n \{\
1253 .RS 4
1254 .\}
1255 .nf
1256 # /usr/lib/sysupdate\&.d/60\-root\&.transfer
1257 [Transfer]
1258 ProtectVersion=%A
1259
1260 [Source]
1261 Type=url\-file
1262 Path=https://download\&.example\&.com/
1263 MatchPattern=foobarOS_@v_@u\&.root\&.xz
1264
1265 [Target]
1266 Type=partition
1267 Path=auto
1268 MatchPattern=foobarOS_@v
1269 MatchPartitionType=root
1270 PartitionFlags=0
1271 ReadOnly=1
1272 .fi
1273 .if n \{\
1274 .RE
1275 .\}
1276 .PP
1277 The above defines a matching transfer definition for the root file system\&.
1278 .PP
1279 .if n \{\
1280 .RS 4
1281 .\}
1282 .nf
1283 # /usr/lib/sysupdate\&.d/70\-kernel\&.transfer
1284 [Transfer]
1285 ProtectVersion=%A
1286
1287 [Source]
1288 Type=url\-file
1289 Path=https://download\&.example\&.com/
1290 MatchPattern=foobarOS_@v\&.efi
1291
1292 [Target]
1293 Type=regular\-file
1294 Path=/EFI/Linux
1295 PathRelativeTo=boot
1296 MatchPattern=foobarOS_@v+@l\-@d\&.efi \e
1297 foobarOS_@v+@l\&.efi \e
1298 foobarOS_@v\&.efi
1299 Mode=0644
1300 TriesLeft=3
1301 TriesDone=0
1302 InstancesMax=2
1303 .fi
1304 .if n \{\
1305 .RE
1306 .\}
1307 .PP
1308 The above installs a unified kernel image into the $BOOT partition, as per
1309 \m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
1310 Type #2\&. This defines three possible patterns for the names of the kernel images, as per
1311 \m[blue]\fBAutomatic Boot Assessment\fR\m[]\&\s-2\u[3]\d\s+2, and ensures when installing new kernels, they are set up with 3 tries left\&. No more than two parallel kernels are kept\&.
1312 .PP
1313 With this setup the web server would serve the following files, for a hypothetical version 7 of the OS:
1314 .sp
1315 .RS 4
1316 .ie n \{\
1317 \h'-04'\(bu\h'+03'\c
1318 .\}
1319 .el \{\
1320 .sp -1
1321 .IP \(bu 2.3
1322 .\}
1323 SHA256SUMS
1324 \(en The manifest file, containing available files and their SHA256 hashes
1325 .RE
1326 .sp
1327 .RS 4
1328 .ie n \{\
1329 \h'-04'\(bu\h'+03'\c
1330 .\}
1331 .el \{\
1332 .sp -1
1333 .IP \(bu 2.3
1334 .\}
1335 SHA256SUMS\&.gpg
1336 \(en The detached cryptographic signature for the manifest file
1337 .RE
1338 .sp
1339 .RS 4
1340 .ie n \{\
1341 \h'-04'\(bu\h'+03'\c
1342 .\}
1343 .el \{\
1344 .sp -1
1345 .IP \(bu 2.3
1346 .\}
1347 foobarOS_7_8b8186b1\-2b4e\-4eb6\-ad39\-8d4d18d2a8fb\&.verity\&.xz
1348 \(en The Verity image for version 7
1349 .RE
1350 .sp
1351 .RS 4
1352 .ie n \{\
1353 \h'-04'\(bu\h'+03'\c
1354 .\}
1355 .el \{\
1356 .sp -1
1357 .IP \(bu 2.3
1358 .\}
1359 foobarOS_7_f4d1234f\-3ebf\-47c4\-b31d\-4052982f9a2f\&.root\&.xz
1360 \(en The root file system image for version 7
1361 .RE
1362 .sp
1363 .RS 4
1364 .ie n \{\
1365 \h'-04'\(bu\h'+03'\c
1366 .\}
1367 .el \{\
1368 .sp -1
1369 .IP \(bu 2.3
1370 .\}
1371 foobarOS_7\&.efi
1372 \(en The unified kernel image for version 7
1373 .RE
1374 .PP
1375 For each new OS release a new set of the latter three files would be added, each time with an updated version\&. The
1376 SHA256SUMS
1377 manifest should then be updated accordingly, listing all files for all versions that shall be offered for download\&.
1378 .PP
1379 \fBExample\ \&2.\ \&Updates for Plain Directory Container Image\fR
1380 .PP
1381 .if n \{\
1382 .RS 4
1383 .\}
1384 .nf
1385 [Source]
1386 Type=url\-tar
1387 Path=https://download\&.example\&.com/
1388 MatchPattern=myContainer_@v\&.tar\&.gz
1389
1390 [Target]
1391 Type=subvolume
1392 Path=/var/lib/machines
1393 MatchPattern=myContainer_@v
1394 CurrentSymlink=myContainer
1395 .fi
1396 .if n \{\
1397 .RE
1398 .\}
1399 .PP
1400 On updates this downloads
1401 "https://download\&.example\&.com/myContainer_@v\&.tar\&.gz"
1402 and decompresses/unpacks it to
1403 /var/lib/machines/myContainer_@v\&. After each update a symlink
1404 /var/lib/machines/myContainer
1405 is created/updated always pointing to the most recent update\&.
1406 .SH "SEE ALSO"
1407 .PP
1408 \fBsystemd\fR(1), \fBsystemd-sysupdate\fR(8), \fBsystemd-repart\fR(8)
1409 .SH "NOTES"
1410 .IP " 1." 4
1411 Discoverable Partitions Specification
1412 .RS 4
1413 \%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
1414 .RE
1415 .IP " 2." 4
1416 Boot Loader Specification
1417 .RS 4
1418 \%https://uapi-group.org/specifications/specs/boot_loader_specification
1419 .RE
1420 .IP " 3." 4
1421 Automatic Boot Assessment
1422 .RS 4
1423 \%https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT
1424 .RE
1425 .IP " 4." 4
1426 AppStream catalog
1427 .RS 4
1428 \%https://www.freedesktop.org/software/appstream/docs/chap-CatalogData.html
1429 .RE
1430 .IP " 5." 4
1431 special metadata
1432 .RS 4
1433 \%https://systemd.io/APPSTREAM_BUNDLE
1434 .RE