Compare commits

...

1571 Commits

Author SHA1 Message Date
Alex Feyerke 52f3688616
Merge f4429e9753 into bf39626d61 2024-09-18 14:16:49 +00:00
Antonio Alvarez Feijoo bf39626d61 man/repart: use <varname> instead of <variable>
Otherwise, `<variable>$BOOT</variable>` is rendered:

```
[2548/2992] Generating man/repart.d.5 with a custom command
Element variable in namespace '' encountered in para, but no template matches.
Element variable in namespace '' encountered in para, but no template matches.
```
2024-09-18 16:03:56 +02:00
Marius Hoch ff831e7c50 hwdb: Add accel orientation quirk for the IdeaPad Duet 3 10IGL5-LTE
Signed-off-by: Marius Hoch <mail@mariushoch.de>
2024-09-18 20:30:11 +09:00
Daan De Meyer 81af8f998e repart: Support specifying multiple directories to ExcludeFiles= 2024-09-18 10:22:33 +02:00
chenjiayi 4fc8a63f9e systemd: rewatch pids under cgroup v1 when sigchld of processes more than main pid and control pid is captured
If `Delegate` is configured in service, cgroup agent will never send out
any datagram as .control subcgroup is generated. Thus systemd will watch
all processes on the cgroup hierarchy for SIGCHLD to deal with unreliable
cgroup notifications.

In this way, systemd should rewatch all processes when any SIGCHLD is
captured, more than the control pid or main pid.
2024-09-18 10:13:20 +02:00
Jason Yundt dfb3155419 man: document ShowStatus and SetShowStatus()
SetShowStatus() was added in order to fix #11447. Recently, I ran into
the exact same problem that OP was experiencing in #11447. I wasn’t able
to figure out how to deal with the problem until I found #11447, and it
took me a while to find #11447.

This commit takes what I learned from reading #11447 and adds it to the
documentation. Hopefully, this will make it easier for other people who
run into the same problem in the future.
2024-09-18 10:11:55 +02:00
Daan De Meyer fc5037e7d7
Merge pull request #34464 from yuwata/test-space-in-path
test: allow to run tests under directory that contains spaces
2024-09-18 08:50:38 +02:00
Yu Watanabe 13f6ec7ce7 test: quote paths to executables
Fixes #34459.
2024-09-18 09:47:04 +09:00
Yu Watanabe 6e1816ef16 kernel-install: unquote plugin paths in KERNEL_INSTALL_PLUGINS
To support the case that paths to plugins contain spaces.

Prompted by #34459
2024-09-18 09:47:00 +09:00
Yu Watanabe 7ac1ad90d0
Merge pull request #34460 from yuwata/test-86-follow-ups
test: follow-ups for TEST-86
2024-09-18 09:31:17 +09:00
Daan De Meyer 099b16c3e7 tmpfiles.d: Remove purge flag from lines that don't support it
Fixes db15657dfb
2024-09-17 23:02:01 +02:00
Daan De Meyer 7a7f306b6c ukify: Remove debug log
This prints a python data structure which we shouldn't do during
normal operation.
2024-09-17 22:34:13 +02:00
Yu Watanabe 4f2975385f
Merge pull request #34040 from AdrianVovk/repart-dollar-boot
repart: Implement $BOOT support
2024-09-18 05:09:20 +09:00
Daan De Meyer 0432e28394
Merge pull request #34440 from yuwata/network-log-no-matching-network
network: log when no matching .network file found
2024-09-17 21:09:19 +02:00
Yu Watanabe fc956a3973 network/dhcp4: use device_get_property_bool() at link_needs_dhcp_broadcast()
No functional change, just refactoring.
2024-09-17 21:03:59 +02:00
Yu Watanabe d265b8afb7 test: drop unused test.sh for TEST-86-MULTI-PROFILE-UKI
The test cannot run with the bash test runner, as it requires python.
Hence, test.sh is not necessary.

Follow-up for a37640653c.
2024-09-18 04:00:05 +09:00
Yu Watanabe 1aab0a5b10 test: minor coding style fixlets
Follow-up for a37640653c.
2024-09-18 03:50:46 +09:00
Yu Watanabe b0dbb4aa3a
Merge pull request #34457 from poettering/uki-with-many-testcase
multi-profile UKIs: test case
2024-09-18 03:48:45 +09:00
Michael Ferrari 91ea3dcf35 homed: wait for user input during firstboot
This mirrors the behavior of `systemd-firstboot` and allows bootup
messages to settle down before user input is actually processed.

See: https://github.com/systemd/systemd/issues/34448
2024-09-18 03:21:11 +09:00
Yu Watanabe a95ae2d36a conf-parser: use hashmap_ensure_put() at one more place 2024-09-18 03:13:47 +09:00
Yu Watanabe be8e4b1a87 conf-parser: log errors in config_parse_many_files() and friends
Previously, if an file cannot be opened, e.g. due to its permission,
config_parse_many() or so did not log the error even if CONFIG_PARSE_WARN
flag is set. This makes all error paths in these functions are logged,
and the log level is controlled by the flag.

Prompted by #34436.
2024-09-18 03:13:25 +09:00
Adrian Vovk cf612c5fd5
repart: Add tests for supplement partitions 2024-09-17 14:06:51 -04:00
Adrian Vovk 2cb9c68c3a
repart: Add SupplementFor= logic
This was designed to deal with $BOOT, as defined by the Boot Loader
Specification, but it was made a generic mechanism because it is useful
elsewhere too. See the updated man page for usage examples, motivation,
and an explanation of how this works.
2024-09-17 14:06:50 -04:00
Adrian Vovk 78e9059208
repart: Consider existing partitions when placing
Fixes an oversight in `context_allocate_partitions` that makes it
succeed in cases where it should fail. Essentially, there was nothing
actually enforcing SizeMinBytes= and PaddingMinBytes= for partitions
that exist, only for new partitions. This behavior is inconsistent with
the docs, which state that existing partitions will be grown to at least
the specified minimum size, and that "If the backing device does not
provide enough space to fulfill the constraints placing the partition
will fail".
2024-09-17 14:06:49 -04:00
Adrian Vovk e671bdc5c3
strv: Fixup STRV_FOREACH_PAIR macro
The macro didn't properly parenthesize a caller-controlled argument.
For example: `STRV_FOREACH_PAIR(a, b, something ?: something_else)`
would expand to `typeof(*something ?: something_else)`, which would
cause compile failures
2024-09-17 14:06:26 -04:00
Yu Watanabe 572d031eca log: introduce log_oom_full() 2024-09-18 02:50:19 +09:00
Yu Watanabe 25da422bd1 network: log loaded .network and .netdev files 2024-09-18 02:35:28 +09:00
Yu Watanabe 5872ea7008 network: log when no matching .network file found
When an interface enters unmanaged state, there are two possibilities:
- no matching .network file found,
- found a matching .network with Unmanaged=yes.

When a matching .network file is found, networkd logs the filename.
Let's also log when no matching .network file is found.

This also slightly adjust the log message when a matching .network file
found.

Closes #34436.
2024-09-18 02:27:13 +09:00
PavlNekrasov d80a9042ca
Use correct error code in log message in output_waiting_jobs (#34404)
The error code `r` from the read function is being logged, but the error code `rc` from the table data insertion function should be logged instead.
2024-09-17 19:17:21 +09:00
Yu Watanabe a7afe5a3e7
Merge pull request #34443 from yuwata/network-sysctl-monitor-follow-ups
network/sysctl-monitor: several follow-ups and cleanups
2024-09-17 19:15:12 +09:00
Lennart Poettering a2369d0224 update TODO 2024-09-17 10:40:51 +02:00
Lennart Poettering a37640653c ci: add testcase for multi-profile UKIs
This tests the whole shebang:

1. That ukify can generate them properly
2. That systemd-boot can dissect them properly
3. That systemd-stub can accept profile selection propery
4. That the profile information ends up in /run/systemd/stub/ properly
5. That systemd-measure correctly calculates the expected PCR 11 values
   for each profile and that we can unlock a public-key bound LUKS
   volume with it
2024-09-17 10:40:51 +02:00
Yu Watanabe a65b864835 docs: fix typo in filename: REATLIME -> REALTIME 2024-09-17 10:21:54 +02:00
Yu Watanabe 9959681a0d test/repart: fix mkfs checker
Follow-up for 27cacec939.
2024-09-17 10:15:21 +02:00
Daan De Meyer b3ebd480d6 Fix generator logging
log_setup() overrides the previously set log target again so we
can't use it in log_setup_generator().

Follow-up for aa976d8788
2024-09-17 15:10:39 +09:00
Arian van Putten 6695ff4c15 CONTROL_GROUP_INTERFACE: fix link to systemd-run code 2024-09-17 15:09:48 +09:00
Yu Watanabe 4d6ad22f8d network: drop unnecessary BPF related objects from Manager when disabled 2024-09-17 15:00:06 +09:00
Yu Watanabe 099ee34ca1 network/sysctl-monitor: do not allocate sysctl_shadow when eBPF is not supported
When eBPF is disabled, the hashmap will be never used. Let's not
allocate it.
2024-09-17 14:53:29 +09:00
Yu Watanabe a2fbe9f3f9 network/sysctl-monitor: fix use-after-free
Previously, manager_free() did not assign NULL to Manager.sysctl_shadow,
hence sysctl_clear_link_shadows() called by link_free() will causes
use-after-free. To fix the issue, this makes Manager.sysctl_shadow will be
set to NULL after it is freed,

Fixes a bug introduced by 6d9ef22acd.
2024-09-16 15:12:47 +09:00
Yu Watanabe 7c778cecdb network/sysctl: several cleanups for sysctl_add_monitor()
- rename rootcg -> root_cgroup_fd, to emphasize it is a fd,
- drop nested function call, and check error code.
2024-09-16 14:36:54 +09:00
Yu Watanabe 46718d344f bpf-link: introduce bpf_ring_buffer_free() and friends
Then, replace rb_free() in networkd.

Follow-up for 6d9ef22acd.
2024-09-16 14:36:54 +09:00
Yu Watanabe 9295c7ae09 network/sysctl: use wrapped free functions
No functional change, just refactoring.

Follow-up for 6d9ef22acd.
2024-09-16 14:36:54 +09:00
Yu Watanabe 41afafbf2a network/sysctl-monitor: fix sanity check in cut_last()
This also adds basic comment about the return code.

Follow-up for 6d9ef22acd.
2024-09-16 14:36:54 +09:00
Yu Watanabe 9671efff78 NEWS: fix typo
Follow-up for dcc359010c.
2024-09-16 11:50:48 +09:00
Yu Watanabe 4f0bc2582e man: fix typo
Follow-up for a632d8dd9f.
2024-09-16 11:49:04 +09:00
Yu Watanabe 3292120adf nspawn: fix typo
Follow-up for d7a6bb9891.
2024-09-16 11:47:43 +09:00
Yu Watanabe f6cc5e1c8d
Merge pull request #34393 from poettering/tmpfiles-ownership-flag
tmpfiles: introduce an explicit line flag $ for enabling purge logic …
2024-09-16 10:51:09 +09:00
Yu Watanabe 590f430cac
Merge pull request #34425 from yuwata/udev-rules-case-insensitive-match
udev-rules: support case insensitive match
2024-09-16 10:42:37 +09:00
Mike Yuan 93d2d36638 basic/build: also include BTF status 2024-09-16 10:42:16 +09:00
Lennart Poettering 369b12375b coredump: use _cleanup_(iovec_done) where appropriate 2024-09-16 10:42:02 +09:00
Yu Watanabe b5ec8f77e0
Merge pull request #34434 from poettering/bootctl-stub-paths
bootctl: expose new stub path efi vars and related
2024-09-16 10:41:24 +09:00
Lennart Poettering 3e0a3a0259 bootctl: show whether a PE file is an addon in 'booctl kernel-identify' 2024-09-16 10:41:10 +09:00
Celeste Liu 6573f0c82c hwdb: add Kensington SlimBlade Pro trackball (Bluetooth mode)
Wired and 2.4G dongle connectivity is covered by general trackball rule,
but with Bluetooth connectivity Kensington SlimBlade Pro uses the name
"SlimBlade Pro" which doesn't contain "[Tt]rack[Bb]all". We need to
process it specially.

Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
2024-09-16 10:40:56 +09:00
Daan De Meyer e0258ac886 repart: Fix log messages in partition_populate_directory()
We're not actually populating a filesystem here, we're preparing
to populate a filesystem, so update the log messages accordingly.
2024-09-15 22:40:10 +02:00
Lennart Poettering a859d0d378 tmpfiles.d: add $ flag to all lines which are clearly private to our packages, and should be removed on package removal
(This excludes any dirs that contain resources placed there by the user)

(I also didn't bother marking resources belonging to components that are
really not optional for us)
2024-09-15 19:44:05 +02:00
Lennart Poettering db15657dfb tmpfiles: introduce an explicit line flag $ for enabling purge logic for a line
Let's make the risk of accidental misuse, and mark lines that shall be
covered by --purge with an explicit new flag "$".

See: #33349
2024-09-15 19:43:09 +02:00
Lennart Poettering 2aa3005ad2 bootctl: also show current/default/oneshot entry literally in output 2024-09-15 19:34:19 +02:00
Lennart Poettering 90cf998875 bootctl: add --print-loader-path + --print-stub-path
These are inspired by the existing commands that return the path to the
boot or ESP partitions. However, these new commands show the path to the
boot loader (systemd-boot) or UKI/stub (systemd-stub) that was used on
the current boot. This information is derived from EFI variables.
2024-09-15 19:34:19 +02:00
Lennart Poettering c8d60ae79d efivars: add helper that reads an fs path from an efi var 2024-09-15 19:34:19 +02:00
Lennart Poettering bfcf48b842 bootctl: show stub partition data too in "status" too 2024-09-15 19:33:48 +02:00
Mike Yuan 3a41a21666 man/bootup: rename initrd to exitrd at one more place
Follow-up for f2c2fa87b6
2024-09-16 01:35:31 +09:00
Luca Boccassi 37c2010bcf test: fix ASAN options in TEST-29-PORTABLE
Bash arrays cannot be exported, so we need to redefine it in each
subtest

Follow-up for 680dec33f2
2024-09-15 18:10:29 +02:00
Yu Watanabe 5f5c5c48b9 udev-rules: support case insensitive match
This introduces 'i' prefix for match string. When specified, string or
pattern will match case-insensitively.

Closes #34359.

Co-authored-by: Ryan Wilson <ryantimwilson@meta.com>
2024-09-15 23:09:26 +09:00
Daan De Meyer 27a8a29e32 mkosi: Disable makepkg PKGBUILD linting using the newly added environment variable 2024-09-15 12:44:15 +02:00
Daan De Meyer faa79a78c8
Merge pull request #34409 from DaanDeMeyer/boot-fix
boot: Make initrd_prepare() semantically equivalent to combine_initrds()
2024-09-15 11:57:57 +02:00
Daan De Meyer f8fa4222c9 boot: Make initrd_prepare() semantically equivalent to combine_initrds()
Currently, trying to boot images with type 1 entries generated by mkosi
with qemu freezes in the kernel EFI stub. I'm not going to pretend I
understand what's going on, but when I reported a similar problem with
UKIs, the fix was to rework the code in combine_initrds() in the stub
to behave like it does today. It seems that same fix was never applied
to systemd-boot's combine_initrds() function, so let's do that now to
fix the freezes I've been seeing trying to boot images with type 1 entries
in qemu.
2024-09-15 10:11:59 +02:00
Daan De Meyer c9c5c8d29b boot: Use TAKE_STRUCT() in one more place 2024-09-15 10:11:59 +02:00
Lennart Poettering 1b7ef87fc1
Merge pull request #34347 from poettering/uki-with-many-bootctl
bootctl: multi-profile UKI support
2024-09-15 09:06:58 +02:00
Yu Watanabe 68fdef46a7 udev-rules: embed UdevRuleToken.attr_match_remove_trailing_whitespace flag into UdevRuleMatchType
No functional change, just refactoring and preparation for later change.
2024-09-15 13:52:50 +09:00
Luca Boccassi 680dec33f2 test: split TEST-29-PORTABLE in subtests
The test script is quite long and hard to read. Split it.
Start with one image-based and one directory-based subtest.
2024-09-15 12:23:12 +09:00
Ronan Pigott 32b8065e87
load-fragment: terminate the specifier table (#34421)
Otherwise an invalid specifier iterates over uninitialized data.

Fixes a bug introduced by 0b40688d18 (v254).
2024-09-15 12:21:39 +09:00
Yu Watanabe f921e7d6a3
Merge pull request #34419 from yuwata/creds
creds: several follow-ups and cleanups
2024-09-15 12:15:57 +09:00
Yu Watanabe d97c672be0
Merge pull request #34405 from poettering/dns-domain-validate-fix
dns-domain: fix validation check for max name
2024-09-15 03:33:12 +09:00
Yu Watanabe 60b2ddc9b7 creds: move -h/--help and --version to correct section in the help message 2024-09-15 03:22:13 +09:00
Yu Watanabe 6c38915d35 creds: add short comment that has-tpm2 is moved
Follow-up for 58e359604f.
2024-09-15 03:22:04 +09:00
Yu Watanabe acdfb85d97 creds: align table 2024-09-15 03:19:21 +09:00
Yu Watanabe 4f176f24d6 creds: drop unnecessary include of build-path.h
Follow-up for 58e359604f.
2024-09-15 03:18:46 +09:00
Matthieu CHARETTE 8ee3d4df80 Add HUAWEI MateBook D 15 AMD ACCEL properties 2024-09-14 19:50:28 +02:00
Mike Yuan c7f7225f1a
Merge pull request #34401 from poettering/implicit-sigprocmask
tree-wide: make sigprocmask() changes more automatic
2024-09-14 17:47:47 +02:00
Gregory Arenius 3f3dc6ab84 Add ACCEL_MOUNT_MATRIX for Chuwi Hi10 Max. 2024-09-14 11:06:38 +02:00
Lennart Poettering 3f49d58920 dns-domain: add test case from #34399 2024-09-13 18:03:17 +02:00
Lennart Poettering 1e1661c5d2 dns-domain: validate dns domain name max size based on unescaped, not escaped size
Otherwise we'll consider various domains invalid that really shouldn't
be considered invalid.

Fixes: #34399
2024-09-13 18:02:54 +02:00
Lennart Poettering dc8ed83892 dns-domain: follow our current variable naming style 2024-09-13 18:00:38 +02:00
Luca Boccassi 00f546e25e core: do not fail if ignorable img.v/ vpick dir is empty
If the vpick directory is configured to be ignored if missing, do not
fail and just skip ahead.

Follow-up for 5e79dd96a8
Follow-up for 622efc544d
2024-09-13 17:32:00 +02:00
Lennart Poettering 831ad06bf5 update TODO 2024-09-13 17:12:28 +02:00
Lennart Poettering d7a6bb9891 tree-wide: make sigprocmask() changes more automatic
This tries to get rid of most manual sigprocmask() changes, in favour
of:

1. The SD_EVENT_SIGNAL_PROCMASK flag to sd_event_add_signal()
2. The sd_event_set_signal_exit() call for handling SIGTERM/SIGINT
3. Move masking of SIGWINCH into ptyfwd, out of nspawn/vmspawn/run

And while we are at it get rid of a bunch of event source fields whose
lifetime is bound to the sd_event object they belong to anyway, and make
use of the "floating" event source feature of sd-event instead.
2024-09-13 17:12:28 +02:00
Luca Boccassi a7af35f1d4
Merge pull request #34402 from keszybz/notes-readme
Add examples not package/dlopen notes
2024-09-13 15:19:56 +02:00
Zbigniew Jędrzejewski-Szmek 2e1f83d1ab docs/ELF_DLOPEN_METADATA: add detailed example 2024-09-13 14:53:17 +02:00
Zbigniew Jędrzejewski-Szmek 9a2b54d9f7 docs/ELF_PACKAGE_METADATA: add detailed example
When the spec was initially written, we didn't add good documentation of how to
display the notes, also because there was no good way to display the data
except manually extracting the section to a file and running 'jq' on that. But
the tools have improved, so let's show the users how easy it is to use this
data.
2024-09-13 14:51:44 +02:00
Luca Boccassi 7b9dc72c3c mkosi: update debian commit reference
* 0704bfd93f Use dh-exec for d/systemd-timesyncd.manpages
* b668a942e9 Install new sd-stub tmpfiles.d
* 57aa6890f3 Install new org.freedesktop.timesync1 manpage
* 63e7fb5a48 Install new shell credentials snippets
* 3ce727ad45 Update changelog for 256.6-1 release
* 65e0731d3a Note systemd-cryptsetup package split in NEWS
*   2bd9927f5d Update upstream source from tag 'upstream/256.6'
|\
| * 27c691ac24 New upstream version 256.6
* 395974bae4 Re-enable utmp support, tmux's autopkgtests require it
* 685e1c84eb initramfs-tools: ensure rules file exists before invoking chzdev
* a454822396 Filter out zdev rules in the initramfs hook (LP: #2044104)
* cd0179221d salsa-ci: test the stage1 build profile
* 55917feab0 Update changelog for 256.5-2 release
* f280a3cbf5 Disable utmp support, replaced by wtmpdb
* 635c5f48dc d/t/upstream: do not pass /var/cache/apt/archives to PackageDirectories
2024-09-13 12:06:27 +02:00
Ricky Tigg 809b844a9e po: Translated using Weblate (Finnish)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fi/
Translation: systemd/main
2024-09-13 11:17:04 +02:00
Daan De Meyer 76c774828f
Merge pull request #34392 from poettering/format-util-split
tweaks to networkd sysctl logging
2024-09-13 09:18:56 +02:00
Lennart Poettering e1f9d3c84b catalog: beef up new sysctl message
Let's make use of the templating logic, to make the entry more useful.
2024-09-13 07:29:04 +02:00
Lennart Poettering 9d63491f25 catalog: rebreak catalog entry 2024-09-13 07:28:55 +02:00
Lennart Poettering a44fa55e26 networkd: move sysctl code to use PID_FMT
Now that format-util.h doesn't pull in net/if.h anymore, we can use it
to format PIDs in the networkd-sysctl.c code.
2024-09-13 07:28:51 +02:00
Lennart Poettering 868258cf38 basic: split ifname related calls from format-util.h into format-ifname.h
This way we don't have to pull in net/if.h into format-util.h.

This is supposed to address https://github.com/systemd/systemd/pull/32212#discussion_r1755639881

No actual code changes, just a .c/.h file split-up.
2024-09-13 07:27:47 +02:00
Matteo Croce 64e03ca8bf minor fixups for #32212
Fix minor post merge comments
2024-09-13 07:23:07 +02:00
Daan De Meyer cf94f513f0 mkosi: Stop applying device groups patch on Arch
It stopped applying so let's stop applying it to make CI green again.
2024-09-12 22:23:57 +02:00
Ryan Wilson b0b4e39a4d analyze: add test for verify exit status with warnings 2024-09-12 22:19:48 +02:00
Daan De Meyer e196136bc5 units: Order ldconfig.service after systemd-confext.service
The configuration files required by ldconfig could be put into
place by systemd-confext.service (ldconfig only looks in /etc) so
let's order the service after systemd-confext.service to make sure
any config files are in place before the service runs.
2024-09-12 20:20:53 +02:00
Luca Boccassi ca690e6b84
Merge pull request #34390 from poettering/bus-process-man-tweak
man: document that sd_bus_process() only returns otherwise unhandled …
2024-09-12 20:04:49 +02:00
Lennart Poettering 5892950ba4
Merge pull request #32212 from teknoraver/networkd-sysctl
More visibility into systemd-networkd sysctls
2024-09-12 17:28:59 +02:00
Lennart Poettering 07696a1f07 update TODO 2024-09-12 16:18:59 +02:00
Lennart Poettering 55184c4cfc man: document that sd_bus_process() only returns otherwise unhandled messages in *ret_message 2024-09-12 16:18:07 +02:00
Lennart Poettering dd4114317a update TODO 2024-09-12 16:17:42 +02:00
Lennart Poettering 9045f88d72
Merge pull request #34388 from poettering/syscall-update
seccomp: update syscall list and categorize new additions a bit
2024-09-12 15:46:03 +02:00
Lennart Poettering 1791854ce4
Merge pull request #34385 from poettering/man-unify-pcr-key-name
man: clean up PCR public key filenames in systemd-stub and systemd-measure man pages
2024-09-12 15:45:40 +02:00
Mike Yuan 8e8e41c724
NEWS: correct/complete some entries 2024-09-12 14:47:42 +02:00
Daan De Meyer 236a5e5f89
Merge pull request #34386 from keszybz/mkosi-update-helper
Mkosi update helper
2024-09-12 14:35:17 +02:00
Lennart Poettering 626df2fe8d seccomp-util: add recently added new syscalls to various seccomp groups, as appropriate 2024-09-12 14:25:42 +02:00
Lennart Poettering 1d551b1e7d syscalls: run "ninja update-syscalls-*" 2024-09-12 14:20:50 +02:00
Zbigniew Jędrzejewski-Szmek dcc359010c NEWS: the first big batch for v257 2024-09-12 13:27:57 +02:00
Lennart Poettering 58e359604f analyze: move "has-tpm2" from systemd-creds to systemd-analyze
The verb s not really specific to credential management, it was always a
bit misplaced. Hence move it to systemd-analyze, where we already have
some general TPM related verbs such as "srk" and "pcrs"
2024-09-12 12:56:03 +02:00
Zbigniew Jędrzejewski-Szmek 37bf958e7b mkosi: update mkosi commit reference to v24.3-158-g2c9954fa51
* 2c9954fa51 mkosi-initrd: correct `--debug-shell` help output
*   671708a10b Merge pull request #2990 from behrmann/allthemanuals
|\
| * 2671849125 initrd: add --show-documentation option
| * e2238f5dc7 Move show_docs to its own module
| * e366093b1c doc: make documentation command take an argument
* | 9fcff08b34 Update documentation links
* | 113f7f67dd Only write to /etc/machine-id if /etc exists
|/
*   62a610c0e5 Merge pull request #3005 from DaanDeMeyer/mypy
|\
| * 9b569c93bb Don't delete reader in _tempfile() backport
| * 16f4c94930 Mark all class variables as Final
| * ca7021e9a7 Annotate two more variables that need it
| * fec368dd4d Move KeySource.Type out of KeySource
| * ff5f7b06b8 user: Drop lru_cache() for home() and name()
| * 8f7c7b366f Move code backported from cpython upstream to backport.py
| * f66212e9c2 Drop listify()
| * 4293866df2 mypy: Disable allow_redefinition
| * 2700337f11 Fix mypyc warnings in sandbox.py
|/
* 025483af04 sandbox: Use separate variable name when we change types
*   b04800cd30 Merge pull request #3003 from DaanDeMeyer/initrd
|\
| * fd64be9b60 mkosi-initrd: Ignore gnupg subdirectory
| * 7a8a21f8f6 mkosi-initrd: Only set --cacheonly=metadata when running as root
| * 156880c398 mkosi-initrd: Add --debug-shell argument
|/
*   a32c8f393a Merge pull request #3002 from DaanDeMeyer/cherry-pick
|\
| * 1d8bfabc97 news: add note to change where the manual pages are
| * 8917d65db1 initrd: flatten module into a single file
| * 76085b788a sandbox: flatten module into a single file
| * 9f48afa4a7 cli: add missing completion stubs to pyproject.toml
| * 6e21cceb03 doc: move man pages to resources/man
| * 25d1c6b579 cli: use ellipsis ligature instead of writing out ...
|/
* 013d9b5595 Move various functions to bootloader.py
* 508ad85475 Update NEWS.md
* f25b8dee6f Simplify package cache dir mirror key
*   dce4c8af51 Merge pull request #2998 from DaanDeMeyer/ci
|\
| * f4934828f7 tests: Show debug messages on console
| * fa3ae22598 ci: Drop machine-id commit timeout drop-in
* dba01269de base64 encode mirror if we put it in package cache dir key
* 364b65f7bb Add 'login' to Debian/Ubuntu/Kali package list
* ee07b5b6d2 Bump github/codeql-action from 3.25.15 to 3.26.6
2024-09-12 11:01:17 +02:00
Zbigniew Jędrzejewski-Szmek e31134b5f2 mkosi: add helper script to update mkosi hash
This is very similar to tools/fetch-distro.py. The idea is that we extend the
commit to update the mkosi hash with a git log --pretty=oneline output, so that
the reader can know what changes were actually included.

The motivation is that I'm always wondering what changed in mkosi when I see a
commit updating the hash, and it's nicer to have this information shown
directly in the commit.

The script does _not_ pull changes from upstream, on the assumption that the
person doing the commit always has a fresh checkout and that they tested with
that checkout.
2024-09-12 10:52:52 +02:00
Lennart Poettering 6a92a793ac bootspec: automatically filter non-native UKIs and add-ons when enumerating 2024-09-12 10:02:15 +02:00
Lennart Poettering 59b3df9bae bootspec: process multi-profile UKIs 2024-09-12 10:02:15 +02:00
Lennart Poettering 9de565dd5d pe-binary: add pe_is_native() for checking if PE is native 2024-09-12 10:02:15 +02:00
Lennart Poettering e6c49f7f11 pe-binary: split pe_header_find_section() in two
This splits out the core part into a new function
pe_section_table_find().

pe_header_find_section() takes a PeHeader as input, while
pe_section_table_find() just takes the section table and its size.
2024-09-12 10:02:15 +02:00
Lennart Poettering f3c1d7fea1 pe-binary: split pe_read_section_data() into two
This renames pe_read_section_data() to pe_read_section_data_by_name()
and makes pe_read_section_data() a bit more low-level: it takes a header
table entry directly, instead of searching it first by name.
2024-09-12 10:02:15 +02:00
Lennart Poettering a8e912f01b pe-binary: add helper pe_is_addon() for detecting whether we are looking at PE EFI add-on 2024-09-12 10:02:15 +02:00
Lennart Poettering 201aca5f9a man: fix advertised filename of the PCR public key 2024-09-12 09:46:26 +02:00
Lennart Poettering 6f1dfc407e man: systemd-stub places PCR public key in file 'tpm2-pcr-public-key.pem', stick to that name across the board
systemd-stub provides the signing key for TPM2 signed PCR policies in a
file tpm2-pcr-public-key.pem to userspace. Hence, to clarify that this
is the same key as used when signing via "systemd-measure", let's rename
it in the docs like that.

Also rename the private key to tpm2-pcr-private-key.pem, to keep the
symmetry.

With this we should universally stick to this nomenclature:

1. tpm2-pcr-public-key.pem   ← public part of signing key
2. tpm2-pcr-private-key.pem  ← private part of signing key
3. tpm2-pcr-signature.json   ← signature file made with key pair

Inspired by: #34069
2024-09-12 09:46:26 +02:00
Lennart Poettering d258b1c60c update TODO 2024-09-12 09:38:32 +02:00
Mike Yuan 53c75243af network/wireguard: refuse default key if all zero
Follow-up for fa724cd52c

We attempt to retrieve default key if eqzero(Wireguard.private_key),
but a all zero default key should be refused too.
2024-09-12 09:25:50 +02:00
Matteo Croce c78bcda461 test-network: add test for sysctl watch
Add a NetworkdSysctlTest class which ensures that networkd correctly
complains when a sysctl file it's handling has been changed externally.
2024-09-11 23:10:36 +02:00
Matteo Croce 6d9ef22acd emit a warning in networkd if managed sysctls are changed
Monitor the sysctl set by networkd for writes, if a sysctl is
overwritten with a different value than the one we set, emit a warning.
Writes are detected with an eBPF program attached as BPF_CGROUP_SYSCTL
which reports the sysctl writes only in net/.

The eBPF program only reports sysctl writes from a different cgroup than networkd.
To do this, it uses the `bpf_current_task_under_cgroup_proto()` helper,
which will be available allowed in BPF_CGROUP_SYSCTL from kernel 6.12[1].

Loading a BPF_CGROUP_SYSCTL program requires the CAP_SYS_ADMIN capability,
so drop it just after the program load, whether it loads successfully or not.

Writes are logged but permitted, in future the functionality can be
extended to also deny writes to managed sysctls.

[1] https://lore.kernel.org/bpf/20240819162805.78235-3-technoboy85@gmail.com/
2024-09-11 23:07:00 +02:00
Matteo Croce 64629617b6 store the sysctls set by networkd
networkd set several sysctl to set the network configuration. Save their
value so we can check is other processes change them.
2024-09-11 23:01:25 +02:00
Matteo Croce 766bcf302a extend sysctl functions to shadow values
Pass to all the sysctl_* functions a hashmap which can be used to
optionally save the value written in the sysctl.
2024-09-11 23:01:25 +02:00
Lennart Poettering 2b735c7d71 resolvectl: rework StatusMode handling into a switch/case statement 2024-09-11 21:36:50 +02:00
Lennart Poettering da8540583d resolvectl: rename shallow destructors …_done() 2024-09-11 21:36:36 +02:00
Daan De Meyer 783a15081e
Merge pull request #34373 from poettering/resolved-dnssd-move-out
move dnssd configuration file parsing from generic code into dnssd source files
2024-09-11 21:36:24 +02:00
Lennart Poettering 967c84ebb0 resolved: simplify dns_scope_get_n_dns_servers(), don't count each time 2024-09-11 21:36:11 +02:00
Lennart Poettering 6e1fa7516a resolved: use dns_scope_ifindex() at more places
And add a mirroring dns_scope_ifname()
2024-09-11 21:35:58 +02:00
Lennart Poettering 14dc0fc4ef resolved: simplify initialization of DnsScope 2024-09-11 21:35:47 +02:00
Lennart Poettering 8b4fb52462 pcrlock: remove empty components from our list
This is a rework of e7a93e75219b22424bab95fe45982f5eef21d581: instead of
handling components with n_variants being zero at every step of the way, we instead
remove it from our list after loading all components, given that such a
component simply makes not sense for the rest of our logic.
2024-09-11 21:35:34 +02:00
Lennart Poettering 368051ee6b resolved: use unlinkat() where appropriate 2024-09-11 21:34:51 +02:00
Daan De Meyer aaa6c6e279
Merge pull request #34377 from DaanDeMeyer/symlinks
repart: Add MakeSymlinks=
2024-09-11 21:34:37 +02:00
Lennart Poettering e5868783ca resolvectl: show DefaultRoute state in per-link DNS staus info too 2024-09-11 21:14:28 +02:00
Lennart Poettering 118592cc49 pcrlock: correct --help text regarding recovery pin
Fixes: #33917
2024-09-11 21:13:38 +02:00
Lennart Poettering 8d647ed2ff cryptenroll: don't try to get PCR bank if we know the device key
If we operate in "offline" mode, i.e. know the device key, then we will
not have a TPM2 connection, hence don't try to read the PCR bank to use form
it.

We don't need it anyway because we are not going to test unseal things.

Fixes: #33855
2024-09-11 21:07:53 +02:00
Daan De Meyer c64ddefd5c repart: Add MakeSymlinks=
Similar to MakeDirectories=, but creates symlinks in the filesystem.
2024-09-11 18:45:05 +02:00
Daan De Meyer e2b0f23713 repart: Add missing parameter comment 2024-09-11 18:44:59 +02:00
Daan De Meyer bc48bd83d3 repart: Fix memory corruption 2024-09-11 17:52:20 +02:00
Filip Lewiński c3563dc6d9 hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x iGPU, NV41PZ
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2024-09-11 17:02:10 +02:00
Karel Zak eb360dd9a1 udev: allow persistent storage rules for zram devices
The /dev/zramN devices can be used as regular block devices. They are
typically used for swap areas, but it would be beneficial to have
LABEL and UUID in the udev database to make it more user-friendly for
tools such as lsblk or mount (if used with other filesystems).
2024-09-11 17:01:26 +02:00
Lennart Poettering 8e1c345921 resolved: move dnssd parsers to resolved-dnssd.c
Let's keep only the parsers for the main config in resolved-conf.c
2024-09-11 17:00:03 +02:00
Lennart Poettering c87afdf23d resolved: move resolved_dnssd_gperf_lookup() prototype definition to resolved-dnssd.h 2024-09-11 16:59:48 +02:00
Daan De Meyer 2232452379 repart: Reuse partition_needs_populate() more 2024-09-11 16:36:47 +02:00
Lennart Poettering 93f5821c95 man: fix help text for systemd-creds tool's "list" verb
I guess this was copy/pasted from sysupdate? Weird though. Fix it. And
also reword "cat" help text to make it more precise.
2024-09-11 15:21:21 +02:00
Lennart Poettering f9807539b0 pcrlock: log if we generate an "empty" policy
Such a policy won't provide any protection, but it's still entirely fine
to have it like this in various contexts, for example at OS install
time, to allocate the nvindex and reference it in enrollments. However,
it does deserve mention, hence log about it at LOG_NOTICE level.

This is based on a similar patch by Arnaud Patard
<arnaud.patard@collabora.com> proposed at #33663.
2024-09-11 15:14:22 +02:00
sinus-x 2c8184a8d2 man: Correct flag description of systemd-cat
It is not true that "no string" is written to journal; the binary
name is used when run via `systemd-cat command`, or `cat` is used
when run via `command | systemd-cat`.
2024-09-11 15:00:34 +02:00
Luca Boccassi 8f4bbd096b test: fix TEST_SKIP for test cases with subtests
TEST-64-UDEV-STORAGE is invoked with the subtest appended, so TEST_SKIP=TEST-64-UDEV-STORAGE
does not work. Fix it by using TEST_SKIP as a partial match.

Follow-up for ddc91af4ea
2024-09-11 13:55:53 +02:00
Lennart Poettering c355208d83 tpm2-util: fix whitespace 2024-09-11 10:28:36 +02:00
Lennart Poettering 87f5efdeb0
Merge pull request #34353 from yuwata/timesync-bus-document
timesync: add document for org.freedesktop.timesync1
2024-09-11 10:15:30 +02:00
Lennart Poettering a5d0f74e62
Merge pull request #34348 from poettering/stub-efivar-tweaks
sd-stub: report stub location in efi vars
2024-09-11 10:09:53 +02:00
Skye Chappelle a67a206379
Change OS X to macOS in BOOT.md (#34358) 2024-09-11 09:15:39 +02:00
Lennart Poettering a482908cbc stub: add StubDevicePartUUID/StubImageIdentifier
These variables closely mirror the existing
LoaderDevicePartUUID/LoaderImageIdentifier variables. But the Stub…
variables indicate the location of the stub/UKI (i.e. of systemd-stub),
while the Loader… variables indicate the location of the boot loader
(i.e. of systemd-boot). (Except of course, there is no boot loader used,
in which case both sets point to the stub/UKI, as a special case).

This actually matters, as we support that sd-boot runs off the ESP,
while a UKI then runs off XBOOTLDR, i.e. two distinct partitions.
2024-09-11 06:48:27 +02:00
Lennart Poettering 77d496c083 stub: tweak setting of common Loader* EFI vars
Let's always check if we have data to set *first*, and only then check
if an EFI var is already set.

Checking for the EFI var is more expensive after all.
2024-09-11 06:48:27 +02:00
Lennart Poettering 8d5ff87a70 man: fix documentation for LoaderDevicePathUUID + LoaderImageIdentifier, in systemd-stub man page too
Let's fix the version here too, and also clarify that this is usually
not necessarily the ESP.
2024-09-11 06:48:19 +02:00
Lennart Poettering 8b5ad0ba41 man: fix LoaderDevicePathUUID + LoaderImageIdentifier descriptions
First of all, these were always set, i.e. since sd-boot was merged into
our tree, i.e. v220. Let's say so explicitly.

Also, let's be more accurate, regarding which partition this referes to:
it's usually "the" ESP, but given that you can make firmware boot from
arbitrary disks, it could be any other partition too. Hence, be
explicit on this.

Also, clarify tha sd-stub will set this too, if sd-boot never set it.
2024-09-11 06:47:16 +02:00
Lennart Poettering 66d3605896 bootctl: show new sd-boot/sd-stub feature flags 2024-09-11 06:47:16 +02:00
Maanya Goenka 25d1b96880 src/sysext: Use versioned names when logging extensions used for merge operation
If this is not done, and there are two images, image_1.raw and image_2.raw under
an image.raw.v folder, then the log will say "Using extensions image" instead of
using "Using extensions image_2.raw" which is the desired behavior for v-picked extensions.
2024-09-11 06:44:38 +02:00
Lennart Poettering 408ab988db tmpfiles: add separate fragment for stuff we copy from .extra/ into /run/systemd
Let's move copying out the PCR signature/key into its own tmpfiles
snippet.

And then let's add support for copying out the profile + os-release
information systemd-stub now places in the invoked initrd.

That way these four pieces of information are available even after the
initrd→host transition.
2024-09-11 04:47:44 +09:00
Lennart Poettering 41a9a502a1 meson: increase default number of available sections for the stub
Now that we have multi-profile UKIs people likely want to stick more PE
sections into them than before. Hence, bump the number of available PE
section slots to 30 (up from 15). Also, make this configurable at build
time since some folks probably want even more, and others don't want
this at all.

(pre-allocating too many shouldn't matter too much btw, I'd advise
everyone to overshoot, except maybe on the tiniest of embedded boards)
2024-09-11 04:47:00 +09:00
Yu Watanabe fd0958762a man: add basic documents for org.freedesktop.timesync1
Closes #34352.
2024-09-11 04:42:50 +09:00
Yu Watanabe 4a851db694 timesync: add support of basic command line options 2024-09-11 04:08:06 +09:00
Yu Watanabe 40108953c5 timesync: use BusObjectImplementation 2024-09-11 04:03:57 +09:00
Luca Boccassi 59e6059513 doc-sync: strip point release from version before uploading
We create subdirectories for each major release, but not for point releases
so strip the suffix if it is present
2024-09-10 20:20:01 +02:00
Lennart Poettering d794c10d96 cryptsetup: use the new crypt_token_set_external_path() API if available
Let's make use of libcryptsetup's new crypt_token_set_external_path()
API in place of the interposition stuff we have been doing before. Let's
kill it entirely, given that this was a developer feature only anyway
(and guarded by an appropriate ifdef).

Fixes: #30098
2024-09-11 02:56:55 +09:00
Lennart Poettering 34ed064f67 homectl: when chainloading a shell, prefix "-" rather than overriding first char
Login shells are supposed to marked via a dash as first char. We follow
that logic, but right now we simply overwrite the first char of the
shell. That might not be the right choice, given that this turns
"zsh" into "-sh", which suggests some bourne shell process.

Hence, let's correct things, and instead prefix a dash, which should be
safer.

Inspired by findings on https://github.com/systemd/systemd/issues/34153#issuecomment-2338104907
2024-09-10 17:24:21 +02:00
Lennart Poettering 3a2a8585e6
Merge pull request #34339 from poettering/uki-with-many-boot
sd-boot: synthesize one menu entry for each profile of multi-profile UKIs
2024-09-10 16:25:34 +02:00
Lennart Poettering 5446e39e0e hwdb: death to tabs!
Some tabs snuck in here, but we don't like tabs in our codebase. Fix
them.
2024-09-10 16:24:32 +02:00
Yu Watanabe 08491c0cdf
Merge pull request #34331 from yuwata/network-netdev-cleanups
network/netdev: several cleanups for attaching/detaching netdev, and setting/getting ifindex from netdev
2024-09-10 22:05:55 +09:00
Tomas Bzatek 34e56246b1 udev/ata_id: export read look-ahead values
Indicates whether the ATA read look-ahead feature is supported
and enabled.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
2024-09-10 22:04:30 +09:00
Lennart Poettering 8c0d7222b4 boot: don't hardcode drop-in paths at multiple places
Instead, let's define them once, and pass them through as parameters
everywhere.
2024-09-10 14:38:11 +02:00
Lennart Poettering 382e4da4a5 boot: synthesize a separate menu entry from each .profile section
This iterates through the .profile sections a UKI provides and uses it
to generate multiple menu entries from them, one for each .profile
section.
2024-09-10 14:38:11 +02:00
Yu Watanabe 8f28d34246 test-network: add test more cases for assigned units for each interface 2024-09-10 19:30:17 +09:00
Yu Watanabe f49c8e6553 network/state-file: save assigned .netdev file even if the interface is unmanaged
Follow-up for 2cf9b1a0ee.
2024-09-10 19:30:17 +09:00
Yu Watanabe d0899c6a55 network/vxcan: also manage peer interface name by manager
Then, the Link object for the peer interface can have a reference to the
corresponding NetDev object.
2024-09-10 19:30:17 +09:00
Yu Watanabe 971c0ce85c network/vxcan: refuse when peer and the main interface names are equivalent 2024-09-10 19:30:17 +09:00
Yu Watanabe 2d5f58cf41 network/l2tp: manage l2tp session name by Manager
Then, Link object for an L2TP session can have reference to the
corresponding NetDev object.
2024-09-10 19:30:17 +09:00
Yu Watanabe 121d32b09c network/l2tp: refuse duplicated session name 2024-09-10 19:30:17 +09:00
Yu Watanabe c480e4cd66 network/l2tp: downgrade log level of several messages
Also, use log_section_warning_errno() where applicable.
2024-09-10 19:30:17 +09:00
Yu Watanabe 909acd37b8 network/veth: also manage peer name by Manager
Then, the Link object for the peer interface can have a reference to the
corresponding NetDev object.
2024-09-10 19:30:17 +09:00
Yu Watanabe 98fbb3b5b0 network/veth: refuse when peer and the main interface names are equivalent 2024-09-10 19:30:17 +09:00
Yu Watanabe c60cd572bd network/netdev: add attach(), detach(), set_ifindex(), and get_ifindex() to netdev vtable
Currently no vtable sets these functions, but will be used later.
2024-09-10 19:30:17 +09:00
Yu Watanabe 36ca0164ab network/netdev: allow to register the same NetDev object with multiple names
Preparation for later commits.
2024-09-10 19:30:17 +09:00
Yu Watanabe 5dc20e1acd network/netdev: split out netdev_set_ifindex_internal() and _impl()
No functional change, just refactoring and preparation for later
commits.
2024-09-10 19:30:13 +09:00
Yu Watanabe bfacb8fe1d network/netdev: split out netdev_attach() and netdev_attach_name() from netdev_load_one()
No functional change, just refactoring and preparation for later
commits.
2024-09-10 19:29:05 +09:00
Yu Watanabe 0dc71b9584 network/netdev: use hashmap_remove_value() on detaching NetDev from manager
Then, it is not necessary to free NetDev.ifname when a conflicting
.netdev file is already loaded.

This also split out netdev_detach_name() and netdev_detach_impl().

No functional change, just refactoring.
2024-09-10 19:29:05 +09:00
Yu Watanabe bc0d3f3842 network/netdev: downgrade log level in netdev_set_ifindex()
This also makes netdev_enter_failed() called on caller side.

No functional change, just refactoring.
2024-09-10 19:29:05 +09:00
Yu Watanabe 5d7de25052 network/netdev: check family of received NEWLINK message
For safety. No functional change, just refactoring and preparation for
later commits.
2024-09-10 19:28:56 +09:00
Yu Watanabe 72fd133dca network/route: use NetDev object assigned to Link 2024-09-10 16:38:07 +09:00
Yu Watanabe 1788c34628 network/netdev: also check ifindex, iftype, and kind when assigning NetDev to Link
Even when a NetDev object with the same name found, its iftype or kind
may be different. For safety, let's also check them.
2024-09-10 16:38:06 +09:00
Lennart Poettering ea8aa2ea85 boot: only open type2 ukis once when parsing 2024-09-10 09:14:02 +02:00
Lennart Poettering f2129f1d8c
Merge pull request #34294 from poettering/uki-with-many-core
multi-profile UKIs (systemd-stub hookup)
2024-09-10 08:59:53 +02:00
Yu Watanabe 6d449bc71f
Merge pull request #34318 from YHNdnzj/networkctl-edit-if-netdev
networkctl: support editing netdev files by link and cat ":all"
2024-09-10 14:32:28 +09:00
Yu Watanabe 214c2508f3
Merge pull request #34336 from yuwata/nspawn-fuse-follow-ups
nspawn: follow-ups for FUSE support
2024-09-10 14:32:09 +09:00
Lennart Poettering a632d8dd9f stub: add ability to place multiple alternative PE sections of a specific type in the same UKI ("Multi-Profile UKIs")
This adds a ability to add alternative sections of a specific type in
the same UKI. The primary usecase is for supporting multiple different
kernel cmdlines that are baked into a UKI.

The mechanism is relatively simple (I think), in order to make it robust.

1. A new PE section ".profile" is introduced, that is a lot like
   ".osrel", but contains information about a specific "profile" to
   boot. The ".profile" section can appear multiple times in the same
   PE, and acts as delimiter indicating where a new profile starts.
   Everything before the first ".profile" is called the "base profile",
   and is shared among all other profiles, which can then override or
   add addition PE sections on top.

2. An UKI's command line can be prefixed with an argument such as "@0" or
   "@1" or "@2" which indicates the "profile" to boot. If no argument is
   specified the default is profile 0. Also, a UKI that lacks any
   .profile section is treated like one with only a profile 0, but with
   no data in that profile section.

3. The stub will first search for its usual set of PE sections
   (hereafter called "base sections"), and stop at the first .profile PE
   section if any. It will then find the .profile matching the selected
   profile by its index, and any sections found as part of that profile
   on top of the base sections.

And that's already it.

Example: let's say a distro wants to provide a single UKI that can be
invoked in one of three ways:

1. The regular profile that just boots the system
2. A profile that boots into storagetm
3. A profile that initiates factory reset and reboots.

For this it would define a classic UKI with sections .linux, .initrd,
.cmdline, and whatever else it needs. The .cmdline section would contain
the kernel command line for the regular profile.

It would then insert one ".profile" section, with a contents like the
following:

    ID=regular

This is the profile for profile 0. It would immediately afterwards add
another ".profile" section:

    ID=storagetm
    TITLE=Boot into Storage Target Mode

This would then followed with a .cmdline section that is just like the
basic one, but with "rd.systemd.unit=storage-target-mode.target"
suffixed. Then, another .profile section would be added:

    ID=factory-reset
    TITLE=Factory Reset

Which is then followed by one last PE section: a .cmdline one with
"systemd.unit=factory-reset.target" suffixed to te regular command line.

i.e. expressed in tabular form the above would be:

    The base profile:
          .linux
          .initrd
          .cmdline
          .osrel
    The regular boot profile:
          .profile
    The storagetm profile:
          .profile
          .cmdline
    The factory reset profile:
          .profile
          .cmdline

You might wonder why the first .cmdline in the list above is placed in
the base profile rather than in the regular boot profile, given that it
is overriden in all other profiles anyway. And you are right. The only
reason I'd place it in the base profile is that it makes the UKI more
nicely extensible if later profiles are added that want to replace
something else instead of the .cmdline, for example .ucode or so. But it
really doesn't matter much.

While the primary usecase is of course multiple alternative command
lines, the concept is more powerful than that: for various usecases it
might be valuable to offer multiple choices of devicetree, ucode or
initrds.

The .profile contents is also passed to the invoked kernel as a file in
/.extra/profile (via a synthetic initrd). Thus, this functionality can
even be useful without overriding any section at all, simply by means of
reading that file from userspace.

Design choices:

1. On purposes I used a special command line marker (i.e. the "@" thing,
   which maybe we should call the "profile selector"), that doesn't look
   like a regular kernel command line option.  This is because this is
   really not a regular kernel command line option – we process it in
   the stub, then remove it as prefix, and measure the unprefixed
   command line only after that. The kernel will not see the profile
   selector either. I think these special semantics are best
   communicated by making it look substantially different from regular
   options.

2. This moves around measurements a bit. Previously we measured our UKI
   sections right after finding them. Now we first parse the profile
   number from the command line, then search for the profile's sections,
   and only then measure the sections we actually end up using for this
   profile. I think that this logic makes most sense: measure what we
   are using, not what we are overriding. Or in other words, if you boot
   profile @3, then we'll measure .cmdline (assuming it exists) of
   profile 3, and *not* measure .cmdline of the base profile. Also note
   that if the user passes in a custom kernel command line via command
   line arguments we'll strip off the profile selector (i.e. the initial
   "@X" thing) before we pass it on.

3. The .profile stuff is supposed to be generic and extensible. For
   example we could use it in future to mark "dangerous" options such as
   factory reset, so that boot menus can ask for confirmation before
   booting into it. Or we could introduce match expressions against
   SMBIOS or other system identifiers, to filter out profiles on
   specific hw.

Note btw, that PE allows defining multiple sections that point to the
same offsets in the file. This allows sharing payload under different
names. For example, if profile @4 and @7 shall carry the same .ucode
section, they can define .ucode in each profile and then make it point to
the same offset.

Also note that that one can even "mask" a base section in a profile, by
inserting an empty section. For example, if the base .dtb section should
not be used for profile @4, then add a section .dtb right after the
fourth .profile with a zero size to the UKI, and you will get your wish
fulfilled.

This code only contains changes to sd-stub. A follow-up commit will
teach sd-boot to also find this profile PE sections to synthesize
additional menu entries from a single UKI.

A later commit will add support for gnerating this via ukify.

Fixes: #24539
2024-09-10 06:49:08 +02:00
Lennart Poettering f4e081051d efi: teach PE parsing support for ".profile" sections
This adds helpers for:

1. Returning the PE section table of open PE files or memory

2. Scanning PE section tables for the sections that belong to a specific
   profile
2024-09-10 06:49:08 +02:00
Lennart Poettering 52dd7c8131 efi: add free_and_xstrdup16() helper modelled after free_and_strdup() in userspace 2024-09-10 06:48:38 +02:00
Lennart Poettering 9f6f3bd2fb
Merge pull request #34297 from poettering/shell-prompt-extra
shell: define three system credentials we can propagate into shell prompts and welcome msgs
2024-09-10 06:42:31 +02:00
Lennart Poettering 89cdd4866a
Merge pull request #34328 from poettering/analyze-help-text
analyze: --help text improvements
2024-09-10 06:42:03 +02:00
Lennart Poettering b4199a97e6
Merge pull request #34330 from poettering/shutdown-async-sync
shutdown: make all fsync()s asynchronous and apply timeout
2024-09-10 06:41:46 +02:00
Mike Yuan 0d3787deac
networkctl: support editing netdev files by link and cat ":all"
Also, don't abuse RET_GATHER in verb_cat(), where the failures
are most likely unrelated to each other.

Closes #34281
2024-09-09 23:20:42 +02:00
Mike Yuan c9837c17d5
networkctl-status-link: show netdev files associated with link 2024-09-09 23:20:42 +02:00
Mike Yuan 4591c89a15
sd-network: introduce sd_network_link_get_netdev_file{,_dropins} 2024-09-09 23:20:42 +02:00
Mike Yuan 2cf9b1a0ee
network: store netdev drop-in paths and dump into state file 2024-09-09 23:20:41 +02:00
Mike Yuan 4c8dc66438
networkd-state-file: use ASSERT_PTR where appropriate 2024-09-09 21:45:42 +02:00
Yu Watanabe da7fb6dad7 nspawn: use ERRNO_IS_NEG_NOT_SUPPORTED() at one more place
Follow-up for dc3223919f.
Addresses https://github.com/systemd/systemd/pull/34067#discussion_r1748061156.

Error codes other than ENOSYS may not come here, but if it comes, still
there is nothing we can do here, so let's not log the failure loudly.
2024-09-10 04:38:33 +09:00
Yu Watanabe b86b90cec5 nspawn: sync DeviceAllow= setting with systemd-nspawn@.service
Follow-up for dc3223919f.
Addresses https://github.com/systemd/systemd/pull/34067#discussion_r1748592958.

Otherwise, containers started with and without --keep-unit option run in
different device policies.
2024-09-10 04:38:11 +09:00
Lennart Poettering b4b66b2662 shutdown: replace unbounded fsync() with bounded sync_with_progress()
Let's put a time-out on this syncing.

Inspired-by: #34289 #34283
2024-09-09 19:12:31 +02:00
Lennart Poettering 13b5225d62 shutdown: teach sync_with_progress() to optionally sync a specific fd only
This is preparation for reusing the logic for syncing DM and other
devices with a timeout applied.
2024-09-09 19:12:31 +02:00
Lennart Poettering a8ea7c1940 meson: tweak meson conditionalization for ssh{d,}_config drop-ins
Let's make sure "no" is an acceptable setting for these paths.
2024-09-09 19:03:48 +02:00
Lennart Poettering 229d4a9806 shell: define three system credentials we can propagate into shell prompts and welcome messages 2024-09-09 19:03:48 +02:00
Lennart Poettering 8b29949a41 machinectl: suppress redirection notice if --quiet is specified 2024-09-09 18:58:57 +02:00
Daan De Meyer fa693fdc7e core: Add support for PrivateUsers=identity
This configures an indentity mapping similar to
systemd-nspawn --private-users=identity.
2024-09-09 18:31:01 +02:00
Yanqing Jing d8b4be38dd update keyboard hwdb to add acer Predator PHN16-72 2024-09-09 17:19:28 +02:00
Lennart Poettering 7a3223f509
Merge pull request #34258 from yuwata/nspawn-volatile-u
nspawn: make --volatile work with -U
2024-09-09 17:11:11 +02:00
Lennart Poettering 645a3fa9e8 analyze: add some roughly useful subsections to --help text
It's a long long list of verbs we support now, let's make it easier to
digest, like we did in systemctl --help and elsewhere.
2024-09-09 17:01:22 +02:00
Lennart Poettering fd4b848436 analyze: add section underlining to --help text
Do this like we usually do these days.
2024-09-09 17:01:19 +02:00
Daan De Meyer c1852f9d5f sysupdate: Add --transfer-source=
In mkosi, I want to add a sysupdate verb to wrap systemd-sysupdate.
The definitions will be picked up from mkosi.sysupdate/ and passed
to systemd-sysupdate. I want users to be able to write transfer
definitions that are independent of the output directory used by
mkosi. To make this possible, it should be possible to specify the
directory that transfer sources should be looked up in on the sysupdate
command line. Let's allow this via a new --transfer-source= option.

Additionally, transfer sources that want to take advantage of this
feature should specify PathRelativeTo=directory to indicate the configured
Path= is interpreted relative to the tranfer source directory specified
on the CLI.

This allows for the following transfer definition to be put in
mkosi.sysupdate:

"""
[Transfer]
ProtectVersion=%A

[Source]
Type=regular-file
Path=/
PathRelativeTo=directory
MatchPattern=ParticleOS_@v.usr-%a.@u.raw

[Target]
Type=partition
Path=auto
MatchPattern=ParticleOS_@v
MatchPartitionType=usr
PartitionFlags=0
ReadOnly=1
"""
2024-09-09 16:41:52 +02:00
Mike Yuan 4ec630bfba
Merge pull request #33833 from YHNdnzj/manager-reload-assert
core/manager: do not re-init Manager.lookup_paths when manager_reload(), minor assorted cleanups
2024-09-09 14:21:57 +02:00
Daan De Meyer 6e4d47b5ae repart: Initialize split_name_format in copy_from_one()
Let's allow splitting the partitions from an existing disk image
by initializing split_name_format when using --copy-from=.
2024-09-09 13:22:26 +02:00
Yu Watanabe c1062559a9
Merge pull request #34307 from yuwata/linux-more-network-headers
linux: import more network headers
2024-09-09 19:33:14 +09:00
Yu Watanabe ef32235db1
Merge pull request #34067 from LukeShu/lukeshu/nspawn-fuse
nspawn: enable FUSE in containers
2024-09-09 19:32:16 +09:00
Yu Watanabe 85fd8df03d missing_socket: drop unnecessary definitions
Now, we have copy of vm_sockets.h, hence these definitions are not
necessary anymore.
2024-09-09 14:52:18 +09:00
Yu Watanabe 47a71f9852 missing_network: drop unnecessary definition
Now we have ipv6.h, hence the definition is not necessary anymore.
2024-09-09 14:52:18 +09:00
Yu Watanabe 0ca88780d6 arphrd-list: use imported linux/if_arp.h 2024-09-09 14:52:18 +09:00
Yu Watanabe a84649592c linux: import more network related headers from v6.11-rc6
Hopefully, no effective change.
2024-09-09 14:52:18 +09:00
Mike Yuan 978e7d166c terminal-util: correct fd validity check
Follow-up for 14f594b995
2024-09-08 20:45:33 +02:00
samuelvw01 54ada3d13a Fix typo in escape.c 2024-09-08 18:55:13 +09:00
Erik Sjölund fdc1b714d4 TODO: fix typo 2024-09-08 18:54:20 +09:00
marginaldev 5bad3c4222 Fix grammar in udevadm settle timeout message 2024-09-08 12:28:22 +09:00
Luke T. Shumaker dc3223919f nspawn: enable FUSE in containers
Linux kernel v4.18 (2018-08-12) added user-namespace support to FUSE, and
bumped the FUSE version to 7.27 (see: da315f6e0398 (Merge tag
'fuse-update-4.18' of
git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse, Linus Torvalds,
2018-06-07).  This means that on such kernels it is safe to enable FUSE in
nspawn containers.

In outer_child(), before calling copy_devnodes(), check the FUSE version to
decide whether enable (>=7.27) or disable (<7.27) FUSE in the container.  We
look at the FUSE version instead of the kernel version in order to enable FUSE
support on older-versioned kernels that may have the mentioned patchset
backported ([as requested by @poettering][1]).  However, I am not sure that
this is safe; user-namespace support is not a documented part of the FUSE
protocol, which is what FUSE_KERNEL_VERSION/FUSE_KERNEL_MINOR_VERSION are meant
to capture.  While the same patchset
 - added FUSE_ABORT_ERROR (which is all that the 7.27 version bump
   is documented as including),
 - bumped FUSE_KERNEL_MINOR_VERSION from 26 to 27, and
 - added user-namespace support
these 3 things are not inseparable; it is conceivable to me that a backport
could include the first 2 of those things and exclude the 3rd; perhaps it would
be safer to check the kernel version.

Do note that our get_fuse_version() function uses the fsopen() family of
syscalls, which were not added until Linux kernel v5.2 (2019-07-07); so if
nothing has been backported, then the minimum kernel version for FUSE-in-nspawn
is actually v5.2, not v4.18.

Pass whether or not to enable FUSE to copy_devnodes(); have copy_devnodes()
copy in /dev/fuse if enabled.

Pass whether or not to enable FUSE back over fd_outer_socket to run_container()
so that it can pass that to append_machine_properties() (via either
register_machine() or allocate_scope()); have append_machine_properties()
append "DeviceAllow=/dev/fuse rw" if enabled.

For testing, simply check that /dev/fuse can be opened for reading and writing,
but that actually reading from it fails with EPERM.  The test assumes that if
FUSE is supported (/dev/fuse exists), then the testsuite is running on a kernel
with FUSE >= 7.27; I am unsure how to go about writing a test that validates
that the version check disables FUSE on old kernels.

[1]: https://github.com/systemd/systemd/issues/17607#issuecomment-745418835

Closes #17607
2024-09-07 10:18:35 -06:00
Yu Watanabe a9987de62c NEWS: fix typo
Follow-up for 7a3a49386c.
2024-09-07 22:26:24 +09:00
Yu Watanabe c8f2409574 man/varlinkctl: fix typo
Follow-up for 39ce86d19c.
2024-09-07 22:24:58 +09:00
Yu Watanabe 14a499ed77 network/route: fix typo
Follow-up for 195bb6f97e.
2024-09-07 22:22:44 +09:00
Mike Yuan 30b55e98d1
core/manager: do not re-init Manager.lookup_paths when manager_reload()
Follow-up for 99aad9a2b9

The commit changed lookup_paths_init_or_warn() call to
be fatal to manager_reload(), but invoke_main_loop()
assumes that manager_reload() would only return
recoverable error, and put the manager back to
MANAGER_OK in that case, which is spurious.

Looking at it more, it appears to be utterly unnecessary
to reinitialize LookupPaths here, given that nothing during
the reload process would change the search dirs. Let's drop
the path altogether hence.
2024-09-07 14:52:50 +02:00
Mike Yuan e634df9f16
core/manager: rename NOTIFY_RCVBUF_SIZE to MANAGER_SOCKET_RCVBUF_SIZE
This is used for all our sockets, hence rename as so.
2024-09-07 14:52:50 +02:00
Mike Yuan ebf0e859da
varlinkctl: downgrade ignored error msg to LOG_WARNING
Follow-up for 39ce86d19c
2024-09-07 14:46:18 +02:00
Mike Yuan 5bab5e4ac3
chattr-util: use BIT_FOREACH where appropriate 2024-09-07 14:46:18 +02:00
Mike Yuan 26f5897767
chattr-util: set O_NOCTTY when reopening O_PATH fd
Follow-up for 07862c9fc2
2024-09-07 14:46:18 +02:00
Daan De Meyer 517e892210 mkosi: Drop _fixperms workaround
This was added to deal with a bug in the rpm 4.20 rc in Rawhide
but since that's been fixed, let's drop the workaround.
2024-09-07 21:20:09 +09:00
Michal Sekletar 887a18b0d3 docs: use actual docs/HACKING.md URL 2024-09-07 12:14:42 +02:00
Luke T. Shumaker f1bf6054ce nspawn: register_machine() and allocate_scope() bools to flags 2024-09-06 18:33:50 -06:00
Luke T. Shumaker 14762b27d3 nspawn: re-flow comments that are wrapped weird 2024-09-06 18:33:50 -06:00
Luke T. Shumaker 93c15c6d43 test: add a testcase for unprivileged nspawn
Right now it mostly duplicates a test that already exists in
TEST-50-DISSECT.mountfsd.sh, but it serves as a template for more unprivileged
nspawn tests.
2024-09-06 18:33:50 -06:00
Luke T. Shumaker 6cb5c6aeef nspawn: convert copy_devnodes():devnodes from nulstr to strv 2024-09-06 18:33:50 -06:00
Luke T. Shumaker cde9210efd nspawn: fix the comment about which namespaces outer_child is in
The comment says that it is still in the host's CLONE_NEWUSER namespace,
which is not true if !arg_privileged.  Also, it says that the CLONE_NEWNS
namespace was created by clone(), but if !arg_privileged then it was
actually created by nsresource_allocate_userns() and switched into by
setns().  Fix those inaccuracies.

When trying to word it clearly, there are enough commas and nested clauses
that I think it's clearer to break it into a list/table.
2024-09-06 18:33:50 -06:00
Yu Watanabe 5573e067d0
Merge pull request #34295 from poettering/uki-with-many-ukify
ukify: add multi-profile UKI support
2024-09-07 08:08:48 +09:00
Lennart Poettering 39ce86d19c varlinkctl: add --timeout= switch to tweak time-out behaviour
Fixes: #33772
2024-09-07 07:35:39 +09:00
Lennart Poettering 925095a6db dm-util: get rid of flex array in middle of structure
Fixes: #33936
2024-09-07 07:34:43 +09:00
Takeo Kondo 71f43fc882 man: CAP_SYS_ADMIN does NOT grant any permission for dbus API 2024-09-06 21:16:53 +02:00
Lennart Poettering d43bf17752
Merge pull request #34298 from poettering/pcrlock-cred-fix
pcrlock: be more careful when preparing credential name for pcrlock p…
2024-09-06 21:16:37 +02:00
Lennart Poettering fc8ddae76b pcrlock: be more careful when preparing credential name for pcrlock policy
The .cred suffix is stripped from a credential as it is imported from
the ESP, hence it should not be included in the credential name embedded
in the credential.

Fixes: #33497
2024-09-06 18:55:32 +02:00
Lennart Poettering 456cd065bf
Merge pull request #34177 from poettering/pcrlock-and-signed
cryptenroll/cryptsetup: support combined signed PCR + pcrlock policies
2024-09-06 18:11:22 +02:00
Lennart Poettering bc3e2c5a57 ukify: introduce new --measure-base= switch 2024-09-06 16:12:03 +02:00
Lennart Poettering b6570095ce ukify: add new --extend= switch for importing an existing UKI's sections to later extend
This options is pretty simple, it allows specifying an UKI whose
sections to import first, and place at the beginning of the new UKI.

This is useful for generating multi-profile UKIs piecemeal: generate the
base UKI first, then append a profile, and another one and another one.

The sections imported this way are not included in any PCR signature,
the assumption is that that already happened before in the imported UKI.
2024-09-06 16:12:03 +02:00
Lennart Poettering 22b8236ff6 ukify: add basic .profile support
This just allows including .profile sections, but doesn't try to be
smart about it. This alone won't help you much to create valid
multi-profile UKIs.
2024-09-06 16:12:03 +02:00
Lennart Poettering 742e00e3f5 journald: mention the access mode we tried to open /dev/kmsg in
Let's make clearer what we are going to use /dev/kmsg for: read/write or just
writing. This hopefully should avoid confusion, such as the one #33975
is result of.

(Also while we are at it, add one extra debug message).

Fixes: #33975
2024-09-06 16:07:27 +02:00
Lennart Poettering 7a3a49386c NEWS: extend the userdb sshd_config NEWS entry a bit 2024-09-06 23:02:29 +09:00
Lennart Poettering b52af7d243 tpm2-util: introduce tpm2b_sensitive_data_erase_and_esys_freep() destructor
Let's make sure we erase TPM2B_SENSITIVE_DATA structures reliably in all
code paths.
2024-09-06 15:55:28 +02:00
Lennart Poettering 8e6587679b cryptenroll/cryptsetup: allow combined signed TPM2 PCR policy + pcrlock policy
So far you had to pick:

1. Use a signed PCR TPM2 policy to lock your disk to (i.e. UKI vendor
   blesses your setup via signature)
or
2. Use a pcrlock policy (i.e. local system blesses your setup via
   dynamic local policy stored in NV index)

It was not possible combine these two, because TPM2 access policies do
not allow the combination of PolicyAuthorize (used to implement #1
above) and PolicyAuthorizeNV (used to implement #2) in a single policy,
unless one is "further upstream" (and can simply remove the other from
the policy freely).

This is quite limiting of course, since we actually do want to enforce
on each TPM object that both the OS vendor policy and the local policy
must be fulfilled, without the chance for the vendor or the local system
to disable the other.

This patch addresses this: instead of trying to find a way to come up
with some adventurous scheme to combine both policy into one TPM2
policy, we simply shard the symmetric LUKS decryption key: one half we
protect via the signed PCR policy, and the other we protect via the
pcrlock policy. Only if both halves can be acquired the disk can be
decrypted.

This means:

1. we simply double the unlock key in length in case both policies shall
   be used.
2. We store two resulting TPM policy hashes in the LUKS token JSON, one
   for each policy
3. We store two sealed TPM policy key blobs in the LUKS token JSON, for
   both halves of the LUKS unlock key.

This patch keeps the "sharding" logic relatively generic (i.e. the low
level logic is actually fine with more than 2 shards), because I figure
sooner or later we might have to encode more shards, for example if we
add further TPM2-based access policies, for example when combining FIDO2
with TPM2, or implementing TOTP for this.
2024-09-06 15:55:28 +02:00
Lennart Poettering 664570f531 iovec-util: add iovec_append() for appending to an existing iovec 2024-09-06 15:23:14 +02:00
Lennart Poettering 9a78f9e10c
Merge pull request #34291 from poettering/utmpx-all-the-way
tree-wide: complete the switch to utmpx
2024-09-06 15:22:52 +02:00
Lennart Poettering 22f3f2cebd man: document that sd_bus_message_read_strv() happily spits out empty arrays as NULL
Fixes: #34163
2024-09-06 14:10:12 +02:00
Lennart Poettering 51da613bc4 tree-wide: use UTMPX_FILE rather than _PATH_UTMPX
Apparently _PATH_UTMPX is a glibc'ism. UTMPX_FILE is the same thing and
what everyone else uses. Since they are otherwise equivalent, let's just
switch.
2024-09-06 13:54:19 +02:00
Lennart Poettering 98dc726902 test-utmp: replace UT_LINESIZE/UT_NAMESIZE/UT_HOSTSIZE with sizeof_field()
utmpx doesn't know these defines, hence fix them.
2024-09-06 13:54:15 +02:00
Lennart Poettering 983fee2e94 tree-wide: drop unnecessary utmp includes 2024-09-06 13:54:12 +02:00
Lennart Poettering f3389fffd6 user-util: switch from utmp to utmpx
We generally use utmpx instead of utmp (both are actually identical on
Linux, but utmpx is POSIX, while utmp is not). Let's fix one left-over
case.

UT_NAMESIZE does not exist in utmpx world, it has no direct counterpart,
hence let's just sizeof_field() to determine the size of the actual
field. (which comes to the same result of course: 32).
2024-09-06 13:54:09 +02:00
Etienne Cordonnier 4ac1755be2 coredump: set ProtectHome to read-only
In 924453c225
ProtectHome was set to true for systemd-coredump in order to reduce risk, since an attacker could craft a malicious binary in order to compromise systemd-coredump.
At that point the object analysis was done in the main systemd-coredump process.
Because of this systemd-coredump is unable to product symbolicated call-stacks for binaries running under /home ("n/a" is shown instead of function names).

However, later in 61aea456c1 systemd-coredump was changed to do the object analysis in a forked process,
covering those security concerns.

Let's set ProtectHome to read-only so that systemd-coredump produces symbolicated call-stacks for processes running under /home.
2024-09-06 13:30:36 +02:00
Lennart Poettering b9ea646808
Merge pull request #34279 from yuwata/ask-password
ask-password: refuse empty password strv
2024-09-06 13:30:15 +02:00
Lennart Poettering 5bef96b939
Merge pull request #34285 from poettering/boot-measure-profile
measure: introduce support for a new ".profile" section
2024-09-06 13:06:58 +02:00
Léane GRASSER cb8ec50632 po: Translated using Weblate (French)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-09-06 18:53:32 +09:00
Lennart Poettering 0f0bed8be6 measure: introduce support for a new ".profile" section
This introduces the concept, and makes sure systemd-measure covers it.
See a later commit for details on the new section.
2024-09-06 11:15:45 +02:00
Lennart Poettering c334b9912a uki: add new ".profile" PE section type
This is the most basic preparatory work for supporting multi-profile
UKIs.

(This temporarily drops an assert_cc() check which we'll address in the
next commit)
2024-09-06 11:15:06 +02:00
Yu Watanabe 195bb6f97e network/route: ignore EEXIST reply when the corresponding request is already detached
Follow-ups for db8dc7c1dd.
Fixes #34275.
2024-09-06 16:07:25 +09:00
Daan De Meyer b798f658a2
Merge pull request #34278 from yuwata/timesync-log
timesync: downgrade log level for several messages
2024-09-06 08:09:56 +02:00
Daan De Meyer c81c2ed1eb
Merge pull request #34280 from yuwata/cleanups
tree-wide: trivial cleanups
2024-09-06 08:08:56 +02:00
Yu Watanabe 204529d0fc tree-wide: check if non-empty password is acquired 2024-09-06 15:00:32 +09:00
Yu Watanabe 623a8b1922 ask-password: refuse empty password strv
Fixes #34270.
2024-09-06 14:58:46 +09:00
Yu Watanabe 20040416e9 sd-netlink: fix typo
Fixes #34273.
2024-09-06 07:37:13 +02:00
Yu Watanabe efedb6b0f3 nspawn: refuse to bind mount device node from host when --private-users= is specified
Also do not chown if a device node is bind-mounted.

Fixes #34243.
2024-09-06 13:28:17 +09:00
Yu Watanabe 48878074d6 test: add test cases for --volatile= with -U
For issue #34254.
2024-09-06 13:24:36 +09:00
Yu Watanabe 025be2361b nspawn: only remount /usr/ with idmap when --volatile=yes
The root directory is already mounted with a picked UID shift, hence
it is not necessary to remount with idmap. However, /usr/ is a bind-mount,
hence it must be remounted with idmap.

With this change, now '-U --volatile=yes' works fine.

Fixes #34254.
2024-09-06 13:24:12 +09:00
Yu Watanabe 2c2511aa73 nspawn: mount /var/ after remount_idmap() when --volatile=state
Previously, remount_idmap() failed as /var/ was already mounted, thus
remounting (strictly speaking, unmounting old root directory) failed
with -EBUSY.

As tmpfs /var/ is mounted with picked UID shift, it should not be
remounted with idmap, but needs to be mounted after the root directory
being remounted.

This makes '-U --volatile=state' work as expected.
2024-09-06 13:22:26 +09:00
Yu Watanabe 21cd84df69 nspawn: use strv_extend() and friends to build directories passed to remount_idmap()
No functional change, just refactoring and preparation for later change.
2024-09-06 13:13:15 +09:00
Yu Watanabe 31a9aedf03 test: fix copy-and-paste error in comment 2024-09-06 13:10:19 +09:00
Yu Watanabe 0e40a26341 nspawn: fix indentation 2024-09-06 13:10:04 +09:00
Yu Watanabe fe7a126ce8 base-filesystem: use FOREACH_ELEMENT() 2024-09-06 13:09:36 +09:00
Yu Watanabe dd86e6c45c mount-util: wrap long line 2024-09-06 13:09:36 +09:00
Yu Watanabe 74fe65480c
Merge pull request #34203 from yuwata/network-conf-parser
network: several cleanups for conf parser
2024-09-06 13:07:39 +09:00
Yu Watanabe 03ec7311f1
Merge pull request #34267 from DaanDeMeyer/script
mkosi: Install util-linux-script on Rawhide
2024-09-06 10:43:04 +09:00
Yu Watanabe dd1de202d7 network/address: use log_section_warning() 2024-09-06 10:38:57 +09:00
Yu Watanabe c6f2197fcf network/address: use generic section parser more
This also
- rename variable n -> address,
- use log_syntax_parse_error() where applicable,
- add one more assertion for lvalue in config_parse_address().
2024-09-06 10:38:15 +09:00
Yu Watanabe 6cf41d4603 network/address: introduce generic config parser for [Address] section
Then, use generic conf parsers defined in conf-parser.[ch].
2024-09-06 10:37:23 +09:00
Yu Watanabe 174c5c5f06 firewall-util: several cleanups for config_parse_nft_set()
- use log_syntax_parse_error(),
- return 1 on success,
- drop unnecessary or redundant assertions,
- add missing log_oom().
2024-09-06 10:35:02 +09:00
Yu Watanabe ff616da459 conf-parser: introduce config_parse_uint32_invert_flag()
It is similar to config_parse_uint32_flag(), but drops the specified flag
when true.
2024-09-06 10:35:02 +09:00
Yu Watanabe c2e8e1f020 network: align table in network-gperf 2024-09-06 10:35:02 +09:00
Yu Watanabe e208fad798 network/address-label: use log_section_warning_errno() 2024-09-06 10:35:02 +09:00
Yu Watanabe 934cf1c06b network/address-label: introduce generic conf parser for [IPv6AddressLabel] section
This also
- renames n -> label,
- use log_syntax_parse_error().

No functional change, just refactoring.
2024-09-06 10:34:53 +09:00
Yu Watanabe 152b8a4e71 conf-parser: introduce config section parser wrapper
It will be used later.
2024-09-06 10:33:05 +09:00
Bastien Nocera 5a11437e2e hwdb: Mark Apple Wireless keyboards as not having NumLock LED
Mark those Apple Wireless keyboards as not having a NumLock key:
https://en.wikipedia.org/wiki/Apple_Wireless_Keyboard

You can see that they don't have a NumLock LED because they didn't even
have a NumLock in the first place:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fea6fe7d5ef1b5fa5f78048d4729f85181c04ca
2024-09-06 10:22:43 +09:00
Yu Watanabe b9f208643b timesync: make manager_is_connected() static 2024-09-06 10:21:07 +09:00
Yu Watanabe c58f4100cc timesync: downgrade log level about network configuration change
These message may be unnecessarily shown multiple times when e.g.
networkd is restarted, system is wakeup from suspend, and so on.

Closes #34262.
2024-09-06 10:20:48 +09:00
Yu Watanabe ccd62e6d4d
Merge pull request #34155 from poettering/gmtime-safe
handle gmtime_r() errors more robustly
2024-09-06 09:07:48 +09:00
A. Wilcox d0e11b9e17 basic: Include <sys/file.h> for LOCK_* constants
This is needed to ensure LOCK_{EX,SH} are defined in certain
environments, including uclibc-ng and musl libc.
2024-09-06 08:37:25 +09:00
Yu Watanabe a00006861b
Merge pull request #34261 from yuwata/repart-seed-random
repart: initialize seed earlier
2024-09-06 08:30:12 +09:00
A. Wilcox 79f0e94e27 edit-util: EditFileContext: avoid reserved 'stdin'
The identifier 'stdin' is reserved in C.  It can be #defined to any
statement that evaluates to a FILE*.  We do not want that for our field,
so change to a more descriptive name.
2024-09-06 08:29:45 +09:00
Peter Rajnoha cbe65d38cf udev: allow persistent storage rules for rbd devices
The RADOS Block Device (rbd) can be used as any other block device with
further layers on top of it, hence allow the common persistent storage
rules to apply, including watching for changes.
2024-09-06 08:26:44 +09:00
Daan De Meyer 31e7a37480 mkosi: Remove rpm workaround
rpm 4.19.93 (4.20 rc) is in rawhide so let's drop the workaround.
2024-09-05 18:45:52 +02:00
Daan De Meyer 4eae2be0d7 mkosi: Install util-linux-script on Rawhide
It's now subpackaged so we can build images without pulling in
libutempter but we use script in the testsuite so let's install the
subpackage.
2024-09-05 18:38:33 +02:00
Daan De Meyer 6c8e9ba2f0
Merge pull request #34266 from DaanDeMeyer/fix
mkfs-util: Make sure we pass non option arguments last
2024-09-05 18:36:44 +02:00
Lennart Poettering 6f5cf41570 time-util: rework localtime_or_gmtime() into localtime_or_gmtime_usec()
We typically want to deal in usec_t, hence let's change the prototype
accordingly, and do proper range checks. Also, make sure are not
confused by negative times.

Do something similar for mktime_or_timegm().

This is a more comprehensive alternative to #34065

Replaces: #34065
2024-09-05 17:40:25 +02:00
Lennart Poettering 9640db13f0 hwclock-util: the struct tm parameter is not a pure return parameter, it's also an input parameter 2024-09-05 17:19:14 +02:00
Lennart Poettering 41902bacc3
Merge pull request #34256 from YHNdnzj/pid1-followup
core: follow-ups for recent PRs
2024-09-05 17:01:10 +02:00
Daan De Meyer 9b18dcf8c2 mkfs-util: Make sure we pass non option arguments last
POSIX specifies that getopt() stops parsing options when it encounters
a non-option argument, so let's make sure we pass non-option arguments
last.
2024-09-05 16:37:34 +02:00
Daan De Meyer 362efc3804 mkfs-util: Fix error handling 2024-09-05 16:12:36 +02:00
Lennart Poettering e3cd748e7c update TODO 2024-09-05 15:56:28 +02:00
Yu Watanabe fe6049d021 test: fix indentation 2024-09-05 18:01:42 +09:00
Yu Watanabe 56d6ebd404 test: add test case for systemd-repart --seed=random
For issue #34257.
2024-09-05 18:01:42 +09:00
Lennart Poettering 548b744b7b
Merge pull request #34235 from yuwata/firstboot-systemctl-trivial-cleanups
firstboot,systemctl: trivial cleanups
2024-09-05 09:22:54 +02:00
Yu Watanabe b8a8000aba repart: initialize seed earlier
As the seed is used by context_load_partition_table() -> derive_uuid().

Fixes #34257.
2024-09-05 15:49:24 +09:00
Yu Watanabe 8d78191a46 man: ARP=no also disables IPv6 Neighbor Discovery Protocol
Addresses https://github.com/systemd/systemd/issues/18063#issuecomment-2323410288.
2024-09-05 10:20:18 +09:00
Yu Watanabe 3ce22ee7f8
Merge pull request #34090 from DaanDeMeyer/cow-fix
Rework COW <=> NOCOW copying behavior
2024-09-05 10:19:49 +09:00
Michael Ferrari 87e0eafe03 firstboot: reduce log level of timezone validation
An error message is already printed directly after, so the user already
knows that the validation failed. This also isn't done for the other
validation functions.
2024-09-05 10:08:42 +09:00
Michael Ferrari 3f084827ff firstboot: reduce empty input log level
The user knows they pressed `Enter`, no need to inform them again about
that they skipped the prompt.
2024-09-05 10:08:42 +09:00
Michael Ferrari b7c0d924bd firstboot: add newline before key wait
When sd-firstboot is ran during first boot of a new system this missing
newline leads to a bootup message being appended on the same line as the
message instructing to press a key.
2024-09-05 10:08:38 +09:00
Yu Watanabe c47f2a26b0 test: add test cases of "systemctl cat" for nonexistent units 2024-09-05 10:08:03 +09:00
Ivan Shapovalov b498f250b2 systemctl: cat: do not exit(1) on missing units if `--force`
We are eating the error message if `--force` is set, so do not return
a non-zero exit code either.
2024-09-05 10:08:03 +09:00
Yu Watanabe 1306567a40
Merge pull request #34212 from YHNdnzj/recvmsg-safe-trunc
tree-wide: handle MSG_TRUNC with recvmsg_safe()
2024-09-05 07:22:28 +09:00
Mike Yuan 7a9f0125bb
core: rename BindJournalSockets= to BindLogSockets=
Addresses https://github.com/systemd/systemd/pull/32487#issuecomment-2328465309
2024-09-04 21:44:25 +02:00
Mike Yuan cc4f736ae3
core/namespace: add comment to explain the non-obvious assumption on /run/systemd/journal/
Follow-up for 119820f8ab

Addresses https://github.com/systemd/systemd/pull/32487#discussion_r1743493196
2024-09-04 21:44:25 +02:00
Mike Yuan 95f9e85aaa
core/namespace: make bind mounted journal sockets nosuid + noexec + nodev
Addresses https://github.com/systemd/systemd/pull/32487#discussion_r1743464797
2024-09-04 21:44:24 +02:00
Mike Yuan 7583859ba8
core/exec-invoke: use bind_mount_add() where appropriate 2024-09-04 21:44:24 +02:00
Mike Yuan 432aab24b0
core/namespace: use GREEDY_REALLOC at one more place 2024-09-04 21:44:24 +02:00
Mike Yuan 7f2a7ccf7d
core/unit: introduce unit_set_debug_invocation()
Given that debug_invocation is a Unit thing, make
service_set_debug_invocation() generic. Plus, don't
say "Service failed", as it would be spurious when
Restart=always.
2024-09-04 21:37:20 +02:00
Mike Yuan 40233f70cc
core: add missing serialization for Unit.debug_invocation
Follow-up for 7d8bbfbe08
2024-09-04 21:37:20 +02:00
Mike Yuan 7e6ef4340b
core/service: modernize service_load_pid_file() a bit 2024-09-04 21:37:20 +02:00
Mike Yuan 0ec3d45bcc
core/service: minor coding style tweak 2024-09-04 21:37:19 +02:00
Daan De Meyer b1cfa93080 copy: Introduce COPY_NOCOW_AFTER and use it when copying images
When dealing with copying COW images, we have to make a tradeoff:

- Either we don't touch the NOCOW bit on the copied file COW and get
  an instant copy because we're able to reflink, but we might get
  reduced performance if the source file was COW as COW files and lots
  of random writes don't play well together.
- Or we force NOCOW for the copied file, which means we have to do a
  full copy as reflinking from COW files to NOCOW files or vice versa
  is not supported.

In exec-invoke.c, we've opted for the first option. In nspawn.c and
discover-image.c, we've opted for the second option.

In nspawn, this applies to the --ephemeral option to make ephemeral
copies. In discover-image.c, this applies to cloning images into
/var/lib/machines. Both these features might be used to run many
machines of the same original image. We really don't want to force
a full copy onto users in these scenarios when they're expecting
reflink behavior, leading to them running out of disk space. Instead,
degraded performance in their machines is a much less severe issue,
which they will discover on their own if it affects them, at which
point they can make their original image NOCOW at which point they'll
get both the reflinks and better performance.

Given the above reasoning, let's switch nspawn.c and discover-image.c
to use COPY_NOCOW_AFTER as well instead of enabling NOCOW upfront and
forcing a copy if the original source image is COW.
2024-09-04 19:23:16 +02:00
Daan De Meyer 8af3b12fe0 copy: Copy nocow flag by default
Unless otherwise requested, if we're going to copy a nocow file, make the
target file nocow as well.

Aside from keeping the performance characteristics of the cow or nocow file
intact, reflinking also only works from cow to cow or nocow to nocow files.
Reflinking from cow to nocow or nocow to cow files does not work and can
easily lead to unexpected copies for users, so by keeping the nocow bit
intact across copies by default we also make sure reflinks always work.
2024-09-04 19:23:13 +02:00
Daan De Meyer 07862c9fc2 chattr-util: Optimize read_attr_at()
Let's make sure we only reopen O_PATH file descriptors.
2024-09-04 18:51:53 +02:00
Mike Yuan ad501930d7
socket-util: make recvmsg_safe() handle MSG_TRUNC too
Also, unify MSG_TRUNC handling all across the codebase.
2024-09-04 18:51:44 +02:00
Mike Yuan c1bf6f148e
machine-dbus: use in_same_namespace() at one more place 2024-09-04 18:50:55 +02:00
Mike Yuan 3c0d765375
udev-ctrl: drop unused next_datagram_size_fd() call 2024-09-04 18:50:55 +02:00
Mike Yuan e8b9767f51
core/manager: close all cmsg fds where none is expected 2024-09-04 18:50:55 +02:00
Mike Yuan 3ad7f79023
udev-ctrl: add missing size check of received message
While at it, downgrade log level of ignored errors to LOG_WARNING.
2024-09-04 18:50:55 +02:00
Mike Yuan 190a095380
audit-util: check correct errno 2024-09-04 18:50:54 +02:00
Mike Yuan 6f0d6ef7ce
sd-varlink: check correct errno
'n' can also be assigned from recvmsg_safe(), which is our own
func returning negative errno.
2024-09-04 18:50:54 +02:00
Mike Yuan d6024cb3c1
fd-util: also close pidfd from SCM_PIDFD in cmsg_close_all() 2024-09-04 18:50:54 +02:00
Daan De Meyer 74c9606025 Revert "copy: Copy file attributes as well"
This reverts commit 2356104efc.
2024-09-04 18:49:05 +02:00
Daan De Meyer 519216b71f Revert "tree-wide: Don't explicity disable copy-on-write when copying images"
Let's still try to disable COW after copying. It won't do much, but
it doesn't hurt either.

See https://github.com/systemd/systemd/pull/33825/files#r1727288871.

This reverts commit 42e9288180.
2024-09-04 18:49:05 +02:00
Daan De Meyer 144e53b333
Merge pull request #34251 from DaanDeMeyer/multiq
network: Add support for multiq qdisc
2024-09-04 16:03:32 +02:00
Daan De Meyer 2b9ced9072 network: Add support for mq qdisc 2024-09-04 14:56:40 +02:00
Daan De Meyer 3f14557ce0 network: Add support for multiq qdisc 2024-09-04 14:56:37 +02:00
Mike Yuan 5d6d2d6ced
Merge pull request #34205 from yuwata/pretty-print-buffering
pretty-print: introduce WITH_BUFFERED_STDERR macro to enable buffering
2024-09-04 14:34:21 +02:00
Daan De Meyer 5064de1383
Merge pull request #34224 from yuwata/network-make-qdisc-reconfigurable
network: make qdisc reconfigurable
2024-09-04 12:07:16 +02:00
Daan De Meyer c37a68b271
Merge pull request #32487 from YHNdnzj/bind-journal-sockets
core: introduce BindJournalSockets=
2024-09-04 09:26:58 +02:00
dependabot[bot] 6df2b5033e build(deps): bump softprops/action-gh-release from 2.0.5 to 2.0.8
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.5 to 2.0.8.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](69320dbe05...c062e08bd5)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 01:25:17 +02:00
dependabot[bot] a3e3b58c8e build(deps): bump super-linter/super-linter from 6.6.0 to 7.1.0
Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 6.6.0 to 7.1.0.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](88ea3923a7...b92721f792)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 01:24:40 +02:00
Mike Yuan 1a64b42c46
TEST-50-DISSECT: add explicit coverage for BindJournalSockets= 2024-09-03 21:04:52 +02:00
Mike Yuan e2e6c23fdb
test: drop unneeded journal socket bind mounts
(where BindJournalSockets=yes is implied)
2024-09-03 21:04:52 +02:00
Mike Yuan 263fa92bab
portable/profile: use BindJournalSockets= 2024-09-03 21:04:52 +02:00
Mike Yuan 119820f8ab
core/namespace: create /dev/log only if journal socket is present 2024-09-03 21:04:51 +02:00
Mike Yuan 368a3071e9
core: introduce BindJournalSockets=
Closes #32478
2024-09-03 21:04:50 +02:00
dependabot[bot] 0333969a40 build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 8c2f828701a1bdb3dc9b80d6f2ab979f0430a6b8 to 31b4e756c1484c302435653da5d3b9bdfae38518.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](8c2f828701...31b4e756c1)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 19:55:43 +02:00
Daan De Meyer a026c3fb41
Merge pull request #34240 from DaanDeMeyer/mkosi
mkosi: Rework debian/ubuntu prepare script to install dependencies
2024-09-03 17:52:43 +02:00
Daan De Meyer 89c579788d mkosi: Use apt patterns to install dependencies on Debian/Ubuntu
Instead of parsing the human readable output of apt-cache, let's
use apt patterns to figure out the dependencies.

We also filter out virtual packages as apt will fail and say we need
to install an implementation of the virtual package even if a package
that provides the virtual package is already installed.
2024-09-03 16:03:27 +02:00
Daan De Meyer 70ecdbfa23 mkosi: Make systemd package filtering more robust
Let's not just filter everything with systemd in the name, but instead
use the same list of volatile packages that we install to do the
filtering.
2024-09-03 14:42:09 +02:00
Daan De Meyer 49e54aaa18
Merge pull request #34236 from DaanDeMeyer/manager-split
json-util: Add more builders
2024-09-03 13:47:53 +02:00
Daan De Meyer eabff5267e json-util: Add JSON_BUILD_PAIR_UNSIGNED_NOT_EQUAL() 2024-09-03 12:08:42 +02:00
Daan De Meyer 0ea8d4bc8c json-util: Add JSON_BUILD_TRISTATE() and friends 2024-09-03 12:08:42 +02:00
Daan De Meyer 6647bbeab1 json-util: Add JSON_BUILD_PAIR_BASE64_NON_EMPTY() and friends 2024-09-03 12:08:42 +02:00
Daan De Meyer a85e9670f6 json-util: Add JSON_BUILD_PAIR_BYTE_ARRAY_NON_EMPTY() 2024-09-03 12:08:42 +02:00
Daan De Meyer 7606139e61 json-util: Add JSON_BUILD_PAIR_INTEGER_NON_NEGATIVE() 2024-09-03 12:08:42 +02:00
Daan De Meyer ab8a5e1f99 json-util: Add JSON_BUILD_PAIR_INTEGER_NON_ZERO() 2024-09-03 12:08:42 +02:00
Daan De Meyer 9ba489c7f6 json-util: Add JSON_BUILD_PAIR_CALLBACK_NON_NULL()
Like JSON_BUILD_PAIR_CALLBACK(), but doesn't add anything to the variant
if the callback doesn't put anything in the return argument.
2024-09-03 12:08:41 +02:00
Daan De Meyer 5b5579066d json-util: Add JSON_BUILD_PAIR_DUAL_TIMESTAMP_NON_NULL() 2024-09-03 12:08:23 +02:00
Daan De Meyer 95e2f04144 json-util: Add JSON_BUILD_PAIR_DUAL_TIMESTAMP() 2024-09-03 12:06:42 +02:00
Daan De Meyer 0e88e150c5 json-util: Add JSON_BUILD_RATELIMIT() 2024-09-03 12:06:40 +02:00
Daan De Meyer ed207e5261 json-util: Add JSON_BUILD_STRING_ORDERED_SET() 2024-09-03 12:03:02 +02:00
Daan De Meyer 02e875e1c2
Merge pull request #34190 from DaanDeMeyer/repart-compress
repart: Add compression support
2024-09-03 10:48:39 +02:00
Lennart Poettering fc676d4ab1
Merge pull request #34228 from poettering/uki-with-many-prep1
Two preparatory EFI library additions
2024-09-03 09:50:37 +02:00
Daan De Meyer 27cacec939 repart: Add compression support
Now that mkfs.btrfs is adding support for compressing the generated
filesystem (https://github.com/kdave/btrfs-progs/pull/882), let's
add general support for specifying the compression algorithm and
compression level to use.

We opt to not parse the specified compression algorithm and instead
pass it on as is to the mkfs tool. This has a few benefits:

- We support every compression algorithm supported by every tool
  automatically.
- Users don't need to modify systemd-repart if a mkfs tool learns a
  new compression algorithm in the future
- We don't need to maintain a bunch of tables for filesystem to map
  from our generic compression algorithm enum to the filesystem specific
  names.

We don't add support for btrfs just yet until the corresponding PR
in btrfs-progs is merged.
2024-09-03 08:49:49 +02:00
Daan De Meyer 6b5d3d2556 TEST-58-REPART: Only skip part of testcase_minimize() that requires root 2024-09-03 08:48:34 +02:00
Daan De Meyer d55d756c42 TEST-58-REPART: Always run TEST-58-REPART in virtual machine
Required for various tests in TEST-58-REPART.
2024-09-03 08:48:34 +02:00
Daan De Meyer 67b240f6b0 mkosi: Don't create sanitizer wrappers for every mkfs binary
mksquashfs for some reason ends up in nss_systemd and mkfs.btrfs
links against libudev. The others don't need a sanitizer wrapper
script.
2024-09-03 08:48:34 +02:00
Daan De Meyer 47acac6049
Merge pull request #34149 from DaanDeMeyer/btrfs
repart: Switch to new mkfs.btrfs subvolume API
2024-09-03 08:47:50 +02:00
Yu Watanabe cdf006973d resolve: fix typo
Follow-up for 67d0ce8843.
2024-09-03 14:00:18 +09:00
Lennart Poettering 7fd18c93d8 resolved: include Varlink error on inconsistent DNS-SD services in introspection data
Let's also rename the error slightly, since what happens here is that a
a valid service RR name is CNAME'd onto an invalid one. That's an
inconsistency on the server side, which we really should report as such.

Follow-up for: b48ab08732
2024-09-03 10:42:14 +09:00
Yu Watanabe 4edbea7de2 pretty-print: introduce WITH_BUFFERED_STDERR macro to enable buffering
Then, the buffer will be flushed and buffering will be disabled on
exiting from the scope.
2024-09-03 09:34:50 +09:00
Yu Watanabe b9e4b2c569 pretty-print: rename {draw,clear}_progress_bar_unbuffered() -> {draw,clear}_progress_bar_impl()
Addresses https://github.com/systemd/systemd/pull/34205#discussion_r1739648525.
Follow-ups for 5f9dd9c64d.
2024-09-03 09:06:18 +09:00
Yu Watanabe a833dc9b35
Merge pull request #34140 from yuwata/conf-parser-log-message
conf-parser: introduce log_syntax_parse_error() and use it
2024-09-03 08:20:07 +09:00
Adrian Vovk 9b0647358f
Merge pull request #34202 from AdrianVovk/sysupdated-fixups
sysupdated: Bugfixes & improvements
2024-09-02 16:35:02 -04:00
Frantisek Sumsal bd7a06dc31 test: don't install Python scripts from systemd-test RPM
The original regex didn't cover the `run-unit-tests.py` script that
made the old framework pull in Python into the test image, which in turn
allowed the new TEST-69-SHUTDOWN Python script to get executed in the
old framework's image, causing unexpected fails with latest Python on
Rawhide.
2024-09-02 19:26:57 +01:00
Adrian Vovk bb36e70e92
sysupdated: Improve logging about jobs
If someone runs `updatectl update`, sysupdate will be running multiple
update jobs at the same time, which can make reasoning about the output
in the journal quite difficult. Especially if things go wrong: the error
messages didn't mention which job failed. Nor was there any link between
job ID and the PID of the worker process logging to the journal. This
is all fixed here!
2024-09-02 11:02:32 -04:00
Adrian Vovk a841ad2945
sysupdated: Cleanup handling of notifications
Cuts out some `strdup`s, and also avoids a rather weird case of donating
memory to a function. Basically just duplicates the solution I just
implemented for sysupdate's callout handler.
2024-09-02 11:02:31 -04:00
Adrian Vovk 2e03c0befb
sysupdate: Don't ignore callout binary failure
Previously, if the callout binary (i.e. sd-pull, sd-import) failed
gracefully, we'd return its exit status from the event loop and thus
from run_callout(). Of course, exit status is a positive number in the
event of failure. Which means that we completely ignore the callout
binary failing, and instead continue using whatever it managed to
download before failing.

This is bad for obvious reasons, not the least of which is installing
a half-downloaded OS. This also means that we would completely ignore
failed signature checks 😬
2024-09-02 11:02:29 -04:00
Luca Boccassi 1e2d1a7202 portable: ensure PORTABLE_FORCE_ATTACH works even when there is a leftover unit
Force means force, we skip checks with PID1 for existing units, but
then bail out with EEXIST if the files are actually there. Overwrite
everything instead.
2024-09-02 15:33:29 +01:00
Lennart Poettering 82d40110ae efi: add file_handle_read() helper that reads from a file handle 2024-09-02 14:20:49 +02:00
Lennart Poettering 4c4f6b9d40 efi: return pointer to processed string in strtolower8()/strtolower16() 2024-09-02 14:20:49 +02:00
Daan De Meyer 21d9eeb5e6 networkd: Replace existing objects instead of doing nothing if they exist
Currently, if for example a traffic control object already exist, networkd
will silently do nothing, even if the settings in the network file for the
traffic control object have changed. Let's instead replace the object if it
already exists so that new settings from the network file are applied as
expected.

Fixes #31226
2024-09-02 14:12:49 +09:00
Yu Watanabe 304e2419c7 network/tclass: do not save tclass to Link before it is configured
Otherwise, if the same kind of tclass is already assigned, parameters
configured in .network file will not be used. So, let's first copy the
tclass and put it on Request, then on success generate a new copy based
on the netlink notification and store it to Link.

This is the same as 0a0c2672db,
65f5f58156, and friends, but for tclass.
2024-09-02 14:12:49 +09:00
Yu Watanabe 0a35458f5e network/qdisc: do not save qdisc to Link before it is configured
Otherwise, if the same kind of qdisc is already assigned, parameters
configured in .network file will not be used. So, let's first copy the
qdisc and put it on Request, then on success generate a new copy based
on the netlink notification and store it to Link.

This is the same as 0a0c2672db,
65f5f58156, and friends, but for qdisc.

Preparation for fixing #31226.
2024-09-02 14:12:49 +09:00
Yu Watanabe 3d7f26d9f2 network/tclass: make tclass_drop() static
This also drops unused constant return value.
2024-09-02 14:12:49 +09:00
Yu Watanabe 4a31c768a9 network/qdisc: make qdisc_drop() static
This also drops unused constant return value.
2024-09-02 14:12:49 +09:00
Yu Watanabe e3f91033ae network/tclass: skip requesting tclass if it is already requested 2024-09-02 14:12:49 +09:00
Yu Watanabe 998973e313 network/qdisc: skip requesting qdisc if it is already requested 2024-09-02 14:12:49 +09:00
Yu Watanabe 4bdc3d85ae network/neighbor: skip requesting neighbor if it is already requested 2024-09-02 14:12:37 +09:00
Yu Watanabe 541d0ed20a network/tclass: introduce tclass_ref() and tclass_unref()
No functional change, just refactoring and preparation for later change.
2024-09-02 14:12:35 +09:00
Yu Watanabe 9b294afa2d network/qdisc: introduce qdisc_ref() and qdisc_unref()
No functional change, just refactoring and preparation for later change.
2024-09-02 14:12:35 +09:00
Yu Watanabe 6f12cb91bc conf-parser: use log_syntax_parse_error() and friends more
This also makes all conf parsers defined in conf-parser.c return 1
on success, 0 on non-critical error.
Also, use free_and_strdup_warn() where applicable.
2024-09-02 06:17:05 +09:00
Yu Watanabe 3c8dc3a3e0 conf-parser: several cleanups for DEFINE_CONFIG_PARSE_ENUMV() macro
- use GREEDY_REALLOC() and FOREACH_ARRAY(),
- do not set an array with only terminating 'invalid' value.

Note, this macro is only used by parsing NamePolicy= and AlternativeNamesPolicy=
in .link files. and udevd correctly handles both an empty array and an
array with only 'invalid'. Hence, this does not change any behavior.
2024-09-02 06:11:50 +09:00
Yu Watanabe 42efe5be1d tree-wide: drop msg argument for DEFINE_CONFIG_PARSE() macro and friends
This makes the macros use log_syntax_parse_error(), hopefully which provides
more informative log message in general, and reduces binary size.
2024-09-02 05:45:09 +09:00
Yu Watanabe 382886fe11 log: protect errno from log_syntax_invalid_utf8_internal()
Potentially, utf8_escape_invalid() called by
log_syntax_invalid_utf8_internal() may update errno.
2024-09-02 05:45:09 +09:00
Yu Watanabe 1e04eb00f7 log: introduce log_syntax_parse_error()
This provides generic error message for failures in conf parsers.
Currently this is not used, but will be used later.
2024-09-02 05:45:04 +09:00
Yu Watanabe b043f651c8 test: modernize test-networkd-conf 2024-09-02 05:41:55 +09:00
Yu Watanabe 7094e6d9e4 test: modernize test-conf-parser.c 2024-09-02 05:41:55 +09:00
Yu Watanabe c33aacdcb4 conf-parser: make config_parse_strv() stricter and optionally drop duplicated entries 2024-09-02 05:41:55 +09:00
Yu Watanabe 8b4ef777fd conf-parser: fix memleak in config_parse_calendar()
Fixes a bug introduced by 0e10c3d872 (#25049).
2024-09-02 05:41:55 +09:00
Yu Watanabe 9afb4aea00 network/route: fix typo
Follow-up for c8dbf9acc1.
2024-09-01 22:03:12 +09:00
Luca Boccassi a12db1e7c4
Merge pull request #34213 from yuwata/network-route-fix-weight
network/route: fix adjustment of nexthop weight
2024-09-01 11:54:05 +01:00
Yu Watanabe c8dbf9acc1 network/route: fix adjustment of nexthop weight
Fixes #34167.
2024-09-01 11:54:32 +09:00
Yu Watanabe db8dc7c1dd network/route: also update source, status, and so on EEXIST
Otherwise, an existing route may be labeled as foreign even after we
reconfigure it.
2024-09-01 11:54:32 +09:00
Yu Watanabe 0074a7d8c0 network/route: also show weight of gateway in debugging logs 2024-09-01 11:54:32 +09:00
Mike Yuan 9517c81747 basic/raw-clone: refuse CLONE_PIDFD too 2024-09-01 10:44:39 +09:00
Zbigniew Jędrzejewski-Szmek 229607bca8 docs/UIDS-GIDS: drop obsolete comment about Fedora
https://fedoraproject.org/wiki/Changes/RenameNobodyUser, 2018:
> Use "nobody:nobody" as the names for the kernel overflow UID:GID pair, and
> retire the old "nfsnobody" name and the old "nobody:nobody" pair with 99:99
> numbers.
2024-08-31 13:36:09 +02:00
Yu Watanabe 7876f3d63a test-network: use the same MTU bytes for veth interfaces
Hopefully fixes #34204.
2024-08-31 11:24:56 +01:00
Yu Watanabe 94c80f3ef5 labeler: set network label when tests for networkd or friends are updated 2024-08-31 11:54:13 +02:00
Yu Watanabe 6434d0bbf7
Merge pull request #34198 from AdrianVovk/updatectl-bugfixes
updatectl: Bugfixes
2024-08-31 15:20:15 +09:00
Christoph Anton Mitterer 3e98472223 man: fix typos
Closes #34199.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2024-08-31 13:59:02 +09:00
Adrian Vovk 5f9dd9c64d
progress-bar: Add unbuffered variant
The progress_bar functions do their own buffering: they reconfigure
stderr, then print, then flush and disable buffering on their own. In
situations where multiple progress bars are being drawn at a time (for
example, in updatectl), it's even more efficient to hoist the buffering
and flushing to the call site, and avoid drawing each progress bar
individually.

To that end, new _unbuffered variants of the progress_bar functions. And
we use them in updatectl.
2024-08-30 22:50:24 -04:00
Adrian Vovk ca7490c5ad
updatectl: Improve behavior of progress logging
This applies a couple of aesthetic changes to the way updatectl renders
progress information

1. We invert from "ICON TARGET MESSAGE" to "TARGET: ICON MESSAGE" to
   better fit in with the systemd progress bars, which look like
   "TARGET [==========---------] XX%". The original version of the
   sysupdated PR implemented its own progress bars that were oriented
   differently: "[==========---------] TARGET XX%". When we swapped
   the progress bar we didn't swap the status messages

2. When a target finishes updating, instead of leaving a 100% progress
   bar on screen for potentially extended periods of time (which implies
   to the user that the update isn't actually done...), we show a status
   message saying the target is done updating.

3. Fixed a minor bug where an extra newline would be printed after the
   total progress bar. At the top of the rendering function, we scroll
   the terminal's scroll-back just enough to fit a line for each target,
   and one for the total. This means that we should not print an
   additional line after the total, or else it'll scroll the terminal's
   buffer by an additional character. This bug was introduced at some
   point during review

4. Clears the Total progress bar before quitting. By the time we're
   quitting, that progress bar will be showing no useful status for the
   user. Also, the fix in point 3 will cause the shell's prompt to
   appear on the same line as the Total progress bar, partially
   overwriting it and leaving the shell in a glitchy state.
2024-08-30 22:50:23 -04:00
Yu Watanabe 3722db214b man: fix typo
Follow-up for 1ff0164be5.
2024-08-31 11:19:15 +09:00
Adrian Vovk 2aff6efe67
updatectl: Ensure we clear the progress bar
Otherwise we end up half-overwriting the progress bar, which looks buggy
2024-08-30 21:53:14 -04:00
Adrian Vovk aa2e664e18
sysupdated: Register known error types
This fixes a bug introduced during review of sysupdated. Originally,
we just returned EALREADY verbatim to signify that the target is
already up-to-date. Then we switched this to a proper error
(org.freedesktop.sysupdate1.NoCandidate) during review. But that now
maps to EIO, not EALREADY. Thus, whenever there's nothing to update,
updatectl would report I/O errors to the user, even though nothing
actually went wrong.
2024-08-30 21:43:44 -04:00
Adrian Vovk 6e1992166f
progress-bar: Put a space after the prefix
We always want a space there. So let's just put one in the drawing
routine, and adjust the call cites to avoid adding a second one.
2024-08-30 21:25:37 -04:00
Yu Watanabe 7571cb42a8
Merge pull request #34189 from poettering/cryptenroll-slot-fix
cryptenroll: don't return slot 0 when we have no policy to search for
2024-08-31 04:26:02 +09:00
Daan De Meyer d850a544bc repart: Keep existing directory timestamps intact when copying
Otherwise, when merging multiple directory trees, the output becomes
unreproducible as the directory timestamps will be changed to the current
time when copying identical directories from the second tree.

We introduce a new copy flag to achieve this behavior.
2024-08-30 15:20:40 +01:00
PavlNekrasov bd7b6c213b
Use correct error code in log message in pkcs11_token_find_x509_certificate (#34187) 2024-08-30 15:18:56 +01:00
Lennart Poettering 379e088f6f test: when refusing to run slow tests, mention how to run them
Let's be helpful and provide an actionable hint.
2024-08-30 14:17:36 +02:00
Lennart Poettering 43b93a8a26 crypenroll: make slot wiping on pin change a bit more explicit 2024-08-30 14:17:36 +02:00
Lennart Poettering 41bcb93087 cryptenroll: don't return slot 0 when we have no policy to search for
If the policy hash is empty we shouldn't return "0" from
search_policy_hash(), because that is understood as slot index 0, but
that's unlikely to match the policy.

Hence, return -ENOENT instead, indicating that we can't find a matching
slot.
2024-08-30 14:16:39 +02:00
Lennart Poettering 549c1a99d4 cryptenroll: iovec'ify a few more things 2024-08-30 14:15:33 +02:00
Luca Boccassi c08ffe5b12 mkosi: update debian commit reference
* bb6db3edfe Install new sd-sysupdated files in systemd-container
2024-08-30 11:54:13 +01:00
Daan De Meyer 562881c178 repart: Switch to new mkfs.btrfs subvolume API
In https://github.com/kdave/btrfs-progs/pull/877 the API is changing
to "--subvol <path>:ro,default" so let's adapt our usage to match.

This also adds support for read-only subvolumes.

Fixes #34134
2024-08-30 12:18:10 +02:00
Daan De Meyer 9023266a0e repart: Remove unused Context argument from make_subvolumes_set() 2024-08-30 12:15:36 +02:00
Daan De Meyer 9f482c5a05 repart: Fix memory leak 2024-08-30 12:13:13 +02:00
Daan De Meyer 32b2f4c01e image-policy: Fix size assertion
We're going to write a null pointer to l[m] so we need to make sure
m is smaller than the size of the array, not m + 1.
2024-08-30 12:13:05 +02:00
Daan De Meyer 11781f37ac image-policy: Fix strv size calculation
We want the logarithm of the next power of two, which is the same
as the mask + 1, so add one to the mask to make sure the size is
sufficient to fit all flags.
2024-08-30 12:12:53 +02:00
Lennart Poettering 9407fe6c3d treewide: use sd_json_variant_un{hex|base64}() pervasively
Use these helpers whenever appropriate. Drop separate string checks,
since these helpers already do them anyway.

No actual code change, just a rework to make use of a nice helper we
have already.
2024-08-30 10:35:44 +02:00
Lennart Poettering 38c0086361 update TODO 2024-08-30 10:21:31 +02:00
Yu Watanabe 16d70515e1 hwdb: add entry for Dell AlpsPS/2 ALPS DualPoint TouchPad
Closes #34133.
2024-08-30 09:37:52 +02:00
Daan De Meyer c5730846fe mkosi: Don't fetch remote if the commit to check out already exists
If the commit we're about to check out already exists in the local
repository, don't fetch from the remote repository.
2024-08-29 19:16:19 +01:00
Filip Lewiński 8c7b140164 hwdb.d/60-keyboard.hwdb: add Clevo mic mute quirk for V5x dGPU
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2024-08-29 16:32:14 +01:00
Göran Uddeborg 66ccda6cab po: Translated using Weblate (Swedish)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-08-29 15:16:19 +01:00
Yu Watanabe c5d5d76988 test: add test for GetUnitByPID() D-Bus method
For issue #34104.
2024-08-29 14:16:43 +01:00
Daan De Meyer 43960ff021 core: Fix log message typo 2024-08-29 15:14:09 +02:00
Daan De Meyer e921a8ad67 mkosi: update fedora commit reference
* a67221c3f0 Always build ukify package
* abb115a905 Do not use patch to modify systemd-user pam config file
* 196ec98228 Drop %upstream conditionalization for patches
2024-08-29 15:13:39 +02:00
Luca Boccassi 5162829ec8 core: do BindMount/MountImage operations in async control process
These operations might require slow I/O, and thus might block PID1's main
loop for an undeterminated amount of time. Instead of performing them
inline, fork a worker process and stash away the D-Bus message, and reply
once we get a SIGCHILD indicating they have completed. That way we don't
break compatibility and callers can continue to rely on the fact that when
they get the method reply the operation either succeeded or failed.

To keep backward compatibility, unlike reload control processes, these
are ran inside init.scope and not the target cgroup. Unlike ExecReload,
this is under our control and is not defined by the unit. This is necessary
because previously the operation also wasn't ran from the target cgroup,
so suddenly forking a copy-on-write copy of pid1 into the target cgroup
will make memory usage spike, and if there is a MemoryMax= or MemoryHigh=
set and the cgroup is already close to the limit, it will cause an OOM
kill, where previously it would have worked fine.
2024-08-29 12:48:55 +01:00
Daan De Meyer 5121f7c45b ukify: Skip test on architectures without UEFI 2024-08-29 13:58:29 +03:00
Luca Boccassi 1e17e48b96 test: mount ld.so.cache in minimal nspawn container if present
In some cases (SUSE Tumbleweed) this is needed as a library (libz) is
not in the default path, so it fails to run.
2024-08-29 07:27:16 +02:00
Yu Watanabe ee9a70ccc7
Merge pull request #34160 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-08-29 07:54:03 +09:00
Göran Uddeborg da89bf12c4 po: Translated using Weblate (Swedish)
Currently translated at 92.8% (235 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 92.4% (234 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 91.3% (231 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.9% (230 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.5% (229 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.1% (228 of 253 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-08-28 21:48:51 +02:00
Weblate Translation Memory f6d54c1823 po: Translated using Weblate (Swedish)
Currently translated at 92.8% (235 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 92.4% (234 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 91.3% (231 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.9% (230 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.5% (229 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 90.1% (228 of 253 strings)

po: Translated using Weblate (Swedish)

Currently translated at 89.7% (227 of 253 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-08-28 21:48:50 +02:00
Daan De Meyer ffd76bdd97 mkosi: Switch back to src.opensuse.org for opensuse spec
Supposedly they're never going to rewrite their git history again
so let's give src.opensuse.org another try given that code.opensuse.org
is down again.
2024-08-28 20:36:46 +01:00
Daan De Meyer 7560a5393a test: Set show_status=error
The TEST-64-UDEV-STORAGE tests fail before we even start the test.
Let's set show_status=error to get more information when those failures
happen.
2024-08-28 19:20:56 +02:00
Lennart Poettering 313c178b1b user-record: add helper that checks if a user record is root or the nobody user 2024-08-28 18:56:45 +02:00
Luca Boccassi 4b54da2e37
Merge pull request #34142 from DaanDeMeyer/update-distributions
mkosi: Update distribution packaging commits
2024-08-28 17:17:12 +01:00
Lennart Poettering 12e506f437 nspawn: propagate SSH authorized keys when binding user into contaier via --bind-user=
This means the host user typically can just log into his own account
bound into the container via SSH.
2024-08-28 17:13:48 +01:00
Luca Boccassi b3014aafb5 TODO: add note about live mounting via pinned namespace fd 2024-08-28 16:57:14 +01:00
Luca Boccassi ec54029017 mkosi: use util-linux's autologin
login is now from util-linux so credentials are supported.
It also needs to be pulled in as it's Protected: yes rather than
Essential: yes.

Keep the old setting for Ubuntu as that still uses login from shadow.
2024-08-28 16:32:17 +01:00
Daan De Meyer e885e9defa mkosi: update debian commit reference
* aa17b7ddf9 Fix stage1 build
* 2c13391e33 Update changelog for 256.5-1 release
* 7d13196926 autopkgtest: skip TEST-64-UDEV-STORAGE due to qemu crash
* 47769e8d7c Drop patch merged upstream
*   4e8e9315b5 Update upstream source from tag 'upstream/256.5'
|\
| * 71b885347d New upstream version 256.5
* 89a33e5408 d/e/checkout-upstream: undo quilt patches before switching debian branch
* 3c942ecb0d d/e/checkout-upstream: do not rebase on main when building stable branches
2024-08-28 16:15:42 +02:00
Daan De Meyer 92c22e02c1 mkosi: update fedora commit reference
* 28076e6232 Only make python3-pillow Recommends on Fedora
* a9807c4486 Do not require grubby on CentOS Stream 9
* d38cacfd3a Version 256.5
* 38291e13c1 Disable integration of userdb in sshd
* 53118d2112 Backport patch to only read /proc/cmdline when not in container
* 903e8e0f88 Backport upstream patch to try more initrd variants in 90-loaderentry.install
* b29a66006c Version 256.4
* 1cdae03391 Update tmpfiles --destroy-data patch
* 4fd4ef72a6 Upload sources
* 3c3772150d Version 256.3
2024-08-28 16:15:42 +02:00
Daan De Meyer 051fddfc41 mkosi: update opensuse commit reference
* 2866762da8 Update systemd to version 256.4 / rev 429 via SR 1192932
2024-08-28 16:15:42 +02:00
Daan De Meyer caf984def5 mkosi: update arch commit reference
* ea5f086275 handle uncommon license
* 43e43faab8 upgpkg: 256.5-1: new upstream release
* 7f4443062f Provide /etc/cryptsetup-keys.d/
* 262a14b8e5 upgpkg: 256.4-1: new upstream release
* 1aff4eb5f6 upgpkg: 256.3-1: new upstream release
2024-08-28 16:15:42 +02:00
Daan De Meyer 3e09a3eac2 mkosi: Include noarch in dnf repoquery architectures
ukify is noarch so we should include noarch to get all results.
2024-08-28 16:15:42 +02:00
Daan De Meyer 71acb00c28 mkosi: Always specify _sourcedir as an absolute path
A relative path is not supported by rpm so let's make sure we specify
it as an absolute path.
2024-08-28 16:15:42 +02:00
Daan De Meyer 00a2a67d81 mkosi: Don't apply distribution specific patches
rpm upstream is going to imply --noprep when running with --build-in-place so let's do the same on older
versions of rpm (e0925ad6e3)

Also, to keep things consistent between distros, run with --noprepare
on Arch Linux as well (we already skip patches on Debian/Ubuntu).

To keep things working on Arch, we apply the one downstream patch
manually ourselves.
2024-08-28 16:14:05 +02:00
Daan De Meyer dbff64ddf0 mkosi: Update to latest 2024-08-28 15:36:52 +02:00
Daan De Meyer 360b8dc9a6
Merge pull request #34143 from DaanDeMeyer/tests
test-dhcp-server: Migrate to new assertion macros
2024-08-28 15:17:55 +02:00
Daan De Meyer 73a1a6f445 test-dhcp-server: Migrate to new assertion macros 2024-08-28 13:30:52 +02:00
Yu Watanabe 9f563bcd74
Merge pull request #34123 from yuwata/sd-device
sd-device: expose sd_device_get_device_id() and sd_device_get_driver_subsystem()
2024-08-28 11:33:09 +09:00
Yu Watanabe 29d41efd44
Merge pull request #34139 from yuwata/sd-device-monitor
sd-device-monitor: introduce sd_device_monitor_get_events() and _get_timeout()
2024-08-28 11:32:51 +09:00
Yu Watanabe 5ab1250534 sd-device-monitor: introduce sd_device_monitor_get_events() and _get_timeout()
Follow-up for bab889c51e (#33032).

Currently, they unconditionally returns EPOLLIN and USEC_INFINITY, respectively.
Just for consistency with sd-bus, sd-journal, sd-varlink, and so on. All
they have _get_fd(), _get_events(), and _get_timeout().

Closes #34094.
2024-08-28 05:35:07 +09:00
Yu Watanabe d36d71cade test: use more suitable assertions 2024-08-28 05:35:07 +09:00
Yu Watanabe bbb7a0e6ed sd-varlink: make the argument type consistent with header 2024-08-28 05:35:07 +09:00
Yu Watanabe 3fe0fd20c9 udevadm/info: also show driver subsystem and device ID
This adds two more fields in 'udevadm info':
- J for device ID, e.g. b128:1, c10:1, n1, and so on.
- B for driver subsystem, e.g. pci, i2c, and so on.

These, especially the device ID field may be useful to find udev
database file under /run/udev/data for a device.
2024-08-28 05:26:26 +09:00
Yu Watanabe cd7c71154c sd-device: make sd_device_new_from_subsystem_sysname() stricter
As workarounded by fc0cbed2db, the pair of
subsystem and sysname is not unique. For examples,
- /sys/bus/gpio and /sys/class/gpio, both have gpiochip%N. However, these point to different devpaths.
- /sys/bus/mdio_bus and /sys/class/mdio_bus,
- /sys/bus/mei and /sys/class/mei,
- /sys/bus/typec and /sys/class/typec, and so on.

Let's refuse to provide sd_device object in such cases.
2024-08-28 05:26:08 +09:00
Yu Watanabe 1ff0164be5 sd-device: make device_get_device_id() public
We have already exposed sd_device_new_from_device_id(), but we have
never provide the way to get device ID from an existing sd_device
object.
2024-08-28 05:26:04 +09:00
Yu Watanabe 44bc6f3cab sd-device: introduce sd_device_get_driver_subsystem()
To create the sd_device object of a driver, the function
sd_device_new_from_subsystem_sysname() requires "drivers" for subsystem
and e.g. "pci:iwlwifi" for sysname. Similarly, sd_device_new_from_device_id()
also requires driver subsystem. However, we have never provided a
way to get the driver subsystem ("pci" for the previous example) from
an existing sd_device object.

Let's introduce a way to get driver subsystem.
2024-08-28 05:18:14 +09:00
Yu Watanabe 55e35a4d59 sd-device: refuse earlier when too long ifname is passed to sd_device_new_from_ifname()
Otherwise, alloca() called in strjoina() may trigger assertion.

This partially reverts 3652891c39.
The commit mistakenly dropped the check.
2024-08-28 05:18:14 +09:00
Yu Watanabe 1937f5105d sd-device: make sd_device_get_devtype() return 0 on success again
This partially reverts the commit 730b76bd2c.

Before the commit, the function returned 0 on success, but the commit
made the function always return 1, as if device->devtype is NULL, the
function returns -ENOENT in the above.

Fortunately, udev_device_get_devtype() does not propagate any
non-negative value from sd_device_get_devtype(). Hence, hopefully we can
safely revert the change.
2024-08-28 05:18:14 +09:00
Vitaly Kuznetsov 803a392471 stub: restore random seed update logic
Commit 201e0d53bd ("stub: split out random seed part out of run()")
looks like refactoring but apparently it changed the logic when random
seed is refreshed in the ESP completely. Previously, process_random_seed()
was called when either:
- sd-stub was not present (LoaderFeatures var is unset) OR
- sd-stub was present but EFI_LOADER_FEATURE_RANDOM_SEED flag was unset.
Post-change, refresh_random_seed() bails under the exact same conditions (no
sd-stub or EFI_LOADER_FEATURE_RANDOM_SEED is unset) and thus
process_random_seed() is NOT called.

Restore the original logic. efivar_get_uint64_le()'s return value doesn't
require checking: loader_features is initialized to 0 and in case of failure it
stays untouched.
2024-08-28 05:10:06 +09:00
Lennart Poettering 4e7a627797 vmspawn: fix duplicate logging on oom 2024-08-28 03:03:23 +09:00
Adrian Vovk 88261bcf3b
Merge pull request #33570 from AdrianVovk/sysupdate-incomplete
sysupdate: Handle incomplete versions
2024-08-27 13:04:02 -04:00
Lennart Poettering 9c0aee7cbb exec-invoke: remove redundant empty lines 2024-08-27 16:20:23 +02:00
Luca Boccassi 7d8bbfbe08 service: add 'debug' option to RestartMode=
One of the major pait points of managing fleets of headless nodes is
that when something fails at startup, unless debug level was already
enabled (which usually isn't, as it's a firehose), one needs to manually
enable it and pray the issue can be reproduced, which often is really
hard and time consuming, just to get extra info. Usually the extra log
messages are enough to triage an issue.

This new option makes it so that when a service fails and is restarted
due to Restart=, log level for that unit is set to debug, so that all
setup code in pid1 and sd-executor logs at debug level, and also a new
DEBUG_INVOCATION=1 env var is passed to the service itself, so that it
knows it should start with a higher log level. Once the unit succeeds
or reaches the rate limit the original level is restored.
2024-08-27 12:24:45 +01:00
Luca Boccassi 23e3bddc48
Merge pull request #34114 from yuwata/resolvconf-p
resolve: support 'resolvconf -p'
2024-08-27 11:18:34 +01:00
Daan De Meyer 1ee6a08623 tests: Add ASSERT_OK_EQ() 2024-08-27 12:15:24 +02:00
Daan De Meyer 3862a227fb tests: Remove some unnecessary quotes 2024-08-27 12:15:05 +02:00
Mike Yuan ecf89abf2f core-varlink: add missing runtime scope check for manager_varlink_managed_oom_connect()
Follow-up for 2250c996cf
2024-08-27 12:12:50 +09:00
Yu Watanabe 44eee910c0
Merge pull request #34124 from YHNdnzj/socket-accept-name
core: honor FileDescriptorName= too for Accept=yes sockets, plus several other cleanups
2024-08-27 12:11:20 +09:00
Yu Watanabe 57bdb24f9d NEWS: mention "resolvconf -p" 2024-08-27 05:42:34 +09:00
Yu Watanabe 80e038221b test: add more test cases for resolvconf 2024-08-27 05:37:34 +09:00
Yu Watanabe 374825ec05 resolvconf: disable default route when -p is specified
Internally, the switch triggers 'resolvectl default-route INTERFACE no'.

Closes #34112.
2024-08-27 05:30:06 +09:00
Yu Watanabe 189cb2b15f resolvconf: clear domains if nothing specified 2024-08-27 05:23:12 +09:00
Yu Watanabe b3102c05e1 resolvectl: make enum name consistent with the option name 2024-08-27 05:17:52 +09:00
Martin Srebotnjak 71bcd6c0d7 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-08-27 04:50:58 +09:00
Ronan Pigott 13e15dae9f resolved: clear the AD bit for bypass packets
When the bypass logic is invoked, such as for queries to the stub with
the DO bit set, be certain to clear the AD bit in the reply before
forwarding it if the answer is not known to be authentic.
2024-08-26 16:57:37 +01:00
Daan De Meyer 3fcf2a2a39 repart: Use streq_ptr() in one more place 2024-08-26 16:55:29 +01:00
Allison Karlitskaya 2bdf027de1 man: document "web" session type
This has been supported since e9e74f28d7 but never got documented.
Add it to the man pages (plus one comment in a header).

Closes #34127.
2024-08-26 16:54:59 +01:00
Daan De Meyer 1b275c2acd crash-handler: Add back notice log message
Fixes https://github.com/systemd/systemd/pull/33959#discussion_r1730987738
2024-08-26 16:36:39 +02:00
Lennart Poettering cb1e7ab533 update TODO 2024-08-26 16:29:07 +02:00
Lennart Poettering e7c8d78e7f
units: don't set LISTEN_FDNAMES for varlink services explicitly
Now that FileDescriptorName= is properly honored by Accept=yes sockets,
this explicit override is pointless.
2024-08-26 15:40:15 +02:00
Mike Yuan daa78907af
core: honor FileDescriptorName= too for Accept=yes sockets
So far we manually hardcoded $LISTEN_FDNAMES to "varlink" in various
varlink service units we ship, even though FileDescriptorName=varlink
is specified in associated socket units already, because
FileDescriptorName= is currently silently ignored when combined with
Accept=yes. Let's step away from this, which seems saner.

Note that this is technically a compat break, but a mostly negligible
one as there shall be few users setting FileDescriptorName= but
still expecting LISTEN_FDNAMES=connection in the actual executable.

Preparation for #34080
2024-08-26 15:40:15 +02:00
Daan De Meyer caf5eb586a mkosi: Stop using git commit timestamps for package releases
This prevents bisecting to figure out which commit broke something
as when going backwards the git commit timestamp will be older meaning
package managers will refuse to upgrade to the "older" version. Let's
make sure the release is always newer by using the current date unless
$SOURCE_DATE_EPOCH is set.
2024-08-26 14:22:29 +01:00
Mike Yuan 2234032c47
core: move check for combination of PAMName= + KillMode= to unit_verify_contexts()
While at it, allow "mixed" for all unit types too, i.e.
also apply ebc2259da1 to
socket/mount/swap units.
2024-08-26 14:52:25 +02:00
Mike Yuan bca5505839
core/socket: refuse MaxConnection=0 for Accept=no sockets too
This makes no sense at all, and we already refuse such setting
for Accept=yes sockets. I see no reason not to extend this to
Accept=no ones.
2024-08-26 14:52:25 +02:00
Mike Yuan f220d98945
core/socket: use UNIT_ISSET rather than _DEREF where suitable 2024-08-26 14:52:25 +02:00
Luca Boccassi 2e8e32e6d5
Merge pull request #34117 from yuwata/network-routing-policy-rule
network: introduce generic conf parser for [RoutingPolicyRule] section
2024-08-26 12:08:26 +01:00
Yu Watanabe 36f6e87dd3 man: reword about default route for DNS traffic
DefaultRoute is a D-Bus property, not a valid setting name in .network
files nor resolved.conf.
Whether a link is the default route or not is configured with
DNSDefaultRoute= setting in .network files.
2024-08-26 11:14:26 +01:00
Yu Watanabe b1fc342cdd
Merge pull request #34120 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-08-25 21:28:53 +09:00
Oğuz Ersen 8eaceb3814 po: Translated using Weblate (Turkish)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main
2024-08-25 13:38:32 +02:00
Sergey A 5bac779ca0 po: Translated using Weblate (Russian)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main
2024-08-25 13:38:32 +02:00
Léane GRASSER feef5a773f po: Translated using Weblate (French)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-08-25 13:38:32 +02:00
Weblate Translation Memory a68c2f5f76 po: Translated using Weblate (French)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-08-25 13:38:31 +02:00
Yu Watanabe 605377e7b3 network/routing-policy-rule: use config_parse_routing_policy_rule() more
Then, we can drop allocation of RoutingPolicyRule object in each conf
parsers.

No functional change, just refactoring.
2024-08-25 06:25:07 +09:00
Yu Watanabe 7f66a94ecf network/routing-policy-rule: introduce a generic conf-parser for [RoutingPolicyRule] sectin
This introduce config_parse_routing_policy_rule(), which wraps existing
conf parsers. With this, we can drop many custom conf parsers for
[RoutingPolicyRule], and can reuse generic conf parsers in conf-parser.[ch].
2024-08-25 06:19:51 +09:00
Yu Watanabe f7a1e57e1f conf-parser: move config_parse_ip_protocol() from network/netdev/fou-tunnel.c
The function is generic enough. Currently it is used at only one place.
But it will be used at another place.
2024-08-25 06:18:46 +09:00
Yu Watanabe 6db311fdc8 conf-parser: introduce config_parse_uint32_flag()
This is not used currently, but will be used later.
2024-08-25 06:18:37 +09:00
Yu Watanabe f4810fe237 conf-parser: return 1 on success
Typically, conf parsers will ignore most errors during parsing strings
and return 0. Let's return 1 on success. Otherwise it is hard to reused
these function in another conf parser.
2024-08-25 06:18:30 +09:00
Yu Watanabe 83c187f585 parse-util: drop unused parse_ip_prefix_length() 2024-08-25 06:18:30 +09:00
Yu Watanabe 74601abcdd network/routing-policy-rule: merge two conf parsers
Both conf parsers takes an integer. Only difference is the maximum
value. Let's merge them, and pass the maximum value through ltype.
2024-08-25 06:17:05 +09:00
Yu Watanabe 78ff6156d1 network/routing-policy-rule: trivial cleanups for conf-parsers
No functional change, just refactoring.
2024-08-25 06:16:29 +09:00
Yu Watanabe e0978eb8cf network/routing-policy-rule: rename n -> rule 2024-08-25 05:38:05 +09:00
Sam James dde6f1d745 meson: search for 'bpf-unknown-none' too
We currently search for 'bpf-gcc' and 'bpf-none-gcc'. Gentoo's
sys-devel/bpf-toolchain package uses 'bpf-unknown-none-gcc', as does Fedora's
cross-binutils. Search for this name too.
2024-08-25 02:31:59 +09:00
Yu Watanabe 07561ff414
Merge pull request #34115 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-08-25 02:14:37 +09:00
Temuri Doghonadze cf4dbc97ce po: Translated using Weblate (Georgian)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main
2024-08-24 12:36:53 +02:00
Yuri Chornoivan 3982d2f960 po: Translated using Weblate (Ukrainian)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/uk/
Translation: systemd/main
2024-08-24 12:36:53 +02:00
Piotr Drąg 542165f94d po: Translated using Weblate (Polish)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pl/
Translation: systemd/main
2024-08-24 12:36:52 +02:00
김인수 dffe2e4e80 po: Translated using Weblate (Korean)
Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main
2024-08-24 12:36:52 +02:00
Yu Watanabe 4e03518b16
Merge pull request #34111 from yuwata/log_section_full_errno
network: introduce log_section_full_errno() and friends, and use them
2024-08-24 08:31:02 +09:00
Yu Watanabe b0e6c3261c
Merge pull request #34110 from yuwata/network-routing-policy-cleanups
network/routing-policy-rule: assorted trivial cleanups
2024-08-24 08:30:48 +09:00
Yu Watanabe 4388efca4a network/routing-policy-rule: use log_section_warning_errno() 2024-08-24 00:05:49 +09:00
Yu Watanabe 75f59c6ea5 conf-parser: introduce log_section_full_errno() and friends 2024-08-24 00:05:49 +09:00
Yu Watanabe 5dc74c6667 test-network: check one more rule we configure 2024-08-23 23:57:17 +09:00
Yu Watanabe 361f70f707 network/routing-policy-rule: read FRA_PROTOCOL afer reading other properties
No functional change, just refactoring.
2024-08-23 23:57:17 +09:00
Yu Watanabe 21719d67c1 network/routing-policy-rule: add more assertions 2024-08-23 23:57:17 +09:00
Yu Watanabe 18c9e9acd5 network/routing-policy-rule: sort conf-parser prototypes 2024-08-23 23:57:13 +09:00
Yu Watanabe 407d91d872 labeler: support varlink tag 2024-08-23 16:46:16 +02:00
Lennart Poettering a3f17a8f88 varlinkctl: output an expressive error message in case invalid method/interface names are specified
Inspired by #34098 → let's make it easier for users to understand and
correct the mistakes they made: let's early refuse invalid
interface/method names.
2024-08-23 23:10:58 +09:00
Yu Watanabe 5537e4417c updatectl: fix typo and drop space in empty lines
Follow-ups for ec15bb71c2 (#32363).
2024-08-23 23:10:24 +09:00
Yu Watanabe a4db21c856
Merge pull request #34108 from mrc0mmand/update-translation-files
po: update translation files
2024-08-23 23:07:57 +09:00
Frantisek Sumsal fe82469a82 po: drop placeholders and re-add SPDX line
Follow-up for ecce45cd3f.
2024-08-23 15:37:23 +02:00
Frantisek Sumsal 8516c2eeba po: update translation files 2024-08-23 15:36:10 +02:00
Yu Watanabe d8e298c497
Merge pull request #34102 from yuwata/udev-net_id
udev/net_id: trivial cleanups
2024-08-23 18:06:06 +09:00
Yu Watanabe b9142e2ba7 udevadm/test,test-builtin: enable debugging logs by default again
The lines were mistakenly dropped by
aa976d8788.
2024-08-23 17:34:14 +09:00
Yu Watanabe 02b88d6c62 udev/net_id: update log messages
This also downgrades the log level of a message to debug.
2024-08-23 10:21:11 +09:00
Yu Watanabe 8c6f484595 udev/net_id: move naming scheme check
We usually do not set r = -1 when a functionality is disabled or not
supported. Even though the error code is not used, let's set a negative
errno in such case.

No functional change, just refactoring.

Follow-up for 0a4ecc54cb.
2024-08-23 10:20:56 +09:00
Yu Watanabe ab61b8865b test: use ASSERT_EQ_ID128() and ASSERT_NE_ID128() 2024-08-23 10:18:08 +09:00
Etienne Champetier 448f9f81fd udev-builtin-net_id: ignore firmware_node/sun == 0
Since ID_NET_NAME_SLOT was introduced we ignore slot == 0
0035597a30/src/udev/udev-builtin-net_id.c (L139)

Qemu sets _SUN to PCI_SLOT() for all NICs, so _SUN is not unique.
https://gitlab.com/qemu-project/qemu/-/issues/2530

In my tests with libvirt I can only set 'slot="0x00"' in interface definition,
so all NICs end up with _SUN == 0, and this commit is enough to avoid the issue.

Fixes 0a4ecc54cb
2024-08-23 09:30:49 +09:00
Yu Watanabe b6b9ddb2b5
Merge pull request #34087 from DaanDeMeyer/nspawn-init-revert
Revert "nspawn: Allow specifying custom init program"
2024-08-23 07:42:16 +09:00
Yu Watanabe 6b0561d86a
Merge pull request #34092 from poettering/ambient-caps-fixup
minor tweaks to the recent ambient caps rework
2024-08-23 06:41:45 +09:00
Yu Watanabe a3b571b2cc
Merge pull request #34096 from YHNdnzj/logind-followup-256
logind: two follow-ups
2024-08-23 05:38:18 +09:00
Lennart Poettering 167808c6fc boot: use MAX() where appropriate 2024-08-23 05:26:35 +09:00
Yu Watanabe ce4c4f4c32
Merge pull request #34097 from YHNdnzj/journal-browse-prepare
shared/logs-show: introduce journal_browse_prepare()
2024-08-23 05:25:19 +09:00
Daan De Meyer 615226abd8 Revert "nspawn: Allow specifying custom init program"
I don't actually need this anymore since we're going with a
unit based approach for the containers stuff internally so
let's just revert it.

Fixes #34085

This reverts commit ce2291730d.
2024-08-22 22:20:42 +02:00
Daan De Meyer 6a30e66df5 Revert "nspawn: fix settings leak for init parameter"
This reverts commit 1e2aa88bb2.
2024-08-22 22:20:36 +02:00
Adrian Vovk e7416c9d42
sysupdate: Add tests for incomplete versions
To make sure we don't regress on #33339
2024-08-22 16:00:47 -04:00
Adrian Vovk 631803cccd
sysupdate: Repair incomplete versions in-place
A previous commit made sysupdate recognize installed versions where some
transfers are missing. This commit teaches sysupdate how to correctly
repair these incomplete versions.

Previously, if you had a incomplete installation of the OS booted, and
ran sysupdate in an attempt to repair it, sysupdate would make things
worse by creating copies of the currently-booted partitions in the
inactive slots. Then at boot you have two identical partitions, with
identical labels an UUIDs, and end up with a mess.

With this commit, sysupdate is able to recognize situations where it can
simply download the missing transfers and leave the rest of the system
undistrubed.

Partial fix for https://github.com/systemd/systemd/issues/33339
2024-08-22 16:00:46 -04:00
Adrian Vovk 57ada07e7a
sysupdate: Track incompletely-installed versions
When enumerating what versions exist for a given target, sysupdate would
completely throw out any version that's incomplete (where some of the
transfers in the target have that version installed or available, and
other transfers do not).

If we're trying to find what versions we can offer for download, this is
great behavior. If the server side is advertising a partial update to
download, we shouldn't present it to the user.

On the other hand, if we're enumerating what versions we have currently
installed, this is a bad behavior. It makes sysupdate fragile. For
example, if a sysext introduces a new .conf file into
/usr/lib/sysupdate.d, suddenly the currently-installed OS stops being a
version that we've enumerated. Since it's not enumerated, it's not
protected, and so sysupdate will wipe the booted OS.

So if we're looking for installed versions, we now loosen the
restrictions and enumerate incomplete installations.

Partial fix for https://github.com/systemd/systemd/issues/33339
2024-08-22 16:00:45 -04:00
Adrian Vovk 0402bf682f
sysupdate: Check that --instances-max is in bounds
Otherwise user can pass in --instances-max=0 and crash sysupdate with an
assertion failure.
2024-08-22 16:00:44 -04:00
Adrian Vovk 7934803634
sysupdate: Fix resource_find_instance
The current implementation will never find a match, because in the event
of a match instance_cmp falls through to comparing paths and the key
we're matching against will always have a path of NULL.

So let's just use a separate compare function, just to make sure future
updates to instance_cmp don't break resource_find_instance again.
2024-08-22 16:00:43 -04:00
Mike Yuan fad3feec12
shared/logs-show: introduce journal_browse_prepare()
which combines sigbus_install() and bumping fd limit.
2024-08-22 20:33:22 +02:00
Mike Yuan d71f138156
basic/sigbus: use FOREACH_ELEMENT where appropriate, assert >= 0 for success 2024-08-22 20:14:25 +02:00
Mike Yuan 26f78eff69
logind-session: downgrade user@.service dep to Wants=
This partially reverts 52bcc872b5.

We explicitly support running without user manager,
hence only user-runtime-dir@.service should be
required.

Fixes #33405
2024-08-22 20:07:47 +02:00
Mike Yuan 1aeea8a60a
logind: DesignatedMaintenanceTime is added in v257 and constant
Follow-up for 0e10c3d872

Addresses https://github.com/systemd/systemd/pull/25049#discussion_r1647513862
2024-08-22 20:06:31 +02:00
Lennart Poettering 103018eceb main: make sure the ambient caps set is valid in case we fail to read it
We ignore failures when reading this after all. Hence we better leave
the memory properly initialized.
2024-08-22 18:36:59 +02:00
Lennart Poettering 88a26e1049 main: generate warning when we cannot reset caps
Follow-up for: #32937
2024-08-22 18:21:56 +02:00
Lennart Poettering b004393d70 core: rename original_ambient_set → saved_ambient_set
We call similar other fields in main.c (notably: rlimit stuff, env vars) "saved",
rather than "original". Hence stick to that kind of naming here too.

Follow-up for: #32937
2024-08-22 18:21:56 +02:00
Daan De Meyer f134a79ff8 mkosi: Update to latest
Should fix the Fedora Rawhide CI failure.
2024-08-22 18:17:07 +02:00
Lennart Poettering d1b04f47e3 man: document .membership files that nss-systemd processes
This has been a glaring omission the docs: when people create
.user/.group/.user-privileged/.group-privileged drop-in files, they
should also create matching .membership files.
2024-08-22 15:16:00 +02:00
Yu Watanabe 80c9c81779
Merge pull request #34051 from rpigott/resolved-demote-fallback
resolved: demote only the fallback servers in the global scope
2024-08-22 20:21:33 +09:00
Daan De Meyer 242bdb6e80
Merge pull request #34033 from DaanDeMeyer/mkosi-cage
mkosi: Update to latest
2024-08-22 12:57:07 +02:00
Daan De Meyer 2dc99fdadb mkosi: Update to latest 2024-08-22 11:39:02 +02:00
Lennart Poettering a7a62c18cb
Merge pull request #34076 from yuwata/polkit-message
polkit: add missing period in polkit messages
2024-08-22 10:56:53 +02:00
Daan De Meyer bc07b026f0 mkosi: Improve formatting 2024-08-22 09:50:15 +02:00
Yu Watanabe 04de947eea
Merge pull request #34079 from AdrianVovk/sysupdate-fixups
systemd-sysupdated follow-ups
2024-08-22 13:59:55 +09:00
Adrian Vovk d470a6c227
sysupdate: man: Cleanup sections about flags 2024-08-21 22:40:18 -04:00
Adrian Vovk 31fc2fb039
sysupdate: Simplify sysupdate_run_simple callsite
Allows the caller to optionally pass in a target, instead of making
everyone call target_get_argument at the call site.
2024-08-21 22:33:18 -04:00
Adrian Vovk b1bcaa0eb1
sysupdated: Verify inputs more rigorously
Also return better errors
2024-08-21 22:33:17 -04:00
Adrian Vovk e0081f18a0
sysupdated: Fixup redundant constant name
SD_ stands for systemd, so SD_SYSTEMD_* is SYSTEMD_SYSTEMD_*
2024-08-21 22:33:16 -04:00
Adrian Vovk 5256326261
sysupdated: Fixup minor formatting issues 2024-08-21 22:33:14 -04:00
Yu Watanabe 595bd7083d labeler: add more rules 2024-08-22 01:38:51 +02:00
Yu Watanabe 00ed8c6dfa
Merge pull request #34072 from yuwata/networkd-routing-policy-rule-follow-up
network/routing-policy-rule: follow up for recent change
2024-08-22 07:17:10 +09:00
Yu Watanabe 20a5465640 po: update Japanese translations 2024-08-22 07:10:47 +09:00
Yu Watanabe cd67b61ff1 polkit: add missing period in messages 2024-08-22 07:08:05 +09:00
Yu Watanabe e1c9c44e95 po: update Japanese translations 2024-08-22 05:03:24 +09:00
Adrian Vovk 38d7b8d3ff
Merge pull request #32363 from CodethinkLabs/sysupdate-dbus
sysupdate: Implement dbus service
2024-08-21 15:35:34 -04:00
Yu Watanabe 2ddf5bdece
Merge pull request #34053 from YHNdnzj/follow-ups
Two follow-ups for recent PRs
2024-08-22 04:34:11 +09:00
Alyssa Ross 0452779b00 bootctl: don't load etc/machine-info from cwd
arg_root defaults to null, so if --root isn't given, this would try reading
etc/machine-info from the current working directory, which is likely to fail.

Fixes: 77db9ef2ab ("boot: Make sure we take --root into account everywhere.")
2024-08-22 04:30:50 +09:00
A. Wilcox b9d326c568 man: Ensure notify example includes <string.h>
This ensures that memcpy and strerror are defined.  This is especially
important with GCC 14 as implicit function declarations are now an error.
2024-08-22 04:26:32 +09:00
Yu Watanabe 26823f980d hwdb: rename hwdb_bin_paths -> HWDB_BIN_PATHS
We usually use upper letters for constant definitions.
2024-08-22 04:26:07 +09:00
Ivan Shapovalov b73c86c695 core/exec-invoke: document calling setpriority() after sched_setattr()
Fixes: 711a157738 ("core/exec-invoke: call setpriority() after sched_setattr()")
2024-08-22 04:25:29 +09:00
Yu Watanabe cd2a1e2df9 test-network: also test routing policy rules are configured as expected after reconfiguration
For issue #34068.
2024-08-22 04:21:02 +09:00
Yu Watanabe 462be8c957 test-network: find routing policy rule by priority
We usually configure a test rule with a unique priority. Hence, finding
rule by priority reduces the lines of output, and we can debug easily.

Also print short comments on check. That's helpful when the check is
called several times.
2024-08-22 04:16:12 +09:00
Yu Watanabe 04d10fdb1d network/routing-policy-rule: use address family of existing rule when judging if existing rule can be updated
Otherwise, the other RoutingPolicyRule object may not have a valid
address family yet, and the existing rule may be wrongly handled as
that it is not requested by any interface, and it may be removed.

Follow-up for 727235006a.
Fixes #34068.
2024-08-22 04:11:52 +09:00
Ronan Pigott d229e282d6 resolved: demote the fallback dns servers
This softens the behavior originally introduced in eded61e410 to apply
only to the fallback dns servers.

The intent is that the global FallbackDNS (instead of DNS) can now be
used in conjunction with the per-link dns, providing a fallback behavior
without introducing a scope overlap.

References: eded61e410 (resolved: demote the global unicast scope, 2024-08-19)
2024-08-21 10:27:07 -07:00
Ronan Pigott 760fa203c2 resolved: use the fallback servers when no default dns is configured
This expands the role of fallback servers so they are applied not only
when there are no dns servers configured, but when all the configured
dns servers are configured only for non-default-route links.
2024-08-21 09:51:42 -07:00
Ronan Pigott 73e566bf16 resolved: introduce link_set_default_route 2024-08-21 09:51:42 -07:00
Ronan Pigott c00157ddc2 resolved: introduce dns_server_is_fallback 2024-08-21 09:51:42 -07:00
Yu Watanabe a3e4dc6762
Merge pull request #34055 from whot/wip/eviocrevoke-warnings
Update warnings for failed EVIOCREVOKE invocations
2024-08-22 01:34:35 +09:00
Yu Watanabe 2276483a7d
Merge pull request #34054 from yuwata/network-failed-state
network: several fixlets for reconfiguration after entered failed state
2024-08-22 01:22:29 +09:00
Yu Watanabe 1bf49198b5 networkctl: split networkctl.c into small pieces
No functional change, just refactoring.
2024-08-22 01:12:39 +09:00
Daan De Meyer 148b16cb2a
Merge pull request #33498 from DaanDeMeyer/btrfs
repart: Allow Subvolumes= when running offline
2024-08-21 17:19:09 +02:00
Ronan Pigott bebec88653 Revert "resolved: demote the global unicast scope"
This commit may have been a breaking change for sd-resolved foreign
resolv.conf mode, where a legacy network management daemon directly
modifies resolv.conf and sd-resolved consumes that.

This reverts commit eded61e410.
2024-08-21 06:59:22 -07:00
Mike Yuan e06c5be29a
process-util: always retry with pidfd_spawn() w/o cgroup first
Follow-up for 7ac58157ca

With the mentioned commit, iff E2BIG we'd retry pidfd_spawn()
with POSIX_SPAWN_SETCGROUP disabled. However, the same strategy
should actually apply to EOPNOTSUPP/ENOSYS/EPERM too -
they can mean two things here: no clone3() or no CLONE_PIDFD.
Therefore, let's first try clone() + CLONE_PIDFD, and fall further back
to plain clone() (posix_spawn()) only as last resort. Plus, record
the fact so that we don't unnecessarily retry every single time
if CLONE_PIDFD is the one that's unavailable.
2024-08-21 15:27:57 +02:00
Mike Yuan df99a8ef3d
process-util: check the flag instead of 'cgroup' param
We might skip CLONE_INTO_CGROUP wholly if not supported.
2024-08-21 15:17:05 +02:00
Mike Yuan 988ca0953e
man: use standard-options for --no-ask-password everywhere 2024-08-21 15:17:02 +02:00
Daan De Meyer 1ce69e0661 Revert "cgroup-util: Don't try to open pidfd for kernel threads"
The kernel patch was reverted so let's try again to open pidfds
for kernel threads.

This reverts commit ead48ec35c.
2024-08-21 14:32:54 +02:00
Luca Boccassi bdf75118ba
Merge pull request #34049 from yuwata/network-routing-policy-rule
network: further rework for routing policy rule
2024-08-21 12:46:37 +02:00
Daan De Meyer eca3d07dd1 repart: Allow Subvolumes= and DefaultSubvolume= when running offline
mkfs.btrfs has recently learned new options --subvol and --default-subvol
so let's stop failing when Subvolumes= and DefaultSubvolume= are used offline
and use the new --subvol and --default-subvol options instead to create subvolumes
in the generated root filesystem without root privileges or loop devices.
2024-08-21 11:29:47 +02:00
Daan De Meyer f75641b772 repart: Don't add same dir to MakeDirectories= or Subvolumes= twice 2024-08-21 11:29:47 +02:00
Daan De Meyer 531c6506c2 repart: Constify partition_needs_populate() 2024-08-21 11:29:47 +02:00
Daan De Meyer 9fb5d912f5 repart: Use loop_device_error_is_fatal() in one more place 2024-08-21 11:29:47 +02:00
Tom Coldrick b8b38e3da6
sysupdate: Add integration test for updatectl updates 2024-08-21 09:31:41 +01:00
Adrian Vovk ec15bb71c2
sysupdate: Implement updatectl
This is the command-line tool to manage systemd-sysudpated

Co-authored-by: Tom Coldrick <thomas.coldrick@codethink.co.uk>
Co-authored-by: Abderrahim Kitouni <abderrahim.kitouni@codethink.co.uk>
2024-08-21 09:31:41 +01:00
Adrian Vovk bf2c741fd7
sysupdate: Implement systemd-sysupdated dbus service
Co-authored-by: Tom Coldrick <thomas.coldrick@codethink.co.uk>
Co-authored-by: Abderrahim Kitouni <abderrahim.kitouni@codethink.co.uk>
2024-08-21 09:31:41 +01:00
Peter Hutterer 4fc6bd9e7d logind: warn about EVIOCREVOKE errors other than EINVAL too
EINVAL means the kernel doesn't support it, ENODEV means it's
already revoked or the device is no longer there which has the same
effect anyway. All others - let's print an error to the logs.
2024-08-21 16:33:22 +10:00
Yu Watanabe 7321a87b53 network/ipv4acd: adjust comment and logging 2024-08-21 11:45:57 +09:00
Yu Watanabe 22c864d885 sd-dhcp-client: actually restart daemon after sending DECLINE message
client_stop() sets DHCP_STATE_STOPPED to client->state, thus the server
never restarted.
2024-08-21 11:45:57 +09:00
Yu Watanabe 2bb7559ade sd-dhcp-client: stop client without calling notification after sending RELEASE
Otherwise, even the acquired lease is released, the client may be in
e.g. BOUND state or so, and may send renew or rebind after timeout
later.
2024-08-21 11:43:59 +09:00
Yu Watanabe f8cdd37d0a sd-dhcp-client: refuse to send RELEASE or friends gracefully when the daemon is stopped or so
We can easily hit the assertions without checking the internal states of
the DHCP client before calling these functions. That's annoying.
Let's do more gracefully.
2024-08-21 11:34:50 +09:00
Yu Watanabe e5b19cbed2 sd-dhcp-client: do not call callback with SD_DHCP_CLIENT_EVENT_STOP if already stopped
When an interface enters the failed state, even if the DHCP client is
stopped, the acquired DHCP lease is not unreferenced, as the callback
dhcp4_handler() do nothing in that case. When the failed interface is
being reconfigured after that, the DHCP client is stopped again
(though it is already stopped), and SD_DHCP_CLIENT_EVENT_STOP event is
triggered and sd_dhcp_client_send_release() is called, and the
assertion in the function is triggered.

E.g.
===
systemd-networkd[98588]: wlp59s0: DHCPv4 address 192.168.86.250/24, gateway 192.168.86.1 acquired from 192.168.86.1
systemd-networkd[98588]: wlp59s0: Could not set DHCPv4 route: Nexthop has invalid gateway. Network is unreachable
systemd-networkd[98588]: wlp59s0: Failed
systemd-networkd[98588]: wlp59s0: State changed: configuring -> failed
systemd-networkd[98588]: wlp59s0: The interface entered the failed state frequently, refusing to reconfigure it automatically.
systemd-networkd[98588]: wlp59s0: DHCPv4 client: STOPPED
systemd-networkd[98588]: wlp59s0: DHCPv4 client: State changed: bound -> stopped
systemd-networkd[98588]: Got message type=method_call sender=:1.449 destination=org.freedesktop.network1 path=/org/freedesktop/network1 interface=org.freedesktop.network1.Manager member=ReconfigureLink ...
systemd-networkd[98588]: wlp59s0: State changed: failed -> initialized
systemd-networkd[98588]: wlp59s0: found matching network '/etc/systemd/network/50-wifi.network'.
systemd-networkd[98588]: wlp59s0: Configuring with /etc/systemd/network/50-wifi.network.
systemd-networkd[98588]: wlp59s0: DHCPv4 client: STOPPED
systemd-networkd[98588]: Assertion 'sd_dhcp_client_is_running(client)' failed at src/libsystemd-network/sd-dhcp-client.c:2197, function sd_dhcp_client_send_release(). Aborting.
===
2024-08-21 11:34:45 +09:00
Yu Watanabe 021d39d3d1 network: log and enter failed state in link_reconfigure()
No functional change, just refactoring.
2024-08-21 07:29:30 +09:00
Yu Watanabe 685fd0d729 network: enter initialized state when the interface will be reconfigured
When the interface is in the failed state, link_getlink_handler_internal()
will do nothing and return zero, thus the interface will not be
reconfigured, especially when the reconfiguration is triggered in
link_enter_failed().

Follow-up for c2eb7753dd.
2024-08-21 07:29:19 +09:00
Yu Watanabe ebf66d0c05 network: introduce reconfigure_data_free() and _freep()
No functional change, just refactoring.
2024-08-21 07:24:43 +09:00
Yu Watanabe 2656f44c3c
Merge pull request #34018 from yuwata/network-address-label
network: allow to configure IPv6 address label in networkd.conf
2024-08-21 02:05:22 +09:00
Kornilios Kourtis 7ac58157ca process-util: handle pidfd_spawn() returning E2BIG
In some kernels (specifically, 5.4) even though the clone3 syscall is
supported, setting CLONE_INTO_CGROUP is not. The error message returned
in this case is E2BIG.

If posix_spawn_wrapper encounters this error, it does not retry, and
cannot spawn any programs in said kernels.

This commit adds a check for the E2BIG error and retries pidfd_spawn()
without the POSIX_SPAWN_SETCGROUP flag.

If we encounter an E2BIG error, and the pidfd_spawn() succeeds after
removing the POSIX_SPAWN_SETCGROUP flag, then we cache the result so
that we do not retry every time.

Originally, this issue was reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077204.

Signed-off-by: Kornilios Kourtis <kornilios@gmail.com>
2024-08-21 02:04:57 +09:00
Daan De Meyer c8e7cfeddc tests: Don't override QemuKvm= value if TEST_NO_KVM=0
Let's disable KVM if TEST_NO_KVM=1 is set but let's not specify anything
if it's not set so the QemuKvm= setting from mkosi.conf is used.
2024-08-21 01:52:09 +09:00
Yu Watanabe 085818569b test-network: add test for ManageForeignRoutingPolicyRules= 2024-08-20 21:02:31 +09:00
Yu Watanabe 49454d9ced test-network: add tests for Type=table, goto, and nop 2024-08-20 21:02:31 +09:00
Yu Watanabe 936dec4337 test-network: do not pass '[detached]' to 'ip rule del'
That indicates the interface name in 'iif' or 'oif' cannot be resolved
when 'ip rule' command is invoked. That's natural when networkd fail to
remove rule but the corresponding interface is already removed.
To make not the residual rules interfere subsequent test cases, let's
ignore the flag and actually remove unwanted rules.
2024-08-20 21:02:31 +09:00
Yu Watanabe ac1d8aa5bc network/routing-policy-rule: support all known type of rule
This also adds GoTo= to specify the target priority of goto rule.

Note, table was the default but could not be specified in Type=.
2024-08-20 21:02:31 +09:00
Yu Watanabe 3ac8148e20 network/routing-policy-rule: also manage remaining attributes
Currently, these attributes are not configured by us, but there may be a
existing rule created by user manually with one of these attribute.
To correctly manage such foreign rules, let's read these attributes.
2024-08-20 21:02:30 +09:00
Yu Watanabe 7275739728 sd-netlink: introduce sd_netlink_message_read_u64() 2024-08-20 21:02:30 +09:00
Yu Watanabe 727235006a network/routing-policy-rule: remove rules that have conflicting flags
The kernel does not distinguish rules with different flags in
rule_exists(), but the flags of an existing rule cannot be updated.
Let's remove rules that have conflicting flags, and configure new rules
later with requested flags.
2024-08-20 21:02:30 +09:00
Yu Watanabe 689438419b network/routing-policy-rule: anyway detach rule even when we fail to remove it
When we fail to remove a rule, that mostly means the rule does not exist
in the kernel anymore, e.g. already removed manually and we have not
received notification about that yet.
Let's detach the rule in that case.
2024-08-20 21:02:30 +09:00
Yu Watanabe 65f5f58156 network/routing-policy-rule: do not save rule to Manager before it is configured
Otherwise, if we fail to configure the rule, then the manager will keep
nonexistent rule forever. So, let's first copy the rule and put it on
Request, then on success generate a new copy based on the netlink
notification and store it to Manager.

This is the same as 0a0c2672db, but for
routing policy rule.
2024-08-20 21:02:30 +09:00
Yu Watanabe 4f8b153d90 network/routing-policy-rule: skip requesting when rule is already requested
If it is already requested, the new request will be anyway silently refused by
link_queue_request_safe(), which returns 0 in such case. Let's return earlier.

There should be no functional change, just refactoring.
2024-08-20 21:00:05 +09:00
Yu Watanabe 489671d225 network/address-label: allow to configure IPv6 address label in networkd.conf
Closes #23159.
2024-08-20 20:50:56 +09:00
Yu Watanabe 477defd774 network/queue: introduce manager_queue_request_full()
Currently it is not used, but will be used later.
2024-08-20 20:49:32 +09:00
Yu Watanabe 7b2e07ca4c network/address-label: split out address_label_fill_message()
No functional change, just refactoring and preparation for later
commits.
2024-08-20 20:49:28 +09:00
Yu Watanabe 4dfbecd2ff network/address-label: several cleanups for conf parsers
- Check userdata, instead of data, though they point to the same
  position.
- Support an empty string.
- Use UINT32_MAX, as the label is uint32_t.
2024-08-20 20:48:48 +09:00
Yu Watanabe c95fa6acb5 network/address-label: introduce custom hash_ops
No functional change, just refactoring.
2024-08-20 20:48:48 +09:00
Yu Watanabe d37afb5779 network/routing-policy-rule: add trailing period to the log message 2024-08-20 20:48:26 +09:00
Yu Watanabe fc58350aa4 network/routing-policy-rule: do not modify RountingPolicyRule objects managed by Manager or Network
They are stored in Manager.rules set or Network.rules_by_section hashmap.
For safety, let's not edit them even temporarily.

No functional change, just refactoring.
2024-08-20 20:48:26 +09:00
Lennart Poettering 61242b1f0f shared: invoke agents only when we have a controlling TTY
being connected to a TTY is not really enough to determine
interactivity in many cases. Let's also check if we have a controlling
TTY.

Inspired by #34016
2024-08-20 20:37:50 +09:00
Yu Watanabe 41f5e66cf2
Merge pull request #34044 from poettering/isatty-fixes
fixes around isatty() handling
2024-08-20 20:36:07 +09:00
Lennart Poettering 8915e4aef5 man: fix ID_NET_LABEL_ONBOARD= documentation
We do not prefix the field with anything, since
8c053c83ae.
2024-08-20 20:30:39 +09:00
Luca Boccassi a8d1f9da55
Merge pull request #34009 from yuwata/network-resolve-polkit
network,resolve: support interactive authentication
2024-08-20 12:14:03 +02:00
Luca Boccassi a16079fccc
Merge pull request #34014 from yuwata/network-ip-masquerade
network: make IPMasquerade= imply global IP forwarding settings again
2024-08-20 11:59:30 +02:00
Luca Boccassi 2bc7cae70b
Merge pull request #34021 from yuwata/network-routing-policy-rule
network/routing-policy-rule: several cleanups
2024-08-20 11:49:02 +02:00
Ronan Pigott eded61e410 resolved: demote the global unicast scope
This will greatly reduce the number of cases where the global unicast
scope overlaps with link scopes configured as default-route, making it
feasible to use the global DNS setting in conjunction with per-link dns
servers configured by the network.

This change is preferred over demoting links to default-route=no where
the user prefers to use the network provided DNS servers, and I expect
it is non-disruptive in that it should not degrade the efficacy of any
existing configuration.
2024-08-20 11:45:22 +02:00
Lennart Poettering 300b7e7620 tree-wide: use isatty_safe() more 2024-08-20 11:11:53 +02:00
Lennart Poettering aae47bf7a3 terminal-util: don't assume errno is correctly set when using isatty_safe()
let's instead generate ENOTTY on our own. This is more correct with out
coding style (since we generally do not propagate errors via errno), and
also addresses #34039 as side effect. (#34039 really needs to be fixed
in musl though, too, this is just a work-around as side-effect).

Fixes: #34039
2024-08-20 10:59:47 +02:00
Lennart Poettering 1b24357c41 terminal-util: fix isatty_safe() on hung-up TTYs
glibc returs EIO on ttys that are hung up. That's not really correct,
POSIX seems to disagree.

Work around this in our code, and turn this into a clean "1", since a
hung up tty doesn't stop being a tty just because it is hung up.

Background: https://github.com/systemd/systemd/pull/34039
2024-08-20 10:57:49 +02:00
Yu Watanabe 0197fb599a test-network: make kernel send NA with router flag
If the router interface send NA without router flag, client interface will drop
SLAAC addresses. To make the router interface send NA with router flag,
IPv6 forwarding needs to be enabled.
===
client: NDISC: Received Neighbor Advertisement from fe80::1034:56ff:fe78:9a99: Router=no, Solicited=yes, Override=no
client: NDISC: Invoking callback for 'neighbor' event.
client: Removing NDisc route (configured): dst: 2002:da8:1:99::/64, src: n/a, gw: n/a, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a
client: Removing NDisc route (configured): dst: n/a, src: n/a, gw: fe80::1034:56ff:fe78:9a99, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a
client: Removing NDisc address (configured): 2002:da8:1:99:1034:56ff:fe78:9a00/64 (valid for 23h 59min 58s, preferred for 3h 59min 58s), flags: manage-temporary-address,no-prefixroute, scope: global
===
2024-08-20 09:01:08 +02:00
maia x. 010ea061fc namespace: Fix extension release memory leak
In apply_one_mount(), in the MOUNT_EXTENSION_DIRECTORY case,
char **extension_release was used as a return pointer twice but only
cleaned up once in the end. Fix it by removing duplicate code that
was causing this issue.

Fixes issue introduced in 55ea4ef096.
2024-08-20 09:40:52 +09:00
Yu Watanabe 93f91df671 network/routing-policy-rule: drop unused argument 2024-08-20 02:21:21 +09:00
Yu Watanabe 6c72e80a3c network/routing-policy-rule: introduce ref and unref functions for RoutingPolicyRule
No functional change, just refactoring and preparation for later change.
2024-08-20 02:21:21 +09:00
Yu Watanabe 957d94c5bd network/routing-policy-rule: manage all flags
Currently, only FIB_RULE_INVERT flag can be configurable, but for
simplicity and future extension, let's manage all flags.

No functional change, just refactoring.
2024-08-20 02:21:21 +09:00
Yu Watanabe 933448defe network/routing-policy-rule: use int32_t for suppress_prefixlen
The kernel parses FRA_SUPPRESS_PREFIXLEN as uint32_t, but internally
handled as signed integer and negative values as unset. Let's explicitly
specify the size of the variable.

No functional change, just refactoring.
2024-08-20 02:21:21 +09:00
Yu Watanabe 0a3a3a2a1e network/routing-policy-rule: reorder elements of RoutingPolicyRule and add comments
No functional change, just refactoring.
2024-08-20 02:21:21 +09:00
Yu Watanabe 82ddfaa591 network/routing-policy-rule: update hash and compare function for fib rule
Let's manage fib rules with the logic used by the kernel.

Should not change any behavior.
2024-08-20 02:21:16 +09:00
Daan De Meyer 4cf7a676af test-dhcp-server: Gracefully handle the network being down 2024-08-19 11:38:55 +09:00
Yu Watanabe cc3e48b3c1 run: also enable interactive authentication on opening pty 2024-08-19 11:36:32 +09:00
Yu Watanabe 1b8a74678c run: use sd_bus_set_allow_interactive_authorization() 2024-08-19 11:36:32 +09:00
Yu Watanabe 04834552ed mount: use sd_bus_set_allow_interactive_authorization() 2024-08-19 11:36:32 +09:00
Yu Watanabe 335608593c timedatectl: drop unnecessary temporal variables
Also drop unnecessary spaces.
2024-08-19 11:36:32 +09:00
Yu Watanabe f3cf6167ef tree-wide: voidify polkit_agent_open_if_enabled() 2024-08-19 11:36:32 +09:00
Yu Watanabe 69e7d2efdf timedatectl: enable interactive authentication for DBus methods 2024-08-19 11:36:32 +09:00
Yu Watanabe 470cea62da resolve: inherit server userdata
No functional change, just refactoring.
2024-08-19 11:36:32 +09:00
Yu Watanabe cf01bbb7a4 resolve: support polkit authentication for io.systemd.Resolve.Monitor
Then, non-privilege user can call e.g. 'resolvectl monitor' with
authentication.
2024-08-19 11:36:32 +09:00
Yu Watanabe 302cc03cc8 sd-varlink: allow to dispatch method again on pending-method-more state
Otherwise, polkit authentication does not work for methods that require
the MORE flag.
2024-08-19 11:36:32 +09:00
Yu Watanabe 614a6770f9 resolvectl: acquire DBus connection only when necessary
When e.g. `resolvectl monitor` is called, it is not necessary to acquire
DBus connection.
2024-08-19 11:36:32 +09:00
Yu Watanabe f75ecb9f8b resolvectl: several coding style cleanups
Use RET_GATHER(), FOREACH_ARRAY(), and strv_skip().
2024-08-19 11:36:32 +09:00
Yu Watanabe 5703301ada resolvectl: introduce --no-ask-password option 2024-08-19 11:36:22 +09:00
Yu Watanabe 1d7fa67789 resolvectl: enable interactive authentication for dbus method call
Even the server side supports polkit authentication, previously
the client side did not support polkit authentication.
2024-08-19 11:29:40 +09:00
Yu Watanabe 21f31f23cc networkctl: introduce --no-ask-password option 2024-08-19 11:28:22 +09:00
Yu Watanabe 67899e3e6b networkctl: enable interactive authentication for dbus method call
Previously, e.g. 'networkctl reload' did not ask password through
polkit.
2024-08-19 11:27:53 +09:00
Daan De Meyer c4e809b6ad
Merge pull request #34026 from DaanDeMeyer/tests
Handle unprivileged user namespaces gracefully in tests
2024-08-18 23:31:10 +02:00
Daan De Meyer ef31767ed7 test: Gracefully handle running within user namespace with single user
Unprivileged users often make themselves root by unsharing a user namespace
and then mapping their current user to root which does not require privileges.
Let's make sure our tests don't fail in such an environment by adding checks
where required to see if we're not running in a user namespace with only a
single user.
2024-08-18 21:53:52 +02:00
Yu Watanabe dff27ce65a
Merge pull request #34025 from YHNdnzj/edit-util-wrong-place
edit-util: catch and warn about edits outside of markers
2024-08-19 04:33:56 +09:00
Yu Watanabe dc64f66756
Merge pull request #34022 from YHNdnzj/unit-is-filtered
core/unit: two trivial cleanups
2024-08-19 04:29:54 +09:00
Yu Watanabe 871b0ee995
Merge pull request #34020 from YHNdnzj/cred-no-mountover
core/dbus-service: refuse bind mounting over /run/credentials/
2024-08-19 04:29:42 +09:00
Yu Watanabe 6e4918a944 analyze: introduce --instance= option to control instance name for template units
Note, `systemd-analyze foo@.service --instance=hoge` is equivalent to
`systemd-analyze foo@hoge.service`. But, the option may be useful when
e.g. passing multiple template units that have restriction on their
instance name:
```
$ ls
template_aaa@.service   template_bbb@.service   template_ccc@.service
$ systemd-analyze ./template_* --instance=hoge
```
Without the option, we need to embed an instance name into each unit
name, so cannot use globs.

Prompted by #33681.
2024-08-19 04:29:23 +09:00
Mike Yuan e65b07293c
edit-util: catch and warn about edits outside of markers
The users still periodically come back to #24208.
Let's add a detection for this hence.
2024-08-18 16:42:29 +02:00
Mike Yuan f0f044a456
string-util: update ptr declaration to match our coding style 2024-08-18 16:41:44 +02:00
Mike Yuan f32538e1cc basic/process-util: modernize setpriority_closest()
Before this commit, the "Cannot raise nice level" branch
is rather confusing, as we're actually lowering the nice.
Also, it's better to log about the final nice value
for both cases, no matter whether we need to set to limit
or not.
2024-08-18 15:16:03 +02:00
Daan De Meyer d098b8df6e test-netlink: Gracefully handle the loopback interface being down 2024-08-18 13:19:30 +02:00
Mike Yuan 6e0f959360
core/unit: unit_is_filtered() -> unit_passes_filter() and invert logic
Follow-up for 6d2984d21b

The current semantics of "filtered" in unit_is_filtered()
are actually the contrary of ListUnitsFiltered(). Let's
make things consistent, i.e. return true when the unit
shall be included.
2024-08-17 20:09:51 +02:00
Mike Yuan 6c8ade3066
core/unit: rename set_unit_path() -> setenv_unit_path()
The previous name is quite vague on what this precisely
do.
2024-08-17 18:52:42 +02:00
Mike Yuan ae5c4aa66e
core/dbus-service: refuse bind mounting over /run/credentials/
The credential mounts should be managed singlehandedly by pid1.
Preparation for the future introduction of RefreshOnReload=credential,
where refreshing creds will be properly supported on reload.
2024-08-17 18:16:20 +02:00
Mike Yuan f31906ff0b
core/dbus-service: some modernization for bus_service_method_mount()
Perform some checks earlier to avoid pointless polkit auth.

Plus, the missing unit_get_exec_context() shall not be
a formalized error. As it's our internal representation
and in the normal operation should never happen.
2024-08-17 18:09:54 +02:00
Yu Watanabe c53a28cea1 network: refuse files under API VFS specified in PrivateKeyFile= and friends
Addresses https://github.com/systemd/systemd/pull/34013#discussion_r1719890231.
2024-08-17 03:20:26 +09:00
Yu Watanabe 08779d7c55 test: add test case that 'nspawn --network-veth' enables IP forwarding 2024-08-17 02:11:15 +09:00
Yu Watanabe 4bf1a2c383 network/wireguard: introduce [WireGuardPeer] PublicKeyFile=
Similar to PresharedKeyFile=, but for public key.

Closes #34012.
2024-08-17 01:58:02 +09:00
Yu Watanabe 7908e1d459 test: allow to skip matrix_run_one() if $TEST_MATCH_TESTCASE is set 2024-08-17 01:47:33 +09:00
Yu Watanabe 0b695febb2 network: make IPMasquerade= imply global IP forwarding settings again
After 3976c43092 (#31423), IPMasquerade=
implies only per-interface IP forwarding. That means, nspawn users need
to manually enable IPv4/IPv6Forwarding= in networkd.conf when
--network-veth or friend is used. Even the change was announced in NEWS,
the change itself breaks backward compatibility and extremely reduces
usability.

Let's make the setting imply the global setting again.

Fixes #34010.
2024-08-17 00:13:06 +09:00
Yu Watanabe 8ceca83141 network/lldp-tx: introduce link_lldp_tx_update_capabilities()
Currently it is unused, but it will be used later.
2024-08-16 23:30:05 +09:00
Yu Watanabe fbcd7e054b sd-lldp-tx: insert missing empty line 2024-08-16 23:29:36 +09:00
rindeal 374aa1be7c kernel-install: discard comments in cmdline files
It was quite a surprise to find my comments in a booted kernel cmdline.
2024-08-16 17:15:39 +09:00
Daan De Meyer 2701c2f67d Add $SYSTEMD_IN_CHROOT to override chroot detection
When running unprivileged, checking /proc/1/root doesn't work because
it requires privileges. Instead, let's add an environment variable so
the process that chroot's can tell (systemd) subprocesses whether
they're running in a chroot or not.
2024-08-16 10:11:29 +02:00
Yu Watanabe f689f57c1e test: fix typo
Follow-up for 538766ddf4.
2024-08-16 09:44:21 +09:00
bryango 3ceb4d2438 shell-completion: zsh: fix incorrect unescaping
Previously the `_filter_units_by_property` completion function
outputs with a [zsh parameter expansion flag] `g`. This means
that the returned result is unescaped as the zsh builtin `echo`,
except that octal escapes don’t take a leading zero. This seemed to
have worked back in the days when it was first introduced:

  6c9414a700

But it now leads to incorrect over-unescaping; for example,

  system-systemd\\x2djournald.slice (correct)

is incorrectly completed by zsh in commands such as
`systemctl kill`:

  system-systemd-journald.slice (incorrect)

This commit fixes such problems by removing the `g` flag.

See:
[zsh parameter expansion flag]: https://zsh.sourceforge.io/Doc/Release/Expansion.html#Parameter-Expansion-Flags
2024-08-15 20:28:12 +02:00
Matthias Schiffer 24c2e04e9a udev-builtin-net_id: add NAMING_DEVICETREE_PORT_ALIASES to check of_node of netdevs before their parents
The net_id builtin only checked the of_node of a netdev's parent device,
not that of the netdev itself. While it is common that netdevs don't have
an OF node assigned themselves, as they are derived from some parent
device, this is not always the case. In particular when a single
controller provides multiple ports that can be referenced indiviually in
the Device Tree (both for aliases/MAC address assignment and phandle
references), the correct of_node will be that of the netdev itself, not
that of the parent, so it needs to be checked, too.

A new naming scheme flag NAMING_DEVICETREE_PORT_ALIASES is added to
allow selecting the new behavior.
2024-08-15 18:20:49 +02:00
Yu Watanabe 98b86d294a
Merge pull request #34000 from yuwata/test-remove-temporary-directories
test: remove temporary directories
2024-08-15 18:54:16 +09:00
Yu Watanabe 22862288c8 test: sync journal after all invocations finished
Otherwise, several messages for the last invocation have not been
stored to journal yet.

Hopefully fixes the following race:
===
[  603.037765] H systemd-run[10503]: Running as unit: invocation-id-test-26448.service; invocation ID: 1a49edeb05a641aaa2def72411134822
[  603.099587] H bash[10504]: invocation 10 1a49edeb05a641aaa2def72411134822
[  603.212069] H systemd[1]: invocation-id-test-26448.service: Deactivated successfully.
[  603.225092] H systemd-run[10503]: Finished with result: success
[  603.225163] H TEST-04-JOURNAL.sh[10506]: + journalctl --list-invocation -u invocation-id-test-26448.service
[  603.225318] H systemd-run[10503]: Main processes terminated with: code=exited, status=0/SUCCESS
[  603.225357] H TEST-04-JOURNAL.sh[10507]: + tee /tmp/tmp.UzSmYamXyg/10
[  603.225357] H TEST-04-JOURNAL.sh[10507]: IDX INVOCATION ID                    FIRST ENTRY                 LAST ENTRY
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -9 d6efabb546014027b6bd7ee3a78386d6 Wed 2024-08-14 22:12:16 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -8 3e402b81c28d4a8fa2c5e8e31dffd9ee Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -7 5ebd0ba07d4f4f52bc84275f55a3ee2e Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -6 bc53c49d6ce24bb7acd438c3e61cfb23 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -5 24680907919e4839a75378117bb5a816 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -4 ec364ed7673c4a1fa22929f95ce7047b Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -3 2e8a4dea43044d1a9faf922f7a2f3d42 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -2 ac610b6e6c9c4a29bf8947890685478b Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:  -1 9b7d52c3620948f9831e323910f605f5 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225357] H TEST-04-JOURNAL.sh[10507]:   0 1a49edeb05a641aaa2def72411134822 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.225823] H systemd-run[10503]: Service runtime: 174ms
[  603.225866] H TEST-04-JOURNAL.sh[10508]: + journalctl --list-invocation -u invocation-id-test-26448.service --reverse
[  603.226110] H systemd-run[10503]: CPU time consumed: 12ms
[  603.226142] H TEST-04-JOURNAL.sh[10509]: + tee /tmp/tmp.UzSmYamXyg/10-r
[  603.226378] H systemd-run[10503]: Memory peak: 1.4M (swap: 0B)
[  603.230161] H TEST-04-JOURNAL.sh[10509]: IDX INVOCATION ID                    FIRST ENTRY                 LAST ENTRY
[  603.230161] H TEST-04-JOURNAL.sh[10509]:   0 1a49edeb05a641aaa2def72411134822 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:18 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -1 9b7d52c3620948f9831e323910f605f5 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -2 ac610b6e6c9c4a29bf8947890685478b Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -3 2e8a4dea43044d1a9faf922f7a2f3d42 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -4 ec364ed7673c4a1fa22929f95ce7047b Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -5 24680907919e4839a75378117bb5a816 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -6 bc53c49d6ce24bb7acd438c3e61cfb23 Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -7 5ebd0ba07d4f4f52bc84275f55a3ee2e Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -8 3e402b81c28d4a8fa2c5e8e31dffd9ee Wed 2024-08-14 22:12:17 UTC Wed 2024-08-14 22:12:17 UTC
[  603.230161] H TEST-04-JOURNAL.sh[10509]:  -9 d6efabb546014027b6bd7ee3a78386d6 Wed 2024-08-14 22:12:16 UTC Wed 2024-08-14 22:12:17 UTC
===
2024-08-15 18:52:38 +09:00
Luca Boccassi ddc91af4ea test: add TEST_SKIP to mkosi integration test wrapper
Takes a space-separate list of test names, allows to skip one or more tests
2024-08-15 10:39:51 +02:00
Ronan Pigott 3d2157e707 units: drop "-p" flag from agetty's login options
This flag was added in db6aedab92 with the justification that locale
environment variables should be preserved by the user session. However,
the companion patch to drop the UnsetEnvironment= directive blocking
these variables was never merged, so the intended change was never
effected.

While the patch was ineffective toward its stated goal, the "-p" option
does have material negative consequences for the user session in
systemd — environment variables to support the use of
credentials and memory pressure directives, such as
$CREDENTIALS_DIRECTORY and $MEMORY_PRESSURE_WATCH, which are now
directly used by agetty and login, get leaked into the user session
potentially breaking applications that rely on these values.

E.g. systemd-ask-password fails from the tty when $CREDENTIALS_DIRECTORY
has been leaked from agetty, because it expects to be able to access
credentials in $CREDENTIALS_DIRECTORY.

This effectively reverts db6aedab92.

References: db6aedab92 (units: Tell login to preserve environment (#6023), 2017-05-24)
2024-08-15 16:49:02 +09:00
Yu Watanabe e9a5b4a10e test: remove temporary directory for test-ukify on success 2024-08-15 16:19:27 +09:00
Yu Watanabe 63be834db8 test: remove temporary directory on success
Also use mkdtemp_open() with specific template.

Follow-up for e7e52ff9b6.
2024-08-15 16:19:27 +09:00
Daan De Meyer 0409213cbc mkosi: Fix debian/not-installed build logic
- Expand globs
- Filter out directories
- Append to the list of packaged files, not the list of installed files

Fixes the issue in https://github.com/systemd/systemd/pull/32363
2024-08-15 15:48:12 +09:00
Chengen Du 6bd12be3fa udev: Handle PTP device symlink properly on udev action 'change'
PTP device symlink creation rules are currently executed only when the
udev action is 'add'. If a user reloads the rules and runs the udevadm
trigger command to reapply changes, the symlink may be deleted, which
can prevent the chronyd service from restarting properly.

Signed-off-by: Chengen Du <chengen.du@canonical.com>
2024-08-15 15:38:46 +09:00
Yu Watanabe 6ddf879ce8
Merge pull request #33955 from yuwata/sd-journal-fix-sd_journal_seek_monotonic_usec
sd-journal: fix sd_journal_seek_monotonic_usec()
2024-08-15 15:38:19 +09:00
Thorsten Scherer 932cc94436 repart: Fix misleading typo in GPT partition flag
Bit 60 is the one corresponding to ReadOnly, not 50.  Fix this.
2024-08-15 05:59:58 +09:00
Yu Watanabe 6dd1465b2a
Merge pull request #32067 from ssahani/bareudp1
network: netdev - BareUDP Add support for srcportmin
2024-08-15 05:35:32 +09:00
Yu Watanabe 4b509053ec sd-journal: rename offset -> ret_offset 2024-08-15 04:43:32 +09:00
Yu Watanabe 1e59254ac2 sd-journal: swap condition to reduce indentation
No functional change, just refactoring.
2024-08-15 04:43:32 +09:00
Yu Watanabe 3fc1e4f63a sd-journal: drop unnecessary temporal variable 'k'
No functional change, just refactoring.
2024-08-15 04:43:32 +09:00
Yu Watanabe 24ce1703c4 sd-journal: add trailing comma 2024-08-15 04:43:32 +09:00
Yu Watanabe 12dcb12df3 test: add test cases for sd_journal_seek_realtime_usec() and sd_journal_seek_monotonic_usec() 2024-08-15 04:43:32 +09:00
Yu Watanabe 9c04f67884 sd-journal: fix sd_journal_seek_monotonic_usec()
This fixes the following issues:

- We have a journal file, which contains entries of boot A and B. Let T
  be the timestamp of the _last_ entry of boot A.
  If sd_journal_seek_monotonic_usec() is called for boot A with a timestamp
  _after_ T, following sd_journal_next() will provide the _first_ entry of
  boot A, rather than the first entry of boot B.

- We have two journal files X and Y. The file X contains entries of boot A.
  Let T be the timestamp of the _last_ entry of boot A in file X. The file Y
  contains entries of boot A after timestamp T.
  If sd_journal_seek_monotonic_usec() is called for boot A with a
  timestamp _after_ T, following sd_journal_next() will provide the
  _first_ entry of boot A, whose timestamp is of course earlier than T.
2024-08-15 04:43:32 +09:00
Yu Watanabe a2e4b8d866 test: modernize test-journal-interleaving 2024-08-15 04:43:32 +09:00
Yu Watanabe 4f94470ded test: replace ASSERT_TRUE() for dns_cache_lookup() with ASSERT_OK_POSITIVE()
As it may return negative errno on error, and returns number of found
entries on success.
2024-08-15 04:43:32 +09:00
Yu Watanabe 538766ddf4 test: add ASSERT_OK_POSITIVE() and ASSERT_OK_ZERO() 2024-08-15 04:43:20 +09:00
Luca Boccassi cf91785137
Merge pull request #33991 from DaanDeMeyer/manager-json-split
Various refactorings and fixes
2024-08-14 21:35:04 +02:00
Susant Sahani 3859ef162b test-network: Add test for BareUDP srcportmin 2024-08-14 23:18:26 +05:30
Susant Sahani 7918894302 network: netdev - BareUDP Add support for srcportmin
Allows to configure the lowest value of the UDP tunnel source port range.
2024-08-14 23:18:20 +05:30
Mike Yuan c2d9b477ef
Merge pull request #33990 from yuwata/run-json-follow-ups
run: several follow-ups for recent change
2024-08-14 16:06:03 +02:00
Daan De Meyer 2250c996cf core-varlink: Introduce manager_varlink_managed_oom_connect()
In the next commit, we'll introduce a varlink server for the user
manager. As preparation for that, let's introduce a new function to
initialize only the managed OOM connection whenever we send a managed
OOM update.
2024-08-14 14:21:48 +02:00
Mike Yuan c557f6f540 core-varlink: merge two FLAGS_SET() where appropriate 2024-08-14 14:19:47 +02:00
Daan De Meyer e3878ff657 sd-json: Use goto finish instead of return
sd_json_buildv() uses a "finish" goto label for cleanup so make sure
we goto that label on failure instead of returning directly.
2024-08-14 14:18:40 +02:00
Daan De Meyer 32c9bf14ce taint: Add taint_strv() to get taints as an array 2024-08-14 14:18:40 +02:00
Daan De Meyer 406e41cdef core: Clean up includes a little 2024-08-14 14:18:40 +02:00
Daan De Meyer 6d2984d21b core: Introduce unit_is_filtered() 2024-08-14 14:18:40 +02:00
Daan De Meyer 14702b9c18 core: Use RateLimit struct to store ratelimits
This makes it easier to serialize these ratelimits with
JSON_BUILD_CALLBACK().
2024-08-14 14:18:40 +02:00
Daan De Meyer 2031fe7461 basic: Various cleanups for ratelimit functions 2024-08-14 14:18:40 +02:00
Daan De Meyer db043a9b1a test: Use usual setup in integration-test-setup script 2024-08-14 14:18:40 +02:00
Daan De Meyer dba138b863 test: Fix section of StateDirectory= 2024-08-14 14:18:40 +02:00
Daan De Meyer c022fcd80c mkosi: Install llvm
For llvm-symbolizer which is required to sanitize address sanitizer
reports.
2024-08-14 14:18:40 +02:00
Daan De Meyer 7628565604 mkosi: Disable pagination in gdb 2024-08-14 14:18:40 +02:00
Luca Boccassi 33a2307ac7
Merge pull request #33957 from yuwata/network-generator-vlan
network-generator: fixlets for vlan interfaces
2024-08-14 12:45:25 +02:00
Yu Watanabe 00ca5d3ad9 run: use sd_json_variant_set_field_id128() 2024-08-14 15:53:42 +09:00
Yu Watanabe 9ec6d26e41 sd-json: add sd_json_variant_set_field_id128() and _uuid() 2024-08-14 15:52:39 +09:00
Yu Watanabe 35c952bf1c run: drop unnecessary initializations
Follow-up for fe5a6c47af.
2024-08-14 15:45:49 +09:00
Yu Watanabe 2a774f0648 network-generator: drop wrong warning for rd.peerdns without value 2024-08-14 15:39:12 +09:00
Yu Watanabe 551b21eb0a network-generator: ignore kernel command line without value
And drop duplicated log messages.
2024-08-14 15:36:26 +09:00
Yu Watanabe b3b4d626ce network-generator: use extract_first_word()
Now, ip= with trailing colon is refused.
2024-08-14 15:29:45 +09:00
Dr. David Alan Gilbert c76fdfc51b nspawn: Fix help typo
'an an' -> 'an'
2024-08-14 13:45:27 +09:00
James Muir c5903cde63 man/systemd-sysusers, man/systemd-tmpfiles: fix sentence fragments
add "are executed" so that those two sentences have a verb.
2024-08-13 19:27:21 +02:00
Daan De Meyer d89ee0fcf9 nspawn: Assume unified cgroup hierarchy if there's no systemd in the image
If there's no systemd installation in the image, assume the unified
cgroup hierarchy.
2024-08-13 19:09:26 +02:00
Daan De Meyer 74cc5e2041 docs: Mention the new mount API in the container interface doc
Let's mention that the new mount API may be used to establish new
mounts in a container without needing the /run/host/incoming directory.
2024-08-13 12:20:43 +02:00
Luca Boccassi 5936b4054a
Merge pull request #33979 from YHNdnzj/edit-util-no-duplicate-strip
edit-util: a few cleanups; support networkctl edit --stdin
2024-08-13 01:48:06 +02:00
Lukas Nykryn fe5a6c47af systemd-run: add unit and invocation_id JSON output 2024-08-12 20:19:01 +02:00
Mike Yuan 119cba7835
networkctl: support edit --stdin 2024-08-12 16:23:23 +02:00
Mike Yuan 40f5c372c2
edit-util: several cleanups for --stdin handling
Follow-up for 329050c5e2

I don't particularly favor the duplicated strstrip()
and such, so let's ensure if we get fixed data it's
only trimmed once. Subsequently we can benefit more
by making all copies reflinks.
2024-08-12 16:23:23 +02:00
Mike Yuan 3b5b2ff8fa
edit-util: do not try to recreate temp file if missing
We initially read from temp file, then strip it, and write
back to it. If the file suddenly disappeared during the process,
it indicates someone else is touching our temp file
behind our back. Let's not silently continue.
2024-08-12 16:06:37 +02:00
Mike Yuan 7a729f876b
edit-util: clean up run_editor() a bit
- Add missing assertions
- Close all fds before spawning editor
- Use FOREACH_STRING() + empty_to_null() where appropriate
  Note that this slightly changes the behavior, in that
  empty envvars would be treated as unset and we'd try
  the next candidate. But the new behavior is better IMO.
2024-08-12 16:04:11 +02:00
Peter Hutterer 1e922cc7ff logind: if EVIOCREVOKE fails, don't try it again
Let's assume that if the ioctl fails once with EINVAL, we won't have to
try this again.
2024-08-12 14:45:25 +10:00
Luca Boccassi 10ac85d0da mkosi: update debian commit reference
* 6e0f4f74ba Update changelog for 256.4-3 release
* 4b142f9c37 Depend on new linux-bpf-dev package where available
* f5fe5ecf4d autopkgtest: use hint-testsuite-triggers to ensure other packages changes trigger our testsuite
* 407932845d autopkgtest: run upstream test last
* 31458d03c2 Stop installing legaly pkla file in upstream CI too
* 484643291a Use d/not-installed instead of manual removals
* 752bb4c34c Stop shipping empty /etc/init.d directory
* 174603ffc2 Use debian/clean instead of override in d/rules
* 9a355e5a51 Drop redundant pot build
* 3d249c88cb Update changelog for 256.4-2 release
2024-08-11 17:26:41 +02:00
Ivan Shapovalov 711a157738 core/exec-invoke: call setpriority() after sched_setattr()
The nice value is part of struct sched_attr, and consequently invoking
sched_setattr() after setpriority() would clobber the nice value with
the default (as we are not setting it in struct sched_attr).

It would be best to combine both calls, but for now simply invoke
setpriority() after sched_setattr() to make sure Nice= remains effective
when used together with CPUSchedulingPolicy=.
2024-08-10 19:09:14 +02:00
Mike Yuan 7036dd8b27 terminal-util: do not query kernel cmdline for pty size
This is pointless and noisy even for debug level.
2024-08-10 13:01:56 +02:00
Luca Boccassi 0dd6fe931d
Merge pull request #33961 from bluca/busctl_exit
busctl: add support for --timeout and --num-matches for monitor verb
2024-08-09 14:48:40 +02:00
Luca Boccassi 702d74b62a busctl: add --num-matches= for monitor verb
Useful in scripts when one wants to wait for a specific
signal before continuing
2024-08-09 12:12:28 +01:00
Nick Rosbrook 82c482d573 core/unit: do not use unit path cache in unit_need_daemon_reload()
When unit_need_daemon_reload() calls unit_find_dropin_paths() to check
for new drop-in configs, the manager's unit path cache is used to limit
which directories are considered. If a new drop-in directory is created,
it may not be in the unit path cache, and hence unit_need_daemon_reload()
may return false, despite a new drop-in being present. However, if a
unit path cache is not given to unit_file_find_dropin_paths() at all,
then it behaves as if the target path was found in the unit path cache.

So, to fix this, adapt unit_find_dropin_paths() to take a boolean
argument indicating whether or not to pass along the unit path cache.
Set this to false in unit_need_daemon_reload().

Fixes #31752
2024-08-09 19:25:42 +09:00
Yu Watanabe 15642d2f38 network-generator: use network_acquire() at more places 2024-08-09 19:12:01 +09:00
Yu Watanabe b8a57ea56b network-generator: introduce network_acquire() and netdev_acquire()
No functional change, just refactoring.
2024-08-09 19:12:01 +09:00
Yu Watanabe bdd6787ee5 network-generator: trivial cleanups 2024-08-09 19:12:01 +09:00
Yu Watanabe e31a55edf1 network-generator: parse vlan ID from vlan interface name
Fixes #33954.
2024-08-09 19:12:01 +09:00
Yu Watanabe c40ef3f8ff network-generator: allow to create bridge or friends without slave interfaces 2024-08-09 19:11:49 +09:00
Yu Watanabe 9eee6b1b3f network-generator: vlan= can be specified multiple times 2024-08-09 15:39:38 +09:00
Yu Watanabe c0981de289 test: add one more test case without hostname 2024-08-09 15:39:38 +09:00
Yu Watanabe 6c7f562207 test: modernize test-network-generator 2024-08-09 14:58:08 +09:00
Luca Boccassi 79488ac003 test: note in README how to get full list of Ubuntu CI jobs 2024-08-08 15:13:38 +01:00
Renan Guilherme 3a576084e2 hwdb: Fix accelerometer mount matrix for ASUS T100TAS 2024-08-08 11:53:11 +02:00
Luca Boccassi 989e843e75 busctl: add support for --timeout to monitor verb
Useful in scripts when you want to exit successfully after a certain time
2024-08-08 09:18:41 +01:00
Daan De Meyer 6e9536c971
Merge pull request #33959 from DaanDeMeyer/crash
Two crash handler improvements
2024-08-08 08:14:46 +02:00
Luca Boccassi 1e2aa88bb2 nspawn: fix settings leak for init parameter
Fixes https://github.com/systemd/systemd/issues/33960

Follow-up for ce2291730d
2024-08-08 06:58:52 +02:00
Daan De Meyer 570a11eb9d crash-handler: Drop 10s sleep before we spawn the crash shell
It pointlessly delays getting to the crash shell so let's drop the
10s sleep.
2024-08-07 21:26:53 +02:00
Daan De Meyer bc3477fdc5 crash-handler: Call vhangup on /dev/console before spawning crash shell
When pid 1 crashes, the getty unit for the console will happily keep
running which means we end up with two shells competing for the same
tty. Let's call vhangup on /dev/console to kill every other process
attached to the console before we spawn the crash shell. The getty
units have Restart=always but lucky for us, pid 1 just crashed in fire
and flames so it isn't actually able to restart the getty unit.
2024-08-07 21:24:57 +02:00
Daan De Meyer 2561e2a356 mkosi: Disable debuginfod
We generally don't care about library debuginfo so let's just disable
debuginfod so it doesn't get in the way when debugging.

We use /root/.gdbinit as the systemwide gdbinit location is distribution
specific.
2024-08-07 21:24:57 +02:00
Yu Watanabe f548bc4011 meson: enable -Wunterminated-string-initialization
With af1a6db58f, now we can build with the
option.
2024-08-07 13:34:36 +02:00
Daan De Meyer 4fde35f27e
Merge pull request #33951 from DaanDeMeyer/nspawn
nspawn: Allow specifying custom init program
2024-08-07 07:32:50 +02:00
Cristian Rodríguez af1a6db58f basic|boot: silence Wunterminated-string-initialization gcc15 warnings
gcc15 has -Wunterminated-string-initialization in -Wextra and
warns about string constants that are not null terminated even though
the functions do do out of bounds access.
Silence the warnings by simply not providing an explicit size.
2024-08-07 00:14:53 +02:00
Daan De Meyer ce2291730d nspawn: Allow specifying custom init program
This allows for example forcing to use /sbin/init instead of always
using /usr/lib/systemd/systemd if it exists. Or it allows using a
different path altogether.
2024-08-06 23:00:17 +02:00
Michal Sekletar 68511cebe5 coredump: generate properly symbolized stacktrace for containerized processes 2024-08-06 18:32:42 +02:00
Nick Rosbrook 18a8f03e51 sysusers: check if requested group name matches user name in queue
When creating a user, check if the requested group name matches a user
name in the queue. If that matched user name is also going to be a group
name, then use it for the new user too. In other words, allow the
following:

 u foo -
 u bar -:foo

when both foo and bar are new users.

Fixes #33547
2024-08-06 13:02:58 +02:00
Daan De Meyer d3f0b4f3d2 nspawn: Drop unused includes 2024-08-06 10:25:06 +02:00
Daan De Meyer 92d885d870
Merge pull request #33942 from yuwata/udevadm-info-attribute-walk-json
udevadm-info: support json output for --attribute-walk
2024-08-06 10:23:45 +02:00
Yu Watanabe 5a5a7093b8
Merge pull request #33933 from yuwata/systemctl-bus-transport-and-runtime-scope
systemctl: fix bus transport and runtime scope handling
2024-08-06 09:12:28 +09:00
Yu Watanabe c243302ee0
Merge pull request #33941 from yuwata/network-dhcp-pd-route-type
network/dhcp-pd: introduce UnassignedSubnetPolicy= to customize type of 'catch-all' route
2024-08-06 09:11:54 +09:00
Yu Watanabe 1056457d11 systemctl: gracefully adjust bus transport and runtime scope when --boot-loader-entry=help
This fixes the following assertion:
===
SYSTEMD_LOG_LEVEL=debug systemctl --user -H foo --boot-loader-entry=help
Assertion 'transport != BUS_TRANSPORT_REMOTE || runtime_scope == RUNTIME_SCOPE_SYSTEM' failed at src/shared/bus-util.c:284, function bus_connect_transport(). Ignoring.
Failed to connect to bus: Operation not supported
===

Fixes a bug introduced by 97af80c5a7.
Fixes #33661.
Fixes oss-fuzz#70153.
2024-08-06 05:33:25 +09:00
Yu Watanabe d133508493 test-network: add test case for UnassignedSubnetPolicy= 2024-08-06 05:24:20 +09:00
Yu Watanabe a61869d4a5 network/dhcp-pd: allow to customize route type for delegated prefix
Closes #33929.
2024-08-06 05:24:16 +09:00
Yu Watanabe 67ea8a4c0e udevadm-info: support json output for --attribute-walk
Closes #33852.
2024-08-06 05:22:10 +09:00
Arnaud Patard e7a93e7521 src/pcrlock/pcrlock.c: Handle empty pcrlock.d directories
Running the following commands:

  # mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
  # /usr/lib/systemd/systemd-pcrlock predict --pcr=1+2+3+4+5+16

Will result in:

...
Floating point exception

Running the following commands:
  # mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
  # /usr/lib/systemd/systemd-pcrlock make-policy --pcr=1+2+3+4+5+16

Will result to this (partial) log:
...
Predicted future PCRs in 133us.
[]
...
Written policy digest 0000000000000000000000000000000000000000000000000000000000000000 to NV index 0x1921da6
...

So, add missing checks to handle gracefully cases where there's no variant
inside the component.

Signed-off-by: Arnaud Patard <arnaud.patard@collabora.com>
2024-08-05 18:32:26 +01:00
Luca Boccassi 1e0ef01439 logind: add PreparingForShutdownWithMetadata property
The PrepareForShutdownWithMetadata signal was added via
e4aab5cf1a but a corresponding property
was not. A property has to be a single type, so the bool needs to be
one of the key/value pairs as 'ba{sv}' is not a valid property.
2024-08-05 19:30:15 +02:00
Daan De Meyer bec6b53f3c
Merge pull request #33912 from DaanDeMeyer/mkosi
test: Add a way to quickly iterate on an integration test
2024-08-05 16:21:48 +02:00
Daan De Meyer 857e4528f5 mkosi: Prevent busybox from getting pulled into opensuse images
OpenSUSE's busybox has a bunch of Provides for basic tools that cause
it to get pulled into images unless the corresponding tool is explicitly
installed so let's add explicit tools to make sure we don't get busybox.
2024-08-05 16:20:55 +02:00
rajmohan r 1592d2f900 systemd-analyze: Add svg scaling options
+ Scale the x-axis of the resulting plot by a factor (default 1.0)
+ Add activation timestamps to each bar

Signed-off-by: rajmohan r <rajmohan.r@kpit.com>
2024-08-05 15:23:44 +02:00
Daan De Meyer af153e36ae test: Add a way to quickly iterate on an integration test
Rebuilding the integration test every time is very slow. Let's
introduce a way to iterate on an integration test without rebuilding
the image every time. By making a btrfs snapshot before we run the
integration test, we can then systemctl soft-reboot after running
the test to restore the rootfs to a pristine state before running
the test again.

As /run/nextroot will get nuked on reboot or soft-reboot, we introduce
a tmpfiles snippet to make sure it is recreated every (soft-)reboot
and adapt the existing tests to deal with this new symlink.
2024-08-05 15:13:38 +02:00
Daan De Meyer edc6592e53 mkosi: Switch back to btrfs
The next commit will introduce a way to iterate on integration
tests which depends on btrfs specific features.

We leave CentOS on ext4 as its kernel does not support btrfs.
2024-08-05 15:00:24 +02:00
Daan De Meyer ea696c5f53 mkosi: Enable Autologin= again on Debian
Debian uses /usr/bin/login from the shadow package instead of util-linux
which doesn't support credentials. Let's enable autologin the old
fashioned way for now.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833256
2024-08-05 15:00:24 +02:00
Daan De Meyer dd1c01b20f test: Implement TEST_SHELL for mkosi based test runner
TEST_SHELL can be used to get a shell in the integration test
environment without actually immediately starting the test.
2024-08-05 15:00:24 +02:00
Daan De Meyer 33f400a9e0 test: Rename INTERACTIVE_DEBUG to TEST_SHELL 2024-08-05 15:00:24 +02:00
Daan De Meyer 5f5b6fa901 docs: Update upgrade commands in HACKING.md
- Add the required options to make the package managers non interactive
- Use apt-get instead of apt
- Remove --reinstall from apt-get command so we only install newer packages
- Add --needed to pacman command so we only install newer packages
2024-08-05 15:00:24 +02:00
Daan De Meyer 63bafef12b mkosi: Drop locale tmpfiles snippet
Not required anymore as we don't do /usr only anymore and the symlink
will be created by the debian systemd package.
2024-08-05 15:00:24 +02:00
Luca Boccassi 526f767313
Merge pull request #33939 from yuwata/resolve-varlink
resolve: type field in result of ResolveService may be NULL
2024-08-05 11:37:39 +02:00
Luca Boccassi 2e59aa50da
Merge pull request #33944 from yuwata/journal-max-retention-sec
journal: do not rotate journal when MaxRetentionSec= is set
2024-08-05 11:28:48 +02:00
Yu Watanabe b55027efe4 journal: set flushed flag even if we fail to open runtime journals
As at this stage, a persistent journal file has been already opened, and
saved seqnum has been reset, and any later journal entries will be stored
to the file. Hence we should not open the runtime journal file by
server_system_journal_open() again.
2024-08-05 11:27:20 +02:00
Yu Watanabe 0d113f8e70 journal: comment the default value in journald.conf 2024-08-05 15:33:32 +09:00
Yu Watanabe b63c18db03 journal: do not rotate journal when MaxRetentionSec= is set
The setting is about vacuuming archived journal files. It is not
necessary to rotate the current journal. Note, journal file rotation is
controlled by MaxFileSec=.

Fixes #31315.
2024-08-05 15:33:32 +09:00
Yu Watanabe ce12bd19a0 udevadm-info: trival cleanups
- drop trailing an empty line,
- use FOREACH_ARRAY() macro,
- add short comment for boolean argument.
2024-08-05 12:27:10 +09:00
Yu Watanabe b48ab08732 resolve: refuse invalid service without type field
Fixes Fixes #33935.
2024-08-05 10:47:11 +09:00
Yu Watanabe cc194dddc2 resolve: voidify unused result of function call 2024-08-05 10:47:11 +09:00
Yu Watanabe 0c7bb54238 network: split out core logic route_type_is_reject()
Preparation for later change.
2024-08-05 09:15:15 +09:00
Marc Reisner 2d00f4c306
sleep: add HibernateOnACPower= option (#33846)
* Add HibernateOnACPower= systemd-sleep configuration option
2024-08-05 00:01:34 +01:00
Luca Boccassi bd5b586ad0
Merge pull request #33918 from YHNdnzj/exec-cred-cleanup
core/exec-credential: several cleanups
2024-08-04 14:20:27 +02:00
Luca Boccassi fcfec5b28b
Merge pull request #33930 from yuwata/update-syscall-tables-and-linux-headers
Update syscall tables and linux headers
2024-08-04 13:31:47 +02:00
Yu Watanabe ab9af70edb sd-event: change error code -EINVAL -> -EIO
EINVAL should be used when a function is called with an invalid
argument. Here, the signal is not a function argument.

Follow-up for 7a64c5f23e.
2024-08-04 11:33:23 +02:00
Yu Watanabe 2e308032f4 basic/linux: update kernel headers from v6.11-rc1 2024-08-04 14:55:32 +09:00
Yu Watanabe d361ea5f30 seccomp: list fstatat, newfstat, and llseek 2024-08-04 14:55:23 +09:00
Yu Watanabe da24dacf34 syscall-list: update syscall tables
This adds fstatat (and its friends), llseek, and uretprobe.
2024-08-04 14:47:30 +09:00
Yu Watanabe bcf982223c systemctl: refuse --capsule=foo with --system
Fixes the following assertion:
===
systemctl --capsule=hoge --system reboot
Assertion 'runtime_scope == RUNTIME_SCOPE_USER' failed at src/shared/bus-util.c:479, function bus_connect_transport(). Aborting.
Aborted (core dumped)
===

Follow-up for 56cb74c3cd.
2024-08-04 14:21:32 +09:00
Mike Yuan 09001a2c64
core/exec-credential: do not use unlink_and_free for relative path under dfd 2024-08-04 06:51:52 +02:00
Mike Yuan 4c00458e99
core/exec-credential: emit correct error on invalid cred source
The (!source && !search_path) branch is effectively not reached,
but rather confusing. Let's return -EINVAL properly.
2024-08-04 06:51:28 +02:00
Mike Yuan 85b265c964
core/exec-credential: use struct load_cred_args everywhere
We currently duplicate the same set of params for every funcs.
Let's unify this, and make things more manageable.
2024-08-04 06:51:28 +02:00
Mike Yuan 43705cceb8
core/exec-credential: use maybe_decrypt_and_write_credential() for SetCred= too 2024-08-04 06:51:28 +02:00
Mike Yuan ef0d7b0ec9
core/exec-credential: drop misleading comment regarding EEXIST
Follow-up for 2c2ed3272b

As explained in the referenced commit, we shall never get EEXIST
in the first place.
2024-08-04 06:51:28 +02:00
Mike Yuan 6a6e8b79cc
core/exec-credential: trivial coding style cleanup 2024-08-04 06:51:28 +02:00
Mike Yuan 9db676d6bf
core/dbus-execute: normalize "rename" arg properly
Follow-up for 40dd2a1c24

Addresses https://github.com/systemd/systemd/pull/33916#discussion_r1702616229
2024-08-04 06:51:25 +02:00
Marin Kresic f4911e6bda po: Translated using Weblate (Croatian)
Currently translated at 82.8% (193 of 233 strings)

Co-authored-by: Marin Kresic <marinjurekresic@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/hr/
Translation: systemd/main
2024-08-04 13:28:56 +09:00
Dimitrys Meliates f4e5d6a050 po: Translated using Weblate (Greek)
Currently translated at 37.7% (88 of 233 strings)

Co-authored-by: Dimitrys Meliates <demetresmeliates+fedora@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main
2024-08-04 13:28:56 +09:00
Luca Boccassi b75c13731e base-filesystem: do not attempt to create a /lib64 -> /usr/lib/<tuple> symlink
In multi-arch distributions (debian and derivatives) multiarch tuples under
/usr/lib are used, such as /usr/lib/x86_64-linux-gnu/ but the /lib64 symlink
should never point there, it should always point to /usr/lib64, as that's
how they are set up by distribution-specific tools.

https://packages.debian.org/bookworm/amd64/libc6-i386/filelist
https://packages.debian.org/bookworm/mipsel/libc6-mips64/filelist
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L295
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L517
http://bugs.debian.org/1076491

Fixes https://github.com/systemd/systemd/issues/33919
2024-08-04 10:03:55 +09:00
Daan De Meyer ad723ca3e5 meson: Use -fstrict-flex-arrays=3
Let's explicitly pass the value to -fstrict-flex-arrays. This does
not change behavior but it does (selfishly) make my error not bug
out with an error saying -fstrict-flex-arrays does not exist.
2024-08-04 09:55:45 +09:00
Nova840 1392b9fad2
hwdb: fix auto rotate on Asus Q551LB (#33921) 2024-08-04 09:38:40 +09:00
Mike Yuan ce31dbf445 core/service: drop redundant flush_n_restarts indicator
Now that we track auto-restarts with a dedicated state,
there's no need for a separate variable for this.

I also took the chance to reorder some struct members.
2024-08-04 09:37:59 +09:00
Yu Watanabe cec96f12ff
Merge pull request #33925 from YHNdnzj/exec-serialize-path-escape
core/execute-serialize: two fixes
2024-08-04 09:35:51 +09:00
Mike Yuan 9be46b1da8
core/execute-serialize: use serialize_item_escaped() for external paths
Otherwise, read_stripped_line() would spuriously drop trailing spaces.

Fixes #33924
2024-08-03 22:49:59 +02:00
Mike Yuan f0fdd13c2f
core/execute-serialize: drop extraneous '=' in ip-{in,e}gress serialization 2024-08-03 22:39:44 +02:00
Mike Yuan 1391f149f0 core/service: actually allow to "hurry up" auto restarts
unit_start() advertises that start requests don't get suppressed,
so that it could be used to manually speed up auto restarts.
However, service_start() so far rejected this, stating that
clients should issue restart request in order to trigger
BindsTo=/OnFailure=.

That seems to be a red herring though, because for a long time
the service states between auto-restarts were buggy (#27594).
With the introduction of RestartMode=direct, the behavior
is sane again and customizable, hence I see no reason to refuse
this anymore. Whether those deps are triggered solely depends
on RestartMode= now.

Plus, filter out some intermediate states that should never
be seen in service_start().

Fixes #33890
2024-08-03 13:03:28 +02:00
Daan De Meyer 21e9fcf97f
Merge pull request #33916 from yuwata/import-creds-follow-ups
core: several follow-ups for ImportCreds=
2024-08-03 10:04:55 +02:00
Yu Watanabe 74d1ee0373 core: refuse credentials with invalid names matching with glob
Even if the glob pattern is valid, the pattern may match credentials
with invalid names. So, we need to check the names of the found
credentials.

Follow-up for 947c4d3952.
2024-08-03 14:25:35 +09:00
Yu Watanabe b376dbc83d test: a credential can be imported multiple times with different names
This is supported since 831f208783.
Let's explicitly test the functionality.
2024-08-03 14:23:17 +09:00
Yu Watanabe 40dd2a1c24 core: make ImportCredentialEx= DBus property support without renaming
Note that the conf parser for ImportCredential= checks in the same way.

Follow-up for 831f208783.
2024-08-03 14:20:07 +09:00
Yu Watanabe e0fc14a456 creds-util: fix typo
Follow-up for 947c4d3952.
2024-08-03 13:34:02 +09:00
Yu Watanabe 564547d295
Merge pull request #33911 from YHNdnzj/cgroup-setup-cleanup
cgroup-setup/util: several cleanups; make use of cgroup.kill on client request
2024-08-03 06:20:02 +09:00
Yu Watanabe 1c0130e8dc man/net-naming-scheme: mention that NAMING_BRIDGE_MULTIFUNCTION_SLOT is reverted
Follow-up for af7417ac7b.
Closes #33596.
2024-08-03 05:58:15 +09:00
Yu Watanabe 347c8822d1 man: extend explanation for ConfigureWithoutCarrier= in systemd.network(5)
Prompted by #33702.
2024-08-03 05:57:55 +09:00
Yu Watanabe 6b8e373ce8 vmspawn: fix typo
Follow-up for 862c68a914.
2024-08-03 05:56:11 +09:00
Yu Watanabe bb35a47de2 ukify: fix typo
Follow-up for 987f4bce93.
2024-08-03 05:55:05 +09:00
Yu Watanabe 2d6df0db7d udevadm: fix typo
Follow-up for 0e789e6d48.
2024-08-03 05:54:11 +09:00
Yu Watanabe 7033574293 import: fix typo
Follow-up for 17a6043a14.
2024-08-03 05:53:08 +09:00
Yu Watanabe fea380f3b4 login: fix typo
Follow-up for 0e10c3d872.
2024-08-03 05:51:58 +09:00
Yu Watanabe af7b3851ea core/execute: fix typo
Follow-up for 628c214656.
2024-08-03 05:50:50 +09:00
Yu Watanabe eb8072ee48 boot: fix typo
Follow-up for dcac1e4a9b.
2024-08-03 05:49:53 +09:00
Yu Watanabe ec4964692a cgroup-util: fix typo
Follow-up for 0fbb569de1.
2024-08-03 05:48:54 +09:00
Yu Watanabe f38aac5e01 mkosi: fix typo
Follow-up for 7205fc7dc3.
2024-08-03 05:47:55 +09:00
Yu Watanabe b8db3cc373 man: fix typo
Follow-up for 7102dc52e6 and 3d689b675b.
2024-08-03 05:46:51 +09:00
Yu Watanabe 2bb72aadb8 man/net-naming-scheme: add missing period
Follow-up for 0a4ecc54cb.
2024-08-03 05:36:12 +09:00
Yu Watanabe c7d9925396
Merge pull request #33913 from berrange/cvm-s390x
Add detection of confidential virtualization on s390x architcture
2024-08-03 05:32:39 +09:00
Mike Yuan 3a497fbff5 advanced-issue-labeler: use correct label for env-generator 2024-08-02 21:45:18 +02:00
Daniel P. Berrangé a8fb5d21fd man/systemd-detect-virt: list known CVM technologies
Add a section which lists the known confidential virtual machine
technologies.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:55:03 +01:00
Daniel P. Berrangé 9ffdfc67c6 man/systemd-detect-virt: fix row spanning for VM header
This fixes

  commit 9b0688f491
  Author: Yu Watanabe <watanabe.yu+github@gmail.com>
  Date:   Tue Jan 9 10:52:49 2024 +0900

    virt: add Google Compute Engine support

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:55:03 +01:00
Daniel P. Berrangé 6c35e0a51c confidential-virt: add detection for s390x target
The s390x platform provides confidential VMs using the "Secure Execution"
technology, which is also referred to as "Protected Virtualization" or
just "prot virt" in Linux / QEMU.

This can be detected through a simple sysfs attribute.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:53:20 +01:00
jauge-technica 82f2a2f032
Added support for L2 BridgeMDB entries (#32894)
* Added support for L2 BridgeMDB entries
2024-08-02 16:31:20 +01:00
Daniel P. Berrangé 1c4bd7adcc confidential-virt: split caching of CVM detection into separate method
We have different impls of detect_confidential_virtualization per
architecture. The detection is cached in the x86_64 impl, and as we
add support for more targets, we want to use caching for all. It thus
makes sense to split caching out into an architecture independent
method.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:26:00 +01:00
Frantisek Sumsal 4d1fbe53c1 test: don't use /skipped for subtests
Since, at least the old framework, checks for the presence of the file
at the end and marks the whole test as skipped if it exists.

Resolves: systemd/systemd-centos-ci#728
2024-08-02 16:44:25 +02:00
Mike Yuan ba16a93db4
core/unit: utilize cgroup.kill on client request + SIGKILL 2024-08-02 16:36:09 +02:00
Mike Yuan 2176841b9e
cgroup-util: clean up cg_kill() and friends, completely split out cg_kill_kernel_sigkill()
cg_kill_kernel_sigkill() has a narrow use case, and currently
no code really reaches that branch. Let's detach it from
cg_kill_recursive() hence, and call it explicitly later
where appropriate.
2024-08-02 16:36:09 +02:00
Mike Yuan 5ffa9490d6
core/unit: modernize log_kill() too 2024-08-02 16:36:09 +02:00
Mike Yuan 95e631da43
core/unit: unexport cg_kill log funcs, rather take in bool
It seems unnecessary to duplicate the func ptrs everywhere.
2024-08-02 16:36:08 +02:00
Mike Yuan 031860d6cb
cgroup-util: drop unused cg_rmdir()
When removing a cgroup, we always want to eliminate subcgroups
first, i.e. use cg_trim(). And cg_rmdir() (along with
CGROUP_REMOVE flag) is simply unused. Kill it.
2024-08-02 16:36:08 +02:00
Mike Yuan 1daf575990
cgroup-util: refactor cg_{ns,freezer,kill}_supported 2024-08-02 16:36:08 +02:00
Mike Yuan 6e6d305573
cgroup-setup: kernel threads can reside in arbitrary cgroups
Realistically this doesn't matter, as cg_migrate() is only
used to populate init.scope. But it's probably better to
make things clear.
2024-08-02 16:36:08 +02:00
Mike Yuan e563c4213e
cgroup-setup: drop unneeded O_RDONLY when O_DIRECTORY 2024-08-02 16:36:07 +02:00
Mike Yuan 8b7191aee4
cgroup-setup: use fchownat() + AT_EMPTY_PATH where appropriate
This already existed long before our kernel baseline.
While at it, switch to RET_GATHER().
2024-08-02 16:36:07 +02:00
Mike Yuan 279c5a343f
cgroup-setup: minor cleanups 2024-08-02 16:36:07 +02:00
Mike Yuan ea25672de5
cgroup-setup: move cg_{,un}install_release_agent from cgroup-util
They're pid1-specific, so move them out of basic/.
2024-08-02 16:36:07 +02:00
Mike Yuan d1397fb50c
cgroup-setup: group v1-specific functions 2024-08-02 14:47:39 +02:00
Mike Yuan 3386f66200
cgroup-setup: drop unused cg_migrate_callback for cg_attach_everywhere()
While at it, move the typedef from cgroup-util to -setup.
2024-08-02 14:47:39 +02:00
Yu Watanabe 40d90c9c01 localectl: introduce -l/--full option
Closes #33906.
2024-08-02 09:33:46 +02:00
Yu Watanabe 44557e03d8
Merge pull request #33032 from yuwata/sd-device-monitor-low-level-api
sd-device-monitor: expose low-level functions
2024-08-02 12:41:53 +09:00
Yu Watanabe 76459af531
Merge pull request #33876 from dbnicholson/firstboot-root-creds-only
firstboot: fix root params with creds and prompting disabled
2024-08-02 11:37:05 +09:00
Ronan Pigott ddd710a355 resolved: don't treat conn reset as packet loss
tcp reset / icmp port-unreachable are markedly different conditions than
packet loss. It doesn't make much sense to retry in this case. It's
actually not clear if there is any benefit at all retrying tcp
connections, which were presumably already retried as necessary by the
tcp stack.
2024-08-02 11:29:25 +09:00
Yu Watanabe 0bc6fde08a test: add test case for restarting device monitor 2024-08-02 11:22:24 +09:00
Yu Watanabe 9d37cf28a3 sd-device-monitor: rename device_monitor_send_device() -> device_monitor_send() 2024-08-02 11:22:24 +09:00
Yu Watanabe bab889c51e sd-device-monitor: expose low-level functions
To make it work without sd-event.

Prompted by recent chat:
> Hey all!
> reading man libudev, it says to use sd-device instead now. I've read that
> APIs header file and it seems it no longer has an equivalent to libudev's
> udev_monitor_get_fd, which AFAICT means I have to use sd-event to watch
> for events I'm interested in. I know I can "embed" sd-event in other event
> loops I might already have, but that seems overkill when I'm only interested
> in this one type of event and don't need sd-event for anything else.
2024-08-02 11:22:24 +09:00
Yu Watanabe d3fa16131e sd-device-monitor: make device_monitor_receive_device() always initialize ret on success 2024-08-02 11:22:07 +09:00
Yu Watanabe 67825de267 sd-device-monitor: remove device_monitor_disconnect()
It is not necessary to be exposed anymore.
2024-08-02 11:16:33 +09:00
Yu Watanabe 98ca8eac11 udev: manage only socket address of device monitor
Previously, the main process of systemd-udevd manages worker process
with their sd_device_monitor object to save the destination address.
Let's save only destination address, and drop worker's sd_device_monitor
object.
2024-08-02 11:16:33 +09:00
Yu Watanabe 7abc0201d0 sd-device-monitor: introduce device_monitor_get_address()
Currently it is used internally, but will be used later at other places.
2024-08-02 11:16:33 +09:00
Yu Watanabe 1f267e77ed sd-device: allow to restart device monitor
Previously, sd_device_monitor_stop() closes socket, hence we cannot
restart monitoring unless recreating sd_device_monitor object.
Let's allow to restart monitor by sd_device_monitor_start().
2024-08-02 11:16:33 +09:00
Yu Watanabe ece1e280ee sd-device-monitor: introduce sd_device_monitor_is_running() 2024-08-02 11:16:33 +09:00
Yu Watanabe f49faf0562 sd-device-monitor: bind socket in device_monitor_new_full()
Previously, device_monitor_enable_receiving() does
- update filter,
- bind socket.

But, binding socket can be done in when the socket is opened.
Let's remove device_monitor_enable_receiving() and bind the socket in
device_monitor_new_full().
2024-08-02 11:16:33 +09:00
Yu Watanabe bf1283c1fb sd-device-monitor: replace -1 with -EBADF 2024-08-02 11:16:33 +09:00
Yu Watanabe 0403221a2a test: modernize test-sd-device-monitor.c 2024-08-02 11:16:33 +09:00
Yu Watanabe 029709f932 socket-util: introduce netlink_socket_get_multicast_groups()
No functional change. Preparation for later commits.
2024-08-02 11:16:33 +09:00
Luca Boccassi b51b12af8d
Merge pull request #33904 from bluca/os_release_type
os-release: change RELEASE_TYPE value from 'pre-release' to 'development' and break into paragraphs
2024-08-01 23:29:37 +02:00
Luca Boccassi 3d689b675b os-release: break RELEASE_TYPE into paragraphs and clarify about rolling stable releases
Arch and Tumbleweed do not do EOLs but are still stable, so clarify the paragraph.
Also break the entry in paragraphs, to make it more readable when rendered.
2024-08-01 20:59:20 +01:00
Luca Boccassi 67f90b0d85 os-release: change RELEASE_TYPE value from 'pre-release' to 'development'
The point was made on https://lists.debian.org/debian-ctte/2024/08/msg00005.html
that 'pre-release sounds' like an RC candidate, ie, something that will change
very slightly in the released version. But this is not necessarily the case
for example at the beginnig of a Fedora Rawhide or Debian Testing release cycle,
so change it to a more generic 'development'

Follow-up for 7102dc52e6
2024-08-01 20:36:02 +01:00
Luca Boccassi 62bfb79b61
Merge pull request #33893 from yuwata/coverity
tree-wide: resolve several issues found by coverity
2024-08-01 20:33:53 +02:00
Luca Boccassi 98c2cb186b
Merge pull request #32988 from AdrianVovk/os-release-prerelease
os-release: Add RELEASE_TYPE=
2024-08-01 18:56:15 +02:00
Adrian Vovk d25a9bfa8f os-release: Introduce experiment RELEASE_TYPE
This is for experimental builds of the OS made to test some specific WIP
feature.

For example, let's say the distro in question is Asahi Linux and Apple
just released the M3 SoC. The Asahi developers will start porting to the
M3, and will quickly generate builds of Asahi Linux that can technically
boot but aren't ready for any kind of daily use. These images are marked
as experimental, and can be shared among the developers. If a user
somehow stumbles upon one of these images and tries to install it,
they'll be warned that they're about to install an experimental Apple M3
port of Asahi Linux. Eventually, once the Asahi developers think that
their M3 port is ready for a wider audience, they can merge it into the
mainline Asahi repos, where it will be distributed through the usual
nightly CI builds (where RELEASE_TYPE=pre-release; M3 support is no
longer experimental).
2024-08-01 17:22:23 +01:00
Adrian Vovk 7102dc52e6 os-release: Add RELEASE_TYPE=
This will allow GUIs to customize their behavior a little based on the
type of release.

For example, an OS installer may display a warning/disclaimer if
RELEASE_TYPE=prerelease. The software updates app might be a bit more
insistent about upgrading to the next major release if
RELEASE_TYPE=stable than if RELEASE_TYPE=lts
2024-08-01 17:22:13 +01:00
Yu Watanabe f7012a93a7 import: check overflow
Fixes CID#1548022 and CID#1548075.
2024-08-01 22:45:53 +09:00
Yu Watanabe fea2f92d8d test: use ASSERT_OK_ERRNO() for setenv() and unsetenv() 2024-08-01 22:42:08 +09:00
Yu Watanabe 6141fe925a test: resolve "Unchecked return value" coverity warning
Follow-up for c8210d98a4.
Fixes CID#1548920.
2024-08-01 22:42:08 +09:00
Yu Watanabe a30ac8d52c vmspawn: check overflow earlier
Follow-up for 862c68a914.
Fixes CID#1550749.
2024-08-01 22:42:08 +09:00
Yu Watanabe 96bf7e1f3b test: resolve "Unchecked return value" coverity warning
Follow-up for 5fef5552a6.
Fixes CID#1558540.
2024-08-01 22:42:08 +09:00
Yu Watanabe dc7607f687 test: resolve "Unchecked return value" coverity warning
Follow-up for 8c57700b6b.
Fixes CID#1558539.
2024-08-01 22:42:08 +09:00
Frantisek Sumsal ce2344bbee test: attempt to install sshd-session from multiple places
On Fedora the sshd-session binary is under /usr/libexec/openssh/ so
cover this path as well in the old framework.

Follow-up for aaa7b36bd1.
2024-08-01 15:02:34 +02:00
dependabot[bot] 89322b8c09 build(deps): bump github/codeql-action from 3.25.11 to 3.25.15
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...afb54ba388)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:36:40 +02:00
dependabot[bot] 73eb21703e build(deps): bump meson from 1.4.1 to 1.5.1 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.4.1 to 1.5.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.4.1...1.5.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:34:28 +02:00
dependabot[bot] 5186b40c6f build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 4eba736412c702bbbe2c6d4a58a92fa977219249 to 63fc1fde5b1aac1abf07ac499068c2b62263dafb.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](4eba736412...63fc1fde5b)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:34:09 +02:00
dependabot[bot] 1d8de1d5ac build(deps): bump redhat-plumbers-in-action/differential-shellcheck
Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](60c9f2b924...cc6721c45a)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:09:16 +02:00
dependabot[bot] e2dca8d9c0 build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:08:42 +02:00
Yu Watanabe a8bc75089d journalctl: fix compile error on i386
Fixes the following error:
===
In file included from ../src/basic/macro.h:13,
                 from ../src/basic/dirent-util.h:8,
                 from ../src/journal/journalctl-misc.c:3:
../src/journal/journalctl-misc.c: In function 'show_log_ids':
../src/journal/journalctl-misc.c:107:22: error: comparison is always true due to limited range of data type [-Werror=type-limits]
  107 |         assert(n_ids < INT64_MAX);
      |                      ^
../src/fundamental/macro-fundamental.h:70:44: note: in definition of macro '_unlikely_'
   70 | #define _unlikely_(x) (__builtin_expect(!!(x), 0))
      |                                            ^
../src/basic/macro.h:165:22: note: in expansion of macro 'assert_message_se'
  165 | #define assert(expr) assert_message_se(expr, #expr)
      |                      ^~~~~~~~~~~~~~~~~
../src/journal/journalctl-misc.c:107:9: note: in expansion of macro 'assert'
  107 |         assert(n_ids < INT64_MAX);
      |         ^~~~~~
cc1: all warnings being treated as errors
===

Follow-up for 0a8c1f6212.
2024-08-01 10:49:40 +02:00
Yu Watanabe 12a12c5af5
Merge pull request #33888 from YHNdnzj/followups
core: a few follow-ups for recent PRs
2024-08-01 11:35:13 +09:00
Yu Watanabe 89cf6f0b0a
Merge pull request #32448 from yuwata/journalctl-current-invocation
journalctl: introduce --list-invocations, -I, --invocation= options
2024-08-01 11:33:20 +09:00
Yu Watanabe b1b30d0226 test: add test for journalctl --list-invocations and --invocation= 2024-08-01 07:31:44 +09:00
Yu Watanabe 7d3ae6b213 journalctl: add --list-invocations command and -I/--invocation options
The --list-invocations command is similar to --list-boots, but shows
invocation IDs of specified unit. This should be useful when showing
a specific invocation of a unit.

The --invocation option is similar to --boot, but takes a invocation ID
or an offset. The -I option is equivalent to --invocation=0.
2024-08-01 07:31:44 +09:00
Yu Watanabe 82721be7d6 logs-show: extend journal_get_boots() and friends to find invocation IDs
Currently the extended features are not used, but will be used later.
2024-08-01 07:31:44 +09:00
Yu Watanabe 1a997cb732 logs-show: introduce several helper functions
Currently these are not used, but will be used later.
2024-08-01 07:31:44 +09:00
Yu Watanabe 0a8c1f6212 use int64_t for index in show_log_ids() 2024-08-01 07:31:44 +09:00
Yu Watanabe b3a16f3985 journalctl: split out show_log_ids() from action_list_boots()
No functional change, just refactoring and prepraration for later change.
2024-08-01 07:31:44 +09:00
Yu Watanabe a581a2ce8d journalctl: update log messages 2024-08-01 07:31:44 +09:00
Yu Watanabe 6ecee6cf2b logs-show: rename BootId -> LogId
The struct itself is generic, and can be used for other ID.
Let's rename it to more generic one.
No functional change, just refactoring and preparation for later
commits.
2024-08-01 07:31:44 +09:00
Mike Yuan 4c523d62d2
core/socket: stop hardcoding every service inactive state
History (c068650fcf,
941a12dcba) has proven
that we're not good at keeping socket and service states
in sync. Instead, let's query the high-level unit_active_state()
first, and only hardcode the two special auto-restart
service states.

Additionally, allow returning to listening state on SERVICE_CLEANING.
2024-07-31 21:56:28 +02:00
Mike Yuan 067c91fcb8
core/cgroup: use UNIT_IS_INACTIVE_OR_FAILED where appropriate 2024-07-31 21:40:28 +02:00
Mike Yuan 8574b7940b
core/unit: merge use of LOG_CONTEXT_SET_LOG_LEVEL into LOG_CONTEXT_PUSH_UNIT
No functional change, since LOG_CONTEXT_PUSH_UNIT is only used
in exec_spawn().
2024-07-31 21:40:28 +02:00
Mike Yuan c4c416b109
core: clean up ambient capability logging
Follow-up for e0ebc81b2d
2024-07-31 21:40:28 +02:00
Daan De Meyer 3a5d72d8a3
Merge pull request #33886 from DaanDeMeyer/autologin
Two mkosi improvements
2024-07-31 20:21:12 +02:00
Daan De Meyer ff5662129a
Merge pull request #33885 from DaanDeMeyer/pidref-kthread
Two pidfd fixes
2024-07-31 19:07:35 +02:00
Daan De Meyer 3fe25d4530 mkosi: Beef up testuser a bit
Give it a password and add it to some common groups.
2024-07-31 18:32:53 +02:00
Daan De Meyer b3db96f230 mkosi: Switch to autologin via credentials
Let's use the newly added credentials to only enable autologin for
/dev/console (systemd-nspawn) and /dev/hvc0 (qemu) instead of enabling
autologin for every tty.
2024-07-31 17:38:12 +02:00
Daan De Meyer e54a8e0fc3
Merge pull request #33873 from DaanDeMeyer/rename-creds
core: Add support for renaming credentials with ImportCredential=
2024-07-31 17:35:58 +02:00
Michal Sekletar 941a12dcba socket: fix socket activation of stopped services with pinned FD store 2024-07-31 16:29:07 +02:00
Luca Boccassi 0e5c97ae6f
Merge pull request #32937 from steelman/github/drop-ambient-caps-executor
core: drop ambient capabilities in systemd-executor
2024-07-31 16:11:30 +02:00
Daan De Meyer e97429902d units: Import tty specific credentials for each getty unit
As explained in the previous commit, this allows us to configure
agetty and login for individual ttys instead of globally.
2024-07-31 15:52:29 +02:00
Daan De Meyer 831f208783 core: Add support for renaming credentials with ImportCredential=
This allows for "per-instance" credentials for units. The use case
is best explained with an example. Currently all our getty units
have the following stanzas in their unit file:

"""
ImportCredential=agetty.*
ImportCredential=login.*
"""

This means that setting agetty.autologin=root as a system credential
will make every instance of our all our getty units autologin as the
root user. This prevents us from doing autologin on /dev/hvc0 while
still requiring manual login on all other ttys.

To solve the issue, we introduce support for renaming credentials with
ImportCredential=. This will allow us to add the following to e.g.
serial-getty@.service:

"""
ImportCredential=tty.serial.%I.agetty.*:agetty.
ImportCredential=tty.serial.%I.login.*:login.
"""

which for serial-getty@hvc0.service will make the service manager read
all credentials of the form "tty.serial.hvc0.agetty.xxx" and pass them
to the service in the form "agetty.xxx" (same goes for login). We can
apply the same to each of the getty units to allow setting agetty and
login credentials for individual ttys instead of globally.
2024-07-31 15:52:27 +02:00
Daan De Meyer 3de13e6148 exec-credential: Skip duplicate credentials in load_credential_glob()
We document that when multiple credentials of the same name are found,
we use the first one found so let's actually implement that behavior.
2024-07-31 15:23:45 +02:00
Daan De Meyer 590348e2bf exec-credential: Log if we skip duplicate credential 2024-07-31 15:23:45 +02:00
Daan De Meyer 2c2ed3272b Drop EEXIST handling in load_credential_glob()
Credentials are written to a temporary file and renamed to the
destination with renameat() which will replace existing files so
EEXIST should not happen so drop the handling for EEXIST.
2024-07-31 15:23:45 +02:00
Daan De Meyer 5551426785
Merge pull request #33884 from DaanDeMeyer/log-context
log: Fix size calculation for number of iovecs
2024-07-31 14:23:08 +02:00
Daan De Meyer ead48ec35c cgroup-util: Don't try to open pidfd for kernel threads
The kernel might start returning -EINVAL when trying to open pidfd's
for kernel threads so let's not try to open pidfd's for kernel threads.
2024-07-31 13:50:16 +02:00
Daan De Meyer 9ce964d55b
Merge pull request #33882 from bluca/efi_proto_fallback_memory
stub: allocate and zero enough space in legacy x86 handover protocol
2024-07-31 13:46:41 +02:00
Daan De Meyer fc83ff3f55 log: Fix size calculation for number of iovecs
Each log context field can expand to up to three iovecs (key, value
and newline) so let's fix the size calculation to take this into
account.
2024-07-31 13:12:55 +02:00
Daan De Meyer 7881f485c9 execute: Drop log level to unit log level in exec_spawn()
All messages logged from exec_spawn() are attributed to the unit
and as such we should set the log level to the unit's max log level
for the duration of the function.
2024-07-31 13:12:55 +02:00
Dan Nicholson 35bc4c3424 firstboot: fix root params with creds and prompting disabled
Remove an early return that prevents --prompt-root-password or
--prompt-root-shell and systemd.firstboot=off using credentials. In that case,
arg_prompt_root_password and arg_prompt_root_shell will be false, but the
prompt helpers still need to be called to read the credentials. Furthermore, if
only the root shell has been set, don't overwrite the root password.
2024-07-31 04:02:43 -06:00
Dan Nicholson 2319154a6b firstboot: handle missing root password entries
If /etc/passwd and/or /etc/shadow exist but don't have an existing root entry,
one needs to be added. Previously this only worked if the files didn't exist.
2024-07-31 04:02:39 -06:00
Łukasz Stelmach 18d51ec876 Revert "execute: Call capability_ambient_set_apply even if ambient set is 0"
With ambient capabilities being dropped at the start of process managers
(both system and user) as well as systemd-executor it isn't necessary
to drop them here. Moreover, at this point also the inheritable set can
be preserved. This makes it possible to assign a user session manager
inheritable capabilities which combined with file capabilites (ei sets)
of service executables enable running user services with capabilities
but only when started by the manager.

This reverts commit 943800f4e7.
2024-07-31 11:09:58 +02:00
Łukasz Stelmach e0ebc81b2d core: drop ambient capabilities in systemd-executor
Since the commit 963b6b906e ("core: drop ambient capabilities in
user manager") systemd running as the session manager has dropped ambient
capabilities retaining other sets allowing user services to be started
with elevated capabilities. This, worked fine until the introduction of
sd-executor. For a non-root process to be started with elevated
capabilities by a non-root parent it either needs file capabilities or
ambient capabilities in the parent process. Thus, systemd needs to allow
sd-executor to inherit its ambient capabilities and sd-executor should
drop them as systemd did before.

The ambient set is managed for both system and session managers, but
with the default set for PID#1 being empty, this code does not affect
operation of PID#1.

Fixes: bb5232b6a3 ("core: add systemd-executor binary")
2024-07-31 11:09:58 +02:00
Yu Watanabe 175cdefd33 man: suggest to enable global IPv6Forwarding= setting to make IPv6 packets forwarded
Closes #33414.
2024-07-31 09:53:18 +02:00
Dan Nicholson 5088de9daa firstboot: create locked and empty root passwords consistently
Although locked and empty passwords in /etc/passwd are treated the same, in all
other cases the entry is configured to read the password from /etc/shadow.
2024-07-31 00:40:56 -06:00
Dan Nicholson 38688bbc8f test: extend firstboot testing
Several features were not being tested or weren't being evaluated thoroughly.
2024-07-31 00:40:56 -06:00
Yu Watanabe acda1b3f2a NEWS: mention that udevadm test and test-builtin are now non-destructive
Follow-up for 089bef6631.
Prompted by https://github.com/systemd/systemd/issues/33619#issuecomment-2257576579.
2024-07-31 10:06:25 +09:00
Yu Watanabe dd87ad8e19 network: mention that IPv4 ACD is enabled by default for 169.254.0.0/16
Prompted by #33824.
2024-07-31 10:06:25 +09:00
Yu Watanabe e2becab085 network: request non-NULL SSID when a wlan interface is configured as station
To avoid conflicts with user .network file for the wlan interface with Bond=.
See https://github.com/systemd/systemd/issues/19832#issuecomment-857661200.
2024-07-31 10:06:04 +09:00
Yu Watanabe 6d0cdbe0bc
Merge pull request #33878 from yuwata/network-bind-carrier
network: several cleanups for BindCarrier= setting
2024-07-31 10:05:43 +09:00
Yu Watanabe 356f25ab85
Merge pull request #33875 from yuwata/network-link-get-address
network: several fixlets related to link_get_address()
2024-07-31 10:05:11 +09:00
Luca Boccassi 4d6ab7e844 efi: fix link to legacy EFI handover protocol 2024-07-31 01:46:58 +01:00
Luca Boccassi 19812661f1 stub: allocate and zero enough space in legacy x86 handover protocol
A PE image's memory footprint might be larger than its file size due
to uninitialized memory sections. Normally all PE headers should be
parsed to check the actual required size, but the legacy EFI handover
protocol is only used for x86 Linux bzImages, so we know only the last
section will require extra memory. Use SizeOfImage from the PE header
and if it is larger than the file size, allocate and zero extra memory
before using it.

Fixes https://github.com/systemd/systemd/issues/33816
2024-07-31 01:46:25 +01:00
Yu Watanabe ba7c4bd6f2 network: shorten code a bit 2024-07-31 06:47:33 +09:00
Yu Watanabe 36b8ad085c network: call link_handle_bound_by_list() before trying to reconfigure interface
Otherwise, when an interface gained its carrier, the interface may not
have matching .network file yet, then link_reconfigure_impl() returns
zero, and link_handle_bound_by_list() is skipped.

Fixes #33837.
2024-07-31 06:47:11 +09:00
Ivan Shapovalov 7767896d12 Revert "network/ndisc: ignore most fields of RA header when lifetime is zero"
This reverts commit ffef01acdd.

Similar to 2d393b1b6d ("network: IPv6 Compliance: Router Advertisement
Processing, Reachable Time [v6LC.2.2.15]"),

Extract from: https://www.ietf.org/rfc/rfc4861.html#section-4.2, p.21,
first paragraph:

    The Router Lifetime applies only to
    the router's usefulness as a default router; it
    does not apply to information contained in other
    message fields or options.

So it does not make sense to prevent DHCPv6 when Router Lifetime is 0.

Fixes #33357.
2024-07-30 22:42:56 +02:00
Daniel P. Berrangé 9d7be044ca Fix detection of TDX confidential VM on Azure platform
The original CVM detection logic for TDX assumes that the guest can see
the standard TDX CPUID leaf. This was true in Azure when this code was
originally written, however, current Azure now blocks that leaf in the
paravisor. Instead it is required to use the same Azure specific CPUID
leaf that is used for SEV-SNP detection, which reports the VM isolation
type.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-07-30 22:39:20 +02:00
Yu Watanabe f320c0777a test-network: add test case for preferred source with peer
For issue #31950.
2024-07-31 05:36:14 +09:00
Yu Watanabe 56f91e2d0b network: make link_get_address() provide matching address with peer
As all callers do not care if the address has peer address.
This also drops prefixlen argument as it is always zero.

Fixes a bug introduced by 42f8b6a808.
Fixes #31950.
2024-07-31 05:36:14 +09:00
Yu Watanabe d9ef1cc407 network/ipv4acd: manage ACD engines with Address object
IPv4 addresses are managed with local and peer addresses and prefix
length. So, potentially, the same address with different prefix length
can be assigned on a link, e.g. 192.168.0.1/24 and 192.168.0.1/26.
If one of the address is configured with ACD but the other is not,
then previously ACD might be unexpectedly disabled or enabled on them,
as we managed ACD engines with only local addresses.

This makes ACD engines managed with the corresponding Address objects.
2024-07-31 05:35:20 +09:00
Yu Watanabe e8eaed0240 network: do not bring down bound interfaces immediately
Even if a timespan specified to IgnoreCarrierLoss= for an interface,
when the carrier of the interface lost, bound interfaces might be bring
down immediately.

Let's also postpone bringing down bound interfaces with the specified
timespan.
2024-07-31 05:27:19 +09:00
Arian van Putten a55d1b29a4
document how TimeoutStartSec= affects notify-reload (#33653)
* document how TimeoutStartSec=  affects notify-reload
2024-07-30 12:35:52 +01:00
Yu Watanabe 1bfa47418e nspawn: remove macvlan interfaces before network namespace died
This is similar to what we do for veth interfaces in remove_veth_links().

When a container rebooted, macvlan interfaces created by the previous
boot may still exist in the kernel, and that causes -EADDRINUSE after
reboot.

Hopefully fixes #680.
2024-07-30 12:38:50 +02:00
Daan De Meyer 0fbb569de1 cgroup-util: Ignore kernel threads in cg_kill_items()
Similar to the implementation of cgroup.kill in the kernel, let's
skip kernel threads in cg_kill_items() as trying to kill kernel
threads as an unprivileged process will fail with EPERM and doesn't
do anything when running privileged.
2024-07-30 11:53:32 +02:00
Daan De Meyer b56920e36c kernel-install: Try some more initrd variants in 90-loaderentry.install
On CentOS/Fedora, dracut is configured to write the initrd to
/boot/initramfs-$KERNEL_VERSION...img so let's check for that as well
if no initrds were supplied.
2024-07-29 18:57:43 +02:00
Daan De Meyer 35c01ec59e kernel-install: Only read cmdline from /proc/cmdline when not in container
If we're running from within a container, we're very likely not going
to want to use the kernel command line from /proc/cmdline, so let's add
a check to see if we're running from a container to decide whether we'll
use the kernel command line from /proc/cmdline.
2024-07-29 18:56:30 +02:00
Daan De Meyer 7fe0ea2ead
Merge pull request #33857 from DaanDeMeyer/mkosi
Two small improvements
2024-07-29 15:40:48 +02:00
Daan De Meyer ecfdecfd6a docs: Simplify hacking instructions a bit
We enable RuntimeBuildSources=yes by default so let's drop it from
the documentation.
2024-07-29 13:42:28 +02:00
Daan De Meyer 578ee05155 test: Don't mount build sources into image when running non-interactively 2024-07-29 13:40:42 +02:00
Martin Srebotnjak be2ad93af3 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-29 10:16:40 +01:00
Luca Boccassi 0fa53f5dd7
Merge pull request #33853 from NickCao/l3mdev
network: Fixup Table when L3MasterDevice is set on routing policy rule
2024-07-29 10:15:52 +01:00
Nick Cao 615af2c77d
network: Fixup Table when L3MasterDevice is set on routing policy rule 2024-07-28 14:02:07 -04:00
Nick Cao 034b7dfc08
man: network: move note about L3MasterDevice to the correct section 2024-07-28 13:51:36 -04:00
Vladimir Panteleev 3f24fa57df man: clarify systemd-path variable source 2024-07-28 10:33:49 +01:00
Vladimir Panteleev 6c1e0823b0 man: improve ManagerEnvironment documentation
- Improve wording for explanation when these variables are inherited

- Clarify that these variables are not placed in the process environment block,
  so /proc/PID/environ cannot be used as a debugging tool
2024-07-28 10:33:17 +01:00
Luca Boccassi 0462e902bf
Merge pull request #33848 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-07-27 11:27:29 +01:00
Weblate Translation Memory 7f8b46724f po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-26 16:38:49 +02:00
Martin Srebotnjak 3607e0cf52 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-26 16:38:49 +02:00
Jose Ignacio Tornos Martinez eef4cd51f9 kernel-install: remove depmod generated file modules.weakdep
The new file, modules.weakdep, generated by depmod to get the weak
dpendencies information can be present
(05828b4a6e),
so remove it like the other similar files.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-07-26 14:02:14 +01:00
Luca Boccassi 85c7a9a2f5
Merge pull request #27855 from Werkov/test-delegate-useraddfixup
Delegate/cgroup test refactor
2024-07-26 14:01:38 +01:00
Zbigniew Jędrzejewski-Szmek e520b1258c
Merge pull request #30307 from bluca/enforce_inhibitors
logind: always check for inhibitor locks
2024-07-26 13:52:34 +02:00
Ronan Pigott cd2ce31adb resolved: Don't retry queries that indicate net error
This probably rarely helped anyway, but it also in some cases interferes
with auxiliary dnssec queries where the authoritative nameserver does
not support EDNS0/DNSSEC.

Fixes: ac6844460c ("resolved: support RFC 8914 EDE error codes")
2024-07-26 10:04:36 +01:00
Luca Boccassi 281b0bfbed
Merge pull request #33842 from DaanDeMeyer/test
Two fixes
2024-07-26 10:04:20 +01:00
Michal Koutný 3e6e3e6d40 test: Fail cgroup delegation test when user cannot be created
It means: a) user cannot be created, something's wrong in the
test environment -> fail the test; b) user already exists, we shall not
continue and delete (foreign) user.
2024-07-26 10:44:10 +02:00
Daan De Meyer ae07feb401 resize-fs: Put minimal ext4 size in the same ballpark as the other filesystems
TEST-46-HOMED fails on ext4 because the filesystem is deemed to small
for activation by cryptsetup. Let's bump the minimal filesystem size for
ext4 a bit to be in the same ballpark as ext4 and btrfs to avoid weird
errors due to impossibly small filesystems.

Also use U64_MB while we're touching this.
2024-07-26 08:27:24 +02:00
Michal Koutný 4f0541dc59 test: Reorganize testcase of cgroup delegation
There are multiple subtests, just move them around into functions
(leveraging the testcase_* convention) to make space for new related
subtests.
2024-07-25 17:29:42 +02:00
Luca Boccassi 7020fa8feb
Merge pull request #33825 from DaanDeMeyer/chattr
repart: Create disk image file with copy-on-write disabled on btrfs
2024-07-25 14:11:11 +01:00
Luca Boccassi 9ce9dece4f shell completion: add support for sd-analyze capability --mask
Follow-up for 3e7a029c28
2024-07-25 13:22:27 +01:00
Luca Boccassi a6bcab05df
Merge pull request #33840 from bluca/test_locale_dbus
test: fix D-Bus policy override for TEST-73-LOCALE
2024-07-25 13:18:53 +01:00
Luca Boccassi a1f427ab41 NEWS: mention logind inhibitors change 2024-07-25 12:22:37 +01:00
Luca Boccassi 804874d26a logind: always check for inhibitor locks
Currently inhibitors are bypassed unless an explicit request is made to
check for them, or even in that case when the requestor is root or the
same uid as the holder of the lock.

But in many cases this makes it impractical to rely on inhibitor locks.
For example, in Debian there are several convoluted and archaic
workarounds that divert systemctl/reboot to some hacky custom scripts
to try and enforce blocking accidental reboots, when it's not expected
that the requestor will remember to specify the command line option
to enable checking for active inhibitor locks.

Also in many cases one wants to ensure that locks taken by a user are
respected by actions initiated by that same user.

Change logind so that inhibitors checks are not skipped in these
cases, and systemctl so that locks are checked in order to show a
friendly error message rather than "permission denied".

Add new block-weak and delay-weak modes that keep the previous
behaviour unchanged.
2024-07-25 12:22:36 +01:00
Daan De Meyer ebe17e3f9e TEST-54-CREDS: Specify SMBIOS creds via corresponding mkosi option
This allows mkosi to combine fstab.extra with its own fstab.extra so
that it doesn't override the one we pass for the test.
2024-07-25 13:12:16 +02:00
David Tardon 7a64c5f23e sd-event: do not assert on invalid signal
The signalfd_siginfo struct is received from outside via a FD, hence
assert() is not appropriate way to check it. Just do a normal runtime
check.
2024-07-25 11:57:05 +01:00
David Tardon 639719e010 logind-dbus: check auth. for all inhibitor operations
Fixes #33834
2024-07-25 11:55:39 +01:00
Jeffrey Bosboom f7fa632682 docs/CONTROL_GROUP_INTERFACE.md: document accounting information available via D-Bus 2024-07-25 11:46:18 +01:00
Luca Boccassi 3bf483fc4f
Merge pull request #33727 from intelfx/work/analyze-capability-masks
analyze: capability: add support for decoding capability masks
2024-07-25 11:08:21 +01:00
Mike Yuan 268f58076f basic/log: do not treat all negative errnos as synthetic
Currently, IS_SYNTHETIC_ERRNO() evaluates to true for all negative errnos,
because of the two's-complement negative value representation.
Subsequently, ERRNO= is not logged for most of our own code.
Let's fix this, by formatting all synthetic errnos as positive.
Then, treat all negative values as non-synthetic.

While at it, mark the evaluation order explicitly, and remove
unneeded comment.

Fixes #33800
2024-07-25 12:03:59 +02:00
Daan De Meyer 42e9288180 tree-wide: Don't explicity disable copy-on-write when copying images
Since the copy helpers now copy file attributes as well, let's not
explicitly disable copy-on-write anymore when we copy an image. If
the source already has copy-on-write disabled, the copy will have it
disabled as well. Otherwise, the copy will also have copy-on-write
enabled.

This makes sure that reflinks always work as reflink is only supported
if both source and target are copy-on-write or both source and target
are not copy-on-write.
2024-07-25 11:56:07 +02:00
Daan De Meyer 2356104efc copy: Copy file attributes as well
Let's make sure we copy all file attributes that can be copied as
well.
2024-07-25 11:56:05 +02:00
Luca Boccassi 30e1cbbcad mkosi: update debian commit reference
* 7eebe8c0b1 autopkgtest: allow localectl in localed tests
* c08a88ffbb Update changelog for 256.4-1 release
* 03814c87fe Fix D-Bus policy for locale1 blocking
* 16f6130038 Drop last patch, all merged upstream
* fe6956e934 Install varlinkctl zsh completion file
* 9bc2a52832 Update upstream source from tag 'upstream/256.4'
* 8574241978 New upstream version 256.4
2024-07-25 10:46:56 +01:00
Luca Boccassi a4c436c9d8 test: fix D-Bus policy override for TEST-73-LOCALE
We don't need to allow non-root, and the policy needs to specify destination
and interface too, to narrow it down

Follow-up for 7b5c38a91d
2024-07-25 10:43:48 +01:00
Daan De Meyer 5e49684521 Make read_attr_path() more generic
Let's make this an openat() like function so it can be used in more
scenarios.
2024-07-24 18:58:41 +02:00
Daan De Meyer 4dee4e0039 repart: Create disk image file with copy-on-write disabled on btrfs
COW on btrfs generally does not play well lots of random writes so
let's make the disk images generated by repart NOCOW by default on
btrfs like we do elsewhere across the codebase.
2024-07-24 18:58:41 +02:00
Daan De Meyer b9c0b6c011 repart: Make partition files NOCOW if the disk image is NOCOW
On btrfs, reflinks into a disk image that has copy-on-write disabled
only work if the source has copy-on-write disabled as well so let's
make sure that's the case if the disk image has copy-on-write disabled.
2024-07-24 18:58:41 +02:00
Daan De Meyer 1b05ac946a fs-util: Add XO_NOCOW flag
Let's add a flag for xopenat() that immediately makes a file NOCOW
after opening it if it's supported.
2024-07-24 18:58:41 +02:00
Daan De Meyer 32dfe3b63e fs-util: Clean up properly in xopenat_full() on labelling error
If we fail to relabel the file, we should unlink the file or directory
again, so let's make sure we do that.
2024-07-24 18:58:41 +02:00
Daan De Meyer 0dd82dab91 fs-util: Handle dangling symlinks in openat_report_new()
openat() will always resolve symlinks, except if O_NOFOLLOW is passed
or O_CREAT|O_EXCL is passed. This means that if a dangling symlink is
passed to openat_report_new(), the first call to openat() will always
fail with ENOENT and the second call to openat() will always fail with
EEXIST.

Let's catch this case explicitly and fallback to creating the file with
just O_CREAT and assume we're the ones that created the file. We can't
resolve the symlink with chase() because this function is itself called
by chase() so we could end up in weird recursive calls if we'd try to do
so.
2024-07-24 18:58:41 +02:00
Daan De Meyer b91ad56228 test-fs-util: Modernize openat_report_new() test 2024-07-24 18:58:41 +02:00
Daan De Meyer 372e96a5a1 test-id128: Use new assertion macros 2024-07-24 18:58:40 +02:00
Daan De Meyer 60a4505da4 test: Add ASSERT_EQ_ID128() and ASSERT_NE_ID128() 2024-07-24 18:58:40 +02:00
Daan De Meyer 8eb06fd162 test: Add ASSERT_FAIL() 2024-07-24 18:58:40 +02:00
Daan De Meyer 3d6c6f9b9e mkosi: Update to latest
Includes the required fix to make mkosi copy NOCOW disk images properly.
2024-07-24 18:58:38 +02:00
Ivan Shapovalov 3e7a029c28 analyze: capability: add support for decoding capability masks
This adds support in `systemd-analyze capability` for decoding
capability masks (sets), e.g.:

```console
$ systemd-analyze capability --mask 0000000000003c00
NAME                 NUMBER
cap_net_bind_service     10
cap_net_broadcast        11
cap_net_admin            12
cap_net_raw              13
```

This is intended as a convenience tool for pretty-printing capability
values as found in e.g. `/proc/$PID/status`.
2024-07-24 17:25:47 +02:00
Luca Boccassi 11d5e2b5fb mkosi: update debian commit reference
* c7138e0b87 Configure default DNS servers for upstream CI builds
* bc5d1afe1e Drop out-of-tree localed patch and use D-Bus policy instead
* b5f8ababde autopkgtest: set Release= in mkosi.local.conf to distinguish testing vs unstable
* 323afafd80 autopkgtest: add allow-stderr to timedated test
* 0291f361e3 Install valrinkctl zsh completion file
* f40b9eba02 d/t/control: add Depends: lib{systemd,udev}-dev for upstream
* 3def595de3 d/t/upstream: ensure correct ubuntu codename is used
* 531bb6817e d/t/boot-and-services: fix a couple python sytax warnings
* 963ac13b7d d/t/boot-and-services: skip test_tmp_cleanup if tmp.mount is overridden
2024-07-24 11:38:55 +01:00
MkKvcs af5195f7a6 hwdb: add axis range corrections for the Lenovo Thinkpad E16 2024-07-24 08:24:36 +01:00
Luca Boccassi acf0851dcf
Merge pull request #33823 from YHNdnzj/varlink-deserialize-again
core: reliably check if varlink socket has been deserialized; switch varlink server to pidref
2024-07-24 08:23:36 +01:00
vdovhanych 2cf425ec57 add udev rules for trezor hw wallet devices 2024-07-24 08:22:44 +01:00
Ronan Pigott ddec353749 resolved: report svc params as a json object
This representation is significantly more useful. The previous array
format omitted the svc param key, which is not very useful.
2024-07-24 08:18:47 +01:00
Luca Boccassi 0d45d0ec58
Merge pull request #33810 from YHNdnzj/find-executable-simplify
path-util: minor cleanup for find_executable()
2024-07-23 23:08:19 +01:00
Luca Boccassi 3ac19d384d
Merge pull request #33809 from YHNdnzj/pidref-namespace
namespace-util: introduce pidref_namespace_open() and use it where appropriate; clean up mount-util a bit along the way
2024-07-23 23:03:26 +01:00
Luca Boccassi 8da8d6ce30
Merge pull request #33535 from neighbourhoodie/tests/dns-cache
Tests for DnsCache functions
2024-07-23 19:01:23 +01:00
Luca Boccassi 5aaf33ec96
Merge pull request #33534 from neighbourhoodie/tests/dns-query
Tests for DnsQuery functions
2024-07-23 18:47:14 +01:00
Mike Yuan b4ff314ea0
core-varlink: switch to PidRef + manager_get_unit_by_pidref() 2024-07-23 19:38:58 +02:00
Mike Yuan 3ff91850a5
core-varlink: do not log about ENOENT if oomd isn't available
This is simply too noisy, since every invocation of
manager_varlink_send_managed_oom_update() would try to
connect to oomd if not already.
2024-07-23 19:38:58 +02:00
Mike Yuan 16d8249ae4
core-varlink: add missing runtime_scope check for manager_varlink_init_user() 2024-07-23 19:38:57 +02:00
Mike Yuan d4e5c66ed4
core: reliably check if varlink socket has been deserialized
Follow-up for 6906c028e8

The mentioned commit uses access() to check if varlink socket
already exists in the filesystem, but that isn't sufficient.

> Varlink sockets are not serialized until v252, so upgrading from
> v251 or older means we will not listen anymore on the varlink sockets.
>
> See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074789
> for more details as this was found when updating from Debian Bullseye to a new version.

After this commit, the set up of varlink_server is effectively
split into two steps. manager_varlink_init_system(), which is
called after deserialization, would no longer skip listening
even if Manager.varlink_server is in place, but actually
check if we're listening on desired sockets.
Then, manager_deserialize() can be switched back to using
manager_setup_varlink_server().

Alternative to #33817

Co-authored-by: Luca Boccassi <bluca@debian.org>
2024-07-23 19:38:57 +02:00
Mike Yuan e633e8627f
mount-util: reorder params for mount_in_userspace, clean up logging 2024-07-23 19:31:32 +02:00
Mike Yuan 974e34a018
mount-util: do not unnecessarily acquire mountns fd twice
This also enables us to use pidref_namespace_open().
2024-07-23 19:30:55 +02:00
Mike Yuan 706302897a
mount-util: clean up mount_exchange_graceful a bit, don't duplicate move_mount when fallback 2024-07-23 19:30:55 +02:00
Mike Yuan ca13d3fc19
machine-dbus: use pidref_namespace_open() where appropriate 2024-07-23 19:30:55 +02:00
Mike Yuan 86a3c1fd95
namespace-util: introduce pidref_namespace_open() 2024-07-23 19:30:54 +02:00
Mike Yuan 30957ced45
namespace-util: explicitly specify namespace_info[]'s size
We do this already in all string lookup tables. This way
it's guaranteed that iterators which ends with _NAMESPACE_TYPE_MAX
wouldn't overrun the array.
2024-07-23 19:30:54 +02:00
Mike Yuan 0e7eda91f4
path-util: simplify final path for find_executable()
Currently, systemd-run ./test.sh would set Description=
to $PWD/./test.sh. This is quite ugly.
2024-07-23 18:48:15 +02:00
Mike Yuan 51b271ead7
path-util: trivial cleanup for find_executable_full() 2024-07-23 18:48:15 +02:00
Mike Yuan 7973f33e81 core: clean up Set/LoadCredential= parsers
Make logging consistent, plus introduce helper function
for adding creds to ExecContext.set_credential too.
2024-07-23 15:53:38 +01:00
Daan De Meyer fffbfb4ed1 mkosi: Bump device timeout even more
I still manage to hit it in some cases so let's bump again.
2024-07-23 15:49:37 +01:00
Luca Boccassi d111d76844 Merge pull request #33533 from neighbourhoodie/tests/dns-synthesize 2024-07-23 15:44:40 +01:00
James Coglan 5301548fbb resolved: tests for dns_synthesize_family() and dns_synthesize_protocol() 2024-07-23 15:44:07 +01:00
James Coglan 6fd7fc92cf resolved: tests for dns_synthesize_answer() 2024-07-23 15:44:07 +01:00
Mary Strodl c73883143a sd-dhcp-server: persist hardware addresses in leases 2024-07-23 14:55:48 +01:00
James Coglan 538a3dc298 resolved: tests for dns_query_string() 2024-07-23 14:17:23 +01:00
James Coglan c080825f14 resolved: tests for dns_query_go(); multiple search domains for dns_query_candidate_notify() 2024-07-23 14:17:23 +01:00
James Coglan 0a547aea96 resolved: refactor environment management in dns_query_go() tests 2024-07-23 14:17:23 +01:00
James Coglan 8501f44563 resolved: tests for dns_query_go() when configured with search domains 2024-07-23 14:17:23 +01:00
James Coglan cc3bad9d70 resolved: tests for dns_query_go() when no scopes are available 2024-07-23 14:17:23 +01:00
James Coglan 5d5f86431f resolved: tests for dns_query_go() using a bypass query 2024-07-23 14:17:23 +01:00
James Coglan 16078b8172 resolved: tests for dns_query_go() -- with and without network link 2024-07-23 14:17:23 +01:00
James Coglan 7d5ad4f88e resolved: tests for dns_query_process_cname_one(); no match, DNAME, utf-8 handling 2024-07-23 14:17:23 +01:00
James Coglan 9add77fafb resolved: tests for dns_query_process_cname_many() 2024-07-23 14:17:23 +01:00
James Coglan 47eb7e0bf2 resolved: tests for common usage of dns_query_process_cname_one() 2024-07-23 14:17:23 +01:00
James Coglan e5d246b488 resolved: tests for dns_query_make_auxiliary() 2024-07-23 14:17:22 +01:00
James Coglan 792a738625 resolved: tests for dns_query_new() 2024-07-23 14:17:21 +01:00
James Coglan f5dd610978 resolved: tests for dns_cache_lookup() clamping the TTL 2024-07-23 14:08:31 +01:00
James Coglan 1074c9001d resolved: tests for dns_cache_put() for NXDOMAIN with no SOA 2024-07-23 14:08:31 +01:00
James Coglan 6b864ea813 resolved: test that pseudo classes and types are not cached 2024-07-23 14:08:31 +01:00
James Coglan 7137086fa0 resolves: tests for dns_cache_prune() 2024-07-23 14:08:31 +01:00
James Coglan 3f6ae4a062 resolved: tests for dns_cache_check_conflicts() 2024-07-23 14:08:31 +01:00
James Coglan 42547022fd resolved: tests for dns_cache_export_shared_to_packet() 2024-07-23 14:08:31 +01:00
James Coglan 5b61b34ad0 resolved: tests for dns_cache_lookup(); mDNS and multiple matching entries 2024-07-23 14:08:31 +01:00
James Coglan 043a29b139 resolved: tests for dns_cache_lookup() returning the most recent input 2024-07-23 14:08:31 +01:00
James Coglan 6dd377ad70 resolved: tests for dns_cache_dump() 2024-07-23 14:08:31 +01:00
James Coglan e936ec5e4f resolved: test cache misses 2024-07-23 14:08:31 +01:00
James Coglan 25ef0fc7c8 resolved: tests for dns_cache_lookup() for NXDOMAIN 2024-07-23 14:08:31 +01:00
James Coglan 76f832a4f6 resolved: first test for dns_cache_lookup() 2024-07-23 14:08:31 +01:00
James Coglan f8da0642f3 resolved: tests for dns_cache_dump_to_json() 2024-07-23 14:08:31 +01:00
James Coglan 2bec28864a resolved: check that adding an expired response removes cache entry 2024-07-23 14:08:31 +01:00
James Coglan 186184ad14 resolved: tests for dns_cache_put(); CNAME success and name error 2024-07-23 14:08:31 +01:00
James Coglan f44ed739f1 resolved: tests for dns_cache_put() with non-matching class, type, name 2024-07-23 14:08:31 +01:00
James Coglan bbcd3bc381 resolved: refactor DNS answer construction for cache tests 2024-07-23 14:08:31 +01:00
James Coglan 4f4c06f02d resolved: test for dns_cache_put() with empty answer 2024-07-23 14:08:31 +01:00
James Coglan c5df8d53a9 resolved: tests for dns_cache_put() with different RCODEs 2024-07-23 14:08:31 +01:00
James Coglan 29c15d9d7b resolved: tests for dns_cache_put(); successful A query
Co-Authored-By: jan@neighbourhood.ie
2024-07-23 14:08:29 +01:00
Luca Boccassi ae2bf016bc Merge pull request #33531 from neighbourhoodie/tests/dns-zone 2024-07-23 13:29:03 +01:00
James Coglan 4d3936ad2d resolved: tests for dns_zone_lookup() 2024-07-23 13:28:34 +01:00
James Coglan 330d5c8a36 resolved: tests for dns_zone_remove_rrs_by_key() 2024-07-23 13:28:34 +01:00
James Coglan 41c3cd70ae resolved: tests for dns_zone_remove_rr() 2024-07-23 13:28:34 +01:00
James Coglan c7e3e5507e resolved: tests for dns_zone_put() 2024-07-23 13:28:34 +01:00
Luca Boccassi c01267c4a9 Merge pull request #33530 from neighbourhoodie/tests/dns-search-domain 2024-07-23 13:23:44 +01:00
James Coglan 771b5a4091 resolved: tests for dns_search_domain_find() 2024-07-23 13:22:34 +01:00
James Coglan 76bd2dce23 resolved: tests for search domain marking and unlinking 2024-07-23 13:22:34 +01:00
James Coglan 61362d49f8 resolved: extract function for checking search domains 2024-07-23 13:22:34 +01:00
James Coglan 5fef5552a6 resolved: tests for dns_search_domain_unlink() 2024-07-23 13:22:34 +01:00
James Coglan b65d6ab5dc resolved: tests for dns_search_domain_new() 2024-07-23 13:22:33 +01:00
Luca Boccassi 0e31c65d13
Merge pull request #33529 from neighbourhoodie/tests/dns-link
Tests for DNS Link functions
2024-07-23 13:20:25 +01:00
Luca Boccassi 378071931a Merge pull request #33528 from neighbourhoodie/tests/dns-answer 2024-07-23 13:15:16 +01:00
James Coglan c9f0cbe2fe resolved: tests for dns_answer_order_by_scope() 2024-07-23 13:14:54 +01:00
James Coglan 8105438cd2 resolved: tests for dns_answer_has_dname_for_cname() 2024-07-23 13:14:54 +01:00
James Coglan 464d785f45 resolved: tests for dns_answer_dump() 2024-07-23 13:14:54 +01:00
James Coglan 20570ff61c resolved: tests for dns_answer_{copy,move}_by_key() 2024-07-23 13:14:54 +01:00
James Coglan 3904553446 resolved: tests for dns_answer_remove_by_answer_keys() 2024-07-23 13:14:54 +01:00
James Coglan e23406edca resolved: tests for dns_answer_remove_by_{key,rr}() 2024-07-23 13:14:54 +01:00
James Coglan c07b0c66ca resolved: tests for dns_answer_merge() and dns_answer_extend() 2024-07-23 13:14:54 +01:00
James Coglan 4ab02e4fdc resolved: tests for dns_answer_find_soa() 2024-07-23 13:14:54 +01:00
James Coglan f64bf0efc4 resolved: tests for dns_answer_add(), dns_answer_match_key() 2024-07-23 13:14:53 +01:00
Luca Boccassi 432fc43ac1 Merge pull request #33526 from neighbourhoodie/tests/dns-question 2024-07-23 13:10:01 +01:00
James Coglan 8f54c51b22 resolved: tests for dns_question_merge() 2024-07-23 13:09:46 +01:00
James Coglan bbeb49f4c9 resolved: tests for dns_question_first_name() 2024-07-23 13:09:46 +01:00
James Coglan ede4e8cbe5 resolved: tests for dns_question_dump() 2024-07-23 13:09:46 +01:00
James Coglan 1f24f5bbd4 resolved: tests for dns_question_cname_redirect() 2024-07-23 13:09:46 +01:00
James Coglan b45d3501a4 resolved: tests for dns_question_is_equal() 2024-07-23 13:09:46 +01:00
James Coglan c530740e20 resolved: tests for dns_question_is_valid_for_query() 2024-07-23 13:09:46 +01:00
James Coglan 482bb31ce3 resolved: tests for dns_question_matches_cname_or_dname() 2024-07-23 13:09:46 +01:00
James Coglan 26dab08011 resolved: tests for dns_question_matches_rr() 2024-07-23 13:09:46 +01:00
James Coglan acd20dc9b9 resolved: tests for dns_question_new_service() 2024-07-23 13:09:46 +01:00
James Coglan eaf339f990 resolved: tests for dns_question_new_reverse() 2024-07-23 13:09:45 +01:00
James Coglan 7ce89229c7 resolved: tests for dns_question_new_address() 2024-07-23 13:09:45 +01:00
James Coglan f5c7bc2684 resolved: tests for dns_question_add() 2024-07-23 13:09:45 +01:00
Luca Boccassi a16061dd9b Merge pull request #33525 from neighbourhoodie/tests/dns-rr 2024-07-23 13:03:59 +01:00
James Coglan 60da78a4dc resolved: tests for dns_resource_record_source(), dns_resource_record_is_synthetic(), dns_resource_record_signer(), dns_resource_record_is_signer() 2024-07-23 12:44:35 +01:00
James Coglan 77018b2f47 resolved: tests for dns_resource_record_to_wire_format()
Note this function does not produce compressed domain names in the RDATA
when serializing the RR.
2024-07-23 12:44:35 +01:00
James Coglan f6d2ad95ed resolved: tests for dns_resource_record_to_string() 2024-07-23 12:44:35 +01:00
James Coglan 7b59f2ada4 resolved: tests for dns_resource_key_{to,from}_json()
This test doesn't check the generated JSON data in detail, it simply
tests that round-tripping an RR key through the JSON representation
preserves its data.
2024-07-23 12:44:35 +01:00
James Coglan 1500512f23 resolved: tests for dns_resource_record_clamp_ttl() 2024-07-23 12:44:35 +01:00
James Coglan bb9d1d63c1 resolved: tests for dns_resource_record_equal(); LOC records 2024-07-23 12:44:35 +01:00
James Coglan a5c24c8757 resolved: tests for dns_resource_record_equal(); SVCB records 2024-07-23 12:44:35 +01:00
James Coglan c6c48d58ea resolved: tests for dns_resource_record_equal(); RRSIG records 2024-07-23 12:44:35 +01:00
James Coglan f612780f66 resolved: tests for dns_resource_record_equal(); NAPTR records 2024-07-23 12:44:35 +01:00
James Coglan 2cf297c9aa resolved: tests for dns_resource_record_equal(); SRV records 2024-07-23 12:44:35 +01:00
James Coglan 14aa00427d resolved: tests for dns_resource_record_equal(); TXT records 2024-07-23 12:44:35 +01:00
James Coglan 54ea4112c1 resolved: tests for dns_resource_record_equal(); DNAME records 2024-07-23 12:44:35 +01:00
James Coglan b6e12ea7a4 resolved: tests for dns_resource_record_equal(); MX records 2024-07-23 12:44:35 +01:00
James Coglan 4c2d48ef72 resolved: tests for dns_resource_record_equal(); HINFO records 2024-07-23 12:44:35 +01:00
James Coglan 392dd81098 resolved: tests for dns_resource_record_equal(); PTR records 2024-07-23 12:44:35 +01:00
James Coglan dd470cd0f8 resolved: tests for dns_resource_record_equal(); SOA records 2024-07-23 12:44:35 +01:00
James Coglan 55b18acf51 resolved: tests for dns_resource_record_equal(); CNAME records 2024-07-23 12:44:35 +01:00
James Coglan 3f4a63c6d3 resolved: tests for dns_resource_record_equal(); NS records 2024-07-23 12:44:35 +01:00
James Coglan b914cda4a9 resolved: tests for dns_resource_record_equal(); A and AAAA records 2024-07-23 12:44:35 +01:00
James Coglan 60ebacc5d4 resolved: tests for dns_resource_record_equal(); general cases
These tests cover comparisons between RR objects that are not class- or
type-specific, i.e. they don't check any of the RDATA fields.
2024-07-23 12:44:35 +01:00
James Coglan 43e32a2081 resolved: tests for dns_resource_record_new_address(), dns_resource_record_new_reverse() 2024-07-23 12:44:35 +01:00
James Coglan 6104ba9d42 resolved: tests for dns_resource_key_reduce() 2024-07-23 12:44:35 +01:00
James Coglan 5982caccd7 resolved: tests for dns_resource_key_to_string() 2024-07-23 12:44:35 +01:00
James Coglan 25e627704e resolved: tests for dns_resource_key_match_cname_or_dname(), dns_resource_key_match_soa() 2024-07-23 12:44:35 +01:00
James Coglan e3970f6227 resolved: tests for dns_resource_key_equal() and dns_resource_key_match_rr() 2024-07-23 12:44:35 +01:00
James Coglan f1cc0c3a1d resolved: tests for dns_resource_key_is_{address, dnssd_ptr, dnssd_two_label_ptr} 2024-07-23 12:44:35 +01:00
James Coglan d2f786d824 resolved: tests for dns_resource_key_new_append_suffix() 2024-07-23 12:44:35 +01:00
James Coglan 123a99a06b resolved: tests for dns_resource_key_new() and dns_resource_key_new_redirect() 2024-07-23 12:44:35 +01:00
James Coglan 0a2ec21bd9 resolved: test for DNS_RESOURCE_RECORD_RDATA() 2024-07-23 12:44:34 +01:00
Luca Boccassi 99f1646540
Merge pull request #33524 from neighbourhoodie/tests/dns-packet
Tests for DNS packet parsing/serialising
2024-07-23 10:39:29 +01:00
Luca Boccassi ed86c1bf5f
Merge pull request #33804 from keszybz/assorted-cleanups
Assorted cleanups
2024-07-23 10:38:08 +01:00
Luca Boccassi d47cd4d347
Merge pull request #33791 from YHNdnzj/sd-notify-pidref
core: pin notify sender through pidfd (potentially SCM_PIDFD) plus various cleanups
2024-07-23 10:36:57 +01:00
Daan De Meyer 076c69360f
Merge pull request #33814 from AnoukCeyssens/daemon
test: use new assertion macros more
2024-07-23 07:23:55 +02:00
Anouk Ceyssens 32ef5f305f fix compilation errors 2024-07-22 23:57:00 +02:00
Anouk Ceyssens 364a0ba2d4 test-clock: use new assertion macros 2024-07-22 23:41:00 +02:00
Anouk Ceyssens a923ca6945 test-dev-setup: use new assertion macros 2024-07-22 23:40:21 +02:00
Anouk Ceyssens 5bc7ab7086 test-date: use new assertion macros 2024-07-22 23:33:40 +02:00
Anouk Ceyssens e07d3a917a test-daemon: use new assertion macros 2024-07-22 23:27:52 +02:00
James Coglan 8c57700b6b resolved: tests for link_allocate_scopes(): LLMNR, MDNS, IPv4/6 2024-07-22 13:29:21 +01:00
James Coglan e2af5073aa resolved: refactor env setup for link_allocate_scopes() tests 2024-07-22 13:27:49 +01:00
James Coglan e204b3711e resolved: basic tests for link_allocate_scopes() 2024-07-22 13:20:14 +01:00
James Coglan 29211c350e resolved: tests for link_find_address() 2024-07-22 13:18:44 +01:00
James Coglan 94dd2bab7c resolved: tests for link_relevant() 2024-07-22 13:17:54 +01:00
James Coglan 83ca174b73 resolved: tests for link_new(), link_process_rtnl() 2024-07-22 13:17:08 +01:00
Zbigniew Jędrzejewski-Szmek d202ea5754 man/systemd-repart: extend description and reword some sentences
The page was written when systemd-repart was primarily intended to be used on a
running system. But nowadays it's more often used to create images, so extend
that part of the description.

While at it, fix some whitespace issues and trim some overly complicated sentences.
2024-07-22 12:14:23 +01:00
Luca Boccassi 9547b25ce8
Merge pull request #33597 from keszybz/fetch-distro
Extend the distro fetching script to check the repository out
2024-07-22 11:46:43 +01:00
Steve Traylen 8af38e5b04 Document that MemorySwapMax supports % configuration
Certainly on systemd 252 at least a configuration of
```
MemorySwapMax=40%
```
is supported but this was missing from the man page.
Only MemoryMax was documented as supporting a %.
2024-07-22 11:39:33 +01:00
Franck Bui 8c28dd2442 core: when switching root remove /run/systemd before executing the binary specified by init=
It's important if the binary specified by the init= boot option is not systemd
otherwise it confuses systemctl that incorrectly assumes that systemd is still
the init system due to the presence of /run/systemd/system.

Also some tools might also check the presence of /run/systemd/private to test
if systemd is running as pid1.
2024-07-22 11:29:08 +01:00
Daan De Meyer 944faf6598 Make vcs-tag do something useful for non-developer mode as well
When building packages of arbitrary commits of systemd-stable,
distributors might want to include a git sha of the exact commit
they're on. Let's extend vcs-tag a little to make this possible.

If we're on a commit matching a tag, don't generate a git sha at all.
If we're not on a commit matching a tag, generate a vcs tag as usually.
However, if we're not in developer mode, don't append a '^' if the tree
is dirty to accomodate package builds applying various patches to the
tree which shouldn't be considered as "dirty" edits.
2024-07-22 12:04:40 +02:00
James Coglan ce9b6819d6 resolved: tests for dns_packet_dup() 2024-07-22 10:48:52 +01:00
Zbigniew Jędrzejewski-Szmek df5b65e15d shared/exec-util: add macro to autoinsert sentinel for fork_agent() 2024-07-22 11:48:26 +02:00
Zbigniew Jędrzejewski-Szmek 52031044bf repart: use new style for pointers in function signatures 2024-07-22 11:48:26 +02:00
Zbigniew Jędrzejewski-Szmek 262fa6864b selinux-util: add missing char in comment 2024-07-22 11:48:26 +02:00
James Coglan d6f1f962fe resolved: tests for dns_packet_patch_max_udp_size() 2024-07-22 10:47:59 +01:00
James Coglan b81b8faa43 resolved: tests for dns_packet_append_answer(); LOC records 2024-07-22 10:47:25 +01:00
James Coglan 346b0d3b18 resolved: tests for dns_packet_append_answer(); TXT records 2024-07-22 10:46:40 +01:00
James Coglan 053ec2c5a2 resolved: tests for dns_packet_append_answer(); NAPTR records 2024-07-22 10:45:34 +01:00
James Coglan 3c7ede7b88 resolved: tests for dns_packet_append_answer(); SVCB and HTTPS records 2024-07-22 10:44:02 +01:00
Zbigniew Jędrzejewski-Szmek 1c85d56349 tools/fetch-distro: switch to the target branch
We switch opensuse from "factory" to "devel". I had an old checkout that was
using the stale branch.
2024-07-22 11:38:08 +02:00
Zbigniew Jędrzejewski-Szmek 8e84e15445 tools/fetch-distro: only fetch the configured branch
We don't need the other branches. This mostly cuts down on the
noise in output. But add '-v' to show what we're fetching.
2024-07-22 11:38:08 +02:00
Zbigniew Jędrzejewski-Szmek 82c459f910 tools/update-distro-hash: rename, fetch the repository if appropriate
Let's rename the tool to tools/fetch-distro. It's useful to be able to fetch
the distro directly. But when that functionality is added, the old name is
confusing.

Now --update/-u must be specified to update the commits.

--reference-if-able is used to speed up the clone of debian.
It saves about 75% of the download.
2024-07-22 11:38:08 +02:00
James Coglan 6ff5ca8e09 resolved: tests for dns_packet_append_answer(); HINFO records 2024-07-22 10:37:44 +01:00
James Coglan 945a75c88c resolved: tests for dns_packet_append_answer(); RRSIG records 2024-07-22 10:36:56 +01:00
Collin L 733518b413
zsh/_networkctl: remove duplicated argument for completion (#31926)
It is unnecessary, which will mess the completion.
2024-07-22 10:36:47 +01:00
James Coglan 1f66bd238f resolved: tests for dns_packet_append_answer(); SRV records 2024-07-22 10:35:01 +01:00
James Coglan bcd218151f resolved: tests for dns_packet_append_answer(); NS, CNAME, PTR and MX records 2024-07-22 10:34:11 +01:00
James Coglan 1516ebfc02 resolved: tests for dns_packet_append_answer(); single A record 2024-07-22 10:31:11 +01:00
James Coglan 2927f43d2b resolved: tests for dns_packet_truncate_opt() 2024-07-22 10:30:31 +01:00
James Coglan b6899784b5 resolved: tests for dns_packet_append_opt() 2024-07-22 10:29:51 +01:00
James Coglan 1ac8f468b6 resolved: tests for dns_packet_append_key() domain name compression 2024-07-22 10:29:13 +01:00
James Coglan fc838bd42a resolved: tests for basic usage of dns_packet_append_key() 2024-07-22 10:27:58 +01:00
James Coglan 6bfbacc9b4 resolved: tests for dns_packet_set_flags() 2024-07-22 10:27:00 +01:00
Daan De Meyer 6d9d14e516
Merge pull request #33802 from DaanDeMeyer/packages
mkosi: Various packaging improvements
2024-07-22 11:23:22 +02:00
James Coglan ca93c4fe75 resolved: tests for DNS parameter formatters 2024-07-22 10:21:05 +01:00
James Coglan 6e85e24376 resolved: tests for dns_packet_is_reply_for() 2024-07-22 10:20:58 +01:00
James Coglan e7e2f01d7b resolved: tests for dns_packet_validate_{query,reply}() 2024-07-22 10:18:59 +01:00
James Coglan 59e987a0b7 resolved: tests for dns_packet_has_nsid_request() 2024-07-22 10:17:36 +01:00
James Coglan d6c13c6817 resolved: tests for dns_packet_ede_rcode() 2024-07-22 10:16:59 +01:00
James Coglan 9728540e61 resolved: tests for dns_ede_rcode_is_dnssec() 2024-07-22 10:15:22 +01:00
James Coglan eedf263bd0 resolved: tests for dns_packet_equal() 2024-07-22 10:15:15 +01:00
James Coglan e067858bb1 resolved: tests for dns_packet_extract(); parsing LOC records 2024-07-22 10:14:09 +01:00
James Coglan 2dd00dba25 resolved: tests for dns_packet_extract(); parsing TXT records 2024-07-22 10:13:03 +01:00
Mauri de Souza Meneguzzo a408d44531 shared: log error when execve fail
If there is an error with the execv call in fork_agent the
program exits without any meaningful log message. Log the
command and errno so the user gets more information about
the failure.

Fixes: #33418

Signed-off-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
2024-07-22 10:12:35 +01:00
James Coglan 6cf9767e1c resolved: tests for dns_packet_extract(); parsing OPT records
These tests identify a couple of problems with OPT pseudo-RR parsing.

First, any TTL value with the high bit set is replaced with zero before
checking the record type. For most types this is correct, since TTLs
have the range of signed int32. But for OPT records where the TTL is
repurposed to hold the extended RCODE, EDNS version and flags, it means
that the high bit cannot be used in extended RCODEs. Any RCODE with the
high bit set will be read as zero.

Second, the DNS_PACKET_RCODE() function bit-shifts the extended RCODE by
24 places instead of 20, so that it ends up forming the lower 8 bits of
a 12-bit RCODE, instead of the upper 8 bits as intended.

We intend to fix these issues in other pull requests.
2024-07-22 10:11:51 +01:00
James Coglan 99fe3607ca resolved: tests for dns_packet_extract(); parsing NAPTR records 2024-07-22 10:09:23 +01:00
James Coglan b0a0743b71 resolved: tests for dns_packet_extract(); parsing HINFO records 2024-07-22 10:08:35 +01:00
James Coglan 5e663903f3 resolved: tests for dns_packet_extract(); parsing SVCB and HTTPS records 2024-07-22 10:07:03 +01:00
Luca Boccassi e261f27ef0
Merge pull request #33432 from gregorHerburger/add_IFLA_BR_FDB_MAX_LEARNED_support
network: bridge: add support for  IFLA_BR_FDB_MAX_LEARNED
2024-07-22 10:06:16 +01:00
James Coglan c0ae07ec2b resolved: tests for dns_packet_extract(); parsing RRSIG records 2024-07-22 10:03:32 +01:00
James Coglan 02ea4cb919 resolved: tests for dns_packet_extract(); parsing SRV records 2024-07-22 10:02:46 +01:00
James Coglan 887bc36231 resolved: tests for dns_packet_extract(); handling ANY class/type in answers 2024-07-22 10:01:35 +01:00
James Coglan 3d0df33fc2 resolved: tests for dns_packet_extract(); parsing SOA records 2024-07-22 10:01:02 +01:00
James Coglan 8a5e122d95 resolved: tests for dns_packet_extract(); parsing NS records 2024-07-22 09:59:20 +01:00
James Coglan 0afc219da8 resolved: tests for dns_packet_extract(); parsing A records 2024-07-22 09:57:39 +01:00
James Coglan 326ba6a5b0 resolved: tests for dns_packet_extract(); check handling of self-referential compression pointers 2024-07-22 09:53:17 +01:00
James Coglan f97d7a6969 resolved: tests for dns_packet_extract(); checking for malformed queries 2024-07-22 09:52:16 +01:00
James Coglan 48b0b8f0cd resolved: tests for dns_packet_extract(); A and CNAME answers with domain compression 2024-07-22 09:49:01 +01:00
James Coglan e50e5cffde resolved: tests for dns_packet_extract(); parsing of queries 2024-07-22 09:47:47 +01:00
James Coglan b8112c9d68 resolved: tests for parsing DNS packet headers 2024-07-22 09:46:27 +01:00
Daan De Meyer 4ecd6c3552 mkosi: update arch commit reference
* 1d577a6268 refresh the keys
* 12383ba712 make libarchive a regular optional dependency...
* f51d5e04bf ignore rc releases in nvchecker
* 0b096a2baa add nvchecker
* 5f0ced863c upgpkg: 256.2-1: new upstream release
2024-07-22 10:28:57 +02:00
Daan De Meyer 1d8f16df90 mkosi: update fedora commit reference
* 00babccdea Simplify BFQ scheduler enablement
* ef8ddb130b Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* 5b4a5461d6 Fix changelog
* a8c5c736f6 Only apply shorter shutdown timer changes on Fedora
*   f4e284cd7a Merge #150 `Deal with systemd-timesyncd backport in EPEL`
|\
| * 9378a0733a Deal with systemd-timesyncd backport in EPEL
* | 12d1f05029 Don't claim /sbin/installkernel if building for CentOS Stream 9
|/
* 79828f2753 spec: use "positive" conditions in conditionals
* c5d3af1638 Add build dependency on rsync on CentOS Stream 9
* 8d080fb5cb Backport udma buffer access patch
* 6084453807 Add support for building from a specific branch
* cb9d631ca0 Update PR patch metadata
* 3889da947e In standalone subpackages, suggest coreutils-single
* b7800e3e66 Drop versions from Conflicts for standalone packages
2024-07-22 10:28:50 +02:00
Gregor Herburger 1aa74ad048 test: systemd-networkd-tests: add fdb learned tests
Add a test for the new bridge netlink attributes IFLA_BR_FDB_N_LEARNED and
IFLA_BR_FDB_MAX_LEARNED.

Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
2024-07-22 10:27:56 +02:00
Gregor Herburger 5a3e759bd0 networkctl: add support to display learned fdb entries
Since Linux commit ddd1ad68826d ("net: bridge: Add netlink knobs for number
/ max learned FDB entries") [1] it is possible to limit to number of
dynamically learned fdb entries per bridge.

Add support to the systemd networkctl for the netlink bridge attributes
IFLA_BR_FDB_MAX_LEARNED and IFLA_BR_FDB_N_LEARNED.

[1] https://lore.kernel.org/all/20231016-fdb_limit-v5-0-32cddff87758@avm.de/

Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
2024-07-22 10:27:56 +02:00
Gregor Herburger f379f36b11 network: bridge: add support for IFLA_BR_FDB_MAX_LEARNED
Since Linux commit ddd1ad68826d ("net: bridge: Add netlink knobs for number
/ max learned FDB entries") [1] it is possible to limit to number of
dynamically learned fdb entries per bridge.

Add support to the systemd netdev bridge for the new netlink attribute
IFLA_BR_FDB_MAX_LEARNED.

[1] https://lore.kernel.org/all/20231016-fdb_limit-v5-0-32cddff87758@avm.de/

Signed-off-by: Gregor Herburger <gregor.herburger@ew.tq-group.com>
2024-07-22 10:27:56 +02:00
Daan De Meyer ebbae3d632 mkosi: Use the Fedora Rawhide spec for CentOS
These are now practically identical, with the only differences between
the two having no effect on the rpm builds we do with mkosi, so let's
cut out the middle man and just use the Fedora Rawhide spec for CentOS
as well.
2024-07-22 10:25:46 +02:00
Daan De Meyer 762b23e86a mkosi: Switch back to PKG_SUBDIR instead of symlinks
Previously I thought it would make sense to allow running the build
scripts from within the VM/container to rebuild the packages. Instead
we ended up making it possible to rerun mkosi outside of the container/VM
to rebuild the packages, so let's switch back to $PKG_SUBDIR to tell the
build scripts where to look for the packaging sources.
2024-07-22 10:22:48 +02:00
Mike Yuan 19eccb7667
core: pin notify sender through pidfd (potentially SCM_PIDFD) 2024-07-22 09:38:48 +02:00
Mike Yuan 31d76a1702
missing_socket: add SCM_PASSPIDFD and SCM_PIDFD
Preparation for later commits.
2024-07-21 22:50:58 +02:00
Mike Yuan d3d0e36156
core/service: use switch in service_notify_message_authorized() 2024-07-21 22:48:54 +02:00
Mike Yuan 7d6e1293b2
core/manager: minor refactor for manager_dispatch_notify_fd() 2024-07-21 22:48:54 +02:00
Mike Yuan 678f271cff
core/manager: modernize manager_setup_notify() a bit 2024-07-21 22:48:53 +02:00
Mike Yuan 8dc303d3c8
process-util: modernize pidfd_get_pid() 2024-07-21 22:48:53 +02:00
Mike Yuan 77f709ca84
pidref: move comments that doesn't belong in pidref_copy() to pidref_dup()
Follow-up for 232e66217d
2024-07-21 22:48:53 +02:00
Mike Yuan 93df5cf8d9
core/dbus: use Manager.prefix where appropriate 2024-07-21 22:48:53 +02:00
Mike Yuan 71f2ba82cf
core/dbus: make two functions return void 2024-07-21 22:48:52 +02:00
Mike Yuan 777f69006b
core/device: prefix DEVICE_FOUND_MASK with '_'
In accordance to our usual style for special enum values.
2024-07-21 22:48:52 +02:00
Mike Yuan 32020b4788
core/device: minor refactors 2024-07-21 22:48:14 +02:00
Mike Yuan 52ffb3c95f
Merge pull request #32612 from YHNdnzj/creds-test
core/service: imply Type=exec if credentials are used
2024-07-21 22:27:42 +02:00
Mike Yuan 757e469d26 core/service: imply Type=exec if credentials are used
When credentials are used with Type=simple + ExecStartPost=,
i.e. when multiple sd-executor instances are running in parallel
for a single service, the state of final credential dir
might be unexpected wrt path_is_mount_point() and other
steps. So, let's imply Type=exec if not explicitly specified,
and emit a warning otherwise.
2024-07-21 19:10:58 +01:00
Mike Yuan 60b218e36e test-execute: ExecStop= and friends should not get credentials
See #32583
2024-07-21 19:10:58 +01:00
Kamil Szczęk 88cf0906aa cryptsetup: handle parallel activation of volumes with another tool gracefully
This commit makes systemd-cryptsetup exit with a successful status when
the volume gets unlocked outside of the current systemd-cryptsetup
process while it was executing. This can be easily reproduced by calling
systemd-cryptsetup, and while it waits for user to input a password/PIN,
unlock the volume in a second terminal. Then after entering the password
systemd-cryptsetup will exit with a non-zero status code.
2024-07-21 19:02:59 +01:00
Luca Boccassi eab98338f8
Merge pull request #33443 from YHNdnzj/oneshot-destroy-cred
core/service: destroy runtime data when Type=oneshot services exit
2024-07-21 18:44:25 +01:00
Etienne Champetier 0a4ecc54cb udev-builtin-net_id: use firmware_node/sun for ID_NET_NAME_SLOT
pci_get_hotplug_slot() has the following limitations:
- if slots are not hotpluggable, they are not in /sys/bus/pci/slots.
- the address at /sys/bus/pci/slots/X/addr doesn't contains the function part,
  so on some system, 2 different slots with different _SUN end up with the same
  hotplug_slot, leading to naming conflicts.
- it tries all parent devices until it finds a slot number, which is incorrect,
  and what led to NAMING_BRIDGE_MULTIFUNCTION_SLOT being disabled.

The use of PCI hotplug to find the slot (ACPI _SUN) was introduced in
0035597a30
"udev: net_id - export PCI hotplug slot names" on 2012/11/26.
At the same time on the kernel side we got
bb74ac23b1
"ACPI: create _SUN sysfs file" on 2012/11/16.

Using PCI hotplug was the only way at the time, but now 12 years later we can use
firmware_node/sun sysfs file.
Looking at a small selection of server HW, for HPE (Gen10 DL325), the _SUN is attached
to the NIC device, whereas for Dell (R640/R6515/R6615) and Cisco (UCSC-C220-M5SX),
the _SUN is on the first parent pcieport.

We still fallback to pci_get_hotplug_slot() to handle the s390 case and
maybe some other coner cases (_SUN on grand parent device that is not a
bridge ?).
2024-07-21 18:36:37 +01:00
Luca Boccassi 7b5c38a91d test: override blocking localed policy in TEST-73-LOCALE
On Debian and derivatives writing calls to localed are blocked as other
tools are used to change settings, override that policy for the tests
2024-07-21 16:30:57 +01:00
Vasiliy Kovalev 23f5f82756 hwdb: fix MXC6655 accelerometer mount matrix for Aquarius Cmp NS483
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-07-21 16:29:11 +01:00
Alain Greppin a2ae7ed7d0
systemd.dnssd does not handle local requests (#32991)
systemd.dnssd does not handle local requests

Fixes https://github.com/systemd/systemd/issues/32990
2024-07-21 12:48:56 +01:00
Mike Yuan c26948c6da core/service: destroy runtime data when Type=oneshot services exit
Currently, we have a bunch of Type=oneshot + RemainAfterExit=yes
services that make use of credentials. When those exits, the cred mounts
remain established, which is pointless and quite annoying. Let's
instead destroy the runtime data on SERVICE_EXITED, if no process
will be spawned for the unit again.
2024-07-21 12:43:51 +01:00
Mike Yuan 8b17371b61 core/unit: add one assertion for u->manager 2024-07-21 12:43:51 +01:00
Luca Boccassi 9d962e370c
Merge pull request #33790 from YHNdnzj/run-exec-flags
run: clean up ExecCommandFlags serialization
2024-07-21 11:44:20 +01:00
ShreyasMahangade db708fc9ba
timedatectl: setting set_local_rtc to 1 will throw Warning as well, use log_warning() (#33489)
Previously only running `timedatectl` it was showing warning regarding the dangers of setting RTC to local TZ.
Now similar warning is also flashed when `set-local-rtc 1`.
2024-07-20 19:07:30 +02:00
Dominique Martinet 8da20e3fe2 meson: fix missing failure if bpf-framework was enabled
If building with clang and clang does not support bpf, then enabling
-Dbpf-framework=enabled would silently drop the feature (even printing
bpf-framework: enabled in the meson build recap, and no message anywhere
that'd hint at the failure!)

This is unexpected, so add check to fail hard in this case.

All other code paths (gcc, missing bpftool) properly check for the
option, but it is not as easy for a custom command so check explicitly
2024-07-20 15:59:34 +02:00
Lennart Poettering 4b752770ca upate TODO 2024-07-20 15:04:32 +02:00
Mike Yuan db12f84327
run: clean up ExecCommandFlags serialization
The current behavior is actually OK, since use_ex_prop = !arg_expand_environment,
but that's very implicit and using STRV_MAKE() this way feels icky.
Let's make this more readable, by using exec_command_flags_to_strv().
2024-07-20 09:37:34 +02:00
Mike Yuan 05c754bc7f
exec-util: modernize exec_command_flags_{to,from}_strv
- Rename ret params following our coding style
- Use assertion where appropriate
- Use BIT_FOREACH()
2024-07-20 09:37:07 +02:00
Ronan Pigott 09a8a0d023 zsh: update varlinkctl completions
correct redundant or mismatched tags and fill the argument field of
curcontext because _regex_words does not do that for us.

The _complete_help text now looks much more reasonable most of the time:

$ varlinkctl call /run/systemd/resolve/io.systemd.Resolve ^Xh
tags in context :completion::complete:varlinkctl::
    argument-rest  (_arguments _varlinkctl)
tags in context :completion::complete:varlinkctl-call:method:
    varlink-methods  (_varlinkctl_cmd _varlinkctl_command _arguments _varlinkctl)

Fixes: af63b4b769 ("zsh: add varlinkctl completions")
2024-07-19 23:07:37 +02:00
Lennart Poettering e846854172 execute: add FIXME comment
As requested by @YHNdnzj:

https://github.com/systemd/systemd/pull/33707#discussion_r1684055699
2024-07-19 18:59:01 +02:00
Ronan Pigott af63b4b769 zsh: add varlinkctl completions 2024-07-19 17:06:17 +02:00
Daan De Meyer 518ea76ecd docs: Document how to do stable releases 2024-07-19 16:33:36 +02:00
Lennart Poettering 32dee192a6
Merge pull request #33707 from poettering/terminal-size-by-ansi-seq
pid1: try to initialize terminal dimensions from data gathered via ANSI sequences + many clean-ups/refactorings
2024-07-19 14:35:55 +02:00
Daan De Meyer 70510bf282 mkosi: Bump default device timeout a little
We've been getting some integration test failures due to timeouts
on finding the root partition device. Let's bump the default device
timeout a little to see if it mitigates these failures.
2024-07-19 14:20:39 +02:00
Kai-Chuan Hsieh 643347ed61 hwdb: Add mic mute key mapping for Dell Pro Rugged series 2024-07-19 11:46:42 +02:00
Lennart Poettering 16044277e9 pid1: use $COLUMNS info in status_vprintf()
This way, we can work around the fact that "struct winsize" for
/dev/console might not be initialized the moment we open the device.
2024-07-19 11:44:05 +02:00
Lennart Poettering b411228199 main: set $COLUMNS/$ROWS for PID 1 based on /dev/console data
In PID 1 we write status information to /dev/console regularly, but we
cannot keep it open continously, due to the kernel's SAK logic (which
would kill PID 1 if user hits SAK). But closing/reopening it all the
time really sucks for tty types that have no window size management
(such as serial terminals/hvc0 and suchlike), because it also means the
TTY is fully closed most of the time, and that resets the window sizes
to 0/0.

Now, we reinitialize the window size on every reopen, but that is a bit
expensive for simple status output. Hence, cache the window size in the
usualy $COLUMNS/$ROWS environment variables. We don't inherit these to
our payloads anyway, hence these are free to us to use.
2024-07-19 11:44:04 +02:00
Lennart Poettering 0ea4198f0a terminal-util: add recognizable error if cols/rows of tty are initially not initialized
Various tty types come up with cols/rows not initialized (i.e. set to
zero). Let's detect these cases, and return a better error than EIO,
simply to make things easier to debug.
2024-07-19 11:44:04 +02:00
Lennart Poettering ad2fa21f83 terminal-util: extend timeout on background color request
I managed to hit the timeout a couple of times inside of slow qemu.
Let's increase it a bit to 1/3s
2024-07-19 11:44:04 +02:00
Lennart Poettering abe8e99ee6 terminal-util: try to avoid reading more from terminal than we need in get_default_background_color() 2024-07-19 11:44:04 +02:00
Lennart Poettering e2d66781ee exec-invoke: user EBADF where appropriate 2024-07-19 11:44:04 +02:00
Lennart Poettering 2cd19499a0 tree-wide: acquire /dev/console lock around any attempts to reset TTY 2024-07-19 11:44:04 +02:00
Lennart Poettering dffbe1d152 terminal-util: teach resolve_dev_console() to deal correctly with /dev/console being a symlink
/dev/console is sometimes a symlink in container managers. Let's handle
that correctly, and resolve the symlink, and not consider the data from
/sys/ in that case.
2024-07-19 11:44:04 +02:00
Lennart Poettering 4a24cc859f terminal-util: move lock_dev_console() here
It doesn't really make sense to have that in dev-setup.c, which is
mostly about setting up /dev/, creating device nodes and stuff.

let's move it to the other stuff that deals with /dev/console's
peculiarities.
2024-07-19 11:44:04 +02:00
Lennart Poettering c06b84d816 man: clarify what TTYReset= and TTYVTDisallocate= do and do not do regarding screen clearing 2024-07-19 11:44:04 +02:00
Lennart Poettering 56ea3c262c units: bring agetty command lines back into sync
Let's always rely on our own TTY reset logic and tty disallocation/clear
screen logic, thus always pass --noclear and --noreset.

Also, bring the list of baud rates to try into sync for console-getty
and serial-getty (the former might or might not be connected to rs232,
we can't know, hence assume the worst, and copy what
serial-getty@.service does)
2024-07-19 11:44:04 +02:00
Lennart Poettering 628c214656 exec-invoke: move terminal initialization a bit
It's a bit confusing, but we actually initialize the terminal twice for
each service, potentially. One earlier time, where we might end up
firing vhangup() and vt_disallocate(), which is a pretty brutal way to
reset things, by disconnecting and possibly invalidating the tty
completely. When we do this we do not keep any fd open afterwards, since
it quite likely points to a dead connection of a tty.

The 2nd time we initialize things when we actually want to use it.

The first initialization is hence "destructive" (killing any left-overs
from previous uses) the 2nd one "constructive" (preparing things for our
new use), if you so will.

Let's document this distinction in comments, and let's also move both
initializations to exec_invoke(), so that they are easier to see in their
symmetric behaviour. Moreover, let's run the tty initialization after we
opened both input and output, since we need both for doing the fancy
dimension auto init stuff now.

Oh, and of course, one thing to mention: we nowadays initialize
terminals both with ioctl() and with ansi sequences. But the latter
means we need an fd that is open for *write* (since we are *writing*
those ansi sequences to the tty). Hence, resetting via the input fd is
conceptually wrong, it worked only so far if we had O_RDWR open mode
selected)
2024-07-19 11:44:04 +02:00
Lennart Poettering 27c067ceeb execute: reorder "destructive" tty reset operations
Let's make sure to first issue the non-destructive operations, then
issue the hangup (for which we need the fd), then try to disallocate the
device (for which we don't need it anymore).
2024-07-19 11:44:04 +02:00
Lennart Poettering 85f3957072 exec-invoke: handle errno log message writing in write_confirm_error_fd() like we usually do 2024-07-19 11:44:04 +02:00
Lennart Poettering 83e5672f90 exec-invoke: save original stdin/stdout with O_CLOEXEC set
We turn off the flag anyway when we install them back as stdin/stdout
later (via dup2()). let's hence follow our usual rules, and turn on
O_CLOEXEC.
2024-07-19 11:44:04 +02:00
Lennart Poettering 3f2e8e951a execute: also hook up ansi-seq-based terminal size determination with exec_context_determine_size()
And while we are at it, merge exec_context_determine_tty_size() +
exec_context_apply_tty_size().

Let's simplify things, and merge the two funcs, since the latter just
does one more call.

At the same time, let's make sure we actually allow passing separate
input/output fds.
2024-07-19 11:44:04 +02:00
Lennart Poettering 967bcc6e26 tree-wide: reset stdout not stdin
We nowadays reset TTYs by writing ANSI sequences to them. This can only
work if we operate on an *output* fd, not an input fd. Hence switch
various cases where we erroneously used an input fd to use an output fd
instead.
2024-07-19 11:44:04 +02:00
Lennart Poettering 45d785dfc0 terminal-util: refactor vt_disallocate()
Numerous fixes:

1. use vtnr_from_tty() to parse out VT number from tty path
2. open tty for write only when we want to output just ansi sequences
3. open tty in asynchronous mode, and apply a timeout, just to be safe
4. propagate error from writing (most callers ignore it anyway, might as
   well pass it along correctly)
2024-07-19 11:44:04 +02:00
Lennart Poettering 7147e10c9e terminal-util: move acquire_terminal() and AcquireTerminalFlags back together in header file 2024-07-19 11:44:04 +02:00
Lennart Poettering 061b445828 terminal-util: simplify terminal_set_size_fd() a tiny bit 2024-07-19 11:44:04 +02:00
Lennart Poettering b7120388f8 terminal-util: split out color macros/helpers into its own header
This is a lot of stuff, and sometimes quite wild, let's turn this into
its own header.

All stuff color-related that just generates sequences is now in
ansi-color.h (no .c file!), and everything more complex that
probes/ineracts with terminals remains in termina-util.[ch]
2024-07-19 11:44:04 +02:00
Lennart Poettering 1ca3924827 terminal-util: remove terminal_vhangup() because apparently unused 2024-07-19 11:44:04 +02:00
Lennart Poettering ac508b1173 terminal-util: rename return parameters ret_xyz 2024-07-19 11:44:04 +02:00
Lennart Poettering af1d3a6d92 terminal-util: modernize vt_reset_keyboard() a bit 2024-07-19 11:44:04 +02:00
Lennart Poettering b61c015aeb terminal-util: don't export vt_reset_keyboard() + vt_default_utf8() 2024-07-19 11:41:43 +02:00
Lennart Poettering 524e1240ff terminal-util: modernize terminal_reset_ansi_seq() a bit
Let's update the commentary a bit. Also, use a time-out of 100ms rather
than 50ms for this, simply to unify on the same value used in
vt_disallocate() in a similar case.
2024-07-19 11:41:43 +02:00
Lennart Poettering e2216800c5 terminal-util: don't export terminal_reset_ioctl()/terminal_reset_ansi_seq() anymore
We only use them in terminal-util.c, hence make them static (and move
them before their first using function).
2024-07-19 11:41:43 +02:00
Lennart Poettering 5a4e541779 terminal-util: rename reset_terminal_fd() → terminal_reset_ioctl()
Let's put "terminal_" as prefix, like with the other reset calls, and
let's make clear that this only encapsulates the ioctl-based reset
logic, not the ANSI sequence based reset logic.
2024-07-19 11:41:43 +02:00
Lennart Poettering 12f1b0134a terminal-util: remove reset_terminal() as it is unused 2024-07-19 11:41:43 +02:00
Lennart Poettering 841eb9c186 terminal-util: don't issue "ESC c" sequence on reset, but only when erasing the screen
ESC c is a (vaguely defined) "reset to initial state" ANSI sequence.
Many terminals clear the screen in this case, but that's a bit drastic I
think for most resets.

ESC c was added to the reset logic in
00bc83a275 (i.e. very recently), and I
don't think the effect was clear at that time.

Let's keep the ESC c in place however when we actually want to clear the
screen. Hence move it from reset_terminal_fd() into vt_disallocate().

Fixes: #33689
2024-07-19 11:41:43 +02:00
Lennart Poettering cfac09083b terminal-util: add new helper terminal_reset_defensive() that combines reset-by-ioctl and reset-by-sequence reasonably 2024-07-19 11:41:43 +02:00
Lennart Poettering ce3a1593bc terminal-util: add terminal_is_pty_fd() helper
The helper checks if an fd references a pty
2024-07-19 11:41:43 +02:00
Lennart Poettering 2736295ddb terminal-util: unify code that resets /dev/console in common helper
We have pretty much the same code at two places, let's make it one.
2024-07-19 11:41:43 +02:00
Lennart Poettering 963e25c23b terminal-util: reset /dev/console via ansi seq also in make_console_stdio()
This appears to have been the intention of
00bc83a275, judging by the comments on
that.
2024-07-19 11:41:43 +02:00
Lennart Poettering f6927e3c98 terminal-util: try to initialize rows/cols via ansi sequence in make_console_stdio()
Let's hook this up.
2024-07-19 11:41:43 +02:00
Lennart Poettering 63c631d7e2 terminal-util: add helper that adjust terminal width/height from data acquired via ANSI sequences 2024-07-19 11:41:43 +02:00
Lennart Poettering 3390be38d1 terminal-util: add helper that queries terminal sizes via ANSI sequence
When we are talking to a serial terminal quite commonly the dimensions
are not set properly, because the serial protocol has not handshake or
similar to transfer this information.

However, we can derive the dimensions via ANSI sequences too, which
should get us the right information, since ANSI sequences are
interpreted by the final terminal, rather than an intermediary local tty
driver (which is where TIOCGWINSZ is interpreted).

This adds a helper call that gets the dimensions this way.
2024-07-19 11:41:43 +02:00
Lennart Poettering 53f0ab5151 terminal-util: rename set_terminal_cursor_position() → terminal_set_cursor_position()
Let's prefix these functions with the subsystem name, and clean them up
a bit. Specifically, drop the error logging, it's entirely duplicative,
since every single caller does it anyway.
2024-07-19 11:41:43 +02:00
Lennart Poettering 445e57387e terminal-util: when querying bg color, ensure input fd and output fd refer to same tty
Let's add an extra safety check: before issuing the ansi sequence to
query the bg color, let's make sure input and output fd actually
reference the same tty. because otherwise it's unlikely we'll be able to
read back the response from the tty driver.

This is mostly just paranoia.
2024-07-19 11:41:43 +02:00
Lennart Poettering 0e08325baa terminal-util: remember error code from tcsetattr() 2024-07-19 11:41:43 +02:00
Lennart Poettering 1c685216f4 terminal-util: turn off echo on stdin, not stdout
This doesn't make much of a different IRL, but it feels more right that
an operation that happens in input is turned off via the input fd.
2024-07-19 11:41:43 +02:00
Lennart Poettering 1df569b2e6 terminal-util: don't process the same data twice when reading back bg color info
If we only read partial information from the tty we ended up parsing it
again and again, confusing the state machine. hence, return how much
data we actually processed and drop it from the buffer.
2024-07-19 11:41:42 +02:00
Lennart Poettering 4c8c499e2c terminal-util: return correct error in chvt() 2024-07-19 11:41:42 +02:00
Lennart Poettering 9a5e421af5 terminal-util: refuse a few more unexpected open flags in open_terminal() 2024-07-19 11:41:42 +02:00
Lennart Poettering 845be16ffd terminal-util: trivial white space fix 2024-07-19 11:41:42 +02:00
Lennart Poettering cc915eefaf env-util: suppress unnecessary setenv() in setenvf() 2024-07-19 11:41:42 +02:00
Lennart Poettering 95a8308d53 vmspawn: make "-n" just work
The tap network device should be called "vt-", so that that the
80-vm-vt.network file we ship by default actually matches against it.

Also, turn off any qemu callout stuff, networkd is smart enough to
handle all this on its own, without ugly callouts.
2024-07-19 11:38:46 +02:00
Luca Boccassi 68d939350f
Merge pull request #33591 from teknoraver/o_path
use O_PATH when possible
2024-07-19 11:01:01 +02:00
Luca Boccassi 433b9a6884
Merge pull request #33770 from bluca/polkit-root
polkit: map POLKIT_ALWAYS_QUERY to new polkit flag
2024-07-19 10:57:07 +02:00
Lucas Werkmeister 8c4aa0f1c6 man: Mention Type=oneshot timeout directive
Make the warning for oneshot services (where RuntimeMaxSec= has no
effect) more actionable by pointing to the directive people can use
instead to effectively limit their runtime.
2024-07-19 09:39:51 +02:00
Luca Boccassi 20de757b69
Merge pull request #33773 from kovalev0/fix_aquarius_cmp_ns483_keyb_and_sensor
Fix aquarius cmp ns483 keyboard and sensor
2024-07-18 22:28:23 +02:00
Vasiliy Kovalev 3585e55881 hwdb: add backslash and touchpad toggle mapping for Aquarius Cmp NS483
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-07-18 22:07:36 +03:00
Vasiliy Kovalev 8891f9332f hwdb: fix accelerometer mount matrix for Aquarius Cmp NS483
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-07-18 22:07:33 +03:00
Luca Boccassi d108c2d157
Merge pull request #33767 from keszybz/test-ukify-nicer
Make test_ukify not use a real initrd
2024-07-18 17:59:55 +02:00
Luca Boccassi b61d69fae0 polkit: fix typo in enum name 2024-07-18 16:43:56 +01:00
Léane GRASSER 0d8b38415c l10n: fix credits for the French translation 2024-07-18 17:14:48 +02:00
Luca Boccassi 5c48335ef4 polkit: map POLKIT_ALWAYS_QUERY to new polkit flag
polkitd by default just waves through requests from a root process.
A new POLKIT_CHECK_AUTHORIZATION_FLAGS_ALWAYS_CHECK flag was added
to main (will be part of v125 when it ships) that forces it to go
through the policy checks for root too. Previous versions will just
ignore it.

Change the flags handling slightly so that we pass this or the
interactive flags through, as the values match what polkit expects.
2024-07-18 16:11:26 +01:00
Daan De Meyer 4698411ff3
Merge pull request #33763 from DaanDeMeyer/mkosi
mkosi: Two fixlets
2024-07-18 16:43:15 +02:00
Lennart Poettering 46b89b83e3 ptyfwd: reset color after two tty reset sequences, too
When we patch in a bg color we must make sure that when certain "reset"
sequences are transferred we fix up the bg color again.

Do so for \033[!p ("soft terminal reset") and \033c ("reset to initial
state" aka "full reset").
2024-07-18 15:41:33 +02:00
Zbigniew Jędrzejewski-Szmek a669091a43 test_ukify: add instructions
Copied directly from a1d6dbb1c9.
2024-07-18 15:04:28 +02:00
Zbigniew Jędrzejewski-Szmek 87204601df test_ukify: use sha384 in the signing tests
On Fedora, with crypto policy TEST-FEDORA41, sha1 is not allowed:

$ SYSTEMD_LOG_LEVEL=debug build/systemd-measure sign
  --linux=/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
  --osrel=/tmp/tmp.osrelbl2sr77f
  --cmdline=/tmp/tmp.cmdlineouc7hqtj
  --uname=/tmp/tmp.unamecbjgesty
  --pcrpkey=/tmp/tmpufiadu8l
  --initrd=/boot/3a9d668b4db749398a4a5e78a03bffa5/6.9.7-200.fc40.x86_64/initrd
  --sbat=/tmp/tmp.sbataz9arpy0
  --private-key=/tmp/tmppyf0gx6w
  --public-key=/tmp/tmpufiadu8l
  --bank=sha1
Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready
Loaded 'libtss2-esys.so.0' via dlopen()
Loaded 'libtss2-rc.so.0' via dlopen()
Loaded 'libtss2-mu.so.0' via dlopen()
PolicyPCR calculated digest: cec1a2ccb188ddd171a2be7bfa6b31cb9148776647354eb1069e0f891ed2dbe7
Failed to initialize signature context: error:03000098:digital envelope routines::invalid digest
Failed to sign PCR policy: Input/output error
2024-07-18 15:04:28 +02:00
Zbigniew Jędrzejewski-Szmek 987f4bce93 test_ukify: do not use files from /boot
They might not be readable to the unprivileged user running the tests
and it shouldn't really matter what is used. OTOH, we need a real kernel
because we look at the header.
2024-07-18 15:04:28 +02:00
Luca Boccassi dbc66f87b3 mkosi: update debian commit reference
* 2d10c12bd5 Drop /etc/sysctl.d/99-sysctl.conf symlink
* fb73af0d22 update changelog
* 9d74923dd7 Move systemd-time-wait-sync to systemd-timesyncd package
* 8e0914aa0d Update changelog for 256.2-1 release
* 6dabf74a81 Install run0 zsh completion file
*   a72e454b2b Update upstream source from tag 'upstream/256.2'
|\
| * cf928e099f New upstream version 256.2
* c473d940f7 d/e/checkout-upstream: switch packaging branch on upstream stable PRs
* 13586fc76f d/e/checkout-upstream: do not fail if rebase fails
* 19785960d1 d/e/checkout-upstream: fix shellcheck warnings
* 72b215c3f0 Install zsh completion for run0
* 51f87a981e initramfs-tools: copy network drop-ins too
2024-07-18 14:53:17 +02:00
Daan De Meyer 2315c6996f mkosi: Fix indentation 2024-07-18 13:01:27 +02:00
Daan De Meyer ac31804db7 mkosi: Fix typo
Our config parsing is flexible enough that this kind of worked surprisingly
enough.
2024-07-18 12:53:53 +02:00
Daan De Meyer 91cc65c5ad mkosi: Drop util-linux from centos/fedora packages
It's already included in the packages list in mkosi.conf.
2024-07-18 12:51:44 +02:00
Daan De Meyer 1d914b268c mkosi: Drop udev from Packages= list
It's pulled in via VolatilePackages=, no need to put it in Packages=.
2024-07-18 12:48:48 +02:00
Daan De Meyer 1250dc6a1d mkosi: Fix formatting
All of our lists start on the next line, so let's make KernelCommandLine=
fit that as well.
2024-07-18 12:47:51 +02:00
Daan De Meyer 20e943f987
Merge pull request #33761 from DaanDeMeyer/mkosi
mkosi: Various NO_BUILD improvements
2024-07-18 12:46:58 +02:00
Daan De Meyer 773f2e9633 mkosi: Build CentOS Stream 10 images by default
CentOS Stream 10 has a newer util-linux which means the terminal
gets correctly resized to the size specified by mkosi. This is a
much nicer experience than CentOS Stream 9 where you're stuck on
80x24 so let's make CentOS Stream 10 the default release to build.
2024-07-18 11:52:01 +02:00
Lennart Poettering 1717a939be update TODO 2024-07-18 11:40:10 +02:00
Daan De Meyer d279ec4a50 mkosi: Streamline running the integration tests without building systemd
Let's document in detail how to build the integration test image and run
the integration tests without building systemd. To streamline the process,
we stop automatically using binaries from build/ when invoking mkosi directly
and don't automatically use a tools tree anymore if systemd on the host is too
old. Instead, we document these options in HACKING.md and change the mkosi meson
target to automatically use the current build directory as an extra binary search
path for mkosi.
2024-07-18 11:39:07 +02:00
Daan De Meyer bb8f6ac445 mkosi: Skip sync script if NO_BUILD is enabled
If we're not doing a build, there's no point in syncing either so
lets skip it.
2024-07-18 11:17:42 +02:00
Mike Yuan bbddfe5249
Merge pull request #33092 from YHNdnzj/freezer-cleanup
UnitFreezer: several cleanups
2024-07-17 23:45:32 +02:00
Lennart Poettering a68c97a545 sd-device: remove debug log message when dirs are missing
This is a common case, and nothing noteworthy at all. For example, if we
establish an enumerator for listing all devices tagged by some tag, then
the per-tag dir is not going to exist if there are currently no devices
tagged that way, but that's a really common case, and doesn't really
deserve any mention, not even at debug level.
2024-07-17 23:05:12 +02:00
Lennart Poettering f499191c2e main: show different welcome msg in initrd than on the host
It has bugged me for a while that we show the exact same welcome message
at boot twice: once in the initrd, and once after the initrd→host
transition. That's very confusing.

Let's change the text a bit, and tone down the initrd message a bit (by
removing the empty line before and after it), because it is the less
relevant one.
2024-07-17 23:04:46 +02:00
Lennart Poettering ddc6f19e93 varlink-util: minor tweak
Apparently I forgot that in the initial PR. Fix that.

https://github.com/systemd/systemd/pull/33714#pullrequestreview-2177885475
2024-07-17 23:04:28 +02:00
Lennart Poettering 5d6658deec
Merge pull request #33609 from AdrianVovk/table-json
Improve table JSON name mangling
2024-07-17 23:03:54 +02:00
Adrian Vovk c82dfaf7e2
table: Fix JSON name mangling breaking changes
In previous commits, we've changed the JSON name mangling logic. This,
of course, will cause breaking changes to occur on anything that relied
on the JSON mangling logic.

This commit fixes those breaking changes by manually forcing the JSON
name back to what it was before.
2024-07-17 14:15:44 -04:00
Adrian Vovk c4cb49eb34
table: Improve mangling of JSON field names
First, when displaying JSON we convert dashes into underscores. We want
to avoid using dashes in JSON field names in new code, because some
JSON parsers don't support dashes very well.

Second, we make the first character of every word lower-case. This
better matches our JSON field name style, and makes the automatic
JSON name mangling a lot more useful for vertical tables, where fields
are given a display name. For example, "Foo Bar" would be converted into
"foo_bar" instead of "Foo_Bar", which much better matches our style.
We don't make the whole string lowercase to support cases like:
"fooBar" should stay as "fooBar".

Some situations don't behave quite perfectly, such as "Foo BarBaz" gets
converted into "foo_barBaz", or all-caps headings get mangled
incorrectly. In these situations, the JSON field should be overridden
manually. In most cases, or at least more cases than before, this
heuristic does good enough.
2024-07-17 14:15:43 -04:00
Adrian Vovk bf01601f11
table: Add TABLE_SET_JSON_FIELD_NAME
Lets you conveniently set JSON field names in table_add_many. Especially
useful for vertical tables. For example:

table_add_many(t,
               TABLE_FIELD, "Display Name",
               TABLE_STRING, obj->display_name,
               TABLE_SET_JSON_FIELD_NAME, "displayName",
               TABLE_FIELD, "Timestamp",
               TABLE_TIMESTAMP, obj->timestamp,
               TABLE_SET_JSON_FIELD_NAME, "timestampUSec");
2024-07-17 14:15:41 -04:00
Daan De Meyer 473747b8cf
Merge pull request #33752 from DaanDeMeyer/lsm
Two mkosi improvements
2024-07-17 20:15:17 +02:00
Daan De Meyer f5c44df929 mkosi: Remove enforcing=0 from default kernel command line
We already have selinux=0 in the default kernel command line so
enforcing=0 is redundant. Instead, pass in enforcing=0 when we
enable selinux in TEST-06-SELINUX.
2024-07-17 18:56:02 +02:00
Daan De Meyer 5319be5f0c mkosi: Stop setting apparmor=0
It doesn't get pulled in as a dependency anyway and kernel command
line space is precious so let's remove apparmor=0 as it's a noop
anyway.
2024-07-17 18:55:24 +02:00
Mike Yuan b1ed7e6749
sleep,home: always initialize UnitFreezer if used
Previously, unit_freezer_new_freeze() would only return
UnitFreezer object if FreezeUnit() succeeds. This is not
ideal though, as a failed bus call doesn't mean the action
actually failed. E.g. a timeout might occur because pid1
is waiting for cgroup event from kernel, while the bus call
timeout was exceeded (#33269). In such a case, ThawUnit()
will never be called, resulting in frozen units remain that
way after resuming from sleep.

Therefore, let's get rid of unit_freezer_new_freeze(),
and make sure as long as unit freezer is involved, we'll
call ThawUnit() when we're done. This should make things
a lot more robust.
2024-07-17 18:14:33 +02:00
Mike Yuan 1b5caddfee
sleep: also log about errno when getenv_bool fails 2024-07-17 18:14:33 +02:00
Mike Yuan a99935557a
sleep: explicitly list valid sleep operations in switch
To follow our usual coding style.
2024-07-17 18:14:32 +02:00
Mike Yuan 6798fa11d2
core/dbus-unit: add an explicit bus error when unit is frozen by parent
While at it, use more accurate errno (EDEADLK) instead of ECHILD.
2024-07-17 18:14:32 +02:00
Mike Yuan e1ac52594d
core/unit: introduce unit_freezer_complete, correctly report end state 2024-07-17 18:14:32 +02:00
Mike Yuan 0064290a54
core/unit: introduce unit_set_freezer_state, make logging consistent
Also, emit PropertiesChanged signal for FreezerState too.

Fixes #31115
2024-07-17 18:14:32 +02:00
Mike Yuan a9dc196179
core/cgroup: skip freezer action wholly if current == objective 2024-07-17 18:14:31 +02:00
Mike Yuan 27344f9acf
core/cgroup: replace hardcoded state set with freezer_state_finish()
This makes code simpler and more readable.
2024-07-17 18:14:31 +02:00
Mike Yuan 54e1f676a2
core/unit: rename a few more vars for unit_next_freezer_state() 2024-07-17 18:14:31 +02:00
Luca Boccassi 09edabe96a id128: add 'var-partition-uuid' verb
As per DPS the UUID for /var/ should be keyed by the local machine-id,
which is non-trivial to do in a script. Enhance 'systemd-id128' to
take 'var-partition-uuid' as a verb, and if so perform the
calculation.
2024-07-17 18:05:40 +02:00
Mike Yuan aba5e4660f
core/unit: use switch for unit_next_freezer_state 2024-07-17 17:25:23 +02:00
Mike Yuan f27f461b01
core/unit: rename freezer "target" to "objective" 2024-07-17 17:25:23 +02:00
Mike Yuan f375a9686f
core/slice: simplify slice_freezer_action a bit 2024-07-17 17:25:23 +02:00
Mike Yuan b21bebbe70
core: make unit_can_freeze take const Unit* 2024-07-17 17:25:22 +02:00
Mike Yuan 21fed6eaec
core,unit-def: use our usual way of asserting enums 2024-07-17 17:25:22 +02:00
Mike Yuan e2f81f8d40
core/unit: drop pointless unit_freezer_state wrapper 2024-07-17 17:25:22 +02:00
Mike Yuan 4e8b11ca16
core/dbus-unit: use UNIT_IS_LOAD_ERROR where appropriate 2024-07-17 17:25:20 +02:00
Daan De Meyer d9b1ec27f7
Merge pull request #33714 from poettering/make-varlink-public
varlink: make API public as "sd-varlink.h"
2024-07-17 12:58:50 +02:00
migleeson cb2d6214ca
docs: update mkosi version mentioned in HACKING.md (#33723)
* fix: update docs since the default config uses a setting only available in v23

* fix: update docs to only refer to installing from the mkosi repo
2024-07-17 09:45:26 +02:00
Hans de Goede fd820e76e4 rules: Add uaccess tag to /dev/udmabuf
In some cases userspace may need to create dmabuffers from userspace
on such example is the software ISP part of libcamera which needs to
allocate dma-buffers for the output of the software ISP.

At first the plan was to allow console users access to /dev/dma_heap/*,
this was discussed with various kernel folks here:
https://lore.kernel.org/all/bb372250-e8b8-4458-bc99-dd8365b06991@redhat.com/

Giving console users access to the dma_heap's was deemed a bad idea
because memory allocated this way is not accounted in cgroup limits.

Giving access to /dev/udmabuf OTOH was deemed acceptable so that
is what this patch adds.

Resolves: #32662
2024-07-17 09:36:45 +02:00
Mike Yuan fa96c55b7b id128: refuse --app-specific= if we're listing GPT types
Prompted by #33737

The intention of b37e8184a5
is to expose sd_id128_get_app_specific() on command line.
But combining that with GPT type list makes little sense.
2024-07-17 09:35:58 +02:00
Luca Boccassi f0b151ce86 gpt: add more architecture aliases
Same as the other aliases. Allows chaining commands like:

$ systemd-id128 show -P root-$(dpkg-architecture --query DEB_HOST_ARCH)
4f68bce3e8cd4db196e7fbcaf984b709
2024-07-16 23:12:48 +02:00
Matteo Croce cfa477b615 homed: open blob dir with O_PATH
`sys_base_dfd` is only used as dirfd argument to *_at functions,
open it with O_PATH.
2024-07-16 15:03:37 +02:00
Matteo Croce 2bae668311 homed: use O_PATH for FDs
`Home->pin_fd` is used only for pinning, open it with O_PATH.
2024-07-16 15:03:37 +02:00
Matteo Croce e51d8e0aa4 use O_PATH to get the root fds
`switch_root()` opens two file descriptors to do the switch but never
reads from them. Open them with O_PATH.
2024-07-16 15:03:37 +02:00
Matteo Croce b22befa9f5 use O_PATH to obtain cgroupfs fd
We get a fd to cgroupfs just to avoid it being umounted, O_PATH
is enough, use it instead of O_RDONLY.
2024-07-16 15:03:37 +02:00
Matteo Croce 572e163ef5 use O_PATH when getting cgroup fd
O_PATH mode is enough to attach a bpf program to a cgroup, use it
instead of O_RDONLY
2024-07-16 15:03:37 +02:00
Daan De Meyer b209fff3a5 mkosi: List library packages explicitly in VolatilePackages=
These should already get pulled in as dependencies, but it doesn't
hurt to be explicit.
2024-07-16 14:53:55 +02:00
Daan De Meyer 68ee977114 mkosi: Build initrd as a subimage
Let's make things a little more consistent and build the initrd
explicitly as a subimage as well instead of relying on mkosi building
it as part of the main image build.

We drop the opensuse initrd postinst script as we don't use erofs by
default anymore. We can always reintroduce it again later if needed.
2024-07-16 13:59:47 +02:00
Daan De Meyer 244952b1ea mkosi: Drop CacheOnly=always from two subimages
This is a universal setting and can only be configured in the main
image so let's drop it from the subimages.
2024-07-16 12:14:32 +02:00
Lennart Poettering 2abad25b41 update TODO 2024-07-16 11:57:32 +02:00
Lennart Poettering 15d19cf86f sd-json/sd-varlink: downgrade assert() → assert_ret()
Our usual rule is that we are more lenient towards misuse for public
users of our code than for ourselves. Or in other words: when validating
parameters of our public functions (those starting with sd_…) we prefer
assert_ret() over assert().
2024-07-16 11:57:32 +02:00
Lennart Poettering 92100f14c3 libsystemd: use C23 explicit enum types where available
In C23 we can explicitly choose the integer type for an enum. Let's do
so to make our requirements for 64bit integers explicitly. Previously,
we'd rely on a GNU extension that would size the enum to 64bit if at
least one value outside the 32bit range is in the enum. Let's keep that
too, for compat with older compilers.

(Also, add the support for older compilers to the definition of
sd_json_dispatch_flags_t, where it was forgotten so far)
2024-07-16 11:57:32 +02:00
Lennart Poettering 25ff515b39 sd-varlink: make our internal Varlink API public as sd-varlink.[ch]
It's time. sd-json was already done earlier in this cycle, let's now
make sd-varlink public too.

This is mostly just a search/replace job of epical proportions.

I left some functions internal (mostly IDL handling), and I turned some
static inline calls into regular calls.
2024-07-16 11:57:32 +02:00
Daan De Meyer 923eeb38fb
Merge pull request #33695 from DaanDeMeyer/epel
mkosi: Add CI for CentOS Stream 10
2024-07-16 11:43:49 +02:00
Daan De Meyer 5ac0dc70ff TEST-13-NSPAWN: make sure we don't load libnss_systemd
Let's make sure we don't load libnss_systemd.so from bash as the
necessary environment variables aren't set to make that work when
we're running with sanitizers enabled.

We can't add a sanitizer wrapper for bash as the wrapper runs using
bash so you end up in a loop.
2024-07-16 09:42:17 +02:00
Daan De Meyer 88221219a3 mkosi: Disable unique debug source names
We use -fdebug-prefix-map= because debugedit doesn't work for us (for
a currently unknown reason since it's the most obtuse code I've ever
had the pleasure of reading). With all the unique macros enabled, the
destination directory we pass to -fdebug-prefix-map= includes the package
release. The release is either the timestamp of the current commit or
the current time if the working tree is dirty. This means it generally
changes every time we rerun the build script. However, meson only reads
compiler arguments the first time it is invoked or if --wipe is specified.
This means that on a rerun -fdebug-prefix-map= will be configured wrong
and the build will fail.

Let's prevent this from happening by disabling the unique debug source
names by overriding the --unique-debug-src-base option that is passed to
find-debuginfo.sh by rpm via the _find_debuginfo_opts macro.
2024-07-16 09:41:22 +02:00
Ivan Shapovalov daa453acbe analyze: capability: cosmetic, fix error message spelling 2024-07-16 07:15:16 +02:00
Daan De Meyer 985d5b4bc2 systemd-networkd-tests: Skip tests requiring dhcpd if it is not available
dhcpd is not available on CentOS Stream 10

See https://github.com/systemd/systemd/issues/33717
2024-07-15 16:17:33 +02:00
Daan De Meyer f65ec2e904 TEST-55-OOMD: Remove the opensuse user@ dropin
Required to make TEST-55-OOMD pass on OpenSUSE.
2024-07-15 16:17:33 +02:00
Daan De Meyer a1071c1249 mkosi: Install binutils 2024-07-15 16:17:33 +02:00
Daan De Meyer d97b48176b TEST-64-UDEV-STORAGE: Use max_ioqpairs instead of num_queues
Fixes a deprecation warning from qemu.
2024-07-15 16:17:33 +02:00
Daan De Meyer 6e212a6db9 mkosi: Use clang --print-runtime-dir 2024-07-15 16:17:33 +02:00
Daan De Meyer 54ab97e59d mkosi: Extend arch build script comment about symlinks 2024-07-15 16:17:33 +02:00
Daan De Meyer ff8c89aa5a test: do not attempt to set xattr on tmpfs
This is only possible since a recent kernel version, and fails otherwise,
like on CentOS 9
2024-07-15 16:17:33 +02:00
Daan De Meyer 8b32cc79ec mkosi: Add CI for CentOS Stream 10
We switch to the c10s-sig-hyperscale branch of the spec repository
as it will receive all the latest changes the earliest before they
end up in the c9s-sig-hyperscale branch.
2024-07-15 16:17:33 +02:00
Daan De Meyer 3cfb020cb9 mkosi: Use squashfs for sysext if mkfs.erofs is not available
CentOS Stream 10 does not have erofs-utils so let's add a fallback
to squashfs when building the sysext.
2024-07-15 16:17:33 +02:00
Daan De Meyer 0e4a7ab6d5 mkosi: Make epel repositories optional for CentOS Stream 9
This allows us to add CI for CentOS Stream 10 as EPEL 10 doesn't
exist yet and won't exist for quite some time.

CentOS Stream 10 will be enabled later as soon as
https://issues.redhat.com/browse/RHEL-46604 is resolved.
2024-07-15 16:17:33 +02:00
Daan De Meyer 7205fc7dc3 mkosi: Introduce build image
We want the exitrd image to be built with the latest systemd as well.
As the exitrd image is built as part of mkosi.images, and all subimages
are built before the main image, this implies the packages must be built
as a subimage in mkosi.images/ as well. So we introduce the build image and
move all logic related to building distribution packages there.

This also has the nice side effect of slimming down the main image as the
build dependencies are not installed into the main image anymore. It also
makes sure the packages are built in a "clean" chroot without any of the
other packages which we install in the main image available.
2024-07-15 16:17:33 +02:00
Daan De Meyer 72a8f508e5 mkosi: update fedora commit reference
* a3524fc837 Use a more precise Recommends for libkxbcommon
* 980ede8c0f Drop machined revert
* d569018a92 Rebuilt for the bin-sbin merge
* 8881fa94ee Version 256.2
* 1cc4f83002 Link systemd-executor statically
* 0319e62d9c Update dracut workaround
* c96f54de22 Fix ELN build
* 3f68c5d802 Only exclude dracut conflicts on non-fedora on upstream builds
* 7db154308b Conditionalize dracut Conflicts more
2024-07-15 16:17:33 +02:00
Daan De Meyer 9e8cfe5daa mkosi: Update to latest 2024-07-15 16:17:31 +02:00
Sean Rhodes d350651c47 Revert "hwdb: Added StarLabs StarLite position sensor mapping"
This reverts commit 1bd5db86f5.

The `kxcjk-1013` driver in Linux will parse the rotation matrix
from ACPI. This quirk is not specific enough to exist without
causing issues on different variations.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
2024-07-15 12:34:08 +02:00
Lennart Poettering 4eca398c34
Merge pull request #33718 from YHNdnzj/machine-id-followup
core/main: several cleanups
2024-07-15 11:16:59 +02:00
Abderrahim Kitouni 22b414f185 sysupdate: fix return types according to style guide 2024-07-15 10:18:41 +02:00
chayleaf 21aa180b4a fstab-generator: add x-systemd.wants
This is an analog of x-systemd.requires that adds a Wants dependency
instead. This is useful for filesystems that support mounting in
degraded states (such as multi-device filesystems).
2024-07-15 10:18:18 +02:00
Jörg Behrmann 99d4575e54 kernel-install: Remove existing loader entries and UKIs
When boot counting is enabled, adding a new loader entry or UKI can conflict
with an existing one that has booted successfully and therefore has its boot
counter removed. systemd-bless-boot will fail to bless the new successful boot,
since a file without a boot counter already exists. Since kernel-install will
clobber existing files without boot counting, we should therefore remove files
without a boot count as well, when we add a file with one.

Fixes: #33504
2024-07-15 10:16:36 +02:00
Abderrahim Kitouni a31d32f6c4 sysupdate: fix size_t specifier 2024-07-15 10:15:13 +02:00
Mike Yuan 87c4f0f824
core/main: refuse to run if /usr/ is not populated
The support for split-usr has been dropped in v255.
So, rather than emitting a warning, let's refuse
such unsupported setups completely.
2024-07-13 22:58:24 +02:00
Mike Yuan 2bff236e70
core/main: move capability_ambient_set_apply() to initialize_runtime()
This is preparation for (user) manager, and we apply capability
settings for the system manager in initialize_runtime() too.
2024-07-13 22:58:24 +02:00
Mike Yuan 9100325690
core/main: respect skip_setup for RUNTIME_SCOPE_USER too 2024-07-13 22:58:24 +02:00
Mike Yuan 0acf4dfef5
core/main: merge second RUNTIME_SCOPE_SYSTEM block into switch above 2024-07-13 22:58:23 +02:00
Mike Yuan 20817cd272
core/main: modernize setup_os_release() a bit 2024-07-13 22:58:23 +02:00
Mike Yuan 0c7a2a5542
core/main: cast ignored retval of machine_id_setup() to void 2024-07-13 22:58:23 +02:00
Mike Yuan efa7a5cfe4
core/import-creds: use proc_cmdline_get_bool() 2024-07-13 22:58:23 +02:00
Mike Yuan 497b17bbad
core/import-creds: use FOREACH_ARRAY and RET_GATHER where appropriate 2024-07-13 22:58:23 +02:00
Mike Yuan 77c3e07f93
basic/mkdir: merge two if blocks, return more accurate errno 2024-07-13 22:58:22 +02:00
Merlin Jehli 274a38c79a
machine-id: Add cmdline argument to use VM behaviour on bare metal (#32086)
Closes #30707
2024-07-13 18:00:16 +02:00
Luca Boccassi e21333611a
Merge pull request #33711 from dtardon/masked-unit-NeedDaemonReload
Fix `NeedDaemonReload=` for masked units with drop-ins
2024-07-13 14:22:05 +02:00
Mike Yuan 3addeada79 core/execute-serialize: fix deserialization for apparmor_profile_ignore
Follow-up for 99a1cdc951
2024-07-13 00:15:12 +02:00
Lennart Poettering dac77cae14
Merge pull request #33520 from tomcoldrick-ct/coldtom/sysupdate-improvements
sysupdate: Add --offline mode, notifications, JSON output and additional metadata
2024-07-12 19:12:41 +02:00
Mike Yuan 56f4ab2906 logind-user: take gc_mode into account when reporting user state
Prompted by #33650

Previously, if a user manually starts user@.service (which is
something we support), we'd track it as 'manager' session.
However, since user_get_state() ignores all non-pinning sessions,
if lingering is not enabled, the user state would always be
reported as 'closing', which is spurious.

Let's instead take gc_mode into consideration, and ignore
non-pinning sessions only if USER_GC_BY_PIN.
2024-07-12 18:32:53 +02:00
Mike Yuan 11b3775f51 core/unit: ignore dropins for masked units completely when checking need_reload
Follow-up for 19a44dfe45

If a drop-in is set from upper level, e.g. global unit_type.d/,
even if a unit is masked, its dropin_paths would still be partially
populated. However, unit_need_daemon_reload() would always
compare u->dropin_paths with empty strv in case of masked units,
resulting in it always returning true. Instead, let's ignore
dropins entirely here.

Fixes #33672
2024-07-12 15:59:36 +02:00
David Tardon 8b6de9e638 test: add a reproducer for #33672 2024-07-12 15:59:20 +02:00
Lennart Poettering 8f036c928e update TODO 2024-07-12 15:55:15 +02:00
Adrian Vovk 8ba9a9ac96
sysupdate: Split reboot_now into utils
This will let us reuse reboot_now in updatectl
2024-07-12 14:38:10 +01:00
Adrian Vovk 3f79921c08
sysupdate: Split UpdateSetFlags out from UpdateSet
This will let us reuse UpdateSetFlags in updatectl
2024-07-12 14:38:10 +01:00
Tom Coldrick 42e4659780
sysupdate: Use FOREACH_ARRAY where possible
Replace simple loops over arrays with the FOREACH_ARRAY macro.
2024-07-12 14:38:09 +01:00
Adrian Vovk db8849f2d4
sysupdate: Support changelogs & appstream metadata
Makes it possible to specify URLs to a changelog and an appstream
catalog XML in the sysupdate.d/*.conf files. This will be passed along
to the clients of systemd-sysupdated, which can then present this data.
2024-07-12 14:38:09 +01:00
Adrian Vovk 42c0b689a8
sysupdate: Implement JSON output
Previously, the JSON output happened mostly as an accident (i.e. just
dumped tables intended for viewing). Now we have more complete JSON
output.
2024-07-12 14:38:09 +01:00
Adrian Vovk c0d6186227
sysupdate: Add --offline mode
This prevents sysupdate from going out to the network to enumerate
available instances. When combined with the list command, this lets us
query installed instances
2024-07-12 14:38:09 +01:00
Adrian Vovk 8db5e9b657
sysupdate: Report download progress via sd_notify
We set up a NOTIFY_SOCKET to get download progress notifications from
each individual import helper. Along with the number of import jobs we
have to run, this gives an overall progress value which we report using
sd_notify
2024-07-12 14:38:09 +01:00
Lennart Poettering e37164cafc stub: const'ify a few parameters 2024-07-12 09:50:23 +02:00
Daan De Meyer d13615b7e0
Merge pull request #33686 from poettering/boot-tweaklets
boot/bootspec: some minor fixes/additions
2024-07-12 09:50:07 +02:00
Daan De Meyer aa6ebdd909
Merge pull request #33697 from poettering/vmspawn-stream-fix
vmspawn: fix AF_VSOCK sd_notify() reception
2024-07-12 08:33:18 +02:00
Lennart Poettering 0bd7217634 signal-util: use common definitions for ignore + default "struct sigaction"
We use this at various places, let's unify this in one global constant.

This changes flags in crash-handler.c in a tiny irrelevant way: we ask
syscalls to be continued on signal arrival, which we previously didn't.
But that shouldn't change anything, the only thing we'll do in the
relevant process is call raise(), and that's it, hence there definitely
are no syscalls to restart or not to restart.
2024-07-12 08:26:15 +02:00
Lennart Poettering 7b7f4c2608 bootspec: correct log level for fatal errors 2024-07-12 06:30:22 +02:00
Lennart Poettering 35451a3204 bootspec: implement sorting by tries left/done, to match what sd-boot does 2024-07-12 06:30:22 +02:00
Lennart Poettering 764faf6040 boot: compare filename suffixes without case
This is VFAT world after all.
2024-07-12 06:29:45 +02:00
Lennart Poettering 8c6a7fa6d9 vmspawn: get rid of an unnecessary local variable 2024-07-12 06:27:45 +02:00
Lennart Poettering 862c68a914 vmspawn: rework how AF_VSOCK/SOCK_STREAM notifications are read
Stream sockets are stream sockets, i.e. they won#t give us the full data
right-away, we must buffer locally and read until we hit EOF. Hence do
so.

moreover, make sure to close the fd once we are done, otherwise the
sender might block on us.
2024-07-12 06:27:45 +02:00
Lennart Poettering 7eedec7307 manager: move is-system check into manager_enable_special_signals()
It's usually how we do this: make the functions robust to be called in
any context, and validate the context in the functions themselves early,
instead of in the caller.
2024-07-12 04:47:19 +02:00
Lennart Poettering 5202ee42d5 import-creds: when we hit ENOENT on SMBIOS 11 do not even debug log
We'll *always* hit ENEOENT when iterating through SMBIOS type #11
fields, on the last one. it's very confusing to debug log about that,
let's just not do it.
2024-07-12 04:45:29 +02:00
Mike Yuan 99a1cdc951 core/execute-serialize: drop duplicate serialization of _ignore flags
These are indicated by the leading '-' in corresponding
label fields already.
2024-07-11 23:36:39 +02:00
Mike Yuan a4eb462fa1 core/meson.build: move various -setup sources out of libcore
They're only used in main.c, i.e. pid1.
2024-07-11 23:34:07 +02:00
Daan De Meyer a86211b7ca mkosi: Switch back to code.opensuse.org for opensuse
The commits on src.opensuse.org keep disappearing so let's switch
back to code.opensuse.org.
2024-07-11 14:12:59 +02:00
Léane GRASSER 5a3f04bcee po: Translated using Weblate (French)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2024-07-11 13:47:04 +02:00
Daan De Meyer 14fb6354f1
Merge pull request #33636 from DaanDeMeyer/ext4
Various integration test improvements
2024-07-10 21:33:23 +02:00
Mike Yuan 8288417b74
Merge pull request #33559 from YHNdnzj/reenable-now
systemctl: support reenable --now plus some other cleanups
2024-07-10 19:14:25 +02:00
Daan De Meyer eb6f177ae4 mkosi: update opensuse commit reference
*   8c025c3bdf Accepting request 1184267 from Base:System
|\
| * 735f8c4ba4 - Import commit 5a8eadd0c021758337a020c423f25a353bdb9b3c (merge of v255.8)   For a complete list of changes, visit:   603cd1d4d8...5a8eadd0c0 - Drop 5003-Revert-run-pass-the-pty-slave-fd-to-transient-servic.patch as v255.8   contains the workaround (commit 639c922ede9485) for the broken commit   28459ba1f4.
* | 37853fecc3 Accepting request 1183029 from Base:System
|/
* 638de11012 - Don't automatically clean unmodified config files up (bsc#1226415)
* 369c023c24 reorder one more time...
* ffa9f0ac80 reorder the runtime deps of the testsuite package so the format_spec_file thingy stop screwing up the spec file...
* 12c1190a79 fix rev 1529: the devel packages are really needed by the testsuite script to install the dlopened libs into the image
* ca8e7f54ce - systemd.spec: move a misplaced %endif in the testsuite sub-package.
* b7944f5b14 - Merge systemd-coredump back into the main package (bsc#1091684)
* 3fa0dea84a - Don't pull the devel packages in when installing the testsuite package.
2024-07-10 18:52:29 +02:00
Daan De Meyer dfea7a8d26 tools/update-distro-hash: Fix path 2024-07-10 18:52:29 +02:00
Daan De Meyer dedd712dd9 TEST-06-SELINUX: Various fixes
- Stop installing the policy in the initramfs as it's not really
supported anyway (https://github.com/fedora-selinux/selinux-policy/issues/2221)
- Stop relabeling on first boot and prefer to do it at image build time
- Disable mkosi relabeling by default but enable it in CI
- Build image as root in CI so the SELinux relabeling works properly
2024-07-10 18:52:29 +02:00
Daan De Meyer 877842ed52 mkosi: Don't fail if /var/log/journal does not exist 2024-07-10 18:52:29 +02:00
Daan De Meyer e842deeac6 test: Switch to ncat instead of nc
ncat is available in CentOS Stream 9 without having to enable EPEL.
2024-07-10 18:52:29 +02:00
Daan De Meyer 3e3a15c06e TEST-55-OOMD: Switch to stress-ng
stress-ng is available in OpenSUSE and in CentOS Stream without needing
EPEL so let's switch to it instead of stress.
2024-07-10 18:52:26 +02:00
Daan De Meyer 00acdb3147 docs: Simplify update commands in HACKING.md
Let's make use of mkosi ssh to give everyone a one liner to run instead
of having to execute two commands (one outside the VM, one inside).
2024-07-10 17:17:42 +02:00
Daan De Meyer d5c3868181 mkosi: Update to latest 2024-07-10 16:52:54 +02:00
Daan De Meyer 0443f7e722
Merge pull request #33683 from DaanDeMeyer/sysext
mkosi: Build a sysext if SYSEXT=1 is specified
2024-07-10 13:21:12 +02:00
Lennart Poettering 035b98b607
Merge pull request #33660 from poettering/mount-tool-tweaks
minor tweaks to "systemd-mount"
2024-07-10 12:00:13 +02:00
Daan De Meyer 612a98a065 mkosi: Build a sysext if SYSEXT=1 is specified 2024-07-10 10:55:33 +02:00
Lennart Poettering 40d9c16d1e man: some fixes
Addons are called addons, say so. And some other fixes.
2024-07-10 10:08:59 +02:00
Daan De Meyer 73b3179a53 mkosi: Check for configured build directory if WIPE=1
Otherwise trying to use --wipe might fail if the build directory
has not been configured but is not empty either.
2024-07-10 10:08:20 +02:00
Daan De Meyer ece66c01cf mkosi: Install erofs-utils 2024-07-10 10:05:59 +02:00
Lennart Poettering c4ecc0231f update TODO 2024-07-10 09:35:31 +02:00
Lennart Poettering 5b37c4cf86 mount-tool: show diskseq in --list output
Let's expose the diskseq a bit more prominently.
2024-07-10 09:35:31 +02:00
Lennart Poettering 3d41dfe447 mount-tool: use the usual coloring in --help text 2024-07-10 09:35:31 +02:00
Lennart Poettering 66f4f49c8f mount-tool: add support for a --json= output mode
Let's add a JSON output mode, like we have it for so many of our tools.
2024-07-10 09:35:31 +02:00
Lennart Poettering 070a43ced4 mount-tool: use lowercase table column names
The "systemd-mount" tool is the one outlier in our codebase to specify
upper case column names. And it's quite pointless given that our table
output logic uppercases this anyway on output. Hence, let's fix that.

(This would be a compat break, if we'd support JSON output of this
table, but we do not currently. JSON fields use the literal column
name after all.)
2024-07-10 09:35:31 +02:00
Kuntal Majumder f9572d2b89 man: fix typo in unit options section
Fixes #32918
2024-07-09 22:47:25 +02:00
Luca Boccassi aaa7b36bd1 test: install split-out sshd-session binary if present
Archlinux split out one ssh binary, install it in the legacy test
setup if present for the tests that need ssh
2024-07-09 21:29:08 +02:00
Luca Boccassi bbb0b72849 fsck: do not pull down mount units on soft-reboot
Otherwise they will pull down the disk too, which we don't want on soft-reboot
2024-07-09 20:59:35 +02:00
Mike Yuan 98aedce914
systemctl-enable: support reenable --now
Also, instead of silently continuing when template units
are specified with enable --now, print a warning and skip them.

Closes #31541
2024-07-09 16:46:13 +02:00
Mike Yuan 5ed6cc7ca9
systemctl-enable: some cleanups
- Drop one more use of basename()
- Clean up logging in normalize_*()
- Use assertions where appropriate
2024-07-09 16:46:13 +02:00
Tom Yan 1df981a74a logind-dbus: set gc_mode to USER_GC_BY_PIN when disable linger
The mode switch from any to pin is currently done in create_session().
However, if no (pinning) session is created before (or after) linger
is disabled, the user will not be gc'd after that. Therefore, also
perform the mode switch when linger is being disabled.
2024-07-09 13:53:10 +02:00
Derek J. Clark 13e9ec55cd
Add or fix mount matrix for multiple handhelds. (#33586)
- Breaks AYANEO AIR family into different entries as not all are mounted the same.
- Corrects AYANEO AIR mount matrix.
- Adds mount matrices for AYANEO device families: 2021, AYANEO 2, AYANEO GEEK, and AYANEO FLIP
- Adds mount matrix for GPD WinMax2
- Adds mount matrix for OrangePi NEO
2024-07-09 10:57:04 +01:00
ZHANG Yuntian 3f0e7fd4fd man: fix typo in the alias symlink name
Symlink created by Alias will use the value as the file name.
2024-07-09 10:44:40 +02:00
Derek J. Clark 57caff009e Add MSI Claw AT Keyboard Scancodes. 2024-07-09 10:11:33 +02:00
Daan De Meyer c8ce41954b mkosi: Fix git commit
In https://github.com/systemd/systemd/pull/33659 the commit was
updated to point to my fork without changing it back after the mkosi
PR was merged so let's change it back to point to the official
repository.
2024-07-09 09:28:33 +02:00
Daan De Meyer 20345a86b7 mkosi: Adapt configuration to take into account configuration rework
In https://github.com/systemd/mkosi/pull/2847, the '@' specifier is
removed, CLI arguments take priority over configuration files again
and the "main" image is defined at the top level instead of in
mkosi.images/. Additionally, not every setting from the top level
configuration is inherited by the images in mkosi.images/ anymore,
only settings which make sense to be inherited are inherited.

This commit gets rid of all the usages of '@', moves the "main" image
configuration from mkosi.images/system to the top level and gets rid
of various hacks we had in place to deal with quirks of the old
configuration parsing logic.

We also remove usages of Images= and --append as these options are
removed by the mentioned PR.
2024-07-09 08:07:09 +02:00
Luca Boccassi bffd3c52ad mkosi: policykit-1 was renamed to polkitd 2024-07-08 19:09:00 +02:00
Mike Yuan fbd2748f87
Merge pull request #33627 from YHNdnzj/systemctl-triggering-warning
systemctl: some fixes for active triggering unit warning
2024-07-08 14:01:17 +02:00
Henry Chen 3bff57b765 vmspawn: define default machines for mips targets
All mips variants of qemu-system default to malta.

Signed-off-by: Henry Chen <henry.chen@oss.cipunited.com>
Signed-off-by: Henry Chen <chenx97@aosc.io>
2024-07-08 13:03:41 +02:00
Daan De Meyer 6b247bad9c
Merge pull request #33640 from DaanDeMeyer/ext4-split
mkosi: Use the "default" root filesystem for each distribution
2024-07-08 12:56:09 +02:00
Zbigniew Jędrzejewski-Szmek c80c5c20d4
Merge pull request #33599 from keszybz/link-executor-statically
Link executor statically
2024-07-08 12:46:41 +02:00
csp5me c214c4a8a7 Update 60-sensor.hwdb
This update has been tested on the 2023 Chuwi Freebook N100. The hwdb entry has been verified using these commands:
cat /sys/`udevadm info -q path -n /dev/iio:device0`/../modalias
acpi:MDA6655:MDA6655:

cat /sys/class/dmi/id/modalias
dmi:bvnAmericanMegatrendsInternational,LLC.:bvrDNN20AV1.03:bd12/29/2023:br1.3:efr0.7:svnCHUWIInnovationAndTechnology(ShenZhen)co.,Ltd:pnFreeBook:pvrDefaultstring:rvnDefaultstring:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct10:cvrDefaultstring:skuDefaultstring:

The correct offset orientation has been tested with:
monitor-sensor
    Waiting for iio-sensor-proxy to appear
+++ iio-sensor-proxy appeared
=== Has accelerometer (orientation: normal)
=== No ambient light sensor
=== No proximity sensor
2024-07-08 12:37:57 +02:00
Ronan Pigott 8bf8c7d83d path: drop IN_ATTRIB from parent directory watches
When watching a given pathspec, systemd unconditionally installs
IN_ATTRIB watches to track the link count of the resolved file. This
way, we are notified if the watched path disappears, even if the
resolved file inode is not removed.

Similarly, systemd installs inotify watches on each parent directory, to
be notified when the specified path appears. However, for these watches
IN_ATTRIB is an unnecessary addition to the mask. In inotify, IN_ATTRIB
on a directory is emitted whenever the attributes of any child changes,
which, for many paths, has the potential to cause a high number of
spurious wakeups in systemd. Let's remove IN_ATTRIB from the mask when
installing watches on the parent directories of the specified path.
2024-07-08 11:58:15 +02:00
Fabian Vogt 355fbedf1f firstboot: Make the option list fit 80 columns
22 characters in three colums + overhead slightly exceeds the available
width on terminals with 80 columns, causing each row to wrap to two lines.
Reduce the item width to 20 to fit even the list of ~600 timezones.
2024-07-08 11:54:57 +02:00
Tobias Fleig fc31d929c7 stub: Add support for .ucode EFI addons
This extends #31872 to also load microcode from addon files.
2024-07-08 11:43:40 +02:00
Daan De Meyer 5db8db5e34 mkosi: Use the "default" root filesystem for each distribution
Let's not insist on btrfs everywhere. 93440db8b5
switched us back to btrfs as we wanted to rely on the fact it records
timestamps properly. Since we now prefer to do incremental builds on the host
with "mkosi -t none" we don't mind anymore that timestamps are not recorded
properly so we're not forced to use btrfs anymore.

This also increases test coverage as we'll now test with different root
filesystems.
2024-07-08 10:27:35 +02:00
Riku cd8eb9605f 70-mouse.hwdb: Added Glorious Model O DPI
This rule might also apply to the regular Model O (no minus), which has the same specifications.
2024-07-07 14:32:33 +02:00
fwfy 496b4fa0e9
Remove extra period at the end of systemd-bsod's unit description. (#33632)
* Remove extra period at end of unit description.

Having an extra period at the end of this unit description makes log entries pertaining to it appear weirdly, as it seems the default expectation is that there is not to be a period at the end of a unit description.

e.g.: `systemd[1]: Started Displays emergency message in full screen..`
2024-07-06 10:17:20 +01:00
Daan De Meyer 14963ea90d test: Set priority for TEST-73-LOCALE
I don't know why yet, but TEST-73-LOCALE can take more than 10
minutes. Until we figure out why, let's give it a higher priority
so it doesn't bottleneck the test run.
2024-07-06 02:07:03 +02:00
Daan De Meyer 02cc812971
Merge pull request #33644 from DaanDeMeyer/selinux
TEST-06-SELINUX: Two fixes
2024-07-05 20:21:39 +02:00
Daan De Meyer 575f954b5d TEST-06-SELINUX: Disable RuntimeBuildSources=
Otherwise fixfiles will try to relabel it which could potentially
lead to disaster. We also change the recommendation in HACKING.md
to set the default so that TEST-06-SELINUX can override it.
2024-07-05 19:20:42 +02:00
Daan De Meyer 5eab7c5097 mkosi: Make .autorelabel file empty
The contents of this file are passed as arguments to fixfiles so
let's remove the comment as otherwise fixfiles just crashes.
2024-07-05 19:16:31 +02:00
Luca Boccassi 1ee8e526d7 mkosi: use apt pinning for locally built debian/ubuntu packages
This ensures that even in case the distro repository has newer
versions, the locally built packages are preferred and installed,
even to the point of downgrading already installed ones.
This is needed especially for future stable branches, when the
distros will have a newer version.
2024-07-05 19:10:16 +02:00
Daan De Meyer b494c7bcb4 mkosi: Update to latest 2024-07-05 17:07:00 +02:00
Daan De Meyer b5eaa52d49 test: Add missing --no-rebuild to doc
Otherwise meson will try to rebuild all targets.
2024-07-05 16:17:40 +02:00
GwynBleidD 1bd5db86f5 hwdb: Added StarLabs StarLite position sensor mapping
Default mapping for position sensor in StarLabs StarLite does
not match screen orientation. Added fixed mapping matrix.
2024-07-05 01:01:49 +02:00
Edson Juliano Drosdeck 3faee9928d
Fix key toggle touchpad button for multilaser ul154 (#33630) 2024-07-04 23:38:38 +01:00
Luca Boccassi 4f1d4d7454
Merge pull request #33629 from YHNdnzj/labeler-no-stable
labeler: some cleanups
2024-07-04 21:01:40 +02:00
Mike Yuan 5dfc88c12f
workflows/labeler: do not set labels on stable backport PRs 2024-07-04 20:55:53 +02:00
Mike Yuan a3370d5d94
labeler: match all mkosi files 2024-07-04 20:55:42 +02:00
Mike Yuan 5e12de940a
labeler: remove matches for dropped files (Makefile) 2024-07-04 20:55:36 +02:00
Mike Yuan 09d6038d83
systemctl: do not try to acquire triggering units for template units 2024-07-04 20:36:04 +02:00
Mike Yuan 701bd9d08a
systemctl: skip triggering unit warning if unit vanished 2024-07-04 20:36:04 +02:00
Mike Yuan 399646faac
man/systemctl: --no-reload is honored by mask/unmask/preset too 2024-07-04 20:36:02 +02:00
Davide Cavalca c1eb4cdd3b hwdb: add more AV controllers 2024-07-04 20:09:38 +02:00
tfg13 34c6d8fe40
stub: mem fixes in devicetree addon handling (#33624)
* stub: mem fixes in devicetree addon handling

Two bugs here: The elements are of size `DevicetreeAddon`, not `size_t`,
and `[]` binds stronger than `*`. This means the first element is ok,
but the second corrupts the stack.

Found this while refactoring #32463
2024-07-04 19:08:55 +01:00
Lennart Poettering 44ec70489f vmm: make sure we can handle smbios objects without variable part
An smbios object with no variable part is a special case, it's just
suffixed with two NUL btes. handle that properly.

This is inspired by a similar fix from https://github.com/systemd/systemd/pull/29726
2024-07-04 20:08:09 +02:00
Daan De Meyer 6a4fcf8cef meson: Fix various versions
Follow up for 8b3b01c4b7

We switch to PROJECT_VERSION instead of PROJECT_VERSION_FULL where
we report our version and which is likely being parsed to avoid
breaking compat. If we didn't, the output would change from systemd
255 to systemd 255.1 which could break various tools.
2024-07-04 19:28:12 +02:00
Luca Boccassi a79b6dc070 README: update requirements for signed dm-verity
The newest kconfig enabling DB-verified dm-verity images is queued
for 6.11:

https://patchwork.kernel.org/project/dm-devel/patch/20240617220037.594792-1-luca.boccassi@gmail.com/
2024-07-04 19:04:58 +02:00
Luca Boccassi fc9938d6f8 sysusers: handle NSS errors gracefully
If the io.systemd.DynamicUser or io.systemd.Machine files exist,
but nothing is listening on them, the nss-systemd module returns
ECONNREFUSED and systemd-sysusers fails to creat the user/group.

This is problematic when ran by packaging scripts, as the package
assumes that after this has run, the user/group exist and can
be used. adduser does not fail in the same situation.

Change sysusers to print a loud warning but otherwise continue
when NSS returns an error.
2024-07-04 16:43:51 +02:00
Lennart Poettering 74cbe244ec
Merge pull request #33589 from poettering/file-hiearchy-no-version
man: drop version info from file hiearchy man page
2024-07-04 16:43:31 +02:00
Lennart Poettering 72a6296b16 man: fully adopt ~/.local/state/
The XDG base dir spec adopted ~/.local/state/ as a thing a while back,
and we updated our docs in b4d6bc63e6, but
forgot to to update the table at the bottom to fully reflect the update.
Fix that.
2024-07-04 15:26:17 +02:00
Lennart Poettering 39aafbd42a man: mention that distinction between /usr/lib/ and /usr/share/ is really about shared *ownership* 2024-07-04 15:26:17 +02:00
Lennart Poettering 26db8fe247 man: drop version info from file hiearchy man page
This file doesn't document features of systemd, but is more a of a
general description that generalizes/modernizes FHS. As such, the items
listed in it weren't "added" in systemd versions, they simply reflect
general concepts independent of any specific systemd version. hence
let's drop this misleading and confusing version info.

Or in other words, the man page currently claims under "/usr/": "Added
in version 215." – Which of course is rubbish, the directory existed
since time began.

This also rebreaks all paragaphs this touches.

No content changes.
2024-07-04 15:26:17 +02:00
Luca Boccassi 4ac314a81f
Merge pull request #33567 from poettering/boot-fixlets
sd-boot,sd-stub: a variety of smaller fixes
2024-07-04 13:00:56 +02:00
Luca Boccassi 92d1fe3efa os-util: avoid matching on the wrong extension-release file
The previous commit tries to extract a substring from the
extension-release suffix, but that is not right, it's only the
images that need to be versioned and extracted, use the extension-release
suffix as-is. Otherwise if it happens to contain a prefix that
matches the wrong image, it will be taken into account.

Follow-up for 37543971af
2024-07-04 12:49:28 +02:00
Daan De Meyer 96110261ee mkosi: Build a disk image by default again
Now that we have a way to rebuild and reinstall systemd without
having to rebuild the image, let's default to building a disk image
again.
2024-07-04 12:43:50 +02:00
Chen Qi 646ed5af00 src/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build
The GIT_VERSION is changed to use VERSION_TAG, but in case of cross build
for src/boot/efi, it's not set, causing build error because the compiler cannot
know it's a macro thus treating it as some variable and error out.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2024-07-04 12:42:35 +02:00
Daan De Meyer 8b3b01c4b7 meson: Deal with potential stable versions
The meson.version file might contain e.g. 256.2~devel in a stable
branch so let's make sure we deal with that.
2024-07-04 12:03:45 +02:00
Topi Miettinen e81025970f load-fragment: allow MountImages= with paths starting with /dev
For MountImages=, if the source is a block device, it will most likely reside
in /dev. It should be also possible to mount a static device file system in
place of (or part of) /dev. So let's allow paths starting with /dev as an
exception for MountImages=.
2024-07-04 09:36:04 +00:00
Luca Boccassi 92d9d5ca70 test: skip TEST-69-SHUTDOWN on Debian
There is a regression in the login package, skip the test until
it is fixed. https://bugs.debian.org/1075733
2024-07-04 09:07:22 +02:00
Ronan Pigott ef98603f4b zsh: add run0 completions 2024-07-04 01:21:43 +02:00
Luca Boccassi 08b64666cd
Merge pull request #33608 from DaanDeMeyer/hacking
docs: Update HACKING
2024-07-04 01:19:58 +02:00
Daan De Meyer a2403af329 docs: Update HACKING
Let's mention the new way to install the latest changes without
rebuilding the image. Let's also remove the duplicate info about
distribution packages that is already mentioned in its own section.
2024-07-03 22:59:40 +02:00
Daan De Meyer 18c98a839f mkosi: Install zypper in opensuse images 2024-07-03 22:48:37 +02:00
Daan De Meyer d1bbeeea4c mkosi: Fix sync script git command
Let's make sure we actually operate on the packaging git repo.
2024-07-03 22:40:31 +02:00
James Hilliard aa329b8922 README: add missing CONFIG_MEMCG kernel config option for oomd
We need to enable this otherwise systemd-oomd.service fails to start.

Fixes:
ConditionControlGroupController=memory was not met
2024-07-03 22:11:24 +02:00
Daan De Meyer cd98453908 mkosi: update arch commit reference
* d74b24c7c6 meson options: vcs-tag=false
* 7424fedef0 upgpkg: 256.1-1: new upstream release
* 6016864c99 upgpkg: 256-3: rebuild to fix man pages...
* 6f6d48b221 upgpkg: 256-2: update shells
* b9ce44e766 drop systemd-stable repository, build from main one
* baf4803252 upgpkg: 256-1: new upstream release
* 1d75e7ddaa add an install hint on NEWS
* 6f17a23127 Ups, inverted...
* d76029f7cc update meson options
* 6e7929dd98 upgpkg: 256rc4-1: new upstream pre-release - testing only!
* 7b70e7b0e7 upgpkg: 256rc3-2: fast-forward to current git main, non-official testing
* a438b879e2 upgpkg: 256rc3-1: new upstream pre-release, non-official testing
* ff30a600c9 upgpkg: 256rc2-1: new upstream pre-release, non-official testing
2024-07-03 22:04:18 +02:00
Daan De Meyer 2f6046f66b mkosi: Clean up old packages from the build directory 2024-07-03 21:05:55 +02:00
Luca Boccassi ce513c6c6c mkosi: remove conflicting deb packages from builddir
These are not actually needed or installed, so delete them from the
build directory, so that inside an image one can do:

apt install --reinstall /work/build/*.deb

Follow-up for 690a85b1d4
2024-07-03 21:05:14 +02:00
Daan De Meyer a7856c8182 load-fragment: Remove faulty assertion
Followup for 453cb5d01e

Fixes the following assertion:

"""
x86 130 ~/systemd ❯❯❯ meson compile -C build
ninja: Entering directory `/home/tfleig/systemd/build'
[2/5] Generating export-dbus-interfaces with a custom command
FAILED: interfaces
/home/tfleig/systemd/tools/dbus_exporter.py interfaces /home/tfleig/systemd/build/systemd /home/tfleig/systemd/build/systemd-homed /home/tfleig/systemd/build/systemd-hostnamed /home/tfleig/systemd/build/systemd-importd /home/tfleig/systemd/build/systemd-localed /home/tfleig/systemd/build/systemd-logind /home/tfleig/systemd/build/systemd-machined /home/tfleig/systemd/build/systemd-networkd /home/tfleig/systemd/build/systemd-oomd /home/tfleig/systemd/build/systemd-portabled /home/tfleig/systemd/build/systemd-resolved /home/tfleig/systemd/build/systemd-timedated
Assertion '__unique_prefix__expr_91' failed at src/core/load-fragment.c:3912, function config_parse_tasks_max(). Aborting.
Traceback (most recent call last):
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 45, in <module>
    main()
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 42, in main
    extract_interfaces_xml(args.output, exe)
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 9, in extract_interfaces_xml
    proc = run(
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[PosixPath('/home/tfleig/systemd/build/systemd'), '--bus-introspect', 'list']' died with <Signals.SIGABRT: 6>.
[4/5] Generating man/systemd.index.xml with a custom command
ninja: build stopped: subcommand failed.
"""
2024-07-03 20:49:44 +02:00
Zbigniew Jędrzejewski-Szmek d59cae6ceb meson: add option to build systemd-executor "statically"
The new link-executor-shared option is similar to the existing
link-udev-shared: when set to false, we link to the static versions of our
internal libraries.

The resulting exuctor binary is fairly large, about as large as libsystemd-core
(14 MB without lto, 8 with lto).

This is intended as a workaround for the fuckup with the pinned executor
binary:
when an upgrade is performed, the package manager will install new version of
the libraries and new version of the code, and some time later reexecute the
managers. This creates a window when the pinned executor binary will fail to
execute. There are two factors which make the issue easier to hit:

- when the distribution uses a finely-grained shared-lib-tag. E.g. Fedora
  uses version-release as the tag, which means that the issue occurs on
  every package upgrade. This is the right thing to do, because the
  ABI of our internal libraries is not stable at all, so replacing the
  library from a different version in place creates a window where our
  programs may crash or misbehave.

- when the distribution doesn't immediately reexec all the managers after
  upgrade. In early versions of systemd, we used to hammer the machine during
  upgrade, doing daemon-reexecs repeatedly. This works, but is ugly and
  wasteful. Doing the reexecs while the upgrade is in progres also creates a
  window where a mix of old and new configs or both is loaded. Users are
  particularly annoyed by those reloads if there is some issue in the
  configuration causing us to emit warnings on every reexec. Doing the
  reexecs once after the new configuration and libraries have been put
  in place is nicer.

The pinning of the executor binary breaks upgrades and in particular
it penalizes the distributions which make use of the features which
were previously added to avoid bugs and inefficiency during upgrades.

When the executor is linked statically, there is a smaller chance that it'll
fail to load libraries. The issue can still occur because other libraries, not
our own, are linked dynamically.
2024-07-03 17:25:26 +02:00
Zbigniew Jędrzejewski-Szmek d0689ee5fb meson: build libsystemd-core via an intermediate static library
By itself, this is not useful. I'm making this a separate commit to
make debugging easier. It turns out that meson does static libraries
using references, so the "static library" a tiny stub stub that refers
to the object files on disk and this has negligible cost:
$ ls -lhd build/src/core/libsystemd-core-257.{a,so}
-rw-r--r-- 1 zbyszek zbyszek  36K Jul  3 16:54 build/src/core/libsystemd-core-257.a
-rwxr-xr-x 1 zbyszek zbyszek 6.1M Jul  3 16:54 build/src/core/libsystemd-core-257.so
2024-07-03 17:25:26 +02:00
Zbigniew Jędrzejewski-Szmek 732ed8a84e meson: rename libbasic to libbasic_static
Our variables for internal libraries are named 'libfoo' for the shared lib
variant, and 'libfoo_static' for the static lib variant. The only exception was
libbasic, because we didn't have a shared variant for it. But let's rename it
for consitency. This makes the build config easier to understand.
2024-07-03 17:25:26 +02:00
Lennart Poettering 89ed34459e ukify: bring order of EFI sections in man + --help into same order as spec
Previously, the order was quite chaotic, even sometimes interleaved with
entirely unrelated switches. Let's clean this up and use the same order
as in the spec.

This doesn't change anything real, but I think it's a worthy clean-up in
particular as this order is documented as the PCR measurement order of
these sections, hence there's actually a bit of relevance to always
communicate the same order everywhere.
2024-07-03 16:21:34 +02:00
Lennart Poettering 38faff48e5 boot: don't set OsIndications field if already set correctly 2024-07-03 16:15:04 +02:00
Brenton Simpson 2fda6f5fff boot: cover for hardware keys on phones/tablets
The patch is originally from Brenton Simpson, I (Lennart) just added some
comments and rebased it.

I didn't test this, but the patch looks so obviously right to me, that
I think we should just merge it, instead of delaying this further. In
the worst case noone notices, in the best case this makes sd-boot work
reasonably nicely on devices that only have a hadware power key + volume
rocker.

Fixes: #30598
Replaces: #31135
2024-07-03 16:15:04 +02:00
Lennart Poettering ea22cbc327 ukify: suffix switches that take parameters with = in log output 2024-07-03 16:15:04 +02:00
Lennart Poettering c8bcf7ecf7 measure: drop incomplete support for PCRs != 11
At this point we have a clearer model:

* systemd-measure should be used for measuring UKIs on vendor build
  systems, i.e. only cover stuff predictable by the OS vendor, and
  identical on all systems. And that is pretty much only PCR 11.

* systemd-pcrlock should cover the other PCRs, which carry inherently
  local information, and can only be predicted locally and not already
  on vendor build systems.

Because of that, let's not bother with any PCRs except for 11 in
systemd-measure. This was added at a time where systemd-pcrlock didn't
exist yet, and hence it wasn't clear how this will play out in the end.
2024-07-03 16:15:04 +02:00
Lennart Poettering 759cf7e10a boot: compare auto- prefix case-insensitively 2024-07-03 16:15:04 +02:00
Lennart Poettering 76c8c0b264 boot: split out inner part of config_load_type2_entries()
Let's simplify the code a bit, and parse Type 2 entries in a function of
its own, separate from the directory enumeration.

This closely follows a similar split we did a long time ago for Type 1.

This is just refactoring, no real code change.
2024-07-03 16:15:04 +02:00
Lennart Poettering b8ed6e22f0 boot: indent error code path, but leave main code path unindented 2024-07-03 16:15:04 +02:00
Lennart Poettering 6c741d8f50 efi: don't non-chalantly drop const from memory buffer 2024-07-03 16:15:04 +02:00
Lennart Poettering 1beaaeab2f efi: drop "ret_" prefix from "ret_sections[]" parameter
While we write data to this parameter, it's not really a return
parameter, we after all do not fully set it, we just fill in some
fields. Hence it must be initialized beforehand.

According to our coding style only parameters that are purely used for
returning something should be named "ret_xyz", hence this one should not
be.

(We'll later rely on the current behaviour that it leaves array entries
for which we find no sections untouched, hence leave behaviour as is,
just rename the parameters to something more appropriate).

(Since we are dropping the "ret_" prefix of "ret_sections", let's rename
the old "section" parameter at the same time to "section_names", to make
clearer what it is about).
2024-07-03 16:15:04 +02:00
Lennart Poettering d30b89c7fc efi: fix mangle_stub_cmdline() for empty strings 2024-07-03 16:15:04 +02:00
Lennart Poettering 596731db99 efi: add limit on how large files can be we load into memory at once 2024-07-03 16:15:04 +02:00
Daan De Meyer 90a255779d repart: Allow overriding fstype per partition designator
$SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to
override the fstype only for a specific designator, so let's support
that as well.
2024-07-03 15:45:51 +02:00
Daan De Meyer 690a85b1d4 mkosi: Copy packages to the build directory as well
With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.
2024-07-03 15:44:27 +02:00
Daan De Meyer 2fe6ad5a64 mkosi: Make sure we don't hide errors from git merge-base
Currently if git merge-base fails we'll hide the error and exit with
exit status 0. Let's make we only exit early if git merge-base exits
with 1 which indicates the current commit is not on the target branch.
Any other error is considered fatal.
2024-07-03 15:42:12 +02:00
Anton Golubev 4ee0ac1ae4 hwdb: Add some HP IR cameras
Two very similar devices, with two functions - a regular camera and IR.
The peculiarity of their infrared camera is that it uses a color image
format (YUYV), although it is essentially black and white.

The IR camera interface differs from the regular camera interface by name:

"HP Wide Vision FHD Camera: HP W" for the regular camera and
"HP Wide Vision FHD Camera: HP I" for an infrared camera

Therefore, glob *I is used to separate the IR camera
2024-07-03 13:51:52 +02:00
Luca Boccassi 0f20f7d6fe
Merge pull request #33575 from YHNdnzj/soft-reboot-system-manager-only
core/dbus-manager: several cleanups, refuse SoftReboot() for user manager
2024-07-03 13:40:06 +02:00
Lennart Poettering 9545512f3e update TODO 2024-07-03 10:55:18 +02:00
Daan De Meyer 6bd14bf4b3 mkosi: update fedora commit reference
* f9fe17dbde Use vmlinux.h from kernel-devel
* 9cbad936a6 Pull in openssl-devel-engine
* 8ae009f929 Only add Requires on python3-zstd on Fedora
* 750e910c7c Drop BuildRequires on python3-zstd
2024-07-03 10:39:58 +02:00
Mike Yuan 33a06bbc74
core/main: add an assertion to ensure user managers won't initiate destructive/system-wide operation 2024-07-03 10:12:53 +02:00
Mike Yuan 6851abe403
core/manager: invoke special targets on signal only for system manager 2024-07-03 10:11:25 +02:00
Mike Yuan 236cd48546
core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...
2024-07-03 10:11:24 +02:00
Mike Yuan 541aadff97
core/dbus-manager: check for runtime scope first for system-wide operations
It's pointless to do selinux or /run/ space checks
for user managers.
2024-07-03 10:11:24 +02:00
Mike Yuan a85fe612d7
core/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriate
Also, there can only be one system manager.
2024-07-03 10:11:24 +02:00
Mike Yuan b80ae4bcfd
core/dbus-manager: use path_simplify_alloc() for root and init paths 2024-07-03 10:11:24 +02:00
Mike Yuan ff21827fee
core/dbus-manager: use PidRef for log_caller()
This is only for logging, but since we lookup for the unit
here, let's try to be accurate.
2024-07-03 10:11:21 +02:00
1294 changed files with 62579 additions and 21397 deletions

View File

@ -31,7 +31,7 @@ policy:
- name: dissect - name: dissect
keys: ['systemd-dissect'] keys: ['systemd-dissect']
- name: env - name: env-generator
keys: ['systemd-env-generator'] keys: ['systemd-env-generator']
- name: fsck - name: fsck

178
.github/labeler.yml vendored
View File

@ -1,9 +1,21 @@
# SPDX-License-Identifier: LGPL-2.1-or-later # SPDX-License-Identifier: LGPL-2.1-or-later
# vi: sw=2 ts=2 et: # vi: sw=2 ts=2 et:
analyze:
- changed-files:
- any-glob-to-any-file: 'src/analyze/*'
apparmor: apparmor:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*apparmor*' - any-glob-to-any-file: '**/*apparmor*'
ask-password:
- changed-files:
- any-glob-to-any-file: '**/*ask-password*'
backlight:
- changed-files:
- any-glob-to-any-file: '**/*backlight*'
battery-check 🪫:
- changed-files:
- any-glob-to-any-file: '**/*battery*'
binfmt: binfmt:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*binfmt*' - any-glob-to-any-file: '**/*binfmt*'
@ -15,13 +27,19 @@ btrfs:
- any-glob-to-any-file: '**/*btrfs*' - any-glob-to-any-file: '**/*btrfs*'
build-system: build-system:
- changed-files: - changed-files:
- any-glob-to-any-file: ['meson_options.txt', '**/meson.build', 'Makefile', 'configure'] - any-glob-to-any-file: ['meson_options.txt', '**/meson.build']
busctl: busctl:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*busctl*' - any-glob-to-any-file: '**/*busctl*'
catalog:
- changed-files:
- any-glob-to-any-file: 'catalog/*'
cgls: cgls:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*cgls*' - any-glob-to-any-file: '**/*cgls*'
cgroups:
- changed-files:
- any-glob-to-any-file: ['src/basic/cgroup*', 'src/cgroups-agent/*', 'src/core/cgroup*', 'src/shared/cgroup*']
cgtop: cgtop:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*cgtop*' - any-glob-to-any-file: '**/*cgtop*'
@ -34,6 +52,24 @@ coccinelle:
coredump: coredump:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*coredump*' - any-glob-to-any-file: '**/*coredump*'
creds:
- changed-files:
- any-glob-to-any-file: ['src/core/*cred*', 'src/creds/*', 'src/shared/*cred*', 'units/*cred*']
cryptsetup:
- changed-files:
- any-glob-to-any-file: ['src/cryptenroll/*', 'src/cryptsetup/*', 'units/*crypt*']
debug-generator:
- changed-files:
- any-glob-to-any-file: '**/*debug-generator*'
delta:
- changed-files:
- any-glob-to-any-file: '**/*delta*'
detect-virt:
- changed-files:
- any-glob-to-any-file: '**/*virt*'
dissect:
- changed-files:
- any-glob-to-any-file: '**/*dissect*'
documentation: documentation:
- changed-files: - changed-files:
- any-glob-to-any-file: ['NEWS', 'README*', 'docs/*', 'man/*'] - any-glob-to-any-file: ['NEWS', 'README*', 'docs/*', 'man/*']
@ -42,58 +78,106 @@ env-generator:
- any-glob-to-any-file: '**/*environment*generator*' - any-glob-to-any-file: '**/*environment*generator*'
escape: escape:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*escape*' - any-glob-to-any-file: 'src/escape/*'
debug-generator: firstboot:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/debug-generator*' - any-glob-to-any-file: '**/*firstboot*'
fsck:
- changed-files:
- any-glob-to-any-file: '**/*fsck*'
fstab-generator: fstab-generator:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*fstab-generator*' - any-glob-to-any-file: '**/*fstab-generator*'
gpt-auto:
- changed-files:
- any-glob-to-any-file: '**/*gpt-auto*'
growfs: growfs:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*growfs*' - any-glob-to-any-file: '**/*growfs*'
hibernate-resume: hibernate-resume:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*hibernate-resume*' - any-glob-to-any-file: '**/*hibernate-resume*'
homed:
- changed-files:
- any-glob-to-any-file: ['src/home*', 'units/*home*']
hostname:
- changed-files:
- any-glob-to-any-file: ['src/hostname/*', 'src/shared/*hostname*', 'units/*hostname*']
hwdb: hwdb:
- changed-files: - changed-files:
- any-glob-to-any-file: 'hwdb.d/**/*' - any-glob-to-any-file: '**/*hwdb*'
import:
- changed-files:
- any-glob-to-any-file: '**/*import*'
integritysetup:
- changed-files:
- any-glob-to-any-file: '**/*integrity*'
journal: journal:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/journal/*', 'src/libsystemd/sd-journal/*'] - any-glob-to-any-file: ['src/journal/*', 'src/libsystemd/sd-journal/*', 'units/systemd-journal-catalog*', 'units/systemd-journal-flush*', 'units/systemd-journald*']
journal-remote: journal-remote:
- changed-files: - changed-files:
- any-glob-to-any-file: 'src/journal-remote/*' - any-glob-to-any-file: ['src/journal-remote/*', 'units/systemd-journal-gateway*', 'units/systemd-journal-remote*']
kernel-install:
- changed-files:
- any-glob-to-any-file: '**/*kernel-install*'
l10n 🌍: l10n 🌍:
- changed-files: - changed-files:
- any-glob-to-any-file: 'po/*' - any-glob-to-any-file: 'po/*'
locale:
- changed-files:
- any-glob-to-any-file: '**/*locale*'
login: login:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/login/*', '**/sd-login*/**'] - any-glob-to-any-file: ['src/login/*', '**/sd-login*/**']
machine:
- changed-files:
- any-glob-to-any-file: ['src/machine/*', 'units/*machine*']
meson: meson:
- changed-files: - changed-files:
- any-glob-to-any-file: ['meson_options.txt', '**/meson.build'] - any-glob-to-any-file: ['meson_options.txt', '**/meson.build']
mkosi: mkosi:
- changed-files: - changed-files:
- any-glob-to-any-file: ['.mkosi/*', 'mkosi.build'] - any-glob-to-any-file: '**/*mkosi*'
modules-load:
- changed-files:
- any-glob-to-any-file: ['**/*modules-load*', 'modprobe.d/*']
mount:
- changed-files:
- any-glob-to-any-file: ['src/basic/*mount*', 'src/core/*mount*', 'src/mount/*', 'src/shared/*mount*']
mountfsd: mountfsd:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/mountfsd/*'] - any-glob-to-any-file: '**/*mountfsd*'
network: network:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/libsystemd-network/**/*', 'src/network/**/*'] - any-glob-to-any-file: ['src/libsystemd-network/**/*', 'src/network/**/*', 'network/*', 'test/networkd-test.py', 'test/test-network*']
notify:
- changed-files:
- any-glob-to-any-file: 'src/notify/*'
nspawn: nspawn:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*nspawn*' - any-glob-to-any-file: '**/*nspawn*'
nsresource: nsresource:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*nsresource*' - any-glob-to-any-file: '**/*nsresource*'
nss-myhostname:
- changed-files:
- any-glob-to-any-file: '**/*nss-myhostname*'
portable: portable:
- changed-files: - changed-files:
- any-glob-to-any-file: 'src/portable/**/*' - any-glob-to-any-file: 'src/portable/**/*'
pstore:
- changed-files:
- any-glob-to-any-file: '**/*pstore*'
random-seed:
- changed-files:
- any-glob-to-any-file: '**/*random-seed*'
rc-local-generator: rc-local-generator:
- changed-files: - changed-files:
- any-glob-to-any-file: 'src/rc-local-generator/*' - any-glob-to-any-file: 'src/rc-local-generator/*'
remount-fs:
- changed-files:
- any-glob-to-any-file: '**/*remount-fs*'
repart: repart:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*repart*' - any-glob-to-any-file: '**/*repart*'
@ -145,6 +229,9 @@ selinux:
shell-completion: shell-completion:
- changed-files: - changed-files:
- any-glob-to-any-file: 'shell-completion/*' - any-glob-to-any-file: 'shell-completion/*'
shutdown:
- changed-files:
- any-glob-to-any-file: ['src/shutdown/*', 'units/**/*shutdown*']
sleep: sleep:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/shared/*sleep*', 'src/sleep/*'] - any-glob-to-any-file: ['src/shared/*sleep*', 'src/sleep/*']
@ -154,60 +241,95 @@ smack:
socket-proxy: socket-proxy:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*socket-proxy*' - any-glob-to-any-file: '**/*socket-proxy*'
sysv-generator: ssh-generator:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*sysv-generator*' - any-glob-to-any-file: '**/*ssh-generator*'
systemctl: storagetm:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/systemctl*' - any-glob-to-any-file: '**/*storagetm*'
sysupdate: sulogin:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*sysupdate*' - any-glob-to-any-file: '**/*sulogin*'
sysvcompat:
- changed-files:
- any-glob-to-any-file: '**/*sysv*'
sysctl: sysctl:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*sysctl*' - any-glob-to-any-file: '**/*sysctl*'
sysext:
- changed-files:
- any-glob-to-any-file: '**/*sysext*'
systemctl:
- changed-files:
- any-glob-to-any-file: '**/*systemctl*'
sysupdate:
- changed-files:
- any-glob-to-any-file: '**/*sysupdate*'
sysusers:
- changed-files:
- any-glob-to-any-file: '**/*sysusers*'
sysv-generator:
- changed-files:
- any-glob-to-any-file: '**/*sysv-generator*'
sysvcompat:
- changed-files:
- any-glob-to-any-file: '**/*sysv*'
tests:
- changed-files:
- any-glob-to-any-file: [
'src/shared/tests.*',
'src/test/**/*',
'src/fuzz/**/*',
'test/**/*',
'**/test-*',
'**/test_*',
'.github/workflows/*'
]
timedate: timedate:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*timedate*' - any-glob-to-any-file: '**/*timedate*'
timesync: timesync:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*timesync*' - any-glob-to-any-file: '**/*timesync*'
tests: tmpfiles:
- changed-files: - changed-files:
- any-glob-to-any-file: [ - any-glob-to-any-file: '**/*tmpfiles*'
'src/test/**/*',
'src/fuzz/**/*',
'test/**/*',
'**/test-*',
'.github/workflows/*'
]
tpm2: tpm2:
- changed-files: - changed-files:
- any-glob-to-any-file: ['**/*tpm2*', '**/*tpm-*'] - any-glob-to-any-file: ['**/*tpm2*', '**/*tpm-*']
udev: udev:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/udev/**/*', 'src/libudev/*', 'man/*udev*'] - any-glob-to-any-file: ['src/udev/**/*', 'src/libudev/*', 'man/*udev*', 'rules.d/*']
uki: uki:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/ukify*' - any-glob-to-any-file: '**/ukify*'
units: units:
- changed-files: - changed-files:
- any-glob-to-any-file: 'units/**/*' - any-glob-to-any-file: 'units/**/*'
user-session:
- changed-files:
- any-glob-to-any-file: '**/*user-session*'
userdb: userdb:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*userdb*' - any-glob-to-any-file: '**/*userdb*'
util-lib: util-lib:
- changed-files: - changed-files:
- any-glob-to-any-file: ['src/fundamental/**/*', 'src/basic/**/*', 'src/shared/**/*'] - any-glob-to-any-file: ['src/fundamental/**/*', 'src/basic/**/*', 'src/shared/**/*']
utmp/wtmp:
- changed-files:
- any-glob-to-any-file: '**/*utmp*'
varlink:
- changed-files:
- any-glob-to-any-file: ['src/varlink/*', 'src/libsystemd/sd-varlink/*', 'src/systemd/sd-varlink*']
vconsole: vconsole:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*vconsole*' - any-glob-to-any-file: '**/*vconsole*'
veritysetup:
- changed-files:
- any-glob-to-any-file: '**/*veritysetup*'
vmspawn: vmspawn:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/*vmspawn*' - any-glob-to-any-file: '**/*vmspawn*'
volatile:
- changed-files:
- any-glob-to-any-file: '**/*volatile*'
xdg-autostart: xdg-autostart:
- changed-files: - changed-files:
- any-glob-to-any-file: '**/**xdg-autostart-generator*' - any-glob-to-any-file: '**/**xdg-autostart-generator*'

View File

@ -68,7 +68,7 @@ jobs:
path: ./out/artifacts path: ./out/artifacts
- name: Upload Sarif - name: Upload Sarif
if: always() && steps.build.outcome == 'success' if: always() && steps.build.outcome == 'success'
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a
with: with:
# Path to SARIF file relative to the root of the repository # Path to SARIF file relative to the root of the repository
sarif_file: cifuzz-sarif/results.sarif sarif_file: cifuzz-sarif/results.sarif

View File

@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
config-file: ./.github/codeql-config.yml config-file: ./.github/codeql-config.yml
@ -53,7 +53,7 @@ jobs:
- run: sudo -E .github/workflows/unit_tests.sh SETUP - run: sudo -E .github/workflows/unit_tests.sh SETUP
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a

View File

@ -28,7 +28,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Differential ShellCheck - name: Differential ShellCheck
uses: redhat-plumbers-in-action/differential-shellcheck@60c9f2b924a9c5a2ddbb25e7b23e8e11b56faab9 uses: redhat-plumbers-in-action/differential-shellcheck@cc6721c45a8800cc666de45493545a07a638d121
with: with:
# exclude all `.in` files because they may contain unsupported syntax, and they have to be preprocessed first # exclude all `.in` files because they may contain unsupported syntax, and they have to be preprocessed first
# TEMPORARY: exclude bash completion files, they would generate too many defects in Code scanning dashboard (600+) # TEMPORARY: exclude bash completion files, they would generate too many defects in Code scanning dashboard (600+)

View File

@ -35,7 +35,7 @@ jobs:
- name: Label PR based on policy in labeler.yml - name: Label PR based on policy in labeler.yml
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9
if: startsWith(github.event_name, 'pull_request') && github.event.action != 'closed' if: startsWith(github.event_name, 'pull_request') && github.base_ref == 'main' && github.event.action != 'closed'
with: with:
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml configuration-path: .github/labeler.yml

View File

@ -29,7 +29,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Lint Code Base - name: Lint Code Base
uses: super-linter/super-linter/slim@88ea3923a7e1f89dd485d079f6eb5f5e8f937589 uses: super-linter/super-linter/slim@b92721f792f381cedc002ecdbb9847a15ece5bb8
env: env:
DEFAULT_BRANCH: main DEFAULT_BRANCH: main
MULTI_STATUS: false MULTI_STATUS: false

View File

@ -18,7 +18,7 @@ jobs:
steps: steps:
- name: Release - name: Release
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
with: with:
prerelease: ${{ contains(github.ref_name, '-rc') }} prerelease: ${{ contains(github.ref_name, '-rc') }}
draft: ${{ github.repository == 'systemd/systemd' }} draft: ${{ github.repository == 'systemd/systemd' }}

View File

@ -10,36 +10,36 @@ on:
- main - main
- v[0-9]+-stable - v[0-9]+-stable
paths: paths:
- '**' - "**"
- '!README*' - "!README*"
- '!LICENSE*' - "!LICENSE*"
- '!LICENSES/**' - "!LICENSES/**"
- '!TODO' - "!TODO"
- '!docs/**' - "!docs/**"
- '!man/**' - "!man/**"
- '!catalog/**' - "!catalog/**"
- '!shell-completion/**' - "!shell-completion/**"
- '!po/**' - "!po/**"
- '!.**' - "!.**"
- '.github/**' - ".github/**"
pull_request: pull_request:
branches: branches:
- main - main
- v[0-9]+-stable - v[0-9]+-stable
paths: paths:
- '**' - "**"
- '!README*' - "!README*"
- '!LICENSE*' - "!LICENSE*"
- '!LICENSES/**' - "!LICENSES/**"
- '!TODO' - "!TODO"
- '!docs/**' - "!docs/**"
- '!man/**' - "!man/**"
- '!catalog/**' - "!catalog/**"
- '!shell-completion/**' - "!shell-completion/**"
- '!po/**' - "!po/**"
- '!.**' - "!.**"
- '.github/**' - ".github/**"
permissions: permissions:
contents: read contents: read
@ -59,157 +59,171 @@ jobs:
sanitizers: "" sanitizers: ""
llvm: 0 llvm: 0
cflags: "-O2 -D_FORTIFY_SOURCE=3" cflags: "-O2 -D_FORTIFY_SOURCE=3"
relabel: no
- distro: debian - distro: debian
release: testing release: testing
sanitizers: "" sanitizers: ""
llvm: 0 llvm: 0
cflags: "-Og" cflags: "-Og"
relabel: no
- distro: ubuntu - distro: ubuntu
release: noble release: noble
sanitizers: "" sanitizers: ""
llvm: 0 llvm: 0
cflags: "-Og" cflags: "-Og"
relabel: no
- distro: fedora - distro: fedora
release: "40" release: "40"
sanitizers: "" sanitizers: ""
llvm: 0 llvm: 0
cflags: "-Og" cflags: "-Og"
relabel: yes
- distro: fedora - distro: fedora
release: rawhide release: rawhide
sanitizers: address,undefined sanitizers: address,undefined
llvm: 1 llvm: 1
cflags: "-Og" cflags: "-Og"
relabel: yes
- distro: opensuse - distro: opensuse
release: tumbleweed release: tumbleweed
sanitizers: "" sanitizers: ""
llvm: 0 llvm: 0
cflags: "-Og" cflags: "-Og"
relabel: no
- distro: centos - distro: centos
release: "9" release: "9"
sanitizers: "" sanitizers: ""
llvm: 0 llvm: 0
cflags: "-Og" cflags: "-Og"
relabel: yes
- distro: centos
release: "10"
sanitizers: ""
llvm: 0
cflags: "-Og"
relabel: yes
steps: steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: systemd/mkosi@70aa901697f12182ccaa24e2325867d275479b55 - uses: systemd/mkosi@2c9954fa51a3a995bbdc02db6ef51f5bd27bc1ba
# Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space # Freeing up disk space with rm -rf can take multiple minutes. Since we don't need the extra free space
# immediately, we remove the files in the background. However, we first move them to a different location # immediately, we remove the files in the background. However, we first move them to a different location
# so that nothing tries to use anything in these directories anymore while we're busy deleting them. # so that nothing tries to use anything in these directories anymore while we're busy deleting them.
- name: Free disk space - name: Free disk space
run: | run: |
sudo mv /usr/local /usr/local.trash sudo mv /usr/local /usr/local.trash
sudo mv /opt/hostedtoolcache /opt/hostedtoolcache.trash sudo mv /opt/hostedtoolcache /opt/hostedtoolcache.trash
sudo systemd-run rm -rf /usr/local.trash /opt/hostedtoolcache.trash sudo systemd-run rm -rf /usr/local.trash /opt/hostedtoolcache.trash
- name: Btrfs - name: Btrfs
run: | run: |
truncate --size=100G btrfs.raw truncate --size=100G btrfs.raw
mkfs.btrfs btrfs.raw mkfs.btrfs btrfs.raw
sudo mkdir /mnt/mkosi sudo mkdir /mnt/mkosi
LOOP="$(sudo losetup --find --show --direct-io=on btrfs.raw)" LOOP="$(sudo losetup --find --show --direct-io=on btrfs.raw)"
sudo mount "$LOOP" /mnt/mkosi --options compress=zstd:1,user_subvol_rm_allowed,noatime,discard=async,space_cache=v2 sudo mount "$LOOP" /mnt/mkosi --options compress=zstd:1,user_subvol_rm_allowed,noatime,discard=async,space_cache=v2
sudo chown "$(id -u):$(id -g)" /mnt/mkosi sudo chown "$(id -u):$(id -g)" /mnt/mkosi
mkdir /mnt/mkosi/tmp mkdir /mnt/mkosi/tmp
echo "TMPDIR=/mnt/mkosi/tmp" >>"$GITHUB_ENV" echo "TMPDIR=/mnt/mkosi/tmp" >>"$GITHUB_ENV"
ln -s /mnt/mkosi/build build ln -s /mnt/mkosi/build build
- name: Configure - name: Configure
run: | run: |
# XXX: drop after the HyperV bug that breaks secure boot KVM guests is solved # XXX: drop after the HyperV bug that breaks secure boot KVM guests is solved
sed -i "s/'firmware'\s*:\s*'auto'/'firmware' : 'uefi'/g" test/*/meson.build sed -i "s/'firmware'\s*:\s*'auto'/'firmware' : 'uefi'/g" test/*/meson.build
tee mkosi.local.conf <<EOF tee mkosi.local.conf <<EOF
[Distribution] [Distribution]
Distribution=${{ matrix.distro }} Distribution=${{ matrix.distro }}
Release=${{ matrix.release }} Release=${{ matrix.release }}
[Output] [Output]
# Build a disk image in CI as this logic is much more prone to breakage. # Build a disk image in CI as this logic is much more prone to breakage.
Format=disk Format=disk
UseSubvolumes=yes UseSubvolumes=yes
WorkspaceDirectory=$TMPDIR WorkspaceDirectory=$TMPDIR
PackageCacheDirectory=$TMPDIR/cache PackageCacheDirectory=$TMPDIR/cache
[Content] [Content]
Environment= Environment=
# Build debuginfo packages since we'll be publishing the packages as artifacts. # Build debuginfo packages since we'll be publishing the packages as artifacts.
WITH_DEBUG=1 WITH_DEBUG=1
CFLAGS="${{ matrix.cflags }}" CFLAGS="${{ matrix.cflags }}"
SANITIZERS=${{ matrix.sanitizers }} SANITIZERS=${{ matrix.sanitizers }}
MESON_OPTIONS=--werror MESON_OPTIONS=--werror
LLVM=${{ matrix.llvm }} LLVM=${{ matrix.llvm }}
SYSEXT=1
[Host] SELinuxRelabel=${{ matrix.relabel }}
QemuMem=4G
# We build with debuginfo so there's no point in mounting the sources into the machine.
RuntimeBuildSources=no
EOF
- name: Generate secure boot key [Host]
run: mkosi --debug genkey QemuMem=4G
EOF
- name: Show image summary - name: Generate secure boot key
run: mkosi summary run: mkosi --debug genkey
- name: Install dependencies - name: Show image summary
run: | run: mkosi summary
mkosi dependencies |
xargs -d '\n' sudo apt-get install \
gperf \
libblkid-dev \
libcap-dev \
libcryptsetup-dev \
libcurl4-openssl-dev \
libfdisk-dev \
libmicrohttpd-dev \
libmount-dev \
libtss2-dev \
meson
- name: Configure meson - name: Install dependencies
run: | run: |
meson setup build \ mkosi dependencies |
--buildtype=debugoptimized \ xargs -d '\n' sudo apt-get install \
-Dintegration-tests=true \ gperf \
-Dremote=enabled \ libblkid-dev \
-Dopenssl=enabled \ libcap-dev \
-Dblkid=enabled \ libcryptsetup-dev \
-Dtpm2=enabled \ libcurl4-openssl-dev \
-Dlibcryptsetup=enabled \ libfdisk-dev \
-Dlibcurl=enabled \ libmicrohttpd-dev \
-Drepart=enabled \ libmount-dev \
-Dfirstboot=true \ libtss2-dev \
-Dsysusers=true \ meson
-Dtmpfiles=true \
-Dhwdb=true \
-Dvmspawn=enabled
- name: Build image - name: Configure meson
run: meson compile -C build mkosi run: |
meson setup build \
--buildtype=debugoptimized \
-Dintegration-tests=true \
-Dremote=enabled \
-Dopenssl=enabled \
-Dblkid=enabled \
-Dtpm2=enabled \
-Dlibcryptsetup=enabled \
-Dlibcurl=enabled \
-Drepart=enabled \
-Dfirstboot=true \
-Dsysusers=true \
-Dtmpfiles=true \
-Dhwdb=true \
-Dvmspawn=enabled
- name: Run integration tests - name: Build image
run: sudo --preserve-env meson test -C build --no-rebuild --suite integration-tests --print-errorlogs --no-stdsplit --num-processes "$(($(nproc) - 1))" run: sudo meson compile -C build mkosi
- name: Archive failed test journals - name: Run integration tests
uses: actions/upload-artifact@v4 run: sudo --preserve-env meson test -C build --no-rebuild --suite integration-tests --print-errorlogs --no-stdsplit --num-processes "$(($(nproc) - 1))"
if: failure() && (github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable')
with:
name: ci-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-failed-test-journals
path: |
build/test/journal/*.journal
build/meson-logs/*
retention-days: 7
- name: Archive packages - name: Archive failed test journals
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: (success() || failure()) && (github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable') if: failure() && (github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable')
with: with:
name: ci-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-packages name: ci-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-failed-test-journals
path: | path: |
build/mkosi.output/*.rpm build/test/journal/*.journal
build/mkosi.output/*.deb build/meson-logs/*
build/mkosi.output/*.ddeb retention-days: 7
build/mkosi.output/*.pkg.tar
retention-days: 4 - name: Archive packages
uses: actions/upload-artifact@v4
if: (success() || failure()) && (github.repository == 'systemd/systemd' || github.repository == 'systemd/systemd-stable')
with:
name: ci-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-packages
path: |
build/mkosi.output/*.rpm
build/mkosi.output/*.deb
build/mkosi.output/*.ddeb
build/mkosi.output/*.pkg.tar
retention-days: 4

View File

@ -1,6 +1,6 @@
meson==1.4.1 \ meson==1.5.1 \
--hash=sha256:1b8aad738a5f6ae64294cc8eaba9a82988c1c420204484ac02ef782e5bba5f49 \ --hash=sha256:5531e24e6cfd6000bf1c712793cf28dff032841370b1a3b941a894e4fde46e5a \
--hash=sha256:d5acc3abae2dad3c70ddcbd10acac92b78b144d34d43f40f5b8ac31dfd8a826a --hash=sha256:567e533adf255de73a2de35049b99923caf872a455af9ce03e01077e0d384bed
ninja==1.11.1.1 \ ninja==1.11.1.1 \
--hash=sha256:18302d96a5467ea98b68e1cae1ae4b4fb2b2a56a82b955193c637557c7273dbd \ --hash=sha256:18302d96a5467ea98b68e1cae1ae4b4fb2b2a56a82b955193c637557c7273dbd \
--hash=sha256:185e0641bde601e53841525c4196278e9aaf4463758da6dd1e752c0a0f54136a \ --hash=sha256:185e0641bde601e53841525c4196278e9aaf4463758da6dd1e752c0a0f54136a \

View File

@ -34,7 +34,7 @@ jobs:
persist-credentials: false persist-credentials: false
- name: Run analysis - name: Run analysis
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif

286
NEWS
View File

@ -2,6 +2,15 @@ systemd System and Service Manager
CHANGES WITH 257 in spe: CHANGES WITH 257 in spe:
Incompatible changes:
* The --purge switch of systemd-tmpfiles (which was added in v256) has
been reworked: it will now only apply to tmpfiles.d/ lines marked
with the new "$" flag. This is an incompatible change, and means any
tmpfiles.d/ files which shall be used together with --purge need to
be updated accordingly. This change has been made to make it harder
to accidentally delete too many files when using --purge incorrectly.
Announcements of Future Feature Removals and Incompatible Changes: Announcements of Future Feature Removals and Incompatible Changes:
* Support for automatic flushing of the nscd user/group database caches * Support for automatic flushing of the nscd user/group database caches
@ -31,6 +40,261 @@ CHANGES WITH 257 in spe:
by default when combined with --scope, will be changed in a future by default when combined with --scope, will be changed in a future
release to be enabled by default. release to be enabled by default.
* The FileDescriptorName= setting for socket units is now honored by
Accept=yes sockets too, where it was previously silently ignored and
"connection" was used unconditionally.
* systemd-logind now always obeys inhibitor locks, where previously it
ignored locks taken by the caller or when the caller was root. A
privileged caller can always close the other sessions, remove the
inhibitor locks, or use --force or --check-inhibitors=no to ignore the
inhibitors. This change thus doesn't affect security, since everything
that was possible before at a given privilege level is still possible,
but it should make the inhibitor logic easier to use and understand,
and also help avoiding accidental reboots and shutdowns. New 'delay-weak'
and 'block-weak' inhibitor modes were added, if taken they will make
the inhibitor lock work as in the previous versions. Inhibitor locks
can also be taken by remote users (subject to polkit policy).
* systemd-nspawn will now mount the unified cgroup hierarchy into a
container if no systemd installation is found in a container's root
filesystem. `$SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=0` can be used to override
this behavior.
libsystemd:
* New sd-json component is now available as part of libsystemd. The
goal of the library is to allow structures to be conveniently
created in C code and serialized to JSON, and for JSON to
conveniently deserialized into in-memory structures, using callbacks
to handle specific keys. Various data types like integers, floats,
booleans, strings, UUIDs, hex-encoded strings, and arrays are
supported natively.
Service and system management:
* Environment variable $REMOTE_ADDR is now set when using socket
activation for AF_UNIX sockets.
* Multipath TCP (MPTCP) is now supported as a socket protocol.
* New crypttab options fido2-pin=, fido2-up=, fido2-uv= can be used to
enable/disable the PIN query, User Presence check, and User
Verification.
* New crypttab option password-cache=yes|no|read-only can be used to
customize password caching.
* New fstab option x-systemd.wants= creates "Wants" dependencies.
(This is similar to the previously available x-systemd.requires=.)
* The initialization of the system clock during boot and updates has
been simplified: either pid1 or systemd-timesyncd will pick the
latest time as indicated by the compiled-in epoch,
/usr/lib/clock-epoch, and /var/lib/systemd/timesync/clock. See
systemd(1) for an detailed updated description.
* Ctrl-Alt-Delete is re-enabled during late shutdown, so that the user
can still initiate a reboot if the system freezes.
* Unit option PrivateUsers=identity can be used to request a user
namespace with an identity mapping for the first 65536 UIDs/GIDs.
This is analogous to the systemd-nspawn's --private-users=identity.
* Unit option PrivateTmp=disconnected can be used to specify that a
separate tmpfs instance should be used for /tmp/ and /var/tmp/ for
the unit.
* A new sleep.conf HibernateOnACPower= option has been added, which
when disabled would suppress hibernation in suspend-then-hibernate
mode until the system is disconnected from a power source.
* udev rules now set 'uaccess' for /dev/udmabuf, giving locally
logged-in users access to the hardware. This is necessary to support
IPMI cameras with libcamera.
* New RELEASE_TYPE= and EXPERIMENT= fields are documented for the
os-release file. For example, "RELEASE_TYPE=development|stable|lts"
can be used to indicate various stages of the release life cycle,
and "RELEASE_TYPE=experimental" can indicate experimental builds,
with the EXPERIMENT= field providing a human-readable description of
the nature of the experiment.
* The manager (and various other tools too) use pidfds in more places
to refer to processes.
* A bunch of patches to ease building against musl have been merged.
* A build option -D link-executor-shared=false can be used to build
the systemd-executor binary (added in the previous release) in a way
where it does not link to shared libsystemd-shared-….so library.
PID1 holds a reference to the executor binary that was on disk when
the manager was started or restarted, but the shared libraries it is
linked to are not loaded until the executor binary needs to be used.
This partial static linking is a workaround for the issue where,
during upgrades, the old libsystemd-shared-….so may have already
been removed and the pinned executor binary will just fail to
execute.
systemd-logind:
* New DesignatedMaintenanceTime= configuration option allows
shutdowns to be automatically scheduled at the specified time.
* logind now reacts to Ctrl-Alt-Shift-Esc being pressed. It will send
out a org.freedesktop.login1.SecureAttentionKey signal, indicating a
request by the user for the system to display a secure login dialog.
The handling of SAK can be suppressed in logind configuration.
systemd-machined:
* Unprivileged clients are now allowed to register VMs and containers.
Machines started via the systemd-vmspawn@.service unit will now be
registered with systemd-machined.
systemd-resolved:
* resolvconf command now supports '-p' switch. If specified, the
interface will not be used as the default route.
* resolvectl now allows interactive polkit authorization. It gained a
--no-ask-password option to suppress it.
systemd-networkd and networkctl:
* IPv6 address labels can be configured in a new [IPv6AddressLabel]
section with Prefix= and Label= settings.
* 'networkctl edit' can now read the new contents from standard input
with the new --stdin option.
* 'networkctl edit' and 'cat' now supports editing .netdev files by
link. 'networkctl cat' can also list all configuration files
associated with an interface at once with ':all'.
* networkctl gained a --no-ask-password option to suppress interactive
polkit authorization.
systemd-boot, systemd-stub, and related tools:
* The EFI stub now supports loading of .ucode sections with microcode
from addons.
* A new .profile PE section type is now documented and supported in
systemd-measure, ukify, systemd-stub and systemd-boot. Those new
sections allow multiple "profiles" to be stored together in the UKI,
with .profile sections creating groupings the UKI, allowing some
sections to be shared and other sections like .cmdline or .initrd
unique to the profile.
* ukify gained an --extend switch to import an existing UKI to
be extended, and a --measure-base= switch to support measurement
of multi-profile UKIs.
The journal:
* journalctl can now list invocations of a unit with the
--list-invocation options and show logs for a specific invocation
with the new --invocation/-I option. (This is analogous to the
--list-boots/--boot/-b options.)
systemd-sysupdate and related tools:
* systemd-sysupdate can be run as system service, allowing
unprivileged clients to update the system via D-Bus calls.
A new updatectl command-line tool can be used to control the
service.
* systemd-sysupdate gained a new --offline option to force it to
operate locally. This is useful when listing locally installed
versions.
* systemd-sysupdate gained a new --transfer-source= option to set the
directory to which transfer sources configured with
PathRelativeTo=explicit will be interpreted.
Miscellaneous:
* systemctl now supports the --now option with the 'reenable' verb.
* systemd-analyze will now show the SMBIOS #11 vendor strings set for
the machine with a new 'smbios11' verb.
* systemd-analyze gained a new --instance= option that can be used to
provide an instance name to analyze multiple templates instantiated
with the same instance name.
* The 'tpm2' verb which lists usable TPM2 devices has been moved from
systemd-creds to systemd-analyze.
* varlinkctl gained a new verb 'list-methods' to show a list of
methods implemented by a service.
* varlinkctl gained a --quiet/-q option to suppress method call
replies.
* varlinkctl gained a --graceful= option to suppress specified Varlink
errors.
* varlinkctl gained a --timeout= option to limit how long the
invocation can take.
* varlinkctl allows remote invocations over ssh, via the new
"ssh-exec:" address specification. It'll make an ssh connection,
start the specified executable on the remote, and communicate with
the remote process using the Varlink protocol.
"ssh:" address specification has been renamed to "ssh-unix:".
(The old syntax is still supported for backwards compatibility.)
* bootctl gained a --random-seed=yes|no option to control provisioning
of the random seed file in ESP. (This is useful when producing an
image that will be used multiple times.)
* systemd-cryptenroll gained new options -fido2-salt-file= and
--fido2-parameters-in-header= to simplify manual enrollment of FIDO2
tokens.
* systemd-cryptenroll, systemd-repart, and systemd-storagetm gained a
new --list-devices option to list appropriate candidate block
devices.
* systemd-repart's CopyBlocks= directive can now use a char device as
source (in addition to previously supported regular files and block
devices).
* systemd-repart gained a new Compression= and CompressionLevel=
settings to enable internal compression in filesystems created
offline.
* systemd-repart understands a new MakeSymlinks= option to create one
or more symlinks (each specified as a symlink name and target).
* systemd-mount can now output JSON with a new --json= switch.
* A new generator sytemd-import-generator has been added to
synthetisize image download jobs. This provides functionality
similar to importctl, but configured via the kernel command line and
system credentials.
* systemd-inhibit now allows interactive polkit authorization. It
gained a --no-ask-password option to suppress it.
* systemd-id128 gained a new 'var-partition-uuid' verb to calculate
the DPS UUID for /var/ keyed by the local machine-id.
* locatectl gained a -l/--full option to show output without
ellipsization.
* 'busctl monitor' gained new options --num-matches= and --timeout=
to set the number of matches or limit the runtime of the command.
This is intended to be used in scripts.
* systemd-run can output some data as JSON via the new --json= option.
* timedatectl now supports interactive polkit authorization.
— <place>, <date> — <place>, <date>
CHANGES WITH 256: CHANGES WITH 256:
@ -366,6 +630,13 @@ CHANGES WITH 256:
* A new unit systemd-udev-load-credentials.service has been added * A new unit systemd-udev-load-credentials.service has been added
to pick up udev.conf drop-ins and udev rules from credentials. to pick up udev.conf drop-ins and udev rules from credentials.
* 'udevadm test' and 'udevadm test-builtin' commands now do not change
any settings; sysfs attributes, sysctls, udev database and so on.
E.g. 'udevadm test-builtin net_setup_link /sys/class/net/INTERFACE'
does not change any interface settings, but only prints which .link
file matches the interface. So, even privileged users can safely
invoke the commands.
* An allowlist/denylist may be specified to filter which sysfs * An allowlist/denylist may be specified to filter which sysfs
attributes are used when crafting network interface names. Those attributes are used when crafting network interface names. Those
lists are stored as hwdb entries lists are stored as hwdb entries
@ -498,9 +769,20 @@ CHANGES WITH 256:
SSH Integration: SSH Integration:
* An sshd config drop-in to allow ssh keys acquired via userdbctl (for * An sshd_config drop-in to allow ssh keys acquired via userdbctl (for
example expose by homed accounts) to be used for authorization of example expose by homed accounts) to be used for authorization of
incoming SSH connections. incoming SSH connections. This uses the AuthorizedKeysCommand stanza
of sshd_config. Note that sshd only allows a single command to be
configured this way, hence this drop-in might conflict with other
uses of the logic. It is possible to chainload another, similar tool
of another subsystem via the --chain switch of userdbctl, to support
both in parallel. See the "INTEGRATION WITH SSH" section in
userdbctl(1) for details on this. Our recommendation how to combine
other subsystem's use of the SSH authorized keys logic with systemd's
userbctl functionality however is to implement the APIs described
here: https://systemd.io/USER_GROUP_API in that case this newly
added sshd_config integration would just work and do the right thing
for all backends.
* A small new unit generator "systemd-ssh-generator" has been added. It * A small new unit generator "systemd-ssh-generator" has been added. It
checks if the sshd binary is installed. If so, it binds it via checks if the sshd binary is installed. If so, it binds it via

6
README
View File

@ -130,9 +130,10 @@ REQUIREMENTS:
Required for signed Verity images support: Required for signed Verity images support:
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG
Required to verify signed Verity images using keys enrolled in the MoK Required to verify signed Verity images using keys enrolled in the MOK
(Machine-Owner Key) keyring: (Machine-Owner Key) and DB UEFI certificate stores:
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_PLATFORM_KEYRING
CONFIG_IMA_ARCH_POLICY CONFIG_IMA_ARCH_POLICY
CONFIG_INTEGRITY_MACHINE_KEYRING CONFIG_INTEGRITY_MACHINE_KEYRING
@ -168,6 +169,7 @@ REQUIREMENTS:
Required for systemd-oomd: Required for systemd-oomd:
CONFIG_PSI CONFIG_PSI
CONFIG_MEMCG
Note that kernel auditing is broken when used with systemd's container Note that kernel auditing is broken when used with systemd's container
code. When using systemd in conjunction with containers, please make code. When using systemd in conjunction with containers, please make

131
TODO
View File

@ -130,6 +130,71 @@ Deprecations and removals:
Features: Features:
* find a nice way to opt-in into auto-masking SIGCHLD on first
sd_event_add_child(), and then get rid of many more explicit sigprocmask()
calls.
* maybe set shell.prompt.prefix credential in run0 to some warning emoji,
i.e. ⚠️ or ☢️ or ⚡ or 👊 or 🧑‍🔧 or so.
* introduce new structure Tpm2CombinedPolicy, that combines the various TPm2
policy bits into one structure, i.e. public key info, pcr masks, pcrlock
stuff, pin and so on. Then pass that around in tpm2_seal() and tpm2_unseal().
* look at nsresourced, mountfsd, homed, importd, and try to come up with a way
how the forked off worker processes can be moved into transient services with
sandboxing, without breaking notify socket stuff and so on.
* replace all \x1b, \x1B, \033 C string escape sequences in our codebase with a
more readable \e. It's a GNU extension, but a ton more readable than the
others, and most importantly it doesn't result in confusing errors if you
suffix the escape sequence with one more decimal digit, because compilers
think you might actually specify a value outside the 8bit range with that.
* homed: allow login via username + realm on getty/login prompt. Then rewrite
the user name in the PAM stack
* homed/userdb: add "aliases" field to user record, which can alternatively be
used for logging in. Rewrite user name in the PAM stack once acquired.
* confext/sysext: instead of mounting the overlayfs directly on /etc/ + /usr/,
insert an intermediary bind mount on itself there. This has the benefit that
services where mount propagation from the root fs is off, an still have
confext/sysext propagated in.
* support F_DUDFD_QUERY for comparing fds in same_fd (requires kernel 6.10)
* generic interface for varlink for setting log level and stuff that all our daemons can implement
* use pty ioctl to get peer wherever possible (TIOCGPTPEER)
* maybe teach repart.d/ dropins a new setting MakeMountNodes= or so, which is
just like MakeDirectories=, but uses an access mode of 0000 and sets the +i
chattr bit. This is useful as protection against early uses of /var/ or /tmp/
before their contents is mounted.
* go through all uses of table_new() in our codebase, and make sure we support
all three of:
1. --no-legend properly
2. --json= properly
3. --no-pager properly
* go through all --help texts in our codebases, and make sure:
1. the one sentence description of the tool is highlighted via ANSI how we
usually do it
2. If more than one or two commands are supported (as opposed to switches),
separate commands + switches from each other, using underlined --help sections.
3. If there are many switches, consider adding additional --help sections.
* go through our codebase, and convert "vertical tables" (i.e. things such as
"systemctl status") to use table_new_vertical() for output
* pcrlock: add support for multi-profile UKIs
* logind: when logging in use new tmpfs quota support to configure quota on
/tmp/ + /dev/shm/. But do so only in case of tmpfs, because otherwise quota
is persistent and any persistent settings mean we don#t have to reapply them.
* initrd: when transitioning from initrd to host, validate that * initrd: when transitioning from initrd to host, validate that
/lib/modules/`uname -r` exists, refuse otherwise /lib/modules/`uname -r` exists, refuse otherwise
@ -161,11 +226,6 @@ Features:
set Slice=protected.sice, RefuseManualStart=yes, RefuseManualStop=yes and a set Slice=protected.sice, RefuseManualStart=yes, RefuseManualStop=yes and a
couple of other things. couple of other things.
* improve inode_same_at() to use AT_HANDLE_FID flag in name_to_handle_at() to
compare inode identity, rather than .st_ino where available. Kernel FS
folks gave up on idea that inode numbers are fs-wide unique, and suggest
using the file handle/AT_HANDLE_FID instead.
* add feature to xopenat() that implements O_REGULAR in userspace: i.e. let's * add feature to xopenat() that implements O_REGULAR in userspace: i.e. let's
open the inode via O_PATH first, then validate its type, and then convert to open the inode via O_PATH first, then validate its type, and then convert to
proper fd via fd_reopen() proper fd via fd_reopen()
@ -249,7 +309,7 @@ Features:
which uses 32bit words). which uses 32bit words).
* In vmspawn/nspawn/machined wait for X_SYSTEMD_UNIT_ACTIVE=ssh-active.target * In vmspawn/nspawn/machined wait for X_SYSTEMD_UNIT_ACTIVE=ssh-active.target
and X_SYSTEMD_SIGNAL_LEVEL=2 as indication whether/when SSH and the POSIX and X_SYSTEMD_SIGNALS_LEVEL=2 as indication whether/when SSH and the POSIX
signals are available. Similar for D-Bus (but just use sockets.target for signals are available. Similar for D-Bus (but just use sockets.target for
that). Report as property for the machine. that). Report as property for the machine.
@ -269,12 +329,6 @@ Features:
the bg via vmspawn/nspawn if not done so yet and then requests a shell inside the bg via vmspawn/nspawn if not done so yet and then requests a shell inside
it for the invoking user. it for the invoking user.
* make varlink.h a public API, i.e. give all symbols an sd_ prefix, and rename
header file to sd-varlink.h. This of course also means we have to make json.h
public the same way. Convert the function param checks from assert() to
assert_ret(). Only export the stuff we are sure about, and keep some symbols
internally where things are not clear whether we want other projects to use.
* importd/…: define per-user dirs for container/VM images too. * importd/…: define per-user dirs for container/VM images too.
* add a new specifier to unit files that figures out the DDI the unit file is * add a new specifier to unit files that figures out the DDI the unit file is
@ -433,13 +487,9 @@ Features:
nvme-oF nvme-oF
* pcrlock: * pcrlock:
- make signed PCR work together with pcrlock
- add kernel-install plugin that automatically creates UKI .pcrlock file when - add kernel-install plugin that automatically creates UKI .pcrlock file when
UKI is installed, and removes it when it is removed again UKI is installed, and removes it when it is removed again
- automatically install PE measurement of sd-boot on "bootctl install" - automatically install PE measurement of sd-boot on "bootctl install"
- write generated pcrlock signature files to the ESP as credential, one for
each installed OS & pick up generated pcrlock signature file in sd-stub,
pass it via initrd to OS
- pre-calc sysext + kernel cmdline measurements - pre-calc sysext + kernel cmdline measurements
- pre-calc cryptsetup root key measurement - pre-calc cryptsetup root key measurement
- maybe make systemd-repart generate .pcrlock for old and new GPT header in - maybe make systemd-repart generate .pcrlock for old and new GPT header in
@ -538,7 +588,6 @@ Features:
- cg_pid_get_xyz() - cg_pid_get_xyz()
- pid_from_same_root_fs() - pid_from_same_root_fs()
- get_ctty_devnr() - get_ctty_devnr()
- pid1: sd_notify() receiver should use SCM_PIDFD to authenticate client
- actually wait for POLLIN on pidref's pidfd in service logic - actually wait for POLLIN on pidref's pidfd in service logic
- openpt_allocate_in_namespace() - openpt_allocate_in_namespace()
- unit_attach_pid_to_cgroup_via_bus() - unit_attach_pid_to_cgroup_via_bus()
@ -900,9 +949,6 @@ Features:
* systemd-tmpfiles: add concept for conditionalizing lines on factory reset * systemd-tmpfiles: add concept for conditionalizing lines on factory reset
boot, or on first boot. boot, or on first boot.
* in UKIs: add way to define allowlist of additional words that can be added to
the kernel cmdline even in SecureBoot mode
* we probably needs .pcrpkeyrd or so as additional PE section in UKIs, * we probably needs .pcrpkeyrd or so as additional PE section in UKIs,
which contains a separate public key for PCR values that only apply in the which contains a separate public key for PCR values that only apply in the
initrd, i.e. in the boot phase "enter-initrd". Then, consumers in userspace initrd, i.e. in the boot phase "enter-initrd". Then, consumers in userspace
@ -955,12 +1001,6 @@ Features:
* in the initrd, once the rootfs encryption key has been measured to PCR 15, * in the initrd, once the rootfs encryption key has been measured to PCR 15,
derive default machine ID to use from it, and pass it to host PID 1. derive default machine ID to use from it, and pass it to host PID 1.
* tree-wide: convert as much as possible over to use sd_event_set_signal_exit(), instead
of manually hooking into SIGINT/SIGTERM
* tree-wide: convert as much as possible over to SD_EVENT_SIGNAL_PROCMASK
instead of manual blocking.
* sd-boot: for each installed OS, grey out older entries (i.e. all but the * sd-boot: for each installed OS, grey out older entries (i.e. all but the
newest), to indicate they are obsolete newest), to indicate they are obsolete
@ -1028,9 +1068,6 @@ Features:
* in sd-boot: load EFI drivers from a new PE section. That way, one can have a * in sd-boot: load EFI drivers from a new PE section. That way, one can have a
"supercharged" sd-boot binary, that could carry ext4 drivers built-in. "supercharged" sd-boot binary, that could carry ext4 drivers built-in.
* sd-bus: document that sd_bus_process() only returns messages that non of the
filters/handlers installed on the connection took possession of.
* sd-device: add an API for acquiring list of child devices, given a device * sd-device: add an API for acquiring list of child devices, given a device
objects (i.e. all child dirents that dirs or symlinks to dirs) objects (i.e. all child dirents that dirs or symlinks to dirs)
@ -1210,9 +1247,6 @@ Features:
appropriate qemu cmdline. That way qemu payloads could talk sd_notify() appropriate qemu cmdline. That way qemu payloads could talk sd_notify()
directly to host service manager. directly to host service manager.
* sd-device has an API to create an sd_device object from a device id, but has
no api to query the device id
* sd-device should return the devnum type (i.e. 'b' or 'c') via some API for an * sd-device should return the devnum type (i.e. 'b' or 'c') via some API for an
sd_device object, so that data passed into sd_device_new_from_devnum() can sd_device object, so that data passed into sd_device_new_from_devnum() can
also be queried. also be queried.
@ -1257,14 +1291,6 @@ Features:
multiple versions are around of the same resource, show which ones. (in other multiple versions are around of the same resource, show which ones. (in other
words: show partition labels). words: show partition labels).
* maybe add a generator that reads /proc/cmdline, looks for
systemd.pull-raw-portable=, systemd-pull-raw-sysext= and similar switches
that take a URL as parameter. It then generates service units for
systemd-pull calls that download these URLs if not installed yet. Use case:
invoke a VM or nspawn container in a way it automatically deploys/runs these
images as OS payloads. i.e. have a generic OS image you can point to any
payload you like, which is then downloaded, securely verified and run.
* systemd-dissect: add --cat switch for dumping files such as /etc/os-release * systemd-dissect: add --cat switch for dumping files such as /etc/os-release
* per-service sandboxing option: ProtectIds=. If used, will overmount * per-service sandboxing option: ProtectIds=. If used, will overmount
@ -1475,6 +1501,8 @@ Features:
* systemd-analyze netif that explains predictable interface (or networkctl) * systemd-analyze netif that explains predictable interface (or networkctl)
* systemd-analyze inspect-elf should show other notes too, at least build-id.
* Figure out naming of verbs in systemd-analyze: we have (singular) capability, * Figure out naming of verbs in systemd-analyze: we have (singular) capability,
exit-status, but (plural) filesystems, architectures. exit-status, but (plural) filesystems, architectures.
@ -1659,7 +1687,8 @@ Features:
zero and is not open anymore, while the latter happens when a file is zero and is not open anymore, while the latter happens when a file is
unlinked from any dir. unlinked from any dir.
* port systemctl, busctl, … over to format-table.[ch]'s table formatters * systemctl, machinectl, loginctl: port "status" commands over to
format-table.c's vertical output logic.
* pid1: lock image configured with RootDirectory=/RootImage= using the usual nspawn semantics while the unit is up * pid1: lock image configured with RootDirectory=/RootImage= using the usual nspawn semantics while the unit is up
@ -1685,9 +1714,6 @@ Features:
the entire system, with the exception of one specific service. See: the entire system, with the exception of one specific service. See:
https://lists.freedesktop.org/archives/systemd-devel/2018-February/040369.html https://lists.freedesktop.org/archives/systemd-devel/2018-February/040369.html
* maybe rework get_user_creds() to query the user database if $SHELL is used
for root, but only then.
* calenderspec: add support for week numbers and day numbers within a * calenderspec: add support for week numbers and day numbers within a
year. This would allow us to define "bi-weekly" triggers safely. year. This would allow us to define "bi-weekly" triggers safely.
@ -1836,7 +1862,7 @@ Features:
* fstab-generator: default to tmpfs-as-root if only usr= is specified on the kernel cmdline * fstab-generator: default to tmpfs-as-root if only usr= is specified on the kernel cmdline
* docs: bring https://systemd.io/MY_SERVICE_CANT_GET_REATLIME up to date * docs: bring https://systemd.io/MY_SERVICE_CANT_GET_REALTIME up to date
* add a job mode that will fail if a transaction would mean stopping * add a job mode that will fail if a transaction would mean stopping
running units. Use this in timedated to manage the NTP service running units. Use this in timedated to manage the NTP service
@ -1992,6 +2018,8 @@ Features:
- ExtensionImages= deduplication for services is currently only applied to disk images without GPT envelope. - ExtensionImages= deduplication for services is currently only applied to disk images without GPT envelope.
This should be extended to work with proper DDIs too, as well as directory confext/sysext. Moreover, This should be extended to work with proper DDIs too, as well as directory confext/sysext. Moreover,
system-wide confex/sysext should support this too. system-wide confex/sysext should support this too.
- Pin the mount namespace via FD by sending it back from sd-exec to the manager, and use it
for live mounting, instead of doing it via PID
* unit files: * unit files:
- allow port=0 in .socket units - allow port=0 in .socket units
@ -2132,16 +2160,9 @@ Features:
- follow PropertiesChanged state more closely, to deal with quick logouts and - follow PropertiesChanged state more closely, to deal with quick logouts and
relogins relogins
- (optionally?) spawn seat-manager@$SEAT.service whenever a seat shows up that as CanGraphical set - (optionally?) spawn seat-manager@$SEAT.service whenever a seat shows up that as CanGraphical set
- expose details of boot entries on the bus. In particular, it should be possible
to query the list of boot entry titles that bootctl / sd-boot would show.
Currently we only expose their identifiers.
* move multiseat vid/pid matches from logind udev rule to hwdb * move multiseat vid/pid matches from logind udev rule to hwdb
* logind: rework pam_logind to also do a bus call in case of invocation from
user@.service, which returns the XDG_RUNTIME_DIR value, and make this
behaviour selectable via pam module option.
* delay activation of logind until somebody logs in, or when /dev/tty0 pulls it * delay activation of logind until somebody logs in, or when /dev/tty0 pulls it
in or lingering is on (so that containers don't bother with it until PAM is used). also exit-on-idle in or lingering is on (so that containers don't bother with it until PAM is used). also exit-on-idle
@ -2255,9 +2276,7 @@ Features:
should probably honour that same limit (JOURNAL_FILES_MAX) when vacuuming to should probably honour that same limit (JOURNAL_FILES_MAX) when vacuuming to
ensure we never generate more files than we can actually view. ensure we never generate more files than we can actually view.
* maybe add a tool that displays most recent journal logs as QR code to scan * bsod: maybe use graphical mode. Use DRM APIs directly, see
off screen and run it automatically on boot failures, emergency logs and
such. Use DRM APIs directly, see
https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c for an example https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c for an example
for doing that. for doing that.
@ -2311,7 +2330,7 @@ Features:
- GNOME's side for forget key on suspend (requires rework so that lock screen runs outside of uid) - GNOME's side for forget key on suspend (requires rework so that lock screen runs outside of uid)
- update LUKS password on login if we find there's a password that unlocks the JSON record but not the LUKS device. - update LUKS password on login if we find there's a password that unlocks the JSON record but not the LUKS device.
- create on activate? - create on activate?
- properties: icon url?, preferred session type?, administrator bool (which translates to 'wheel' membership)?, address?, telephone?, vcard?, samba stuff?, parental controls? - properties: icon url?, administrator bool (which translates to 'wheel' membership)?, address?, telephone?, vcard?, samba stuff?, parental controls?
- communicate clearly when usb stick is safe to remove. probably involves - communicate clearly when usb stick is safe to remove. probably involves
beefing up logind to make pam session close hook synchronous and wait until beefing up logind to make pam session close hook synchronous and wait until
systemd --user is shut down. systemd --user is shut down.

View File

@ -788,9 +788,22 @@ Defined-By: systemd
Support: %SUPPORT_URL% Support: %SUPPORT_URL%
Documentation: man:systemd-tpm2-setup.service(8) Documentation: man:systemd-tpm2-setup.service(8)
An authorization failure occurred while attempting to enroll a Storage Root Key (SRK) on the Trusted Platform An authorization failure occurred while attempting to enroll a Storage Root Key
Module (TPM). Most likely this means that a PIN/Password (authValue) has been set on the Owner hierarchy of (SRK) on the Trusted Platform Module (TPM). Most likely this means that a
the TPM. PIN/Password (authValue) has been set on the Owner hierarchy of the TPM.
Automatic SRK enrollment on TPMs in such scenarios is not supported. In order to unset the PIN/password Automatic SRK enrollment on TPMs in such scenarios is not supported. In order
protection on the owner hierarchy issue a command like the following: 'tpm2_changeauth -c o -p <OLDPW> ""'. to unset the PIN/password protection on the owner hierarchy issue a command
like the following: 'tpm2_changeauth -c o -p <OLDPW> ""'.
-- 9cf56b8baf9546cf9478783a8de42113
Subject: A foreign process changed a sysctl systemd-networkd manages
Defined-By: systemd
Support: %SUPPORT_URL%
The sysctl configuration setting @SYSCTL@, which is managed by
systemd-networkd, has been changed by another, unrelated process
("@OBJECT_COMM@", PID @OBJECT_PID@). This represents a conflict of ownership
and will likely result in problems later on.
Value changed to "@NEWVALUE@", which should be "@OURVALUE@".

118
docs/APPSTREAM_BUNDLE.md Normal file
View File

@ -0,0 +1,118 @@
---
title: Appstream Bundle
category: Interfaces
layout: default
SPDX-License-Identifier: LGPL-2.1-or-later
---
# Appstream Bundle
NOTE: This document is a work-in-progress.
NOTE: This isn't yet implemented in libappstream and the software centers.
[Appstream catalogs](https://www.freedesktop.org/software/appstream/docs/chap-CatalogData.html)
are a standardized way to expose metadata about system components, apps, and updates to software
centers (i.e. GNOME Software and KDE Discover). The `<bundle/>` tag links an appstream component
to a packaging format. This is used by the software centers to decide which code path (or plugin)
should handle the component. For instance: components with a `<bundle type="package">...</bundle>`
will be handled by [PackageKit](https://www.freedesktop.org/software/PackageKit/), and components
with a `<bundle type="flatpak">...</bundle>` will be handled by [libflatpak](https://docs.flatpak.org/).
This document will define how to format an appstream component's `<bundle>` tag such that software
centers will know to manage it using systemd. The following syntax will be supported:
A `type="systemd"` attribute. This tells the software center that it should treat the bundle tag
as described in this document.
A `class=""` attribute, with the following possible values: `sysupdate`, `extension`, `confext`,
or `portable`. These correspond to sysupdate components, sysexts, confexts, and portable services
respectively.
The value of the tag will be used as the name of the image (corresponding to the `class=` attribute).
So for instance, `<bundle type="systemd" class="extension">foobar</bundle>` corresponds to a sysext
named "foobar". For `class="sysupdate"`, there is a special case: if the value is empty, then the
bundle actually refers to the host system.
## Examples
```xml
<component type="addon">
<id>com.example.Devel</id>
<extends>com.example.OS</extends>
<name>Development Tools</name>
<summary>Tools essential to develop Example OS</summary>
<provides>
<binary>gcc</binary>
<binary>g++</binary>
<binary>make</binary>
<binary>autoconf</binary>
<binary>cmake</binary>
<binary>meson</binary>
<binary>ninja</binary>
</provides>
<developer_name>Example, inc.</developer_name>
<releases>
<release version="45" date="2024-01-15" />
<release version="44" date="2023-12-08" />
<release version="43" date="2023-11-10" />
</releases>
<bundle type="systemd" class="extension">devel</bundle>
</component>
```
defines a sysext named `devel` to be presented by the software center. It will be
updated via `systemd-sysupdated`'s `extension:devel` target. It will be treated
as a plugin for the operating system itself.
```xml
<component merge="append">
<id>com.example.OS</id>
<releases>
<release version="45" date="2024-01-15" urgency="high">
<description>
<p>This release includes various bug fixes and performance improvements</p>
</description>
</release>
</releases>
<bundle type="systemd" class="sysupdate" />
</component>
```
extends existing appstream metadata for the host OS with a changelog. It also tells the software
center that the host OS should be updated using the `host` target for `systemd-sysupdated`.
```xml
<component type="service">
<id>com.example.Foobar</id>
<name>Foobar Service</name>
<summary>Service that does foo to bar</summary>
<icon type="remote">https://example.com/products/foobar/logo.svg</icon>
<url type="homepage">https://example.com/products/foobar</url>
<provides>
<dbus type="system">com.example.Foobar</dbus>
</provides>
<developer_name>Example, inc.</developer_name>
<releases>
<release version="1.0.1" date="2024-02-16" urgency="critical">
<description>
<p>This release fixes a major security vulnerability. Please update ASAP.</p>
</description>
<issues>
<issue type="cve">CVE-2024-28153</issue>
</issues>
</release>
<release version="1.1-beta" date="2024-01-08" type="development" />
<release version="1.0" date="2023-11-23">
<description>
<p>Initial release!</p>
</description>
</release>
</releases>
<bundle type="systemd" class="portable">foobar</bundle>
</component>
```
defines a portable service named `foobar` to be presented by the software center. It will be
updated via `systemd-sysupdated`'s `portable:foobar` target. It will be marked as an
urgent update. It will be presented to the user with a display name, a description, and
a custom icon.

View File

@ -93,7 +93,7 @@ Hotkeys to select a specific entry in the menu, or when pressed during bootup to
|--------|------------------------------------------------------------| |--------|------------------------------------------------------------|
| l | Linux | | l | Linux |
| w | Windows | | w | Windows |
| a | OS X | | a | macOS |
| s | EFI Shell | | s | EFI Shell |
| 1-9 | number of entry | | 1-9 | number of entry |

View File

@ -237,7 +237,9 @@ care should be taken to avoid naming conflicts. `systemd` (and in particular
directory: it's used by code outside the container to insert mounts inside directory: it's used by code outside the container to insert mounts inside
it only, and is mostly an internal vehicle to achieve this. Other container it only, and is mostly an internal vehicle to achieve this. Other container
managers that want to implement similar functionality might consider using managers that want to implement similar functionality might consider using
the same directory. the same directory. Alternatively, the new mount API may be used by the
container manager to establish new mounts in the container without the need
for the `/run/host/incoming/` directory.
2. The `/run/host/inaccessible/` directory may be set up by the container 2. The `/run/host/inaccessible/` directory may be set up by the container
manager to include six file nodes: `reg`, `dir`, `fifo`, `sock`, `chr`, manager to include six file nodes: `reg`, `dir`, `fifo`, `sock`, `chr`,

View File

@ -223,7 +223,7 @@ Use these APIs to register any kind of process workload with systemd to be place
### Reading Accounting Information ### Reading Accounting Information
Note that there's currently no systemd API to retrieve accounting information from cgroups. For now, if you need to retrieve this information use `/proc/$PID/cgroup` to determine the cgroup path for your process in the `cpuacct` controller (or whichever controller matters to you), and then read the attributes directly from the cgroup tree. Accounting information is available via the `MemoryCurrent`, `MemoryPeak`, `MemorySwapCurrent`, `MemorySwapPeak`, `MemoryZSwapCurrent`, `MemoryAvailable`, `EffectiveMemoryMax`, `EffectiveMemoryHigh`, `CPUUsageNSec`, `EffectiveCPUs`, `EffectiveMemoryNodes`, `TasksCurrent`, `EffectiveTasksMax`, `IPIngressBytes`, `IPIngressPackets`, `IPEgressBytes`, `IPEgressPackets`, `IOReadBytes`, `IOReadOperations`, `IOWriteBytes`, and `IOWriteOperations` D-Bus properties. To read this and other information directly from the cgroup tree, get the unit's cgroup path (relative to `/sys/fs/cgroup`) from the `ControlGroup` property, by calling [`sd_pid_get_cgroup()`](https://www.freedesktop.org/software/systemd/man/latest/sd_pid_get_cgroup.html), or by parsing `/proc/$PID/cgroup`.
If you want to collect the exit status and other runtime parameters of your transient scope or service unit after the processes in them ended set the `RemainAfterExit` boolean property when creating it. This will has the effect that the unit will stay around even after all processes in it died, in the `SubState="exited"` state. Simply watch for state changes until this state is reached, then read the status details from the various properties you need, and finally terminate the unit via `StopUnit()` on the `Manager` object or `Stop()` on the `Unit` object itself. If you want to collect the exit status and other runtime parameters of your transient scope or service unit after the processes in them ended set the `RemainAfterExit` boolean property when creating it. This will has the effect that the unit will stay around even after all processes in it died, in the `SubState="exited"` state. Simply watch for state changes until this state is reached, then read the status details from the various properties you need, and finally terminate the unit via `StopUnit()` on the `Manager` object or `Stop()` on the `Unit` object itself.
@ -247,4 +247,4 @@ Note that scope units created by `machined`'s `CreateMachine()` call have this f
### Example ### Example
Please see the [systemd-run sources](http://cgit.freedesktop.org/systemd/systemd/plain/src/run/run.c) for a relatively simple example how to create scope or service units transiently and pass properties to them. Please see the [systemd-run sources](https://github.com/systemd/systemd/blob/main/src/run/run.c) for a relatively simple example how to create scope or service units transiently and pass properties to them.

View File

@ -87,3 +87,90 @@ of the libraries they specify in order to be enabled.
| required | Core functionality needs the dependency, the binary will not work if it cannot be found | | required | Core functionality needs the dependency, the binary will not work if it cannot be found |
| recommended | Important functionality needs the dependency, the binary will work but in most cases the dependency should be provided | | recommended | Important functionality needs the dependency, the binary will work but in most cases the dependency should be provided |
| suggested | Secondary functionality needs the dependency, the binary will work and the dependency is only needed for full-featured installations | | suggested | Secondary functionality needs the dependency, the binary will work and the dependency is only needed for full-featured installations |
### Displaying `dlopen()` notes
The raw ELF section can be extracted using `objdump`:
```console
$ objdump -j .note.dlopen -s /usr/lib64/systemd/libsystemd-shared-257.so
/usr/lib64/systemd/libsystemd-shared-257.so: file format elf64-x86-64
Contents of section .note.dlopen:
0334 04000000 8e000000 0a0c7c40 46444f00 ..........|@FDO.
0344 5b7b2266 65617475 7265223a 22627066 [{"feature":"bpf
0354 222c2264 65736372 69707469 6f6e223a ","description":
0364 22537570 706f7274 20666972 6577616c "Support firewal
0374 6c696e67 20616e64 2073616e 64626f78 ling and sandbox
0384 696e6720 77697468 20425046 222c2270 ing with BPF","p
0394 72696f72 69747922 3a227375 67676573 riority":"sugges
03a4 74656422 2c22736f 6e616d65 223a5b22 ted","soname":["
03b4 6c696262 70662e73 6f2e3122 2c226c69 libbpf.so.1","li
03c4 62627066 2e736f2e 30225d7d 5d000000 bbpf.so.0"]}]...
03d4 04000000 9e000000 0a0c7c40 46444f00 ..........|@FDO.
...
```
It is more convenient to use a higher level tool:
```console
$ dlopen-notes /usr/lib64/systemd/libsystemd-shared-257.so
# /usr/lib64/systemd/libsystemd-shared-257.so
[
{
"feature": "archive",
"description": "Support for decompressing archive files",
"priority": "suggested",
"soname": [
"libarchive.so.13"
]
},
{
"feature": "bpf",
"description": "Support firewalling and sandboxing with BPF",
"priority": "suggested",
"soname": [
"libbpf.so.1",
"libbpf.so.0"
]
},
...
```
`dlopen-notes` can display the notes grouped in a few different ways.
One option is to filter the libraries by "feature". This answers the
question "what libraries are needed to provide specified features":
```console
$ dlopen-notes.py -f archive,bpf /usr/lib64/systemd/libsystemd-shared-257.so
# grouped by feature
{
"bpf": {
"description": "Support firewalling and sandboxing with BPF",
"sonames": {
"libbpf.so.1": "suggested",
"libbpf.so.0": "suggested"
}
},
"archive": {
"description": "Support for decompressing archive files",
"sonames": {
"libarchive.so.13": "suggested"
}
}
}
The format that is used when building `deb` packages:
```console
$ dlopen-notes -s /usr/lib64/systemd/libsystemd-shared-257.so
libarchive.so.13 suggested
libbpf.so.0 suggested
libbpf.so.1 suggested
...
```
The format that can be useful when building `rpm` packages:
```console
$ dlopen-notes --rpm-requires archive --rpm-recommends bpf /usr/lib64/systemd/libsystemd-shared-257.so
Requires: libarchive.so.13()(64bit)
Recommends: libbpf.so.1()(64bit)
```

View File

@ -103,3 +103,97 @@ A set of well-known keys is defined here, and hopefully shared among all vendors
| architecture | The binary package architecture | arm32 | | architecture | The binary package architecture | arm32 |
| osCpe | A CPE name for the OS, typically corresponding to CPE_NAME in os-release | cpe:/o:fedoraproject:fedora:33 | | osCpe | A CPE name for the OS, typically corresponding to CPE_NAME in os-release | cpe:/o:fedoraproject:fedora:33 |
| debugInfoUrl | The debuginfod server url, if available | https://debuginfod.fedoraproject.org/ | | debugInfoUrl | The debuginfod server url, if available | https://debuginfod.fedoraproject.org/ |
### Displaying package notes
The raw ELF section can be extracted using `objdump`:
```console
$ objdump -j .note.package -s /usr/bin/ls
/usr/bin/ls: file format elf64-x86-64
Contents of section .note.package:
03cc 04000000 7c000000 7e1afeca 46444f00 ....|...~...FDO.
03dc 7b227479 7065223a 2272706d 222c226e {"type":"rpm","n
03ec 616d6522 3a22636f 72657574 696c7322 ame":"coreutils"
03fc 2c227665 7273696f 6e223a22 392e342d ,"version":"9.4-
040c 372e6663 3430222c 22617263 68697465 7.fc40","archite
041c 63747572 65223a22 7838365f 3634222c cture":"x86_64",
042c 226f7343 7065223a 22637065 3a2f6f3a "osCpe":"cpe:/o:
043c 6665646f 72617072 6f6a6563 743a6665 fedoraproject:fe
044c 646f7261 3a343022 7d000000 dora:40"}...
```
It is more convenient to use a higher level tool:
```console
$ readelf --notes /usr/bin/ls
...
Displaying notes found in: .note.gnu.build-id
Owner Data size Description
GNU 0x00000014 NT_GNU_BUILD_ID (unique build ID bitstring)
Build ID: 40e5a1570a9d97fc48f5c61cfb7690fec0f872b2
Displaying notes found in: .note.ABI-tag
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
OS: Linux, ABI: 3.2.0
Displaying notes found in: .note.package
Owner Data size Description
FDO 0x0000007c FDO_PACKAGING_METADATA
Packaging Metadata: {"type":"rpm","name":"coreutils","version":"9.4-7.fc40","architecture":"x86_64","osCpe":"cpe:/o:fedoraproject:fedora:40"}
...
$ systemd-analyze inspect-elf /usr/bin/ls
path: /usr/bin/ls
elfType: executable
elfArchitecture: AMD x86-64
type: rpm
name: coreutils
version: 9.4-7.fc40
architecture: x86_64
osCpe: cpe:/o:fedoraproject:fedora:40
buildId: 40e5a1570a9d97fc48f5c61cfb7690fec0f872b2
```
If the binary crashes, `systemd-coredump` will display the combined information
from the crashing binary and any shared libraries it links to:
```console
$ coredumpctl info
PID: 3987823 (ls)
Signal: 11 (SEGV)
Command Line: ls --color=tty -lR /
Executable: /usr/bin/ls
...
Storage: /var/lib/systemd/coredump/core.ls.1000.88dea1b9831c420dbb398f9d2ad9b41e.3987823.1726230641000000.zst (present)
Size on Disk: 194.4K
Package: coreutils/9.4-7.fc40
build-id: 40e5a1570a9d97fc48f5c61cfb7690fec0f872b2
Message: Process 3987823 (ls) of user 1000 dumped core.
Module /usr/bin/ls from rpm coreutils-9.4-7.fc40.x86_64
Module libz.so.1 from rpm zlib-ng-2.1.7-1.fc40.x86_64
Module libcrypto.so.3 from rpm openssl-3.2.2-3.fc40.x86_64
Module libmount.so.1 from rpm util-linux-2.40.1-1.fc40.x86_64
Module libcrypt.so.2 from rpm libxcrypt-4.4.36-5.fc40.x86_64
Module libblkid.so.1 from rpm util-linux-2.40.1-1.fc40.x86_64
Module libnss_sss.so.2 from rpm sssd-2.9.5-1.fc40.x86_64
Module libpcre2-8.so.0 from rpm pcre2-10.44-1.fc40.x86_64
Module libcap.so.2 from rpm libcap-2.69-8.fc40.x86_64
Module libselinux.so.1 from rpm libselinux-3.6-4.fc40.x86_64
Stack trace of thread 3987823:
#0 0x00007f19331c3f7e lgetxattr (libc.so.6 + 0x116f7e)
#1 0x00007f19332be4c0 lgetfilecon_raw (libselinux.so.1 + 0x134c0)
#2 0x00007f19332c3bd9 lgetfilecon (libselinux.so.1 + 0x18bd9)
#3 0x000056038273ad55 gobble_file.constprop.0 (/usr/bin/ls + 0x17d55)
#4 0x0000560382733c55 print_dir (/usr/bin/ls + 0x10c55)
#5 0x0000560382727c35 main (/usr/bin/ls + 0x4c35)
#6 0x00007f19330d7088 __libc_start_call_main (libc.so.6 + 0x2a088)
#7 0x00007f19330d714b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a14b)
#8 0x0000560382728f15 _start (/usr/bin/ls + 0x5f15)
ELF object binary architecture: AMD x86-64
```
(This is just a simulation. `ls` is not prone to crashing with a segmentation violation.)

View File

@ -23,17 +23,17 @@ All tools:
* `$SYSTEMD_OFFLINE=[0|1]` — if set to `1`, then `systemctl` will refrain from * `$SYSTEMD_OFFLINE=[0|1]` — if set to `1`, then `systemctl` will refrain from
talking to PID 1; this has the same effect as the historical detection of talking to PID 1; this has the same effect as the historical detection of
`chroot()`. Setting this variable to `0` instead has a similar effect as `chroot()`. Setting this variable to `0` instead has a similar effect as
`$SYSTEMD_IGNORE_CHROOT=1`; i.e. tools will try to communicate with PID 1 `$SYSTEMD_IN_CHROOT=0`; i.e. tools will try to communicate with PID 1
even if a `chroot()` environment is detected. You almost certainly want to even if a `chroot()` environment is detected. You almost certainly want to
set this to `1` if you maintain a package build system or similar and are set this to `1` if you maintain a package build system or similar and are
trying to use a modern container system and not plain `chroot()`. trying to use a modern container system and not plain `chroot()`.
* `$SYSTEMD_IGNORE_CHROOT=1` — if set, don't check whether being invoked in a * `$SYSTEMD_IN_CHROOT=0|1` — takes a boolean. If set, overrides chroot detection.
`chroot()` environment. This is particularly relevant for systemctl, as it This is particularly relevant for systemctl, as it will not alter its behaviour
will not alter its behaviour for `chroot()` environments if set. Normally it for `chroot()` environments if `SYSTEMD_IN_CHROOT=0`. Normally it refrains from
refrains from talking to PID 1 in such a case; turning most operations such talking to PID 1 in such a case; turning most operations such as `start` into
as `start` into no-ops. If that's what's explicitly desired, you might no-ops. If that's what's explicitly desired, you might consider setting
consider setting `$SYSTEMD_OFFLINE=1`. `$SYSTEMD_OFFLINE=1`.
* `$SYSTEMD_FIRST_BOOT=0|1` — if set, assume "first boot" condition to be false * `$SYSTEMD_FIRST_BOOT=0|1` — if set, assume "first boot" condition to be false
or true, instead of checking the flag file created by PID 1. or true, instead of checking the flag file created by PID 1.
@ -634,6 +634,10 @@ SYSTEMD_HOME_DEBUG_SUFFIX=foo \
* `$SYSTEMD_REPART_OVERRIDE_FSTYPE` if set the value will override the file * `$SYSTEMD_REPART_OVERRIDE_FSTYPE` if set the value will override the file
system type specified in Format= lines in partition definition files. system type specified in Format= lines in partition definition files.
Additionally, the filesystem for all partitions with a specific designator can
be overridden via a correspondingly named environment variable. For example,
to override the filesystem type for all partitions with `Type=root`, you can
set `SYSTEMD_REPART_OVERRIDE_FSTYPE_ROOT=ext4`.
`systemd-nspawn`, `systemd-networkd`: `systemd-nspawn`, `systemd-networkd`:

View File

@ -104,7 +104,7 @@ A: Use:
**Q: Whenever my service tries to acquire RT scheduling for one of its threads this is refused with EPERM even though my service is running with full privileges. This works fine on my non-systemd system!** **Q: Whenever my service tries to acquire RT scheduling for one of its threads this is refused with EPERM even though my service is running with full privileges. This works fine on my non-systemd system!**
A: By default, systemd places all systemd daemons in their own cgroup in the "cpu" hierarchy. Unfortunately, due to a kernel limitation, this has the effect of disallowing RT entirely for the service. See [My Service Can't Get Realtime!](/MY_SERVICE_CANT_GET_REATLIME) for a longer discussion and what to do about this. A: By default, systemd places all systemd daemons in their own cgroup in the "cpu" hierarchy. Unfortunately, due to a kernel limitation, this has the effect of disallowing RT entirely for the service. See [My Service Can't Get Realtime!](/MY_SERVICE_CANT_GET_REALTIME) for a longer discussion and what to do about this.
**Q: My service is ordered after `network.target` but at boot it is still called before the network is up. What's going on?** **Q: My service is ordered after `network.target` but at boot it is still called before the network is up. What's going on?**

View File

@ -29,8 +29,7 @@ For some components (most importantly, systemd/PID 1 itself) this is not possibl
In order to simplify testing for cases like this we provide a set of `mkosi` config files directly in the source tree. In order to simplify testing for cases like this we provide a set of `mkosi` config files directly in the source tree.
[mkosi](https://mkosi.systemd.io/) [mkosi](https://mkosi.systemd.io/)
is a tool for building clean OS images from an upstream distribution in combination with a fresh build of the project in the local working directory. is a tool for building clean OS images from an upstream distribution in combination with a fresh build of the project in the local working directory.
To make use of this, please install `mkosi` v19 or newer using your distribution's package manager or from the To make use of this, please install `mkosi` from the [GitHub repository](https://github.com/systemd/mkosi#running-mkosi-from-the-repository).
[GitHub repository](https://github.com/systemd/mkosi).
`mkosi` will build an image for the host distro by default. `mkosi` will build an image for the host distro by default.
First, run `mkosi genkey` to generate a key and certificate to be used for secure boot and verity signing. First, run `mkosi genkey` to generate a key and certificate to be used for secure boot and verity signing.
After that is done, it is sufficient to type `mkosi` in the systemd project directory to generate a disk image you can boot either in `systemd-nspawn` or in a UEFI-capable VM: After that is done, it is sufficient to type `mkosi` in the systemd project directory to generate a disk image you can boot either in `systemd-nspawn` or in a UEFI-capable VM:
@ -45,71 +44,52 @@ or:
$ mkosi qemu $ mkosi qemu
``` ```
Every time you rerun the `mkosi` command a fresh image is built, By default, the tools from your host system are used to build the image. To have
incorporating all current changes you made to the project tree. `mkosi` use the systemd tools from the `build/` directory, add the following to
`mkosi.local.conf`:
By default a directory image is built.
This requires `virtiofsd` to be installed on the host.
To build a disk image instead which does not require `virtiofsd`, add the following to `mkosi.local.conf`:
```conf
[Output]
Format=disk
```
To boot in UEFI mode instead of using QEMU's direct kernel boot, add the following to `mkosi.local.conf`:
```conf ```conf
[Host] [Host]
QemuFirmware=uefi ExtraSearchPaths=build/
``` ```
To avoid having to build a new image all the time when iterating on a patch, And if you want `mkosi` to build a tools image and use the tools from there
add the following to `mkosi.local.conf`: instead of looking for tools on the host, add the following to
`mkosi.local.conf`:
```conf ```conf
[Host] [Host]
RuntimeBuildSources=yes ToolsTree=default
``` ```
After enabling this setting, the source and build directories will be mounted to Every time you rerun the `mkosi` command a fresh image is built, incorporating
`/work/src` and `/work/build` respectively when booting the image as a container all current changes you made to the project tree. To build the latest changes
or virtual machine. To build the latest changes and re-install, run and re-install after booting the image, run one of the following commands in
`meson install -C /work/build --only-changed` in the container or virtual machine another terminal on your host (choose the right one depending on the
and optionally restart the daemon(s) you're working on using distribution of the container or virtual machine):
`systemctl restart <units>` or `systemctl daemon-reexec` if you're working on pid1
or `systemctl soft-reboot` to restart everything.
Aside from the image, the `mkosi.output` directory will also be populated with a
set of distribution packages. Assuming you're running the same distribution and
release as the mkosi image, you can install these rpms on your host or test
system as well for any testing or debugging that cannot easily be performed in a
VM or container.
By default, no debuginfo packages are produced. To produce debuginfo packages,
run mkosi with the `WITH_DEBUG` environment variable set to `1`:
```sh ```sh
$ mkosi -E WITH_DEBUG=1 -f mkosi -t none && mkosi ssh dnf upgrade --disablerepo="*" --assumeyes "/work/build/*.rpm" # CentOS/Fedora
mkosi -t none && mkosi ssh apt-get install "/work/build/*.deb" # Debian/Ubuntu
mkosi -t none && mkosi ssh pacman --upgrade --needed --noconfirm "/work/build/*.pkg.tar" # Arch Linux
mkosi -t none && mkosi ssh zypper --non-interactive install --allow-unsigned-rpm "/work/build/*.rpm" # OpenSUSE
``` ```
or configure it in `mkosi.local.conf`: and optionally restart the daemon(s) you're working on using
`systemctl restart <units>` or `systemctl daemon-reexec` if you're working on
```conf pid1 or `systemctl soft-reboot` to restart everything.
[Content]
Environment=WITH_DEBUG=1
```
Putting this all together, here's a series of commands for preparing a patch for systemd: Putting this all together, here's a series of commands for preparing a patch for systemd:
```sh ```sh
$ git clone https://github.com/systemd/mkosi.git # If mkosi v19 or newer is not packaged by your distribution $ git clone https://github.com/systemd/mkosi.git
$ ln -s $PWD/mkosi/bin/mkosi /usr/local/bin/mkosi # If mkosi v19 or newer is not packaged by your distribution $ ln -s $PWD/mkosi/bin/mkosi /usr/local/bin/mkosi
$ git clone https://github.com/systemd/systemd.git $ git clone https://github.com/systemd/systemd.git
$ cd systemd $ cd systemd
$ git checkout -b <BRANCH> # where BRANCH is the name of the branch $ git checkout -b <BRANCH> # where BRANCH is the name of the branch
$ vim src/core/main.c # or wherever you'd like to make your changes $ vim src/core/main.c # or wherever you'd like to make your changes
$ mkosi -f qemu # (re-)build and boot up the test image in qemu $ mkosi -f qemu # (re-)build and boot up the test image in qemu
$ mkosi -t none # Build new packages without rebuilding the image
$ git add -p # interactively put together your patch $ git add -p # interactively put together your patch
$ git commit # commit it $ git commit # commit it
$ git push -u <REMOTE> # where REMOTE is your "fork" on GitHub $ git push -u <REMOTE> # where REMOTE is your "fork" on GitHub

View File

@ -42,6 +42,9 @@ If such a lock is taken the operation will fail (but still may be overridden if
The InhibitDelayMaxSec= setting in [logind.conf(5)](http://www.freedesktop.org/software/systemd/man/logind.conf.html) controls the timeout for this. This is intended to be used by applications which need a synchronous way to execute actions before system suspend but shall not be allowed to block suspend indefinitely. The InhibitDelayMaxSec= setting in [logind.conf(5)](http://www.freedesktop.org/software/systemd/man/logind.conf.html) controls the timeout for this. This is intended to be used by applications which need a synchronous way to execute actions before system suspend but shall not be allowed to block suspend indefinitely.
This mode is only available for _sleep_ and _shutdown_ locks. This mode is only available for _sleep_ and _shutdown_ locks.
3. _block-weak_ and _delay-weak_ that work as the non-weak counterparts, but that in addition may be ignored
automatically and silently under certain circumstances, unlike the formers which are always respected.
Inhibitor locks are taken via the Inhibit() D-Bus call on the logind Manager object: Inhibitor locks are taken via the Inhibit() D-Bus call on the logind Manager object:
``` ```

View File

@ -27,3 +27,9 @@ SPDX-License-Identifier: LGPL-2.1-or-later
18. [FINAL] Build and upload the documentation (on the -stable branch): `ninja -C build doc-sync` 18. [FINAL] Build and upload the documentation (on the -stable branch): `ninja -C build doc-sync`
20. [FINAL] Change the Github Pages branch to the newly created branch (https://github.com/systemd/systemd/settings/pages) and set the 'Custom domain' to 'systemd.io' 20. [FINAL] Change the Github Pages branch to the newly created branch (https://github.com/systemd/systemd/settings/pages) and set the 'Custom domain' to 'systemd.io'
21. [FINAL] Update version number in `meson.version` to the devel version of the next release (e.g. from `v256` to `v257~devel`) 21. [FINAL] Update version number in `meson.version` to the devel version of the next release (e.g. from `v256` to `v257~devel`)
# Steps to a Successful Stable Release
1. Backport at least the commits from all PRs tagged with `needs-stable-backport` on Github with `git cherry-pick -x`. Any other commits that fix bugs, change documentation, tests, CI or mkosi can generally be backported as well. Since 256 the stable branches live [here](https://github.com/systemd/systemd/). Stable branches for older releases are available [here](https://github.com/systemd/systemd-stable/). Check each commit to see if it makes sense to backport and check the comments on the PR to see if the author indicated that only specific commits should be backported.
2. Update the version number in `meson.version` (e.g. from `256.2` to `256.3`) (only for 256-stable or newer)
3. Tag the release: `version="v$(cat meson.version)" && git tag -s "${version}" -m "systemd-stable ${version}"` (Fill in the version manually on releases older than 256)

View File

@ -120,6 +120,16 @@ Devicetree addons are measured individually as a tagged event.
**Measured hash** covers the content of the Devicetree. **Measured hash** covers the content of the Devicetree.
### PCR 12, `EV_EVENT_TAG`, "Ucode addons"
Ucode addons are measured individually as a tagged event.
**Event Tag** `0xdac08e1a`
**Description** the addon filename.
**Measured hash** covers the contents of the ucode initrd.
### PCR 12, `EV_IPL`, "Per-UKI Credentials initrd" ### PCR 12, `EV_IPL`, "Per-UKI Credentials initrd"
**Description** in the event log record is the constant string "Credentials **Description** in the event log record is the constant string "Credentials

View File

@ -27,9 +27,6 @@ i.e. 0…4294967295. However, four UIDs are special on Linux:
only supporting 16-bit UIDs, NFS or user namespacing. only supporting 16-bit UIDs, NFS or user namespacing.
(The latter can be changed with a sysctl during runtime, but that's not supported on (The latter can be changed with a sysctl during runtime, but that's not supported on
`systemd`. If you do change it you void your warranty.) `systemd`. If you do change it you void your warranty.)
Because Fedora is a bit confused the `nobody` user is called `nfsnobody` there
(and they have a different `nobody` user at UID 99).
I hope this will be corrected eventually though.
(Also, some distributions call the `nobody` group `nogroup`. I wish they didn't.) (Also, some distributions call the `nobody` group `nogroup`. I wish they didn't.)
3. 4294967295, aka "32-bit `(uid_t) -1`" → This UID is not a valid user ID, as 3. 4294967295, aka "32-bit `(uid_t) -1`" → This UID is not a valid user ID, as

View File

@ -255,6 +255,13 @@ evdev:input:b0003v0ED1p7821*
# Dell # Dell
######################################### #########################################
# Dell AlpsPS/2 ALPS DualPoint TouchPad
evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*:svnDellInc.*:pnLatitudeE7440*:
EVDEV_ABS_00=:::28
EVDEV_ABS_01=:::28
EVDEV_ABS_35=:::28
EVDEV_ABS_36=:::28
# Dell Vostro 1510 # Dell Vostro 1510
evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnDellInc.:pnVostro1510:* evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnDellInc.:pnVostro1510:*
EVDEV_ABS_00=::14 EVDEV_ABS_00=::14
@ -623,6 +630,13 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadL14Gen1**
EVDEV_ABS_35=::44 EVDEV_ABS_35=::44
EVDEV_ABS_36=::50 EVDEV_ABS_36=::50
# Lenovo Thinkpad E16 Gen1 (Intel)
evdev:name:SYNA801A:00 06CB:CEC6 Touchpad:dmi:*svnLENOVO:*pvrThinkPadE16Gen1**
EVDEV_ABS_00=::11
EVDEV_ABS_01=::11
EVDEV_ABS_35=::11
EVDEV_ABS_36=::11
# Lenovo T460 # Lenovo T460
evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*T460:* evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*T460:*
EVDEV_ABS_00=1266:5677:44 EVDEV_ABS_00=1266:5677:44

View File

@ -223,7 +223,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPackard*Bell*:pn*:*
# Swift SF314-511 # Swift SF314-511
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnSwiftSF314-511:pvr* evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnSwiftSF314-511:pvr*
KEYBOARD_KEY_8a=f20 # Fn+F12, microphone mute KEYBOARD_KEY_8a=f20 # Fn+F12, microphone mute
# Predator PHN16-71 # Predator PHN16-71
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredatorPHN16-71:* evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredatorPHN16-71:*
@ -231,6 +231,10 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredatorPHN16-71:*
KEYBOARD_KEY_f5=prog1 # "predator sense" button KEYBOARD_KEY_f5=prog1 # "predator sense" button
KEYBOARD_KEY_66=micmute # Microphone mute button KEYBOARD_KEY_66=micmute # Microphone mute button
# Predator PHN16-72
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredatorPHN16-72:*
KEYBOARD_KEY_66=micmute # Microphone mute button
# Nitro AN515-58 # Nitro AN515-58
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnNitro*AN*515-58:pvr* evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnNitro*AN*515-58:pvr*
KEYBOARD_KEY_8a=f20 # Microphone mute button KEYBOARD_KEY_8a=f20 # Microphone mute button
@ -252,6 +256,15 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pn*:*
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pnM17xR3:* evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pnM17xR3:*
KEYBOARD_KEY_89=ejectcd KEYBOARD_KEY_89=ejectcd
###########################################################
# Aquarius
###########################################################
# Aquarius Cmp NS483
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAquarius*:pnCmp*NS483*:*
KEYBOARD_KEY_56=backslash
KEYBOARD_KEY_76=f21 # Touchpad Toggle
########################################################### ###########################################################
# Asus # Asus
########################################################### ###########################################################
@ -327,10 +340,15 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnNotebook:pnW65_67SZ:*
evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNS50_70MU:* evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNS50_70MU:*
evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNV4XMB,ME,MZ:* evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNV4XMB,ME,MZ:*
evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNS5x_NS7xPU:* evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNS5x_NS7xPU:*
KEYBOARD_KEY_f7=f21 # Touchpad Toggle
KEYBOARD_KEY_f8=f21 # Touchpad Toggle
evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnV5xTNC_TND_TNE:*
evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNV4xPZ:* evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnNV4xPZ:*
evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnV54x_6x_TU:* evdev:atkbd:dmi:bvn*:bvr*:svnNotebook:pnV54x_6x_TU:*
KEYBOARD_KEY_f7=f21 # Touchpad Toggle KEYBOARD_KEY_f7=f21 # Touchpad Toggle
KEYBOARD_KEY_f8=f21 # Touchpad Toggle KEYBOARD_KEY_f8=f21 # Touchpad Toggle
KEYBOARD_KEY_81=f20 # Fn+4; Mic Mute
########################################################### ###########################################################
# Compal # Compal
@ -465,6 +483,8 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS12-9Q33*:*
KEYBOARD_KEY_88=wlan KEYBOARD_KEY_88=wlan
KEYBOARD_KEY_65=direction # Screen Rotate KEYBOARD_KEY_65=direction # Screen Rotate
# Dell Pro Rugged microphone mute
evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnDellProRugged*:*
# Dell G16 microphone mute # Dell G16 microphone mute
evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnDellG16*:* evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnDellG16*:*
# Dell Latitude microphone mute # Dell Latitude microphone mute
@ -962,7 +982,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnJP-IK:pnLEAPW502:pvr*
# LE14U/LE15U # LE14U/LE15U
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnKVADRA*:pn*LE1*U*:* evdev:atkbd:dmi:bvn*:bvr*:bd*:svnKVADRA*:pn*LE1*U*:*
KEYBOARD_KEY_76=f21 # Fn+F1 Toggle touchpad, sends meta+ctrl+toggle KEYBOARD_KEY_76=f21 # Fn+F1 Toggle touchpad, sends meta+ctrl+toggle
########################################################### ###########################################################
# Lenovo # Lenovo
@ -1537,6 +1557,11 @@ evdev:name:MSI Laptop hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnM[iI][cC][rR][oO]-S[tT][a
KEYBOARD_KEY_0213=f22 KEYBOARD_KEY_0213=f22
KEYBOARD_KEY_0214=f23 KEYBOARD_KEY_0214=f23
# MSI Claw
evdev:name:AT Translated Set 2 keyboard:dmi:*:svnMicro-StarInternationalCo.,Ltd.:pnClawA1M:*
KEYBOARD_KEY_b9=f15 # Right Face Button
KEYBOARD_KEY_ba=f16 # Left Face Button
########################################## ##########################################
# NEC # NEC
########################################## ##########################################
@ -1885,9 +1910,9 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700T*:*
# Galaxy Book (2021) NP750XDA-KD4SE # Galaxy Book (2021) NP750XDA-KD4SE
evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn750XDA:pvr* evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn750XDA:pvr*
KEYBOARD_KEY_81=!esc KEYBOARD_KEY_81=!esc
KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings KEYBOARD_KEY_ce=!prog1 # Fn+F1 launch settings
KEYBOARD_KEY_ae=!volumedown # Fn+F7 volume down KEYBOARD_KEY_ae=!volumedown # Fn+F7 volume down
KEYBOARD_KEY_b0=!volumeup # Fn+F8 volume up KEYBOARD_KEY_b0=!volumeup # Fn+F8 volume up
########################################################### ###########################################################
@ -2012,13 +2037,13 @@ evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:
# Portege Z830 ACPI quickstart buttons # Portege Z830 ACPI quickstart buttons
evdev:name:Quickstart Button 1:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnPORTEGEZ830:* evdev:name:Quickstart Button 1:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnPORTEGEZ830:*
KEYBOARD_KEY_1=prog1 # TOSHIBA eco button KEYBOARD_KEY_1=prog1 # TOSHIBA eco button
evdev:name:Quickstart Button 2:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnPORTEGEZ830:* evdev:name:Quickstart Button 2:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnPORTEGEZ830:*
KEYBOARD_KEY_1=prog2 # TOSHIBA Presentation button KEYBOARD_KEY_1=prog2 # TOSHIBA Presentation button
evdev:name:Quickstart Button 3:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnPORTEGEZ830:* evdev:name:Quickstart Button 3:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnPORTEGEZ830:*
KEYBOARD_KEY_1=f21 # Touchpad toggle KEYBOARD_KEY_1=f21 # Touchpad toggle
########################################################### ###########################################################
# VIA # VIA
@ -2051,11 +2076,11 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINET:pnP325J:*
# Home: LeftCtrl + Esc -> LeftMeta (ignore LeftCtrl, map Esc to LeftMeta) # Home: LeftCtrl + Esc -> LeftMeta (ignore LeftCtrl, map Esc to LeftMeta)
# Back: Backspace -> back (map backspace to back) # Back: Backspace -> back (map backspace to back)
evdev:name:FTSC1000:00 2808:509C Keyboard:dmi:*:svnXiaomiInc:pnMipad2:* evdev:name:FTSC1000:00 2808:509C Keyboard:dmi:*:svnXiaomiInc:pnMipad2:*
KEYBOARD_KEY_700e0=unknown # LeftCtrl -> ignore KEYBOARD_KEY_700e0=unknown # LeftCtrl -> ignore
KEYBOARD_KEY_700e3=unknown # LeftMeta -> ignore KEYBOARD_KEY_700e3=unknown # LeftMeta -> ignore
KEYBOARD_KEY_70016=menu # S -> menu KEYBOARD_KEY_70016=menu # S -> menu
KEYBOARD_KEY_70029=leftmeta # Esc -> LeftMeta (Windows key / Win8 tablets home) KEYBOARD_KEY_70029=leftmeta # Esc -> LeftMeta (Windows key / Win8 tablets home)
KEYBOARD_KEY_7002a=back # Backspace -> back KEYBOARD_KEY_7002a=back # Backspace -> back
########################################################### ###########################################################
# Zepto # Zepto
@ -2167,7 +2192,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnViewSonic:pnVPAD10:*
evdev:name:AT Translated Set 2 keyboard:dmi:bvn*:bvr*:bd*:svnPositivoBahia-VAIO:pnVJPW1[12]F11X*:pvr*:* evdev:name:AT Translated Set 2 keyboard:dmi:bvn*:bvr*:bd*:svnPositivoBahia-VAIO:pnVJPW1[12]F11X*:pvr*:*
# Vaio FE14 (VJFE41F11X, VJE42F11X, VJFE44F11X, VJFE54F11X) # Vaio FE14 (VJFE41F11X, VJE42F11X, VJFE44F11X, VJFE54F11X)
evdev:name:AT Translated Set 2 keyboard:dmi:bvn*:bvr*:bd*:svnPositivoBahia-VAIO:pnVJFE*:pvr*:* evdev:name:AT Translated Set 2 keyboard:dmi:bvn*:bvr*:bd*:svnPositivoBahia-VAIO:pnVJFE*:pvr*:*
KEYBOARD_KEY_76=f21 # Fn+F1 toggle touchpad KEYBOARD_KEY_76=f21 # Fn+F1 toggle touchpad
########################################################### ###########################################################
# Positivo # Positivo
@ -2214,6 +2239,13 @@ evdev:name:SIPODEV USB Composite Device:dmi:bvn*:bvr*:svnPositivoTecnologiaSA:pn
KEYBOARD_KEY_7006d=prog3 # Programmable button KEYBOARD_KEY_7006d=prog3 # Programmable button
KEYBOARD_KEY_7006e=prog4 # Programmable button KEYBOARD_KEY_7006e=prog4 # Programmable button
###########################################################
# Multilaser
###########################################################
# Multilaser Ultra (UL154)
evdev:name:AT Translated Set 2 keyboard:dmi:bvn*bvr*:svnMultilaserIndustrial:pn*:pvr*:rvn*:rnUL154*
KEYBOARD_KEY_76=f21 # Fn+f2 toggle touchpad
########################################################### ###########################################################
# Other # Other
########################################################### ###########################################################
@ -2265,6 +2297,18 @@ evdev:input:b0003v05FEp1010*
# #
# Presence of a LED is implicit when the property is absent. # Presence of a LED is implicit when the property is absent.
# Apple Wireless keyboards
evdev:input:b0005v05aCp022C*
evdev:input:b0005v05aCp022D*
evdev:input:b0005v05aCp022E*
evdev:input:b0005v05aCp0239*
evdev:input:b0005v05aCp023A*
evdev:input:b0005v05aCp023B*
evdev:input:b0005v05aCp0255*
evdev:input:b0005v05aCp0256*
evdev:input:b0005v05aCp0257*
KEYBOARD_LED_NUMLOCK=0
# Logitech K750 # Logitech K750
evdev:input:b0003v046Dp4002* evdev:input:b0003v046Dp4002*
KEYBOARD_LED_NUMLOCK=0 KEYBOARD_LED_NUMLOCK=0

View File

@ -116,6 +116,11 @@ sensor:modalias:acpi:BOSC0200*:dmi:*svnAcer*:*pnSpinSP111-34:*
# Aquarius # Aquarius
######################################### #########################################
# Aquarius Cmp NS483
sensor:modalias:acpi:MXC6655*:dmi:*:svnAquarius*:pnCmp*NS483:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
sensor:modalias:acpi:MXC4005*:dmi:*:svnAquarius*:pnCmp*NS483:*
# Aquarius NS483 # Aquarius NS483
sensor:modalias:acpi:MXC6655*:dmi:*:svnAquarius*:pnNS483:* sensor:modalias:acpi:MXC6655*:dmi:*:svnAquarius*:pnNS483:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
@ -147,6 +152,7 @@ sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnM80TA:*
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TA:* sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TA:*
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TAF:* sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TAF:*
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TAM:* sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TAM:*
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TAS:*
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT200TA:* sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT200TA:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
@ -158,6 +164,7 @@ sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LA:*
sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LD:* sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LD:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pn*Q551LB:*
sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pn*Q551LN:* sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pn*Q551LN:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
@ -195,13 +202,33 @@ sensor:modalias:acpi:SMO8500*:dmi:*:svnStandard:pnWCBT1011::*
# AYANEO # AYANEO
######################################### #########################################
# AYANEO AIR # AYANEO 2021, 2021 Pro, 2021 Pro Retro Power
sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pnAIR*:* sensor:modalias:acpi:10EC5280*:dmi:*:svnAYANEO:pn*2021*:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, -1; 1, 0, 0
# AYANEO NEXT # AYANEO 2, 2S
sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pnAYANEO 2*:*
ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, -1; 1, 0, 0
# AYANEO AIR, AIR Pro, and 1S
sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pnAIR*:*
ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, -1; 1, 0, 0
# AYANEO AIR Plus AMD, Plus Mendocino, and Plus Intel
sensor:modalias:acpi:BOSC0200*:dmi:*:svnAYANEO:pnAIR Plus*:*
ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, 1; -1, 0, 0
# AYANEO FLIP DS, FLIP KB
sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pnFLIP**:*
ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, -1; 1, 0, 0
# AYANEO GEEK, GEEK 1S
sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pnAYANEO GEEK*:*
ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, -1; 1, 0, 0
# AYANEO NEXT, NEXT Lite, NEXT Advance, and NEXT Pro
sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pn*NEXT*:* sensor:modalias:acpi:BMI0160*:dmi:*:svnAYANEO:pn*NEXT*:*
ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-0, -1, 0; 0, 0, -1; 1, 0, 0
######################################### #########################################
# BMAX # BMAX
@ -272,6 +299,10 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnCHUWIInnovationAndTechnology*:pnHi10X:*
sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIINNOVATIONLIMITED:pnHi10Go:* sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIINNOVATIONLIMITED:pnHi10Go:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0,-1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0,-1, 0; 0, 0, 1
# Chuwi Hi10 Max
sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIInnovationAndTechnology*:pnHi10Max:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
# Chuwi Hi12 # Chuwi Hi12
sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnP02BD6_HI-122LP:* sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnP02BD6_HI-122LP:*
sensor:modalias:acpi:BOSC0200*:dmi:*:svnDefaultstring:pnDefaultstring:* sensor:modalias:acpi:BOSC0200*:dmi:*:svnDefaultstring:pnDefaultstring:*
@ -316,6 +347,10 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo*:pnC3W6_AP108_4GB:*
sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIInnovationAndTechnology*:pnUBookX:* sensor:modalias:acpi:MXC6655*:dmi:*:svnCHUWIInnovationAndTechnology*:pnUBookX:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, -1 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, -1
# Chuwi Freebook N100
sensor:modalias:acpi:MDA6655*:dmi:*:svnCHUWI*:pnFreeBook:*
ACCEL_MOUNT_MATRIX=0, -1, 0;1, 0, 0;0, 0, 1
######################################### #########################################
# Connect # Connect
######################################### #########################################
@ -534,6 +569,10 @@ sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/25/201
sensor:modalias:acpi:MXC6655*:dmi:*:svnGPD:pnG1621-02:* sensor:modalias:acpi:MXC6655*:dmi:*:svnGPD:pnG1621-02:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
# GPD WinMax2
sensor:modalias:acpi:BMI0160*:dmi:*:svnGPD:pnG1619*:*
ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
######################################### #########################################
# Hometech # Hometech
######################################## ########################################
@ -568,6 +607,15 @@ sensor:modalias:i2c:bmc150_accel:dmi:*:svnHewlett-Packard:pnHPPavilionx2Detachab
sensor:modalias:i2c:bmc150_accel:dmi:*:svnHewlett-Packard:pnHPProTablet408:*:rn8048:* sensor:modalias:i2c:bmc150_accel:dmi:*:svnHewlett-Packard:pnHPProTablet408:*:rn8048:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
#########################################
# HUAWEI
#########################################
# HUAWEI MateBook D 15 AMD
sensor:modalias:acpi:SMO8840*:dmi:*:svnHUAWEI:pnBOHK-WAX9X:*
ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
ACCEL_LOCATION=base
######################################### #########################################
# I.T.Works # I.T.Works
######################################### #########################################
@ -712,8 +760,9 @@ sensor:modalias:i2c:bmc150_accel:dmi:*:svnLENOVO:*:pvrLenovoYoga300-11IBR:*
sensor:modalias:acpi:ACCL0001*:dmi:*:svnLENOVO:pn60072:pvr851*:* sensor:modalias:acpi:ACCL0001*:dmi:*:svnLENOVO:pn60072:pvr851*:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
# IdeaPad Duet 3 10IGL5 (82AT) # IdeaPad Duet 3 10IGL5 (82AT) and 10IGL5-LTE (82HK)
sensor:modalias:acpi:SMO8B30*:dmi:*:svnLENOVO*:pn82AT:* sensor:modalias:acpi:SMO8B30*:dmi:*:svnLENOVO*:pn82AT:*
sensor:modalias:acpi:SMO8B30*:dmi:*:svnLENOVO*:pn82HK:*
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1 ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
######################################### #########################################
@ -881,6 +930,14 @@ sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.12:bd07/17/201
sensor:modalias:acpi:BMI0160*:dmi:*:rnONEXPLAYER:rvrV01:* sensor:modalias:acpi:BMI0160*:dmi:*:rnONEXPLAYER:rvrV01:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, -1 ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, -1
#########################################
# OrangePi
#########################################
# OrangePi NEO
sensor:modalias:acpi:BMI0260*:dmi:*:svnOrangePi:pnNEO-01:*
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 0, -1; 0, -1, 0
######################################### #########################################
# Passion # Passion
######################################### #########################################

View File

@ -18,6 +18,21 @@
usb:v2982p1967* usb:v2982p1967*
ID_AV_PRODUCTION_CONTROLLER=1 ID_AV_PRODUCTION_CONTROLLER=1
################
# Contour
################
# Shuttle Pro
usb:v0B33p0011*
ID_AV_PRODUCTION_CONTROLLER=1
# Shuttle Pro V2
usb:v0B33p0030*
ID_AV_PRODUCTION_CONTROLLER=1
# ShuttleXpress
usb:v0B33p0020*
ID_AV_PRODUCTION_CONTROLLER=1
################ ################
# Eks # Eks
################ ################
@ -83,6 +98,13 @@ usb:v06F8pB100*
usb:v06F8pB107* usb:v06F8pB107*
ID_AV_PRODUCTION_CONTROLLER=1 ID_AV_PRODUCTION_CONTROLLER=1
####################
# ICOM
####################
# RC-28 Remote Encoder
usb:v0C26p001E*
ID_AV_PRODUCTION_CONTROLLER=1
##################### #####################
# Native Instruments # Native Instruments
##################### #####################
@ -161,3 +183,17 @@ usb:v17CCp1130*
# CDJ 2000 NXS 2 # CDJ 2000 NXS 2
usb:v2B73p0005* usb:v2B73p0005*
ID_AV_PRODUCTION_CONTROLLER=1 ID_AV_PRODUCTION_CONTROLLER=1
####################
# SunSDR
####################
# E-Coder 2 Controller
usb:v1FC9p0003*
ID_AV_PRODUCTION_CONTROLLER=1
####################
# Xencelabs
####################
# Quick Keys
usb:v28BDp5202*
ID_AV_PRODUCTION_CONTROLLER=1

View File

@ -12,6 +12,16 @@
camera:usb:v*p*:name:*IR Camera*: camera:usb:v*p*:name:*IR Camera*:
ID_INFRARED_CAMERA=1 ID_INFRARED_CAMERA=1
###########################################################
# Hewlett-Packard
###########################################################
# Chicony Electronics Co., Ltd HP Wide Vision FHD Camera (IR function)
camera:usb:v04f2pb634:name:*I:
# Realtek Semiconductor Corp. HP Wide Vision FHD Camera (IR function)
camera:usb:v0bdap58e6:name:*I:
ID_INFRARED_CAMERA=1
########################################################### ###########################################################
# Philips # Philips
########################################################### ###########################################################

View File

@ -0,0 +1,24 @@
# This file is part of systemd.
#
# Database for Hardware Wallets that should be accessible to the seat owner.
##
# To add local entries, copy this file to
# /etc/udev/hwdb.d/
# and add your rules there. To load the new rules execute (as root):
# systemd-hwdb update
# udevadm trigger
################
# Trezor Hardware Wallets
################
# Trezor v1
usb:v534Cp0001*
ID_HARDWARE_WALLET=1
# Trezor v2
usb:v1209p53C0*
ID_HARDWARE_WALLET=1
usb:v1209p53C1*
ID_HARDWARE_WALLET=1

View File

@ -248,6 +248,14 @@ mouse:usb:v1ea7p000b:name:2.4G RF Mouse:*
mouse:usb:v04d9p0499:name:*:* mouse:usb:v04d9p0499:name:*:*
MOUSE_DPI=800@125 MOUSE_DPI=800@125
##########################################
# Glorious
##########################################
# Glorious Model O Minus
mouse:usb:v258ap0036:name:Glorious Model O:*
MOUSE_DPI=400@1000 800@1000 *1600@1000 3200@1000
########################################## ##########################################
# HandShoe Mouse # HandShoe Mouse
########################################## ##########################################
@ -302,6 +310,10 @@ mouse:bluetooth:v047dp8019:name:Expert Wireless TB Mouse:*
ID_INPUT_TRACKBALL=1 ID_INPUT_TRACKBALL=1
MOUSE_DPI=400@125 MOUSE_DPI=400@125
# Kensington SlimBlade Pro trackball (via Bluetooth)
mouse:bluetooth:v047dp80d4:name:SlimBlade Pro:*
ID_INPUT_TRACKBALL=1
########################################## ##########################################
# Lenovo # Lenovo
########################################## ##########################################

View File

@ -29,6 +29,7 @@ hwdb_files_test = files(
'70-analyzers.hwdb', '70-analyzers.hwdb',
'70-av-production.hwdb', '70-av-production.hwdb',
'70-cameras.hwdb', '70-cameras.hwdb',
'70-hardware-wallets.hwdb',
'70-joystick.hwdb', '70-joystick.hwdb',
'70-mouse.hwdb', '70-mouse.hwdb',
'70-pda.hwdb', '70-pda.hwdb',

View File

@ -174,6 +174,7 @@ def property_grammar():
('ID_INPUT_TOUCHSCREEN', id_input_setting), ('ID_INPUT_TOUCHSCREEN', id_input_setting),
('ID_INPUT_TRACKBALL', id_input_setting), ('ID_INPUT_TRACKBALL', id_input_setting),
('ID_SIGNAL_ANALYZER', Or((Literal('0'), Literal('1')))), ('ID_SIGNAL_ANALYZER', Or((Literal('0'), Literal('1')))),
('ID_HARDWARE_WALLET', Or((Literal('0'), Literal('1')))),
('POINTINGSTICK_SENSITIVITY', INTEGER), ('POINTINGSTICK_SENSITIVITY', INTEGER),
('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))), ('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))),
('ID_INPUT_TOUCHPAD_INTEGRATION', Or(('internal', 'external'))), ('ID_INPUT_TOUCHPAD_INTEGRATION', Or(('internal', 'external'))),

View File

@ -267,7 +267,8 @@
<term><option>kernel-identify</option> <replaceable>kernel</replaceable></term> <term><option>kernel-identify</option> <replaceable>kernel</replaceable></term>
<listitem><para>Takes a kernel image as argument. Checks what kind of kernel the image is. Returns <listitem><para>Takes a kernel image as argument. Checks what kind of kernel the image is. Returns
one of <literal>uki</literal>, <literal>pe</literal>, and <literal>unknown</literal>. one of <literal>uki</literal>, <literal>addon</literal>, <literal>pe</literal>, and
<literal>unknown</literal>.
</para> </para>
<xi:include href="version-info.xml" xpointer="v253"/></listitem> <xi:include href="version-info.xml" xpointer="v253"/></listitem>
@ -360,6 +361,24 @@
<xi:include href="version-info.xml" xpointer="v242"/></listitem> <xi:include href="version-info.xml" xpointer="v242"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--print-loader-path</option></term>
<listitem><para>This option modifies the behaviour of <command>status</command>: it shows the
absolute path to the boot loader EFI binary used for the current boot if this information is
available. Note that no attempt is made to verify whether the binary still exists.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--print-stub-path</option></term>
<listitem><para>This option modifies the behaviour of <command>status</command>: it shows the
absolute path to the UKI/stub EFI binary used for the current boot if this information is
available. Note that no attempt is made to verify whether the binary still exists.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>-R</option></term> <term><option>-R</option></term>
<term><option>--print-root-device</option></term> <term><option>--print-root-device</option></term>

View File

@ -46,11 +46,10 @@
the root file system, which is then responsible for probing all remaining hardware, mounting all the root file system, which is then responsible for probing all remaining hardware, mounting all
necessary file systems and spawning all configured services.</para> necessary file systems and spawning all configured services.</para>
<para>On shutdown, the system manager stops all services, unmounts <para>On shutdown, the system manager stops all services, unmounts all non-busy file systems (detaching
all file systems (detaching the storage technologies backing the storage technologies backing them), and then (optionally) jumps into the exitrd, which is backed by
them), and then (optionally) jumps back into the initrd code which tmpfs, and unmounts/detaches the remaining file systems, including the real root. As a last step,
unmounts/detaches the root file system and the storage it resides the system is powered down.</para>
on. As a last step, the system is powered down.</para>
<para>Additional information about the system boot process may be <para>Additional information about the system boot process may be
found in found in

View File

@ -392,20 +392,33 @@
<term><option>--timeout=<replaceable>SECS</replaceable></option></term> <term><option>--timeout=<replaceable>SECS</replaceable></option></term>
<listitem> <listitem>
<para>When used with the <command>call</command> command, <para>When used with the <command>call</command> command, specifies the maximum time to wait for
specifies the maximum time to wait for method call method call completion. When used with the <command>monitor</command> command, since version v257,
completion. If no time unit is specified, assumes specifies the maximum time to wait for messages before automatically exiting. If no time unit is
seconds. The usual other units are understood, too (ms, us, specified, assumes seconds. The usual other units are understood, too (ms, us, s, min, h, d, w,
s, min, h, d, w, month, y). Note that this timeout does not month, y). Note that this timeout does not apply if <option>--expect-reply=no</option> is used,
apply if <option>--expect-reply=no</option> is used, as the when combined with the <command>call</command> command, as the tool does not wait for any reply
tool does not wait for any reply message then. When not message then. When not specified or when set to 0, the default of <literal>25s</literal> is
specified or when set to 0, the default of assumed for the <command>call</command> command, and it is disabled for the
<literal>25s</literal> is assumed.</para> <command>monitor</command> command.</para>
<xi:include href="version-info.xml" xpointer="v218"/> <xi:include href="version-info.xml" xpointer="v218"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--num-matches=<replaceable>NUMBER</replaceable></option></term>
<listitem>
<para>When used with the <command>monitor</command> command, if enabled will make
<command>busctl</command> exit when the specified number of messages have been received and
printed. This is useful in combination with <option>--match=</option>, to wait for the specified
number of occurrences of specific D-Bus messages.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--augment-creds=<replaceable>BOOL</replaceable></option></term> <term><option>--augment-creds=<replaceable>BOOL</replaceable></option></term>

View File

@ -109,6 +109,21 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>AccessContainer=</varname></term>
<listitem><para>Controls whether <command>systemd-coredump</command> will attempt to use the mount tree of
a process that crashed within a container. Access to the container's filesystem might be necessary to generate
a fully symbolized backtrace. If set to <literal>yes</literal>, then <command>systemd-coredump</command> will
obtain the mount tree from corresponding mount namespace and will try to generate the stack trace using the
binary and libraries from the mount namespace. Note that the coredump of the containerized process might
still be saved in <filename>/var/lib/systemd/coredump/</filename> even if <varname>AccessContainer=</varname>
is set to <literal>no</literal>. Defaults to <literal>no</literal>.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>ExternalSizeMax=</varname></term> <term><varname>ExternalSizeMax=</varname></term>
<term><varname>JournalSizeMax=</varname></term> <term><varname>JournalSizeMax=</varname></term>

View File

@ -48,93 +48,63 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><filename>/</filename></term> <term><filename>/</filename></term>
<listitem><para>The file system root. Usually writable, but <listitem><para>The file system root. Usually writable, but this is not required. Possibly a
this is not required. Possibly a temporary file system temporary file system (<literal>tmpfs</literal>). Not shared with other hosts (unless
(<literal>tmpfs</literal>). Not shared with other hosts read-only).</para></listitem>
(unless read-only). </para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/boot/</filename></term> <term><filename>/boot/</filename></term>
<listitem><para>The boot partition used for bringing up the <listitem><para>The boot partition used for bringing up the system. On EFI systems, this is possibly
system. On EFI systems, this is possibly the EFI System the EFI System Partition (ESP), also see
Partition (ESP), also see
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>. <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
This directory is usually strictly local to the host, and This directory is usually strictly local to the host, and should be considered read-only, except when
should be considered read-only, except when a new kernel or a new kernel or boot loader is installed. This directory only exists on systems that run on physical
boot loader is installed. This directory only exists on or emulated hardware that requires boot loaders.</para></listitem>
systems that run on physical or emulated hardware that
requires boot loaders.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/efi/</filename></term> <term><filename>/efi/</filename></term>
<listitem><para>If the boot partition <filename>/boot/</filename> is maintained separately from the EFI System <listitem><para>If the boot partition <filename>/boot/</filename> is maintained separately from the
Partition (ESP), the latter is mounted here. Tools that need to operate on the EFI system partition should look EFI System Partition (ESP), the latter is mounted here. Tools that need to operate on the EFI system
for it at this mount point first, and fall back to <filename>/boot/</filename> — if the former doesn't qualify partition should look for it at this mount point first, and fall back to <filename>/boot/</filename>
(for example if it is not a mount point or does not have the correct file system type — if the former doesn't qualify (for example if it is not a mount point or does not have the correct
<constant>MSDOS_SUPER_MAGIC</constant>).</para> file system type <constant>MSDOS_SUPER_MAGIC</constant>).</para></listitem>
<xi:include href="version-info.xml" xpointer="v239"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/etc/</filename></term> <term><filename>/etc/</filename></term>
<listitem><para>System-specific configuration. This directory <listitem><para>System-specific configuration. This directory may or may not be
may or may not be read-only. Frequently, this directory is read-only. Frequently, this directory is pre-populated with vendor-supplied configuration files, but
pre-populated with vendor-supplied configuration files, but applications should not make assumptions about this directory being fully populated or populated at
applications should not make assumptions about this directory all, and should fall back to defaults if configuration is missing.</para></listitem>
being fully populated or populated at all, and should fall
back to defaults if configuration is
missing.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/home/</filename></term> <term><filename>/home/</filename></term>
<listitem><para>The location for normal user's home <listitem><para>The location for normal user's home directories. Possibly shared with other systems,
directories. Possibly shared with other systems, and never and never read-only. This directory should only be used for normal users, never for system
read-only. This directory should only be used for normal users. This directory and possibly the directories contained within it might only become available or
users, never for system users. This directory and possibly the writable in late boot or even only after user authentication. This directory might be placed on
directories contained within it might only become available or limited-functionality network file systems, hence applications should not assume the full set of file
writable in late boot or even only after user authentication. API is available on this directory. Applications should generally not reference this directory
This directory might be placed on limited-functionality directly, but via the per-user <varname>$HOME</varname> environment variable, or via the home
network file systems, hence applications should not assume the directory field of the user database.</para></listitem>
full set of file API is available on this directory.
Applications should generally not reference this directory
directly, but via the per-user <varname>$HOME</varname>
environment variable, or via the home directory field of the
user database.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/root/</filename></term> <term><filename>/root/</filename></term>
<listitem><para>The home directory of the root user. The root <listitem><para>The home directory of the root user. The root user's home directory is located
user's home directory is located outside of outside of <filename>/home/</filename> in order to make sure the root user may log in even without
<filename>/home/</filename> in order to make sure the root user <filename>/home/</filename> being available and mounted.</para></listitem>
may log in even without <filename>/home/</filename> being
available and mounted.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/srv/</filename></term> <term><filename>/srv/</filename></term>
<listitem><para>The place to store general server payload, <listitem><para>The place to store general server payload, managed by the administrator. No
managed by the administrator. No restrictions are made how restrictions are made how this directory is organized internally. Generally writable, and possibly
this directory is organized internally. Generally writable, shared among systems. This directory might become available or writable only very late during
and possibly shared among systems. This directory might become boot.</para></listitem>
available or writable only very late during
boot.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -156,10 +126,7 @@
<citerefentry <citerefentry
project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>, project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
and similar calls. For more details, see <ulink url="https://systemd.io/TEMPORARY_DIRECTORIES">Using and similar calls. For more details, see <ulink url="https://systemd.io/TEMPORARY_DIRECTORIES">Using
/tmp/ and /var/tmp/ Safely</ulink>.</para> /tmp/ and /var/tmp/ Safely</ulink>.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/>
</listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -173,34 +140,24 @@
<term><filename>/run/</filename></term> <term><filename>/run/</filename></term>
<listitem><para>A <literal>tmpfs</literal> file system for system packages to place runtime data, <listitem><para>A <literal>tmpfs</literal> file system for system packages to place runtime data,
socket files, and similar. This directory is flushed on boot, and generally writable for privileged socket files, and similar. This directory is flushed on boot, and generally writable for privileged
programs only. Always writable.</para> programs only. Always writable.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/run/log/</filename></term> <term><filename>/run/log/</filename></term>
<listitem><para>Runtime system logs. System components may <listitem><para>Runtime system logs. System components may place private logs in this
place private logs in this directory. Always writable, even directory. Always writable, even when <filename>/var/log/</filename> might not be accessible
when <filename>/var/log/</filename> might not be accessible yet.</para></listitem>
yet.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/run/user/</filename></term> <term><filename>/run/user/</filename></term>
<listitem><para>Contains per-user runtime directories, each <listitem><para>Contains per-user runtime directories, each usually individually mounted
usually individually mounted <literal>tmpfs</literal> <literal>tmpfs</literal> instances. Always writable, flushed at each reboot and when the user logs
instances. Always writable, flushed at each reboot and when out. User code should not reference this directory directly, but via the
the user logs out. User code should not reference this <varname>$XDG_RUNTIME_DIR</varname> environment variable, as documented in the <ulink
directory directly, but via the url="https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG Base Directory
<varname>$XDG_RUNTIME_DIR</varname> environment variable, as Specification</ulink>.</para></listitem>
documented in the <ulink
url="https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
Base Directory Specification</ulink>.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -212,99 +169,68 @@
<varlistentry> <varlistentry>
<term><filename>/usr/</filename></term> <term><filename>/usr/</filename></term>
<listitem><para>Vendor-supplied operating system resources. <listitem><para>Vendor-supplied operating system resources. Usually read-only, but this is not
Usually read-only, but this is not required. Possibly shared required. Possibly shared between multiple hosts. This directory should not be modified by the
between multiple hosts. This directory should not be modified administrator, except when installing or removing vendor-supplied packages.</para></listitem>
by the administrator, except when installing or removing
vendor-supplied packages.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/bin/</filename></term> <term><filename>/usr/bin/</filename></term>
<listitem><para>Binaries and executables for user commands <listitem><para>Binaries and executables for user commands that shall appear in the
that shall appear in the <varname>$PATH</varname> search path. <varname>$PATH</varname> search path. It is recommended not to place binaries in this directory that
It is recommended not to place binaries in this directory that are not useful for invocation from a shell (such as daemon binaries); these should be placed in a
are not useful for invocation from a shell (such as daemon subdirectory of <filename>/usr/lib/</filename> instead.</para></listitem>
binaries); these should be placed in a subdirectory of
<filename>/usr/lib/</filename> instead.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/include/</filename></term> <term><filename>/usr/include/</filename></term>
<listitem><para>C and C++ API header files of system <listitem><para>C and C++ API header files of system libraries.</para></listitem>
libraries.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/lib/</filename></term> <term><filename>/usr/lib/</filename></term>
<listitem><para>Static, private vendor data that is compatible <listitem><para>Static, private vendor data that is compatible with all architectures (though not
with all architectures (though not necessarily necessarily architecture-independent). Note that this includes internal executables or other binaries
architecture-independent). Note that this includes internal that are not regularly invoked from a shell. Such binaries may be for any architecture supported by
executables or other binaries that are not regularly invoked the system. Do not place public libraries in this directory, use <varname>$libdir</varname> (see
from a shell. Such binaries may be for any architecture below), instead.</para></listitem>
supported by the system. Do not place public libraries in this
directory, use <varname>$libdir</varname> (see below),
instead.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/lib/<replaceable>arch-id</replaceable>/</filename></term> <term><filename>/usr/lib/<replaceable>arch-id</replaceable>/</filename></term>
<listitem><para>Location for placing dynamic libraries into, also <listitem><para>Location for placing dynamic libraries into, also called
called <varname>$libdir</varname>. The architecture identifier <varname>$libdir</varname>. The architecture identifier to use is defined on <ulink
to use is defined on <ulink url="https://wiki.debian.org/Multiarch/Tuples">Multiarch Architecture Specifiers (Tuples)</ulink>
url="https://wiki.debian.org/Multiarch/Tuples">Multiarch list. Legacy locations of <varname>$libdir</varname> are <filename>/usr/lib/</filename>,
Architecture Specifiers (Tuples)</ulink> list. Legacy <filename>/usr/lib64/</filename>. This directory should not be used for package-specific data, unless
locations of <varname>$libdir</varname> are this data is architecture-dependent, too. To query <varname>$libdir</varname> for the primary
<filename>/usr/lib/</filename>, architecture of the system, invoke: <programlisting># systemd-path
<filename>/usr/lib64/</filename>. This directory should not be system-library-arch</programlisting></para></listitem>
used for package-specific data, unless this data is
architecture-dependent, too. To query
<varname>$libdir</varname> for the primary architecture of the
system, invoke:
<programlisting># systemd-path system-library-arch</programlisting></para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/share/</filename></term> <term><filename>/usr/share/</filename></term>
<listitem><para>Resources shared between multiple packages, <listitem><para>Resources shared between multiple packages, such as documentation, man pages, time
such as documentation, man pages, time zone information, fonts zone information, fonts and other resources. Usually, the precise location and format of files stored
and other resources. Usually, the precise location and format below this directory is subject to specifications that ensure interoperability.</para>
of files stored below this directory is subject to
specifications that ensure interoperability.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem> <para>Note that resources placed in this directory typically are under shared ownership,
i.e. multiple different packages have provide and consume these resources, on equal footing, without
any obvious primary owner. This makes makes things systematically different from
<filename>/usr/lib/</filename>, where ownership is generally not shared.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/share/doc/</filename></term> <term><filename>/usr/share/doc/</filename></term>
<listitem><para>Documentation for the operating system or <listitem><para>Documentation for the operating system or system packages.</para></listitem>
system packages.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/usr/share/factory/etc/</filename></term> <term><filename>/usr/share/factory/etc/</filename></term>
<listitem><para>Repository for vendor-supplied default <listitem><para>Repository for vendor-supplied default configuration files. This directory should be
configuration files. This directory should be populated with populated with pristine vendor versions of all configuration files that may be placed in
pristine vendor versions of all configuration files that may <filename>/etc/</filename>. This is useful to compare the local configuration of a system with vendor
be placed in <filename>/etc/</filename>. This is useful to defaults and to populate the local configuration with defaults.</para></listitem>
compare the local configuration of a system with vendor
defaults and to populate the local configuration with
defaults.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -313,10 +239,7 @@
<listitem><para>Similar to <listitem><para>Similar to
<filename>/usr/share/factory/etc/</filename>, but for vendor <filename>/usr/share/factory/etc/</filename>, but for vendor
versions of files in the variable, persistent data directory versions of files in the variable, persistent data directory
<filename>/var/</filename>.</para> <filename>/var/</filename>.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -333,49 +256,34 @@
system might start up without this directory being populated. Persistency is recommended, but system might start up without this directory being populated. Persistency is recommended, but
optional, to support ephemeral systems. This directory might become available or writable only very optional, to support ephemeral systems. This directory might become available or writable only very
late during boot. Components that are required to operate during early boot hence shall not late during boot. Components that are required to operate during early boot hence shall not
unconditionally rely on this directory.</para> unconditionally rely on this directory.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/var/cache/</filename></term> <term><filename>/var/cache/</filename></term>
<listitem><para>Persistent system cache data. System <listitem><para>Persistent system cache data. System components may place non-essential data in this
components may place non-essential data in this directory. directory. Flushing this directory should have no effect on operation of programs, except for
Flushing this directory should have no effect on operation of increased runtimes necessary to rebuild these caches.</para></listitem>
programs, except for increased runtimes necessary to rebuild
these caches.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/var/lib/</filename></term> <term><filename>/var/lib/</filename></term>
<listitem><para>Persistent system data. System components may <listitem><para>Persistent system data. System components may place private data in this
place private data in this directory.</para> directory.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/var/log/</filename></term> <term><filename>/var/log/</filename></term>
<listitem><para>Persistent system logs. System components may <listitem><para>Persistent system logs. System components may place private logs in this directory,
place private logs in this directory, though it is recommended though it is recommended to do most logging via the <citerefentry
to do most logging via the project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>
calls.</para> calls.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/var/spool/</filename></term> <term><filename>/var/spool/</filename></term>
<listitem><para>Persistent system spool data, such as printer <listitem><para>Persistent system spool data, such as printer or mail queues.</para></listitem>
or mail queues.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -396,10 +304,8 @@
<citerefentry <citerefentry
project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>, project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
and similar calls should be used. For further details about this directory, see <ulink and similar calls should be used. For further details about this directory, see <ulink
url="https://systemd.io/TEMPORARY_DIRECTORIES">Using /tmp/ and /var/tmp/ Safely</ulink>.</para> url="https://systemd.io/TEMPORARY_DIRECTORIES">Using /tmp/ and /var/tmp/
Safely</ulink>.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/>
</listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -411,97 +317,67 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><filename>/dev/</filename></term> <term><filename>/dev/</filename></term>
<listitem><para>The root directory for device nodes. Usually, <listitem><para>The root directory for device nodes. Usually, this directory is mounted as a
this directory is mounted as a <literal>devtmpfs</literal> <literal>devtmpfs</literal> instance, but might be of a different type in sandboxed/containerized
instance, but might be of a different type in setups. This directory is managed jointly by the kernel and
sandboxed/containerized setups. This directory is managed
jointly by the kernel and
<citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-udevd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
and should not be written to by other components. A number of and should not be written to by other components. A number of special purpose virtual file systems
special purpose virtual file systems might be mounted below might be mounted below this directory.</para></listitem>
this directory.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/dev/shm/</filename></term> <term><filename>/dev/shm/</filename></term>
<listitem><para>Place for POSIX shared memory segments, as <listitem><para>Place for POSIX shared memory segments, as created via <citerefentry
created via project='die-net'><refentrytitle>shm_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
<citerefentry project='die-net'><refentrytitle>shm_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>. This directory is flushed on boot, and is a <literal>tmpfs</literal> file system. Since all users
This directory is flushed on boot, and is a have write access to this directory, special care should be taken to avoid name clashes and
<literal>tmpfs</literal> file system. Since all users have vulnerabilities. For normal users, shared memory segments in this directory are usually deleted when
write access to this directory, special care should be taken the user logs out. Usually, it is a better idea to use memory mapped files in
to avoid name clashes and vulnerabilities. For normal users, <filename>/run/</filename> (for system programs) or <varname>$XDG_RUNTIME_DIR</varname> (for user
shared memory segments in this directory are usually deleted programs) instead of POSIX shared memory segments, since these directories are not world-writable and
when the user logs out. Usually, it is a better idea to use hence not vulnerable to security-sensitive name clashes.</para></listitem>
memory mapped files in <filename>/run/</filename> (for system
programs) or <varname>$XDG_RUNTIME_DIR</varname> (for user
programs) instead of POSIX shared memory segments, since these
directories are not world-writable and hence not vulnerable to
security-sensitive name clashes.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/proc/</filename></term> <term><filename>/proc/</filename></term>
<listitem><para>A virtual kernel file system exposing the <listitem><para>A virtual kernel file system exposing the process list and other functionality. This
process list and other functionality. This file system is file system is mostly an API to interface with the kernel and not a place where normal files may be
mostly an API to interface with the kernel and not a place stored. For details, see <citerefentry
where normal files may be stored. For details, see project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. A
<citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. number of special purpose virtual file systems might be mounted below this
A number of special purpose virtual file systems might be directory.</para></listitem>
mounted below this directory.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/proc/sys/</filename></term> <term><filename>/proc/sys/</filename></term>
<listitem><para>A hierarchy below <filename>/proc/</filename> <listitem><para>A hierarchy below <filename>/proc/</filename> that exposes a number of kernel
that exposes a number of kernel tunables. The primary way to tunables. The primary way to configure the settings in this API file tree is via
configure the settings in this API file tree is via
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
files. In sandboxed/containerized setups, this directory is files. In sandboxed/containerized setups, this directory is generally mounted
generally mounted read-only.</para> read-only.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/sys/</filename></term> <term><filename>/sys/</filename></term>
<listitem><para>A virtual kernel file system exposing <listitem><para>A virtual kernel file system exposing discovered devices and other
discovered devices and other functionality. This file system functionality. This file system is mostly an API to interface with the kernel and not a place where
is mostly an API to interface with the kernel and not a place normal files may be stored. In sandboxed/containerized setups, this directory is generally mounted
where normal files may be stored. In sandboxed/containerized read-only. A number of special purpose virtual file systems might be mounted below this
setups, this directory is generally mounted read-only. A number directory.</para></listitem>
of special purpose virtual file systems might be mounted below
this directory.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/sys/fs/cgroup/</filename></term> <term><filename>/sys/fs/cgroup/</filename></term>
<listitem><para>A virtual kernel file system exposing process <listitem><para>A virtual kernel file system exposing process control groups (cgroups). This file
control groups (cgroups). This file system is an API to interface system is an API to interface with the kernel and not a place where normal files may be stored. On
with the kernel and not a place where normal files may be stored. On current systems running in the default "unified" mode, this directory serves as the mount point for
current systems running in the default "unified" mode, the <literal>cgroup2</literal> filesystem, which provides a unified cgroup hierarchy for all resource
this directory serves as the mount point for the controllers. On systems with non-default configurations, this directory may instead be a tmpfs
<literal>cgroup2</literal> filesystem, which provides a unified filesystem containing mount points for various <literal>cgroup</literal> (v1) resource controllers;
cgroup hierarchy for all resource controllers. On systems with in such configurations, if <literal>cgroup2</literal> is mounted it will be mounted on
non-default configurations, this directory may instead be a tmpfs <filename>/sys/fs/cgroup/unified/</filename>, but cgroup2 will not have resource controllers
filesystem containing mount points for various attached. In sandboxed/containerized setups, this directory may either not exist or may include a
<literal>cgroup</literal> (v1) resource controllers; in such subset of functionality.</para></listitem>
configurations, if <literal>cgroup2</literal> is mounted it will be
mounted on <filename>/sys/fs/cgroup/unified/</filename>, but
cgroup2 will not have resource controllers attached. In
sandboxed/containerized setups, this directory may either not exist or
may include a subset of functionality.
</para>
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -515,47 +391,31 @@
<term><filename>/sbin/</filename></term> <term><filename>/sbin/</filename></term>
<term><filename>/usr/sbin/</filename></term> <term><filename>/usr/sbin/</filename></term>
<listitem><para>These compatibility symlinks point to <listitem><para>These compatibility symlinks point to <filename>/usr/bin/</filename>, ensuring that
<filename>/usr/bin/</filename>, ensuring that scripts and scripts and binaries referencing these legacy paths correctly find their binaries.</para></listitem>
binaries referencing these legacy paths correctly find their
binaries.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/lib/</filename></term> <term><filename>/lib/</filename></term>
<listitem><para>This compatibility symlink points to <listitem><para>This compatibility symlink points to <filename>/usr/lib/</filename>, ensuring that
<filename>/usr/lib/</filename>, ensuring that programs programs referencing this legacy path correctly find their resources.</para></listitem>
referencing this legacy path correctly find their
resources.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/lib64/</filename></term> <term><filename>/lib64/</filename></term>
<listitem><para>On some architecture ABIs, this compatibility <listitem><para>On some architecture ABIs, this compatibility symlink points to
symlink points to <varname>$libdir</varname>, ensuring that <varname>$libdir</varname>, ensuring that binaries referencing this legacy path correctly find their
binaries referencing this legacy path correctly find their dynamic loader. This symlink only exists on architectures whose ABI places the dynamic loader in this
dynamic loader. This symlink only exists on architectures path.</para></listitem>
whose ABI places the dynamic loader in this
path.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/var/run/</filename></term> <term><filename>/var/run/</filename></term>
<listitem><para>This compatibility symlink points to <listitem><para>This compatibility symlink points to <filename>/run/</filename>, ensuring that
<filename>/run/</filename>, ensuring that programs referencing programs referencing this legacy path correctly find their runtime data.</para></listitem>
this legacy path correctly find their runtime
data.</para>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -581,9 +441,7 @@
directory. Flushing this directory should have no effect on operation of programs, except for directory. Flushing this directory should have no effect on operation of programs, except for
increased runtimes necessary to rebuild these caches. If an application finds increased runtimes necessary to rebuild these caches. If an application finds
<varname>$XDG_CACHE_HOME</varname> set, it should use the directory specified in it instead of this <varname>$XDG_CACHE_HOME</varname> set, it should use the directory specified in it instead of this
directory.</para> directory.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -592,9 +450,7 @@
<listitem><para>Application configuration. When a new user is created, this directory will be empty <listitem><para>Application configuration. When a new user is created, this directory will be empty
or not exist at all. Applications should fall back to defaults should their configuration in this or not exist at all. Applications should fall back to defaults should their configuration in this
directory be missing. If an application finds <varname>$XDG_CONFIG_HOME</varname> set, it should use directory be missing. If an application finds <varname>$XDG_CONFIG_HOME</varname> set, it should use
the directory specified in it instead of this directory.</para> the directory specified in it instead of this directory.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -605,18 +461,14 @@
shell; these should be placed in a subdirectory of <filename>~/.local/lib/</filename> instead. Care shell; these should be placed in a subdirectory of <filename>~/.local/lib/</filename> instead. Care
should be taken when placing architecture-dependent binaries in this place, which might be should be taken when placing architecture-dependent binaries in this place, which might be
problematic if the home directory is shared between multiple hosts with different problematic if the home directory is shared between multiple hosts with different
architectures.</para> architectures.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>~/.local/lib/</filename></term> <term><filename>~/.local/lib/</filename></term>
<listitem><para>Static, private vendor data that is compatible with all <listitem><para>Static, private vendor data that is compatible with all
architectures.</para> architectures.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -624,9 +476,7 @@
<listitem><para>Location for placing public dynamic libraries. The architecture identifier to use is <listitem><para>Location for placing public dynamic libraries. The architecture identifier to use is
defined on <ulink url="https://wiki.debian.org/Multiarch/Tuples">Multiarch Architecture Specifiers defined on <ulink url="https://wiki.debian.org/Multiarch/Tuples">Multiarch Architecture Specifiers
(Tuples)</ulink> list.</para> (Tuples)</ulink> list.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -635,9 +485,7 @@
<listitem><para>Resources shared between multiple packages, such as fonts or artwork. Usually, the <listitem><para>Resources shared between multiple packages, such as fonts or artwork. Usually, the
precise location and format of files stored below this directory is subject to specifications that precise location and format of files stored below this directory is subject to specifications that
ensure interoperability. If an application finds <varname>$XDG_DATA_HOME</varname> set, it should use ensure interoperability. If an application finds <varname>$XDG_DATA_HOME</varname> set, it should use
the directory specified in it instead of this directory.</para> the directory specified in it instead of this directory.</para></listitem>
<xi:include href="version-info.xml" xpointer="v215"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -646,9 +494,7 @@
<listitem><para>Application state. When a new user is created, this directory will be empty or not <listitem><para>Application state. When a new user is created, this directory will be empty or not
exist at all. Applications should fall back to defaults should their state in this directory be exist at all. Applications should fall back to defaults should their state in this directory be
missing. If an application finds <varname>$XDG_STATE_HOME</varname> set, it should use the directory missing. If an application finds <varname>$XDG_STATE_HOME</varname> set, it should use the directory
specified in it instead of this directory.</para> specified in it instead of this directory.</para></listitem>
<xi:include href="version-info.xml" xpointer="v254"/></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -777,9 +623,9 @@
</tgroup> </tgroup>
</table> </table>
<para>Additional static vendor files may be installed in the <para>Additional static vendor files with shared ownership may be installed in the
<filename>/usr/share/</filename> hierarchy to the locations <filename>/usr/share/</filename> hierarchy to the locations defined by the various relevant
defined by the various relevant specifications.</para> specifications.</para>
<para>The following directories shall be used by the package for local configuration and files created <para>The following directories shall be used by the package for local configuration and files created
during runtime:</para> during runtime:</para>
@ -869,9 +715,9 @@
</tgroup> </tgroup>
</table> </table>
<para>Additional static vendor files may be installed in the <filename>~/.local/share/</filename> <para>Additional static vendor files with shared ownership may be installed in the
hierarchy, mirroring the subdirectories specified in the section "Vendor-supplied operating system <filename>~/.local/share/</filename> hierarchy, mirroring the subdirectories specified in the section
resources" above.</para> "Vendor-supplied operating system resources" above.</para>
<para>The following directories shall be used by the package for per-user local configuration and files <para>The following directories shall be used by the package for per-user local configuration and files
created during runtime:</para> created during runtime:</para>
@ -890,7 +736,7 @@
<tbody> <tbody>
<row> <row>
<entry><filename>~/.config/<replaceable>package</replaceable>/</filename></entry> <entry><filename>~/.config/<replaceable>package</replaceable>/</filename></entry>
<entry>User-specific configuration and state for the package. It is required to default to safe fallbacks if this configuration is missing.</entry> <entry>User-specific configuration for the package. It is required to default to safe fallbacks if this configuration is missing.</entry>
</row> </row>
<row> <row>
<entry><filename><varname>$XDG_RUNTIME_DIR</varname>/<replaceable>package</replaceable>/</filename></entry> <entry><filename><varname>$XDG_RUNTIME_DIR</varname>/<replaceable>package</replaceable>/</filename></entry>
@ -900,6 +746,10 @@
<entry><filename>~/.cache/<replaceable>package</replaceable>/</filename></entry> <entry><filename>~/.cache/<replaceable>package</replaceable>/</filename></entry>
<entry>Persistent cache data of the package. If this directory is flushed, the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</entry> <entry>Persistent cache data of the package. If this directory is flushed, the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</entry>
</row> </row>
<row>
<entry><filename>~/.local/state/<replaceable>package</replaceable>/</filename></entry>
<entry>Persistent state data of the package.</entry>
</row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>

View File

@ -172,15 +172,6 @@
<para>The following options are understood:</para> <para>The following options are understood:</para>
<variablelist> <variablelist>
<varlistentry>
<term><option>--no-ask-password</option></term>
<listitem><para>Do not query the user for authentication for
privileged operations.</para>
<xi:include href="version-info.xml" xpointer="v195"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--static</option></term> <term><option>--static</option></term>
<term><option>--transient</option></term> <term><option>--transient</option></term>
@ -198,6 +189,7 @@
<xi:include href="user-system-options.xml" xpointer="host" /> <xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" /> <xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="json" /> <xi:include href="standard-options.xml" xpointer="json" />

View File

@ -350,6 +350,42 @@
<xi:include href="version-info.xml" xpointer="v198"/></listitem> <xi:include href="version-info.xml" xpointer="v198"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>-I</option></term>
<term><option>--invocation=<replaceable>ID</replaceable><optional><replaceable>±offset</replaceable></optional>|<replaceable>offset</replaceable></option></term>
<listitem>
<para>Show messages from a specific invocation of unit. This will add a match for
<literal>_SYSTEMD_INVOCATION_ID=</literal>, <literal>OBJECT_SYSTEMD_INVOCATION_ID=</literal>,
<literal>INVOCATION_ID=</literal>, <literal>USER_INVOCATION_ID=</literal>.</para>
<para>A positive <replaceable>offset</replaceable> will look up the invocations of a systemd unit
from the beginning of the journal, and zero or a negative offset will look up invocations starting
from the end of the journal. Thus, <constant>1</constant> means the first invocation found in the
journal in chronological order, <constant>2</constant> the second and so on; while
<constant>0</constant> is the latest invocation, <constant>-1</constant> the invocation before the
latest, and so on.</para>
<para>If the 32-character <replaceable>ID</replaceable> is specified, it may optionally be followed
by <replaceable>±offset</replaceable> which identifies the invocation relative to the one given by
invocation <replaceable>ID</replaceable>. Negative values mean earlier invocations and positive
values mean later invocations. If <replaceable>±offset</replaceable> is not specified, a value of
zero is assumed, and the logs for the invocation given by <replaceable>ID</replaceable> will be
shown.</para>
<para><option>-I</option> is equivalent to <option>--invocation=0</option>, and logs for the latest
invocation will be shown.</para>
<para>When an offset is specified, a unit name must be specified with <option>-u/--unit=</option>
or <option>--user-unit=</option> option.</para>
<para>When specified with <option>-b/--boot=</option>, then invocations are searched within the
specified boot.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>-t</option></term> <term><option>-t</option></term>
<term><option>--identifier=<replaceable>SYSLOG_IDENTIFIER</replaceable></option></term> <term><option>--identifier=<replaceable>SYSLOG_IDENTIFIER</replaceable></option></term>
@ -862,6 +898,23 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--list-invocations</option></term>
<listitem>
<para>List invocation IDs of a unit. Requires a unit name with <option>-u/--unit=</option> or
<option>--user-unit=</option>. Show a tabular list of invocation numbers (relative to the current
or latest invocation), their IDs, and the timestamps of the first and last message pertaining to
the invocation. When <option>-b/-boot</option> is specified, invocations in the boot will be shown.
When specified with <option>-n/--lines=<optional>+</optional><replaceable>N</replaceable></option>
option, only the first (when the number prefixed with <literal>+</literal>) or the last (without
prefix) <replaceable>N</replaceable> entries will be shown. When specified with
<option>-r/--reverse</option>, the list will be shown in the reverse order.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--disk-usage</option></term> <term><option>--disk-usage</option></term>

View File

@ -167,12 +167,14 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><option>--no-ask-password</option></term> <term><option>-l</option></term>
<term><option>--full</option></term>
<listitem><para>Do not query the user for authentication for <listitem>
privileged operations.</para> <para>Do not ellipsize the output.</para>
<xi:include href="version-info.xml" xpointer="v195"/></listitem> <xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -190,6 +192,7 @@
<xi:include href="user-system-options.xml" xpointer="host" /> <xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" /> <xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />

View File

@ -306,13 +306,6 @@
<para>The following options are understood:</para> <para>The following options are understood:</para>
<variablelist> <variablelist>
<varlistentry>
<term><option>--no-ask-password</option></term>
<listitem><para>Do not query the user for authentication for
privileged operations.</para></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>-p</option></term> <term><option>-p</option></term>
<term><option>--property=</option></term> <term><option>--property=</option></term>
@ -410,6 +403,7 @@
<xi:include href="user-system-options.xml" xpointer="host" /> <xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" /> <xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="no-legend" /> <xi:include href="standard-options.xml" xpointer="no-legend" />
<xi:include href="standard-options.xml" xpointer="json" /> <xi:include href="standard-options.xml" xpointer="json" />

View File

@ -102,7 +102,8 @@
value of the kernel command line option <varname>container_uuid</varname>, the KVM DMI value of the kernel command line option <varname>container_uuid</varname>, the KVM DMI
<filename>product_uuid</filename> or the devicetree <filename>vm,uuid</filename> <filename>product_uuid</filename> or the devicetree <filename>vm,uuid</filename>
(on KVM systems), the Xen hypervisor <filename>uuid</filename>, and finally a randomly (on KVM systems), the Xen hypervisor <filename>uuid</filename>, and finally a randomly
generated UUID.</para> generated UUID. <varname>systemd.machine_id=firmware</varname> can be set to generate the machine ID
from the firmware.</para>
<para>After the machine ID is established, <para>After the machine ID is established,
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>

View File

@ -434,8 +434,9 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
<filename>/run/</filename>, depending on whether <option>--runtime</option> is specified. <filename>/run/</filename>, depending on whether <option>--runtime</option> is specified.
Specially, if the name is prefixed by <literal>@</literal>, it will be treated as Specially, if the name is prefixed by <literal>@</literal>, it will be treated as
a network interface, and editing will be performed on the network config files associated a network interface, and editing will be performed on the network config files associated
with it. Additionally, the interface name can be suffixed with <literal>:network</literal> (default) with it. Additionally, the interface name can be suffixed with <literal>:network</literal> (default),
or <literal>:link</literal>, in order to choose the type of network config to operate on.</para> <literal>:link</literal>, or <literal>:netdev</literal>, in order to choose the type of network config
to operate on.</para>
<para>If <option>--drop-in=</option> is specified, edit the drop-in file instead of <para>If <option>--drop-in=</option> is specified, edit the drop-in file instead of
the main configuration file. Unless <option>--no-reload</option> is specified, the main configuration file. Unless <option>--no-reload</option> is specified,
@ -448,6 +449,9 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
<citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information.</para> for more information.</para>
<para>If <option>--stdin</option> is specified, the new content will be read from standard input.
In this mode, the old content of the file is discarded.</para>
<xi:include href="version-info.xml" xpointer="v254"/></listitem> <xi:include href="version-info.xml" xpointer="v254"/></listitem>
</varlistentry> </varlistentry>
@ -457,9 +461,10 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
<optional><replaceable>FILE</replaceable>|<replaceable>@DEVICE</replaceable></optional> <optional><replaceable>FILE</replaceable>|<replaceable>@DEVICE</replaceable></optional>
</term> </term>
<listitem> <listitem>
<para>Show network configuration files. This command honors the <literal>@</literal> prefix in the <para>Show network configuration files. This command honors the <literal>@</literal> prefix in a
same way as <command>edit</command>. When no argument is specified, similar way as <command>edit</command>, with support for an additional suffix <literal>:all</literal>
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for showing all types of configuration files associated with the interface at once. When no argument
is specified, <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
and its drop-in files will be shown.</para> and its drop-in files will be shown.</para>
<xi:include href="version-info.xml" xpointer="v254"/> <xi:include href="version-info.xml" xpointer="v254"/>
@ -608,12 +613,29 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--stdin</option></term>
<listitem>
<para>When used with <command>edit</command>, the contents of the file will be read from standard
input and the editor will not be launched. In this mode, the old contents of the file are
automatically replaced. This is useful to "edit" configuration from scripts, especially so that
drop-in directories are created and populated in one go.</para>
<para>Multiple drop-ins may be "edited" in this mode with <option>--drop-in=</option>, and
the same contents will be written to all of them. Otherwise exactly one main configuration file
is expected.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="json" /> <xi:include href="standard-options.xml" xpointer="json" />
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-legend" /> <xi:include href="standard-options.xml" xpointer="no-legend" />
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />
</variablelist> </variablelist>
</refsect1> </refsect1>

View File

@ -131,6 +131,12 @@
for more details about the sysctl options. Defaults to unset and the sysctl options will not be for more details about the sysctl options. Defaults to unset and the sysctl options will not be
changed.</para> changed.</para>
<para>If an interface is configured with a .network file that enables <varname>IPMasquerade=</varname>
for IPv4 (that is, <literal>ipv4</literal> or <literal>both</literal>), this setting is implied
unless explicitly specified. See <varname>IPMasquerade=</varname> in
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more details.</para>
<xi:include href="version-info.xml" xpointer="v256"/> <xi:include href="version-info.xml" xpointer="v256"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -145,6 +151,12 @@
for more details about the sysctl options. Defaults to unset and the sysctl options will not be for more details about the sysctl options. Defaults to unset and the sysctl options will not be
changed.</para> changed.</para>
<para>If an interface is configured with a .network file that enables <varname>IPMasquerade=</varname>
for IPv6 (that is, <literal>ipv6</literal> or <literal>both</literal>), this setting is implied
unless explicitly specified. See <varname>IPMasquerade=</varname> in
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more details.</para>
<xi:include href="version-info.xml" xpointer="v256"/> <xi:include href="version-info.xml" xpointer="v256"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -201,6 +213,37 @@
</variablelist> </variablelist>
</refsect1> </refsect1>
<refsect1>
<title>[IPv6AddressLabel] Section Options</title>
<para>An [IPv6AddressLabel] section accepts the following keys. Specify multiple [IPv6AddressLabel]
sections to configure multiple address labels. IPv6 address labels are used for address selection.
See <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>. Precedence is managed by
userspace, and only the label itself is stored in the kernel.</para>
<variablelist class='network-directives'>
<varlistentry>
<term><varname>Label=</varname></term>
<listitem>
<para>The label for the prefix, an unsigned integer in the range 0…4294967294. 0xffffffff is
reserved. This setting is mandatory.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>Prefix=</varname></term>
<listitem>
<para>IPv6 prefix is an address with a prefix length, separated by a slash
<literal>/</literal> character. This setting is mandatory.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1> <refsect1>
<title>[DHCPv4] Section Options</title> <title>[DHCPv4] Section Options</title>

View File

@ -15,6 +15,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/un.h> #include <sys/un.h>
#include <time.h> #include <time.h>

View File

@ -93,6 +93,17 @@ lrwxrwxrwx. 1 root root 19 May 10 4711.user-privileged -> foobar.user-privileg
<filename>.user-privileged</filename> and <filename>.group-privileged</filename> suffixes) should <filename>.user-privileged</filename> and <filename>.group-privileged</filename> suffixes) should
contain this section, exclusively.</para> contain this section, exclusively.</para>
<para>In addition to the two types of user record files and the two types of group record files there's a
fifth type of file that may be placed in the searched directories: files that indicate membership of
users in groups. Specifically, for every pair of user/group where the user shall be a member of a group a
file named
<literal><replaceable>username</replaceable>:<replaceable>groupname</replaceable>.membership</literal>
should be created, i.e. the textual UNIX user name, followed by a colon, followed by the textual UNIX
group name, suffixed by <literal>.membership</literal>. The contents of these files are currently not
read, and the files should be created empty. The mere existence of these files is enough to effect a
user/group membership. If a program provides user and/or group record files in the searched directories,
it should always also create such files, both for primary and auxiliary group memberships.</para>
<para>Note that static user/group records generally do not override conflicting records in <para>Note that static user/group records generally do not override conflicting records in
<filename>/etc/passwd</filename> or <filename>/etc/group</filename> or other account databases. In fact, <filename>/etc/passwd</filename> or <filename>/etc/group</filename> or other account databases. In fact,
before dropping in these files a reasonable level of care should be taken to avoid user/group name and before dropping in these files a reasonable level of care should be taken to avoid user/group name and

View File

@ -256,9 +256,11 @@ node /org/freedesktop/login1 {
@org.freedesktop.DBus.Property.EmitsChangedSignal("false") @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly b PreparingForShutdown = ...; readonly b PreparingForShutdown = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false") @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly a{sv} PreparingForShutdownWithMetadata = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly b PreparingForSleep = ...; readonly b PreparingForSleep = ...;
readonly (st) ScheduledShutdown = ...; readonly (st) ScheduledShutdown = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s DesignatedMaintenanceTime = '...'; readonly s DesignatedMaintenanceTime = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("false") @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly b Docked = ...; readonly b Docked = ...;
@ -526,6 +528,8 @@ node /org/freedesktop/login1 {
<variablelist class="dbus-property" generated="True" extra-ref="PreparingForShutdown"/> <variablelist class="dbus-property" generated="True" extra-ref="PreparingForShutdown"/>
<variablelist class="dbus-property" generated="True" extra-ref="PreparingForShutdownWithMetadata"/>
<variablelist class="dbus-property" generated="True" extra-ref="PreparingForSleep"/> <variablelist class="dbus-property" generated="True" extra-ref="PreparingForSleep"/>
<variablelist class="dbus-property" generated="True" extra-ref="ScheduledShutdown"/> <variablelist class="dbus-property" generated="True" extra-ref="ScheduledShutdown"/>
@ -665,15 +669,18 @@ node /org/freedesktop/login1 {
#define SD_LOGIND_KEXEC_REBOOT (UINT64_C(1) &lt;&lt; 1) #define SD_LOGIND_KEXEC_REBOOT (UINT64_C(1) &lt;&lt; 1)
#define SD_LOGIND_SOFT_REBOOT (UINT64_C(1) &lt;&lt; 2) #define SD_LOGIND_SOFT_REBOOT (UINT64_C(1) &lt;&lt; 2)
#define SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP (UINT64_C(1) &lt;&lt; 3) #define SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP (UINT64_C(1) &lt;&lt; 3)
#define SD_LOGIND_SKIP_INHIBITORS (UINT64_C(1) &lt;&lt; 4)
</programlisting> </programlisting>
<para>When the <varname>flags</varname> is 0 then these methods behave just like the versions without <para>When the <varname>flags</varname> is 0 then these methods behave just like the versions without
flags. When <constant>SD_LOGIND_ROOT_CHECK_INHIBITORS</constant> (0x01) is set, active inhibitors are flags. Since systemd version 256 <constant>SD_LOGIND_ROOT_CHECK_INHIBITORS</constant> (0x01) is deprecated,
honoured for privileged users too. When <constant>SD_LOGIND_KEXEC_REBOOT</constant> (0x02) is set, and active inhibitors are always honoured by default for privileged users too, and a new flag
then <function>RebootWithFlags()</function> performs a kexec reboot if kexec kernel is loaded. When <constant>SD_LOGIND_SKIP_INHIBITORS</constant> (0x04) can be specified to bypass inhibitors. When
<constant>SD_LOGIND_SOFT_REBOOT</constant> (0x04) is set, or <constant>SD_LOGIND_KEXEC_REBOOT</constant> (0x02) is set, then <function>RebootWithFlags()</function>
<constant>SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP</constant> (0x08) is set and a new root file system performs a kexec reboot if kexec kernel is loaded. When <constant>SD_LOGIND_SOFT_REBOOT</constant>
has been set up on <literal>/run/nextroot/</literal>, then <function>RebootWithFlags()</function> (0x04) is set, or <constant>SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP</constant> (0x08) is set and a
performs a userspace reboot only. <constant>SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP</constant> and new root file system has been set up on <literal>/run/nextroot/</literal>, then
<function>RebootWithFlags()</function> performs a userspace reboot only.
<constant>SD_LOGIND_SOFT_REBOOT_IF_NEXTROOT_SET_UP</constant> and
<constant>SD_LOGIND_KEXEC_REBOOT</constant> can be combined, with soft-reboot having precedence.</para> <constant>SD_LOGIND_KEXEC_REBOOT</constant> can be combined, with soft-reboot having precedence.</para>
<para><function>SetRebootParameter()</function> sets a parameter for a subsequent reboot operation. <para><function>SetRebootParameter()</function> sets a parameter for a subsequent reboot operation.
@ -731,8 +738,10 @@ node /org/freedesktop/login1 {
should be a short human readable string identifying the reason why the lock is taken. Finally, should be a short human readable string identifying the reason why the lock is taken. Finally,
<varname>mode</varname> is either <literal>block</literal> or <literal>delay</literal> which encodes <varname>mode</varname> is either <literal>block</literal> or <literal>delay</literal> which encodes
whether the inhibit shall be consider mandatory or whether it should just delay the operation to a whether the inhibit shall be consider mandatory or whether it should just delay the operation to a
certain maximum time. The method returns a file descriptor. The lock is released the moment this file certain maximum time, while the <literal>block-weak</literal> and <literal>delay-weak</literal>
descriptor and all its duplicates are closed. For more information on the inhibition logic see variants will create an inhibitor that is automatically ignored in some circumstances. The method
returns a file descriptor. The lock is released the moment this file descriptor and all its duplicates
are closed. For more information on the inhibition logic see
<ulink url="https://systemd.io/INHIBITOR_LOCKS">Inhibitor Locks</ulink>. <ulink url="https://systemd.io/INHIBITOR_LOCKS">Inhibitor Locks</ulink>.
</para> </para>
</refsect2> </refsect2>
@ -810,8 +819,14 @@ node /org/freedesktop/login1 {
<para>The <varname>PreparingForShutdown</varname> and <varname>PreparingForSleep</varname> boolean <para>The <varname>PreparingForShutdown</varname> and <varname>PreparingForSleep</varname> boolean
properties are true during the interval between the two <function>PrepareForShutdown()</function> and properties are true during the interval between the two <function>PrepareForShutdown()</function> and
<function>PrepareForSleep()</function> signals respectively. Note that these properties do not <function>PrepareForSleep()</function> signals respectively. The
send out <function>PropertyChanged</function> signals.</para> <varname>PreparingForShutdownWithMetadata</varname> property provides a list of key/value pair
metadata fields. Currently it lists a <varname>preparing</varname> boolean that corresponds to the
<varname>PreparingForShutdown</varname> property, and, if a shutdown is being prepared, it will also
contain a <varname>type</varname> string which defines the type of shutdown. The type can be one of
<literal>power-off</literal>, <literal>reboot</literal>, <literal>halt</literal>,
<literal>kexec</literal> or <literal>soft-reboot</literal>. Note that these properties do not send out
<function>PropertyChanged</function> signals.</para>
<para>The <varname>RebootParameter</varname> property shows the value set with the <para>The <varname>RebootParameter</varname> property shows the value set with the
<function>SetRebootParameter()</function> method described above.</para> <function>SetRebootParameter()</function> method described above.</para>
@ -1501,8 +1516,9 @@ node /org/freedesktop/login1/session/1 {
available.</para> available.</para>
<para><varname>Type</varname> encodes the session type. It's one of <literal>unspecified</literal> (for <para><varname>Type</varname> encodes the session type. It's one of <literal>unspecified</literal> (for
cron PAM sessions and suchlike), <literal>tty</literal> (for text logins) or cron PAM sessions and suchlike), <literal>tty</literal> (for text logins), <literal>web</literal> (for
<literal>x11</literal>/<literal>mir</literal>/<literal>wayland</literal> (for graphical logins).</para> web-based logins), or <literal>x11</literal>/<literal>mir</literal>/<literal>wayland</literal> (for
graphical logins).</para>
<para><varname>Class</varname> encodes the session class. It's one of <literal>user</literal> (for <para><varname>Class</varname> encodes the session class. It's one of <literal>user</literal> (for
normal user sessions), <literal>greeter</literal> (for display manager pseudo-sessions), or normal user sessions), <literal>greeter</literal> (for display manager pseudo-sessions), or
@ -1601,11 +1617,12 @@ node /org/freedesktop/login1/session/1 {
<function>CreateSessionWithPIDFD()</function> were added in version 255.</para> <function>CreateSessionWithPIDFD()</function> were added in version 255.</para>
<para><function>Sleep()</function>, <para><function>Sleep()</function>,
<function>CanSleep()</function>, <function>CanSleep()</function>,
<varname>SleepOperation</varname>, <varname>SleepOperation</varname>, and
<varname>DesignatedMaintenanceTime</varname>, and
<function>ListSessionsEx()</function> were added in version 256.</para> <function>ListSessionsEx()</function> were added in version 256.</para>
<para><varname>HandleSecureAttentionKey</varname>, and <para><varname>HandleSecureAttentionKey</varname>,
<function>SecureAttentionKey()</function> were added in version 257.</para> <function>SecureAttentionKey()</function>,
<varname>PreparingForShutdownWithMetadata</varname>, and
<varname>DesignatedMaintenanceTime</varname> were added in version 257.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Session Objects</title> <title>Session Objects</title>

View File

@ -593,8 +593,6 @@ node /org/freedesktop/systemd1 {
<!--method GetJobBefore is not documented!--> <!--method GetJobBefore is not documented!-->
<!--method SetShowStatus is not documented!-->
<!--method ListUnitsFiltered is not documented!--> <!--method ListUnitsFiltered is not documented!-->
<!--method ListUnitsByPatterns is not documented!--> <!--method ListUnitsByPatterns is not documented!-->
@ -673,8 +671,6 @@ node /org/freedesktop/systemd1 {
<!--property ConfirmSpawn is not documented!--> <!--property ConfirmSpawn is not documented!-->
<!--property ShowStatus is not documented!-->
<!--property DefaultStandardOutput is not documented!--> <!--property DefaultStandardOutput is not documented!-->
<!--property DefaultStandardError is not documented!--> <!--property DefaultStandardError is not documented!-->
@ -1362,6 +1358,24 @@ node /org/freedesktop/systemd1 {
<para><function>ResetFailedUnit()</function> resets the "failed" state of a specific unit.</para> <para><function>ResetFailedUnit()</function> resets the "failed" state of a specific unit.</para>
<para><function>SetShowStatus()</function> configures the display of status messages during bootup and
shutdown. The <varname>mode</varname> parameter can be set to any value that's valid for the
<varname>systemd.show_status</varname> kernel parameter. For more information about
<varname>systemd.show_status</varname>, see
<citerefentry project="man-pages"><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
The <varname>mode</varname> parameter can also be set to an empty string. When <varname>mode</varname>
is set to an empty string, <function>SetShowStatus()</function> will reset
<varname>ShowStatus</varname> back to its original value. You can use
<function>SetShowStatus()</function> create a service that does something like this:
<orderedlist>
<listitem><para>Send a D-Bus message that will turn off status messages.</para></listitem>
<listitem><para>Block until a reply to that message is received.</para></listitem>
<listitem><para>Print multiples lines without being interrupted by status messages.</para></listitem>
<listitem><para>Send a D-Bus message that will reset <varname>ShowStatus</varname> back to its
original value.</para></listitem>
</orderedlist>
</para>
<para><function>ResetFailed()</function> resets the "failed" state of all units.</para> <para><function>ResetFailed()</function> resets the "failed" state of all units.</para>
<para><function>ListUnits()</function> returns an array of all currently loaded units. Note that <para><function>ListUnits()</function> returns an array of all currently loaded units. Note that
@ -1788,6 +1802,12 @@ node /org/freedesktop/systemd1 {
<para><varname>Environment</varname> encodes the environment block passed to all executed services. It <para><varname>Environment</varname> encodes the environment block passed to all executed services. It
may be altered with bus calls such as <function>SetEnvironment()</function> (see above).</para> may be altered with bus calls such as <function>SetEnvironment()</function> (see above).</para>
<para><varname>ShowStatus</varname> encodes systemd's current policy for displaying status messages
during bootup and shutdown. Its value can be any valid value for the
<varname>systemd.show_status</varname> kernel parameter (see
<citerefentry project="man-pages"><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
It may be altered using <function>SetShowStatus()</function> (see above).</para>
<para><varname>UnitPath</varname> encodes the currently active unit file search path. It is an array of <para><varname>UnitPath</varname> encodes the currently active unit file search path. It is an array of
file system paths encoded as strings.</para> file system paths encoded as strings.</para>
@ -2046,6 +2066,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
readonly as CanClean = ['...', ...]; readonly as CanClean = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b CanFreeze = ...; readonly b CanFreeze = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b CanLiveMount = ...;
readonly (uo) Job = ...; readonly (uo) Job = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b StopWhenUnneeded = ...; readonly b StopWhenUnneeded = ...;
@ -2115,6 +2137,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
@org.freedesktop.DBus.Property.EmitsChangedSignal("false") @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly as Refs = ['...', ...]; readonly as Refs = ['...', ...];
readonly a(ss) ActivationDetails = [...]; readonly a(ss) ActivationDetails = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly b DebugInvocation = ...;
}; };
interface org.freedesktop.DBus.Peer { ... }; interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... }; interface org.freedesktop.DBus.Introspectable { ... };
@ -2176,6 +2200,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<!--property CanFreeze is not documented!--> <!--property CanFreeze is not documented!-->
<!--property CanLiveMount is not documented!-->
<!--property SurviveFinalKillSignal is not documented!--> <!--property SurviveFinalKillSignal is not documented!-->
<!--property OnSuccessJobMode is not documented!--> <!--property OnSuccessJobMode is not documented!-->
@ -2380,6 +2406,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<variablelist class="dbus-property" generated="True" extra-ref="CanFreeze"/> <variablelist class="dbus-property" generated="True" extra-ref="CanFreeze"/>
<variablelist class="dbus-property" generated="True" extra-ref="CanLiveMount"/>
<variablelist class="dbus-property" generated="True" extra-ref="Job"/> <variablelist class="dbus-property" generated="True" extra-ref="Job"/>
<variablelist class="dbus-property" generated="True" extra-ref="StopWhenUnneeded"/> <variablelist class="dbus-property" generated="True" extra-ref="StopWhenUnneeded"/>
@ -2458,6 +2486,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<variablelist class="dbus-property" generated="True" extra-ref="ActivationDetails"/> <variablelist class="dbus-property" generated="True" extra-ref="ActivationDetails"/>
<variablelist class="dbus-property" generated="True" extra-ref="DebugInvocation"/>
<!--End of Autogenerated section--> <!--End of Autogenerated section-->
<refsect2> <refsect2>
@ -2644,14 +2674,20 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note
that new key value pair may be added at any time in future versions. Existing entries will not be that new key value pair may be added at any time in future versions. Existing entries will not be
removed.</para> removed.</para>
<para><varname>DebugInvocation</varname> contains a boolean that will change to
<constant>true</constant> when the unit is restarted with log level set to debug due to an earlier
failure, and will change back to <constant>false</constant> when either the unit successfully starts
or the restart rate limit is reached. See the <literal>RestartMode=</literal> section in
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more details.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Security</title> <title>Security</title>
<para>Similarly to methods on the <interfacename>Manager</interfacename> object, read-only access is <para>Similarly to methods on the <interfacename>Manager</interfacename> object, read-only access is
allowed for everyone. All operations are allowed for clients with the allowed for everyone. All operations are allowed for clients when the
<constant>CAP_SYS_ADMIN</constant> capability or when the
<interfacename>org.freedesktop.systemd1.manage-units</interfacename> privilege is granted by <interfacename>org.freedesktop.systemd1.manage-units</interfacename> privilege is granted by
polkit.</para> polkit.</para>
</refsect2> </refsect2>
@ -2750,6 +2786,7 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
readonly s Result = '...'; readonly s Result = '...';
readonly s ReloadResult = '...'; readonly s ReloadResult = '...';
readonly s CleanResult = '...'; readonly s CleanResult = '...';
readonly s LiveMountResult = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s USBFunctionDescriptors = '...'; readonly s USBFunctionDescriptors = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
@ -3187,6 +3224,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as ImportCredential = ['...', ...]; readonly as ImportCredential = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly a(ss) ImportCredentialEx = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as SupplementaryGroups = ['...', ...]; readonly as SupplementaryGroups = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PAMName = '...'; readonly s PAMName = '...';
@ -3225,6 +3264,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateUsers = ...; readonly b PrivateUsers = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PrivateUsersEx = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateMounts = ...; readonly b PrivateMounts = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateIPC = ...; readonly b PrivateIPC = ...;
@ -3313,6 +3354,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b MountAPIVFS = ...; readonly b MountAPIVFS = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b BindLogSockets = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s KeyringMode = '...'; readonly s KeyringMode = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s ProtectProc = '...'; readonly s ProtectProc = '...';
@ -3412,6 +3455,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<!--property CleanResult is not documented!--> <!--property CleanResult is not documented!-->
<!--property LiveMountResult is not documented!-->
<!--property USBFunctionDescriptors is not documented!--> <!--property USBFunctionDescriptors is not documented!-->
<!--property USBFunctionStrings is not documented!--> <!--property USBFunctionStrings is not documented!-->
@ -3800,6 +3845,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<!--property ImportCredential is not documented!--> <!--property ImportCredential is not documented!-->
<!--property ImportCredentialEx is not documented!-->
<!--property SupplementaryGroups is not documented!--> <!--property SupplementaryGroups is not documented!-->
<!--property PAMName is not documented!--> <!--property PAMName is not documented!-->
@ -3836,6 +3883,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<!--property PrivateUsers is not documented!--> <!--property PrivateUsers is not documented!-->
<!--property PrivateUsersEx is not documented!-->
<!--property PrivateMounts is not documented!--> <!--property PrivateMounts is not documented!-->
<!--property PrivateIPC is not documented!--> <!--property PrivateIPC is not documented!-->
@ -3908,6 +3957,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<!--property MountAPIVFS is not documented!--> <!--property MountAPIVFS is not documented!-->
<!--property BindLogSockets is not documented!-->
<!--property KeyringMode is not documented!--> <!--property KeyringMode is not documented!-->
<!--property ProtectProc is not documented!--> <!--property ProtectProc is not documented!-->
@ -4040,6 +4091,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<variablelist class="dbus-property" generated="True" extra-ref="CleanResult"/> <variablelist class="dbus-property" generated="True" extra-ref="CleanResult"/>
<variablelist class="dbus-property" generated="True" extra-ref="LiveMountResult"/>
<variablelist class="dbus-property" generated="True" extra-ref="USBFunctionDescriptors"/> <variablelist class="dbus-property" generated="True" extra-ref="USBFunctionDescriptors"/>
<variablelist class="dbus-property" generated="True" extra-ref="USBFunctionStrings"/> <variablelist class="dbus-property" generated="True" extra-ref="USBFunctionStrings"/>
@ -4488,6 +4541,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/> <variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/>
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredentialEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/> <variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/>
<variablelist class="dbus-property" generated="True" extra-ref="PAMName"/> <variablelist class="dbus-property" generated="True" extra-ref="PAMName"/>
@ -4526,6 +4581,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsersEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/>
@ -4614,6 +4671,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
<variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/> <variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/>
<variablelist class="dbus-property" generated="True" extra-ref="BindLogSockets"/>
<variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/> <variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/>
<variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/> <variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/>
@ -5312,6 +5371,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as ImportCredential = ['...', ...]; readonly as ImportCredential = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly a(ss) ImportCredentialEx = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as SupplementaryGroups = ['...', ...]; readonly as SupplementaryGroups = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PAMName = '...'; readonly s PAMName = '...';
@ -5350,6 +5411,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateUsers = ...; readonly b PrivateUsers = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PrivateUsersEx = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateMounts = ...; readonly b PrivateMounts = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateIPC = ...; readonly b PrivateIPC = ...;
@ -5438,6 +5501,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b MountAPIVFS = ...; readonly b MountAPIVFS = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b BindLogSockets = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s KeyringMode = '...'; readonly s KeyringMode = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s ProtectProc = '...'; readonly s ProtectProc = '...';
@ -5939,6 +6004,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
<!--property ImportCredential is not documented!--> <!--property ImportCredential is not documented!-->
<!--property ImportCredentialEx is not documented!-->
<!--property SupplementaryGroups is not documented!--> <!--property SupplementaryGroups is not documented!-->
<!--property PAMName is not documented!--> <!--property PAMName is not documented!-->
@ -5975,6 +6042,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
<!--property PrivateUsers is not documented!--> <!--property PrivateUsers is not documented!-->
<!--property PrivateUsersEx is not documented!-->
<!--property PrivateMounts is not documented!--> <!--property PrivateMounts is not documented!-->
<!--property PrivateIPC is not documented!--> <!--property PrivateIPC is not documented!-->
@ -6047,6 +6116,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
<!--property MountAPIVFS is not documented!--> <!--property MountAPIVFS is not documented!-->
<!--property BindLogSockets is not documented!-->
<!--property KeyringMode is not documented!--> <!--property KeyringMode is not documented!-->
<!--property ProtectProc is not documented!--> <!--property ProtectProc is not documented!-->
@ -6603,6 +6674,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/> <variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/>
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredentialEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/> <variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/>
<variablelist class="dbus-property" generated="True" extra-ref="PAMName"/> <variablelist class="dbus-property" generated="True" extra-ref="PAMName"/>
@ -6641,6 +6714,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsersEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/>
@ -6729,6 +6804,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
<variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/> <variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/>
<variablelist class="dbus-property" generated="True" extra-ref="BindLogSockets"/>
<variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/> <variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/>
<variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/> <variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/>
@ -7291,6 +7368,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as ImportCredential = ['...', ...]; readonly as ImportCredential = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly a(ss) ImportCredentialEx = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as SupplementaryGroups = ['...', ...]; readonly as SupplementaryGroups = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PAMName = '...'; readonly s PAMName = '...';
@ -7329,6 +7408,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateUsers = ...; readonly b PrivateUsers = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PrivateUsersEx = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateMounts = ...; readonly b PrivateMounts = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateIPC = ...; readonly b PrivateIPC = ...;
@ -7417,6 +7498,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b MountAPIVFS = ...; readonly b MountAPIVFS = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b BindLogSockets = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s KeyringMode = '...'; readonly s KeyringMode = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s ProtectProc = '...'; readonly s ProtectProc = '...';
@ -7844,6 +7927,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
<!--property ImportCredential is not documented!--> <!--property ImportCredential is not documented!-->
<!--property ImportCredentialEx is not documented!-->
<!--property SupplementaryGroups is not documented!--> <!--property SupplementaryGroups is not documented!-->
<!--property PAMName is not documented!--> <!--property PAMName is not documented!-->
@ -7880,6 +7965,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
<!--property PrivateUsers is not documented!--> <!--property PrivateUsers is not documented!-->
<!--property PrivateUsersEx is not documented!-->
<!--property PrivateMounts is not documented!--> <!--property PrivateMounts is not documented!-->
<!--property PrivateIPC is not documented!--> <!--property PrivateIPC is not documented!-->
@ -7952,6 +8039,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
<!--property MountAPIVFS is not documented!--> <!--property MountAPIVFS is not documented!-->
<!--property BindLogSockets is not documented!-->
<!--property KeyringMode is not documented!--> <!--property KeyringMode is not documented!-->
<!--property ProtectProc is not documented!--> <!--property ProtectProc is not documented!-->
@ -8420,6 +8509,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/> <variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/>
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredentialEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/> <variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/>
<variablelist class="dbus-property" generated="True" extra-ref="PAMName"/> <variablelist class="dbus-property" generated="True" extra-ref="PAMName"/>
@ -8458,6 +8549,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsersEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/>
@ -8546,6 +8639,8 @@ node /org/freedesktop/systemd1/unit/home_2emount {
<variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/> <variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/>
<variablelist class="dbus-property" generated="True" extra-ref="BindLogSockets"/>
<variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/> <variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/>
<variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/> <variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/>
@ -9231,6 +9326,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as ImportCredential = ['...', ...]; readonly as ImportCredential = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly a(ss) ImportCredentialEx = [...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as SupplementaryGroups = ['...', ...]; readonly as SupplementaryGroups = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PAMName = '...'; readonly s PAMName = '...';
@ -9269,6 +9366,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateUsers = ...; readonly b PrivateUsers = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s PrivateUsersEx = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateMounts = ...; readonly b PrivateMounts = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b PrivateIPC = ...; readonly b PrivateIPC = ...;
@ -9357,6 +9456,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b MountAPIVFS = ...; readonly b MountAPIVFS = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b BindLogSockets = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s KeyringMode = '...'; readonly s KeyringMode = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const") @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s ProtectProc = '...'; readonly s ProtectProc = '...';
@ -9770,6 +9871,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
<!--property ImportCredential is not documented!--> <!--property ImportCredential is not documented!-->
<!--property ImportCredentialEx is not documented!-->
<!--property SupplementaryGroups is not documented!--> <!--property SupplementaryGroups is not documented!-->
<!--property PAMName is not documented!--> <!--property PAMName is not documented!-->
@ -9806,6 +9909,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
<!--property PrivateUsers is not documented!--> <!--property PrivateUsers is not documented!-->
<!--property PrivateUsersEx is not documented!-->
<!--property PrivateMounts is not documented!--> <!--property PrivateMounts is not documented!-->
<!--property PrivateIPC is not documented!--> <!--property PrivateIPC is not documented!-->
@ -9878,6 +9983,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
<!--property MountAPIVFS is not documented!--> <!--property MountAPIVFS is not documented!-->
<!--property BindLogSockets is not documented!-->
<!--property KeyringMode is not documented!--> <!--property KeyringMode is not documented!-->
<!--property ProtectProc is not documented!--> <!--property ProtectProc is not documented!-->
@ -10332,6 +10439,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/> <variablelist class="dbus-property" generated="True" extra-ref="ImportCredential"/>
<variablelist class="dbus-property" generated="True" extra-ref="ImportCredentialEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/> <variablelist class="dbus-property" generated="True" extra-ref="SupplementaryGroups"/>
<variablelist class="dbus-property" generated="True" extra-ref="PAMName"/> <variablelist class="dbus-property" generated="True" extra-ref="PAMName"/>
@ -10370,6 +10479,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateUsers"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateUsersEx"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateMounts"/>
<variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/> <variablelist class="dbus-property" generated="True" extra-ref="PrivateIPC"/>
@ -10458,6 +10569,8 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
<variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/> <variablelist class="dbus-property" generated="True" extra-ref="MountAPIVFS"/>
<variablelist class="dbus-property" generated="True" extra-ref="BindLogSockets"/>
<variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/> <variablelist class="dbus-property" generated="True" extra-ref="KeyringMode"/>
<variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/> <variablelist class="dbus-property" generated="True" extra-ref="ProtectProc"/>
@ -12055,6 +12168,8 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \
<para><function>QueueSignal()</function> was added in version 254.</para> <para><function>QueueSignal()</function> was added in version 254.</para>
<para><varname>SurviveFinalKillSignal</varname> was added in version 255.</para> <para><varname>SurviveFinalKillSignal</varname> was added in version 255.</para>
<para><varname>WantsMountsFor</varname> was added in version 256.</para> <para><varname>WantsMountsFor</varname> was added in version 256.</para>
<para><varname>DebugInvocation</varname>, and
<varname>CanLiveMount</varname> were added in version 257.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Service Unit Objects</title> <title>Service Unit Objects</title>
@ -12099,8 +12214,12 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \
<varname>ExecMainHandoffTimestampMonotonic</varname>, and <varname>ExecMainHandoffTimestampMonotonic</varname>, and
<varname>ExecMainHandoffTimestamp</varname> were added in version 256.</para> <varname>ExecMainHandoffTimestamp</varname> were added in version 256.</para>
<para><varname>StatusBusError</varname>, <para><varname>StatusBusError</varname>,
<varname>StatusVarlinkError</varname>, and <varname>StatusVarlinkError</varname>,
<varname>PrivateTmpEx</varname> were added in version 257.</para> <varname>LiveMountResult</varname>,
<varname>PrivateTmpEx</varname>,
<varname>ImportCredentialEx</varname>,
<varname>BindLogSockets</varname>, and
<varname>PrivateUsersEx</varname> were added in version 257.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Socket Unit Objects</title> <title>Socket Unit Objects</title>
@ -12137,7 +12256,10 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \
<varname>EffectiveTasksMax</varname>, <varname>EffectiveTasksMax</varname>,
<varname>MemoryZSwapWriteback</varname>, and <varname>MemoryZSwapWriteback</varname>, and
<varname>PassFileDescriptorsToExec</varname> were added in version 256.</para> <varname>PassFileDescriptorsToExec</varname> were added in version 256.</para>
<para><varname>PrivateTmpEx</varname> was added in version 257.</para> <para><varname>PrivateTmpEx</varname>,
<varname>ImportCredentialEx</varname>,
<varname>BindLogSockets</varname>, and
<varname>PrivateUsersEx</varname> were added in version 257.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Mount Unit Objects</title> <title>Mount Unit Objects</title>
@ -12171,7 +12293,10 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \
<varname>EffectiveMemoryMax</varname>, <varname>EffectiveMemoryMax</varname>,
<varname>EffectiveTasksMax</varname>, and <varname>EffectiveTasksMax</varname>, and
<varname>MemoryZSwapWriteback</varname> were added in version 256.</para> <varname>MemoryZSwapWriteback</varname> were added in version 256.</para>
<para><varname>PrivateTmpEx</varname> was added in version 257.</para> <para><varname>PrivateTmpEx</varname>,
<varname>ImportCredentialEx</varname>,
<varname>BindLogSockets</varname>, and
<varname>PrivateUsersEx</varname> were added in version 257.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Swap Unit Objects</title> <title>Swap Unit Objects</title>
@ -12205,7 +12330,10 @@ $ gdbus introspect --system --dest org.freedesktop.systemd1 \
<varname>EffectiveMemoryMax</varname>, <varname>EffectiveMemoryMax</varname>,
<varname>EffectiveTasksMax</varname>, and <varname>EffectiveTasksMax</varname>, and
<varname>MemoryZSwapWriteback</varname> were added in version 256.</para> <varname>MemoryZSwapWriteback</varname> were added in version 256.</para>
<para><varname>PrivateTmpEx</varname> was added in version 257.</para> <para><varname>PrivateTmpEx</varname>,
<varname>ImportCredentialEx</varname>,
<varname>BindLogSockets</varname>, and
<varname>PrivateUsersEx</varname> were added in version 257.</para>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Slice Unit Objects</title> <title>Slice Unit Objects</title>

View File

@ -0,0 +1,497 @@
<?xml version='1.0'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refentry id="org.freedesktop.sysupdate1" conditional='ENABLE_SYSUPDATE'
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>org.freedesktop.sysupdate1</title>
<productname>systemd</productname>
</refentryinfo>
<refmeta>
<refentrytitle>org.freedesktop.sysupdate1</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>org.freedesktop.sysupdate1</refname>
<refpurpose>The D-Bus interface of systemd-sysupdated</refpurpose>
</refnamediv>
<refsect1>
<title>Introduction</title>
<para>
<citerefentry><refentrytitle>systemd-sysupdated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
is a system service that allows unprivileged clients to update the system. This page describes the D-Bus
interface.</para>
</refsect1>
<refsect1>
<title>The Manager Object</title>
<para>The service exposes the following interfaces on the Manager object on the bus:</para>
<programlisting executable="systemd-sysupdated" node="/org/freedesktop/sysupdate1" interface="org.freedesktop.sysupdate1.Manager">
node /org/freedesktop/sysupdate1 {
interface org.freedesktop.sysupdate1.Manager {
methods:
ListTargets(out a(sso) targets);
ListJobs(out a(tsuo) jobs);
ListAppStream(out as urls);
signals:
JobRemoved(t id,
o path,
i status);
};
interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... };
interface org.freedesktop.DBus.Properties { ... };
};
</programlisting>
<!--Autogenerated cross-references for systemd.directives, do not edit-->
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.sysupdate1.Manager"/>
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.sysupdate1.Manager"/>
<variablelist class="dbus-method" generated="True" extra-ref="ListTargets()"/>
<variablelist class="dbus-method" generated="True" extra-ref="ListJobs()"/>
<variablelist class="dbus-method" generated="True" extra-ref="ListAppStream()"/>
<variablelist class="dbus-signal" generated="True" extra-ref="JobRemoved()"/>
<!--End of Autogenerated section-->
<refsect2>
<title>Methods</title>
<para><function>ListTargets()</function> returns a list all known update targets. It returns
an array of structures which consist of a string indicating the target's class (see Target's
<varname>Class</varname> property below for an explanation of the possible values), a string
with the name of the target, and the target object path.</para>
<para><function>ListJobs()</function> returns a list all ongoing jobs. It returns
an array of structures which consist of a numeric job ID, a string indicating the job type (see Job's
<varname>Type</varname> property below for an explanation of the possible values), the job's progress,
and the job's object path.</para>
<para><function>ListAppStream()</function> returns an array of all the appstream catalog URLs that this
service knows about. See Target's <varname>GetAppStream()</varname> method below for more
details.</para>
</refsect2>
<refsect2>
<title>Signals</title>
<para>The <function>JobRemoved()</function> signal is sent each time a job finishes,
is canceled or fails. It also carries the job ID and object path, followed by a numeric status
code. If the status is zero, the job has succeed. A positive status should be treated as an
exit code (i.e. <literal>EXIT_FAILURE</literal>), and a negative status should be treated as a
negative errno-style error code (i.e. <literal>-EINVAL</literal>).</para>
</refsect2>
</refsect1>
<refsect1>
<title>The Target Object</title>
<para>A target is a component of the system (i.e. the host itself, a sysext, a confext, etc.) that
can be updated by
<citerefentry><refentrytitle>systemd-sysupdate</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
<para>The service exposes the following interfaces on Target objects on the bus:</para>
<programlisting executable="systemd-sysupdated" node="/org/freedesktop/sysupdate1/target/host" interface="org.freedesktop.sysupdate1.Target">
node /org/freedesktop/sysupdate1/target/host {
interface org.freedesktop.sysupdate1.Target {
methods:
List(in t flags,
out as versions);
Describe(in s version,
in t flags,
out s json);
CheckNew(out s new_version);
Update(in s new_version,
in t flags,
out s new_version,
out t job_id,
out o job_path);
Vacuum(out u count);
GetAppStream(out as appstream);
GetVersion(out s version);
properties:
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Class = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Name = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Path = '...';
};
interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... };
interface org.freedesktop.DBus.Properties { ... };
};
</programlisting>
<!--Autogenerated cross-references for systemd.directives, do not edit-->
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.sysupdate1.Target"/>
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.sysupdate1.Target"/>
<variablelist class="dbus-method" generated="True" extra-ref="List()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Describe()"/>
<variablelist class="dbus-method" generated="True" extra-ref="CheckNew()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Update()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Vacuum()"/>
<variablelist class="dbus-method" generated="True" extra-ref="GetAppStream()"/>
<variablelist class="dbus-method" generated="True" extra-ref="GetVersion()"/>
<variablelist class="dbus-property" generated="True" extra-ref="Class"/>
<variablelist class="dbus-property" generated="True" extra-ref="Name"/>
<variablelist class="dbus-property" generated="True" extra-ref="Path"/>
<!--End of Autogenerated section-->
<refsect2>
<title>Methods</title>
<para><function>List()</function> returns a list of versions available for this target. Additional
options may be passed through the <varname>flags</varname> argument. Valid flags are defined as follows:
</para>
<programlisting>
#define SD_SYSUPDATE_OFFLINE (UINT64_C(1) &lt;&lt; 0)
</programlisting>
<para>When <constant>SD_SYSUPDATE_OFFLINE</constant> is set, this method returns only the versions
installed locally. Otherwise, this method pulls metadata from the network and returns all versions
available for this target. Use <function>Describe()</function> to query more information about each
version returned by this method.</para>
<para><function>Describe()</function> returns all known information about a given version as a JSON
object. The <varname>version</varname> argument is used to pass the version to be described. Additional
options may be passed through the <varname>flags</varname> argument. This method supports the same flags
as <function>List()</function>. The returned JSON object contains several known keys. More keys may be
added in the future. The currently known keys are as follows:</para>
<variablelist>
<varlistentry>
<term><literal>version</literal></term>
<listitem><para>A string containing the version number.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>newest</literal></term>
<listitem><para>A boolean indicating whether this version is the latest available for the target.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>available</literal></term>
<listitem><para>A boolean indicating whether this version is available for download.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>installed</literal></term>
<listitem><para>A boolean indicating whether this version is installed locally.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>obsolete</literal></term>
<listitem><para>A boolean indicating whether this version is considered obsolete by the service,
and is therefore disallowed from being installed.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>protected</literal></term>
<listitem><para>A boolean indicating whether this version is exempt from deletion by a
<function>Vacuum()</function> operation.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>incomplete</literal></term>
<listitem><para>A boolean indicating whether this version is incomplete, which means that it is
missing some file. Note that only installed incomplete versions will be offered by the service;
versions that are incomplete on the server-side are completely ignored. Incomplete versions can
be repaired in-place by calling <function>Update()</function> on that version.</para></listitem>
</varlistentry>
<varlistentry>
<term><literal>changelog_urls</literal></term>
<listitem><para>A list of strings that contain user-presentable URLs to ChangeLogs associated with
this version.</para></listitem>
</varlistentry>
</variablelist>
<para><function>CheckNew()</function> checks if a newer version is available for this target. This
method pulls metadata from the network. If a newer version is found, this method returns the
version number. If no newer version is found, this method returns an empty string. Use
<function>Describe()</function> to query more information about the version returned by this method.
</para>
<para><function>Update()</function> installs an update for this target. If a
<varname>new_version</varname> is specified, that is the version that gets installed. Otherwise, the
latest version is installed. The <varname>flags</varname> argument is added for future
extensibility. No flags are currently defined, and the argument is required to be set to
<literal>0</literal>. Unlike all the other methods in this interface, <function>Update()</function>
does not wait for its job to complete. Instead, it returns the job's numeric ID and object path as soon
as the job begins, so that the caller can listen for progress updates or cancel the operation. This
method also returns the version the target will be updated to, for cases where no version was specified
by the caller. This method pulls both metadata and payload data from the network. Listen for the
Manager's <function>JobRemoved()</function> signal to detect when the job is complete.</para>
<para><function>Vacuum()</function> deletes old installed versions of this target to free up space.
It returns the number of instances that have been deleted.</para>
<para><function>GetAppStream()</function> returns a list of HTTP/HTTPS URLs to this target's
<ulink url="https://wwww.freedesktop.org/software/appstream/docs/chap-CatalogData.html">appstream catalog</ulink>
XML files. If this target has no appstream catalogs, the method will return an empty list. These
catalog files can be used by software centers (such as GNOME Software or KDE Discover) to present rich
metadata about the target, including a display name, changelog, icon, and more. The returned catalogs
will include <ulink url="https://systemd.io/APPSTREAM_BUNDLE">special metadata</ulink> to allow the
software center to correctly associate the catalogs with this target.</para>
<para><function>GetVersion()</function> returns the current version of this target, if any. The current
version is the newest version that is installed. Note that this isn't necessarily the same thing as the
booted or currently-in-use version of the target. For example, on the host system the booted version
is the current version most of the time, but if an update is installed and pending a reboot it will
become the current version instead. You can query the booted version of the host system via
<varname>IMAGE_VERSION</varname> in <filename>/etc/os-release</filename>. If the target has no current
version, the function will return an empty string.</para>
</refsect2>
<refsect2>
<title>Properties</title>
<para>The <varname>Class</varname> property exposes the class of this target, which describes
where it was enumerated. Possible values include: <literal>machine</literal> for containers and
virtual machines managed by
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<literal>portable</literal> for <ulink url="https://systemd.io/PORTABLE_SERVICES">portable services</ulink>,
<literal>sysext</literal> for system extensions managed by
<citerefentry><refentrytitle>systemd-sysext</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<literal>confext</literal> for configuration extensions managed by
<citerefentry><refentrytitle>systemd-confext</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<literal>component</literal> for components accepted by the <option>--component=</option> option of
<citerefentry><refentrytitle>systemd-sysupdate</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
and <literal>host</literal> for the host system itself. At most one target will have a class of
<literal>host</literal>.</para>
<para>The <varname>Path</varname> property exposes more detail about where this target was found.
For <literal>machine</literal>, <literal>portable</literal>, <literal>extension</literal>, and
<literal>confext</literal> targets, this is the file path to the image. For <literal>component</literal>
and <literal>host</literal> targets, this is the name of a
<citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
directory.</para>
<para>The <varname>Name</varname> property exposes the name of this target. Note that the name is
unique within a class but is not necessarily unique between classes. For instance, it is possible
to have both a <literal>portable</literal> target named <literal>foobar</literal> and an
<literal>extension</literal> target named <literal>foobar</literal>, but it is not possible to have
two <literal>portable</literal> targets named <literal>foobar</literal>.</para>
</refsect2>
<refsect2>
<title>Security</title>
<para>Method calls on this service are authenticated via
<ulink url="https://www.freedesktop.org/software/polkit/docs/latest/">polkit</ulink>.</para>
<para><function>List()</function>, <function>Describe()</function>, and <function>CheckNew()</function>
use the polkit action <interfacename>org.freedesktop.sysupdate1.check</interfacename>.
By default, this action is permitted without administrator authentication.</para>
<para><function>Update()</function> uses the polkit action
<interfacename>org.freedesktop.sysupdate1.update</interfacename> when no version is specified.
By default, this action is permitted without administrator authentication. When a version is
specified, <interfacename>org.freedesktop.sysupdate1.update-to-version</interfacename> is
used instead. By default, this alternate action requires administrator authentication.</para>
<para><function>Vacuum()</function> uses the polkit action
<interfacename>org.freedesktop.sysupdate1.vacuum</interfacename>. By default, this action requires
administrator authentication.</para>
<para><function>GetAppStream()</function> and <function>GetVersion()</function> are unauthenticated and
may be called by anybody.</para>
<para>All methods called on this interface expose additional variables to the polkit rules.
<literal>class</literal> contains the class of the Target being acted upon, and <literal>name</literal>
contains the name of the same Target. Additionally, each method exposes its arguments to the
rule. Flags are mapped as follows:</para>
<itemizedlist>
<listitem><para><constant>SD_SYSUPDATE_OFFLINE</constant><literal>update</literal></para></listitem>
</itemizedlist>
</refsect2>
</refsect1>
<refsect1>
<title>The Job Object</title>
<para>A job is an ongoing operation, started by one of the methods on a Target object.</para>
<para>The service exposes the following interfaces on Job objects on the bus:</para>
<programlisting executable="systemd-sysupdated" node="/org/freedesktop/sysupdate1/job/_1" interface="org.freedesktop.sysupdate1.Job">
node /org/freedesktop/sysupdate1/job/_1 {
interface org.freedesktop.sysupdate1.Job {
methods:
Cancel();
properties:
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t Id = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Type = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b Offline = ...;
readonly u Progress = ...;
};
interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... };
interface org.freedesktop.DBus.Properties { ... };
};
</programlisting>
<!--Autogenerated cross-references for systemd.directives, do not edit-->
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.sysupdate1.Job"/>
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.sysupdate1.Job"/>
<variablelist class="dbus-method" generated="True" extra-ref="Cancel()"/>
<variablelist class="dbus-property" generated="True" extra-ref="Id"/>
<variablelist class="dbus-property" generated="True" extra-ref="Type"/>
<variablelist class="dbus-property" generated="True" extra-ref="Offline"/>
<variablelist class="dbus-property" generated="True" extra-ref="Progress"/>
<!--End of Autogenerated section-->
<refsect2>
<title>Methods</title>
<para>The <function>Cancel()</function> method may be used to cancel the job. It takes no
parameters.</para>
</refsect2>
<refsect2>
<title>Properties</title>
<para>The <varname>Id</varname> property exposes the numeric job ID of the job object.</para>
<para>The <varname>Type</varname> property exposes the type of operation (one of: <literal>list</literal>,
<literal>describe</literal>, <literal>check-new</literal>, <literal>update</literal>, or <literal>vacuum</literal>).
</para>
<para>The <varname>Offline</varname> property exposes whether the job is permitted to access
the network or not.</para>
<para>The <varname>Progress</varname> property exposes the current progress of the job as a value
between 0 and 100. It is only available for <literal>update</literal> jobs; for all other jobs
it is always 0.</para>
</refsect2>
<refsect2>
<title>Security</title>
<para><function>Cancel()</function> uses the polkit action that corresponds to the method
that started this job. For instance, trying to cancel a <literal>list</literal> job will
require polkit to permit the <interfacename>org.freedesktop.sysupdate1.check</interfacename>
action.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Examples</title>
<example>
<title>Introspect <interfacename>org.freedesktop.sysupdate1.Manager</interfacename> on the bus</title>
<programlisting>$ gdbus introspect --system \
--dest org.freedesktop.sysupdate1 \
--object-path /org/freedesktop/sysupdate1
</programlisting>
</example>
<example>
<title>Introspect <interfacename>org.freedesktop.sysupdate1.Target</interfacename> on the bus</title>
<programlisting>$ gdbus introspect --system \
--dest org.freedesktop.sysupdate1 \
--object-path /org/freedesktop/sysupdate1/target/host
</programlisting>
</example>
<example>
<title>Introspect <interfacename>org.freedesktop.sysupdate1.Job</interfacename> on the bus</title>
<programlisting>$ gdbus introspect --system \
--dest org.freedesktop.sysupdate1 \
--object-path /org/freedesktop/sysupdate1/job/_1
</programlisting>
</example>
</refsect1>
<xi:include href="org.freedesktop.locale1.xml" xpointer="versioning"/>
<refsect1>
<title>History</title>
<refsect2>
<title>The Manager Object</title>
<para><function>ListTargets()</function>,
<function>ListJobs()</function>,
<function>ListAppStream()</function>, and
<function>JobRemoved()</function> were added in version 257.</para>
</refsect2>
<refsect2>
<title>The Target Object</title>
<para><function>List()</function>,
<function>Describe()</function>,
<function>CheckNew()</function>,
<function>Update()</function>,
<function>Vacuum()</function>,
<function>GetAppStream()</function>,
<function>GetVersion()</function>,
<varname>Class</varname>,
<varname>Name</varname>, and
<varname>Path</varname> were added in version 257.</para>
</refsect2>
<refsect2>
<title>The Job Object</title>
<para><function>Cancel()</function>,
<varname>Id</varname>,
<varname>Type</varname>,
<varname>Offline</varname>, and
<varname>Progress</varname> were added in version 257.</para>
</refsect2>
</refsect1>
</refentry>

View File

@ -0,0 +1,156 @@
<?xml version="1.0"?>
<!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % entities SYSTEM "custom-entities.ent" >
%entities;
]>
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refentry id="org.freedesktop.timesync1" conditional='ENABLE_TIMESYNCD'
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>org.freedesktop.timesync1</title>
<productname>systemd</productname>
</refentryinfo>
<refmeta>
<refentrytitle>org.freedesktop.timesync1</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>org.freedesktop.timesync1</refname>
<refpurpose>The D-Bus interface of systemd-timesyncd</refpurpose>
</refnamediv>
<refsect1>
<title>Introduction</title>
<para>
<citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
is a system service that may be used to synchronize the local system clock with a remote Network Time
Protocol (NTP) server. This page describes the D-Bus interface.</para>
</refsect1>
<refsect1>
<title>The Manager Object</title>
<para>The service exposes the following interfaces on the Manager object on the bus:</para>
<programlisting executable="systemd-timesyncd" node="/org/freedesktop/timesync1" interface="org.freedesktop.timesync1.Manager">
node /org/freedesktop/timesync1 {
interface org.freedesktop.timesync1.Manager {
methods:
SetRuntimeNTPServers(in as runtime_servers);
properties:
readonly as LinkNTPServers = ['...', ...];
readonly as SystemNTPServers = ['...', ...];
readonly as RuntimeNTPServers = ['...', ...];
readonly as FallbackNTPServers = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly s ServerName = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly (iay) ServerAddress = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t RootDistanceMaxUSec = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t PollIntervalMinUSec = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t PollIntervalMaxUSec = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly t PollIntervalUSec = ...;
readonly (uuuuittayttttbtt) NTPMessage = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly x Frequency = ...;
};
interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... };
interface org.freedesktop.DBus.Properties { ... };
};
</programlisting>
<!--method SetRuntimeNTPServers is not documented!-->
<!--property LinkNTPServers is not documented!-->
<!--property SystemNTPServers is not documented!-->
<!--property RuntimeNTPServers is not documented!-->
<!--property FallbackNTPServers is not documented!-->
<!--property ServerName is not documented!-->
<!--property ServerAddress is not documented!-->
<!--property RootDistanceMaxUSec is not documented!-->
<!--property PollIntervalMinUSec is not documented!-->
<!--property PollIntervalMaxUSec is not documented!-->
<!--property PollIntervalUSec is not documented!-->
<!--property NTPMessage is not documented!-->
<!--property Frequency is not documented!-->
<!--Autogenerated cross-references for systemd.directives, do not edit-->
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.timesync1.Manager"/>
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.timesync1.Manager"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetRuntimeNTPServers()"/>
<variablelist class="dbus-property" generated="True" extra-ref="LinkNTPServers"/>
<variablelist class="dbus-property" generated="True" extra-ref="SystemNTPServers"/>
<variablelist class="dbus-property" generated="True" extra-ref="RuntimeNTPServers"/>
<variablelist class="dbus-property" generated="True" extra-ref="FallbackNTPServers"/>
<variablelist class="dbus-property" generated="True" extra-ref="ServerName"/>
<variablelist class="dbus-property" generated="True" extra-ref="ServerAddress"/>
<variablelist class="dbus-property" generated="True" extra-ref="RootDistanceMaxUSec"/>
<variablelist class="dbus-property" generated="True" extra-ref="PollIntervalMinUSec"/>
<variablelist class="dbus-property" generated="True" extra-ref="PollIntervalMaxUSec"/>
<variablelist class="dbus-property" generated="True" extra-ref="PollIntervalUSec"/>
<variablelist class="dbus-property" generated="True" extra-ref="NTPMessage"/>
<variablelist class="dbus-property" generated="True" extra-ref="Frequency"/>
<!--End of Autogenerated section-->
<para>
Provides information about the manager.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<example>
<title>Introspect <interfacename>org.freedesktop.timesync1.Manager</interfacename> on the bus</title>
<programlisting>
$ gdbus introspect --system \
--dest org.freedesktop.timesync1 \
--object-path /org/freedesktop/timesync1
</programlisting>
</example>
</refsect1>
<xi:include href="org.freedesktop.locale1.xml" xpointer="versioning"/>
</refentry>

View File

@ -325,6 +325,42 @@
<xi:include href="version-info.xml" xpointer="v249"/></listitem> <xi:include href="version-info.xml" xpointer="v249"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>RELEASE_TYPE=</varname></term>
<listitem><para>A lower-case string (no spaces or other characters outside of 0-9, a-z, ".",
"_", and "-"), describing what kind of release this version of the OS is. Known values follow:
</para>
<itemizedlist>
<listitem><para><literal>stable</literal> is for normal releases of the system, suitable for
production use. Generally, stable releases become end-of-life soon after the next major stable
release is out, although this might not be the case if, for example, a distribution adopts a
rolling release model and still be production ready. Examples include Fedora 40, Ubuntu 23.10,
OpenSUSE Tumbleweed, and Arch Linux.</para></listitem>
<listitem><para><literal>lts</literal> is for long term support releases of the system, suitable
for production use and supported for an extended period of time. Generally, LTS releases
continue to receive support even if newer major releases of the distribution are available.
Examples include Ubuntu 24.04, Debian 12 Bookworm and RHEL 9.4.</para></listitem>
<listitem><para><literal>development</literal> is for unstable versions of the system,
unsuitable for production use, such as alpha, beta, or rolling unstable releases. Examples
include Fedora Rawhide, Debian Testing, Fedora 40 Beta, and GNOME OS Nightly.</para></listitem>
<listitem><para><literal>experiment</literal> is for experimental builds of the system, created
specifically to test some work-in-progress feature. This is meant to be used in combination with
<varname>EXPERIMENT=</varname>.</para></listitem>
</itemizedlist>
<para>If unset, or an unknown value, assume that the release is <literal>stable</literal>.</para>
<para>Examples: <literal>RELEASE_TYPE=development</literal>, <literal>RELEASE_TYPE=lts</literal>.
</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
<para>To summarize: if the image updates are built and shipped as comprehensive units, <para>To summarize: if the image updates are built and shipped as comprehensive units,
@ -443,6 +479,47 @@
<xi:include href="version-info.xml" xpointer="v254"/></listitem> <xi:include href="version-info.xml" xpointer="v254"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>EXPERIMENT=</varname></term>
<listitem><para>A human-presentable description of what makes this build of the OS experimental.
This field is optional. The <varname>RELEASE_TYPE</varname> field should be set to <literal>experiment</literal>
if this field is set, otherwise clients should ignore this field.</para>
<para>This description is intended to be exposed at system installation time, or in "About this system" UIs,
to warn the user that they're installing/running an experimental build of the OS. If <varname>RELEASE_TYPE</varname>
is <literal>experiment</literal> but this field is unset, the UI should still warn the user, but it
will be unable to explain what exactly is experimental about the current build of the OS.</para>
<para>Examples: <literal>EXPERIMENT="Switch to DNF5"</literal> for an experimental build of Fedora
Linux made to test DNF5, <literal>EXPERIMENT="Port to Apple M3 chip"</literal> for experimental
builds of Asahi Linux ported to the Apple M3 SoC,
<literal>EXPERIMENT="Mutter !1441: Dynamic triple/double buffering (v4)"</literal> for builds of GNOME
OS created by Mutter's CI for merge request !1441.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>EXPERIMENT_URL=</varname></term>
<listitem><para>The main informational page about what makes the current OS build experimental, where users
can learn more about the experiment's status and potentially leave feedback. This field is optional. The
<varname>EXPERIMENT=</varname> field should be set if this one is, although clients must be robust against
either field not being set.</para>
<para>The value should be in <ulink
url="https://tools.ietf.org/html/rfc3986">RFC3986 format</ulink>, and should be
<literal>http:</literal> or <literal>https:</literal> URLs. Only one URL shall be listed in the
setting.</para>
<para>Examples, corresponding to the examples above in <varname>EXPERIMENT=</varname>:
<literal>EXPERIMENT_URL="https://fedoraproject.org/wiki/Changes/SwitchToDnf5"</literal>,
<literal>EXPERIMENT_URL="https://github.com/AsahiLinux/docs/wiki/M3-Series-Feature-Support"</literal>,
<literal>EXPERIMENT_URL="https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441"</literal>.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect2> </refsect2>

View File

@ -155,7 +155,8 @@
<listitem><para>Takes a string argument which sets the session type. The <varname>XDG_SESSION_TYPE</varname> <listitem><para>Takes a string argument which sets the session type. The <varname>XDG_SESSION_TYPE</varname>
environment variable (see below) takes precedence. One of <literal>unspecified</literal>, environment variable (see below) takes precedence. One of <literal>unspecified</literal>,
<literal>tty</literal>, <literal>x11</literal>, <literal>wayland</literal> or <literal>mir</literal>. See <literal>tty</literal>, <literal>x11</literal>, <literal>wayland</literal>, <literal>mir</literal>, or
<literal>web</literal>. See
<citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry> for <citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry> for
details about the session type.</para> details about the session type.</para>
@ -267,6 +268,21 @@
<xi:include href="version-info.xml" xpointer="v245"/></listitem> <xi:include href="version-info.xml" xpointer="v245"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>$SHELL_PROMPT_PREFIX</varname></term>
<term><varname>$SHELL_PROMPT_SUFFIX</varname></term>
<term><varname>$SHELL_WELCOME</varname></term>
<listitem><para>These environment variables are initialized from the service credentials
<literal>shell.prompt.prefix</literal>, <literal>shell.prompt.suffix</literal> and
<literal>shell.welcome</literal> if set. They are passed to the invoked session processes, where they
are imported into any shell prompt (specifically <varname>$SHELL_PROMPT_PREFIX</varname> is added as
prefix to <varname>$PS1</varname>, and <varname>$SHELL_PROMPT_SUFFIX</varname> as suffix) or printed
on screen when a shell first initializes.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
<para>The following environment variables are read by the module and may be used by the PAM service to pass <para>The following environment variables are read by the module and may be used by the PAM service to pass

View File

@ -76,16 +76,7 @@
<term><varname>Type=</varname></term> <term><varname>Type=</varname></term>
<listitem><para>The GPT partition type UUID to match. This may be a GPT partition type UUID such as <listitem><para>The GPT partition type UUID to match. This may be a GPT partition type UUID such as
<constant>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</constant>, or an identifier. <constant>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</constant>, or an identifier.</para>
Architecture specific partition types can use one of these architecture identifiers:
<constant>alpha</constant>, <constant>arc</constant>, <constant>arm</constant> (32-bit),
<constant>arm64</constant> (64-bit, aka aarch64), <constant>ia64</constant>,
<constant>loongarch64</constant>, <constant>mips-le</constant>, <constant>mips64-le</constant>,
<constant>parisc</constant>, <constant>ppc</constant>, <constant>ppc64</constant>,
<constant>ppc64-le</constant>, <constant>riscv32</constant>, <constant>riscv64</constant>,
<constant>s390</constant>, <constant>s390x</constant>, <constant>tilegx</constant>,
<constant>x86</constant> (32-bit, aka i386) and <constant>x86-64</constant> (64-bit, aka amd64).
</para>
<para>The supported identifiers are:</para> <para>The supported identifiers are:</para>
@ -237,7 +228,14 @@
</tgroup> </tgroup>
</table> </table>
<para>This setting defaults to <constant>linux-generic</constant>.</para> <para>Architecture specific partition types can use one of these architecture identifiers:
<constant>alpha</constant>, <constant>arc</constant>, <constant>arm</constant> (32-bit),
<constant>arm64</constant> (64-bit, aka aarch64), <constant>ia64</constant>,
<constant>loongarch64</constant>, <constant>mips-le</constant>, <constant>mips64-le</constant>,
<constant>parisc</constant>, <constant>ppc</constant>, <constant>ppc64</constant>,
<constant>ppc64-le</constant>, <constant>riscv32</constant>, <constant>riscv64</constant>,
<constant>s390</constant>, <constant>s390x</constant>, <constant>tilegx</constant>,
<constant>x86</constant> (32-bit, aka i386) and <constant>x86-64</constant> (64-bit, aka amd64).</para>
<para>Most of the partition type UUIDs listed above are defined in the <ulink <para>Most of the partition type UUIDs listed above are defined in the <ulink
url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable Partitions url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable Partitions
@ -485,18 +483,18 @@
<term><varname>ExcludeFiles=</varname></term> <term><varname>ExcludeFiles=</varname></term>
<term><varname>ExcludeFilesTarget=</varname></term> <term><varname>ExcludeFilesTarget=</varname></term>
<listitem><para>Takes an absolute file system path referring to a source file or directory on the <listitem><para>Takes one or more absolute paths, separated by whitespace, each referring to a
host. This setting may be used to exclude files or directories from the host from being copied into source file or directory on the host. This setting may be used to exclude files or directories from
the file system when <varname>CopyFiles=</varname> is used. This option may be used multiple times to the host from being copied into the file system when <varname>CopyFiles=</varname> is used. This
exclude multiple files or directories from host from being copied into the newly formatted file option may be used multiple times to exclude multiple files or directories from host from being
system.</para> copied into the newly formatted file system.</para>
<para>If the path is a directory and ends with <literal>/</literal>, only the directory's <para>If the path is a directory and ends with <literal>/</literal>, only the directory's
contents are excluded but not the directory itself. If the path is a directory and does not end with contents are excluded but not the directory itself. If the path is a directory and does not end with
<literal>/</literal>, both the directory and its contents are excluded.</para> <literal>/</literal>, both the directory and its contents are excluded.</para>
<para><varname>ExcludeFilesTarget=</varname> is like <varname>ExcludeFiles=</varname> except that <para><varname>ExcludeFilesTarget=</varname> is like <varname>ExcludeFiles=</varname> except that
instead of excluding the path on the host from being copied into the partition, we exclude any files instead of excluding the path on the host from being copied into the partition, it exclude any files
and directories from being copied into the given path in the partition.</para> and directories from being copied into the given path in the partition.</para>
<para>When <para>When
@ -537,19 +535,65 @@
<xi:include href="version-info.xml" xpointer="v249"/></listitem> <xi:include href="version-info.xml" xpointer="v249"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>MakeSymlinks=</varname></term>
<listitem><para>Takes one or more arguments, separated by whitespace, each declaring a symlink to
create within the new file system. Each argument is a pair of symlink source and target paths,
separated by a colon. This option may be used more than once to create multiple symlinks. When
<varname>CopyFiles=</varname> and <varname>MakeSymlinks=</varname> are used together the former is
applied first.</para>
<para>The primary use case for this option is to create symlinks that need to exist before
<citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>
is executed. For example, when using
<citerefentry><refentrytitle>systemd-confext</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
this setting can be used to create symlinks in <filename>/var/lib/extensions.mutable</filename> to
redirect writes to mutable confexts to a custom location.</para>
<para>Consider using
<citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>
with its <option>--image=</option> option to pre-create other symlinks (as well as other inodes) with
fine-grained control of ownership, access modes and other file attributes.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>Subvolumes=</varname></term> <term><varname>Subvolumes=</varname></term>
<listitem><para>Takes one or more absolute paths, separated by whitespace, each declaring a directory <listitem><para>Takes one or more absolute paths, separated by whitespace, each declaring a directory
that should be a subvolume within the new file system. This option may be used more than once to that should be a subvolume within the new file system. Each path may optionally be followed by a
specify multiple directories. Note that this setting does not create the directories themselves, that colon and a list of comma-separated subvolume flags. The following flags are understood:</para>
can be configured with <varname>MakeDirectories=</varname> and <varname>CopyFiles=</varname>.</para>
<table class='flags'>
<title>Subvolume Flags</title>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname="spec" />
<colspec colname="purpose" />
<thead>
<row>
<entry>Flag</entry>
<entry>Purpose</entry>
</row>
</thead>
<tbody>
<row id='R'>
<entry><literal>ro</literal></entry>
<entry>Make this subvolume read-only.</entry>
</row>
</tbody>
</tgroup>
</table>
<para>Note that this option does not create the directories themselves, that can be configured with
<varname>MakeDirectories=</varname> and <varname>CopyFiles=</varname>.</para>
<para>Note that this option only takes effect if the target filesystem supports subvolumes, such as <para>Note that this option only takes effect if the target filesystem supports subvolumes, such as
<literal>btrfs</literal>.</para> <literal>btrfs</literal>.</para>
<para>Note that due to limitations of <literal>mkfs.btrfs</literal>, this option is only supported <para>Note that this option is only supported in combination with <option>--offline=yes</option>
when running with <option>--offline=no</option>.</para> since btrfs-progs 6.11 or newer.</para>
<xi:include href="version-info.xml" xpointer="v255"/></listitem> <xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry> </varlistentry>
@ -564,8 +608,8 @@
<para>Note that this option only takes effect if the target filesystem supports subvolumes, such as <para>Note that this option only takes effect if the target filesystem supports subvolumes, such as
<literal>btrfs</literal>.</para> <literal>btrfs</literal>.</para>
<para>Note that due to limitations of <literal>mkfs.btrfs</literal>, this option is only supported <para>Note that this option is only supported in combination with <option>--offline=yes</option>
when running with <option>--offline=no</option>.</para> since btrfs-progs 6.11 or newer.</para>
<xi:include href="version-info.xml" xpointer="v256"/></listitem> <xi:include href="version-info.xml" xpointer="v256"/></listitem>
</varlistentry> </varlistentry>
@ -710,7 +754,7 @@
<citerefentry <citerefentry
project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para> project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
<para>If both bit 50 and 59 are set for a partition (i.e. the partition is marked both read-only and <para>If both bit 60 and 59 are set for a partition (i.e. the partition is marked both read-only and
marked for file system growing) the latter is typically without effect: the read-only flag takes marked for file system growing) the latter is typically without effect: the read-only flag takes
precedence in most tools reading these flags, and since growing the file system involves writing to precedence in most tools reading these flags, and since growing the file system involves writing to
the partition it is consequently ignored.</para> the partition it is consequently ignored.</para>
@ -789,6 +833,121 @@
<xi:include href="version-info.xml" xpointer="v256"/></listitem> <xi:include href="version-info.xml" xpointer="v256"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>Compression=</varname></term>
<listitem><para>Specify the compression algorithm to use for the filesystem configured with
<varname>Format=</varname>. Takes a single argument specifying the compression algorithm.</para>
<para>Note that this setting is only taken into account when the filesystem configured with
<varname>Format=</varname> supports compression (btrfs, squashfs, erofs). Here's an incomplete list
of compression algorithms supported by the filesystems known to
<command>systemd-repart</command>:</para>
<table>
<title>File System Compression Algorithms</title>
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
<colspec colname="filesystem" />
<colspec colname="algorithms" />
<colspec colname="manpage" />
<thead>
<row>
<entry>File System</entry>
<entry>Compression Algorithms</entry>
<entry>Documentation</entry>
</row>
</thead>
<tbody>
<row>
<entry><constant>squashfs</constant></entry>
<entry>gzip, lzo, lz4, xz, zstd, lzma</entry>
<entry><member><citerefentry project='man-pages'><refentrytitle>mksquashfs</refentrytitle><manvolnum>1</manvolnum></citerefentry></member></entry>
</row>
<row>
<entry><constant>erofs</constant></entry>
<entry>lz4, lz4hc, lzma, deflate, libdeflate, zstd</entry>
<entry><member><citerefentry project='man-pages'><refentrytitle>mkfs.erofs</refentrytitle><manvolnum>1</manvolnum></citerefentry></member></entry>
</row>
</tbody>
</tgroup>
</table>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>CompressionLevel=</varname></term>
<listitem><para>Specify the compression level to use for the filesystem configured with
<varname>Format=</varname>. Takes a single argument specifying the compression level to use for the
configured compression algorithm. The possible compression levels and their meaning are filesystem
specific (refer to the filesystem's documentation for the exact meaning of a particular compression
level).</para>
<para>Note that this setting is only taken into account when the filesystem configured with
<varname>Format=</varname> supports compression and the <varname>Compression=</varname> setting is
configured explicitly.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>SupplementFor=</varname></term>
<listitem><para>Takes a partition definition name, such as <literal>10-esp</literal>. If specified,
<command>systemd-repart</command> will avoid creating this partition and instead prefer to partially
merge the two definitions. However, depending on the existing layout of partitions on disk,
<command>systemd-repart</command> may be forced to fall back onto un-merging the definitions and
using them as originally written, potentially creating this partition. Specifically,
<command>systemd-repart</command> will fall back if this partition is found to already exist on disk,
or if the target partition already exists on disk but is too small, or if it cannot allocate space
for the merged partition for some other reason.</para>
<para>The following fields are merged into the target definition in the specified ways:
<varname>Weight=</varname> and <varname>PaddingWeight=</varname> are simply overwritten;
<varname>SizeMinBytes=</varname> and <varname>PaddingMinBytes=</varname> use the larger of the two
values; <varname>SizeMaxBytes=</varname> and <varname>PaddingMaxBytes=</varname> use the smaller
value; and <varname>CopyFiles=</varname>, <varname>ExcludeFiles=</varname>,
<varname>ExcludeFilesTarget=</varname>, <varname>MakeDirectories=</varname>, and
<varname>Subvolumes=</varname> are concatenated.</para>
<para>Usage of this option in combination with <varname>CopyBlocks=</varname>,
<varname>Encrypt=</varname>, or <varname>Verity=</varname> is not supported. The target definition
cannot set these settings either. A definition cannot simultaneously be a supplement and act as a
target for some other supplement definition. A target cannot have more than one supplement partition
associated with it.</para>
<para>For example, distributions can use this to implement <varname>$BOOT</varname> as defined in
the <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification/">Boot Loader
Specification</ulink>. Distributions may prefer to use the ESP as <varname>$BOOT</varname> whenever
possible, but to adhere to the spec XBOOTLDR must sometimes be used instead. So, they should create
two definitions: the first defining an ESP big enough to hold just the bootloader, and a second for
the XBOOTLDR that's sufficiently large to hold kernels and configured as a supplement for the ESP.
Whenever possible, <command>systemd-repart</command> will try to merge the two definitions to create
one large ESP, but if that's not allowable due to the existing conditions on disk a small ESP and a
large XBOOTLDR will be created instead.</para>
<para>As another example, distributions can also use this to seamlessly share a single
<filename>/home</filename> partition in a multi-boot scenario, while preferring to keep
<filename>/home</filename> on the root partition by default. Having a <filename>/home</filename>
partition separated from the root partition entails some extra complexity: someone has to decide how
to split the space between the two partitions. On the other hand, it allows a user to share their
home area between multiple installed OSs (i.e. via <citerefentry><refentrytitle>systemd-homed.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>). Distributions should create two definitions:
the first for a root partition that takes up some relatively small percentage of the disk, and the
second as a supplement for the first to create a <filename>/home</filename> partition that takes up
all the remaining free space. On first boot, if <command>systemd-repart</command> finds an existing
<filename>/home</filename> partition on disk, it'll un-merge the definitions and create just a small
root partition. Otherwise, the definitions will be merged and a single large root partition will be
created.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>

View File

@ -495,6 +495,7 @@
<xi:include href="version-info.xml" xpointer="v256"/></listitem> <xi:include href="version-info.xml" xpointer="v256"/></listitem>
</varlistentry> </varlistentry>
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="json" /> <xi:include href="standard-options.xml" xpointer="json" />
<xi:include href="standard-options.xml" xpointer="j" /> <xi:include href="standard-options.xml" xpointer="j" />
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />
@ -569,10 +570,19 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><option>-m</option></term>
<term><option>-p</option></term> <term><option>-p</option></term>
<listitem><para>These switches are not supported and are silently ignored.</para> <listitem><para>When specified, the interface will not be used as the default route. See also
<citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
about the default route.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><option>-m</option></term>
<listitem><para>The switch is not supported and is silently ignored.</para>
<xi:include href="version-info.xml" xpointer="v239"/></listitem> <xi:include href="version-info.xml" xpointer="v239"/></listitem>
</varlistentry> </varlistentry>

View File

@ -65,7 +65,9 @@ manpages = [
['org.freedesktop.portable1', '5', [], 'ENABLE_PORTABLED'], ['org.freedesktop.portable1', '5', [], 'ENABLE_PORTABLED'],
['org.freedesktop.resolve1', '5', [], 'ENABLE_RESOLVE'], ['org.freedesktop.resolve1', '5', [], 'ENABLE_RESOLVE'],
['org.freedesktop.systemd1', '5', [], ''], ['org.freedesktop.systemd1', '5', [], ''],
['org.freedesktop.sysupdate1', '5', [], 'ENABLE_SYSUPDATE'],
['org.freedesktop.timedate1', '5', [], 'ENABLE_TIMEDATED'], ['org.freedesktop.timedate1', '5', [], 'ENABLE_TIMEDATED'],
['org.freedesktop.timesync1', '5', [], 'ENABLE_TIMESYNCD'],
['os-release', '5', ['extension-release', 'initrd-release'], ''], ['os-release', '5', ['extension-release', 'initrd-release'], ''],
['pam_systemd', '8', [], 'HAVE_PAM'], ['pam_systemd', '8', [], 'HAVE_PAM'],
['pam_systemd_home', '8', [], 'ENABLE_PAM_HOME'], ['pam_systemd_home', '8', [], 'ENABLE_PAM_HOME'],
@ -523,12 +525,14 @@ manpages = [
['sd_bus_wait', '3', [], ''], ['sd_bus_wait', '3', [], ''],
['sd_device_get_syspath', ['sd_device_get_syspath',
'3', '3',
['sd_device_get_devname', ['sd_device_get_device_id',
'sd_device_get_devname',
'sd_device_get_devnum', 'sd_device_get_devnum',
'sd_device_get_devpath', 'sd_device_get_devpath',
'sd_device_get_devtype', 'sd_device_get_devtype',
'sd_device_get_diskseq', 'sd_device_get_diskseq',
'sd_device_get_driver', 'sd_device_get_driver',
'sd_device_get_driver_subsystem',
'sd_device_get_ifindex', 'sd_device_get_ifindex',
'sd_device_get_subsystem', 'sd_device_get_subsystem',
'sd_device_get_sysname', 'sd_device_get_sysname',
@ -1100,6 +1104,10 @@ manpages = [
'systemd-sysupdate.service', 'systemd-sysupdate.service',
'systemd-sysupdate.timer'], 'systemd-sysupdate.timer'],
'ENABLE_SYSUPDATE'], 'ENABLE_SYSUPDATE'],
['systemd-sysupdated.service',
'8',
['systemd-sysupdated'],
'ENABLE_SYSUPDATE'],
['systemd-sysusers', '8', ['systemd-sysusers.service'], ''], ['systemd-sysusers', '8', ['systemd-sysusers.service'], ''],
['systemd-sysv-generator', '8', [], 'HAVE_SYSV_COMPAT'], ['systemd-sysv-generator', '8', [], 'HAVE_SYSV_COMPAT'],
['systemd-time-wait-sync.service', ['systemd-time-wait-sync.service',
@ -1277,6 +1285,7 @@ manpages = [
['udev_new', '3', ['udev_ref', 'udev_unref'], ''], ['udev_new', '3', ['udev_ref', 'udev_unref'], ''],
['udevadm', '8', [], ''], ['udevadm', '8', [], ''],
['ukify', '1', [], 'ENABLE_UKIFY'], ['ukify', '1', [], 'ENABLE_UKIFY'],
['updatectl', '1', [], 'ENABLE_SYSUPDATE'],
['user@.service', ['user@.service',
'5', '5',
['systemd-user-runtime-dir', 'user-runtime-dir@.service'], ['systemd-user-runtime-dir', 'user-runtime-dir@.service'],

View File

@ -70,14 +70,6 @@
<para>The following options are understood:</para> <para>The following options are understood:</para>
<variablelist> <variablelist>
<varlistentry>
<term><option>--no-ask-password</option></term>
<listitem><para>Do not query the user for authentication for privileged operations.</para>
<xi:include href="version-info.xml" xpointer="v256"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--unit=</option></term> <term><option>--unit=</option></term>
@ -210,6 +202,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
</variablelist> </variablelist>

View File

@ -49,7 +49,9 @@
signatures (D-Bus type <literal>ag</literal>). On success, a pointer to a signatures (D-Bus type <literal>ag</literal>). On success, a pointer to a
<constant>NULL</constant>-terminated array of strings (strv) is returned in the output parameter <constant>NULL</constant>-terminated array of strings (strv) is returned in the output parameter
<parameter>l</parameter>. Note that ownership of this array is transferred to the caller. Hence, the <parameter>l</parameter>. Note that ownership of this array is transferred to the caller. Hence, the
caller is responsible for freeing this array and its contents.</para> caller is responsible for freeing this array and its contents. Also note that as a matter of
optimization, if an empty array is encountered a <constant>NULL</constant> pointer might be returned
here, and should be considered equivalent to an array with zero entries.</para>
<para><function>sd_bus_message_read_strv_extend()</function> is similar, but the second parameter is an <para><function>sd_bus_message_read_strv_extend()</function> is similar, but the second parameter is an
input-output parameter. If <parameter>*l</parameter> is <constant>NULL</constant>, if behaves identically input-output parameter. If <parameter>*l</parameter> is <constant>NULL</constant>, if behaves identically

View File

@ -52,12 +52,24 @@
<citerefentry><refentrytitle>sd_bus_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>. <citerefentry><refentrytitle>sd_bus_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para> </para>
<para><function>sd_bus_process()</function> processes at most one incoming message per call. If the parameter <para><function>sd_bus_process()</function> processes at most one incoming message per call. If the
<parameter>ret</parameter> is not <constant>NULL</constant> and the call processed a message, parameter <parameter>ret</parameter> is not <constant>NULL</constant> and the call processed a message,
<parameter>*ret</parameter> is set to this message. The caller owns a reference to this message and should call <parameter>*ret</parameter> is set to this message. The caller owns a reference to this message and
<citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> when the should call
message is no longer needed. If <parameter>ret</parameter> is not <constant>NULL</constant>, progress was made, but no message was <citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
processed, <parameter>*ret</parameter> is set to <constant>NULL</constant>.</para> when the message is no longer needed. If <parameter>ret</parameter> is not <constant>NULL</constant> and
progress was made, but no message was processed, <parameter>*ret</parameter> is set to
<constant>NULL</constant>. Note that only messages not already handled by the various types of registered
message handlers (i.e. by filters registered via
<citerefentry><refentrytitle>sd_bus_add_filter</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
object handlers registered via
<citerefentry><refentrytitle>sd_bus_add_object</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
matches registered via
<citerefentry><refentrytitle>sd_bus_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
and related) will be returned through this parameter. Also note that if such a message handler returns a
zero return value (as opposed to some value &gt; 0) an incoming message will not be considered handled,
and be passed to other suitable handlers (until one returns &gt; > 0), or returned by
<function>sd_bus_process()</function> (in case none returns &gt; 0).</para>
<para>If the bus object is connected to an <para>If the bus object is connected to an
<citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry> event loop (with <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry> event loop (with

View File

@ -22,12 +22,14 @@
<refname>sd_device_get_sysname</refname> <refname>sd_device_get_sysname</refname>
<refname>sd_device_get_sysnum</refname> <refname>sd_device_get_sysnum</refname>
<refname>sd_device_get_subsystem</refname> <refname>sd_device_get_subsystem</refname>
<refname>sd_device_get_driver_subsystem</refname>
<refname>sd_device_get_devtype</refname> <refname>sd_device_get_devtype</refname>
<refname>sd_device_get_devname</refname> <refname>sd_device_get_devname</refname>
<refname>sd_device_get_devnum</refname> <refname>sd_device_get_devnum</refname>
<refname>sd_device_get_ifindex</refname> <refname>sd_device_get_ifindex</refname>
<refname>sd_device_get_driver</refname> <refname>sd_device_get_driver</refname>
<refname>sd_device_get_diskseq</refname> <refname>sd_device_get_diskseq</refname>
<refname>sd_device_get_device_id</refname>
<refpurpose>Returns various fields of device objects</refpurpose> <refpurpose>Returns various fields of device objects</refpurpose>
</refnamediv> </refnamediv>
@ -66,6 +68,12 @@
<paramdef>const char **<parameter>ret</parameter></paramdef> <paramdef>const char **<parameter>ret</parameter></paramdef>
</funcprototype> </funcprototype>
<funcprototype>
<funcdef>int <function>sd_device_get_driver_subsystem</function></funcdef>
<paramdef>sd_device *<parameter>device</parameter></paramdef>
<paramdef>const char **<parameter>ret</parameter></paramdef>
</funcprototype>
<funcprototype> <funcprototype>
<funcdef>int <function>sd_device_get_devtype</function></funcdef> <funcdef>int <function>sd_device_get_devtype</function></funcdef>
<paramdef>sd_device *<parameter>device</parameter></paramdef> <paramdef>sd_device *<parameter>device</parameter></paramdef>
@ -102,6 +110,12 @@
<paramdef>uint64_t *<parameter>ret</parameter></paramdef> <paramdef>uint64_t *<parameter>ret</parameter></paramdef>
</funcprototype> </funcprototype>
<funcprototype>
<funcdef>int <function>sd_device_get_device_id</function></funcdef>
<paramdef>sd_device *<parameter>device</parameter></paramdef>
<paramdef>uint64_t *<parameter>ret</parameter></paramdef>
</funcprototype>
</funcsynopsis> </funcsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
@ -126,6 +140,13 @@
record. This is a short string fitting into a filename, and thus does not contain a slash and cannot be record. This is a short string fitting into a filename, and thus does not contain a slash and cannot be
empty. Example: <literal>tty</literal>, <literal>block</literal> or <literal>net</literal>.</para> empty. Example: <literal>tty</literal>, <literal>block</literal> or <literal>net</literal>.</para>
<para><function>sd_device_get_driver_subsystem()</function> returns the connected bus type of the devices
loaded by the specified driver device record. For example, when <literal>iwlwifi</literal> driver device
is specified, which is used by the wireless network interfaces connected to PCI bus, this function returns
<literal>pci</literal>. This function only succeeds when <function>sd_device_get_subsystem()</function>
returns <literal>drivers</literal>. Example: <literal>pci</literal>, <literal>i2c</literal>, or
<literal>hid</literal>.</para>
<para><function>sd_device_get_devtype()</function> returns the device type of the specified device <para><function>sd_device_get_devtype()</function> returns the device type of the specified device
record, if the subsystem manages multiple types of devices. Example: for devices of the record, if the subsystem manages multiple types of devices. Example: for devices of the
<literal>block</literal> subsystem this can be <literal>disk</literal> or <literal>partition</literal> <literal>block</literal> subsystem this can be <literal>disk</literal> or <literal>partition</literal>
@ -157,6 +178,22 @@
the device name changing, and is relevant for block devices encapsulating devices with changing media the device name changing, and is relevant for block devices encapsulating devices with changing media
(e.g. floppy or CD-ROM), or loopback block devices. Only defined for block devices, i.e. those of (e.g. floppy or CD-ROM), or loopback block devices. Only defined for block devices, i.e. those of
subsystem <literal>block</literal>.</para> subsystem <literal>block</literal>.</para>
<para><function>sd_device_get_device_id()</function> returns the short string that identifies the device
record. When the device ID obtained by the function for a specified device record is passed to
<function>sd_device_new_from_device_id()</function>, a new instance of the same device record will be
gained. When a block or character device is specified, which has corresponding device node, this returns
<literal>b</literal> or <literal>c</literal>, respectively, followed by the device node major and minor
numbers separated with a colon. Example: <literal>b259:1</literal> or <literal>c10:121</literal>. When a
network interface device is specified, this returns <literal>n</literal> followed by the interface index,
which can be obtained by <function>sd_device_get_ifindex()</function>. Example: <literal>n1</literal>.
When a device in the <literal>driver</literal> subsystem is specified, this returns
<literal>+drivers:</literal> followed by its driver subsystem and sysfs name separated with a colon.
Example: <literal>+drivers:pci:iwlwifi</literal> for a driver device record whose driver subsystem is
<literal>pci</literal> and sysfs name is <literal>iwlwifi</literal>,
When an other type of device is specified, this function returns <literal>+</literal> followed by its
subsystem and sysfs name separated with a colon. Example: <literal>+acpi:ACPI0003:00</literal>,
<literal>+input:input16</literal>, or <literal>+pci:0000:00:1f.6</literal>.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -206,6 +243,8 @@
<function>sd_device_get_ifindex()</function>, <function>sd_device_get_ifindex()</function>,
<function>sd_device_get_driver()</function>, and <function>sd_device_get_driver()</function>, and
<function>sd_device_get_diskseq()</function> were added in version 251.</para> <function>sd_device_get_diskseq()</function> were added in version 251.</para>
<para><function>sd_device_get_driver_subsystem()</function> and
<function>sd_device_get_device_id()</function> were added in version 257.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -291,7 +291,8 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<literal>inactive</literal> or <literal>maintenance</literal> is a white circle ("○"), <literal>inactive</literal> or <literal>maintenance</literal> is a white circle ("○"),
<literal>active</literal> is a green dot ("●"), <literal>deactivating</literal> is a white dot, <literal>active</literal> is a green dot ("●"), <literal>deactivating</literal> is a white dot,
<literal>failed</literal> or <literal>error</literal> is a red cross ("×"), and <literal>failed</literal> or <literal>error</literal> is a red cross ("×"), and
<literal>reloading</literal> is a green clockwise circle arrow ("↻").</para> <literal>reloading</literal> or <literal>refreshing</literal> is a green clockwise circle arrow
("↻").</para>
<para>The "Loaded:" line in the output will show <literal>loaded</literal> if the unit has been <para>The "Loaded:" line in the output will show <literal>loaded</literal> if the unit has been
loaded into memory. Other possible values for "Loaded:" include: <literal>error</literal> if loaded into memory. Other possible values for "Loaded:" include: <literal>error</literal> if
@ -973,6 +974,11 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
enabled with to the defaults configured in its [Install] section. This command expects enabled with to the defaults configured in its [Install] section. This command expects
a unit name only, it does not accept paths to unit files.</para> a unit name only, it does not accept paths to unit files.</para>
<para>This command implicitly reloads the system manager configuration after completing the operation.
Note that this command does not implicitly restart the units that are being disabled. If this is
desired, either combine this command with the <option>--now</option> switch, or invoke
the <command>try-restart</command> command with appropriate arguments later.</para>
<xi:include href="version-info.xml" xpointer="v238"/> <xi:include href="version-info.xml" xpointer="v238"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -2283,17 +2289,15 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<listitem> <listitem>
<para>When system shutdown or sleep state is requested, this option controls checking of inhibitor <para>When system shutdown or sleep state is requested, this option controls checking of inhibitor
locks. It takes one of <literal>auto</literal>, <literal>yes</literal> or locks. It takes one of <literal>auto</literal>, <literal>yes</literal> or
<literal>no</literal>. Defaults to <literal>auto</literal>, which will behave like <literal>no</literal>. Defaults to <literal>auto</literal>, which means logind will perform the
<literal>yes</literal> for interactive invocations (i.e. from a TTY) and <literal>no</literal> for check and respect active inhibitor locks, but systemctl will only do a client-side check for
non-interactive invocations. <literal>yes</literal> lets the request respect inhibitor locks. interactive invocations (i.e. from a TTY), so that a more friendly and informative error can be
<literal>no</literal> lets the request ignore inhibitor locks.</para> returned to users. <literal>no</literal> disables both the systemctl and logind checks.</para>
<para>Applications can establish inhibitor locks to prevent certain important operations (such as <para>Applications can establish inhibitor locks to prevent certain important operations (such as
CD burning) from being interrupted by system shutdown or sleep. Any user may take these locks and CD burning) from being interrupted by system shutdown or sleep. Any user may take these locks and
privileged users may override these locks. If any locks are taken, shutdown and sleep state privileged users may override these locks. If any locks are taken, shutdown and sleep state
requests will normally fail (unless privileged). However, if <literal>no</literal> is specified or requests will normally fail (unless explicitly overridden with <literal>no</literal>).</para>
<literal>auto</literal> is specified on a non-interactive requests, the operation will be
attempted. If locks are present, the operation may require additional privileges.</para>
<para>Option <option>--force</option> provides another way to override inhibitors.</para> <para>Option <option>--force</option> provides another way to override inhibitors.</para>
@ -2440,29 +2444,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<term><option>--no-reload</option></term> <term><option>--no-reload</option></term>
<listitem> <listitem>
<para>When used with <command>enable</command> and <para>When used with <command>enable</command>, <command>disable</command>, <command>preset</command>,
<command>disable</command>, do not implicitly reload daemon <command>mask</command>, or <command>unmask</command>, do not implicitly reload daemon configuration
configuration after executing the changes.</para> after executing the changes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--no-ask-password</option></term>
<listitem>
<para>When used with <command>start</command> and related
commands, disables asking for passwords. Background services
may require input of a password or passphrase string, for
example to unlock system hard disks or cryptographic
certificates. Unless this option is specified and the
command is invoked from a terminal,
<command>systemctl</command> will query the user on the
terminal for the necessary secrets. Use this option to
switch this behavior off. In this case, the password must be
supplied by some other means (for example graphical password
agents) or the service might fail. This also disables
querying the user for authentication for privileged
operations.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -2583,11 +2567,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
<term><option>--now</option></term> <term><option>--now</option></term>
<listitem> <listitem>
<para>When used with <command>enable</command>, the units <para>When used with <command>enable</command>, <command>disable</command>, <command>mask</command>,
will also be started. When used with <command>disable</command> or or <command>reenable</command>, also start/stop/try-restart the units after the specified
<command>mask</command>, the units will also be stopped. The start unit file operations succeed.</para>
or stop operation is only carried out when the respective enable or
disable operation has been successful.</para>
<xi:include href="version-info.xml" xpointer="v220"/> <xi:include href="version-info.xml" xpointer="v220"/>
</listitem> </listitem>
@ -2895,6 +2877,7 @@ EOF
<xi:include href="user-system-options.xml" xpointer="machine" /> <xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="user-system-options.xml" xpointer="capsule" /> <xi:include href="user-system-options.xml" xpointer="capsule" />
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="legend" /> <xi:include href="standard-options.xml" xpointer="legend" />
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />

View File

@ -80,7 +80,16 @@
<command>systemd-analyze</command> <command>systemd-analyze</command>
<arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain">capability</arg> <arg choice="plain">capability</arg>
<arg choice="opt" rep="repeat"><replaceable>CAPABILITY</replaceable></arg> <group choice="opt">
<arg choice="plain" rep="repeat"><replaceable>CAPABILITY</replaceable></arg>
<arg choice="plain">
<group choice="req">
<arg choice="plain">-m</arg>
<arg choice="plain">--mask</arg>
</group>
<replaceable>MASK</replaceable>
</arg>
</group>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>systemd-analyze</command> <command>systemd-analyze</command>
@ -168,6 +177,11 @@
<arg choice="plain">image-policy</arg> <arg choice="plain">image-policy</arg>
<arg choice="plain" rep="repeat"><replaceable>POLICY</replaceable></arg> <arg choice="plain" rep="repeat"><replaceable>POLICY</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis>
<command>systemd-analyze</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain">has-tpm2</arg>
</cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>systemd-analyze</command> <command>systemd-analyze</command>
<arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">OPTIONS</arg>
@ -441,7 +455,20 @@ DATAERR 65 BSD
</refsect2> </refsect2>
<refsect2> <refsect2>
<title><command>systemd-analyze capability <optional><replaceable>CAPABILITY</replaceable>...</optional></command></title> <title>
<command>systemd-analyze capability
<group choice="opt">
<arg choice="plain" rep="repeat"><replaceable>CAPABILITY</replaceable></arg>
<arg choice="plain">
<group choice="req">
<arg choice="plain">-m</arg>
<arg choice="plain">--mask</arg>
</group>
<replaceable>MASK</replaceable>
</arg>
</group>
</command>
</title>
<para>This command prints a list of Linux capabilities along with their numeric IDs. See <citerefentry <para>This command prints a list of Linux capabilities along with their numeric IDs. See <citerefentry
project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
@ -451,6 +478,11 @@ DATAERR 65 BSD
cabilities by name or numeric ID, in which case only the indicated capabilities are shown in the cabilities by name or numeric ID, in which case only the indicated capabilities are shown in the
table.</para> table.</para>
<para>Alternatively, if <option>--mask</option> is passed, a single numeric argument must be specified,
which is interpreted as a hexadecimal capability mask. In this case, only the capabilities present in
the mask are shown in the table. This mode is intended to aid in decoding capability sets available
via various debugging interfaces (e.g. <literal>/proc/PID/status</literal>).</para>
<example> <example>
<title><command>Show some example capability names</command></title> <title><command>Show some example capability names</command></title>
@ -462,6 +494,18 @@ cap_audit_control 30
cap_setfcap 31 cap_setfcap 31
cap_mac_override 32</programlisting> cap_mac_override 32</programlisting>
</example> </example>
<example>
<title><command>Decode a capability mask extracted from /proc</command></title>
<programlisting>$ systemd-analyze capability -m 0000000000003c00
NAME NUMBER
cap_net_bind_service 10
cap_net_broadcast 11
cap_net_admin 12
cap_net_raw 13
</programlisting>
</example>
</refsect2> </refsect2>
<refsect2> <refsect2>
@ -687,7 +731,9 @@ $ systemd-analyze compare-versions 1 ge 2; echo $?
augment the compiled in set of unit load paths; see augment the compiled in set of unit load paths; see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. All <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. All
units files present in the directories containing the command line arguments will be used in preference units files present in the directories containing the command line arguments will be used in preference
to the other paths.</para> to the other paths. If a template unit without an instance name is specified (e.g.
<filename>foo@.service</filename>), <literal>test_instance</literal> will be used as the instance
name, which can be controlled by <option>--instance=</option> option.</para>
<para>The following errors are currently detected:</para> <para>The following errors are currently detected:</para>
<itemizedlist> <itemizedlist>
@ -907,6 +953,35 @@ default ignore - -</programlisting>
</example> </example>
</refsect2> </refsect2>
<refsect2>
<title><command>systemd-analyze has-tpm2</command></title>
<para>Reports whether the system is equipped with a usable TPM2 device. If a TPM2 device has been
discovered, is supported, and is being used by firmware, by the OS kernel drivers and by userspace
(i.e. systemd) this prints <literal>yes</literal> and exits with exit status zero. If no such device is
discovered/supported/used, prints <literal>no</literal>. Otherwise prints
<literal>partial</literal>. In either of these two cases exits with non-zero exit status. It also shows
five lines indicating separately whether firmware, drivers, the system, the kernel and libraries
discovered/support/use TPM2.</para>
<para>Note, this checks for TPM 2.0 devices only, and does not consider TPM 1.2 at all.</para>
<para>Combine with <option>--quiet</option> to suppress the output.</para>
<example>
<title>Example Output</title>
<programlisting>yes
+firmware
+driver
+system
+subsystem
+libraries</programlisting>
</example>
<xi:include href="version-info.xml" xpointer="v257"/>
</refsect2>
<refsect2> <refsect2>
<title><command>systemd-analyze pcrs <optional><replaceable>PCR</replaceable></optional></command></title> <title><command>systemd-analyze pcrs <optional><replaceable>PCR</replaceable></optional></command></title>
@ -1115,6 +1190,20 @@ io.systemd.credential:vmm.notify_socket=vsock-stream:2:254570042
<xi:include href="version-info.xml" xpointer="v235"/></listitem> <xi:include href="version-info.xml" xpointer="v235"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--instance=NAME</option></term>
<listitem>
<para>Specifies fallback instance name for template units. This will be used when one or more
template units without an instance name (e.g. <filename>foo@.service</filename>) specified for
<command>systemd-analyze condition</command> with <option>--unit=</option>,
<command>systemd-analyze security</command>, and <command>systemd-analyze verify</command>.
If unspecified, <literal>test_instance</literal> will be used.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--recursive-errors=<replaceable>MODE</replaceable></option></term> <term><option>--recursive-errors=<replaceable>MODE</replaceable></option></term>
@ -1516,7 +1605,9 @@ io.systemd.credential:vmm.notify_socket=vsock-stream:2:254570042
compiled in set of unit load paths; see compiled in set of unit load paths; see
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. All <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. All
units files present in the directory containing the specified unit will be used in preference to the units files present in the directory containing the specified unit will be used in preference to the
other paths.</para> other paths. If a template unit without an instance name is specified (e.g.
<filename>foo@.service</filename>), <literal>test_instance</literal> will be used as the instance
name, which can be controlled by <option>--instance=</option> option.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem> <xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry> </varlistentry>
@ -1562,6 +1653,24 @@ io.systemd.credential:vmm.notify_socket=vsock-stream:2:254570042
<xi:include href="version-info.xml" xpointer="v255"/></listitem> <xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--scale-svg=<replaceable>FACTOR</replaceable></option></term>
<listitem><para>When used with the <command>plot</command> command, the x-axis of the plot
can be stretched by FACTOR (default: 1.0).</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--detailed</option></term>
<listitem><para>When used with the <command>plot</command> command, activation timestamps
details can be seen in SVG plot.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />
@ -1578,6 +1687,12 @@ io.systemd.credential:vmm.notify_socket=vsock-stream:2:254570042
<constant>12</constant>, <constant>0</constant>, <constant>11</constant> is returned if the second <constant>12</constant>, <constant>0</constant>, <constant>11</constant> is returned if the second
version string is respectively larger, equal, or smaller to the first. In the three-argument form, version string is respectively larger, equal, or smaller to the first. In the three-argument form,
<constant>0</constant> or <constant>1</constant> if the condition is respectively true or false.</para> <constant>0</constant> or <constant>1</constant> if the condition is respectively true or false.</para>
<para>In case of the <command>has-tpm2</command> command returns 0 if a TPM2 device is discovered,
supported and used by firmware, driver, and userspace (i.e. systemd). Otherwise returns the OR
combination of the value 1 (in case firmware support is missing), 2 (in case driver support is missing)
and 4 (in case userspace support is missing). If no TPM2 support is available at all, value 7 is hence
returned.</para>
</refsect1> </refsect1>
<xi:include href="common-variables.xml" /> <xi:include href="common-variables.xml" />

View File

@ -429,13 +429,15 @@
<varlistentry> <varlistentry>
<term><varname>LoaderDevicePartUUID</varname></term> <term><varname>LoaderDevicePartUUID</varname></term>
<listitem><para>Contains the partition UUID of the EFI System Partition the boot loader was run from. Set by <listitem><para>Contains the partition UUID of the partition the boot loader has been started from on
the boot the current boot (usually a EFI System Partition). Set by the boot loader. (Note that
loader. <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> <command>systemd-stub</command> will set this too, if not set yet, to support systems that directly
uses this information to automatically find the disk booted from, in order to discover various other partitions boot into a unified kernel image, bypassing any boot loader.)
on the same disk automatically.</para> <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
uses this information to automatically find the disk booted from, in order to discover various other
partitions on the same disk automatically.</para>
<xi:include href="version-info.xml" xpointer="v240"/></listitem> <xi:include href="version-info.xml" xpointer="v220"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -516,12 +518,15 @@
<varlistentry> <varlistentry>
<term><varname>LoaderImageIdentifier</varname></term> <term><varname>LoaderImageIdentifier</varname></term>
<listitem><para>The path of executable of the boot loader used for the current boot, relative to the EFI System <listitem><para>The file system path to the EFI executable of the boot loader for the current boot,
Partition's root directory. Set by the boot loader. Use relative to the partition's root directory (i.e. relative to the partition indicated by
<citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to view this <varname>LoaderDevicePartUUID</varname>, see above). Set by the boot loader. (Note that
data.</para> <command>systemd-stub</command> will set this too, if not set yet, to support systems that directly
boot into a unified kernel image, bypassing any boot loader.) Use
<citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to view
this data.</para>
<xi:include href="version-info.xml" xpointer="v240"/></listitem> <xi:include href="version-info.xml" xpointer="v220"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -63,7 +63,10 @@
<listitem><para>Specify a short string that is used to <listitem><para>Specify a short string that is used to
identify the logging tool. If not specified, no identification identify the logging tool. If not specified, no identification
string is written to the journal.</para></listitem> string is set for the journal entry, and the executable name
(or <literal>cat</literal> if the input is read from a pipe)
will be used to describe the log source instead.
</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -177,22 +177,6 @@
<xi:include href="version-info.xml" xpointer="v250"/></listitem> <xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><command>has-tpm2</command></term>
<listitem><para>Reports whether the system is equipped with a TPM2 device usable for protecting
credentials. If a TPM2 device has been discovered, is supported, and is being used by firmware,
by the OS kernel drivers and by userspace (i.e. systemd) this prints <literal>yes</literal> and exits
with exit status zero. If no such device is discovered/supported/used, prints
<literal>no</literal>. Otherwise prints <literal>partial</literal>. In either of these two cases
exits with non-zero exit status. It also shows four lines indicating separately whether firmware,
drivers, the system and the kernel discovered/support/use TPM2.</para>
<para>Combine with <option>--quiet</option> to suppress the output.</para>
<xi:include href="version-info.xml" xpointer="v251"/></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
</variablelist> </variablelist>
@ -445,8 +429,7 @@
<term><option>--quiet</option></term> <term><option>--quiet</option></term>
<term><option>-q</option></term> <term><option>-q</option></term>
<listitem><para>When used with <command>has-tpm2</command> suppresses the output, and only returns an <listitem><para>Suppress additional output.</para>
exit status indicating support for TPM2.</para>
<xi:include href="version-info.xml" xpointer="v251"/></listitem> <xi:include href="version-info.xml" xpointer="v251"/></listitem>
</varlistentry> </varlistentry>
@ -461,12 +444,6 @@
<title>Exit status</title> <title>Exit status</title>
<para>On success, 0 is returned.</para> <para>On success, 0 is returned.</para>
<para>In case of the <command>has-tpm2</command> command returns 0 if a TPM2 device is discovered,
supported and used by firmware, driver, and userspace (i.e. systemd). Otherwise returns the OR
combination of the value 1 (in case firmware support is missing), 2 (in case driver support is missing)
and 4 (in case userspace support is missing). If no TPM2 support is available at all, value 7 is hence
returned.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -62,7 +62,7 @@
</thead> </thead>
<tbody> <tbody>
<row> <row>
<entry valign="top" morerows="16">VM</entry> <entry valign="top" morerows="17">VM</entry>
<entry><varname>qemu</varname></entry> <entry><varname>qemu</varname></entry>
<entry>QEMU software virtualization, without KVM</entry> <entry>QEMU software virtualization, without KVM</entry>
</row> </row>
@ -217,6 +217,50 @@
WSL is categorized as a container for practical purposes. WSL is categorized as a container for practical purposes.
Multiple WSL environments share the same kernel and services Multiple WSL environments share the same kernel and services
should generally behave like when being run in a container.</para> should generally behave like when being run in a container.</para>
<para>When executed with <option>--cvm</option>, instead of
printing the virtualization technology, it will display the
confidential virtual machine technology, if any. The
following technologies are currently identified:</para>
<table>
<title>Known confidential virtualization technologies</title>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname="id" />
<colspec colname="product" />
<thead>
<row>
<entry>Arch</entry>
<entry>ID</entry>
<entry>Technology</entry>
</row>
</thead>
<tbody>
<row>
<entry valign="top" morerows="3">x86_64</entry>
<entry><varname>sev</varname></entry>
<entry>AMD Secure Encrypted Virtualization</entry>
</row>
<row>
<entry><varname>sev-es</varname></entry>
<entry>AMD Secure Encrypted Virtualization - Encrypted State</entry>
</row>
<row>
<entry><varname>sev-snp</varname></entry>
<entry>AMD Secure Encrypted Virtualization - Secure Nested Paging</entry>
</row>
<row>
<entry><varname>tdx</varname></entry>
<entry>Intel Trust Domain Extensions</entry>
</row>
<row>
<entry>s390x</entry>
<entry><varname>protvirt</varname></entry>
<entry>IBM Protected Virtualization (Secure Execution)</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -129,7 +129,12 @@
<entry><constant>4d21b016-b534-45c2-a9fb-5c16e091fd2d</constant></entry> <entry><constant>4d21b016-b534-45c2-a9fb-5c16e091fd2d</constant></entry>
<entry>Variable Data Partition</entry> <entry>Variable Data Partition</entry>
<entry><filename>/var/</filename></entry> <entry><filename>/var/</filename></entry>
<entry>The first partition with this type UUID on the same disk as the root partition is mounted to <filename>/var/</filename> — under the condition its partition UUID matches the first 128 bit of the HMAC-SHA256 of the GPT type uuid of this partition keyed by the machine ID of the installation stored in <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</entry> <entry>The first partition with this type UUID on the same disk as the root partition is mounted
to <filename>/var/</filename> — under the condition its partition UUID matches the first 128 bit
of the HMAC-SHA256 of the GPT type uuid of this partition keyed by the machine ID of the
installation stored in
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
This can be generated using <citerefentry><refentrytitle>systemd-id128</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</entry>
</row> </row>
<row> <row>
<entry><constant>SD_GPT_TMP</constant></entry> <entry><constant>SD_GPT_TMP</constant></entry>

View File

@ -45,6 +45,12 @@
<arg choice="plain">invocation-id</arg> <arg choice="plain">invocation-id</arg>
</cmdsynopsis> </cmdsynopsis>
<cmdsynopsis>
<command>systemd-id128</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="plain">var-partition-uuid</arg>
</cmdsynopsis>
<cmdsynopsis> <cmdsynopsis>
<command>systemd-id128</command> <command>systemd-id128</command>
<arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">OPTIONS</arg>
@ -88,6 +94,12 @@
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for the discussion when this is useful. Support for <command>show --app-specific=</command> was added in for the discussion when this is useful. Support for <command>show --app-specific=</command> was added in
version 255.</para> version 255.</para>
<para><command>var-partition-uuid</command> prints a UUID which, following the <ulink
url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable
Partitions Specification</ulink>, should be used as the GPT partition UUID for
<filename>/var/</filename>, being derived from the GPT partition type, keyed by the local
<filename>/etc/machine-id</filename>. Added in version 257.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -92,19 +92,17 @@
<varlistentry> <varlistentry>
<term><option>--mode=</option></term> <term><option>--mode=</option></term>
<listitem><para>Takes either <literal>block</literal> or <listitem><para>Takes <literal>block</literal>, <literal>delay</literal>,
<literal>delay</literal> and describes how the lock is <literal>block-weak</literal> or <literal>delay-weak</literal> and describes how the lock is
applied. If <literal>block</literal> is used (the default), applied. If <literal>block</literal> is used (the default), the lock prohibits any of the requested
the lock prohibits any of the requested operations without operations without time limit, and only privileged users may override it. If
time limit, and only privileged users may override it. If <literal>delay</literal> is used, the lock can only delay the requested operations for a limited
<literal>delay</literal> is used, the lock can only delay the time. If the time elapses, the lock is ignored and the operation executed. The time limit may be
requested operations for a limited time. If the time elapses, specified in
the lock is ignored and the operation executed. The time limit
may be specified in
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
Note that <literal>delay</literal> is only available for Note that <literal>delay</literal> is only available for <literal>sleep</literal> and
<literal>sleep</literal> and <literal>shutdown</literal>. In addition, the weak variants will automatically and silently be
<literal>shutdown</literal>.</para></listitem> bypassed under some circumstances.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -17,7 +17,7 @@
<refnamediv> <refnamediv>
<refname>systemd-measure</refname> <refname>systemd-measure</refname>
<refpurpose>Pre-calculate and sign expected TPM2 PCR values for booted unified kernel images</refpurpose> <refpurpose>Pre-calculate and sign expected TPM2 PCR 11 values for booted unified kernel images</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
@ -62,7 +62,7 @@
<term><command>status</command></term> <term><command>status</command></term>
<listitem><para>This is the default command if none is specified. This queries the local system's <listitem><para>This is the default command if none is specified. This queries the local system's
TPM2 PCR 11+12+13 values and displays them. The data is written in a similar format as the TPM2 PCR 11 values and displays them. The data is written in a similar format as the
<command>calculate</command> command below, and may be used to quickly compare expectation with <command>calculate</command> command below, and may be used to quickly compare expectation with
reality.</para> reality.</para>
@ -76,9 +76,9 @@
kernel image consisting of the components specified with <option>--linux=</option>, kernel image consisting of the components specified with <option>--linux=</option>,
<option>--osrel=</option>, <option>--cmdline=</option>, <option>--initrd=</option>, <option>--osrel=</option>, <option>--cmdline=</option>, <option>--initrd=</option>,
<option>--ucode=</option>, <option>--splash=</option>, <option>--dtb=</option>, <option>--ucode=</option>, <option>--splash=</option>, <option>--dtb=</option>,
<option>--uname=</option>, <option>--sbat=</option>, <option>--pcrpkey=</option> see below. <option>--uname=</option>, <option>--sbat=</option>, <option>--pcrpkey=</option>,
Only <option>--linux=</option> is mandatory. (Alternatively, specify <option>--current</option> to use the current values of PCR <option>--profile=</option>, see below. Only <option>--linux=</option> is mandatory. (Alternatively,
register 11 instead.)</para> specify <option>--current</option> to use the current values of PCR register 11 instead.)</para>
<xi:include href="version-info.xml" xpointer="v252"/> <xi:include href="version-info.xml" xpointer="v252"/>
</listitem> </listitem>
@ -124,6 +124,7 @@
<term><option>--uname=<replaceable>PATH</replaceable></option></term> <term><option>--uname=<replaceable>PATH</replaceable></option></term>
<term><option>--sbat=<replaceable>PATH</replaceable></option></term> <term><option>--sbat=<replaceable>PATH</replaceable></option></term>
<term><option>--pcrpkey=<replaceable>PATH</replaceable></option></term> <term><option>--pcrpkey=<replaceable>PATH</replaceable></option></term>
<term><option>--profile=<replaceable>PATH</replaceable></option></term>
<listitem><para>When used with the <command>calculate</command> or <command>sign</command> verb, <listitem><para>When used with the <command>calculate</command> or <command>sign</command> verb,
configures the files to read the unified kernel image components from. Each option corresponds with configures the files to read the unified kernel image components from. Each option corresponds with
@ -131,7 +132,10 @@
the path to the ELF kernel file that the unified PE kernel will wrap. All switches except the path to the ELF kernel file that the unified PE kernel will wrap. All switches except
<option>--linux=</option> are optional. Each option may be used at most once.</para> <option>--linux=</option> are optional. Each option may be used at most once.</para>
<xi:include href="version-info.xml" xpointer="v252"/></listitem> <xi:include href="version-info.xml" xpointer="v252"/>
<para id="v257">With the exception of <option>--profile=</option>, which has been added in version
257.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -282,9 +286,9 @@
<title>Generate a private/public key pair, a unified kernel image, and a TPM PCR 11 signature for <title>Generate a private/public key pair, a unified kernel image, and a TPM PCR 11 signature for
it, and embed the signature and the public key in the image</title> it, and embed the signature and the public key in the image</title>
<programlisting>$ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out tpm2-pcr-private.pem <programlisting>$ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out tpm2-pcr-private-key.pem
..+.+++++++++......+.........+......+.......+....+.....+.+...+.......... ..+.+++++++++......+.........+......+.......+....+.....+.+...+..........
$ openssl rsa -pubout -in tpm2-pcr-private.pem -out tpm2-pcr-public.pem $ openssl rsa -pubout -in tpm2-pcr-private-key.pem -out tpm2-pcr-public-key.pem
# systemd-measure sign \ # systemd-measure sign \
--linux=vmlinux \ --linux=vmlinux \
--osrel=os-release.txt \ --osrel=os-release.txt \
@ -292,25 +296,25 @@ $ openssl rsa -pubout -in tpm2-pcr-private.pem -out tpm2-pcr-public.pem
--initrd=initrd.cpio \ --initrd=initrd.cpio \
--splash=splash.bmp \ --splash=splash.bmp \
--dtb=devicetree.dtb \ --dtb=devicetree.dtb \
--pcrpkey=tpm2-pcr-public.pem \ --pcrpkey=tpm2-pcr-public-key.pem \
--bank=sha1 \ --bank=sha1 \
--bank=sha256 \ --bank=sha256 \
--private-key=tpm2-pcr-private.pem \ --private-key=tpm2-pcr-private-key.pem \
--public-key=tpm2-pcr-public.pem >tpm2-pcr-signature.json --public-key=tpm2-pcr-public-key.pem >tpm2-pcr-signature.json
# ukify --output=vmlinuz.efi \ # ukify --output=vmlinuz.efi \
--os-release=@os-release.txt \ --os-release=@os-release.txt \
--cmdline=@cmdline.txt \ --cmdline=@cmdline.txt \
--splash=splash.bmp \ --splash=splash.bmp \
--devicetree=devicetree.dtb \ --devicetree=devicetree.dtb \
--pcr-private-key=tpm2-pcr-private.pem \ --pcr-private-key=tpm2-pcr-private-key.pem \
--pcr-public-key=tpm2-pcr-public.pem \ --pcr-public-key=tpm2-pcr-public-key.pem \
--pcr-banks=sha1,sha256 \ --pcr-banks=sha1,sha256 \
vmlinux initrd.cpio</programlisting> vmlinux initrd.cpio</programlisting>
<para>Later on, enroll the signed PCR policy on a LUKS volume:</para> <para>Later on, enroll the signed PCR policy on a LUKS volume:</para>
<programlisting># systemd-cryptenroll --tpm2-device=auto \ <programlisting># systemd-cryptenroll --tpm2-device=auto \
--tpm2-public-key=tpm2-pcr-public.pem \ --tpm2-public-key=tpm2-pcr-public-key.pem \
--tpm2-signature=tpm2-pcr-signature.json \ --tpm2-signature=tpm2-pcr-signature.json \
/dev/sda5</programlisting> /dev/sda5</programlisting>
@ -335,38 +339,38 @@ $ openssl rsa -pubout -in tpm2-pcr-private.pem -out tpm2-pcr-public.pem
two classes of secrets or credentials: one that can be unlocked during the entire runtime, and the two classes of secrets or credentials: one that can be unlocked during the entire runtime, and the
other that can only be used in the initrd.</para> other that can only be used in the initrd.</para>
<programlisting>$ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out tpm2-pcr-private.pem <programlisting>$ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out tpm2-pcr-private-key.pem
.+........+.+........+.......+...+...+........+....+......+..+.......... .+........+.+........+.......+...+...+........+....+......+..+..........
$ openssl rsa -pubout -in tpm2-pcr-private.pem -out tpm2-pcr-public.pem $ openssl rsa -pubout -in tpm2-pcr-private-key.pem -out tpm2-pcr-public-key.pem
$ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out tpm2-pcr-initrd-private.pem $ openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out tpm2-pcr-private-key-initrd.pem
..+.......++........+........+......+........+....+.....+.+..+.......... ..+.......++........+........+......+........+....+.....+.+..+..........
$ openssl rsa -pubout -in tpm2-pcr-initrd-private.pem -out tpm2-pcr-initrd-public.pem $ openssl rsa -pubout -in tpm2-pcr-private-key-initrd.pem -out tpm2-pcr-public-key-initrd.pem
# ukify --output vmlinux-1.2.3.efi \ # ukify --output vmlinux-1.2.3.efi \
--os-release=@os-release.txt \ --os-release=@os-release.txt \
--cmdline=@cmdline.txt \ --cmdline=@cmdline.txt \
--splash=splash.bmp \ --splash=splash.bmp \
--devicetree=devicetree.dtb \ --devicetree=devicetree.dtb \
--pcr-private-key=tpm2-pcr-private.pem \ --pcr-private-key=tpm2-pcr-private-key.pem \
--pcr-public-key=tpm2-pcr-public.pem \ --pcr-public-key=tpm2-pcr-public-key.pem \
--phases=enter-initrd,enter-initrd:leave-initrd,enter-initrd:leave-initrd:sysinit,enter-initrd:leave-initrd:sysinit:ready \ --phases=enter-initrd,enter-initrd:leave-initrd,enter-initrd:leave-initrd:sysinit,enter-initrd:leave-initrd:sysinit:ready \
--pcr-banks=sha1,sha256 \ --pcr-banks=sha1,sha256 \
--pcr-private-key=tpm2-pcr-initrd-private.pem \ --pcr-private-key=tpm2-pcr-private-key-initrd.pem \
--pcr-public-key=tpm2-pcr-initrd-public.pem \ --pcr-public-key=tpm2-pcr-public-key-initrd.pem \
--phases=enter-initrd \ --phases=enter-initrd \
vmlinux-1.2.3 initrd.cpio \ vmlinux-1.2.3 initrd.cpio \
--uname=1.2.3 --uname=1.2.3
+ /usr/lib/systemd/systemd-measure sign --linux=vmlinux-1.2.3 \ + /usr/lib/systemd/systemd-measure sign --linux=vmlinux-1.2.3 \
--osrel=os-release.txt --cmdline=cmdline.txt --dtb=devicetree.dtb \ --osrel=os-release.txt --cmdline=cmdline.txt --dtb=devicetree.dtb \
--splash=splash.bmp --initrd=initrd.cpio --bank=sha1 --bank=sha256 \ --splash=splash.bmp --initrd=initrd.cpio --bank=sha1 --bank=sha256 \
--private-key=tpm2-pcr-private.pem --public-key=tpm2-pcr-public.pem \ --private-key=tpm2-pcr-private-key.pem --public-key=tpm2-pcr-public-key.pem \
--phase=enter-initrd --phase=enter-initrd:leave-initrd \ --phase=enter-initrd --phase=enter-initrd:leave-initrd \
--phase=enter-initrd:leave-initrd:sysinit \ --phase=enter-initrd:leave-initrd:sysinit \
--phase=enter-initrd:leave-initrd:sysinit:ready --phase=enter-initrd:leave-initrd:sysinit:ready
+ /usr/lib/systemd/systemd-measure sign --linux=vmlinux-1.2.3 \ + /usr/lib/systemd/systemd-measure sign --linux=vmlinux-1.2.3 \
--osrel=os-release.txt --cmdline=cmdline.txt --dtb=devicetree.dtb \ --osrel=os-release.txt --cmdline=cmdline.txt --dtb=devicetree.dtb \
--splash=splash.bmp --initrd=initrd.cpio --bank=sha1 --bank=sha256 \ --splash=splash.bmp --initrd=initrd.cpio --bank=sha1 --bank=sha256 \
--private-key=tpm2-pcr-initrd-private.pem \ --private-key=tpm2-pcr-private-key-initrd.pem \
--public-key=tpm2-pcr-initrd-public.pem \ --public-key=tpm2-pcr-public-key-initrd.pem \
--phase=enter-initrd --phase=enter-initrd
Wrote unsigned vmlinux-1.2.3.efi Wrote unsigned vmlinux-1.2.3.efi
</programlisting> </programlisting>
@ -381,8 +385,8 @@ Wrote unsigned vmlinux-1.2.3.efi
by the first <option>--pcr-private-key=</option> option, covering all boot phases. The by the first <option>--pcr-private-key=</option> option, covering all boot phases. The
<literal>.pcrpkey</literal> section is used in the default policies of <literal>.pcrpkey</literal> section is used in the default policies of
<command>systemd-cryptenroll</command> and <command>systemd-creds</command>. To use the stricter policy <command>systemd-cryptenroll</command> and <command>systemd-creds</command>. To use the stricter policy
bound to <filename>tpm-pcr-initrd-public.pem</filename>, specify <option>--tpm2-public-key=</option> on bound to <filename>tpm2-pcr-public-key-initrd.pem</filename>, specify
the command line of those tools.</para> <option>--tpm2-public-key=</option> on the command line of those tools.</para>
</example> </example>
</refsect1> </refsect1>

View File

@ -121,6 +121,7 @@
<xi:include href="standard-options.xml" xpointer="no-pager"/> <xi:include href="standard-options.xml" xpointer="no-pager"/>
<xi:include href="standard-options.xml" xpointer="no-legend" /> <xi:include href="standard-options.xml" xpointer="no-legend" />
<xi:include href="standard-options.xml" xpointer="no-ask-password"/> <xi:include href="standard-options.xml" xpointer="no-ask-password"/>
<xi:include href="standard-options.xml" xpointer="json"/>
<varlistentry> <varlistentry>
<term><option>--quiet</option></term> <term><option>--quiet</option></term>

View File

@ -43,6 +43,12 @@
The variables whose name begins with <literal>search-</literal> The variables whose name begins with <literal>search-</literal>
do not refer to individual paths, but instead to a list of do not refer to individual paths, but instead to a list of
colon-separated search paths, in their order of precedence.</para> colon-separated search paths, in their order of precedence.</para>
<para>Note that paths which depend on environment variables are
computed with <command>systemd-path</command>'s invoked
environment, and not the system or user manager's environment. As
such, the output of <command>systemd-path</command> may not
reflect the behavior of manager processes.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -35,31 +35,34 @@
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para><command>systemd-repart</command> grows and adds partitions to a partition table, based on the <para><command>systemd-repart</command> creates partition tables, and adds or grows partitions,
configuration files described in based on the configuration files described in
<citerefentry><refentrytitle>repart.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. <citerefentry><refentrytitle>repart.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para> </para>
<para>If invoked with no arguments, it operates on the block device backing the root file system <para><command>systemd-repart</command> is used when <emphasis>building</emphasis> OS images, and also
partition of the running OS, thus growing and adding partitions of the booted OS image itself. If when <emphasis>deploying</emphasis> images to automatically adjust them, during boot, to the system they
<varname>--image=</varname> is used it will operate on the specified image file. When called in the are running on. This way the image can be minimal in size and may be augmented automatically at boot,
initrd it operates on the block device backing <filename>/sysroot/</filename> instead, i.e. on the block taking possession of the disk space available.</para>
device the system will soon transition into. The <filename>systemd-repart.service</filename> service is
generally run at boot in the initrd, in order to augment the partition table of the OS before its
partitions are mounted. <command>systemd-repart</command> (mostly) operates in a purely incremental mode:
it only grows existing and adds new partitions; it does not shrink, delete or move existing partitions.
The service is intended to be run on every boot, but when it detects that the partition table already
matches the installed <filename>repart.d/*.conf</filename> configuration files, it executes no
operation.</para>
<para><command>systemd-repart</command> is intended to be used when deploying OS images, to automatically <para>If invoked with no arguments, <command>systemd-repart</command> operates on the block device
adjust them to the system they are running on, during first boot. This way the deployed image can be backing the root file system partition of the running OS, thus adding and growing partitions of the
minimal in size and may be augmented automatically at boot when needed, taking possession of disk space booted OS itself. When called in the initrd, it operates on the block device backing
available but not yet used. Specifically the following use cases are among those covered:</para> <filename>/sysroot/</filename> instead, i.e. on the block device the system will soon transition into. If
<varname>--image=</varname> is used, it will operate on the specified device or image file. The
<filename>systemd-repart.service</filename> service is generally run at boot in the initrd, in order to
augment the partition table of the OS before its partitions are mounted.</para>
<para><command>systemd-repart</command> operations are mostly incremental: it grows existing partitions
or adds new ones, but does not shrink, delete, or move existing partitions. The service is intended to be
run on every boot, but when it detects that the partition table already matches the installed
<filename>repart.d/*.conf</filename> configuration files, it executes no operation.</para>
<para>The following use cases are among those covered:</para>
<itemizedlist> <itemizedlist>
<listitem><para>The root partition may be grown to cover the whole available disk space.</para></listitem> <listitem><para>The root partition may be grown to cover the whole available disk space.</para></listitem>
<listitem><para>A <filename>/home/</filename>, swap or <filename>/srv/</filename> partition can be <listitem><para>A <filename>/home/</filename>, swap, or <filename>/srv/</filename> partition can be
added.</para></listitem> added.</para></listitem>
<listitem><para>A second (or third, …) root partition may be added, to cover A/B style setups <listitem><para>A second (or third, …) root partition may be added, to cover A/B style setups
where a second version of the root file system is alternatingly used for implementing update where a second version of the root file system is alternatingly used for implementing update
@ -70,23 +73,22 @@
<para>The algorithm executed by <command>systemd-repart</command> is roughly as follows:</para> <para>The algorithm executed by <command>systemd-repart</command> is roughly as follows:</para>
<orderedlist> <orderedlist>
<listitem><para>The <filename>repart.d/*.conf</filename> configuration files are loaded and parsed, <listitem><para>The <filename>repart.d/*.conf</filename> configuration files are loaded and parsed, and
and ordered by filename (without the directory prefix). For each configuration file, ordered by filename (without the directory prefix). For each configuration file, drop-in files are
drop-in files are looked for in directories with same name as the configuration file loaded from directories with same name as the configuration file with the suffix ".d" added.
with a suffix ".d" added.</para></listitem>
<listitem><para>The partition table already existing on the block device is loaded and
parsed.</para></listitem>
<listitem><para>The existing partitions in the partition table are matched up with the
<filename>repart.d/*.conf</filename> files by GPT partition type UUID. The first existing partition
of a specific type is assigned the first configuration file declaring the same type. The second
existing partition of a specific type is then assigned the second configuration file declaring the same
type, and so on. After this iterative assigning is complete any left-over existing partitions that have
no matching configuration file are considered "foreign" and left as they are. And any configuration
files for which no partition currently exists are understood as a request to create such a partition.
</para></listitem> </para></listitem>
<listitem><para>The partition table on the block device is loaded and parsed, if present.
</para></listitem>
<listitem><para>The existing partitions in the partition table are matched with the
<filename>repart.d/*.conf</filename> files by GPT partition type UUID. The first existing partition of
a specific type is assigned the first configuration file declaring the same type. The second existing
partition of a specific type is then assigned the second configuration file declaring the same type,
and so on. After this iterative assigning is complete, any existing partitions that have no matching
configuration file are considered "foreign" and left as they are. And any configuration files for which
no partition was matched are treated as requests to create a partition.</para></listitem>
<listitem><para>Partitions that shall be created are now allocated on the disk, taking the size <listitem><para>Partitions that shall be created are now allocated on the disk, taking the size
constraints and weights declared in the configuration files into account. Free space is used within the constraints and weights declared in the configuration files into account. Free space is used within the
limits set by size and padding requests. In addition, existing partitions that should be grown are limits set by size and padding requests. In addition, existing partitions that should be grown are
@ -124,12 +126,11 @@
partition table.</para></listitem> partition table.</para></listitem>
</orderedlist> </orderedlist>
<para>As exception to the normally strictly incremental operation, when called in a special "factory <para>As an exception to the normal incremental operation, when called in a special "factory reset" mode,
reset" mode, <command>systemd-repart</command> may also be used to erase existing partitions to <command>systemd-repart</command> may be used to erase existing partitions to reset an installation back
reset an installation back to vendor defaults. This mode of operation is used when either the to vendor defaults. This mode of operation is used when either the <option>--factory-reset=yes</option>
<option>--factory-reset=yes</option> switch is passed on the tool's command line, or the switch is passed on the tool's command line, or the <option>systemd.factory_reset=yes</option> option is
<option>systemd.factory_reset=yes</option> option specified on the kernel command line, or the specified on the kernel command line, or the <varname>FactoryReset</varname> EFI variable (vendor UUID
<varname>FactoryReset</varname> EFI variable (vendor UUID
<constant>8cf2644b-4b0b-428f-9387-6d876050dc67</constant>) is set to "yes". It alters the algorithm above <constant>8cf2644b-4b0b-428f-9387-6d876050dc67</constant>) is set to "yes". It alters the algorithm above
slightly: between the 3rd and the 4th step above any partition marked explicitly via the slightly: between the 3rd and the 4th step above any partition marked explicitly via the
<varname>FactoryReset=</varname> boolean is deleted, and the algorithm restarted, thus immediately <varname>FactoryReset=</varname> boolean is deleted, and the algorithm restarted, thus immediately
@ -153,11 +154,9 @@
from a common seed images prepared with this tool become reproducible and the result of the algorithm from a common seed images prepared with this tool become reproducible and the result of the algorithm
above deterministic.</para> above deterministic.</para>
<para>The positional argument should specify the block device to operate on. Instead of a block device <para>The positional argument should specify the block device or a regular file to operate on. If
node path a regular file may be specified too, in which case the command operates on it like it would if <option>--empty=create</option> is specified, the specified path is created as regular file, which is
a loopback block device node was specified with the file attached. If <option>--empty=create</option> is useful for generating disk images from scratch.</para>
specified the specified path is created as regular file, which is useful for generating disk images from
scratch.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -168,6 +167,7 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><option>--dry-run=</option></term> <term><option>--dry-run=</option></term>
<listitem><para>Takes a boolean. If this switch is not specified <option>--dry-run=yes</option> is <listitem><para>Takes a boolean. If this switch is not specified <option>--dry-run=yes</option> is
the implied default. Controls whether <filename>systemd-repart</filename> executes the requested the implied default. Controls whether <filename>systemd-repart</filename> executes the requested
re-partition operations or whether it should only show what it would do. Unless re-partition operations or whether it should only show what it would do. Unless
@ -179,6 +179,7 @@
<varlistentry> <varlistentry>
<term><option>--empty=</option></term> <term><option>--empty=</option></term>
<listitem><para>Takes one of <literal>refuse</literal>, <literal>allow</literal>, <listitem><para>Takes one of <literal>refuse</literal>, <literal>allow</literal>,
<literal>require</literal>, <literal>force</literal> or <literal>create</literal>. Controls how to <literal>require</literal>, <literal>force</literal> or <literal>create</literal>. Controls how to
operate on block devices that are entirely empty, i.e. carry no partition table/disk label yet. If operate on block devices that are entirely empty, i.e. carry no partition table/disk label yet. If
@ -633,7 +634,7 @@
<refsect1> <refsect1>
<title>Exit status</title> <title>Exit status</title>
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> <para>On success, 0 is returned, and a non-zero failure code otherwise.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
@ -645,15 +646,19 @@
<para>The following creates a configuration extension DDI (confext) for an <para>The following creates a configuration extension DDI (confext) for an
<filename>/etc/motd</filename> update:</para> <filename>/etc/motd</filename> update:</para>
<programlisting>mkdir tree tree/etc tree/etc/extension-release.d <programlisting>mkdir -p tree/etc/extension-release.d
echo "Hello World" > tree/etc/motd echo "Hello World" >tree/etc/motd
cat > tree/etc/extension-release.d/extension-release.my-motd &lt;&lt;EOF cat >tree/etc/extension-release.d/extension-release.my-motd &lt;&lt;EOF
ID=fedora ID=fedora
VERSION_ID=38 VERSION_ID=38
IMAGE_ID=my-motd IMAGE_ID=my-motd
IMAGE_VERSION=7 IMAGE_VERSION=7
EOF EOF
systemd-repart -C --private-key=privkey.pem --certificate=cert.crt -s tree/ /var/lib/confexts/my-motd.confext.raw systemd-repart -C \
--private-key=privkey.pem \
--certificate=cert.crt \
-s tree/ \
/var/lib/confexts/my-motd.confext.raw
systemd-confext refresh</programlisting> systemd-confext refresh</programlisting>
<para>The DDI generated that way may be applied to the system with <para>The DDI generated that way may be applied to the system with
@ -666,15 +671,20 @@ systemd-confext refresh</programlisting>
<para>The following creates a system extension DDI (sysext) for an <para>The following creates a system extension DDI (sysext) for an
<filename>/usr/foo</filename> update and signs it with a hardware token via PKCS11.</para> <filename>/usr/foo</filename> update and signs it with a hardware token via PKCS11.</para>
<programlisting>mkdir tree tree/usr tree/usr/lib/extension-release.d <programlisting>mkdir -p tree/usr/lib/extension-release.d
echo "Hello World" > tree/usr/foo echo "Hello World" >tree/usr/foo
cat > tree/usr/lib/extension-release.d/extension-release.my-foo &lt;&lt;EOF cat >tree/usr/lib/extension-release.d/extension-release.my-foo &lt;&lt;EOF
ID=fedora ID=fedora
VERSION_ID=38 VERSION_ID=38
IMAGE_ID=my-foo IMAGE_ID=my-foo
IMAGE_VERSION=7 IMAGE_VERSION=7
EOF EOF
systemd-repart --make-ddi=sysext --private-key-source=engine:pkcs11 --private-key="pkcs11:model=PKCS%2315%20emulated;manufacturer=piv_II;serial=0123456789abcdef;token=Some%20Cert" --certificate=cert.crt -s tree/ /var/lib/extensions/my-foo.sysext.raw systemd-repart --make-ddi=sysext \
--private-key-source=engine:pkcs11 \
--private-key="pkcs11:model=PKCS%2315%20emulated;manufacturer=piv_II;serial=0123456789abcdef;token=Some%20Cert" \
--certificate=cert.crt \
-s tree/ \
/var/lib/extensions/my-foo.sysext.raw
systemd-sysext refresh</programlisting> systemd-sysext refresh</programlisting>
<para>The DDI generated that way may be applied to the system with <para>The DDI generated that way may be applied to the system with

View File

@ -216,34 +216,35 @@
the traditional glibc resolver below.</para></listitem> the traditional glibc resolver below.</para></listitem>
<listitem><para>If a query does not match any configured routing domain (either per-link or global), it <listitem><para>If a query does not match any configured routing domain (either per-link or global), it
is sent to all DNS servers that are configured on links with the <varname>DefaultRoute=</varname> is sent to all DNS servers that are configured on links configured as the default route, as well as the
option set, as well as the globally configured DNS server.</para></listitem> globally configured DNS server.</para></listitem>
<listitem><para>If there is no link configured as <varname>DefaultRoute=</varname> and no global DNS <listitem><para>If there are no DNS servers configured on any link also configured as the default route
server configured, one of the compiled-in fallback DNS servers is used.</para></listitem> and no global DNS server configured, one of the compiled-in fallback DNS servers is used.</para>
</listitem>
<listitem><para>Otherwise the unicast DNS query fails, as no suitable DNS servers can be determined. <listitem><para>Otherwise the unicast DNS query fails, as no suitable DNS servers can be determined.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
<para>The <varname>DefaultRoute=</varname> option is a boolean setting configurable with <para>Whether a link is the default route or not can be configured with
<command>resolvectl</command> or in <filename>.network</filename> files. If not set, it is implicitly <command>resolvectl default-route</command> command or <varname>DNSDefaultRoute=</varname> setting in
determined based on the configured DNS domains for a link: if there's a route-only domain other than <filename>.network</filename> files. If not configured explicitly, it is implicitly determined based on
<literal>~.</literal>, it defaults to false, otherwise to true.</para> the configured DNS domains for a link: if there's a route-only domain other than <literal>~.</literal>,
it defaults to false, otherwise to true.</para>
<para>Effectively this means: in order to support single-label non-synthesized names, define appropriate <para>Effectively this means: in order to support single-label non-synthesized names, define appropriate
search domains. In order to preferably route all DNS queries not explicitly matched by routing domain search domains. In order to preferably route all DNS queries not explicitly matched by routing domain
configuration to a specific link, configure a <literal>~.</literal> route-only domain on it. This will configuration to a specific link, configure a <literal>~.</literal> route-only domain on it. This will
ensure that other links will not be considered for these queries (unless they too carry such a routing ensure that other links will not be considered for these queries (unless they too carry such a routing
domain). In order to route all such DNS queries to a specific link only if no other link is preferred, domain). In order to route all such DNS queries to a specific link only if no other link is preferred,
set the <varname>DefaultRoute=</varname> option for the link to true and do not configure a configure the link as the default route and do not configure a <literal>~.</literal> route-only domain on
<literal>~.</literal> route-only domain on it. Finally, in order to ensure that a specific link never it. Finally, in order to ensure that a specific link never receives any DNS traffic not matching any of
receives any DNS traffic not matching any of its configured routing domains, set the its configured routing domains, make it not the default route.</para>
<varname>DefaultRoute=</varname> option for it to false.</para>
<para>See <para>See
<citerefentry><refentrytitle>org.freedesktop.resolve1</refentrytitle><manvolnum>5</manvolnum></citerefentry> <citerefentry><refentrytitle>org.freedesktop.resolve1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for information about the D-Bus APIs <filename>systemd-resolved</filename> provides.</para> for information about the D-Bus APIs <command>systemd-resolved</command> provides.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -105,15 +105,6 @@
<para>The following options are understood:</para> <para>The following options are understood:</para>
<variablelist> <variablelist>
<varlistentry>
<term><option>--no-ask-password</option></term>
<listitem><para>Do not query the user for authentication for
privileged operations.</para>
<xi:include href="version-info.xml" xpointer="v226"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>--scope</option></term> <term><option>--scope</option></term>
@ -528,8 +519,10 @@
<xi:include href="user-system-options.xml" xpointer="machine" /> <xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="user-system-options.xml" xpointer="capsule" /> <xi:include href="user-system-options.xml" xpointer="capsule" />
<xi:include href="standard-options.xml" xpointer="no-ask-password" />
<xi:include href="standard-options.xml" xpointer="help" /> <xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="json" />
</variablelist> </variablelist>
<para>All command line arguments after the first non-option argument become part of the command line of <para>All command line arguments after the first non-option argument become part of the command line of

View File

@ -227,6 +227,23 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>HibernateOnACPower=</varname></term>
<listitem>
<para>Whether to allow hibernation when the system has AC power. Only used by
<citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
when <varname>HibernateDelaySec=</varname> is set.</para>
<para>If this option is disabled, the countdown of <varname>HibernateDelaySec=</varname> starts only
after AC power is disconnected, keeping the system in the suspend state otherwise.</para>
<para>This option is only effective on systems with a battery.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>SuspendEstimationSec=</varname></term> <term><varname>SuspendEstimationSec=</varname></term>

View File

@ -65,7 +65,7 @@
<para>The <varname>ssh.authorized_keys.root</varname> credential can be used to allow specific public keys <para>The <varname>ssh.authorized_keys.root</varname> credential can be used to allow specific public keys
to log in over SSH. See to log in over SSH. See
<citerefentry><refentrytitle>systemd.systemd-credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd.system-credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>
for more information.</para> for more information.</para>
<para>The generator will use a packaged <filename>sshd@.service</filename> service template file if one <para>The generator will use a packaged <filename>sshd@.service</filename> service template file if one

View File

@ -58,7 +58,7 @@ Host .host
</programlisting> </programlisting>
<para>A configuration fragment along these lines is by default installed into <para>A configuration fragment along these lines is by default installed into
<filename>/etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf.in</filename>.</para> <filename>/etc/ssh/ssh_config.d/20-systemd-ssh-proxy.conf</filename>.</para>
<para>With this in place, SSH connections to host string <literal>unix/</literal> followed by an absolute <para>With this in place, SSH connections to host string <literal>unix/</literal> followed by an absolute
<constant>AF_UNIX</constant> file system path to a socket will be directed to the specified socket, which <constant>AF_UNIX</constant> file system path to a socket will be directed to the specified socket, which

View File

@ -53,13 +53,14 @@
<para>The UEFI boot stub looks for various resources for the kernel invocation inside the UEFI PE binary <para>The UEFI boot stub looks for various resources for the kernel invocation inside the UEFI PE binary
itself. This allows combining various resources inside a single PE binary image (usually called "Unified itself. This allows combining various resources inside a single PE binary image (usually called "Unified
Kernel Image", or "UKI" for short), which may then be signed via UEFI SecureBoot as a whole, covering all Kernel Image", or "UKI" for short), which may then be signed via UEFI SecureBoot as a whole, covering all
individual resources at once. Specifically it may include:</para> individual resources at once. Specifically it may include the following PE sections:</para>
<itemizedlist> <itemizedlist>
<!-- Let's keep this in the canonical order we also measure the sections by, i.e. as in <!-- Let's keep this in the canonical order we also measure the sections by, i.e. as in
src/fundamental/uki.h's UnifiedSection enum --> src/fundamental/uki.h's UnifiedSection enum -->
<listitem><para>A <literal>.linux</literal> section with the ELF Linux kernel image.</para></listitem> <listitem><para>A <literal>.linux</literal> section with the ELF Linux kernel
image. (Required)</para></listitem>
<listitem><para>An <literal>.osrel</literal> section with OS release information, i.e. the contents of <listitem><para>An <literal>.osrel</literal> section with OS release information, i.e. the contents of
the <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> file the <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> file
@ -95,21 +96,29 @@
signature data in the <literal>.pcrsig</literal> section.</para></listitem> signature data in the <literal>.pcrsig</literal> section.</para></listitem>
</itemizedlist> </itemizedlist>
<para>If UEFI SecureBoot is enabled and the <literal>.cmdline</literal> section is present in the executed <para>Generally, the sections above should appear at most once in a UKI. That said, a concept of
image, any attempts to override the kernel command line by passing one as invocation parameters to the "profiles" is defined, that allows multiple sets of these sections to exist in a single UKI file, of
EFI binary are ignored. Thus, in order to allow overriding the kernel command line, either disable UEFI which one can be selected at boot. For this an additional PE section <literal>.profile</literal> is
SecureBoot, or don't include a kernel command line PE section in the kernel image file. If a command line defined which can be used as separator between multiple sets of these settings. The
is accepted via EFI invocation parameters to the EFI binary it is measured into TPM PCR 12 (if a TPM is <literal>.profile</literal> section itself may contain meta-information about the section, and follows a
present).</para> similar structure as the contents of the <literal>.osrel</literal> section. For further details about
multi-profile UKIs, see below.</para> <para>If UEFI SecureBoot is enabled and the
<literal>.cmdline</literal> section is present in the executed image, any attempts to override the kernel
command line by passing one as invocation parameters to the EFI binary are ignored. Thus, in order to
allow overriding the kernel command line, either disable UEFI SecureBoot, or don't include a kernel
command line PE section in the kernel image file. If a command line is accepted via EFI invocation
parameters to the EFI binary it is measured into TPM PCR 12 (if a TPM is present).</para> <para>If a
DeviceTree is embedded in the <literal>.dtb</literal> section, it replaces an existing DeviceTree in the
corresponding EFI configuration table. systemd-stub will ask the firmware via the
<literal>EFI_DT_FIXUP_PROTOCOL</literal> for hardware specific fixups to the DeviceTree.</para> <para>The
contents of 11 of these 12 sections are measured into TPM PCR 11. It is otherwise not used and thus the
result can be pre-calculated without too much effort. The <literal>.pcrsig</literal> section is not
included in this PCR measurement, since it is supposed to contain signatures for the output of the
measurement operation, and thus cannot also be input to it. If an UKI contains multiple profiles, only
the PE sections of the selected profile (and those of the base profile, except if overridden) are
measured.</para>
<para>If a DeviceTree is embedded in the <literal>.dtb</literal> section, it replaces an existing <para>If non-zero, the selected numeric profile is measured into PCR 12.</para>
DeviceTree in the corresponding EFI configuration table. systemd-stub will ask the firmware via the
<literal>EFI_DT_FIXUP_PROTOCOL</literal> for hardware specific fixups to the DeviceTree.</para>
<para>The contents of eight of these nine sections are measured into TPM PCR 11. It is otherwise not used
and thus the result can be pre-calculated without too much effort. The <literal>.pcrsig</literal> section
is not included in this PCR measurement, since it is supposed to contain signatures for the output of the
measurement operation, and thus cannot also be input to it.</para>
<para>When <literal>.pcrsig</literal> and/or <literal>.pcrpkey</literal> sections are present in a <para>When <literal>.pcrsig</literal> and/or <literal>.pcrpkey</literal> sections are present in a
unified kernel image their contents are passed to the booted kernel in an synthetic initrd cpio archive unified kernel image their contents are passed to the booted kernel in an synthetic initrd cpio archive
@ -182,10 +191,10 @@
<listitem><para>Similarly, files <listitem><para>Similarly, files
<filename><replaceable>foo</replaceable>.efi.extra.d/*.addon.efi</filename> are loaded and verified as <filename><replaceable>foo</replaceable>.efi.extra.d/*.addon.efi</filename> are loaded and verified as
PE binaries, and a <literal>.cmdline</literal> section is parsed from them. Addons are supposed to be PE binaries, and a <literal>.cmdline</literal> or <literal>.ucode</literal> section is parsed from them.
used to pass additional kernel command line parameters or Devicetree blobs, regardless of the kernel Addons are supposed to be used to pass additional kernel command line parameters, or Devicetree blobs,
image being booted, for example to allow platform vendors to ship platform-specific and microcode updates, regardless of the kernel image being booted, for example to allow platform vendors
configuration.</para> to ship platform-specific configuration.</para>
<para>In case Secure Boot is enabled, these files will be validated using keys in UEFI DB, Shim's DB or <para>In case Secure Boot is enabled, these files will be validated using keys in UEFI DB, Shim's DB or
Shim's MOK, and will be rejected otherwise. Additionally, if both the addon and the UKI contain a Shim's MOK, and will be rejected otherwise. Additionally, if both the addon and the UKI contain a
@ -199,7 +208,9 @@
<para>Addon files are sorted, loaded, and measured into TPM PCR 12 (if a TPM is present) and appended <para>Addon files are sorted, loaded, and measured into TPM PCR 12 (if a TPM is present) and appended
to the kernel command line. UKI command line options are listed first, then options from addons in to the kernel command line. UKI command line options are listed first, then options from addons in
<filename>/loader/addons/*.addon.efi</filename>, and finally UKI-specific addons. Device tree blobs are <filename>/loader/addons/*.addon.efi</filename>, and finally UKI-specific addons. Device tree blobs are
loaded and measured following the same algorithm. Addons are always loaded in the same order based on loaded and measured following the same algorithm. Microcode addons are passed to the kernel in inverse
order (UKI specific addons, global addons, UKI embedded section). This is because the microcode update
driver stops on the first matching filename. Addons are always loaded in the same order based on
the filename, so that, given the same set of addons, the same set of measurements can be expected in the filename, so that, given the same set of addons, the same set of measurements can be expected in
PCR12. However, note that the filename is not protected by the PE signature, and as such an attacker PCR12. However, note that the filename is not protected by the PE signature, and as such an attacker
with write access to the ESP could potentially rename these files to change the order in which they are with write access to the ESP could potentially rename these files to change the order in which they are
@ -215,9 +226,10 @@
measured into TPM PCR 12 (if a TPM is present).</para></listitem> measured into TPM PCR 12 (if a TPM is present).</para></listitem>
<listitem><para>Additionally, files <filename>/loader/addons/*.addon.efi</filename> are loaded and <listitem><para>Additionally, files <filename>/loader/addons/*.addon.efi</filename> are loaded and
verified as PE binaries, and <literal>.cmdline</literal> and/or <literal>.dtb</literal> sections are verified as PE binaries, and <literal>.cmdline</literal>, <literal>.dtb</literal> and/or
parsed from them. This is supposed to be used to pass additional command line parameters or Devicetree <literal>.ucode</literal>sections are parsed from them. This is supposed to be used to pass additional
blobs to the kernel, regardless of the kernel being booted.</para></listitem> command line parameters, Devicetree blobs and microcode updates to the kernel, regardless of the
kernel being booted.</para></listitem>
</itemizedlist> </itemizedlist>
<para>These mechanisms may be used to parameterize and extend trusted (i.e. signed), immutable initrd <para>These mechanisms may be used to parameterize and extend trusted (i.e. signed), immutable initrd
@ -228,19 +240,124 @@
details); in case of the system extension images by using signed Verity images.</para> details); in case of the system extension images by using signed Verity images.</para>
</refsect1> </refsect1>
<refsect1>
<title>Multi-Profile UKIs</title>
<para>In many contexts it is useful to allow invocation of a single UKI in multiple different modes (or
"profiles") without compromising the cryptographic integrity, measurements and so on of the boot
process. For example, a single UKI might provide three distinct profiles: a regular boot one, one that
invokes a "factory reset" operation, and one that boots into a storage target mode (as in
<citerefentry><refentrytitle>systemd-storagetm.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>). Each
profile would then use the same <literal>.linux</literal> and <literal>.initrd</literal> sections, but would
have a separate <literal>.cmdline</literal> section. For example the latter two profiles would extend the
regular kernel command line with <literal>systemd.unit=factory-reset.target</literal> or
<literal>rd.systemd.unit=storagetm.target</literal>.</para>
<para>A single UKI may support multiple profiles by means of the special <literal>.profile</literal> PE
section. This section acts as separator between the PE sections of the individual
profiles. <literal>.profile</literal> PE sections hence may appear multiple times in a single UKI, and
the other PE sections listed above may appear multiple times too, if <literal>.profile</literal> are
used, but only once before the first <literal>.profile</literal> section, once between each subsequent
pair, and once after the last appearance of <literal>.profile</literal>. The sections listed before the
first <literal>.profile</literal> are considered the "base" profile of the UKI. Each
<literal>.profile</literal> section then introduces a new profile, which are numbered starting from
zero. The PE sections following each <literal>.profile</literal> are specific to that profile. When
booting into a specific profile the base section's profiles are used in combination with the specific
profile's sections: if the same section is defined in both, the per-profile section overrides the base
profile's version, otherwise the per-profile sections is used together with the base profile
sections.</para> <para>A UKI that contains no <literal>.profile</literal> is consider equivalent to one
that just contains a single <literal>.profile</literal>, as having only a single profile @0.</para>
<para>Here's a simple example for a multi-profile UKI's sections, inspired by the setup suggested above:</para>
<table>
<title>Multi-Profile UKI Example</title>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname="section" />
<colspec colname="profile" />
<thead>
<row>
<entry>Section</entry>
<entry>Profile</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>.linux</literal></entry>
<entry morerows="3" valign="middle">Base profile</entry>
</row>
<row>
<entry><literal>.osrel</literal></entry>
</row>
<row>
<entry><literal>.cmdline</literal></entry>
</row>
<row>
<entry><literal>.initrd</literal></entry>
</row>
<row>
<entry><literal>.profile</literal></entry>
<entry>Profile @0</entry>
</row>
<row>
<entry><literal>.profile</literal></entry>
<entry morerows="1" valign="middle">Profile @1</entry>
</row>
<row>
<entry><literal>.cmdline</literal></entry>
</row>
<row>
<entry><literal>.profile</literal></entry>
<entry morerows="1" valign="middle">Profile @2</entry>
</row>
<row>
<entry><literal>.cmdline</literal></entry>
</row>
</tbody>
</tgroup>
</table>
<para>The section list above would define three profiles. The first four sections make up the base
profile. A <literal>.profile</literal> section then introduces profile @0. It doesn't override any
sections (or add any) from the base section, hence it is immediately followed by another
<literal>.profile</literal> section that then introduces section @1. This profile overrides the kernel
command line. Finally, the last two sections define section @2, again overriding the command line. (Note
that in this example the first <literal>.cmdline</literal> could also moved behind the first
<literal>.profile</literal> with equivalent effect. To keep things nicely extensible, it's probably a
good idea to keep the generic command line in the base section instead of profile 0, in case later added
profiles might want to reuse it.)</para>
<para>The profile to boot may be controlled via the UKI's own command line: if the first argument starts
with <literal>@</literal>, followed by a positive integer number in decimal, it selects the profile to
boot into. If the first argument is not specified like that, the UKI will automatically boot into profile
0.</para>
<para>A <literal>.profile</literal> section may contain meta-information about the profile. It follows a
similar format as <literal>.osrel</literal> (i.e. an environment-variable-assignment-block-like list of
newline separated strings). Currently two fields are defined: <literal>ID=</literal> is supposed to carry
a short identifying string that identifies the profile
(e.g. <literal>ID=factory-reset</literal>). <literal>TITLE=</literal> should contain a human readable
string that may appear in the boot menu entry for this profile (e.g. <literal>TITLE='Factory Reset this
Device'</literal>).</para>
</refsect1>
<refsect1> <refsect1>
<title>TPM PCR Notes</title> <title>TPM PCR Notes</title>
<para>Note that when a unified kernel using <command>systemd-stub</command> is invoked the firmware will <para>Note that when a unified kernel using <command>systemd-stub</command> is invoked the firmware will
measure it as a whole to TPM PCR 4, covering all embedded resources, such as the stub code itself, the measure it as a whole to TPM PCR 4, covering all embedded resources, such as the stub code itself, the
core kernel, the embedded initrd and kernel command line (see above for a full list).</para> core kernel, the embedded initrd and kernel command line (see above for a full list), including all UKI
profiles.</para>
<para>Also note that the Linux kernel will measure all initrds it receives into TPM PCR 9. This means <para>Also note that the Linux kernel will measure all initrds it receives into TPM PCR 9. This means
every type of initrd will be measured two or three times: the initrds embedded in the kernel image will be every type of initrd (of the selected UKI profile) will possibly be measured two or three times: the
measured to PCR 4, PCR 9 and PCR 11; the initrd synthesized from credentials (and the one synthesized initrds embedded in the kernel image will be measured to PCR 4, PCR 9 and PCR 11; the initrd synthesized
from configuration extensions) will be measured to both PCR 9 and PCR 12; the initrd synthesized from from credentials (and the one synthesized from configuration extensions) will be measured to both PCR 9
system extensions will be measured to both PCR 4 and PCR 9. Let's summarize the OS resources and the PCRs and PCR 12; the initrd synthesized from system extensions will be measured to both PCR 4 and PCR 9. Let's
they are measured to:</para> summarize the OS resources and the PCRs they are measured to:</para>
<table> <table>
<title>OS Resource PCR Summary</title> <title>OS Resource PCR Summary</title>
@ -321,6 +438,11 @@
<entry>Configuration Extensions (synthesized initrd from companion files)</entry> <entry>Configuration Extensions (synthesized initrd from companion files)</entry>
<entry>9 + 12</entry> <entry>9 + 12</entry>
</row> </row>
<row>
<entry>Selected profile unless zero</entry>
<entry>12</entry>
</row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
@ -337,12 +459,16 @@
<varlistentry> <varlistentry>
<term><varname>LoaderDevicePartUUID</varname></term> <term><varname>LoaderDevicePartUUID</varname></term>
<listitem><para>Contains the partition UUID of the EFI System Partition the EFI image was run <listitem><para>Contains the partition UUID of the partition the boot loader has been started from on
from. <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> the current boot (usually a EFI System Partition). If already set by the boot loader, this will
remain untouched by <command>systemd-stub</command>. If not set yet, this will be set to the
partition UUID of the partition the unified kernel is started from, in order to support systems that
directly boot into a unified kernel image, bypassing any boot loader.
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
uses this information to automatically find the disk booted from, in order to discover various other uses this information to automatically find the disk booted from, in order to discover various other
partitions on the same disk automatically.</para> partitions on the same disk automatically.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem> <xi:include href="version-info.xml" xpointer="v224"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -359,12 +485,27 @@
<varlistentry> <varlistentry>
<term><varname>LoaderImageIdentifier</varname></term> <term><varname>LoaderImageIdentifier</varname></term>
<listitem><para>The path of EFI executable, relative to the EFI System Partition's root <listitem><para>The file system path to the EFI executable of the boot loader for the current boot,
directory. Use relative to the partition's root directory (i.e. relative to the partition indicated by
<varname>LoaderDevicePartUUID</varname>, see above). If not set yet, this will be set to the file
system path of the EFI executable of the booted unified kernel, in order to support systems that
directly boot into a unified kernel image, bypassing any boot loader. Use
<citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to view <citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> to view
this data.</para> this data.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem> <xi:include href="version-info.xml" xpointer="v237"/></listitem>
</varlistentry>
<varlistentry>
<term><varname>StubDevicePartUUID</varname></term>
<term><varname>StubImageIdentifier</varname></term>
<listitem><para>Similar to <varname>LoaderDevicePartUUID</varname> and
<varname>StubImageIdentifier</varname>, but indicates the location of the unified kernel image EFI
binary rather than the location of the boot loader binary, regardless if booted via a boot loader
or not.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -419,6 +560,16 @@
<xi:include href="version-info.xml" xpointer="v255"/></listitem> <xi:include href="version-info.xml" xpointer="v255"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>StubProfile</varname></term>
<listitem><para>The numeric index of the selected profile, without the <literal>@</literal>,
formatted as decimal string. Set both on single-profile and multi-profile UKIs. (In the former case
this variable will be set to <literal>0</literal> unconditionally.)</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
<para>Note that some of the variables above may also be set by the boot loader. The stub will only set <para>Note that some of the variables above may also be set by the boot loader. The stub will only set
@ -490,13 +641,22 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><filename>/.extra/tpm2-pcr-pkey.pem</filename></term> <term><filename>/.extra/tpm2-pcr-public-key.pem</filename></term>
<listitem><para>The PEM public key included in the <literal>.pcrpkey</literal> PE section of the <listitem><para>The PEM public key included in the <literal>.pcrpkey</literal> PE section of the
unified kernel image is copied into the <filename>/.extra/tpm2-pcr-public-key.pem</filename> file in unified kernel image is copied into the <filename>/.extra/tpm2-pcr-public-key.pem</filename> file in
the initrd execution environment.</para> the initrd execution environment.</para>
<xi:include href="version-info.xml" xpointer="v252"/></listitem> <xi:include href="version-info.xml" xpointer="v252"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><filename>/.extra/profile</filename></term>
<term><filename>/.extra/os-release</filename></term>
<listitem><para>The contents of the <literal>.profile</literal> and <literal>.osrel</literal>
sections of the selected profile, if any.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
<para>Note that all these files are located in the <literal>tmpfs</literal> file system the kernel sets <para>Note that all these files are located in the <literal>tmpfs</literal> file system the kernel sets

View File

@ -474,10 +474,12 @@
<term><varname>ManagerEnvironment=</varname></term> <term><varname>ManagerEnvironment=</varname></term>
<listitem><para>Takes the same arguments as <varname>DefaultEnvironment=</varname>, see above. Sets <listitem><para>Takes the same arguments as <varname>DefaultEnvironment=</varname>, see above. Sets
environment variables just for the manager process itself. In contrast to user managers, these variables environment variables for the manager process itself. These variables are inherited by processes
are not inherited by processes spawned by the system manager, use <varname>DefaultEnvironment=</varname> spawned by user managers, but not the system manager - use <varname>DefaultEnvironment=</varname>
for that. Note that these variables are merged into the existing environment block. In particular, in for that. Note that these variables are merged into the existing environment block. In particular, in
case of the system manager, this includes variables set by the kernel based on the kernel command line.</para> case of the system manager, this includes variables set by the kernel based on the kernel command line.
As with <varname>DefaultEnvironment=</varname>, this environment block is internal, and changes are not
reflected in the manager's <filename>/proc/PID/environ</filename>.</para>
<para>Setting environment variables for the manager process may be useful to modify its behaviour. <para>Setting environment variables for the manager process may be useful to modify its behaviour.
See <ulink url="https://systemd.io/ENVIRONMENT">Known Environment Variables</ulink> for a See <ulink url="https://systemd.io/ENVIRONMENT">Known Environment Variables</ulink> for a

View File

@ -257,9 +257,9 @@
<term><option>--instances-max=</option></term> <term><option>--instances-max=</option></term>
<term><option>-m</option></term> <term><option>-m</option></term>
<listitem><para>Takes a decimal integer greater than or equal to 2. Controls how many versions to <listitem><para>Takes a decimal integer greater than or equal to 2 while updating or 1 while vacuuming.
keep at any time. This option may also be configured inside the transfer files, via the Controls how many versions to keep at any time. This option may also be configured inside the transfer
<varname>InstancesMax=</varname> setting, see files, via the <varname>InstancesMax=</varname> setting, see
<citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> for <citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
details.</para> details.</para>
@ -295,6 +295,25 @@
<xi:include href="version-info.xml" xpointer="v251"/></listitem> <xi:include href="version-info.xml" xpointer="v251"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>--offline</option></term>
<listitem><para>Prevents fetching metadata from the network (i.e. <filename>SHA256SUMS</filename>).
This is most useful when used in combination with the <command>list</command> command, to query
locally installed versions.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry>
<term><option>--transfer-source=</option></term>
<listitem><para>Takes a path as its argument. When specified, all transfer sources configured with
<varname>PathRelativeTo=explicit</varname> will be interpreted relative to the specified path.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="no-pager" /> <xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="no-legend" /> <xi:include href="standard-options.xml" xpointer="no-legend" />
<xi:include href="standard-options.xml" xpointer="json" /> <xi:include href="standard-options.xml" xpointer="json" />
@ -312,6 +331,7 @@
<para><simplelist type="inline"> <para><simplelist type="inline">
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></member> <member><citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>systemd-sysupdated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>systemd-repart</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> <member><citerefentry><refentrytitle>systemd-repart</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
</simplelist></para> </simplelist></para>
</refsect1> </refsect1>

View File

@ -0,0 +1,55 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refentry id="systemd-sysupdated.service" conditional='ENABLE_SYSUPDATE'>
<refentryinfo>
<title>systemd-sysupdated.service</title>
<productname>systemd</productname>
</refentryinfo>
<refmeta>
<refentrytitle>systemd-sysupdated.service</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refnamediv>
<refname>systemd-sysupdated.service</refname>
<refname>systemd-sysupdated</refname>
<refpurpose>System Update Service</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>systemd-sysupdated.service</filename></para>
<para><filename>/usr/lib/systemd/systemd-sysupdated</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para><command>systemd-sysupdated</command> is a system service that allows unprivileged
clients to update the system. It works by scanning the system for updateable "targets" (i.e.
portable services, sysexts, sysupdate components, etc.) and exposing them on the bus. Each
target then has methods that translate directly into invocations of
<citerefentry><refentrytitle>systemd-sysupdate</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
<para>See
<citerefentry><refentrytitle>org.freedesktop.sysupdate1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for a description of the D-Bus API.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-sysupdate</refentrytitle><manvolnum>8</manvolnum></citerefentry>
<citerefentry><refentrytitle>updatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -42,15 +42,15 @@
<para>If invoked with no arguments, directives from the configuration files found in the directories <para>If invoked with no arguments, directives from the configuration files found in the directories
specified by specified by
<citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. When <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> are
invoked with positional arguments, if option <option>--replace=<replaceable>PATH</replaceable></option> executed. When invoked with positional arguments, if option
is specified, arguments specified on the command line are used instead of the configuration file <option>--replace=<replaceable>PATH</replaceable></option> is specified, arguments specified on the
<replaceable>PATH</replaceable>. Otherwise, just the configuration specified by the command line command line are used instead of the configuration file <replaceable>PATH</replaceable>. Otherwise, just
arguments is executed. If the string <literal>-</literal> is specified instead of a filename, the the configuration specified by the command line arguments is executed. If the string <literal>-</literal>
configuration is read from standard input. If the argument is a file name (without any slashes), all is specified instead of a filename, the configuration is read from standard input. If the argument is a
configuration directories are searched for a matching file and the file found that has the highest file name (without any slashes), all configuration directories are searched for a matching file and the
priority is executed. If the argument is a path, that file is used directly without searching the file found that has the highest priority is executed. If the argument is a path, that file is used
configuration directories for any other matching file.</para> directly without searching the configuration directories for any other matching file.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -65,15 +65,15 @@
<para>If invoked with no arguments, directives from the configuration files found in the directories <para>If invoked with no arguments, directives from the configuration files found in the directories
specified by specified by
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. When <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> are
invoked with positional arguments, if option <option>--replace=<replaceable>PATH</replaceable></option> executed. When invoked with positional arguments, if option
is specified, arguments specified on the command line are used instead of the configuration file <option>--replace=<replaceable>PATH</replaceable></option> is specified, arguments specified on the
<replaceable>PATH</replaceable>. Otherwise, just the configuration specified by the command line command line are used instead of the configuration file <replaceable>PATH</replaceable>. Otherwise, just
arguments is executed. If the string <literal>-</literal> is specified instead of a filename, the the configuration specified by the command line arguments is executed. If the string <literal>-</literal>
configuration is read from standard input. If the argument is a file name (without any slashes), all is specified instead of a filename, the configuration is read from standard input. If the argument is a
configuration directories are searched for a matching file and the file found that has the highest file name (without any slashes), all configuration directories are searched for a matching file and the
priority is executed. If the argument is a path, that file is used directly without searching the file found that has the highest priority is executed. If the argument is a path, that file is used
configuration directories for any other matching file.</para> directly without searching the configuration directories for any other matching file.</para>
<para>System services (<filename>systemd-tmpfiles-setup.service</filename>, <para>System services (<filename>systemd-tmpfiles-setup.service</filename>,
<filename>systemd-tmpfiles-setup-dev-early.service</filename>, <filename>systemd-tmpfiles-setup-dev-early.service</filename>,
@ -152,10 +152,11 @@
<varlistentry> <varlistentry>
<term><option>--purge</option></term> <term><option>--purge</option></term>
<listitem><para>If this option is passed, all files and directories marked for <listitem><para>If this option is passed, all files and directories declared for
<emphasis>creation</emphasis> by the <filename>tmpfiles.d/</filename> files specified on the command <emphasis>creation</emphasis> and marked with the <literal>$</literal> character by the
line will be <emphasis>deleted</emphasis>. Specifically, this acts on all files and directories <filename>tmpfiles.d/</filename> files specified on the command line will be
marked with <varname>f</varname>, <varname>F</varname>, <varname>d</varname>, <varname>D</varname>, <emphasis>deleted</emphasis>. Specifically, this acts on all files and directories marked with
<varname>f</varname>, <varname>F</varname>, <varname>d</varname>, <varname>D</varname>,
<varname>v</varname>, <varname>q</varname>, <varname>Q</varname>, <varname>p</varname>, <varname>v</varname>, <varname>q</varname>, <varname>Q</varname>, <varname>p</varname>,
<varname>L</varname>, <varname>c</varname>, <varname>b</varname>, <varname>C</varname>, <varname>L</varname>, <varname>c</varname>, <varname>b</varname>, <varname>C</varname>,
<varname>w</varname>, <varname>e</varname>. If this switch is used at least one <varname>w</varname>, <varname>e</varname>. If this switch is used at least one

View File

@ -366,6 +366,23 @@
<xi:include href="version-info.xml" xpointer="v233"/></listitem> <xi:include href="version-info.xml" xpointer="v233"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>BindLogSockets=</varname></term>
<listitem><para>Takes a boolean argument. If true, sockets from <citerefentry>
<refentrytitle>systemd-journald.socket</refentrytitle><manvolnum>8</manvolnum></citerefentry>
will be bind mounted into the mount namespace. This is particularly useful when a different instance
of <filename>/run/</filename> is employed, to make sure processes running in the namespace
can still make use of <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
</para>
<para>This option is implied when <varname>LogNamespace=</varname> is used,
when <varname>MountAPIVFS=yes</varname>, or when <varname>PrivateDevices=yes</varname> is used
in conjunction with either <varname>RootDirectory=</varname> or <varname>RootImage=</varname>.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>ProtectProc=</varname></term> <term><varname>ProtectProc=</varname></term>
@ -1949,18 +1966,29 @@ BindReadOnlyPaths=/var/lib/systemd</programlisting>
<varlistentry> <varlistentry>
<term><varname>PrivateUsers=</varname></term> <term><varname>PrivateUsers=</varname></term>
<listitem><para>Takes a boolean argument. If true, sets up a new user namespace for the executed processes and <listitem><para>Takes a boolean argument or one of <literal>self</literal> or
configures a minimal user and group mapping, that maps the <literal>root</literal> user and group as well as <literal>identity</literal>. Defaults to off. If enabled, sets up a new user namespace for the
the unit's own user and group to themselves and everything else to the <literal>nobody</literal> user and executed processes and configures a user and group mapping. If set to a true value or
group. This is useful to securely detach the user and group databases used by the unit from the rest of the <literal>self</literal>, a minimal user and group mapping is configured that maps the
system, and thus to create an effective sandbox environment. All files, directories, processes, IPC objects and <literal>root</literal> user and group as well as the unit's own user and group to themselves and
other resources owned by users/groups not equaling <literal>root</literal> or the unit's own will stay visible everything else to the <literal>nobody</literal> user and group. This is useful to securely detach
from within the unit but appear owned by the <literal>nobody</literal> user and group. If this mode is enabled, the user and group databases used by the unit from the rest of the system, and thus to create an
all unit processes are run without privileges in the host user namespace (regardless if the unit's own effective sandbox environment. All files, directories, processes, IPC objects and other resources
user/group is <literal>root</literal> or not). Specifically this means that the process will have zero process owned by users/groups not equaling <literal>root</literal> or the unit's own will stay visible from
capabilities on the host's user namespace, but full capabilities within the service's user namespace. Settings within the unit but appear owned by the <literal>nobody</literal> user and group. </para>
such as <varname>CapabilityBoundingSet=</varname> will affect only the latter, and there's no way to acquire
additional capabilities in the host's user namespace. Defaults to off.</para> <para>If the parameter is <literal>identity</literal>, user namespacing is set up with an identity
mapping for the first 65536 UIDs/GIDs. Any UIDs/GIDs above 65536 will be mapped to the
<literal>nobody</literal> user and group, respectively. While this does not provide UID/GID isolation,
since all UIDs/GIDs are chosen identically it does provide process capability isolation, and hence is
often a good choice if proper user namespacing with distinct UID maps is not appropriate.</para>
<para>If this mode is enabled, all unit processes are run without privileges in the host user
namespace (regardless if the unit's own user/group is <literal>root</literal> or not). Specifically
this means that the process will have zero process capabilities on the host's user namespace, but
full capabilities within the service's user namespace. Settings such as
<varname>CapabilityBoundingSet=</varname> will affect only the latter, and there's no way to acquire
additional capabilities in the host's user namespace.</para>
<para>When this setting is set up by a per-user instance of the service manager, the mapping of the <para>When this setting is set up by a per-user instance of the service manager, the mapping of the
<literal>root</literal> user and group to itself is omitted (unless the user manager is root). <literal>root</literal> user and group to itself is omitted (unless the user manager is root).
@ -2973,7 +3001,12 @@ SystemCallErrorNumber=EPERM</programlisting>
<para><option>tty</option> connects standard output to a tty (as configured via <varname>TTYPath=</varname>, <para><option>tty</option> connects standard output to a tty (as configured via <varname>TTYPath=</varname>,
see below). If the TTY is used for output only, the executed process will not become the controlling process of see below). If the TTY is used for output only, the executed process will not become the controlling process of
the terminal, and will not fail or wait for other processes to release the terminal.</para> the terminal, and will not fail or wait for other processes to release the terminal. Note: if a unit
tries to print multiple lines to a TTY during bootup or shutdown, then there's a chance that those
lines will be broken up by status messages. <function>SetShowStatus()</function> can be used to
prevent this problem. See
<citerefentry project="man-pages"><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for details.</para>
<para><option>journal</option> connects standard output with the journal, which is accessible via <para><option>journal</option> connects standard output with the journal, which is accessible via
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Note <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Note
@ -3322,7 +3355,8 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX
<term><varname>TTYReset=</varname></term> <term><varname>TTYReset=</varname></term>
<listitem><para>Reset the terminal device specified with <varname>TTYPath=</varname> before and after <listitem><para>Reset the terminal device specified with <varname>TTYPath=</varname> before and after
execution. Defaults to <literal>no</literal>.</para></listitem> execution. This does not erase the screen (see <varname>TTYVTDisallocate=</varname> below for
that). Defaults to <literal>no</literal>.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -3333,11 +3367,12 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>TTYRows=</varname></term>
<term><varname>TTYColumns=</varname></term> <term><varname>TTYColumns=</varname></term>
<term><varname>TTYRows=</varname></term>
<listitem><para>Configure the size of the TTY specified with <varname>TTYPath=</varname>. If unset or <listitem><para>Configure the size of the TTY specified with <varname>TTYPath=</varname>. If unset or
set to the empty string, the kernel default is used.</para> set to the empty string, it is attempted to retrieve the dimensions of the terminal screen via ANSI
sequences, and if that fails the kernel defaults (typically 80x24) are used.</para>
<xi:include href="version-info.xml" xpointer="v250"/></listitem> <xi:include href="version-info.xml" xpointer="v250"/></listitem>
</varlistentry> </varlistentry>
@ -3345,9 +3380,10 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX
<varlistentry> <varlistentry>
<term><varname>TTYVTDisallocate=</varname></term> <term><varname>TTYVTDisallocate=</varname></term>
<listitem><para>If the terminal device specified with <varname>TTYPath=</varname> is a virtual console <listitem><para>If the terminal device specified with <varname>TTYPath=</varname> is a virtual
terminal, try to deallocate the TTY before and after execution. This ensures that the screen and scrollback console terminal, try to deallocate the TTY before and after execution. This ensures that the screen
buffer is cleared. Defaults to <literal>no</literal>.</para></listitem> and scrollback buffer is cleared. If the terminal device is of any other type of TTY an attempt is
made to clear the screen via ANSI sequences. Defaults to <literal>no</literal>.</para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -3517,6 +3553,18 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX
<literal>[]</literal> wildcards are not permitted, nor are <literal>*</literal> wildcards anywhere <literal>[]</literal> wildcards are not permitted, nor are <literal>*</literal> wildcards anywhere
except at the end of the glob expression.</para> except at the end of the glob expression.</para>
<para>Optionally, the credential name or glob may be followed by a colon followed by a rename pattern.
If specified, all credentials matching the credential name or glob are renamed according to the given
pattern. For example, if <literal>ImportCredential=my.original.cred:my.renamed.cred</literal> is
specified, the service manager will read the <literal>my.original.cred</literal> credential and make
it available as the <literal>my.renamed.cred</literal> credential to the service. Similarly, if
<literal>ImportCredential=my.original.*:my.renamed.</literal> is specified, the service manager will
read all credentials starting with <literal>my.original.</literal> and make them available as
<literal>my.renamed.xxx</literal> to the service.</para>
<para>If <varname>ImportCredential=</varname> is specified multiple times and multiple credentials
end up with the same name after renaming, the first one is kept and later ones are dropped.</para>.
<para>When multiple credentials of the same name are found, credentials found by <para>When multiple credentials of the same name are found, credentials found by
<varname>LoadCredential=</varname> and <varname>LoadCredentialEncrypted=</varname> take priority over <varname>LoadCredential=</varname> and <varname>LoadCredentialEncrypted=</varname> take priority over
credentials found by <varname>ImportCredential=</varname>.</para> credentials found by <varname>ImportCredential=</varname>.</para>
@ -4169,6 +4217,18 @@ StandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZX
<xi:include href="version-info.xml" xpointer="v254"/></listitem> <xi:include href="version-info.xml" xpointer="v254"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>$DEBUG_INVOCATION</varname></term>
<listitem><para>If <varname>RestartMode=debug</varname> is set, and a previous attempt at starting
the unit failed, this variable will be passed to the service to indicate that additional logging
should be enabled at startup. See
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more details.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
</variablelist> </variablelist>
<para>For system services, when <varname>PAMName=</varname> is enabled and <command>pam_systemd</command> is part <para>For system services, when <varname>PAMName=</varname> is enabled and <command>pam_systemd</command> is part

View File

@ -216,6 +216,17 @@
<xi:include href="version-info.xml" xpointer="v220"/></listitem> <xi:include href="version-info.xml" xpointer="v220"/></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><option>x-systemd.wants=</option></term>
<listitem><para>Configures a <varname>Wants=</varname> and
an <varname>After=</varname> dependency between the created
mount unit and another systemd unit, similar to the
<varname>x-systemd.requires=</varname> option.</para>
<xi:include href="version-info.xml" xpointer="v257"/></listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><option>x-systemd.before=</option></term> <term><option>x-systemd.before=</option></term>
<term><option>x-systemd.after=</option></term> <term><option>x-systemd.after=</option></term>

View File

@ -135,12 +135,10 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><varname>ID_NET_LABEL_ONBOARD=</varname><replaceable>prefix</replaceable> <replaceable>label</replaceable></term> <term><varname>ID_NET_LABEL_ONBOARD=</varname><replaceable>label</replaceable></term>
<listitem><para>This property is set based on textual label given by the firmware for on-board <listitem><para>This property is set based on textual label given by the firmware for on-board
devices. The name consists of the prefix concatenated with the label. This is only available for devices. This is only available for PCI devices.</para>
PCI devices.
</para>
<xi:include href="version-info.xml" xpointer="v243"/> <xi:include href="version-info.xml" xpointer="v243"/>
</listitem> </listitem>
@ -478,7 +476,8 @@
bridge as that would create naming conflict when there are more child devices on that bridge. Now, bridge as that would create naming conflict when there are more child devices on that bridge. Now,
this is relaxed and we will use slot information to generate the name based on it but only if this is relaxed and we will use slot information to generate the name based on it but only if
the PCI device has multiple functions. This is safe because distinct function number is a part of the PCI device has multiple functions. This is safe because distinct function number is a part of
the device name for multifunction devices.</para> the device name for multifunction devices. Note, this is reverted in <constant>v255</constant>.
See below.</para>
<xi:include href="version-info.xml" xpointer="v251"/> <xi:include href="version-info.xml" xpointer="v251"/>
</listitem> </listitem>
@ -521,10 +520,24 @@
<listitem><para>Naming was changed for SR-IOV virtual device representors to enable the <listitem><para>Naming was changed for SR-IOV virtual device representors to enable the
change introduced in <constant>v254</constant> by default.</para> change introduced in <constant>v254</constant> by default.</para>
<para>If we detect that a PCI device associated with a slot is a PCI bridge, we no longer set
<varname>ID_NET_NAME_SLOT</varname>, reverting a change that was introduced in v251.</para>
<xi:include href="version-info.xml" xpointer="v255"/> <xi:include href="version-info.xml" xpointer="v255"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><constant>v257</constant></term>
<listitem><para>PCI slot number is now read from <constant>firmware_node/sun</constant> sysfs file.</para>
<para>The naming scheme based on devicetree aliases was extended to support aliases for individual
interfaces of controllers with multiple ports.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
</variablelist> </variablelist>
<para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this <para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this
@ -597,7 +610,7 @@ ID_NET_NAME_ONBOARD_LABEL=Ethernet Port 1
</example> </example>
<example> <example>
<title>PCI Ethernet card in hotplug slot with firmware index number</title> <title>PCI Ethernet card in slot with firmware index number</title>
<programlisting># /sys/devices/pci0000:00/0000:00:1c.3/0000:05:00.0/net/ens1 <programlisting># /sys/devices/pci0000:00/0000:00:1c.3/0000:05:00.0/net/ens1
ID_NET_NAME_MAC=enx000000000466 ID_NET_NAME_MAC=enx000000000466

View File

@ -440,6 +440,16 @@
<xi:include href="version-info.xml" xpointer="v243"/> <xi:include href="version-info.xml" xpointer="v243"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>FDBMaxLearned=</varname></term>
<listitem>
<para>Specifies the maximum number of learned Ethernet addresses for the bridge. When the limit is
reached, no more addresses are learned. When unset, the kernel's default will be used. 0 disables the limit.
</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -1007,6 +1017,17 @@
<xi:include href="version-info.xml" xpointer="v247"/> <xi:include href="version-info.xml" xpointer="v247"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>MinSourcePort=</varname></term>
<listitem>
<para>Specifies the lowest value of the UDP tunnel source UDP port (in range 1…65535).
Defaults to unset.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -2005,6 +2026,19 @@
<xi:include href="version-info.xml" xpointer="v237"/> <xi:include href="version-info.xml" xpointer="v237"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>PublicKeyFile=</varname></term>
<listitem>
<para>Takes an absolute path to a file which contains the Base64 encoded public key for the peer.
When this option is specified, then <varname>PublicKey=</varname> will be ignored. Note that the
file must be readable by the user <literal>systemd-network</literal>, so it should be, e.g., owned
by <literal>root:systemd-network</literal> with a <literal>0640</literal> file mode. If the path
refers to an <constant>AF_UNIX</constant> stream socket in the file system a connection is made to
it and the key read from it.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>PresharedKey=</varname></term> <term><varname>PresharedKey=</varname></term>
<listitem> <listitem>

View File

@ -188,8 +188,9 @@
<varlistentry> <varlistentry>
<term><varname>ARP=</varname></term> <term><varname>ARP=</varname></term>
<listitem> <listitem>
<para>Takes a boolean. If set to true, the ARP (low-level Address Resolution Protocol) <para>Takes a boolean. If set to true, the IPv4 ARP (low-level Address Resolution Protocol)
for this interface is enabled. When unset, the kernel's default will be used.</para> and IPv6 NDP (Neighbor Discovery Protocol) for this interface are enabled. When unset, the
kernel's default will be used.</para>
<para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual <para> For example, disabling ARP is useful when creating multiple MACVLAN or VLAN virtual
interfaces atop a single lower-level physical interface, which will then only serve as a interfaces atop a single lower-level physical interface, which will then only serve as a
link/"bridge" device aggregating traffic to the same physical link and not participate in link/"bridge" device aggregating traffic to the same physical link and not participate in
@ -708,6 +709,14 @@ Table=1234</programlisting></para>
number of dynamically created network interfaces with the same network configuration and number of dynamically created network interfaces with the same network configuration and
automatic address range assignment.</para> automatic address range assignment.</para>
<para>If an IPv4 link-local address (169.254.0.0/16) is specified, IPv4 Address Conflict
Detection (<ulink url="https://tools.ietf.org/html/rfc5227">RFC 5227</ulink>) is enabled for the
address. To assign an IPv4 link-local address without IPv4 Address Conflict Detection, please use
[Address] section to configure the address and disable <varname>DuplicateAddressDetection=</varname>.
<programlisting>[Address]
Address=169.254.10.1/24
DuplicateAddressDetection=none</programlisting></para>
<para>If an empty string is specified, then the all previous assignments in both [Network] and <para>If an empty string is specified, then the all previous assignments in both [Network] and
[Address] sections are cleared.</para> [Address] sections are cleared.</para>
@ -845,7 +854,7 @@ Table=1234</programlisting></para>
<varlistentry> <varlistentry>
<term><varname>IPv6Forwarding=</varname></term> <term><varname>IPv6Forwarding=</varname></term>
<listitem> <listitem>
<para>Configures IPv6 packet forwarding for the interface. Takes a boolean value. This controls the <para>Configures interface-specific host/router behaviour. Takes a boolean value. This controls the
<filename>net.ipv6.conf.<replaceable>INTERFACE</replaceable>.forwarding</filename> sysctl option of <filename>net.ipv6.conf.<replaceable>INTERFACE</replaceable>.forwarding</filename> sysctl option of
the network interface. See the network interface. See
<ulink url="https://docs.kernel.org/networking/ip-sysctl.html">IP Sysctl</ulink> <ulink url="https://docs.kernel.org/networking/ip-sysctl.html">IP Sysctl</ulink>
@ -859,6 +868,14 @@ Table=1234</programlisting></para>
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para> </para>
<para>Note, unlike <varname>IPv4Forwarding=</varname>, enabling per-interface
<varname>IPv6Forwarding=</varname> on two or more interfaces <emphasis>DOES NOT</emphasis> make IPv6
packets forwarded within the interfaces. This setting just controls the per-interface sysctl value,
and the sysctl value is not directly correlated to whether packets are forwarded. To ensure IPv6
packets forwarded, the global setting in
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
needs to be enabled.</para>
<xi:include href="version-info.xml" xpointer="v256"/> <xi:include href="version-info.xml" xpointer="v256"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -872,15 +889,15 @@ Table=1234</programlisting></para>
<literal>ipv6</literal>, <literal>both</literal>, or <literal>no</literal>. Defaults to <literal>ipv6</literal>, <literal>both</literal>, or <literal>no</literal>. Defaults to
<literal>no</literal>. Note. Any positive boolean values such as <literal>yes</literal> or <literal>no</literal>. Note. Any positive boolean values such as <literal>yes</literal> or
<literal>true</literal> are now deprecated. Please use one of the values above. Specifying <literal>true</literal> are now deprecated. Please use one of the values above. Specifying
<literal>ipv4</literal> or <literal>both</literal> implies <varname>IPv4Forwarding=</varname>, <literal>ipv4</literal> or <literal>both</literal> implies <varname>IPv4Forwarding=</varname>
unless it is explicitly specified. Similarly for <varname>IPv6Forwarding=</varname> when settings in both .network file for this interface and the global
<literal>ipv6</literal> or <literal>both</literal> is specified. These implications are only on <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
this interface. Hence, to make the IP packet forwarding works, unless they are explicitly specified. Similarly for <varname>IPv6Forwarding=</varname> when
<varname>IPv4Forwarding=</varname>/<varname>IPv6Forwarding=</varname> need to be enabled on an <literal>ipv6</literal> or <literal>both</literal> is specified. See
upstream interface, or globally enabled by specifying them in <varname>IPv4Forwarding=</varname>/<varname>IPv6Forwarding=</varname> in the above for the per-link
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. settings, and
See <varname>IPv4Forwarding=</varname>/<varname>IPv6Forwarding=</varname> in the above for more <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
details.</para> for the global settings.</para>
<xi:include href="version-info.xml" xpointer="v219"/> <xi:include href="version-info.xml" xpointer="v219"/>
</listitem> </listitem>
@ -1191,6 +1208,18 @@ Table=1234</programlisting></para>
carrier. Defaults to false. If enabled, and the <varname>IgnoreCarrierLoss=</varname> setting carrier. Defaults to false. If enabled, and the <varname>IgnoreCarrierLoss=</varname> setting
is not explicitly set, then it is enabled as well.</para> is not explicitly set, then it is enabled as well.</para>
<para>With this enabled, to make the interface enter the <literal>configured</literal> state,
which is required to make <command>systemd-networkd-wait-online</command> work properly for the
interface, all dynamic address configuration mechanisms like <varname>DHCP=</varname> and
<varname>IPv6AcceptRA=</varname> (which is enabled by default in most cases) need to be disabled.
Also, <varname>DuplicateAddressDetection=</varname> (which is enabled by default for IPv4
link-local addresses and all IPv6 addresses) needs to be disabled for all static address
configurations. Otherwise, without carrier, the interface will be stuck in the
<literal>configuring</literal> state, and <command>systemd-networkd-wait-online</command> for the
interface will timeout. Also, it is recommended to set
<varname>RequiredForOnline=no-carrier</varname> to make
<command>systemd-networkd-wait-online</command> work for the interface.</para>
<xi:include href="version-info.xml" xpointer="v235"/> <xi:include href="version-info.xml" xpointer="v235"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -1366,10 +1395,10 @@ Table=1234</programlisting></para>
Detection. See <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5227</ulink>. Detection. See <ulink url="https://tools.ietf.org/html/rfc5227">RFC 5227</ulink>.
When <literal>ipv6</literal>, performs IPv6 Duplicate Address Detection. See When <literal>ipv6</literal>, performs IPv6 Duplicate Address Detection. See
<ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink>. Defaults to <ulink url="https://tools.ietf.org/html/rfc4862">RFC 4862</ulink>. Defaults to
<literal>ipv4</literal> for IPv4 link-local addresses, <literal>ipv6</literal> for IPv6 <literal>ipv4</literal> for IPv4 link-local addresses (169.254.0.0/16), <literal>ipv6</literal>
addresses, and <literal>none</literal> otherwise.</para> for IPv6 addresses, and <literal>none</literal> otherwise.</para>
<xi:include href="version-info.xml" xpointer="v232"/> <xi:include href="version-info.xml" xpointer="v232"/>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -1600,8 +1629,8 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
<varlistentry> <varlistentry>
<term><varname>Label=</varname></term> <term><varname>Label=</varname></term>
<listitem> <listitem>
<para>The label for the prefix, an unsigned integer in the range 0…4294967294. 0xffffffff is <para>The label for the prefix. Takes an unsigned integer in the range 0…4294967294 (0xfffffffe).
reserved. This setting is mandatory.</para> 4294967295 (0xffffffff) is reserved. This setting is mandatory.</para>
<xi:include href="version-info.xml" xpointer="v234"/> <xi:include href="version-info.xml" xpointer="v234"/>
</listitem> </listitem>
@ -1610,8 +1639,8 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
<varlistentry> <varlistentry>
<term><varname>Prefix=</varname></term> <term><varname>Prefix=</varname></term>
<listitem> <listitem>
<para>IPv6 prefix is an address with a prefix length, separated by a slash <para>Takes an IPv6 address with a prefix length, separated by a slash
<literal>/</literal> character. This setting is mandatory. </para> <literal>/</literal> character. This setting is mandatory.</para>
<xi:include href="version-info.xml" xpointer="v234"/> <xi:include href="version-info.xml" xpointer="v234"/>
</listitem> </listitem>
@ -1682,7 +1711,8 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
one of predefined names <literal>default</literal>, <literal>main</literal>, and one of predefined names <literal>default</literal>, <literal>main</literal>, and
<literal>local</literal>, and names defined in <varname>RouteTable=</varname> in <literal>local</literal>, and names defined in <varname>RouteTable=</varname> in
<citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
or a number between 1 and 4294967295. Defaults to <literal>main</literal>.</para> or a number between 1 and 4294967295. Defaults to <literal>main</literal>.
Ignored if <varname>L3MasterDevice=</varname> is true.</para>
<xi:include href="version-info.xml" xpointer="v235"/> <xi:include href="version-info.xml" xpointer="v235"/>
</listitem> </listitem>
@ -1699,6 +1729,18 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>GoTo=</varname></term>
<listitem>
<para>Specifies the target priority used by <literal>goto</literal> type of rule. Takes an integer
in the range 1…4294967295. This must be larger than the priority of this rule specified in
<varname>Priority=</varname>. When specified, <varname>Type=goto</varname> is implied. This is
mandatory when <varname>Type=goto</varname>.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>IncomingInterface=</varname></term> <term><varname>IncomingInterface=</varname></term>
<listitem> <listitem>
@ -1824,8 +1866,10 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
<term><varname>Type=</varname></term> <term><varname>Type=</varname></term>
<listitem> <listitem>
<para>Specifies Routing Policy Database (RPDB) rule type. Takes one of <para>Specifies Routing Policy Database (RPDB) rule type. Takes one of
<literal>blackhole</literal>, <literal>unreachable</literal> or <literal>prohibit</literal>. <literal>table</literal>, <literal>goto</literal>, <literal>nop</literal>,
</para> <literal>blackhole</literal>, <literal>unreachable</literal>, or <literal>prohibit</literal>.
When <literal>goto</literal>, the target priority must be specified in <varname>GoTo=</varname>.
Defaults to <literal>table</literal>.</para>
<xi:include href="version-info.xml" xpointer="v248"/> <xi:include href="version-info.xml" xpointer="v248"/>
</listitem> </listitem>
@ -2053,7 +2097,7 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
<command>ip route show table <replaceable>num</replaceable></command>. If unset and <command>ip route show table <replaceable>num</replaceable></command>. If unset and
<varname>Type=</varname> is <literal>local</literal>, <literal>broadcast</literal>, <varname>Type=</varname> is <literal>local</literal>, <literal>broadcast</literal>,
<literal>anycast</literal>, or <literal>nat</literal>, then <literal>local</literal> is used. <literal>anycast</literal>, or <literal>nat</literal>, then <literal>local</literal> is used.
In other cases, defaults to <literal>main</literal>. Ignored if <varname>L3MasterDevice=</varname> is true.</para> In other cases, defaults to <literal>main</literal>.</para>
<xi:include href="version-info.xml" xpointer="v230"/> <xi:include href="version-info.xml" xpointer="v230"/>
</listitem> </listitem>
@ -2733,6 +2777,23 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>UnassignedSubnetPolicy=</varname></term>
<listitem>
<para>Takes <literal>none</literal>, or one of the reject types: <literal>unreachable</literal>,
<literal>prohibit</literal>, <literal>blackhole</literal>, or <literal>throw</literal>. If a reject
type is specified, the reject route corresponding to the acquired 6RD prefix will be configured.
For example, when <literal>unreachable</literal>,
<programlisting>unreachable 2001:db8::/56 dev lo proto dhcp metric 1024 pref medium</programlisting>
will be configured. See <ulink url="https://datatracker.ietf.org/doc/html/rfc7084">RFC 7084</ulink>.
If <literal>none</literal> is specified, such route will not be configured. This may be useful when
custom firewall rules that handle packets for unassigned subnets will be configured.
Defaults to <literal>unreachable</literal>.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>IPv6OnlyMode=</varname></term> <term><varname>IPv6OnlyMode=</varname></term>
<listitem> <listitem>
@ -2973,6 +3034,23 @@ NFTSet=prefix:netdev:filter:eth_ipv4_prefix</programlisting>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>UnassignedSubnetPolicy=</varname></term>
<listitem>
<para>Takes <literal>none</literal> or one of the reject types: <literal>unreachable</literal>,
<literal>prohibit</literal>, <literal>blackhole</literal>, or <literal>throw</literal>. If a reject
type is specified, the reject route corresponding to the delegated prefix will be configured.
For example, when <literal>unreachable</literal>,
<programlisting>unreachable 2001:db8::/56 dev lo proto dhcp metric 1024 pref medium</programlisting>
will be configured. See <ulink url="https://datatracker.ietf.org/doc/html/rfc7084">RFC 7084</ulink>.
If <literal>none</literal> is specified, such route will not be configured. This may be useful when
custom firewall rules that handle packets for unassigned subnets will be configured.
Defaults to <literal>unreachable</literal>.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>RapidCommit=</varname></term> <term><varname>RapidCommit=</varname></term>
<listitem> <listitem>
@ -4553,7 +4631,7 @@ ServerAddress=192.168.0.1/24</programlisting>
<varlistentry> <varlistentry>
<term><varname>MulticastGroupAddress=</varname></term> <term><varname>MulticastGroupAddress=</varname></term>
<listitem> <listitem>
<para>Specifies the IPv4 or IPv6 multicast group address to add. This setting is mandatory.</para> <para>Specifies the IPv4, IPv6, or L2 MAC multicast group address to add. This setting is mandatory.</para>
<xi:include href="version-info.xml" xpointer="v247"/> <xi:include href="version-info.xml" xpointer="v247"/>
</listitem> </listitem>
@ -5987,6 +6065,26 @@ ServerAddress=192.168.0.1/24</programlisting>
</variablelist> </variablelist>
</refsect1> </refsect1>
<refsect1>
<title>[ClassfulMultiQueueing] Section Options</title>
<para>The [ClassfulMultiQueueing] section manages the queueing discipline (qdisc) of Classful Multi Queueing (mq).</para>
<variablelist class='network-directives'>
<xi:include href="tc.xml" xpointer="qdisc-parent" />
<xi:include href="tc.xml" xpointer="qdisc-handle" />
</variablelist>
</refsect1>
<refsect1>
<title>[BandMultiQueueing] Section Options</title>
<para>The [BandMultiQueueing] section manages the queueing discipline (qdisc) of Band Multi Queueing (multiq).</para>
<variablelist class='network-directives'>
<xi:include href="tc.xml" xpointer="qdisc-parent" />
<xi:include href="tc.xml" xpointer="qdisc-handle" />
</variablelist>
</refsect1>
<refsect1> <refsect1>
<title>[HeavyHitterFilter] Section Options</title> <title>[HeavyHitterFilter] Section Options</title>
<para>The [HeavyHitterFilter] section manages the queueing discipline (qdisc) of Heavy Hitter Filter <para>The [HeavyHitterFilter] section manages the queueing discipline (qdisc) of Heavy Hitter Filter

View File

@ -462,7 +462,8 @@ CPUWeight=20 DisableControllers=cpu / \
<para>Specify the absolute limit on swap usage of the executed processes in this unit.</para> <para>Specify the absolute limit on swap usage of the executed processes in this unit.</para>
<para>Takes a swap size in bytes. If the value is suffixed with K, M, G or T, the specified swap size is <para>Takes a swap size in bytes. If the value is suffixed with K, M, G or T, the specified swap size is
parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base 1024), respectively. If assigned the parsed as Kilobytes, Megabytes, Gigabytes, or Terabytes (with the base 1024), respectively. Alternatively, a
percentage value may be specified, which is taken relative to the specified swap size on the system. If assigned the
special value <literal>infinity</literal>, no swap limit is applied. These settings control the special value <literal>infinity</literal>, no swap limit is applied. These settings control the
<literal>memory.swap.max</literal> control group attribute. For details about this control group attribute, <literal>memory.swap.max</literal> control group attribute. For details about this control group attribute,
see <ulink url="https://docs.kernel.org/admin-guide/cgroup-v2.html#memory-interface-files">Memory Interface Files</ulink>.</para> see <ulink url="https://docs.kernel.org/admin-guide/cgroup-v2.html#memory-interface-files">Memory Interface Files</ulink>.</para>

View File

@ -162,11 +162,11 @@
<itemizedlist> <itemizedlist>
<listitem><para>If set to <option>simple</option> (the default if <varname>ExecStart=</varname> <listitem><para>If set to <option>simple</option> (the default if <varname>ExecStart=</varname>
is specified but neither <varname>Type=</varname> nor <varname>BusName=</varname> are), the is specified but neither <varname>Type=</varname> nor <varname>BusName=</varname> are, and
service manager will consider the unit started immediately after the main service process has credentials are not used), the service manager will consider the unit started immediately after
been forked off (i.e. immediately after <function>fork()</function>, and before various process the main service process has been forked off (i.e. immediately after <function>fork()</function>,
attributes have been configured and in particular before the new process has called and before various process attributes have been configured and in particular before the new process
<function>execve()</function> to invoke the actual service binary). Typically, has called <function>execve()</function> to invoke the actual service binary). Typically,
<varname>Type=</varname><option>exec</option> is the better choice, see below.</para> <varname>Type=</varname><option>exec</option> is the better choice, see below.</para>
<para>It is expected that the process configured with <varname>ExecStart=</varname> is the main <para>It is expected that the process configured with <varname>ExecStart=</varname> is the main
@ -188,7 +188,9 @@
Note that this means <command>systemctl start</command> command lines for <option>exec</option> Note that this means <command>systemctl start</command> command lines for <option>exec</option>
services will report failure when the service's binary cannot be invoked successfully (for services will report failure when the service's binary cannot be invoked successfully (for
example because the selected <varname>User=</varname> doesn't exist, or the service binary is example because the selected <varname>User=</varname> doesn't exist, or the service binary is
missing).</para></listitem> missing). This type is implied if credentials are used (refer to <varname>LoadCredential=</varname>
in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for details).</para></listitem>
<listitem><para>If set to <option>forking</option>, the manager will consider the unit started <listitem><para>If set to <option>forking</option>, the manager will consider the unit started
immediately after the binary that forked off by the manager exits. <emphasis>The use of this type immediately after the binary that forked off by the manager exits. <emphasis>The use of this type
@ -622,6 +624,12 @@
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>). <citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>).
</para> </para>
<para>Note that the start timeout is also applied to service reloads, regardless if implemented
through <varname>ExecReload=</varname> or via the reload logic enabled via <varname>Type=notify-reload</varname>.
If the reload does not complete within the configured time, the reload will be considered failed and
the service will continue running with the old configuration. This will not affect the running service,
but will be logged and will cause e.g. <command>systemctl reload</command> to fail.</para>
<xi:include href="version-info.xml" xpointer="v188"/></listitem> <xi:include href="version-info.xml" xpointer="v188"/></listitem>
</varlistentry> </varlistentry>
@ -727,8 +735,8 @@
<listitem><para>Configures a maximum time for the service to run. If this is used and the service has been <listitem><para>Configures a maximum time for the service to run. If this is used and the service has been
active for longer than the specified time it is terminated and put into a failure state. Note that this setting active for longer than the specified time it is terminated and put into a failure state. Note that this setting
does not have any effect on <varname>Type=oneshot</varname> services, as they terminate immediately after does not have any effect on <varname>Type=oneshot</varname> services, as they terminate immediately after
activation completed. Pass <literal>infinity</literal> (the default) to configure no runtime activation completed (use <varname>TimeoutStartSec=</varname> to limit their activation).
limit.</para> Pass <literal>infinity</literal> (the default) to configure no runtime limit.</para>
<para>If a service of <varname>Type=notify</varname>/<varname>Type=notify-reload</varname> sends <para>If a service of <varname>Type=notify</varname>/<varname>Type=notify-reload</varname> sends
<literal>EXTEND_TIMEOUT_USEC=…</literal>, this may cause the runtime to be extended beyond <literal>EXTEND_TIMEOUT_USEC=…</literal>, this may cause the runtime to be extended beyond
@ -928,20 +936,40 @@
<listitem> <listitem>
<para>Takes a string value that specifies how a service should restart: <para>Takes a string value that specifies how a service should restart:
<itemizedlist> <itemizedlist>
<listitem><para>If set to <option>normal</option> (the default), the service restarts by <listitem>
going through a failed/inactive state.</para></listitem> <para>If set to <option>normal</option> (the default), the service restarts by going through
a failed/inactive state.</para>
<listitem><para>If set to <option>direct</option>, the service transitions to the activating <xi:include href="version-info.xml" xpointer="v254"/>
state directly during auto-restart, skipping failed/inactive state. </listitem>
<varname>ExecStopPost=</varname> is invoked.
<varname>OnSuccess=</varname> and <varname>OnFailure=</varname> are skipped.</para></listitem> <listitem>
<para>If set to <option>direct</option>, the service transitions to the activating
state directly during auto-restart, skipping failed/inactive state.
<varname>ExecStopPost=</varname> is invoked.
<varname>OnSuccess=</varname> and <varname>OnFailure=</varname> are skipped.</para>
<para>This option is useful in cases where a dependency can fail temporarily but we don't
want these temporary failures to make the dependent units fail. Dependent units are not
notified of these temporary failures.</para>
<xi:include href="version-info.xml" xpointer="v254"/>
</listitem>
<listitem>
<para>If set to <option>debug</option>, the service manager will log messages that are
related to this unit at debug level while automated restarts are attempted, until either the
service hits the rate limit or it succeeds, and the <varname>$DEBUG_INVOCATION=1</varname>
environment variable will be set for the unit. This is useful to be able to get additional
information when a service fails to start, without needing to proactively or permanently
enable debug level logging in systemd, which is very verbose. This is otherwise equivalent
to <option>normal</option> mode.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</itemizedlist> </itemizedlist>
</para> </para>
<para>This option is useful in cases where a dependency can fail temporarily
but we don't want these temporary failures to make the dependent units fail.
When this option is set to <option>direct</option>, dependent units are not notified of these temporary failures.</para>
<xi:include href="version-info.xml" xpointer="v254"/> <xi:include href="version-info.xml" xpointer="v254"/>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -853,18 +853,15 @@
<varlistentry> <varlistentry>
<term><varname>FileDescriptorName=</varname></term> <term><varname>FileDescriptorName=</varname></term>
<listitem><para>Assigns a name to all file descriptors this <listitem><para>Assigns a name to all file descriptors this socket unit encapsulates.
socket unit encapsulates. This is useful to help activated This is useful to help activated services identify specific file descriptors, if multiple fds are passed.
services identify specific file descriptors, if multiple fds Services may use the
are passed. Services may use the
<citerefentry><refentrytitle>sd_listen_fds_with_names</refentrytitle><manvolnum>3</manvolnum></citerefentry> <citerefentry><refentrytitle>sd_listen_fds_with_names</refentrytitle><manvolnum>3</manvolnum></citerefentry>
call to acquire the names configured for the received file call to acquire the names configured for the received file descriptors. Names may contain any ASCII character,
descriptors. Names may contain any ASCII character, but must but must exclude control characters and <literal>:</literal>, and must be at most 255 characters in length.
exclude control characters and <literal>:</literal>, and must If this setting is not used, the file descriptor name defaults to the name of the socket unit
be at most 255 characters in length. If this setting is not (including its <filename>.socket</filename> suffix) when <varname>Accept=no</varname>,
used, the file descriptor name defaults to the name of the <literal>connection</literal> otherwise.</para>
socket unit, including its <filename>.socket</filename>
suffix.</para>
<xi:include href="version-info.xml" xpointer="v227"/></listitem> <xi:include href="version-info.xml" xpointer="v227"/></listitem>
</varlistentry> </varlistentry>

View File

@ -334,6 +334,27 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>shell.prompt.prefix</varname></term>
<term><varname>shell.prompt.suffix</varname></term>
<listitem>
<para>Defines strings to prefix and suffix any interactive UNIX shell prompt with. For details see
<citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>shell.welcome</varname></term>
<listitem>
<para>Define a string to print when an interactive UNIX shell initializes. For details see
<citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
<xi:include href="version-info.xml" xpointer="v257"/>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>system.machine_id</varname></term> <term><varname>system.machine_id</varname></term>
<listitem> <listitem>

View File

@ -173,13 +173,13 @@
section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is section. When the unit is enabled, symlinks will be created for those names, and removed when the unit is
disabled. For example, <filename>reboot.target</filename> specifies disabled. For example, <filename>reboot.target</filename> specifies
<varname>Alias=ctrl-alt-del.target</varname>, so when enabled, the symlink <varname>Alias=ctrl-alt-del.target</varname>, so when enabled, the symlink
<filename>/etc/systemd/system/ctrl-alt-del.service</filename> pointing to the <filename>/etc/systemd/system/ctrl-alt-del.target</filename> pointing to the
<filename>reboot.target</filename> file will be created, and when <filename>reboot.target</filename> file will be created, and when
<keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> is invoked, <keycombo><keycap>Ctrl</keycap><keycap>Alt</keycap><keycap>Del</keycap></keycombo> is invoked,
<command>systemd</command> will look for the <filename>ctrl-alt-del.service</filename> and execute <command>systemd</command> will look for <filename>ctrl-alt-del.target</filename>, follow the symlink to
<filename>reboot.service</filename>. <command>systemd</command> does not look at the [Install] section at <filename>reboot.target</filename>, and execute <filename>reboot.service</filename> as part of that target.
all during normal operation, so any directives in that section only have an effect through the symlinks <command>systemd</command> does not look at the [Install] section at all during normal operation, so any
created during enablement.</para> directives in that section only have an effect through the symlinks created during enablement.</para>
<para>Along with a unit file <filename>foo.service</filename>, the directory <para>Along with a unit file <filename>foo.service</filename>, the directory
<filename>foo.service.wants/</filename> may exist. All unit files symlinked from such a directory are <filename>foo.service.wants/</filename> may exist. All unit files symlinked from such a directory are
@ -832,7 +832,7 @@
type when precisely a unit has finished starting up. Most importantly, for service units start-up is type when precisely a unit has finished starting up. Most importantly, for service units start-up is
considered completed for the purpose of <varname>Before=</varname>/<varname>After=</varname> when all considered completed for the purpose of <varname>Before=</varname>/<varname>After=</varname> when all
its configured start-up commands have been invoked and they either failed or reported start-up its configured start-up commands have been invoked and they either failed or reported start-up
success. Note that this does includes <varname>ExecStartPost=</varname> (or success. Note that this includes <varname>ExecStartPost=</varname> (or
<varname>ExecStopPost=</varname> for the shutdown case).</para> <varname>ExecStopPost=</varname> for the shutdown case).</para>
<para>Note that those settings are independent of and orthogonal to the requirement dependencies as <para>Note that those settings are independent of and orthogonal to the requirement dependencies as

View File

@ -89,28 +89,22 @@
<refsect1> <refsect1>
<title>Units</title> <title>Units</title>
<para>systemd provides a dependency system between various <para>systemd provides a dependency system between various entities called "units" of 11 different
entities called "units" of 11 different types. Units encapsulate types. Units encapsulate various objects that are relevant for system boot-up and maintenance. The
various objects that are relevant for system boot-up and majority of units are configured in unit configuration files, whose syntax and basic set of options is
maintenance. The majority of units are configured in unit
configuration files, whose syntax and basic set of options is
described in described in
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
however some are created automatically from other configuration however some are created automatically from other configuration files, dynamically from system state or
files, dynamically from system state or programmatically at runtime. programmatically at runtime. Units may be "active" (meaning started, bound, plugged in, …, depending on
Units may be "active" (meaning started, bound, plugged in, …, the unit type, see below), or "inactive" (meaning stopped, unbound, unplugged, …), as well as in the
depending on the unit type, see below), or "inactive" (meaning process of being activated or deactivated, i.e. between the two states (these states are called
stopped, unbound, unplugged, …), as well as in the process of "activating", "deactivating"). A special "failed" state is available as well, which is very similar to
being activated or deactivated, i.e. between the two states (these "inactive" and is entered when the service failed in some way (process returned error code on exit, or
states are called "activating", "deactivating"). A special crashed, an operation timed out, or after too many restarts). If this state is entered, the cause will
"failed" state is available as well, which is very similar to be logged, for later reference. Units may also be in a special transient state for a time, to indicate
"inactive" and is entered when the service failed in some way that some operation is being performed on them, before reverting to the previous state, such as
(process returned error code on exit, or crashed, an operation "maintenance", "reloading" or "refreshing". Note that the various unit types may have a number of
timed out, or after too many restarts). If this state is entered, additional substates, which are mapped to the five generalized unit states described here.</para>
the cause will be logged, for later reference. Note that the
various unit types may have a number of additional substates,
which are mapped to the five generalized unit states described
here.</para>
<para>The following unit types are available:</para> <para>The following unit types are available:</para>
@ -574,7 +568,11 @@
<listitem><para>Enables display of status messages on the <listitem><para>Enables display of status messages on the
console, as controlled via console, as controlled via
<varname>systemd.show_status=1</varname> on the kernel command <varname>systemd.show_status=1</varname> on the kernel command
line.</para></listitem> line.</para>
<para>You may want to use <function>SetShowStatus()</function> instead of
<constant>SIGRTMIN+20</constant> in order to prevent race conditions. See
<citerefentry project="man-pages"><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -585,7 +583,11 @@
controlled via controlled via
<varname>systemd.show_status=0</varname> <varname>systemd.show_status=0</varname>
on the kernel command on the kernel command
line.</para></listitem> line.</para>
<para>You may want to use <function>SetShowStatus()</function> instead of
<constant>SIGRTMIN+21</constant> in order to prevent race conditions. See
<citerefentry project="man-pages"><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -843,9 +845,8 @@
<listitem><para>Takes a boolean argument or enables the option if specified <listitem><para>Takes a boolean argument or enables the option if specified
without an argument. If enabled, the system manager (PID 1) spawns a shell without an argument. If enabled, the system manager (PID 1) spawns a shell
when it crashes, after a 10s delay. Otherwise, no shell is spawned. Defaults when it crashes. Otherwise, no shell is spawned. Defaults to disabled, for
to disabled, for security reasons, as the shell is not protected by password security reasons, as the shell is not protected by password authentication.</para>
authentication.</para>
<xi:include href="version-info.xml" xpointer="v233"/></listitem> <xi:include href="version-info.xml" xpointer="v233"/></listitem>
</varlistentry> </varlistentry>

Some files were not shown because too many files have changed in this diff Show More