]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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.

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

7 days agofdisk-util: load libfdisk via dlopen
Daan De Meyer [Mon, 20 Apr 2026 07:32:46 +0000 (07:32 +0000)] 
fdisk-util: load libfdisk via dlopen

Convert fdisk-util to the dlopen pattern used by other optional shared
libraries in libshared. Declare the libfdisk API entry points with
DLSYM_PROTOTYPE, resolve them in a dlopen_fdisk() helper, and call the
sym_* wrappers from the homework, sysupdate and repart binaries that
use them.

With this in place fdisk-util can live in libshared itself, linked only
against libfdisk's headers (via libfdisk_cflags). The libshared_fdisk
convenience library and the libfdisk link dependency on systemd-homework,
systemd-sysupdate, systemd-repart and systemd-repart.standalone go away.

Also add a dlopen_fdisk() check to test-dlopen-so.

7 days agosysupdate: Emit READY=1 status when installing
Philip Withnall [Mon, 20 Apr 2026 17:02:42 +0000 (18:02 +0100)] 
sysupdate: Emit READY=1 status when installing

`READY=1` is already correctly emitted when acquiring an update, but was
forgotten to be emitted when subsequently installing that update.

That meant that the state tracking code in `sysupdated` and hence
`updatectl` could not properly report the progress of the install
operation, and hence printed “Already up-to-date” after a successful
update installation, rather than “Done”.

Add a test to catch this in future.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Fixes: https://github.com/systemd/systemd/issues/41502
7 days agocore: implement Kill/Automount/Mount Context/Runtime for io.systemd.Unit.List (#39391)
Lennart Poettering [Mon, 20 Apr 2026 20:57:21 +0000 (22:57 +0200)] 
core: implement Kill/Automount/Mount Context/Runtime for io.systemd.Unit.List (#39391)

The PR implements the following objects + tests for
`io.systemd.Unit.List`:
- `KillContext`
- `AutomountContext`
- `AutomountRuntime`
- `MountContext`
- `MountRuntime`

It's a continuation of the following PRs:
* https://github.com/systemd/systemd/pull/37432
* https://github.com/systemd/systemd/pull/37646
* https://github.com/systemd/systemd/pull/38032
* https://github.com/systemd/systemd/pull/38212

7 days agobootctl: add --print-efi-architecture switch
Lennart Poettering [Mon, 20 Apr 2026 15:49:31 +0000 (17:49 +0200)] 
bootctl: add --print-efi-architecture switch

This is extremely useful for our own test cases, since acquiring the
right EFI architecture string is otherwise a bit nasty.

7 days agoshared/curl-util: load libcurl via dlopen
Daan De Meyer [Fri, 17 Apr 2026 14:06:23 +0000 (16:06 +0200)] 
shared/curl-util: load libcurl via dlopen

Convert curl-util to the dlopen pattern used by other optional shared
libraries in libshared (libarchive, pcre2, idn, ...). Declare the curl
API entry points with DLSYM_PROTOTYPE, resolve them in a dlopen_curl()
helper, and call the sym_* wrappers from callers. curl_glue_new() now
loads the library on first use, so consumers going through CurlGlue
pick this up automatically; journal-upload and report-upload call
dlopen_curl() directly since they use curl without the glue layer.

With this in place curl-util can live in libshared itself, linked only
against libcurl's headers (via libcurl_cflags). The libcurlutil_static
convenience library and the libcurl link dependency on systemd-imdsd,
systemd-pull, systemd-journal-upload and systemd-report go away.

Also move the easy_setopt() helper macro next to the DLSYM declarations
so all consumers use a single sym-prefixed definition, and add a
dlopen_curl() check to test-dlopen-so.

7 days agotest: convert sd-journal tests to the new test macros
Frantisek Sumsal [Mon, 20 Apr 2026 15:10:57 +0000 (17:10 +0200)] 
test: convert sd-journal tests to the new test macros

So we can, hopefully, debug issues like #40551 more easily.

7 days agojson-stream: hide JsonStreamQueueItem as an implementation detail
Daan De Meyer [Mon, 13 Apr 2026 08:18:04 +0000 (08:18 +0000)] 
json-stream: hide JsonStreamQueueItem as an implementation detail

The json-stream API previously exposed JsonStreamQueueItem and several
functions operating on it (json_stream_make_queue_item(),
json_stream_enqueue_item(), json_stream_queue_item_free(),
json_stream_queue_item_get_data()). These existed solely to support
sd-varlink's "defer-and-modify" pattern for streaming replies, where a
reply is held back so its "continues" field can be set before
transmission. This is a varlink protocol concern that should not leak
into the generic transport layer.

Similarly, the fd pushing API (json_stream_push_fd(),
json_stream_reset_pushed_fds()) and the pushed_fds state lived inside
JsonStream, even though fd-to-message association is a protocol-level
concern managed entirely by sd-varlink.

Rework the API so that:

- JsonStreamQueueItem and all its functions become static to
  json-stream.c. The only output API is now json_stream_enqueue_full()
  (accepting explicit fds) and the inline json_stream_enqueue() wrapper
  for the common no-fds case.

- The pushed_fds state moves from JsonStream into sd_varlink, where
  sd_varlink_push_fd() and sd_varlink_reset_fds() manage it directly.

- The deferred reply in sd-varlink changes from a JsonStreamQueueItem*
  to a plain sd_json_variant* plus a separate previous_fds/n_previous_fds
  pair, keeping the protocol-specific bookkeeping in sd-varlink where it
  belongs.

- A new varlink_enqueue() helper wraps json_stream_enqueue_full() with
  the varlink connection's pushed fds, transferring fd ownership to the
  queue item on success.

qmp-client.c is fixed to use the new API as well.

7 days agofind-esp: rework ESP/XBOOTLDR discovery logic around returning an O_PATH fd (#41658)
Lennart Poettering [Mon, 20 Apr 2026 16:59:52 +0000 (18:59 +0200)] 
find-esp: rework ESP/XBOOTLDR discovery logic around returning an O_PATH fd (#41658)

Let O_PATH reign, let's make ESP/XBOOTLDR discovery return them
directly.

Split out of #41543 but makes a ton of sense anyway and on its own.

7 days agofind-esp: return pinned fd to ESP/XBOOTLDR 41658/head
Lennart Poettering [Mon, 13 Apr 2026 16:04:29 +0000 (18:04 +0200)] 
find-esp: return pinned fd to ESP/XBOOTLDR

The reworks the ESP/XBOOTLDR logic to pin the ESP/XBOOTLDR via an fd,
and return that as optional return parameter.

So far we only pinned the parent dir of the ESP/XBOOTLDR, which was
useful when verifying that ESP/XBOOTLDR is actually a mount point by
comparing mount ids. This however became obsolete with
a98a6eb95cc980edab4b0f9c59e6573edc7ffe0c. Hence, let's clean this up,
and pin the inode we really care about and return it.

7 days agochase: tighten flags checks in chase_and_unlinkat()
Lennart Poettering [Thu, 16 Apr 2026 03:44:44 +0000 (05:44 +0200)] 
chase: tighten flags checks in chase_and_unlinkat()

Some flags don't reasonably apply to chase_and_unlinkat() (because we
open the parent inode of an inode to delete, which is always a dir),
hence let's catch these flags when misused.

(I ran into this, and it was very confusing to debug, hence let's make
it easier)

7 days agobtrfs-util: make sure btrfs_get_block_device_at() works when called without path
Lennart Poettering [Tue, 14 Apr 2026 07:32:32 +0000 (09:32 +0200)] 
btrfs-util: make sure btrfs_get_block_device_at() works when called without path

7 days agosd-path: expose XDG 'projects' user dir
Lennart Poettering [Mon, 20 Apr 2026 09:41:53 +0000 (11:41 +0200)] 
sd-path: expose XDG 'projects' user dir

As per:

https://blog.tenstral.net/2026/04/hello-projects-directory.html

7 days agotest: re-enable sync in TEST-25-IMPORT
Frantisek Sumsal [Mon, 20 Apr 2026 10:14:41 +0000 (12:14 +0200)] 
test: re-enable sync in TEST-25-IMPORT

Newer tar started using openat2() via open_subdir() to address
CVE-2025-45582 [0]. Now, gnulib, that tar uses, provides the openat2()
syscall in two ways [1]:

1) If glibc doesn't provide openat2(), it provides its own version in
   openat2.c, that tries to call openat2() syscall first, and if it
   returns ENOSYS, it emulates the function in userspace.

2) If glibc provides openat2(), it uses that directly, without providing
   any fallback on ENOSYS.

Quite recently our test suite started calling nspawn with
--suppress-sync=yes. This means that we call seccomp_suppress_sync(),
which eventually calls block_open_flag(), that blocks the openat2()
syscall completely and refuses it with ENOSYS as this syscall can't be
sensibly filtered (see the openat2()-relevant comments in
block_open_flag() and seccomp_restrict_sxid()). And when glibc provides
openat2(), there's no fallback, so the ENOSYS bubbles up to the user as:

TEST-25-IMPORT.sh[163]: + tar xzf /var/tmp/scratch.tar.gz
TEST-25-IMPORT.sh[163]: tar: ./adirectory/athirdfile: Cannot open: Function not implemented
TEST-25-IMPORT.sh[163]: tar: Exiting with failure status due to previous errors

Let's mitigate this by re-enabling sync for TEST-25-IMPORT, at least for
now.

[0] https://cgit.git.savannah.gnu.org/cgit/tar.git/commit/?id=75b03fdff48916bd0654677ed21379bdb0db016d
[1] https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0b97ffdf32bdab909d02449043447237273df75e

7 days agoupdate TODO
Lennart Poettering [Mon, 20 Apr 2026 10:35:12 +0000 (12:35 +0200)] 
update TODO

7 days agoparse-util: rework safe_atou64() as wrapper around safe_atou64_full()
Lennart Poettering [Mon, 20 Apr 2026 07:59:56 +0000 (09:59 +0200)] 
parse-util: rework safe_atou64() as wrapper around safe_atou64_full()

Follow-up for: 023f88a6ab76b9784e9b6c6396227f1490c1a8c2

Claude complained...

7 days agoJson underscorify even more (#41636)
Lennart Poettering [Mon, 20 Apr 2026 10:02:30 +0000 (12:02 +0200)] 
Json underscorify even more (#41636)

8 days agoman/fstab-generator: fix option list and make formatting consistent
Felix Pehla [Wed, 15 Apr 2026 12:35:58 +0000 (14:35 +0200)] 
man/fstab-generator: fix option list and make formatting consistent

Add "overlay", which is already mentioned further down below, to the
list of possible options.

Consistently use <literal> for possible values of systemd.volatile=,
rather than <param> or no special formatting.

Use yes/no rather than true/false as boolean since that is what's used
everywhere else and I'm already touching the lines anyway.

8 days agonspawn,shared/nsresource: fix copy-paste errno logging args
mukunda katta [Mon, 20 Apr 2026 04:29:54 +0000 (21:29 -0700)] 
nspawn,shared/nsresource: fix copy-paste errno logging args

In nspawn.c's run_container() the child_netns_fd = receive_one_fd(...)
failure path logged 'r' instead of the negative errno returned in
child_netns_fd, so the actual error from receive_one_fd was being
overwritten by whatever 'r' happened to hold. The other receive_one_fd
call sites in the same function use the returned fd variable directly
(mntns_fd, etc.), so align this one.

In shared/nsresource.c's nsresource_add_cgroup() the cgroup_fd_idx =
sd_varlink_push_dup_fd(...) failure path logged userns_fd_idx, which
is the previous successful push's index, not the negative errno we
just got from pushing cgroup_fd. Log cgroup_fd_idx instead.

Both were flagged by static analysis (#41709) and match the immediately
preceding userns_fd-path pattern that was presumably copy-pasted.

Refs #41709.

8 days agocompress: simplify the condition a bit
Frantisek Sumsal [Sun, 19 Apr 2026 15:26:30 +0000 (17:26 +0200)] 
compress: simplify the condition a bit

Simply mirror the format we've already established in
decompress_blob_zstd().

8 days agocompress: gracefully handle a truncated ZSTD frame
Frantisek Sumsal [Sun, 19 Apr 2026 13:47:11 +0000 (15:47 +0200)] 
compress: gracefully handle a truncated ZSTD frame

If a journal file contains a truncated ZSTD frame (i.e. a frame with
Frame_Content_Size > 0, but with not enough data in Data_Block),
ZSTD_decompressStream() would return a non-zero, non-error value. This
would then skip the error path in the ZSTD_isError() branch and we'd hit
the following assert:

$ build-local/journalctl -o cat --file zstd-truncated.journal
Assertion 'output.pos >= prefix_len + 1' failed at src/basic/compress.c:1236, function decompress_startswith_zstd(). Aborting.
Aborted                    (core dumped) build-local/journalctl -o cat --file zstd-truncated.journal

Let's handle this situation gracefully and return EBADMSG instead.

Also, add another journalctl invocation to the corrupted-journals test
that goes through the sd_journal_get_data() -> decompress_startswith_zstd()
code path which, among other things, covers the issue when run on the
provided journal file.

8 days agotest: append .journal to unpacked corrupted journals
Frantisek Sumsal [Sun, 19 Apr 2026 14:24:55 +0000 (16:24 +0200)] 
test: append .journal to unpacked corrupted journals

Otherwise `journalctl --directory=` skips over them in the second part of
the test.

8 days agoresolved: let's generate enum fields properly too 41636/head
Lennart Poettering [Tue, 14 Apr 2026 13:18:04 +0000 (15:18 +0200)] 
resolved: let's generate enum fields properly too

AFAICS none of the enums here uses dashes, hence this should not
actually have any effect except for being more correct.

8 days agonetworkd: gnerate proper underscored enums in varlink interface
Lennart Poettering [Tue, 14 Apr 2026 13:16:47 +0000 (15:16 +0200)] 
networkd: gnerate proper underscored enums in varlink interface

AFAICS none of the states actually user dashes/underscores, but let's
prepare for the future and be fully correct here.

8 days agomountfsd: generate properly underscored designator json strings
Lennart Poettering [Tue, 14 Apr 2026 13:15:05 +0000 (15:15 +0200)] 
mountfsd: generate properly underscored designator json strings

Let's make sure we generate data that will actually pass the IDL checks,
and use underscores for designator names.

(This is a bugfix)

8 days agosd-json: add JSON_BUILD_PAIR_STRING_NON_EMPTY_UNDERSCORIFY() helper
Lennart Poettering [Tue, 14 Apr 2026 12:05:56 +0000 (14:05 +0200)] 
sd-json: add JSON_BUILD_PAIR_STRING_NON_EMPTY_UNDERSCORIFY() helper

it's the combination of JSON_BUILD_PAIR_STRING_NON_EMPTY
and JSON_BUILD_PAIR_STRING_UNDERSCORIFY

8 days agosd-json: make sure SD_JSON_BUILD_STRING_UNDERSCORIFY() can deal with NULL strings
Lennart Poettering [Mon, 20 Apr 2026 07:35:33 +0000 (09:35 +0200)] 
sd-json: make sure SD_JSON_BUILD_STRING_UNDERSCORIFY() can deal with NULL strings

SD_JSON_BUILD_STRING() and everything else can deal with it, make sure
SD_JSON_BUILD_STRING_UNDERSCORIFY() can too.

8 days agonspawn: avoid passing NULL to log_syntax() (#41712)
Christian Brauner [Mon, 20 Apr 2026 06:48:17 +0000 (08:48 +0200)] 
nspawn: avoid passing NULL to log_syntax()  (#41712)

And a couple of other cosmetic tweaks.

8 days agoimport: fix an always-true assert() 41712/head
Frantisek Sumsal [Sat, 18 Apr 2026 17:22:40 +0000 (19:22 +0200)] 
import: fix an always-true assert()

8 days agostrxcpyx: add a paranoia check for vsnprintf()'s return value
Frantisek Sumsal [Fri, 17 Apr 2026 17:52:53 +0000 (19:52 +0200)] 
strxcpyx: add a paranoia check for vsnprintf()'s return value

vsnprintf() can, under some circumstances, return negative value, namely
during encoding errors when converting wchars to multi-byte characters.
This would then wreak havoc in the arithmetics we do following the
vsnprintf() call. However, since we never do any wchar shenanigans in
our code it should never happen.

Let's encode this assumption into the code as an assert(), similarly how
we already do this in other places (like strextendf_with_separator()).

9 days agoiovec-wrapper: fix memleak, rename functions for consistency, and introduce several...
Yu Watanabe [Sat, 18 Apr 2026 22:29:03 +0000 (07:29 +0900)] 
iovec-wrapper: fix memleak, rename functions for consistency, and introduce several helper functions (#41689)

9 days agoiovec-wrapper: introduce several more helper functions 41689/head
Yu Watanabe [Fri, 17 Apr 2026 14:06:28 +0000 (23:06 +0900)] 
iovec-wrapper: introduce several more helper functions

9 days agoiovec-wrapper: rename iovw_append() to iovw_extend()
Yu Watanabe [Fri, 17 Apr 2026 14:03:11 +0000 (23:03 +0900)] 
iovec-wrapper: rename iovw_append() to iovw_extend()

The naming is consistent with strv_extend().

This also
- introduces tiny iovw_extend_iov() wrapper,
- refuse when the source and target points to the same object,
- check the final count before extending in iovw_extend_iovw().

9 days agoiovec-wrapper: introduce iovw_concat()
Yu Watanabe [Fri, 17 Apr 2026 13:54:54 +0000 (22:54 +0900)] 
iovec-wrapper: introduce iovw_concat()

This is similar to iovw_to_cstring(), but allows embedded NUL, as this
just concat multiple iovec, the result may not be a string.

Now, iovw_to_cstring() internally uses iovw_concat().

9 days agoiovec-wrapper: introduce iovw_compare() and iovw_equal()
Yu Watanabe [Fri, 17 Apr 2026 13:53:56 +0000 (22:53 +0900)] 
iovec-wrapper: introduce iovw_compare() and iovw_equal()

9 days agoiovec-wrapper: fix memleak in iovw_consume() when len == 0
Yu Watanabe [Fri, 17 Apr 2026 13:52:18 +0000 (22:52 +0900)] 
iovec-wrapper: fix memleak in iovw_consume() when len == 0

This makes even when len == 0, the input buffer is freed.
The behavior is consistent with strv_consume() and friends.

9 days agoiovec-util: introduce IOVEC_SHIFT() macro and friends
Yu Watanabe [Mon, 23 Mar 2026 14:04:05 +0000 (23:04 +0900)] 
iovec-util: introduce IOVEC_SHIFT() macro and friends

9 days agosd-dhcp-client: fix memleak of sd_dhcp_client.timeout_ipv6_only_mode
Yu Watanabe [Fri, 10 Apr 2026 04:05:48 +0000 (13:05 +0900)] 
sd-dhcp-client: fix memleak of sd_dhcp_client.timeout_ipv6_only_mode

This also drops unnecessary zero assignments.

9 days agomailmap: name change
Sebastian Bernardt [Sat, 18 Apr 2026 11:19:08 +0000 (21:19 +1000)] 
mailmap: name change

9 days agorepart: add EncryptKDF= option for LUKS2 partitions
Nandakumar Raghavan [Mon, 6 Apr 2026 10:42:51 +0000 (10:42 +0000)] 
repart: add EncryptKDF= option for LUKS2 partitions

systemd-repart currently creates LUKS2 encrypted partitions using
libcryptsetup's default KDF (Argon2id), which requires ~1GB of memory
during key derivation. This is too much for memory-constrained
environments such as kdump with limited crashkernel memory, where
luksOpen fails due to insufficient memory.

Add an EncryptKDF= option to repart.d partition definitions that allows
selecting the KDF type. Supported values are:

- "argon2id" — Argon2id with libcryptsetup-benchmarked parameters
- "pbkdf2"  — PBKDF2 with libcryptsetup-benchmarked parameters
- "minimal" — PBKDF2 with SHA-512, 1000 iterations, no benchmarking,
  matching the existing cryptsetup_set_minimal_pbkdf() behaviour used
  for TPM2-sealed keys

When not specified, the libcryptsetup default (argon2id) is used,
preserving existing behaviour.

The KDF type is applied via sym_crypt_set_pbkdf_type() after
sym_crypt_format() and before any keyslots are added.

9 days agobootspec: two smaller tweaks to bootspec.c (#41690)
Luca Boccassi [Sat, 18 Apr 2026 10:02:35 +0000 (11:02 +0100)] 
bootspec: two smaller tweaks to bootspec.c (#41690)

The first commit is prep work for #41543 but I think it makes a ton of
sense on its own as it cleans up logging a bit.

10 days agorandom-util: introduce random_bytes_allocate_iovec() helper function
Yu Watanabe [Wed, 18 Mar 2026 10:10:01 +0000 (19:10 +0900)] 
random-util: introduce random_bytes_allocate_iovec() helper function

It is similar to crypto_random_bytes_allocate_iovec(), but possibly
insecure.

10 days agobootspec: improve documentation around id/file BootEntry fields 41690/head
Lennart Poettering [Wed, 15 Apr 2026 14:19:43 +0000 (16:19 +0200)] 
bootspec: improve documentation around id/file BootEntry fields

10 days agobootspec: make boot_filename_extract_tries() ready for use outside of bootspec.c
Lennart Poettering [Wed, 15 Apr 2026 14:18:53 +0000 (16:18 +0200)] 
bootspec: make boot_filename_extract_tries() ready for use outside of bootspec.c

10 days agoVarious useful helpers (#41684)
Lennart Poettering [Sat, 18 Apr 2026 07:50:19 +0000 (09:50 +0200)] 
Various useful helpers (#41684)

Split out of #41543.

These don't make too much sense on their own, but they also don't really
hurt. They are preparation for #41543, but in order to make things
either to review I split these four commits out, since they are not
directly part of what the PR shall achieve

10 days agoboot: minor clean-ups in initrd_unregister()
Lennart Poettering [Tue, 7 Apr 2026 20:25:24 +0000 (22:25 +0200)] 
boot: minor clean-ups in initrd_unregister()

10 days agobootctl: minor tweaks (#41695)
Lennart Poettering [Sat, 18 Apr 2026 06:41:46 +0000 (08:41 +0200)] 
bootctl: minor tweaks (#41695)

This is split out of #41543, but makes sense on its own.

10 days agoboot: switch initrd_register() to use _cleanup_free_ and other tweaks
Lennart Poettering [Fri, 20 Mar 2026 21:07:51 +0000 (22:07 +0100)] 
boot: switch initrd_register() to use _cleanup_free_ and other tweaks

10 days agoman: Fix NOTES formatting
Tobias Stoeckmann [Fri, 17 Apr 2026 19:48:53 +0000 (21:48 +0200)] 
man: Fix NOTES formatting

The NOTES section in os-release(5) contains an unusual formatting.
Switch function and ulink tags and remove a newline within ulink text to
keep the entry formatting in sync with others. Also, this preserves the
formatting within the text itself.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agonetwork/json: two trivial cleanups (#41693)
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 17:25:17 +0000 (19:25 +0200)] 
network/json: two trivial cleanups (#41693)

10 days agostring-util: make make_cstring() take void* rather than char*
Yu Watanabe [Thu, 16 Apr 2026 23:41:50 +0000 (08:41 +0900)] 
string-util: make make_cstring() take void* rather than char*

It is typically used for making C string embedded in a binary data.
Hence, the input pointer may not be char*.

10 days agomountpoint-util: initialize mnt_id for name_to_handle_at(AT_HANDLE_MNT_ID_UNIQUE)
Yu Watanabe [Fri, 17 Apr 2026 06:43:38 +0000 (15:43 +0900)] 
mountpoint-util: initialize mnt_id for name_to_handle_at(AT_HANDLE_MNT_ID_UNIQUE)

Suppress the following message:
```
$ sudo valgrind --leak-check=full build/networkctl dhcp-lease wlp59s0
==175708== Memcheck, a memory error detector
==175708== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
==175708== Using Valgrind-3.26.0 and LibVEX; rerun with -h for copyright info
==175708== Command: build/networkctl status wlp59s0
==175708==
==175708== Conditional jump or move depends on uninitialised value(s)
==175708==    at 0x4BC33D1: inode_same_at (stat-util.c:610)
==175708==    by 0x4BF1972: inode_same (stat-util.h:86)
==175708==    by 0x4BF48FE: running_in_chroot (virt.c:817)
==175708==    by 0x4B16643: running_in_chroot_or_offline (verbs.c:37)
==175708==    by 0x4B175CE: _dispatch_verb_with_args (verbs.c:136)
==175708==    by 0x4B17868: dispatch_verb (verbs.c:160)
==175708==    by 0x407CBB: networkctl_main (networkctl.c:249)
==175708==    by 0x407D06: run (networkctl.c:263)
==175708==    by 0x407D39: main (networkctl.c:266)
==175708==
```
Not sure if it is an issue in valgrind or glibc, but at least there is
nothing we can do except for working around it.

10 days agoA small batch of conversions to the new option+verbs macros (#41671)
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 17:04:04 +0000 (19:04 +0200)] 
A small batch of conversions to the new option+verbs macros (#41671)

Those are all relatively straightforward.

10 days agosleep: convert to "verbs", using the new option+verb macros
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 06:00:54 +0000 (08:00 +0200)] 
sleep: convert to "verbs", using the new option+verb macros

We had verb-like dispatch, but done in a manual way. We have a fairly
heavy preperation steps that wraps all operations in the same way, so we
don't want to call the operation implementation functions directly. But
let's use the generic verb machinery and pass the state directly using
the userdata pointer and the recently added verb data pointer.

--help output is substantially the same, but options are now in a new
section below the verbs.

10 days agoRework ssh-issue to be verb-based and convert to the new verb+option parsing (#41668)
Zbigniew Jędrzejewski-Szmek [Fri, 17 Apr 2026 17:01:01 +0000 (19:01 +0200)] 
Rework ssh-issue to be verb-based and convert to the new verb+option parsing (#41668)

This is a bit involved because the old interface was documented, so
compat glue needed to be added.
But I think it's an improvement overall.

10 days agobootctl: make bootspec-util.c independent of bootctl.c 41695/head
Lennart Poettering [Fri, 17 Apr 2026 14:34:34 +0000 (16:34 +0200)] 
bootctl: make bootspec-util.c independent of bootctl.c

This changes boot_config_load_and_select() to also take the root path as
input, just like the ESP and XBOOTLDR path.

This has the benefit of making the whole file independent of bootctl.c,
which means we can link it into a separate test, and is preparatory work
for a follow-up commit.

10 days agobootctl: drop redundant log message
Lennart Poettering [Mon, 13 Apr 2026 20:50:26 +0000 (22:50 +0200)] 
bootctl: drop redundant log message

If unprivileged_mode is false then verify_esp() will treat access errors
like any other and log about them. Here we set it to false, hence
there's no point to log a 2nd time.

10 days agonetwork/json: drop unnecessary return value assignment 41693/head
Yu Watanabe [Thu, 9 Apr 2026 23:02:41 +0000 (08:02 +0900)] 
network/json: drop unnecessary return value assignment

10 days agonetwork/json: fix error handling
Yu Watanabe [Thu, 9 Apr 2026 23:02:14 +0000 (08:02 +0900)] 
network/json: fix error handling

10 days agostat-util: add vfs_free_bytes() 41684/head
Lennart Poettering [Mon, 13 Apr 2026 15:57:10 +0000 (17:57 +0200)] 
stat-util: add vfs_free_bytes()

The casts and the right fields to multiply aren't entirely trivial,
let's add a helper for it.

10 days agostring-util: add minor optimization to strrstr()
Lennart Poettering [Wed, 15 Apr 2026 14:06:04 +0000 (16:06 +0200)] 
string-util: add minor optimization to strrstr()

10 days agostring-util: add new strrstr_no_case() call
Lennart Poettering [Wed, 15 Apr 2026 14:05:37 +0000 (16:05 +0200)] 
string-util: add new strrstr_no_case() call

10 days agoparse-util: add safe_atou64_full()
Lennart Poettering [Fri, 17 Apr 2026 12:56:15 +0000 (14:56 +0200)] 
parse-util: add safe_atou64_full()

10 days agoboot: gracefully handle LoadFile() implementations that return EFI_SUCCESS with a...
Lennart Poettering [Fri, 17 Apr 2026 12:58:46 +0000 (14:58 +0200)] 
boot: gracefully handle LoadFile() implementations that return EFI_SUCCESS with a NULL buffer

LoadFile() with a NULL buffer is supposed to return the file size
without acquiring the data and return EFI_BUFFER_TOO_SMALL.

However it appears some firmware returns EFI_SUCCESS in case the file is
empty, i.e. the file size returned is zero. And I guess that's even
fine.

Let's handle this gracefully hence.

10 days agoboot: never auto-boot a menu entry with the non-default profile
Lennart Poettering [Fri, 17 Apr 2026 10:19:58 +0000 (12:19 +0200)] 
boot: never auto-boot a menu entry with the non-default profile

When figuring out which menu entry to pick by default, let's not
consider any with a profile number > 0. This reflects that fact that
additional profiles are generally used for
debug/recovery/factory-reset/storage target mode boots, and those should
never be auto-selected. Hence do a simple check: if profile != 0, simply
do not consider the entry as a default.

We might eventually want to beef this up, and add a property one can set
in the profile metadata that controls this behaviour, but for now let's
just do a this simple fix.

10 days agoman: drop redundant word from varlinkctl man page
Lennart Poettering [Fri, 17 Apr 2026 13:12:05 +0000 (15:12 +0200)] 
man: drop redundant word from varlinkctl man page

10 days agonamespace: don't log misleading error in the r > 0 path
Frantisek Sumsal [Fri, 17 Apr 2026 13:51:40 +0000 (15:51 +0200)] 
namespace: don't log misleading error in the r > 0 path

fd_is_fs_type() returns < 0 for errors, 0 for false, and > 0 for true, so
in the r > branch we'd most likely report EPERM together with the error
message which is misleading.

10 days agoRevert "ci: Switch PR review workflow to Opus 4.7 via Mantle endpoint"
Luca Boccassi [Fri, 17 Apr 2026 13:16:21 +0000 (14:16 +0100)] 
Revert "ci: Switch PR review workflow to Opus 4.7 via Mantle endpoint"

This reverts commit 011233858520fe607eeff29cfc92d40cf71a6002.

10 days agosystemctl: add --kernel-cmdline= argument
Luca Boccassi [Thu, 16 Apr 2026 22:50:07 +0000 (23:50 +0100)] 
systemctl: add --kernel-cmdline= argument

Allows appending kernel command line arguments, like
kexec-tool does. This is especially needed for the integration
tests, as mkosi adds a bunch of options that are needed for the
test suite to work, and it breaks without them.

10 days agoFollowups for recent changes to basic/iovec-wrapper (#41676)
Luca Boccassi [Fri, 17 Apr 2026 12:55:51 +0000 (13:55 +0100)] 
Followups for recent changes to basic/iovec-wrapper (#41676)