]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 days agologind: log peer ID when shutdown is called 41229/head
Michael Vogt [Tue, 24 Mar 2026 14:40:40 +0000 (15:40 +0100)] 
logind: log peer ID when shutdown is called

The io.systemd.Manager.{PowerOff,SoftReboot,Halt,Kexec} manager
varlink and bus methods log the peer ID when calling shutdown.

The logind code is missing this, so this commit adds a similar
logging now. The code is quite similar to the one in existing in
src/core/manager.c but its hard to share code so this adds a bit
of duplication.

12 days agologind: extend verify_shutdown_creds() to take `sd_varlink *link`
Michael Vogt [Fri, 20 Mar 2026 12:49:50 +0000 (13:49 +0100)] 
logind: extend verify_shutdown_creds() to take `sd_varlink *link`

To properly support a shutdown interface with varlink we need
the functionality of verify_shutdown_creds(). This is currently
dbus only. There are some options:
1. refactor and abstract so that verify_shutdown_creds() is agnostic
2. provide a equivalent function with varlink
3. allow to call it with either a dbus or a varlink message.

The most elegant of course is (1) but it makes reviewing harder
and has a higher regression risk. It will also be more code.

Doing (2) has the risk of drift, i.e. we will need to keep
the two functions in sync and not forget about it ever.

So this commit opts for (3): allowing either dbus or varlink.
This is quite ugly, however the big advantage is that its very
simple to review as the dbus/varlink branches mirror each other.
And there is no risk of drift the dbus/varlink options are
close to each other. It unlikely we get a third bus, so it will
most likely stay this way. It is still ugly though so I can
understand if this is undesired and I can look into (1) if its
too ugly.

With this function avaialble logind-varlink.c is now updated to
use it.

12 days agologind: move verify_shutdown_creds() to logind-shutdown.c
Michael Vogt [Fri, 20 Mar 2026 12:42:30 +0000 (13:42 +0100)] 
logind: move verify_shutdown_creds() to logind-shutdown.c

Move verify_shutdown_creds() and its helper have_multiple_sessions()
from logind-dbus.c to logind-shutdown.c so that they can be reused
by the varlink transport. No functional changes.

Also prefix both with `manager_` now that they are public.

12 days agologind: add io.systemd.Shutdown varlink Shutdown interface
Michael Vogt [Fri, 20 Mar 2026 12:37:59 +0000 (13:37 +0100)] 
logind: add io.systemd.Shutdown varlink Shutdown interface

The shutdown interface is currently only exposed via dbus. This commit
adds a comparable varlink implementation. It is inspired by the existing
dbus methods and implements PowerOff, Reboot, Halt, Kexec, SoftReboot.

It is (intentional) simpler than the dbus for now, i.e. strictly root
only. To match dbus we will need to the functionality
of verify_shutdown_creds() which is dbus-ish right now and would
need some refactor.

For the same reason it does not do the Can* methods - we will need
the verify_shutdown_creds() equivalent first.

12 days agologind: move reset_scheduled_shutdown() to new logind-shutdown.c
Michael Vogt [Fri, 20 Mar 2026 12:37:42 +0000 (13:37 +0100)] 
logind: move reset_scheduled_shutdown() to new logind-shutdown.c

This function operates on generic Manager state and will be needed
by the varlink shutdown interface too. Move it out of logind-dbus.c
into a new logind-shutdown.c, alongside the SHUTDOWN_SCHEDULE_FILE
define and use `manager_reset_scheduled_shutdown() as the new
name.

12 days agocoredumpctl: use loop_write() for dumping inline journal coredumps
noxiouz [Tue, 7 Apr 2026 13:52:38 +0000 (14:52 +0100)] 
coredumpctl: use loop_write() for dumping inline journal coredumps

Replace the bare write() call with loop_write(), which handles short
writes and EINTR retries. This also drops the now-unnecessary ssize_t
variable and the redundant r = log_error_errno(r, ...) self-assignment,
since loop_write() already stores its result in r.

Co-developed-by: Codex (GPT-5) <noreply@openai.com>
12 days agoAnother batch of option/verb conversions (#41532)
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2026 14:13:31 +0000 (16:13 +0200)] 
Another batch of option/verb conversions (#41532)

Partially generated with Claude but then edited to fix conversions
errors.

13 days agooci-registry: use overrideRegistry in fedora default
LevitatingBusinessMan (Rein Fernhout) [Mon, 6 Apr 2026 01:14:24 +0000 (03:14 +0200)] 
oci-registry: use overrideRegistry in fedora default

In registry.fedora.oci-registry use overrideRegistry instead of defaultRegistry.

fixes #41518

13 days agovmspawn: Always enable CXL on supported architectures
Daan De Meyer [Tue, 7 Apr 2026 08:59:03 +0000 (08:59 +0000)] 
vmspawn: Always enable CXL on supported architectures

Drop the --cxl= option and unconditionally enable cxl=on the QEMU
machine type whenever the host architecture supports it (x86_64 and
aarch64). The flag was only added for testing parity with mkosi's CXL=
setting and there is no reason to leave it as an opt-in toggle: with no
pxb-cxl device or cxl-fmw window attached, enabling it on the machine
only reserves a small MMIO region and emits an empty CEDT, so the cost
is negligible while removing one knob users would otherwise have to
flip explicitly to exercise the CXL code paths in QEMU.

13 days agorepart: fix option spelling and file path in comments and manpage (#41534)
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2026 09:42:25 +0000 (11:42 +0200)] 
repart: fix option spelling and file path in comments and manpage (#41534)

Two minor fixes in comments and documentation:

 - Update comment that mentions file renamed in 211d2f972dd1
 - Do not reference `SizeMin=` where `SizeMinBytes=` is meant

No functional changes.

13 days agojournald-native: fix field-count limit off-by-one
noxiouz [Mon, 6 Apr 2026 10:22:58 +0000 (11:22 +0100)] 
journald-native: fix field-count limit off-by-one

Reject entries once the configured maximum field count is reached.

The previous check used n > ENTRY_FIELD_COUNT_MAX before appending a new field,
which let one extra field through in boundary cases. Switch the check to
n >= ENTRY_FIELD_COUNT_MAX so an entry at the limit is rejected before adding
another property.

Co-developed-by: Codex (GPT-5) <noreply@openai.com>
13 days agorepart: Do not refer to SizeMinBytes= as SizeMin= 41534/head
Jonas Rebmann [Tue, 7 Apr 2026 09:06:25 +0000 (11:06 +0200)] 
repart: Do not refer to SizeMinBytes= as SizeMin=

No SizeMin= option exists for repart.d; it seems that SizeMinBytes= was
intended.

Update all references accordingly.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
13 days agotest-specifier: update comment to moved file
Jonas Rebmann [Tue, 7 Apr 2026 09:03:48 +0000 (11:03 +0200)] 
test-specifier: update comment to moved file

src/partition/repart.c was renamed to src/repart/repart.c in commit
211d2f972dd1 ("Rename src/partition to src/repart"), update the comment
accordingly.

Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
13 days agoboot-check-no-failures: convert to the new option parser 41532/head
Zbigniew Jędrzejewski-Szmek [Sun, 5 Apr 2026 15:41:12 +0000 (17:41 +0200)] 
boot-check-no-failures: convert to the new option parser

--help is identical except for whitespace changes.
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agobattery-check: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sun, 5 Apr 2026 15:38:46 +0000 (17:38 +0200)] 
battery-check: convert to the new option parser

--help is identical except for whitespace changes.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agoupdatectl: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 19:52:46 +0000 (21:52 +0200)] 
updatectl: convert to the new option and verb parsers

Cosmetic differences in --help only.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agotpm2-setup: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 19:29:38 +0000 (21:29 +0200)] 
tpm2-setup: convert to the new option parser

--help is identical except for whitespace changes.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agotpm2-clear: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 19:26:01 +0000 (21:26 +0200)] 
tpm2-clear: convert to the new option parser

--help is identical except for whitespace changes.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agotest-offline-passwd: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 19:15:54 +0000 (21:15 +0200)] 
test-offline-passwd: convert to the new option parser

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agosysusers: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 19:08:51 +0000 (21:08 +0200)] 
sysusers: convert to the new option parser

Cosmetic differences in --help only.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agotmpfiles: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 18:54:02 +0000 (20:54 +0200)] 
tmpfiles: convert to the new option parser

The --image fallthrough into -E is replaced by duplicating the
exclude_default_prefixes() call inline.

Cosmetic differences in --help only.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agovarlinkctl: convert to the new verb macros
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 18:24:16 +0000 (20:24 +0200)] 
varlinkctl: convert to the new verb macros

The description of --exec is moved to a separate footer. It requires
special formatting and doesn't fit in the autogenerated table of
verbs.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agovarlinkctl: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 18:16:28 +0000 (20:16 +0200)] 
varlinkctl: convert to the new option parser

The -E short option previously used fallthrough into the --more case;
since macro-generated case labels don't support fallthrough (with some
older compilers), the --more logic is now duplicated inline in the -E
handler.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agoimdsd: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 17:58:52 +0000 (19:58 +0200)] 
imdsd: convert to the new option parser

Previously -w was ambiguously described in --help as taking an argument,
but it is in fact an argumentless alias for --wait=yes.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agoshared/options: quote the metavar in --help output
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 18:38:52 +0000 (20:38 +0200)] 
shared/options: quote the metavar in --help output

imdsd uses --extra-header='NAME: VALUE'. We could include the quotes
in the metavar string, but I think it's nicer to only do that in the
printed output, so that later, when we add introspection, the value
there will not include the quotes.

13 days agoimds: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 17:43:04 +0000 (19:43 +0200)] 
imds: convert to the new option parser

Cosmetic changes in --help output only.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agoTwo small fixes (#41506)
Christian Brauner [Tue, 7 Apr 2026 07:11:07 +0000 (09:11 +0200)] 
Two small fixes (#41506)

13 days agosd-json, ssh-proxy: two bugfixes (#41529)
Christian Brauner [Tue, 7 Apr 2026 06:53:36 +0000 (08:53 +0200)] 
sd-json, ssh-proxy: two bugfixes (#41529)

  - Fix sd_json_variant_unsigned() dispatching to the wrong accessor
    for json variant references.
  - Fix a use-after-free of a borrowed varlink reply reference in
    ssh-proxy.

13 days agovmspawn: use machine name in runtime directory path (#41530)
Christian Brauner [Mon, 6 Apr 2026 22:23:19 +0000 (00:23 +0200)] 
vmspawn: use machine name in runtime directory path (#41530)

Replace the random hex suffix in the runtime directory with the machine
name, changing the layout from /run/systemd/vmspawn.<random> to
/run/systemd/vmspawn/<machine-name>/.

This makes runtime directories machine-discoverable from the filesystem
and groups all vmspawn instances under a shared parent directory,
similar to how nspawn uses /run/systemd/nspawn/.

Use runtime_directory_generic() instead of runtime_directory() since
vmspawn is not a service with RuntimeDirectory= set and the
$RUNTIME_DIRECTORY check in the latter never succeeds. The directory is
always created by vmspawn itself and cleaned up via
rm_rf_physical_and_freep on exit. The parent vmspawn/ directory is
intentionally left behind as a shared namespace.

13 days agovmspawn: use machine name in runtime directory path 41530/head
Christian Brauner [Wed, 1 Apr 2026 13:59:13 +0000 (15:59 +0200)] 
vmspawn: use machine name in runtime directory path

Replace the random hex suffix in the runtime directory with the machine
name, changing the layout from /run/systemd/vmspawn.<random> to
/run/systemd/vmspawn/<machine-name>/.

This makes runtime directories machine-discoverable from the filesystem
and groups all vmspawn instances under a shared parent directory, similar
to how nspawn uses /run/systemd/nspawn/.

Use runtime_directory_generic() instead of runtime_directory() since
vmspawn is not a service with RuntimeDirectory= set and the
$RUNTIME_DIRECTORY check in the latter never succeeds. The directory is
always created by vmspawn itself and cleaned up via
rm_rf_physical_and_freep on exit. The parent vmspawn/ directory is
intentionally left behind as a shared namespace.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agosd-json: fix sd_json_variant_unsigned() dispatching to wrong accessor for references 41529/head
Christian Brauner [Wed, 1 Apr 2026 21:23:18 +0000 (23:23 +0200)] 
sd-json: fix sd_json_variant_unsigned() dispatching to wrong accessor for references

sd_json_variant_unsigned() incorrectly calls sd_json_variant_integer()
for reference-type variants instead of recursing to itself. This silently
returns 0 for unsigned values in the range INT64_MAX+1 through
UINT64_MAX, since sd_json_variant_integer() cannot represent them.

The sibling functions sd_json_variant_integer() and
sd_json_variant_real() correctly recurse to themselves.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agossh-proxy: fix use-after-free of borrowed varlink reply reference
Christian Brauner [Thu, 2 Apr 2026 07:01:16 +0000 (09:01 +0200)] 
ssh-proxy: fix use-after-free of borrowed varlink reply reference

sd_varlink_call_full() returns borrowed references into the varlink
connection's receive buffer (v->current). fetch_machine() stored this
borrowed reference with _cleanup_(sd_json_variant_unrefp), which would
unref it on error paths -- potentially freeing the parent object while
the varlink connection still owns it. On success, TAKE_PTR passed the
raw borrowed pointer to the caller, but the varlink connection (and its
receive buffer) is freed when fetch_machine returns, leaving the caller
with a dangling pointer.

Fix by removing the cleanup attribute (the reference is borrowed, not
owned) and taking a real ref via sd_json_variant_ref() before returning
to the caller, so the data survives the varlink connection's cleanup.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agoshared: introduce MachineRegistrationContext to track bus and registration state
Christian Brauner [Mon, 6 Apr 2026 18:03:21 +0000 (20:03 +0200)] 
shared: introduce MachineRegistrationContext to track bus and registration state

Bundle scope, buses, and registration success booleans into a
MachineRegistrationContext struct. This eliminates the reterr_registered_system and
reterr_registered_user output parameters from
register_machine_with_fallback_and_log() and the corresponding input
parameters from unregister_machine_with_fallback_and_log().

The struct carries state from registration to unregistration so the
caller no longer needs to manually thread individual booleans between
the two calls.

register_machine_with_fallback_and_log() goes from 7 to 3 parameters,
unregister_machine_with_fallback_and_log() goes from 5 to 2.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agoshared: introduce MachineRegistration struct for machine registration
Christian Brauner [Mon, 6 Apr 2026 17:57:52 +0000 (19:57 +0200)] 
shared: introduce MachineRegistration struct for machine registration

Replace the long positional parameter lists in register_machine() and
register_machine_with_fallback_and_log() with a MachineRegistration
struct that bundles all machine-describing fields.

This reduces register_machine() from 13 parameters to 3 and
register_machine_with_fallback_and_log() from 17 parameters to 7.
Callers now use designated initializers, which makes omitted fields
(zero/NULL/false) implicit and the code much more readable.

Field names are aligned with the existing Machine struct in machine.h
(id, root_directory, vsock_cid, ssh_address, ssh_private_key_path).

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agoshared: document allocateUnit limitation on D-Bus fallback path
Christian Brauner [Mon, 6 Apr 2026 18:27:09 +0000 (20:27 +0200)] 
shared: document allocateUnit limitation on D-Bus fallback path

The D-Bus registration methods (RegisterMachineEx, RegisterMachineWithNetwork)
do not support the allocateUnit feature that the varlink path provides.
When varlink is unavailable and registration falls back to D-Bus, machined
discovers the caller's existing cgroup unit instead of creating a dedicated
scope. Callers that skip client-side scope allocation (relying on the
server to do it via allocateUnit) will end up without a dedicated scope
on the D-Bus fallback path.

Document this limitation at the fallback site so callers are aware.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agovmspawn: only open runtime bus when needed for registration or scope allocation
Christian Brauner [Mon, 6 Apr 2026 18:21:52 +0000 (20:21 +0200)] 
vmspawn: only open runtime bus when needed for registration or scope allocation

The runtime bus (user bus in user scope, system bus in system scope) is
only needed for scope allocation (!arg_keep_unit) or machine registration
(arg_register != 0). When both are disabled the bus was still opened
unconditionally which causes unnecessary failures if the user bus is
unavailable.

Gate the runtime bus opening on the same condition nspawn already uses.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agovmspawn: fix error message when opening user bus
Christian Brauner [Mon, 6 Apr 2026 18:20:49 +0000 (20:20 +0200)] 
vmspawn: fix error message when opening user bus

The error message incorrectly says "system bus" when the code is
actually opening the user bus via sd_bus_default_user().

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
13 days agonspawn: rename --user= to --uid= and repurpose --user/--system for runtime scope
Daan De Meyer [Sun, 29 Mar 2026 11:10:42 +0000 (11:10 +0000)] 
nspawn: rename --user= to --uid= and repurpose --user/--system for runtime scope

Rename nspawn's --user=NAME option to --uid=NAME for selecting the
container user. The -u short option is preserved. --user=NAME and
--user NAME are still accepted but emit a deprecation warning. A
pre-parsing step stitches the space-separated --user NAME form into
--user=NAME before getopt sees it, preserving backwards compatibility
despite --user now being an optional_argument.

Repurpose --user (without argument) and --system as standalone
switches for selecting the runtime scope (user vs system service
manager).

Replace all uses of the arg_privileged boolean with
arg_runtime_scope comparisons throughout nspawn. The default scope
is auto-detected from the effective UID.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agoshared: move machine registration to shared machine-register.{c,h}
Daan De Meyer [Sun, 29 Mar 2026 18:22:40 +0000 (18:22 +0000)] 
shared: move machine registration to shared machine-register.{c,h}

Move register_machine() and unregister_machine() from
vmspawn-register.{c,h} into shared machine-register.{c,h} so both
nspawn and vmspawn can use the same implementation.

The unified register_machine() uses varlink first (for richer
features like SSH support and unit allocation) with a D-Bus
RegisterMachineWithNetwork fallback for older machined. The
interface adds a class parameter ("vm" or "container") and
local_ifindex for nspawn's network interface support.

The unified unregister_machine() similarly tries varlink first
(io.systemd.Machine.Unregister) before falling back to D-Bus.

Both register_machine() and unregister_machine() only log at debug
level internally, leaving error/notice logging to callers.

Add register_machine_with_fallback() which tries system and/or user
scope registration based on a RuntimeScope parameter
(_RUNTIME_SCOPE_INVALID for both), and
unregister_machine_with_fallback() as its counterpart. Both use
RET_GATHER() to collect errors from each scope.

Make --register= a tristate (yes/no/auto) defaulting to auto. When
set to auto, registration failures are logged at notice level and
ignored. When set to yes, failures are fatal.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
13 days agomachined: skip leader ownership check for user scope
Daan De Meyer [Sat, 4 Apr 2026 18:00:13 +0000 (18:00 +0000)] 
machined: skip leader ownership check for user scope

When registering a machine, machined verifies that the leader process
is owned by the calling user via process_is_owned_by_uid(). This
check fails for user scope machined when the leader is inside a user
namespace: after the leader calls setns(CLONE_NEWUSER), it becomes
non-dumpable, and the subsequent ptrace_may_access() check in the
kernel denies access to the process's user namespace, since the
calling user lacks CAP_SYS_PTRACE in the mm's user namespace (the
host namespace), even though the user owns the child user namespace.

Skip this check when running in user scope. For system scope, the
check is important because multiple users share the same machined
instance, so one user must not be able to claim another user's process
as a machine leader. For user scope this is unnecessary: the varlink
socket lives under $XDG_RUNTIME_DIR (mode 0700), so only the owning
user can connect, and the user machined instance can only perform
operations bounded by that user's own privileges. Registering a
foreign PID does not escalate capabilities.

13 days agonamespace-util: Add logging to process_is_owned_by_uid()
Daan De Meyer [Sat, 4 Apr 2026 17:56:13 +0000 (19:56 +0200)] 
namespace-util: Add logging to process_is_owned_by_uid()

2 weeks agovmspawn: Redirect QEMU's stdin/stdout/stderr to the PTY
Daan De Meyer [Sun, 5 Apr 2026 20:51:37 +0000 (20:51 +0000)] 
vmspawn: Redirect QEMU's stdin/stdout/stderr to the PTY

When a PTY is allocated for the console, QEMU's own stdio file
descriptors were still inherited directly from vmspawn, meaning any
output QEMU writes to stdout/stderr (e.g. warnings) would bypass the
PTY forwarder and go straight to the terminal. Similarly, QEMU could
read directly from the terminal's stdin.

Fix this by opening the PTY slave side and passing it as stdio_fds to
the fork call with FORK_REARRANGE_STDIO, so that all of QEMU's I/O
goes through the PTY and is properly forwarded.

2 weeks agovmspawn: Use ~ instead of ! as negation prefix for --firmware-features=
Daan De Meyer [Sun, 5 Apr 2026 17:46:12 +0000 (17:46 +0000)] 
vmspawn: Use ~ instead of ! as negation prefix for --firmware-features=

Switch the negation character for firmware feature exclusion from
"!" to "~" to be consistent with other systemd options that support
negation such as SystemCallFilter=.

2 weeks agovmspawn: Add comment explaining substring match in firmware_data_matches_machine()
Daan De Meyer [Sun, 5 Apr 2026 17:43:33 +0000 (17:43 +0000)] 
vmspawn: Add comment explaining substring match in firmware_data_matches_machine()

The machine types in QEMU firmware descriptions are glob patterns
like "pc-q35-*", so we use strstr() substring matching to check if
our machine type is covered by a given firmware entry.

2 weeks agoswtpm-util: Silence noise from swtpm_setup
Daan De Meyer [Sun, 5 Apr 2026 17:36:14 +0000 (19:36 +0200)] 
swtpm-util: Silence noise from swtpm_setup

There's no way to configure the log level for swtpm_setup, so pipe
it's logfile (which defaults to stderr) to /dev/null unless debug
logging is enabled.

2 weeks agoswtpm: gracefully fall back when --print-profiles output is not JSON
Daan De Meyer [Sun, 5 Apr 2026 17:12:35 +0000 (17:12 +0000)] 
swtpm: gracefully fall back when --print-profiles output is not JSON

Older swtpm versions print --help output instead of JSON when
swtpm_setup --print-profiles is invoked. Previously, the JSON parse
failure was treated as fatal, preventing swtpm manufacture entirely on
these older versions.

Extract profile detection into a separate swtpm_find_best_profile()
helper and treat JSON parse failure as a graceful fallback: log a
notice and continue without a profile, same as when no builtin profiles
are found.

2 weeks agovmspawn: Fix qemu-kvm path on centos stream
Daan De Meyer [Sun, 5 Apr 2026 16:37:31 +0000 (18:37 +0200)] 
vmspawn: Fix qemu-kvm path on centos stream

Follow up for 41da1ae6a042363e856b1748c11cd176ef1991c8

2 weeks agohwdb: cooler master rgb controller is not a mouse
Luan Vitor Simião oliveira [Sun, 5 Apr 2026 05:37:05 +0000 (02:37 -0300)] 
hwdb: cooler master rgb controller is not a mouse

2 weeks agoudev: also trigger loop device for boot disk when partition scanning is unsupported...
Christian Brauner [Sun, 5 Apr 2026 14:33:46 +0000 (16:33 +0200)] 
udev: also trigger loop device for boot disk when partition scanning is unsupported (#41509)

Previously, probe_gpt_sector_size_mismatch() would bail out early when
the GPT sector size matched the device sector size. However, some
devices (e.g. certain CD-ROM drives) do not support kernel partition
scanning even when sector sizes match. In that case, the kernel still
cannot parse the partition table, and we need to set up a loop device to
expose the partitions — just as we do for the sector size mismatch case.

Check blockdev_partscan_enabled() when sector sizes match, and only skip
the boot partition check if partition scanning is actually supported.

Also rename the function, udev property, and log messages to reflect the
broader scope:

- probe_gpt_sector_size_mismatch() -> probe_gpt_boot_disk_needs_loop()
- ID_PART_GPT_AUTO_ROOT_DISK_SECTOR_SIZE_MISMATCH ->
ID_PART_GPT_AUTO_ROOT_DISK_NEEDS_LOOP

2 weeks agoboot: generalize CDROM terminology to El Torito 41509/head
Daan De Meyer [Sun, 5 Apr 2026 08:17:59 +0000 (08:17 +0000)] 
boot: generalize CDROM terminology to El Torito

Per UEFI specification §13.3.2, El Torito partition discovery applies to
any block device, not just optical media. Rename
disk_get_part_uuid_cdrom() to disk_get_part_uuid_eltorito() and update
all log messages and comments to say "El Torito" instead of "CDROM" to
reflect this.

2 weeks agovmspawn: also search for qemu binary at /usr/lib/qemu-kvm
Daan De Meyer [Sat, 4 Apr 2026 22:02:46 +0000 (22:02 +0000)] 
vmspawn: also search for qemu binary at /usr/lib/qemu-kvm

This is the qemu binary path on CentOS Stream.

2 weeks agoudev: also trigger loop device for boot disk when partition scanning is unsupported
Daan De Meyer [Sat, 4 Apr 2026 22:24:47 +0000 (22:24 +0000)] 
udev: also trigger loop device for boot disk when partition scanning is unsupported

Previously, probe_gpt_sector_size_mismatch() would bail out early when
the GPT sector size matched the device sector size. However, some
devices (e.g. certain CD-ROM drives) do not support kernel partition
scanning even when sector sizes match. In that case, the kernel still
cannot parse the partition table, and we need to set up a loop device to
expose the partitions — just as we do for the sector size mismatch case.

Check blockdev_partscan_enabled() when sector sizes match, and only skip
the boot partition check if partition scanning is actually supported.

Also rename the function, udev property, and log messages to reflect the
broader scope:

- probe_gpt_sector_size_mismatch() -> probe_gpt_boot_disk_needs_loop()
- ID_PART_GPT_AUTO_ROOT_DISK_SECTOR_SIZE_MISMATCH -> ID_PART_GPT_AUTO_ROOT_DISK_NEEDS_LOOP

2 weeks agoshutdown: enforce a minimum uptime to make boot loops less annoying (#41215)
Lennart Poettering [Sat, 4 Apr 2026 21:30:30 +0000 (23:30 +0200)] 
shutdown: enforce a minimum uptime to make boot loops less annoying (#41215)

Fixes: #9453
Split out of #41016

2 weeks agoupdate TODO 41215/head
Lennart Poettering [Wed, 25 Mar 2026 22:49:49 +0000 (23:49 +0100)] 
update TODO

2 weeks agoshutdown: enforce a minimum uptime to make boot loops less annoying
Lennart Poettering [Tue, 10 Mar 2026 07:06:02 +0000 (08:06 +0100)] 
shutdown: enforce a minimum uptime to make boot loops less annoying

Fixes: #9453
2 weeks agoshutdown: check WATCHDOG_PID= if it is set
Lennart Poettering [Thu, 26 Mar 2026 07:50:08 +0000 (08:50 +0100)] 
shutdown: check WATCHDOG_PID= if it is set

Alternative to: #35167

2 weeks agoshutdown: paranoia, switch to secure_getenv()
Lennart Poettering [Fri, 20 Mar 2026 13:00:23 +0000 (14:00 +0100)] 
shutdown: paranoia, switch to secure_getenv()

We have this rule in systemd that unless we are sure that getenv() is
safe and there's a reason to use it we should always prefer
secure_getenv(). Follow our own rules here, as per CODING_STYLE
document.

This really doesn't matter here, all of this is highly privileged, but
hopefully Claude & Colleagues shut up about this then, and maybe detect
the pattern better.

2 weeks agomeson: fix coccinelle test names 41506/head
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 20:10:27 +0000 (22:10 +0200)] 
meson: fix coccinelle test names

fs.name() returns empty if the string ends with "/".

2 weeks agosd-varlink: simplify allocation
Zbigniew Jędrzejewski-Szmek [Wed, 1 Apr 2026 15:56:13 +0000 (17:56 +0200)] 
sd-varlink: simplify allocation

Suggested in post-merge review.

2 weeks agoudev: probe GPT sector size and trigger loop device on mismatch
Daan De Meyer [Mon, 30 Mar 2026 20:11:15 +0000 (20:11 +0000)] 
udev: probe GPT sector size and trigger loop device on mismatch

When the GPT partition table uses a different sector size than the
device's native block size (e.g. 512-byte GPT on a 2048-byte CD-ROM
booted via El Torito), the kernel cannot parse the partition table.

Probe the GPT sector size upfront and configure blkid with the correct
value so it always finds the partition table. If a sector size mismatch
is detected, trigger a loop device to re-expose the device with the
correct sector size and skip root partition discovery on the original
device — it will happen on the loop device instead.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 weeks agodissect: resolve sysfs paths to devnodes in --attach
Daan De Meyer [Thu, 2 Apr 2026 15:01:40 +0000 (15:01 +0000)] 
dissect: resolve sysfs paths to devnodes in --attach

When a udev rule uses ENV{SYSTEMD_WANTS}+="systemd-loop@.service" on a
block device, the %f specifier in the service file resolves to the sysfs
path rather than the device node path. Detect sysfs paths in
parse_image_path_argument() and resolve them to the corresponding
devnode using sd_device_new_from_syspath() + sd_device_get_devname().

2 weeks agoloop-util: Skip loop_device_set_autoclear() if foreign
Daan De Meyer [Thu, 2 Apr 2026 17:50:13 +0000 (19:50 +0200)] 
loop-util: Skip loop_device_set_autoclear() if foreign

2 weeks agodissect: Don't try to set loop name if foreign
Daan De Meyer [Thu, 2 Apr 2026 17:49:56 +0000 (19:49 +0200)] 
dissect: Don't try to set loop name if foreign

2 weeks agoboot: add El Torito CDROM partition UUID discovery
Daan De Meyer [Mon, 30 Mar 2026 19:23:10 +0000 (19:23 +0000)] 
boot: add El Torito CDROM partition UUID discovery

When booting from a CD-ROM via El Torito, the UEFI device path contains a
CDROM_DEVICE_PATH node instead of a HARDDRIVE_DEVICE_PATH node. Unlike the
hard drive variant, the CDROM node does not carry a partition UUID, so
systemd-boot previously could not determine the boot partition UUID in this
scenario.

Add disk_get_part_uuid_cdrom() which recovers the partition UUID by reading
the GPT from the underlying disk. Since ISO images are commonly mastered
with 512-byte GPT sectors on media with 2048-byte blocks, the function
probes for the GPT header at multiple sector sizes (512, 1024, 2048, 4096)
and matches the partition by comparing byte offsets between the CDROM node's
PartitionStart and each GPT entry's StartingLBA.

The function reuses read_gpt_entries() for GPT parsing and adds debug
logging for each failure path to aid diagnosis on real hardware.

Also adds the CDROM_DEVICE_PATH struct and MEDIA_CDROM_DP subtype constant
to device-path.h, and fixes disk_get_part_uuid() to preserve the original
device path pointer so it can be passed to the CDROM fallback.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 weeks agoboot: Split out read_gpt_entries()
Daan De Meyer [Mon, 30 Mar 2026 19:20:46 +0000 (21:20 +0200)] 
boot: Split out read_gpt_entries()

2 weeks agoboot: use EFI_DISK_IO_PROTOCOL instead of EFI_BLOCK_IO_PROTOCOL for disk reads
Daan De Meyer [Mon, 30 Mar 2026 18:59:09 +0000 (18:59 +0000)] 
boot: use EFI_DISK_IO_PROTOCOL instead of EFI_BLOCK_IO_PROTOCOL for disk reads

EFI_DISK_IO_PROTOCOL (UEFI spec section 13.7,
https://uefi.org/specs/UEFI/2.10/13_Protocols_Media_Access.html#disk-i-o-protocol)
supports reads at arbitrary byte offsets with no alignment requirements on the
buffer. The UEFI spec mandates that firmware produces this protocol on every
handle that also has EFI_BLOCK_IO_PROTOCOL, so it is always available.

This is a better fit than EFI_BLOCK_IO_PROTOCOL for our GPT parsing and
BitLocker detection because Block I/O requires that both the read offset (LBA)
and the buffer are aligned to the media's IoAlign value. Meeting that
constraint forces us to use xmalloc_aligned_pages() with
PHYSICAL_ADDRESS_TO_POINTER(), page-granularity allocations, and manual size
rounding (ALIGN_TO). Disk I/O handles all of that internally, so callers can
use plain xmalloc() or even stack buffers and read exactly the number of bytes
they need.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 weeks agorepart: Split out El Torito boot catalog writing into context_eltorito()
Daan De Meyer [Fri, 3 Apr 2026 19:53:42 +0000 (19:53 +0000)] 
repart: Split out El Torito boot catalog writing into context_eltorito()

Writing the El Torito boot catalog should be independent of writing the
partition table. Previously, the El Torito logic was embedded in
context_write_partition_table(), which meant it was skipped when the
partition table hadn't changed. Extract it into a separate
context_eltorito() function and invoke it after
context_write_partition_table() so the boot catalog is always written
when enabled.

Also move the overlap verification to be done as soon as we have all
the necessary information to do the check and before doing any expensive
work;

2 weeks agohwdb: sensor: aquarius improve comments
David Santamaría Rogado [Fri, 3 Apr 2026 18:59:42 +0000 (20:59 +0200)] 
hwdb: sensor: aquarius improve comments

Differentiate Cmp NS483 v2 accel variants.

2 weeks agoTEST-74-AUX-UTILS: check for failed units after capsule test
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 09:24:45 +0000 (11:24 +0200)] 
TEST-74-AUX-UTILS: check for failed units after capsule test

TEST-74-AUX-UTILS has a number of subtests.
test/units/TEST-74-AUX-UTILS.capsule.sh runs first and starts and stops
capsule@foobar.service. Looking at the test, the unit is cleanly stopped.
But later test/units/TEST-74-AUX-UTILS.machine-id-setup.sh tests for
failed units. capsule@foobar.service is listed as failed, causing the
second subtest to fail.

Add the same test in test/units/TEST-74-AUX-UTILS.capsule.sh to see
if the failed test really originates from there.

2 weeks agoTEST-70-TPM2: Suppress PCR public key auto-loading in basic tests (#41496)
Christian Brauner [Sat, 4 Apr 2026 13:03:07 +0000 (15:03 +0200)] 
TEST-70-TPM2: Suppress PCR public key auto-loading in basic tests (#41496)

When systemd-cryptenroll --tpm2-device=auto is called on a system where
a tpm2-pcr-public-key.pem exists it automatically creates tokens with a
signed PCR policy. Unlocking such a token via --unlock-tpm2-device=auto
requires a tpm2-pcr-signature.json file, which is not present.

This creates a race with systemd-tpm2-setup.service at boot: if the
service completes before the test, the key exists and the subsequent
--unlock-tpm2-device=auto calls fail, which I believe is the cause of
the test flakiness.

This also seems to mesh with the fact that this only flakes on Debian
CI, since that's built with ukify which installs a public key.

Let's hopefully fix this by passing --tpm2-public-key= to all
--tpm2-device= enrollment calls that aren't explicitly intended to test
signed PCR policy behaviour.

2 weeks agoConvert more programs to the new option and verb parsers (#41458)
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2026 08:21:14 +0000 (10:21 +0200)] 
Convert more programs to the new option and verb parsers (#41458)

2 weeks agorepart: smaller iso9660 tweaks (#41477)
Lennart Poettering [Sat, 4 Apr 2026 08:12:39 +0000 (10:12 +0200)] 
repart: smaller iso9660 tweaks (#41477)

2 weeks agoupdate TODO 41477/head
Lennart Poettering [Sat, 4 Apr 2026 06:20:18 +0000 (08:20 +0200)] 
update TODO

2 weeks agoiso9660: line break overly long parameter list
Lennart Poettering [Sat, 4 Apr 2026 06:17:29 +0000 (08:17 +0200)] 
iso9660: line break overly long parameter list

2 weeks agoiso9660: validate a bunch func params via assert()
Lennart Poettering [Thu, 2 Apr 2026 12:13:35 +0000 (14:13 +0200)] 
iso9660: validate a bunch func params via assert()

2 weeks agoiso9660: small iso9660_set_string() clean-ups
Lennart Poettering [Thu, 2 Apr 2026 12:13:13 +0000 (14:13 +0200)] 
iso9660: small iso9660_set_string() clean-ups

2 weeks agoiso9660: add extra size regarding buffer size
Lennart Poettering [Thu, 2 Apr 2026 12:12:44 +0000 (14:12 +0200)] 
iso9660: add extra size regarding buffer size

2 weeks agoiso9660: add extra paranoia when converting dates
Lennart Poettering [Thu, 2 Apr 2026 12:11:00 +0000 (14:11 +0200)] 
iso9660: add extra paranoia when converting dates

the ISO9660 date range and the "struct tm" range are quite different,
let's add extra paranoia checks that we can always convert the dates
without issues or fail cleanly.

2 weeks agoiso9660: rename all functions so that they are prefixed by iso9660
Lennart Poettering [Thu, 2 Apr 2026 12:10:16 +0000 (14:10 +0200)] 
iso9660: rename all functions so that they are prefixed by iso9660

2 weeks agoiso9660: prefer uint8_t for 'arbitrary bytes'
Lennart Poettering [Thu, 2 Apr 2026 12:08:17 +0000 (14:08 +0200)] 
iso9660: prefer uint8_t for 'arbitrary bytes'

2 weeks agoTEST-70-TPM2: Suppress PCR public key auto-loading in basic tests 41496/head
Chris Down [Fri, 3 Apr 2026 15:03:28 +0000 (00:03 +0900)] 
TEST-70-TPM2: Suppress PCR public key auto-loading in basic tests

When systemd-cryptenroll --tpm2-device=auto is called on a system where
a tpm2-pcr-public-key.pem exists it automatically creates tokens with a
signed PCR policy. Unlocking such a token via --unlock-tpm2-device=auto
requires a tpm2-pcr-signature.json file, which is not present.

This creates a race with systemd-tpm2-setup.service at boot: if the
service completes before the test, the key exists and the subsequent
--unlock-tpm2-device=auto calls fail, which I believe is the cause of
the test flakiness.

This also seems to mesh with the fact that this only flakes on Debian
CI, since that's built with ukify which installs a public key.

Let's hopefully fix this by passing --tpm2-public-key= to all
--tpm2-device= enrollment calls that aren't explicitly intended to test
signed PCR policy behaviour.

2 weeks agofd-util: Add missing assert()
Daan De Meyer [Fri, 3 Apr 2026 20:03:52 +0000 (22:03 +0200)] 
fd-util: Add missing assert()

2 weeks agoTranslations update from Fedora Weblate (#41499)
Luca Boccassi [Fri, 3 Apr 2026 20:17:13 +0000 (21:17 +0100)] 
Translations update from Fedora Weblate (#41499)

Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).

Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)

2 weeks agopo: Translated using Weblate (Polish) 41499/head
Marek Adamski [Fri, 3 Apr 2026 19:58:48 +0000 (19:58 +0000)] 
po: Translated using Weblate (Polish)

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Marek Adamski <maradam@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pl/
Translation: systemd/main

2 weeks agopo: Translated using Weblate (Hungarian)
Balázs Meskó [Fri, 3 Apr 2026 19:58:47 +0000 (19:58 +0000)] 
po: Translated using Weblate (Hungarian)

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Balázs Meskó <meskobalazs@mailbox.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/hu/
Translation: systemd/main

2 weeks agoreport: add more metrics to the Varlink metrics API (#41078)
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2026 17:55:24 +0000 (19:55 +0200)] 
report: add more metrics to the Varlink metrics API (#41078)

2 weeks agomany: final set of coccinelle check-pointer-deref tweaks (#41426)
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2026 17:27:09 +0000 (19:27 +0200)] 
many: final set of coccinelle check-pointer-deref tweaks (#41426)

This is a followup to https://github.com/systemd/systemd/pull/41400 with
the final set of tweaks so that the new coccinelle `check-pinters-deref`
checker runs without failures.

It also includes a commit with some fixes for redundant asserts and the
final commit to make the assert() in the inner loop of qsort
POINTER_MAY_BE_NULL which will become a no-op - that is probably the
most controversial one, I hope the commit message explains the
trade-offs, I'm happy to drop it, I have no strong opinion either way.

Please see the individual commits/commit messages for more details, most
is (hopefully) relatively boring/mechanical.

2 weeks agotest: Add El Torito boot catalog dissection test
Daan De Meyer [Fri, 3 Apr 2026 10:09:30 +0000 (10:09 +0000)] 
test: Add El Torito boot catalog dissection test

Verify that GPT images with an ISO9660 El Torito boot catalog are
dissected via the GPT partition table rather than being treated as a
single iso9660 filesystem.

Follow-up for e33eb053fb ("dissect-image: Drop
blkid_probe_filter_superblocks_usage() call from probe_blkid_filter()")

2 weeks agodissect-image: Drop blkid_probe_filter_superblocks_usage() call from probe_blkid_filter()
Daan De Meyer [Fri, 3 Apr 2026 10:09:14 +0000 (10:09 +0000)] 
dissect-image: Drop blkid_probe_filter_superblocks_usage() call from probe_blkid_filter()

probe_blkid_filter() sets up a blkid superblock filter to restrict
filesystem detection to a known-safe set of types (btrfs, erofs, ext4,
f2fs, squashfs, vfat, xfs). It does so via two consecutive calls:

  1. blkid_probe_filter_superblocks_type(BLKID_FLTR_ONLYIN, ...)
  2. blkid_probe_filter_superblocks_usage(BLKID_FLTR_NOTIN, BLKID_USAGE_RAID)

However, both filter functions share the same internal bitmap in libblkid.
Each call goes through blkid_probe_get_filter(), which zeroes the entire
bitmap before applying the new filter. This means the second call (usage
filter) silently destroys the type filter set by the first call.

The result is that only RAID superblocks end up being filtered, while all
other filesystem types — including iso9660 — pass through unfiltered.

This causes ISO images (e.g. those with El Torito boot catalogs and GPT)
to be incorrectly dissected: blkid detects the iso9660 superblock on
the whole device (since iso9660 is marked BLKID_IDINFO_TOLERANT and can
coexist with partition tables), the code enters the unpartitioned
single-filesystem path, and then mounting fails because iso9660 is not
in the allowed filesystem list:

  "File system type 'iso9660' is not allowed to be mounted as result
   of automatic dissection."

Fix this by dropping the blkid_probe_filter_superblocks_usage() call.
The BLKID_FLTR_ONLYIN type filter already restricts probing to only
the listed types, which implicitly excludes RAID superblocks as well,
making the usage filter redundant.

Follow-up for 72bf86663c ("dissect: use blkid_probe filters to restrict
probing to supported FSes and no raid")

2 weeks agodissect-image: add crypto_LUKS and swap to blkid probe filter
Daan De Meyer [Fri, 3 Apr 2026 13:43:57 +0000 (13:43 +0000)] 
dissect-image: add crypto_LUKS and swap to blkid probe filter

allowed_fstypes() returns the list of filesystem types that we are
willing to mount. However, the blkid probe filter needs to detect
additional non-mountable types: crypto_LUKS (so that LUKS-encrypted
partitions can be identified and decrypted) and swap (so that swap
partitions can be identified).

Without these types in the BLKID_FLTR_ONLYIN filter, blkid reports
"No type detected" for encrypted and swap partitions, causing
image policy checks to fail (e.g. "encrypted was required") and
mount operations to fail with "File system type not supported".

Note that verity types (DM_verity_hash, verity_hash_signature) do
not need to be added here because their fstype is assigned directly
during partition table parsing, not via blkid probing.

Follow-up for e33eb053fb.

2 weeks agorepart: Use --shrink with mkfs.btrfs to get a minimal filesystem
Daan De Meyer [Fri, 3 Apr 2026 07:13:25 +0000 (09:13 +0200)] 
repart: Use --shrink with mkfs.btrfs to get a minimal filesystem

Avoids populating the filesystem twice similar to read-only
filesystems.

2 weeks agoFix build with -fno-semantic-interposition
Luca Boccassi [Fri, 3 Apr 2026 14:21:53 +0000 (15:21 +0100)] 
Fix build with -fno-semantic-interposition

Fixes https://github.com/systemd/systemd/issues/41494

Follow-up for 44cc82bfbf160bba2562bec08ffacbd587771210

2 weeks agovmspawn: add --cxl= option and memory hotplug support
Daan De Meyer [Fri, 27 Mar 2026 13:53:02 +0000 (13:53 +0000)] 
vmspawn: add --cxl= option and memory hotplug support

Add --cxl=BOOL option to enable CXL (Compute Express Link) support in
the virtual machine. CXL is a high-speed interconnect standard that
allows CPUs to access memory attached to devices such as accelerators
and memory expanders, enabling flexible memory pooling and expansion
beyond what is physically installed on the motherboard. When enabled,
adds cxl=on to the QEMU machine configuration. Only supported on x86_64
and aarch64 architectures.

This is added for testing purposes and for feature parity with mkosi's
CXL= setting.

Extend --ram= to accept an optional maximum size for memory hotplug,
using the syntax --ram=SIZE[:MAXSIZE] (e.g. --ram=2G:8G). When a
maximum is specified, the maxmem key is added to the QEMU memory
configuration section to enable memory hotplug up to the given limit.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
2 weeks agocore: do not GC units that have FDs stored (#41435)
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2026 12:30:07 +0000 (14:30 +0200)] 
core: do not GC units that have FDs stored (#41435)

If a unit has FileDescriptorStorePreserve=yes we'll keep its FDs around
in case it starts again. But if there are no reverse dependencies
referencing it, we'll also GC it and lose all the FDs, which defeats the
point of the setting (which is opt-in).

Do not GC units that have FDs stored to avoid this.

Follow-up for b9c1883a9cd9b5126fe648f3e198143dc19a222d

2 weeks agoupdatectl: fix unexpected polkit prompt on update
Clayton Craft [Thu, 2 Apr 2026 17:06:51 +0000 (10:06 -0700)] 
updatectl: fix unexpected polkit prompt on update

When running `updatectl update` since f0b2ea63, Install() was called
with the version resolved by Acquire() rather than the originally
requested (empty) version, causing the stricter update-to-version polkit
action to be used instead of the update polkit action.

2 weeks agotimedatectl: stop using _fallthrough_ 41458/head
Zbigniew Jędrzejewski-Szmek [Wed, 25 Mar 2026 23:04:34 +0000 (00:04 +0100)] 
timedatectl: stop using _fallthrough_

gcc and newer clang seem to be fine with it, but clang 14, 16, 18
is unhappy:
  ../src/timedate/timedatectl.c:1006:25: error: fallthrough annotation does not directly precede switch label
                        _fallthrough_;
                        ^
_fallthrough_ doesn't seem to be used very often in option parsing,
so let's remove the use for now.

2 weeks agotimedatectl: use the new option and verb wrappers
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2026 09:06:14 +0000 (10:06 +0100)] 
timedatectl: use the new option and verb wrappers

--help is identical, except for alignment of second column and
changed strings in the standarized options.

Co-developed-by: Claude <claude@anthropic.com>
2 weeks agovpick: use the new option parser
Zbigniew Jędrzejewski-Szmek [Tue, 24 Mar 2026 09:35:30 +0000 (10:35 +0100)] 
vpick: use the new option parser

-h/--help and --version are moved from a standalone section into the Output
group, because they look misplaced without a header and having a new "Options"
group with the verb-like entries also wasn't appealing.

Output is changed a bit to avoid repeating "rather than path":
-  -p --print=filename  Print selected filename rather than path
-  -p --print=version   Print selected version rather than path
-  -p --print=type      Print selected inode type rather than path
-  -p --print=arch      Print selected architecture rather than path
-  -p --print=tries     Print selected tries left/tries done rather than path
-  -p --print=all       Print all of the above
-     --resolve=yes     Canonicalize the result path
+  -h --help              Show this help
+     --version           Show package version
+  -p --print=WHAT        Print selected WHAT rather than path
+     --print=filename    ... print selected filename
+     --print=version     ... print selected version
+     --print=type        ... print selected inode
+     --print=arch        ... print selected architecture
+     --print=tries       ... print selected tries left/tries done
+     --print=all         ... print all of the above
+     --resolve=BOOL      Canonicalize the result path

Co-developed-by: Claude <claude@anthropic.com>
2 weeks agomeson: detect and use __attribute__((no_reorder))
Zbigniew Jędrzejewski-Szmek [Thu, 2 Apr 2026 20:20:48 +0000 (22:20 +0200)] 
meson: detect and use __attribute__((no_reorder))

In some builds (package builds, so with optimization and lto, but I
haven't been able to pin down the exact combination on options that
matters), we end up with items in the verbs array reordered. The order
matters (because of groups, but also because we have some specific order
for display), so this reordering is something that we don't want.

From what I was able to read, the compiler + linker generally keep the
order within a single translation unit, but this is more of a convention
and implementation choice than a guarantee. Add this attribute [1]. It
seems to have the desired effect in CI.

[1] https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/Common-Function-Attributes.html#index-no_005freorder-function-attribute

2 weeks agoanalyze: consistently print error if table formatting fails
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2026 09:56:04 +0000 (11:56 +0200)] 
analyze: consistently print error if table formatting fails

We don't want to return an error without printing something.
So for things which don't matter, explicitly suppress the error
with (void). In other cases, add the standard message.