]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 days agosysupdate: convert to the new option and verb parsers 41797/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:41:04 +0000 (22:41 +0200)] 
sysupdate: convert to the new option and verb parsers

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agosysupdate: reorder verb functions and parse_argv cases to match --help
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:56:20 +0000 (22:56 +0200)] 
sysupdate: reorder verb functions and parse_argv cases to match --help

--transfer-source= is moved up to a better place.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agoptyfwd: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:47:05 +0000 (22:47 +0200)] 
ptyfwd: convert to the new option parser

--help is the same except for common option strings and indentation.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agosocket-activate: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:27:59 +0000 (22:27 +0200)] 
socket-activate: convert to the new option parser

--help is identical except for whitespace and common option strings.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agosysctl: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:23:47 +0000 (22:23 +0200)] 
sysctl: convert to the new option parser

--help output is the same except for common strings and command
reordering.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agosysctl: rename local Option struct to SysctlOption
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:13:06 +0000 (22:13 +0200)] 
sysctl: rename local Option struct to SysctlOption

Avoid collision with Option struct from options.h (option parser).

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agotty-ask-password-agent: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:10:22 +0000 (22:10 +0200)] 
tty-ask-password-agent: convert to the new option parser

--help is identical except for whitespace.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agokeyutil: use OPTION_COMMON macros in a few places
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 20:02:31 +0000 (22:02 +0200)] 
keyutil: use OPTION_COMMON macros in a few places

Somehow those slipped through.

4 days agostoragetm: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 19:24:08 +0000 (21:24 +0200)] 
storagetm: convert to the new option parser

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agojournal-gatewayd: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 22:54:19 +0000 (00:54 +0200)] 
journal-gatewayd: convert to the new option parser

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agoinhibit: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 09:32:33 +0000 (11:32 +0200)] 
inhibit: convert to the new option parser

--help is the same, except for common options and a rewording of
description of --what.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
4 days agoAdd 'data' parameter to options and convert to programs where it is useful (#41786)
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 19:13:32 +0000 (21:13 +0200)] 
Add 'data' parameter to options and convert to programs where it is useful (#41786)

4 days agoqmp-client: add synchronous qmp_client_call()
Daan De Meyer [Thu, 23 Apr 2026 15:03:06 +0000 (15:03 +0000)] 
qmp-client: add synchronous qmp_client_call()

Add a synchronous counterpart to qmp_client_invoke() that pumps the
client's own process()/wait() loop until the reply for the issued
command id arrives, mirroring sd_varlink_call()'s contract: *ret_result
and *ret_error_desc are borrowed pointers into c->current, valid until
the next qmp_client_call(), and a QMP error surfaces as -EIO when the
caller doesn't ask for the description.

Factor the command-build + slot-insert + enqueue sequence shared with
qmp_client_invoke() into qmp_client_send(). A NULL callback marks the
slot as synchronous: dispatch_reply still matches on id (so unknown
ids continue to be logged and discarded, preserving async-only
robustness), but skips the TAKE_PTR + callback invocation and leaves
c->current pinned for qmp_client_call() to read out.

Cover the three paths in test-qmp-client: successful reply, QMP error
with ret_error_desc, and QMP error returned as -EIO.

4 days agodhcp-protocol: introduce several constants, string table lookups, and so on (#41710)
Yu Watanabe [Thu, 23 Apr 2026 18:54:55 +0000 (03:54 +0900)] 
dhcp-protocol: introduce several constants, string table lookups, and so on (#41710)

4 days agovarious: use empty block not break after OPTION_GROUP 41786/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 16:46:57 +0000 (18:46 +0200)] 
various: use empty block not break after OPTION_GROUP

Use the same style everywhere.

4 days agoTODO: add one more entry
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 09:57:18 +0000 (11:57 +0200)] 
TODO: add one more entry

This is something that should be fixed for usability, but it's something
between a missing feature and a bug. Since nobody has complained about
this, it probably can wait.

4 days agomeasure: also measure forgotten .efifw section
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 09:48:56 +0000 (11:48 +0200)] 
measure: also measure forgotten .efifw section

4 days agomeasure: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 07:21:29 +0000 (09:21 +0200)] 
measure: convert to the new option and verb parsers

Previously, we had a nice third 'UKI PE Section' column with the section
names. This is now moved into the help strings, which means that the nice
alignment is lost. Previous behaviour could be restored by constructing
the table manually, but I'm not sure if this is worth the trouble.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agomeasure: reorder verb functions to match --help
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 07:39:04 +0000 (09:39 +0200)] 
measure: reorder verb functions to match --help

4 days agorepart: use parse_tristate_argument_with_auto in one more place
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 17:07:17 +0000 (19:07 +0200)] 
repart: use parse_tristate_argument_with_auto in one more place

4 days agoUse the new verb+option macros in pcrlock (#41669)
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 17:15:30 +0000 (19:15 +0200)] 
Use the new verb+option macros in pcrlock (#41669)

There's a lot of code movement, but the actual changes are
straightforward. Previously, the program was not marked as public, so
the --help/--version interface wasn't tested.

4 days agorepart: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 22:32:59 +0000 (00:32 +0200)] 
repart: convert to the new option parser

The metavars for a few options were changed to be shorter, so that the
automatic alignment works better. Overall, I think the new version is
as least as legible as the old one.

The synopsis for -S/-C/-P is fixed, they do not take an argument.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agosbsign: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 21:59:30 +0000 (23:59 +0200)] 
sbsign: convert to the new option and verb parsers

The options --private-key, --private-key-source, --certificate,
--certificate-source are almost identical in sbsign, but are described
slightly differently. Add OPTION_COMMON_ macros that are parametrized
to keep the purpose of the --private-key and --certificate options
in the description.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agotest-libudev: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 13:09:45 +0000 (15:09 +0200)] 
test-libudev: convert to the new option parser

The program now has a proper --help output. (Not on purpose. It's just
easier to do same thing as everywhere else.)

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agonetwork-generator: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 08:34:42 +0000 (10:34 +0200)] 
network-generator: convert to the new option parser

--help is the same except for whitespace.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agoshutdown: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 08:17:52 +0000 (10:17 +0200)] 
shutdown: convert to the new option parser

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agostdio-bridge: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 08:26:02 +0000 (10:26 +0200)] 
stdio-bridge: convert to the new option parser

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agotest-chase-manual: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 12:37:28 +0000 (14:37 +0200)] 
test-chase-manual: convert to the new option parser

--help now has help strings. --no_autofs is renamed to --no-autofs.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agochase: add explicit root_fd parameter to chaseat() and drop CHASE_AT_RESOLVE_IN_ROOT...
Christian Brauner [Thu, 23 Apr 2026 17:10:21 +0000 (19:10 +0200)] 
chase: add explicit root_fd parameter to chaseat() and drop CHASE_AT_RESOLVE_IN_ROOT (#41652)

Split the single directory fd that chaseat() used to take into two
separate
fds: a root_fd that sets the chroot boundary (symlinks may not escape
it,
absolute symlinks resolve relative to it), and a dir_fd that path
resolution
starts from. This makes the chroot semantics of chaseat() explicit at
every
call site instead of encoding them in the CHASE_AT_RESOLVE_IN_ROOT flag,
which is removed. It also decouples the starting directory from the root
boundary, so callers can descend from any inode inside the tree without
having to reopen the root separately.

XAT_FDROOT passed as root_fd means "no containment" (host root); as
dir_fd
it means "start at root_fd". For a smoother transition, AT_FDCWD is also
accepted as root_fd and treated as XAT_FDROOT. When root_fd points to a
directory that is actually the host root, it is normalized to XAT_FDROOT
up front so the existing shortcut path can kick in.

Absolute paths returned by chaseat() are now relative to root_fd, and
relative paths are relative to dir_fd. The result is absolute only when
there is no chroot boundary (root_fd is XAT_FDROOT), or when an absolute
symlink made resolution jump out of the dir_fd subtree; otherwise
callers
get a relative path they can feed straight back into an openat()-style
call against dir_fd. Specifically, when dir_fd == root_fd and we're not
operating on the host's root directory, we return a relative path even
if
we received an absolute path or resolved an absolute symlink to allow
passing the path directly to openat() style functions. We do this to not
have to go modify every caller of chaseat() to make sure they deal
properly
with any absolute paths they might receive. Only when root_fd != dir_fd
do
we have to return an absolute path to indicate that the path is relative
to
root_fd and not dir_fd.

The shortcut that skips the per-component walk is reworked around a new
chase_xopenat() helper that funnels CHASE_NOFOLLOW, CHASE_MUST_BE_* and
CHASE_TRIGGER_AUTOFS through xopenat_full()'s O_NOFOLLOW, O_DIRECTORY,
XO_REGULAR, XO_SOCKET and XO_TRIGGER_AUTOMOUNT flags. As a result these
flags no longer force us off the shortcut and can be dropped from
CHASE_NO_SHORTCUT_MASK, and the old openat_opath_with_automount() helper
goes away. A CHASE_MUST_BE_ANY alias is introduced for shortcut callers
(stat/access paths) that don't go through xopenat_full() and still need
to bail on those flags locally.

All *_and_* helpers built on top of chaseat() (chase_and_openat,
chase_and_opendirat, chase_and_statat, chase_and_accessat,
chase_and_fopenat_unlocked, chase_and_unlinkat,
chase_and_open_parent_at)
gain the same root_fd parameter, and every call site in the tree is
ported to the new signature.

4 days agoMerge branch 'main' into inode-ref 41652/head
Christian Brauner [Thu, 23 Apr 2026 17:10:15 +0000 (19:10 +0200)] 
Merge branch 'main' into inode-ref

4 days agomkosi: user and group bin needed for a test
vlefebvre [Wed, 22 Apr 2026 15:36:04 +0000 (17:36 +0200)] 
mkosi: user and group bin needed for a test

* Fix the test TEST-02-UNITTESTS for openSUSE environment.

4 days agotest: enable check-{help,version}-systemd-pcrlock 41669/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 21:29:42 +0000 (23:29 +0200)] 
test: enable check-{help,version}-systemd-pcrlock

This is a normal user-facing program, so it should be tested
in the usual fashion.

4 days agopcrlock: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 21:07:11 +0000 (23:07 +0200)] 
pcrlock: convert to the new option and verb parsers

The VERB definitions are done in order to retain the logical
presentation of verbs in lock+unlock pairs.

Previously --help output was too wide, it now fits in 80 columns.
Cosmetic changes in --help output only.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
4 days agopcrlock: reorder function definitions to match --help
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 17:22:11 +0000 (19:22 +0200)] 
pcrlock: reorder function definitions to match --help

The order was random, different in the source code, different in the
verb list, different in --help. Order source code by --help to make
the next patch manageable.

4 days agoman: clarify that /etc/verity.d only parses certificates with the .crt extension...
Lennart Poettering [Thu, 23 Apr 2026 15:28:16 +0000 (17:28 +0200)] 
man: clarify that /etc/verity.d only parses certificates with the .crt extension (#41790)

Exposed in the dracut testsuite while adding tests for sysexts:

```
[    2.972948] localhost (sd-merge)[510]: Validation of dm-verity signature failed via the kernel, trying userspace validation instead: Required key not available
[    2.972993] localhost (sd-merge)[510]: Skipping file '/etc/verity.d/dracut.pem', suffix is not '.crt'.
[    2.973045] localhost (sd-merge)[510]: No userspace dm-verity certificates found.
```

https://github.com/systemd/systemd/blob/658e5ac06f80ee2078b034f7cc483204d7f91c5e/src/shared/dissect-image.c#L3093

4 days agoiovec-util: introduce iovec_equal(), and add overflow check (#41700)
Lennart Poettering [Thu, 23 Apr 2026 15:13:33 +0000 (17:13 +0200)] 
iovec-util: introduce iovec_equal(), and add overflow check (#41700)

4 days agoman: clarify that /etc/verity.d only parses certificates with the .crt extension 41790/head
Antonio Alvarez Feijoo [Thu, 23 Apr 2026 13:39:29 +0000 (15:39 +0200)] 
man: clarify that /etc/verity.d only parses certificates with the .crt extension

Exposed in the dracut testsuite while adding tests for sysexts:

```
[    2.972948] localhost (sd-merge)[510]: Validation of dm-verity signature failed via the kernel, trying userspace validation instead: Required key not available
[    2.972993] localhost (sd-merge)[510]: Skipping file '/etc/verity.d/dracut.pem', suffix is not '.crt'.
[    2.973045] localhost (sd-merge)[510]: No userspace dm-verity certificates found.
```

4 days agodissect-image: fix typo in log message
Antonio Alvarez Feijoo [Thu, 23 Apr 2026 13:39:14 +0000 (15:39 +0200)] 
dissect-image: fix typo in log message

5 days agoRevert "resolve: refuse traffic from the local host only for queries"
Bret Comnes [Thu, 26 Mar 2026 05:59:09 +0000 (22:59 -0700)] 
Revert "resolve: refuse traffic from the local host only for queries"

This reverts commit 526f1594daec073269c3e70ee7914f6dd8740d5c.

This revert is necessary because the change breaks mDNS hostname stability
whenever a DNS-SD service calls UnregisterService. When a service
unregisters (e.g. on process restart), manager_refresh_rrs() clears and
re-adds all RRs in PROBING state, which sends a multicast announcement
(QR=1). The kernel reflects this back to resolved's own socket. Because
the local-address check was moved inside the query-only branch by the
reverted commit, the reply path in on_mdns_packet() is now unguarded.
The looped-back announcement matches the pending probe transaction and
completes it with DNS_TRANSACTION_SUCCESS. Since the zone item is still
in PROBING state (not ESTABLISHED), dns_zone_item_notify() sets
we_lost=true and calls dns_zone_item_conflict(), which invokes
manager_next_hostname() and renames the hostname (e.g. foo.local →
foo4.local). This happens reliably on every restart of any service using
RegisterService/UnregisterService (homebridge, avahi-compat wrappers,
etc.).

The top-level local-address check in on_mdns_packet() suppresses all
looped-back multicast traffic before the reply/query split. Restoring it
there is consistent with the overall design: dns_scope_check_conflicts()
already has its own manager_packet_from_local_address() guard and is
unaffected.

A more targeted long-term fix (e.g. guarding dns_transaction_process_reply()
for mDNS, or avoiding unnecessary re-probing of already-established records
in manager_refresh_rrs()) can be pursued separately.

5 days agoshared: drop redundant cryptsetup_enable_logging(NULL) calls (#41785)
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 10:18:45 +0000 (12:18 +0200)] 
shared: drop redundant cryptsetup_enable_logging(NULL) calls (#41785)

These were only used to implicitly load libcryptsetup at startup.
dlopen_cryptsetup() now calls cryptsetup_enable_logging(NULL) itself,
and every code path that uses libcryptsetup calls dlopen_cryptsetup()
before doing so, so the upfront calls are no longer needed.

5 days agorepart: raise log level to LOG_ERR if dlopen_fdisk() fails
Antonio Alvarez Feijoo [Thu, 23 Apr 2026 06:41:30 +0000 (08:41 +0200)] 
repart: raise log level to LOG_ERR if dlopen_fdisk() fails

libfdisk is required by systemd-repart and it silently exits if dlopen fails
(unless the debug log level is set):

```
$ SYSTEMD_LOG_LEVEL=debug systemd-repart
Shared library 'libfdisk.so.1' is not available: libfdisk.so.1: cannot open shared object file: No such file or directory
$ echo $?
1
```

Follow-up for d49f3f287a0bf72b5b473980cf435f0c0c2413d0

5 days agorepart: trim NUL bytes from verity sig split artifact
Luca Boccassi [Wed, 22 Apr 2026 14:38:10 +0000 (15:38 +0100)] 
repart: trim NUL bytes from verity sig split artifact

The verity signature partition content is a bare JSON object. Repart
pads it with zeros to fill the GPT partition. But when splitting out
the content as an individual file, the padding remains, so it's not
a valid text file.

jq started rejecting files with NUL bytes to fix a security issue:
https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b

Trim the output when writing these files out.

5 days agodissect-image: fix path building for non-raw images (#41674)
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 10:15:18 +0000 (12:15 +0200)] 
dissect-image: fix path building for non-raw images (#41674)

If the passed in image path didn't end with .raw, we'd return an empty
string + suffix instead of the intended image + suffix path.

---

Also, fix two more nits that came up repeatedly in my searches.

5 days agogpt-auto-generator: do not fail on missing libcryptsetup when verity
Nandakumar Raghavan [Tue, 21 Apr 2026 13:14:17 +0000 (13:14 +0000)] 
gpt-auto-generator: do not fail on missing libcryptsetup when verity
is not used

add_veritysetup() is called unconditionally  from add_root_mount() and
add_usr_mount() whenever in_initrd() is true, to generate units that
only activate if verity devices appear. However, when compiled without
libcryptsetup, this function returned a hard error, causing the entire
generator to fail even when no verity protection is in use.

Change the #else fallback to log a debug message and return 0, matching
the pattern already used by add_root_cryptsetup().

5 days agoshared/options: add a 'data' parameter to options
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 08:10:31 +0000 (10:10 +0200)] 
shared/options: add a 'data' parameter to options

This mirrors a similar field in Verb. In some cases it convenient
to pass a fixed value to the parser.

5 days agouserdbctl: drop unused variable
Lennart Poettering [Wed, 22 Apr 2026 21:43:36 +0000 (23:43 +0200)] 
userdbctl: drop unused variable

5 days agomeasure: fix oom check
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2026 09:09:11 +0000 (11:09 +0200)] 
measure: fix oom check

Pointed out in review.

5 days agomeson: move fuzz-journald-util.c to fuzz-journal-audit
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 14:33:12 +0000 (16:33 +0200)] 
meson: move fuzz-journald-util.c to fuzz-journal-audit

The .c file is shared between various fuzz-journal-* binaries. It
was added to 32bd43d768a4bdd54481c5e37ce9ea3d1009a824, but that is
somewhat ugly.

Let's add it to the alphabetially first fuzzer and share from there.

Follow-up for 32bd43d768a4bdd54481c5e37ce9ea3d1009a824 and
85b5acde869baa51f5618fa503eafac3dccbf379.

5 days agomeson: concatenate donors specified in 'objects'
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 15:01:45 +0000 (17:01 +0200)] 
meson: concatenate donors specified in 'objects'

Previously, we'd only honour the last donor.

5 days agoshared: drop redundant dlopen_cryptsetup() calls from cryptsetup_* helpers 41785/head
Daan De Meyer [Thu, 23 Apr 2026 08:10:24 +0000 (08:10 +0000)] 
shared: drop redundant dlopen_cryptsetup() calls from cryptsetup_* helpers

cryptsetup_set_minimal_pbkdf(), cryptsetup_get_token_as_json() and
cryptsetup_add_token_json() each take a struct crypt_device *cd, which
can only be obtained by first calling sym_crypt_init*() — and that
already requires dlopen_cryptsetup() to have succeeded. The internal
calls here were only implicitly re-loading a library the caller is
guaranteed to have already loaded.

5 days agoshared: drop redundant cryptsetup_enable_logging(NULL) calls
Daan De Meyer [Thu, 23 Apr 2026 08:01:04 +0000 (08:01 +0000)] 
shared: drop redundant cryptsetup_enable_logging(NULL) calls

These were only used to implicitly load libcryptsetup at startup.
dlopen_cryptsetup() now calls cryptsetup_enable_logging(NULL) itself,
and every code path that uses libcryptsetup calls dlopen_cryptsetup()
before doing so, so the upfront calls are no longer needed.

5 days agocryptsetup: load libcryptsetup via dlopen in setup binaries
Daan De Meyer [Mon, 20 Apr 2026 20:04:21 +0000 (20:04 +0000)] 
cryptsetup: load libcryptsetup via dlopen in setup binaries

Convert systemd-cryptsetup, systemd-cryptenroll, systemd-veritysetup
and systemd-integritysetup to go through the existing dlopen wrapper
for libcryptsetup instead of linking the library directly. Each binary
calls dlopen_cryptsetup() at the start of its run() and uses the sym_*
variants for every libcryptsetup entry point.

Extend cryptsetup-util.{h,c} to cover the libcryptsetup symbols that
these binaries use and that the wrapper was missing:
crypt_activate_by_token_pin, crypt_deactivate, crypt_init_data_device,
crypt_keyslot_status, crypt_set_keyring_to_link (conditional on
HAVE_CRYPT_SET_KEYRING_TO_LINK), crypt_status and
crypt_token_external_path.

With no direct callers of crypt_free() left, drop the non-sym
crypt_freep cleanup variant and rename sym_crypt_freep back to
crypt_freep via DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME, matching the
naming convention used by other dlopen wrappers (acl_freep,
xkb_context_unrefp, ...). Update the remaining users in src/shared,
src/repart, src/home and src/growfs to the new name.

The four affected meson targets switch from libcryptsetup to
libcryptsetup_cflags so they no longer record a DT_NEEDED entry for
libcryptsetup.so.12.

5 days agorepart: Fix xopenat_full() error handling
Daan De Meyer [Wed, 22 Apr 2026 19:17:17 +0000 (21:17 +0200)] 
repart: Fix xopenat_full() error handling

5 days agoshared: load libgnutls and libmicrohttpd via dlopen
Daan De Meyer [Mon, 20 Apr 2026 19:47:38 +0000 (19:47 +0000)] 
shared: load libgnutls and libmicrohttpd via dlopen

Convert the GnuTLS and libmicrohttpd usage in journal-remote to the
dlopen pattern used by other optional shared libraries. A new
src/shared/gnutls-util.{h,c} declares the GnuTLS entry points via
DLSYM_PROTOTYPE and resolves them in dlopen_gnutls(); microhttpd-util
is moved from src/journal-remote to src/shared and gains analogous
DLSYM_PROTOTYPEs plus dlopen_microhttpd(). Callers in journal-gatewayd,
journal-remote-main and microhttpd-util itself call the sym_* wrappers
and invoke dlopen_gnutls()/dlopen_microhttpd() at their entry points.

setup_gnutls_logger() no longer fails when libgnutls is missing at
runtime; it logs a notice and returns 0 so journal-gatewayd starts up
without TLS dependencies installed.

The meson files gain libgnutls_cflags and libmicrohttpd_cflags partial
dependencies that expose include paths and compile flags only. Every
systemd-journal-{gatewayd,remote,upload} target switches to the cflags
variant, dropping the direct libgnutls/libmicrohttpd link. The
gatewayd->remote object-sharing dance for microhttpd-util.o goes away
since the code now lives in libshared.

test-dlopen-so gains assertions for dlopen_gnutls and dlopen_microhttpd.

5 days agoukify: fix default path for hwids
Clayton Craft [Wed, 22 Apr 2026 18:00:04 +0000 (11:00 -0700)] 
ukify: fix default path for hwids

The documentation and commit that added this seem to suggest this should
be under /usr/lib/systemd

fixes 117ec9db7e71357837190833d7731bc61ae54ecc

5 days agotest: wrap mount/umount when running with sanitizers
Frantisek Sumsal [Wed, 22 Apr 2026 17:12:23 +0000 (19:12 +0200)] 
test: wrap mount/umount when running with sanitizers

On Fedora Rawhide mount/umount is linked against libsystemd, which then
breaks the binaries in sanitizer runs, as we try to run instrumented
code from an uninstrumented binary:

bash-5.3# ldd /usr/bin/mount
        linux-vdso.so.1 (0x00007fa757ef9000)
        libmount.so.1 => /lib64/libmount.so.1 (0x00007fa757e84000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa757e51000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fa757c56000)
        libblkid.so.1 => /lib64/libblkid.so.1 (0x00007fa757c16000)
        libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fa757400000)
        libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fa75734f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa757efb000)
        libclang_rt.asan.so => /usr/lib/clang/22/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so (0x00007fa756800000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fa7566e4000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa7566b7000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa756400000)
bash-5.3# mount
==458==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

This then breaks the whole machine, as mount is quite essential during
boot.

Let's just add mount/umount to the list of wrapped binaries to fix this.

5 days agonspawn: add --forward-journal= and --forward-journal-*= options
Daan De Meyer [Sun, 29 Mar 2026 11:15:35 +0000 (11:15 +0000)] 
nspawn: add --forward-journal= and --forward-journal-*= options

Add --forward-journal=FILE|DIR to forward the container's journal
entries to the host via systemd-journal-remote. When specified,
nspawn starts systemd-journal-remote listening on a Unix socket,
bind-mounts it into the container at /run/host/journal/socket, and
passes a journal.forward_to_socket credential pointing to it.

Add --forward-journal-max-use=, --forward-journal-keep-free=,
--forward-journal-max-file-size=, and --forward-journal-max-files=
to configure disk usage limits for the forwarded journal.

Consolidate nspawn's per-machine on-disk state under a single runtime
directory at /run/systemd/nspawn/<machine>/. The container rootdir
mount point moves from /tmp/nspawn-root-XXXXXX to <runtime_dir>/root,
the unix-export directory moves from
/run/systemd/nspawn/unix-export/<machine> to <runtime_dir>/unix-export,
and the journal-remote socket lives at
<runtime_dir>/journal-remote-socket. Update ssh-generator and
ssh-proxy to follow the new unix-export path layout.

Extract fork_journal_remote() into fork-notify.{c,h} as a shared
helper used by both nspawn and vmspawn, replacing vmspawn's
start_systemd_journal_remote().

Extract runtime_directory_make() into path-lookup.{c,h} as a shared
helper used by both nspawn and vmspawn, replacing vmspawn's inline
runtime directory creation logic.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agovmspawn,journal-remote: add journal forwarding disk usage options
Daan De Meyer [Fri, 27 Mar 2026 14:38:09 +0000 (14:38 +0000)] 
vmspawn,journal-remote: add journal forwarding disk usage options

Add options to vmspawn to configure journal-remote disk usage limits
when forwarding journal entries from the VM. These are passed through
as --max-use=, --keep-free=, --max-file-size=, and --max-files=
command-line arguments to systemd-journal-remote.

Add --max-use=, --keep-free=, --max-file-size=, and --max-files=
command-line options to systemd-journal-remote to allow overriding the
corresponding settings from the configuration file.

Add $SYSTEMD_JOURNAL_REMOTE_CONFIG_FILE environment variable support
to systemd-journal-remote. When set, the specified file is used
instead of the default configuration file and drop-in directories.
When set to the empty string or /dev/null, configuration file parsing
is skipped entirely. vmspawn sets this to /dev/null in the child
process to avoid inheriting the host's journal-remote configuration.

Make fork_notify() argv parameter optional. When NULL is passed,
fork_notify() returns 0 in the child (with $NOTIFY_SOCKET set) and
lets the caller run custom code before exec. Returns 1 in the parent.
This allows vmspawn to set environment variables in the child without
polluting the parent process.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agojournal-remote: convert to the new option parser
Daan De Meyer [Wed, 8 Apr 2026 14:31:00 +0000 (14:31 +0000)] 
journal-remote: convert to the new option parser

Replace the getopt_long()-based parser with the FOREACH_OPTION /
OPTION_* macros from src/shared/options.h, mirroring the recent
conversions of nspawn and vmspawn. Each option's metadata (long
name, short name, metavar and help text) now lives next to its
parsing logic, and the --help text is generated from those
definitions via option_parser_get_help_table() instead of being
hard-coded.

Positional file arguments are collected via
option_parser_get_args() rather than strv_skip(argv, optind).

5 days agoAnother batch of option parsing conversions, easy cases (#41660)
Christian Brauner [Wed, 22 Apr 2026 16:53:37 +0000 (18:53 +0200)] 
Another batch of option parsing conversions, easy cases (#41660)

Those are all relatively short and straightforward.

5 days agodlopen: take log_level argument and log in fallback stubs
Daan De Meyer [Tue, 21 Apr 2026 10:56:21 +0000 (10:56 +0000)] 
dlopen: take log_level argument and log in fallback stubs

Every dlopen_xxx() helper now takes an int log_level argument. It is
passed through to dlopen_many_sym_or_warn() (which in turn propagates it
to dlopen_verbose() for the library-not-installed case), and is used by
the fallback stub when support for the library is not compiled in to
emit a "<lib> support is not compiled in." message at the caller's level.
Callers pass LOG_DEBUG when gracefully degrading, or a higher level when
the failure should surface, and no longer need to log redundantly at the
call site.

As part of this, dlopen_bpf_full() (which already took a log_level) is
merged into dlopen_bpf() rather than keeping both.

The static inline fallbacks used to live in the headers, which required
pulling log.h in from every header that declared a dlopen_xxx(). Move
them into the .c files instead: the declaration is always outside the
#if HAVE_XXX block, the impl sits outside the outer #if HAVE_XXX wrap
with its own internal #if HAVE_XXX/#else/#endif, and apparmor-util.c,
idn-util.c, libmount-util.c and pam-util.c are now always compiled so
they can host their stubs.

5 days agomkosi: trim verity.sig json files to remove NUL padding before passing to jq (#41767)
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 15:25:55 +0000 (17:25 +0200)] 
mkosi: trim verity.sig json files to remove NUL padding before passing to jq (#41767)

jq started rejecting input that has NUL bytes to fix some security
issues,
so we need to trim the verity.sig json files, which are spat out with
the NUL bytes padding from the GPT partition content.

```
‣  Running postinstall script /home/runner/work/systemd/systemd/mkosi/mkosi.postinst.chroot…
jq: parse error: Invalid numeric literal at EOF at line 1, column 16384
‣ "/work/postinst final" returned non-zero exit code 5.
```

https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b

https://github.com/systemd/systemd/pull/41771 updates the producer.

5 days agoutil-linux: Drop required version back to v2.27.1
Daan De Meyer [Wed, 22 Apr 2026 14:24:55 +0000 (16:24 +0200)] 
util-linux: Drop required version back to v2.27.1

It was bumped in a40d93400759c8eb46a2ec8702735bde2333812a but this
is hardly load bearing stuff so let's document the version we actually
require rather than the version that makes a hardly load bearing feature
work properly, especially since v2.41 is extremely new and requiring
distributions to have that is just unrealistic.

This doesn't actually change anything materially except documentation,
but it keeps us honest about depending on stuff from newer util-linux
because we happen to document reliance on an extremely new version.

5 days agooomctl: add missing assert flagged by coccinelle
Luca Boccassi [Wed, 22 Apr 2026 14:07:31 +0000 (15:07 +0100)] 
oomctl: add missing assert flagged by coccinelle

FAIL: check-pointer-deref.cocci found issues in /home/runner/work/systemd/systemd/src/oom/:
diff -u -p /home/runner/work/systemd/systemd/src/oom/oomctl.c /tmp/nothing/oomctl.c
--- /home/runner/work/systemd/systemd/src/oom/oomctl.c
+++ /tmp/nothing/oomctl.c
@@ -107,7 +107,6 @@ static int parse_argv(int argc, char *ar
                         break;
                 }

-        *ret_args = option_parser_get_args(&state);
         return 1;
 }

Coccinelle check(s) failed. For each flagged dereference, either:
  - Add assert(param)/ASSERT_PTR(param) at the top of the function (if the parameter must not be NULL)
  - Add an if (param) guard before the dereference (if NULL is valid)
  - Add POINTER_MAY_BE_NULL(param) if NULL is okay for param

Follow-up for 143af68ee15607aced66e9f5aba55899b3f4e505

5 days agobpf: suppress false-positive clang-tidy/clangd diagnostics under src/bpf
Daan De Meyer [Tue, 21 Apr 2026 20:31:34 +0000 (20:31 +0000)] 
bpf: suppress false-positive clang-tidy/clangd diagnostics under src/bpf

clang-tidy's misc-use-internal-linkage fires on BPF map declarations
(they have the SEC(".maps") attribute and must retain external linkage
so bpftool gen skeleton can resolve them as ELF symbols), and its
misc-include-cleaner flags errno.h as unused even where a /* IWYU
pragma: keep */ is present. clangd's own unused-includes analysis
emits the equivalent diagnostic independently of clang-tidy.

Add src/bpf/.clang-tidy and src/bpf/.clangd that inherit the parent
configs and scope these suppressions to BPF sources only.

5 days agobpf: register compile_commands.json entries for bpf programs
Daan De Meyer [Tue, 21 Apr 2026 20:31:22 +0000 (20:31 +0000)] 
bpf: register compile_commands.json entries for bpf programs

compile_commands.json is generated by ninja from c_COMPILER rules, so
BPF programs (built via custom_target and thus emitted as CUSTOM_COMMAND
rules) never show up there. Clangd consequently falls back to
heuristics when opening .bpf.c files, with poor diagnostic fidelity.

Register a meson postconf script per BPF program that upserts an entry
into compile_commands.json using the same argv meson constructed for
the custom_target. The script runs after meson has written the DB,
substitutes @INPUT@/@OUTPUT@, and keys entries by source path so
repeated reconfigures don't accumulate duplicates.

5 days agobpf: move all programs into src/bpf/ and consolidate meson logic
Daan De Meyer [Tue, 21 Apr 2026 20:31:09 +0000 (20:31 +0000)] 
bpf: move all programs into src/bpf/ and consolidate meson logic

The six .bpf.c files and their shared .bpf.h headers now live directly
under src/bpf/, rather than scattered across src/core/bpf/<prog>/,
src/network/bpf/<prog>/ and src/nsresourced/bpf/<prog>/.

All BPF compilation logic — the BPF_FRAMEWORK determination (clang/gcc/
bpftool/llvm-strip lookups), flag and command construction, vmlinux.h
handling, the bpf_programs list and the loop that builds the unstripped
object, the stripped object and the skeleton header for each program —
moves into src/bpf/meson.build. The top-level meson.build only keeps
option handling and the libbpf dependency. subdir('src/bpf') is pulled
up before config.h generation so that BPF_FRAMEWORK, HAVE_VMLINUX_H and
ENABLE_SYSCTL_BPF land in conf in time.

Skeleton wrapper headers (<prog>-skel.h) are now emitted by a
configure_file() template (src/bpf/bpf-skel-wrapper.h.in) at meson
setup, replacing the previously checked-in shims of the same name.

Consumer #include paths are flattened:
"bpf/<prog>/<prog>-skel.h" becomes "<prog>-skel.h",
"bpf/<prog>/<prog>-api.bpf.h" becomes "<prog>-api.bpf.h". src/bpf is
added to includes so the shared BPF headers resolve.

sysctl-write-event.h, now shared between userspace (networkd-sysctl.c)
and BPF (sysctl-monitor.bpf.c) from a single location, gains guarded
includes so pid_t and uint64_t resolve on both sides: vmlinux.h in the
BPF case (selected via __bpf__), stdint.h + sys/types.h otherwise.

5 days agobuild: Compile fuzz-journald-util.c only if want_fuzz_tests
Chris Hofer [Mon, 20 Apr 2026 14:55:38 +0000 (16:55 +0200)] 
build: Compile fuzz-journald-util.c only if want_fuzz_tests

fuzz-journald-util.c is compiled unconditionally even though fuzzing
tests aren't enabled. Only build it if fuzzing tests are configured.
This also ensure that the functions it uses from src/shared/tests.c are
available.

Fixes 32bd43d768a4bdd54481c5e37ce9ea3d1009a824
Closes #39984

Signed-off-by: Chris Hofer <christian.hofer@codasip.com>
5 days agonetworkd: Add IPv4SrcValidMark= support (#41364)
Daan De Meyer [Wed, 22 Apr 2026 13:48:50 +0000 (15:48 +0200)] 
networkd: Add IPv4SrcValidMark= support (#41364)

Closes https://github.com/systemd/systemd/issues/40643

5 days agosensor: gpd remove packet 3 and 4 (#41249)
Daan De Meyer [Wed, 22 Apr 2026 13:43:32 +0000 (15:43 +0200)] 
sensor: gpd remove packet 3 and 4 (#41249)

Both devices have -90 degrees mounted panels but they don't have the
quirk in kernel.

The Pocket 4 has been researched and it has an acpi accel matrix that
works when setting panel orientation at boot parameter.

The Pocket 3 hasn't been tested, but given it didn't had panel
orientation quirk is for sure that matrix is wrong for it.

Actually is pending the quirks for both devices in kernel but eventually
they will get merged. Till that happens is encourage that owners of
these devices set panel orientation boot parameter to right-up.

Fixes: #41036.
5 days agonetworkd: expose DHCP server pool size and offset via DBus (#41137)
Daan De Meyer [Wed, 22 Apr 2026 13:41:43 +0000 (15:41 +0200)] 
networkd: expose DHCP server pool size and offset via DBus (#41137)

5 days agolocaled-util: respect env var when writing vconsole.conf
Kajus Naujokaitis [Wed, 22 Apr 2026 11:45:32 +0000 (14:45 +0300)] 
localed-util: respect env var when writing vconsole.conf

5 days agoAdd IMDS configuration for TencentCloud and Alibaba ECS
Heran Yang [Wed, 22 Apr 2026 07:27:17 +0000 (15:27 +0800)] 
Add IMDS configuration for TencentCloud and Alibaba ECS

5 days agomkosi: update debian commit reference to 94af257c72ac3e9bf20e324ff31c3bd5d8197f0e 41767/head
Luca Boccassi [Wed, 22 Apr 2026 12:56:00 +0000 (13:56 +0100)] 
mkosi: update debian commit reference to 94af257c72ac3e9bf20e324ff31c3bd5d8197f0e

94af257c72 d/t/control: pull libmicrohttpd-dev for unit-tests suite
08263f18a4 d/t/control: pull libfdisk-dev for test suites
e54175a0a4 Install new files for upstream build

5 days agomkosi: trim verity.sig json files to remove NUL padding before passing to jq
Luca Boccassi [Wed, 22 Apr 2026 12:55:37 +0000 (13:55 +0100)] 
mkosi: trim verity.sig json files to remove NUL padding before passing to jq

jq started rejecting input that has NUL bytes to fix some security issues,
so we need to trim the verity.sig json files, which are spat out with
the NUL bytes padding from the GPT partition content.

‣  Running postinstall script /home/runner/work/systemd/systemd/mkosi/mkosi.postinst.chroot…
jq: parse error: Invalid numeric literal at EOF at line 1, column 16384
‣ "/work/postinst final" returned non-zero exit code 5.

https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b

5 days agosd-stub: make initrd passing incremental + other EFI prep work for #41543 (#41748)
Daan De Meyer [Wed, 22 Apr 2026 12:24:03 +0000 (14:24 +0200)] 
sd-stub: make initrd passing incremental + other EFI prep work for #41543 (#41748)

This is split out of #41543 but I think makes sense of its own.

It primary does one thing: ensure that initrds installed via the Linux EFI protocol are incremental in behaviour (i.e. we read the previously set initrd and combine it with ours). So far we'd simply not install any initrds at all in this case, which would break stuff.

THis is preparatory for #41543, but is generally the better, safer behaviour.

This also contains three minor changes which are purley prep work for #41543 but shouldn't hurt in the big picture.

5 days agooomctl: fix coccinelle check 41660/head
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2026 12:18:50 +0000 (14:18 +0200)] 
oomctl: fix coccinelle check

5 days agomute-console: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 09:57:17 +0000 (11:57 +0200)] 
mute-console: convert to the new option parser

--help is identical except for whitespace.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agomodules-load: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 09:51:14 +0000 (11:51 +0200)] 
modules-load: convert to the new option parser

--help is the same except for common option strings and alignment.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agomachine-id-setup: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 09:42:50 +0000 (11:42 +0200)] 
machine-id-setup: convert to the new option parser

--help is the same except for whitespace changes and that "option
commands" are ordered in the usual style with "--help" first.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agokeyutil: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:30:51 +0000 (10:30 +0200)] 
keyutil: convert to the new option and verb parsers

--help is reorderded slightly and argument specifications are moved
to improve table formatting.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agotest-journal-append: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:30:46 +0000 (10:30 +0200)] 
test-journal-append: convert to the new option parser

The help string is adjusted/reworded. In particular, [a, b) is used
as notation to show a closed-open range, instead of the unusual <a; b).
--help is shown in --help.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agotest-ndisc-send: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:27:43 +0000 (10:27 +0200)] 
test-ndisc-send: convert to the new option parser

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agohibernate-resume: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:23:25 +0000 (10:23 +0200)] 
hibernate-resume: convert to the new option parser

--help is the same except for whitespace.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agogrowfs: convert to the new option parser
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:22:01 +0000 (10:22 +0200)] 
growfs: convert to the new option parser

--help is the same except for whitespace and common option strings.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agoimport-fs: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:20:39 +0000 (10:20 +0200)] 
import-fs: convert to the new option and verb parsers

--help is the same except for whitespace.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agoexport: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 08:19:17 +0000 (10:19 +0200)] 
export: convert to the new option and verb parsers

--help is the same except for whitespace.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agohwdb: convert to the new option and verb parsers
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2026 07:45:11 +0000 (09:45 +0200)] 
hwdb: convert to the new option and verb parsers

Verbs are reordered to show 'query' above 'update'. I think this
makes more sense.

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
5 days agoTranslations update from Fedora Weblate (#41765)
Luca Boccassi [Wed, 22 Apr 2026 11:16:33 +0000 (12:16 +0100)] 
Translations update from Fedora Weblate (#41765)

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)

5 days agopo: Translated using Weblate (Portuguese (Brazil)) 41765/head
Rafael Fontenelle [Wed, 22 Apr 2026 10:58:48 +0000 (10:58 +0000)] 
po: Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt_BR/
Translation: systemd/main

5 days agopo: Translated using Weblate (Portuguese (Brazil))
Weblate Translation Memory [Wed, 22 Apr 2026 10:58:48 +0000 (10:58 +0000)] 
po: Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt_BR/
Translation: systemd/main

6 days agovmspawn: catch unsupported growing of qcow2 images (#41654)
Christian Brauner [Tue, 21 Apr 2026 18:32:05 +0000 (20:32 +0200)] 
vmspawn: catch unsupported growing of qcow2 images (#41654)

For qcow2 images it's not enough to grow the file. Since we probably
don't want to shell out to qemu-img either let's just error out to make
the user aware that growing needs to be done manually.

6 days agotest: avoid using external commands in trap handlers
Frantisek Sumsal [Tue, 21 Apr 2026 10:07:02 +0000 (12:07 +0200)] 
test: avoid using external commands in trap handlers

In #39675 the reported fail was as follows:

5580s [  247.559994] TEST-13-NSPAWN.sh[1858]: Exported 93%.
5580s [  247.659002] TEST-13-NSPAWN.sh[1858]: Exported 95%.
5580s [  247.785893] TEST-13-NSPAWN.sh[1858]: Operation completed successfully.
5580s [  247.923727] TEST-13-NSPAWN.sh[1858]: Exiting.
5580s [  258.300406] TEST-13-NSPAWN.sh[1074]: + machinectl import-raw /var/tmp/container-export.raw container-raw-reimport
5580s [  258.323328] TEST-13-NSPAWN.sh[1884]: The 'machinectl import-raw' command has been replaced by 'importctl -m import-raw'. Redirecting invocation.
5580s [  258.659982] TEST-13-NSPAWN.sh[1884]: Failed to transfer image: Remote peer disconnected
5580s [  258.734218] TEST-13-NSPAWN.sh[1074]: + at_exit

Turns out that the real reason behind this fail is that the machine was
under heavy load due to a busy-loop from the stub init. The cause of
this is a bug in bash, where running commands that fork (i.e. not
built-ins) can cause a permanent busy-loop due to a desync in trap
handling if you send the signals to the bash process _just right_:

[   90.855318] TEST-13-NSPAWN.sh[1074]: + machinectl poweroff long-running long-running long-running
[   90.855318] TEST-13-NSPAWN.sh[1074]: + machinectl reboot long-running long-running long-running
[   90.928980] systemd-nspawn[1679]: ++ touch /poweroff
[   90.928980] systemd-nspawn[1679]: +++ touch /reboot
[   90.928980] systemd-nspawn[1679]: + :
[   90.928980] systemd-nspawn[1679]: + :
[   90.928980] systemd-nspawn[1679]: + wait
[   90.928980] systemd-nspawn[1679]: + :
[   90.928980] systemd-nspawn[1679]: + :
[   90.928980] systemd-nspawn[1679]: + wait
[   90.928980] systemd-nspawn[1679]: + :
[   90.928980] systemd-nspawn[1679]: + :
[   90.928980] systemd-nspawn[1679]: + wait
...

$ journalctl --file TEST-13-NSPAWN-1.journal -o short-monotonic --no-hostname --grep "^\+ wait$" | wc -l
349734

So the stub-init was hammering the machine in a tight endless loop,
which then caused systemd-importd to timeout when talking to D-Bus:

[  258.300096] TEST-13-NSPAWN.sh[1074]: + machinectl import-raw /var/tmp/container-export.raw container-raw-reimport
...
[  258.415319] systemd-importd[1859]: Unable to request name, failing connection: Method call timed out
[  258.483662] systemd-importd[1859]: Bus n/a: changing state RUNNING → CLOSING
[  258.605442] systemd-importd[1859]: Bus n/a: changing state CLOSING → CLOSED
[  258.659958] TEST-13-NSPAWN.sh[1884]: Failed to transfer image: Remote peer disconnected

Given this is not our issue, let's work around it by using just
built-ins from the trap handlers, which are not susceptible to this bug.

Resolves: #39675

6 days agostring-util: beef up string_is_safe()
Lennart Poettering [Thu, 16 Apr 2026 07:03:24 +0000 (09:03 +0200)] 
string-util: beef up string_is_safe()

This tightens the checks of string_is_safe() and then adds flags to
relax certain aspects of it.

This does alter the rules on certain strings we pass a bit. We mostly
tighten the rules (but I think it's find and good) but we relax them on
others.

I let claude review the changes in behaviour for the various call sites
that I made. It summarized things in this table:

  ╭───────────────────────────────────────────────────┬──────────────────────────────────────────────╮
  │ CALL SITE                                         │ EFFECTIVE DELTA                              │
  ├───────────────────────────────────────────────────┼──────────────────────────────────────────────┤
  │ src/basic/syslog-util  log_namespace_name_valid   │ +UTF-8 required (globs already blocked)      │
  │ src/bootctl  --efi-boot-option-description        │ RELAXED: '\' and quotes now permitted        │
  │ src/core/dbus-manager  pretimeout governor        │ +UTF-8, +no-globs                            │
  │ src/core/load-fragment  ExecStart= path           │ +UTF-8, +no-globs                            │
  │ src/core/main  pretimeout governor (kcmdline)     │ +UTF-8, +no-globs                            │
  │ src/core/service  sd_notify STATUS=               │ +no-globs (ASCII-only preserved)             │
  │ src/home/homectl  --<identity field>=             │ empty now REJECTED; +UTF-8                   │
  │ src/libsystemd-network  dhcp_option_parse_string  │ (equivalent, just explicit)                  │
  │ src/libsystemd-network  sd_dhcp_server boot_fname │ ""→NULL coerced; else equivalent             │
  │ src/libsystemd/journal  SYSLOG_IDENTIFIER fb      │ +UTF-8, +no-globs                            │
  │ src/libsystemd/sd-json  SD_JSON_STRICT strings    │ +UTF-8 required                              │
  │ src/login/logind  session desktop=                │ +UTF-8 required                              │
  │ src/pcrlock  EFI variable string                  │ +UTF-8                                       │
  │ src/pcrlock  EFI action string                    │ RELAXED: empty + '\' now ok; +UTF-8          │
  │ src/resolve  dns-delegate id (from filename)      │ +UTF-8, +no-globs                            │
  │ src/shared/boot-entry  boot_entry_token_valid     │ (equivalent)                                 │
  │ src/shared/conf-parser  section header            │ +UTF-8, +no-globs                            │
  │ src/shared/conf-parser  CONFIG_PARSE_STRING_SAFE  │ +UTF-8 required                              │
  │ src/shared/kbd-util  keymap_is_valid              │ (equivalent; folded into STRING_FILENAME)    │
  │ src/shared/tpm2  nvpcr name                       │ +UTF-8 required                              │
  │ src/shared/vconsole  x11 layout/model/variant/opt │ +UTF-8, +no-globs                            │
  │ src/systemctl  --kernel-cmdline=                  │ +0x7f DEL rejected; empty path split out     │
  │ src/veritysetup  salt=                            │ RELAXED: safety check removed entirely       │
  │ src/vmspawn  --ssh-key-type=                      │ +UTF-8 required                              │
  ╰───────────────────────────────────────────────────┴──────────────────────────────────────────────╯

7 days agoci: Restore severity prefix on claude-review inline comments
Christian Brauner [Tue, 21 Apr 2026 07:20:21 +0000 (09:20 +0200)] 
ci: Restore severity prefix on claude-review inline comments

Commit a65ebc3ff9 ("claude-review: improve review quality for large
PRs") dropped the `Claude: **<severity>**: ` prefix from posted inline
comments on the theory that Claude was also adding the severity into
`body`, producing duplicates. But nothing in the prompt or schema
actually asks the subagent to include severity in `body` — severity
is a separate structured field. The result is that inline comments
no longer show must-fix/suggestion/nit classification.

Restore the prefix in the posting step, and add an explicit instruction
to the subagent prompt telling it not to repeat severity inside `body`
so the two don't collide.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
7 days agoboot: share combine_initrds() between stub/boot 41748/head
Lennart Poettering [Wed, 25 Mar 2026 17:09:01 +0000 (18:09 +0100)] 
boot: share combine_initrds() between stub/boot

We'd like to use combine_initrds() later in systemd-boot, hence move it
out of stub.c and into shared code.

7 days agoboot: export more helpers from cpio.c
Lennart Poettering [Wed, 25 Mar 2026 17:15:13 +0000 (18:15 +0100)] 
boot: export more helpers from cpio.c

We want to reuse this later in systemd-boot, hence make these helpers
public.

7 days agoboot: introduce a common structure for cpio target dirs
Lennart Poettering [Wed, 25 Mar 2026 17:11:45 +0000 (18:11 +0100)] 
boot: introduce a common structure for cpio target dirs

There are only a few target dirs we place resources in when generating
on-the-fly initrd cpios. These dirs have very specific attributes.
Instead of repeating this everywhere, let's encapsulate them in a new
explicit structure, that we can reuse at various places.

This is preparation for placing extra resources of Type #1 entry also in
them without having to encode access modes at multiple places
redundantly.

7 days agostub: load previous initrd that is already configured, too
Lennart Poettering [Fri, 20 Mar 2026 20:48:12 +0000 (21:48 +0100)] 
stub: load previous initrd that is already configured, too

This changes the initrd combination logic to also include any initrd
already configured via the "LINUX_INITRD_MEDIA_GUID" device in the
initrd we pass to the linux kernel.

Or in other words: with this systemd-stub starts operating purely
incremental: it will extend any previously installed initrd with its own
stuff, so that both the previous initrd(s) and systemd-stub's are in
effect.

7 days agoboot: change initrd_register() so that it replaces any previously registered LINUX_IN...
Lennart Poettering [Fri, 20 Mar 2026 21:41:08 +0000 (22:41 +0100)] 
boot: change initrd_register() so that it replaces any previously registered LINUX_INITRD_MEDIA device

So far, if an initrd is already registered we'd silently not register
one again. Let's make this more reliable and systematic, and register
ours, overriding what is previously set.

(Note, in a later commit we'll incorporate any previously set initrd,
which hence makes this all incremental instead of destructive as it
might appear now)